| | |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: '标签打印', |
| | | type: 'primary', |
| | | fun: this.labelPrint |
| | | }, |
| | | // { |
| | | // text: '同步', |
| | | // type: 'primary', |
| | |
| | | // 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 |
| | | } |
| | | ], |
| | | operator: null, |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | created() { |
| | | this.uploadInfo.isShow = this.permissions.equipment_metering_upload |
| | | if(this.permissions.equipment_metering_add){ |
| | | this.table.toolbar.push({ |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }) |
| | | } |
| | | if(this.permissions.equipment_metering_labelprint){ |
| | | this.table.toolbar.push({ |
| | | text: '标签打印', |
| | | type: 'primary', |
| | | fun: this.labelPrint |
| | | }) |
| | | } |
| | | let arr = [] |
| | | if(this.permissions.equipment_metering_edit){ |
| | | arr.push({ |
| | | text: '修改', |
| | | icon: 'el-icon-edit', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.addOrUpdateHandle |
| | | }) |
| | | } |
| | | if(this.permissions.equipment_metering_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 |