zss
2024-01-04 d2c182e7310c30a38ec6ce0d8a1d2ce00d51ac8f
src/views/equipment/equipment/index.vue
@@ -147,7 +147,7 @@
            label: '位置',
            sort: true,
            isTrue: true,
            isSearch: false,
            isSearch: true,
            searchInfoType: 'text'
          },
          // 邮箱
@@ -167,7 +167,7 @@
            label: '供应商',
            sort: true,
            isTrue: true,
            isSearch: false,
            isSearch: true,
            searchInfoType: 'text'
          },
          // 制造商
@@ -177,7 +177,7 @@
            label: '制造商',
            sort: true,
            isTrue: true,
            isSearch: false,
            isSearch: true,
            searchInfoType: 'text'
          },
          // 型号规格
@@ -187,7 +187,7 @@
            label: '型号规格',
            sort: true,
            isTrue: true,
            isSearch: false,
            isSearch: true,
            searchInfoType: 'text'
          },
          // 制造日期
@@ -225,40 +225,8 @@
            searchInfoType: 'text'
          }
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          },
          {
              text: '标签打印',
              type: 'primary',
              fun: this.labelPrint
            },
          {
            text: '同步',
            type: 'primary',
            loading: false,
            fun: this.pullEquipFun
          }
        ],
        operator: [
          {
            text: '修改',
            icon: 'el-icon-edit',
            type: 'text',
            size: 'small',
            fun: this.addOrUpdateHandle
          },
          {
            text: '删除',
            icon: 'el-icon-delete',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
          }
        ],
        toolbar: [],
        operator: null,
        operatorConfig: {
          fixed: 'right',
          label: '操作',
@@ -279,6 +247,49 @@
    ...mapGetters(['permissions'])
  },
  created() {
    this.uploadInfo.isShow = this.permissions.equipment_equipment_upload
    if(this.permissions.equipment_equipment_add){
      this.table.toolbar.push({
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          })
    }
    if(this.permissions.equipment_equipment_labelprint){
      this.table.toolbar.push({
              text: '标签打印',
              type: 'primary',
              fun: this.labelPrint
            })
    }
    if(this.permissions.equipment_equipment_sync){
      this.table.toolbar.push({
            text: '同步',
            type: 'primary',
            loading: false,
            fun: this.pullEquipFun
          })
    }
    let arr = []
    if(this.permissions.equipment_equipment_edit){
      arr.push({
            text: '修改',
            icon: 'el-icon-edit',
            type: 'text',
            size: 'small',
            fun: this.addOrUpdateHandle
          })
    }
    if(this.permissions.equipment_equipment_del){
      arr.push({
            text: '删除',
            icon: 'el-icon-delete',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
          })
    }
    this.table.operator = arr.length>0 ? arr : null
    remote('work_shop').then((response) => {
      if (response.data.code === 0) {
        this.workshopList = response.data.data