瀏覽代碼

车间管理

chrislee 1 月之前
父節點
當前提交
cbfe08c2d2

+ 1 - 1
src/api/workshop.js

@@ -12,7 +12,7 @@ export function getList (data) {
 // 车间详情
 export function getDetail (id) {
   return request({
-    url: request.adornUrl(`/biz-service/pro-workshop/detail/${id}`),
+    url: request.adornUrl(`/biz-service/pro-workshop/info/${id}`),
     method: 'get'
   })
 }

+ 117 - 129
src/views/modules/common/user-component.vue

@@ -1,151 +1,139 @@
 <!-- 用户组件(单选) -->
 <template>
   <div>
-      <el-select
-        v-model="value"
-        ref="select"
-        placeholder="请选择"
-        clearable
-        filterable
-        remote
-        :remote-method="remoteMethod"
-        @change = "onChange"
-        @focus="cancelReadOnly"
-        @hook:mounted="cancelReadOnly"
-        @visible-change="cancelReadOnly">
-        <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-        <el-option v-if="options.length > 0" label="加载更多" style="font-style: italic; color: #8a979e" value="undefined" @click.native="handleClick()"></el-option>
-      </el-select>
+    <el-select v-model="value" ref="select" placeholder="请选择" clearable filterable remote :remote-method="remoteMethod"
+      @change="onChange" @focus="cancelReadOnly" @hook:mounted="cancelReadOnly" @visible-change="cancelReadOnly">
+      <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+      </el-option>
+      <el-option v-if="options.length > 0" label="加载更多" style="font-style: italic; color: #8a979e" value="undefined"
+        @click.native="handleClick()"></el-option>
+    </el-select>
   </div>
 </template>
 
 <script>
-  export default {
-    name: 'user-component',
-    props: {
-      userId: {
-        type: String,
-        default: ''
-      }
+export default {
+  name: 'user-component',
+  props: {
+    userId: {
+      type: String,
+      default: ''
+    }
+  },
+  model: {
+    prop: 'userId',
+    event: 'userSelected'
+  },
+  watch: {
+    userId(value) {
+      this.value = value
+      // 检查缺失item
+      this.checkItem(value)
+    }
+  },
+  data() {
+    return {
+      value: '',
+      current: 1,
+      size: 100,
+      name: '',
+      options: [],
+      loading: false,
+      noMore: false
+    }
+  },
+  mounted() {
+    this.init()
+  },
+  methods: {
+    async init() {
+      this.getList()
     },
-    model: {
-      prop: 'userId',
-      event: 'userSelected'
+    remoteMethod(query) {
+      this.options = []
+      this.current = 1
+      this.name = query
+      this.getList()
     },
-    watch: {
-      userId (value) {
-        this.value = value
-        // 检查缺失item
-        this.checkItem(value)
-      }
+    getList() {
+      this.$http({
+        url: this.$http.adornUrl(`/user-service/user/list`),
+        method: 'get',
+        params: this.$http.adornParams({
+          'current': this.current,
+          'size': this.size,
+          'name': this.name
+        })
+      }).then(({ data }) => {
+        if (data && data.code === '200') {
+          if (this.current > data.data.pages) {
+            return
+          }
+          this.noMore = data.data.records.length >= 10
+          data.data.records.forEach(item => {
+            let i = this.options.findIndex(a => a.value === item.userId)
+            if (i < 0) {
+              this.options.push({
+                label: item.name + ' (' + item.orgName + ')',
+                value: item.userId,
+                name: item.name,
+                phone: item.mobile
+              })
+            }
+          })
+        } else {
+          this.options = []
+        }
+      })
     },
-    data () {
-      return {
-        value: '',
-        current: 1,
-        size: 100,
-        name: '',
-        options: [],
-        loading: false,
-        noMore: false
-      }
+    handleClick() {
+      this.loadMore()
     },
-    mounted () {
-      this.init()
+    loadMore() {
+      this.current++
+      this.value = null
+      this.getList()
     },
-    methods: {
-      async init () {
-        this.getList()
-      },
-      remoteMethod (query) {
-        this.options = []
-        this.current = 1
-        this.name = query
-        this.getList()
-      },
-      getList () {
-        this.$http({
-          url: this.$http.adornUrl(`/user-service/user/list`),
-          method: 'get',
-          params: this.$http.adornParams({
-            'current': this.current,
-            'size': this.size,
-            'name': this.name
-          })
-        }).then(({data}) => {
-          if (data && data.code === '200') {
-            if (this.current > data.data.pages) {
-              return
-            }
-            this.noMore = data.data.records.length >= 10
-            data.data.records.forEach(item => {
-              let i = this.options.findIndex(a => a.value === item.userId)
-              if (i < 0) {
-                this.options.push({
-                  label: item.name + ' (' + item.orgName + ')',
-                  value: item.userId,
-                  name: item.name,
-                  phone: item.mobile
-                })
-              }
-            })
-          } else {
-            this.options = []
-          }
-        })
-      },
-      handleClick () {
-        this.loadMore()
-      },
-      loadMore () {
-        this.current ++
+    onChange(item) {
+      if (item === 'undefined') {
         this.value = null
-        this.getList()
-      },
-      onChange (item) {
-        if (item === 'undefined') {
-          this.value = null
-        }
-        this.$emit('userSelected', item)
-        this.$emit('userSelectedItem', {userId: item, userName: this.options.find(t => t.value === item).name})
-      },
-      checkItem (code) {
-        if (!code || !this.options) return
-        let i = this.options.findIndex(item => item.value === code)
-        if (i > -1) return
-        // info
-        this.$http({
-          url: this.$http.adornUrl(`/user-service/user/info/${code}`),
-          method: 'get'
-        }).then(({data}) => {
-          if (data && data.code === '200' && data.data) {
+      }
+      this.$emit('userSelected', item)
+      this.$emit('userSelectedItem', { userId: item, userName: this.options.find(t => t.value === item).name })
+    },
+    checkItem(code) {
+      if (!code || !this.options) return
+      let i = this.options.findIndex(item => item.value === code)
+      if (i > -1) return
+      // info
+      this.$http({
+        url: this.$http.adornUrl(`/user-service/user/info/${code}`),
+        method: 'get'
+      }).then(({ data }) => {
+        if (data && data.code === '200' && data.data) {
+          // 再次检查,防止异步重复添加
+          if (!this.options.some(opt => opt.value === data.data.userId)) {
             this.options.push({
               label: data.data.name + ' (' + data.data.orgName + ')',
               value: data.data.userId
             })
           }
-        })
-      },
-      cancelReadOnly (onOff) {
-        this.$nextTick(() => {
-          if (!onOff) {
-            const input = this.$refs.select.$el.querySelector('.el-input__inner')
-            const timer = setTimeout(() => {
-              input.removeAttribute('readonly')
-              clearTimeout(timer)
-            }, 200)
-          }
-        })
-      }
+        }
+      })
+    },
+    cancelReadOnly(onOff) {
+      this.$nextTick(() => {
+        if (!onOff) {
+          const input = this.$refs.select.$el.querySelector('.el-input__inner')
+          const timer = setTimeout(() => {
+            input.removeAttribute('readonly')
+            clearTimeout(timer)
+          }, 200)
+        }
+      })
     }
   }
+}
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 61 - 52
src/views/modules/tech/workshop-add-or-update.vue

@@ -1,12 +1,7 @@
 <template>
   <div>
     <div class="my-title">{{ !id ? "新增" : "修改" }}</div>
-    <el-form
-      :model="dataForm"
-      :rules="dataRule"
-      ref="dataForm"
-      label-width="180px"
-    >
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="180px">
       <el-row>
         <el-col :span="12">
           <el-form-item label="名称" prop="name">
@@ -15,30 +10,37 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="主管" prop="workshopManager">
-            <UserComponent
-              v-model="dataForm.workshopManager"
-              :user-id="dataForm.workshopManager"
-              :displayStar="true"
-              @userSelected="userSelected"
-            />
+            <UserComponent v-model="dataForm.workshopManager" :user-id="dataForm.workshopManager" :displayStar="true" />
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
         <el-col :span="24">
           <el-form-item label="描述" prop="description">
-            <el-input v-model="dataForm.description" placeholder="请输入"/>
+            <el-input v-model="dataForm.description" placeholder="请输入" />
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
         <el-col :span="24">
           <el-form-item label="备注说明" prop="remark">
-            <el-input
-              v-model="dataForm.remark"
-              placeholder="请输入"
-              type="textarea"
-            ></el-input>
+            <el-input v-model="dataForm.remark" placeholder="请输入" type="textarea"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row v-if="id">
+        <el-col :span="24">
+          <el-form-item label="工种列表">
+            <el-table :data="dataForm.proWorkTypeList" border style="width: 100%;">
+              <el-table-column prop="workTypeName" label="工种名称" min-width="120" />
+              <el-table-column prop="workTypeCode" label="工种编码" min-width="120" />
+              <el-table-column prop="description" label="描述" min-width="200" />
+              <el-table-column fixed="right" label="操作" width="80">
+                <template slot-scope="{ $index }">
+                  <el-button type="text" size="small" @click="removeWorkType($index)">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
           </el-form-item>
         </el-col>
       </el-row>
@@ -58,31 +60,36 @@ export default {
   components: {
     UserComponent
   },
-  data () {
+  data() {
     return {
       id: 0,
-      dataForm: {},
+      dataForm: {
+        proWorkTypeList: [],
+      },
       materialList: [],
       dataRule: {
         name: [
           { required: true, message: '请输入名称', trigger: 'blur' },
           { min: 1, max: 50, message: '长度在 1 到 50 个字符之间', trigger: 'blur' }
+        ],
+        workshopManager: [
+          { required: true, message: '请选择主管', trigger: 'change' }
         ]
       }
     }
   },
-  created () {
+  created() {
   },
   methods: {
-    init (id) {
+    init(id) {
       this.id = id || 0
       if (!id) return
       this.getDetail()
     },
-    onChose () {
+    onChose() {
       this.$emit('onChose')
     },
-    getDetail () {
+    getDetail() {
       getDetail(this.id).then(({ data }) => {
         if (data && data.code === '200') {
           this.dataForm = data.data || {}
@@ -91,36 +98,38 @@ export default {
         }
       })
     },
-    dataFormSubmit () {
-      // this.$refs['dataForm'].validate((valid) => {
-      //   if (valid) {
-      //     this.$http({
-      //       url: !this.id
-      //         ? this.$http.adornUrl(`/biz-service/pro-program/save`)
-      //         : this.$http.adornUrl(`/biz-service/pro-program/update`),
-      //       method: 'post',
-      //       data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
-      //     }).then(({ data }) => {
-      //       if (data && data.code === '200') {
-      //         this.$message({
-      //           message: '操作成功',
-      //           type: 'success',
-      //           duration: 1500,
-      //           onClose: () => {
-      //             this.onChose()
-      //             this.$emit('refreshDataList')
-      //           }
-      //         })
-      //       } else {
-      //         this.$message.error(data.msg)
-      //       }
-      //     })
-      //   }
-      // })
+    dataFormSubmit() {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: !this.id
+              ? this.$http.adornUrl(`/biz-service/pro-workshop/save`)
+              : this.$http.adornUrl(`/biz-service/pro-workshop/update`),
+            method: 'post',
+            data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
+          }).then(({ data }) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.onChose()
+                  this.$emit('refreshDataList')
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }
+      })
+    },
+    removeWorkType(index) {
+      console.log(index)
     }
   }
 }
 </script>
 
-<style>
-</style>
+<style></style>

+ 85 - 0
src/views/modules/tech/workshop-detail.vue

@@ -0,0 +1,85 @@
+<template>
+  <div>
+    <div class="my-title">查看</div>
+    <div style="margin-left: 20px;margin-right: 20px">
+      <e-desc title="基本信息" column="3">
+        <e-desc-item label="名称">{{ dataForm.name }}</e-desc-item>
+        <e-desc-item label="主管">{{ dataForm.workshopManagerName }}</e-desc-item>
+        <e-desc-item label="创建时间">{{ dataForm.createTime }}</e-desc-item>
+        <e-desc-item label="描述" span="3">{{ dataForm.description }}</e-desc-item>
+        <e-desc-item label="备注" span="3">{{ dataForm.notes }}</e-desc-item>
+      </e-desc>
+      <e-desc title="工种列表">
+        <el-table :data="dataForm.proWorkTypeList" border style="width: 100%;margin-top: 10px" size="small">
+          <el-table-column prop="name" label="工种名称" width="150"></el-table-column>
+          <el-table-column prop="workshopManagerName" label="工种主管" width="120"></el-table-column>
+          <el-table-column prop="description" label="工种描述"></el-table-column>
+          <el-table-column prop="createTime" label="创建时间" width="150"></el-table-column>
+          <el-table-column prop="notes" label="备注"></el-table-column>
+        </el-table>
+      </e-desc>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="onChose">返回</el-button>
+    </span>
+  </div>
+</template>
+
+<script>
+import EDesc from '../common/e-desc'
+import EDescItem from '../common/e-desc-item'
+import { getDetail } from '@/api/workshop'
+
+export default {
+  name: 'workshop-detail',
+  components: {
+    EDesc,
+    EDescItem
+  },
+  data() {
+    return {
+      id: null,
+      dataForm: {
+        name: '',
+        description: '',
+        workshopManager: 0,
+        workshopManagerName: '',
+        notes: '',
+        createTime: '',
+        proWorkTypeList: []
+      }
+    }
+  },
+  methods: {
+    onChose() {
+      this.$emit('onChose')
+    },
+    async init(id) {
+      if (!id) return
+      this.id = id
+      await this.getDetails()
+    },
+    async getDetails() {
+      try {
+        const { data } = await getDetail(this.id)
+        if (data && data.code === '200') {
+          this.dataForm = data.data || {}
+        } else {
+          this.dataForm = {}
+          this.$message.error(data.msg || '获取数据失败')
+        }
+      } catch (e) {
+        this.dataForm = {}
+        this.$message.error('请求失败')
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.workshop-detail {
+  max-width: 700px;
+  margin: 30px auto;
+}
+</style>

+ 108 - 178
src/views/modules/tech/workshop-manage.vue

@@ -3,217 +3,147 @@
   <div>
     <template v-if="!addOrUpdateVisible && !detailVisible">
       <el-form :inline="true" :model="dataForm" @keyup.enter.native="queryData()">
-        <el-form-item label="项目/任务号">
-          <el-input v-model="dataForm.orderCode" placeholder="" clearable/>
+        <el-form-item label="名称">
+          <el-input v-model="dataForm.name" placeholder="" clearable />
         </el-form-item>
         <el-form-item>
           <el-button @click="queryData()">查询</el-button>
           <el-button type="primary" @click="addOrUpdateHandle(0, false)">新增</el-button>
         </el-form-item>
       </el-form>
-      <el-table
-        :data="dataList"
-        border
-        v-loading="dataListLoading"
-        style="width: 100%;">
-        <el-table-column
-          label="序号"
-          type="index"
-          width="50"
-          align="center">
+      <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
+        <el-table-column label="序号" type="index" width="50" align="center">
         </el-table-column>
-         <el-table-column
-          prop="projectName"
-          header-align="center"
-          align="center"
-          min-width="140"
-          :show-tooltip-when-overflow="true"
-          label="项目名称">
+        <el-table-column prop="name" header-align="center" align="center" min-width="140"
+          :show-tooltip-when-overflow="true" label="名称">
         </el-table-column>
-        <el-table-column
-          prop="orderCode"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="任务号">
+        <el-table-column prop="description" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="描述">
         </el-table-column>
-        <el-table-column
-          prop="attachList"
-          header-align="center"
-          align="center"
-          :show-tooltip-when-overflow="true"
-          label="技术协议"
-        >
-        <template slot-scope="scope">
-            <el-button
-              :disabled="
-                !scope.row.attachList || scope.row.attachList.length === 0
-              "
-              type="text"
-              size="small"
-              @click="attachDetails(scope.row.attachList)"
-              >查看</el-button
-            >
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="attachList1"
-          header-align="center"
-          align="center"
-          :show-tooltip-when-overflow="true"
-          label="技术文件"
-        >
-        <template slot-scope="scope">
-            <el-button
-              :disabled="
-                !scope.row.attachList1 || scope.row.attachList1.length === 0
-              "
-              type="text"
-              size="small"
-              @click="attachDetails(scope.row.attachList1)"
-              >查看</el-button
-            >
+        <el-table-column prop="workshopManager" header-align="center" align="center" min-width="120"
+          :show-tooltip-when-overflow="true" label="主管">
+          <template slot-scope="scope">
+            <span>{{ scope.row.workshopManagerName }}</span>
           </template>
         </el-table-column>
-        <el-table-column
-          prop="notes"
-          header-align="center"
-          align="center"
-         :show-tooltip-when-overflow="true"
+        <el-table-column prop="notes" header-align="center" align="center" :show-tooltip-when-overflow="true"
           label="备注">
         </el-table-column>
-        <el-table-column
-          prop="createTime"
-          header-align="center"
-          align="center"
-          min-width="120"
-          :show-tooltip-when-overflow="true"
-          label="创建时间">
+        <el-table-column prop="createTime" header-align="center" align="center" min-width="120"
+          :show-tooltip-when-overflow="true" label="创建时间">
         </el-table-column>
-        <el-table-column
-          fixed="right"
-          header-align="center"
-          align="center"
-          width="150"
-          label="操作">
+        <el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="detailHandle(scope.row)">查看</el-button>
-            <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row, false)">编辑</el-button>
+            <el-button type="text" size="small" @click="detailHandle(scope.row.proWorkshopId)">查看</el-button>
+            <el-button type="text" size="small"
+              @click="addOrUpdateHandle(scope.row.proWorkshopId, false)">编辑</el-button>
           </template>
         </el-table-column>
       </el-table>
-      <el-pagination
-        @size-change="sizeChangeHandle"
-        @current-change="currentChangeHandle"
-        :current-page="pageIndex"
-        :page-sizes="[10, 20, 50, 100]"
-        :page-size="pageSize"
-        :total="totalPage"
+      <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
+        :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
         layout="total, sizes, prev, pager, next, jumper">
       </el-pagination>
     </template>
     <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @onChose="onChose"></add-or-update>
-    <detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
-
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"
+      @onChose="onChose"></add-or-update>
+    <detail v-if="detailVisible" ref="detail" @onChose="onChose" />
     <attach-detail-dialog ref="attachDetail" @onChose="onChose" />
   </div>
 </template>
 
 <script>
-  import AddOrUpdate from './workshop-add-or-update'
-  import Detail from './file-manage-detail'
-  import { getList } from '@/api/workshop'
-  import AttachDetailDialog from '../common/attach-detail-dialog'
-  export default {
-    name: 'workshop-manage',
-    components: {
-      AddOrUpdate, Detail, AttachDetailDialog
+import AddOrUpdate from './workshop-add-or-update'
+import Detail from './workshop-detail'
+import { getList } from '@/api/workshop'
+import AttachDetailDialog from '../common/attach-detail-dialog'
+export default {
+  name: 'workshop-manage',
+  components: {
+    AddOrUpdate, Detail, AttachDetailDialog
+  },
+  data() {
+    return {
+      addOrUpdateVisible: false,
+      detailVisible: false,
+      dataForm: {},
+      dataList: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPage: 0,
+      dataListLoading: false,
+      dataListSelections: [],
+      optionsLevel: []
+    }
+  },
+  created() {
+    this.getDataList()
+  },
+  methods: {
+    onChose() {
+      this.addOrUpdateVisible = false
+      this.detailVisible = false
+    },
+    // 查询
+    queryData() {
+      this.pageIndex = 1
+      this.getDataList()
     },
-    data () {
-      return {
-        addOrUpdateVisible: false,
-        detailVisible: false,
-        dataForm: {},
-        dataList: [],
-        pageIndex: 1,
-        pageSize: 10,
-        totalPage: 0,
-        dataListLoading: false,
-        dataListSelections: [],
-        optionsLevel: []
+    // 获取数据列表
+    getDataList() {
+      this.dataListLoading = true
+      this.addOrUpdateVisible = false
+      let params = {
+        'current': this.pageIndex,
+        'size': this.pageSize,
+        'name': this.dataForm.name ? this.dataForm.name : null
       }
+      getList(params).then(({ data }) => {
+        if (data && data.code === '200') {
+          this.dataList = data.data.records
+          this.totalPage = Number(data.data.total)
+        } else {
+          this.dataList = []
+          this.totalPage = 0
+        }
+        this.dataListLoading = false
+      })
     },
-    created () {
+    // 每页数
+    sizeChangeHandle(val) {
+      this.pageSize = val
+      this.pageIndex = 1
       this.getDataList()
     },
-    methods: {
-      onChose () {
-        this.addOrUpdateVisible = false
-        this.detailVisible = false
-      },
-      // 查询
-      queryData () {
-        this.pageIndex = 1
-        this.getDataList()
-      },
-      // 获取数据列表
-      getDataList () {
-        this.dataListLoading = true
-        this.addOrUpdateVisible = false
-        let params = {
-          'current': this.pageIndex,
-          'size': this.pageSize,
-          'orderCode': this.dataForm.orderCode ? this.dataForm.orderCode : null
-        }
-        getList(params).then(({data}) => {
-          if (data && data.code === '200') {
-            this.dataList = data.data.records
-            this.totalPage = Number(data.data.total)
-          } else {
-            this.dataList = []
-            this.totalPage = 0
-          }
-          this.dataListLoading = false
-        })
-      },
-      // 每页数
-      sizeChangeHandle (val) {
-        this.pageSize = val
-        this.pageIndex = 1
-        this.getDataList()
-      },
-      // 当前页
-      currentChangeHandle (val) {
-        this.pageIndex = val
-        this.getDataList()
-      },
-      // 多选
-      selectionChangeHandle (val) {
-        this.dataListSelections = val
-      },
-      // 新增 / 修改
-      addOrUpdateHandle (item, disable) {
-        this.addOrUpdateVisible = true
-        this.$nextTick(() => {
-          this.$refs.addOrUpdate.init(item, disable)
-        })
-      },
-      // 详情
-      detailHandle (item) {
-        this.detailVisible = true
-        this.$nextTick(() => {
-          this.$refs.detail.init(item)
-        })
-      },
-      attachDetails (attachList) {
-        this.$refs.attachDetail.init(attachList)
-      }
+    // 当前页
+    currentChangeHandle(val) {
+      this.pageIndex = val
+      this.getDataList()
+    },
+    // 多选
+    selectionChangeHandle(val) {
+      this.dataListSelections = val
+    },
+    // 新增 / 修改
+    addOrUpdateHandle(id, disable) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id, disable)
+      })
+    },
+    // 详情
+    detailHandle(id) {
+      this.detailVisible = true
+      this.$nextTick(() => {
+        this.$refs.detail.init(id)
+      })
+    },
+    attachDetails(attachList) {
+      this.$refs.attachDetail.init(attachList)
     }
   }
+}
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>