feat:修复bug

dev
kongyeqing 2023-09-15 16:55:21 +08:00
parent cbad0f06cf
commit 0336178b32
5 changed files with 112 additions and 35 deletions

View File

@ -31,7 +31,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
public params = { public params = {
applicantId: null, applicantId: null,
type: 2, type: 1,
bpmSchemeCode: "prevention-jfdh" bpmSchemeCode: "prevention-jfdh"
} as any; } as any;
@ -373,9 +373,9 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
name: '当前节点', width: "100", render: (data) => { name: '当前节点', width: "100", render: (data) => {
if (data.taskInfo.processStatus === 2) { if (data.taskInfo.processStatus === 2) {
return `<span class="color_0">中断</span></span>` return `<span class="color_0">中断</span></span>`
} else if(data.taskInfo.processStatus === 3){ } else if (data.taskInfo.processStatus === 3) {
return `<span class="color_6">作废</span></span>` return `<span class="color_6">作废</span></span>`
} else if(data.taskInfo.processStatus === 4){ } else if (data.taskInfo.processStatus === 4) {
return `<span class="color_1">结束</span>` return `<span class="color_1">结束</span>`
} else { } else {
if (data.status === 1) { if (data.status === 1) {
@ -388,13 +388,15 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
}); });
this.tableColumn.push({ name: '当前执行人', width: "100", key: "executor", render: (data) => data.taskInfo.executors || "--" }); this.tableColumn.push({ name: '当前执行人', width: "100", key: "executor", render: (data) => data.taskInfo.executors || "--" });
this.tableColumn.push({ name: '最新提交时间', width: "180", key: "updateTime", sortable: 'custom' }); this.tableColumn.push({ name: '最新提交时间', width: "180", key: "updateTime", sortable: 'custom' });
this.tableColumn.push({ name: '发起人', width: "100", key: "startUser", render: (data) => { this.tableColumn.push({
if (this.params.type === 1) { name: '发起人', width: "100", key: "startUser", render: (data) => {
return `<span class="link applicantName">${data.applicantName}</span>` if (this.params.type === 1) {
} else { return `<span class="link applicantName">${data.applicantName}</span>`
return data.applicantName } else {
return data.applicantName
}
} }
}}); });
this.tableColumn.push({ name: '发起时间', key: "applyTime", }); this.tableColumn.push({ name: '发起时间', key: "applyTime", });
this.tableColumn.push({ this.tableColumn.push({
name: '兑换清单', key: "goodsNumber", render: (data) => { name: '兑换清单', key: "goodsNumber", render: (data) => {
@ -568,17 +570,21 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
public doSave() { public doSave() {
// //
let tmpParam = {} as any;
if (this.updateParams.id) { if (this.updateParams.id) {
this.updateParams.oldstatus = this.updateParams.status
if (this.updateParams.status === 1) { if (this.updateParams.status === 1) {
tmpParam.type = 'agree'
this.updateParams.status = 2 this.updateParams.status = 2
} else { } else {
if (this.updateParams.approvalResult === 0) { if (this.updateParams.approvalResult === 0) {
this.updateParams.status = 1 this.updateParams.status = 1
tmpParam.type = 'reject'
} else if (this.updateParams.approvalResult === 1) { } else if (this.updateParams.approvalResult === 1) {
this.updateParams.status = 3 this.updateParams.status = 3
tmpParam.type = 'agree'
} }
} }
} else { } else {
this.updateParams.status = 2 this.updateParams.status = 2
} }
@ -607,22 +613,28 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
} }
}) })
} else if (this.updateParams.id) { } else if (this.updateParams.id) {
let tmpParam = { tmpParam.taskId = this.updateParams.taskInfo?.taskId ?? "";
"taskId": this.updateParams.taskInfo?.taskId ?? "", tmpParam.bizData = [{
"type": this.updateParams.approvalResult === 0 ? "reject" : 'agree', "bizId": this.updateParams.id,
"bizData": [{ "data": JSON.stringify(this.updateParams)
"bizId": this.updateParams.id, }]
"data": JSON.stringify(this.updateParams)
}]
}
this.integralFlowService.taskHandle(tmpParam).then((res: any) => { this.integralFlowService.taskHandle(tmpParam).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success("处理成功!"); this.$message.success("处理成功!");
if (tmpParam.type === 'agree') {
if (res.data.code === 1) {
this.doAgain(res.data, [this.updateParams.approvalUserId])
} else {
this.getTableData()
}
} else {
this.getTableData()
}
this.updateParams = { this.updateParams = {
pointExchangeDetails: [], pointExchangeDetails: [],
} as any } as any
this.showUpdate = false; this.showUpdate = false;
this.getTableData();
} }
}) })
} }
@ -631,6 +643,16 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
} }
public doAgain(data, userlist) {
let candidateInfos = data.candidateInfos[0]
candidateInfos.userList = [...candidateInfos.userList, ...userlist]
this.integralFlowService.taskCandidateSet({ candidateInfos: [candidateInfos] }).then(() => {
this.getTableData()
//
})
}
public triCallback(data) { public triCallback(data) {
if (data.value === "cancel") { if (data.value === "cancel") {
this.subShowUpdate = false this.subShowUpdate = false
@ -887,7 +909,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
this.getTableData(); this.getTableData();
} }
}) })
}).catch(() => { }).catch(() => {
// //
}); });
} }

View File

@ -114,10 +114,10 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
// //
} }
public getTableData(){ public getTableData() {
this.tableService.selectByPageList(this.params).then((res:any)=>{ this.tableService.selectByPageList(this.params).then((res: any) => {
this.tableData = res.data this.tableData = res.data
if(this.getTableCallback){ if (this.getTableCallback) {
this.getTableCallback(res.data) this.getTableCallback(res.data)
} }
}) })
@ -473,6 +473,41 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
this.selectData = data; this.selectData = data;
} }
//
public deleteData(ids: any) {
if (!ids.length) {
return
} else {
this.$confirm("确认删除所选数据?", "确认数据", {
type: 'warning'
}).then(() => {
this.tableService.deleteByIds(ids).then((res: any) => {
if (res.data.type === 0) {
this.$message.success("删除成功!");
this.getTableData()
} else {
let title = '';
if (res.data.names.length > 3) {
title = '“' + res.data.names.slice(0, 3).join('”,“') + '” 等'
} else {
title = '“' + res.data.names.join('”,“') + '”'
}
this.$confirm(`${title}区域下存在单元划分数据,请先删除对应单元`, "", {
type: 'warning',
showConfirmButton: false
}).then(() => {
//
}).catch(() => {
//
})
}
})
}).catch(() => {
//
})
}
}
} }
</script> </script>
<style lang="scss" scoped src="../../common.component.scss"></style> <style lang="scss" scoped src="../../common.component.scss"></style>

View File

@ -133,8 +133,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
name: "设备类别", name: "设备类别",
key: "type", key: "type",
type: "select", type: "select",
datas:this.$store.state.prevention_device_type, datas: this.$store.state.prevention_device_type,
clearable:true, clearable: true,
},]; },];
public showUpdate = false; public showUpdate = false;
@ -568,7 +568,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
public callback(data, type) { public callback(data, type) {
if (type) { if (type) {
if (type === 'pageSize' || type === 'pageNum') { if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data; this.params[type] = data;
} }
this.getTableData(); this.getTableData();
@ -641,6 +641,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
} as any; } as any;
this.getTableData()
} }
// //

View File

@ -31,6 +31,8 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
public params = { public params = {
areaName: "", areaName: "",
unitName: "", unitName: "",
areaId: '',
unitId: '',
name: "" name: ""
} as any; } as any;
@ -222,7 +224,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
multiple: true, multiple: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
require: true, require: true,
clearable:true, clearable: true,
datas: this.$store.state.postList datas: this.$store.state.postList
}, { }, {
name: "安全因素", name: "安全因素",
@ -230,7 +232,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
format: "safetyFactorName", format: "safetyFactorName",
type: "select", type: "select",
multiple: true, multiple: true,
clearable:true, clearable: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
require: true, require: true,
showError: false, showError: false,
@ -340,12 +342,19 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
} }
// //
public handleNodeClick(data) { public handleNodeClick(data) {
this.params.unitName = "";
this.params.areaName = ""; this.params.areaName = "";
this.params.areaId = "";
this.params.unitName = "";
this.params.unitId = "";
console.log('data', data);
if (data.areaId) { if (data.areaId) {
this.params.unitName = data.name this.params.unitName = data.name;
this.params.unitId = data.id;
} else { } else {
this.params.areaName = data.name === "全部" ? "" : data.name this.params.areaName = data.name === "全部" ? "" : data.name;
this.params.areaId = data.name === "全部" ? "" : data.id;
} }
this.getTableData() this.getTableData()
} }
@ -549,10 +558,13 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
this.params = { this.params = {
areaName: "", areaName: "",
unitName: "", unitName: "",
areaId: '',
unitId: '',
name: "", name: "",
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
} as any; } as any;
this.getTableData()
} }
// //
@ -570,6 +582,11 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
identifyTime: moment().format('YYYY-MM-DD'), identifyTime: moment().format('YYYY-MM-DD'),
identifyUserId: this.account.userId, identifyUserId: this.account.userId,
} as any; } as any;
//
if (this.params.areaId) {
this.updateParams.areaId = this.params.areaId;
this.loadUnitData(this.params.areaId)
}
this.updateActionsForm() this.updateActionsForm()
} else { } else {
this.tableService.getListDetail({ id: row.id }).then((res) => { this.tableService.getListDetail({ id: row.id }).then((res) => {

View File

@ -278,8 +278,11 @@ export default class TrainRecords extends BaseRecordComponent<any> {
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
controls: false, controls: false,
showError: false, showError: false,
max: 100, // max: 100,
min: 0, // min: 0,
rules: [
{ pattern: /^(([1-9]?\d(\.\d{1,2})?)|100|100.00)$/, message: '在0~100之间保留两位小数', }
],
hide: !(this.subUpdateParams.examStatus === 1) hide: !(this.subUpdateParams.examStatus === 1)
},] },]
this.subUpdateActions = [{ this.subUpdateActions = [{
@ -389,7 +392,6 @@ export default class TrainRecords extends BaseRecordComponent<any> {
}, 0) }, 0)
} }
} }
public scoreFormat(data: any, item: any) { public scoreFormat(data: any, item: any) {
if (item && item.key === 'score') { if (item && item.key === 'score') {
this.updateParams.score = null; this.updateParams.score = null;
@ -401,7 +403,7 @@ export default class TrainRecords extends BaseRecordComponent<any> {
public callback(data, type) { public callback(data, type) {
if (type) { if (type) {
if (type === 'pageSize' || type === 'pageNum') { if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data; this.params[type] = data;
} }
this.getTableData(); this.getTableData();