| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { delObj, fetchList } from '@/api/equipment/equipment' |
| | | import { delObj, fetchList,pullEquip } from '@/api/equipment/equipment' |
| | | import TableForm from './equipment-form' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { mapGetters } from 'vuex' |
| | |
| | | label: '状态', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: false, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | } |
| | | ], |
| | |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: '同步', |
| | | type: 'primary', |
| | | loading: false, |
| | | fun: this.pullEquipFun |
| | | } |
| | | ], |
| | | operator: [ |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | pullEquipFun(){ |
| | | this.table.toolbar.find((e) => e.text === '同步').loading = true |
| | | pullEquip().then(res=>{ |
| | | this.$message.success(res.data.data.msg) |
| | | this.table.toolbar.find((e) => e.text === '同步').loading = false |
| | | }).catch(error=>{ |
| | | this.$message.error("同步失败",error) |
| | | this.getData() |
| | | this.table.toolbar.find((e) => e.text === '同步').loading = false |
| | | }) |
| | | }, |
| | | workShopFormatter(row, column, cellValue) { |
| | | this.workshopList.forEach((obj) => { |
| | | if (obj.value == cellValue) { |