| | |
| | | import UserRecycleBinModal from './modules/EquipmentList/UserRecycleBinModal' |
| | | import JSuperQuery from '@/components/jeecg/JSuperQuery' |
| | | import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' |
| | | import {mapActions} from 'vuex' |
| | | |
| | | export default { |
| | | name: "EquipmentList", |
| | |
| | | // exportXlsUrl: "/sys/user/exportXls", |
| | | // importExcelUrl: "sys/user/importExcel", |
| | | }, |
| | | isDepartType:'' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | // } |
| | | }, |
| | | created() { |
| | | this.queryTreeData() |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | if(this.isDepartType == -1){ |
| | | this.columns=[ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: '设备编号', |
| | | align: "center", |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '车间', |
| | | align: "center", |
| | | width: 180, |
| | | dataIndex: 'productionName' |
| | | }, |
| | | { |
| | | title: '设备类型', |
| | | align: "center", |
| | | width: 120, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | }, |
| | | |
| | | { |
| | | title: '驱动类型', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'driveType', |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '机床IP', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'equipmentIp' |
| | | }, |
| | | { |
| | | title: '设备功率', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'devicePower' |
| | | }, |
| | | // { |
| | | // title: '部门', |
| | | // align: "center", |
| | | // width: 180, |
| | | // dataIndex: 'orgCodeTxt' |
| | | // }, |
| | | |
| | | { |
| | | title: '系统版本', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'systemVersion' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'}, |
| | | align: "center", |
| | | width: 120 |
| | | } |
| | | |
| | | ] |
| | | }else{ |
| | | this.columns=[ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: '设备编号', |
| | | align: "center", |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '车间', |
| | | align: "center", |
| | | width: 180, |
| | | dataIndex: 'productionName' |
| | | }, |
| | | { |
| | | title: '设备类型', |
| | | align: "center", |
| | | width: 120, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | }, |
| | | |
| | | { |
| | | title: '驱动类型', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'driveType', |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '机床IP', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'equipmentIp' |
| | | }, |
| | | { |
| | | title: '设备功率', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'devicePower' |
| | | }, |
| | | { |
| | | title: '部门', |
| | | align: "center", |
| | | width: 180, |
| | | dataIndex: 'orgCodeTxt' |
| | | }, |
| | | |
| | | { |
| | | title: '系统版本', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'systemVersion' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'}, |
| | | align: "center", |
| | | width: 120 |
| | | } |
| | | |
| | | ] |
| | | } |
| | | |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record); |
| | | this.$refs.modalForm.title = "编辑"; |
| | |
| | | frozenBatch({ids: ids, status: status}).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |