| | |
| | | tableHeadBtnData: { |
| | | type: Array, |
| | | }, |
| | | Treedata:{ |
| | | type:Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | //状态搜索 |
| | |
| | | }, |
| | | // 发布 |
| | | setHandler() { |
| | | console.log('Treedata',this.Treedata) |
| | | if (this.selectRow.length > 0) { |
| | | let hasEditing = this.selectRow.some(item => item.lcstatus !== 'Editing'); |
| | | let showMessage = true; |
| | |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-申请[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-申请[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'PUBLIC'; |
| | | this.parameter.code = this.templateOid |
| | | this.title = '流程审批' |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({oid: oid, btmname: this.result, lcStatus: 'Released'}).then(res => { |
| | | changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Released'}).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success('发布成功') |
| | | this.onLoad() |
| | |
| | | if (this.selectRow.length === 1 && item.lcstatus === "Disabled" && showMessage) { |
| | | this.$message.warning('选择的数据中状态无需再执行当前操作'); |
| | | showMessage = false; |
| | | } else if (this.selectRow.length >= 1 && !hasEditing && showMessage) { |
| | | } else if (this.selectRow.length > 1 && !hasEditing && showMessage) { |
| | | this.$message.warning('您选择的数据全部为【发布状态】才可以发起流程'); |
| | | showMessage = false; |
| | | } else if (this.selectRow.length > 1 && hasEditing && showMessage) { |
| | | } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.records != [] && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-停用[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-停用[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'DISABLE'; |
| | | this.parameter.code = this.templateOid |
| | | this.title = '停用(冻结)编码数据' |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({oid: oid, btmname: this.result, lcStatus: 'Disabled'}).then(res => { |
| | | changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Disabled'}).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success('停用成功') |
| | | this.onLoad() |
| | |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | } else if(this.selectRow.length == 1 && !hasEditing && showMessage ) { |
| | | this.$message.warning('您选择的数据为【发布状态】才可以发起流程') |
| | | } |
| | | }); |
| | |
| | | if (res.data.data.records && res.data.data.records.length != 0) { |
| | | this.parameter = res.data.data.records[0] |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-启用[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-启用[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'Released'; |
| | | this.parameter.code = this.templateOid |
| | | this.title = '启用编码数据' |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({oid: oid, btmname: this.result, lcStatus: 'Released'}).then(res => { |
| | | changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Released'}).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success('启用成功') |
| | | this.onLoad() |
| | |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.records != [] && res.data.data.records.length != 0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + '-回收[' + this.result + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.template = this.userName + '-回收[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; |
| | | this.parameter.type = 'TakeBack'; |
| | | this.parameter.code = this.templateOid |
| | | this.title = '回收编码数据' |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({oid: oid, btmname: this.result, lcStatus: 'TakeBack'}).then(res => { |
| | | changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'TakeBack'}).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.success('回收成功') |
| | | this.onLoad() |
| | |
| | | //多选 |
| | | handleSelectionChange(list) { |
| | | this.selectRow = list; |
| | | console.log(this.selectRow) |
| | | this.parameter.ids = []; |
| | | list.forEach((item) => { |
| | | this.parameter.ids.push(item.oid); |