forked from xxhjsb/hbt-prevention-ui
feat:修复bug
parent
cbad0f06cf
commit
0336178b32
|
@ -31,7 +31,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
|
|||
|
||||
public params = {
|
||||
applicantId: null,
|
||||
type: 2,
|
||||
type: 1,
|
||||
bpmSchemeCode: "prevention-jfdh"
|
||||
} as any;
|
||||
|
||||
|
@ -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: "180", key: "updateTime", sortable: 'custom' });
|
||||
this.tableColumn.push({ name: '发起人', width: "100", key: "startUser", render: (data) => {
|
||||
this.tableColumn.push({
|
||||
name: '发起人', width: "100", key: "startUser", render: (data) => {
|
||||
if (this.params.type === 1) {
|
||||
return `<span class="link applicantName">${data.applicantName}</span>`
|
||||
} else {
|
||||
return data.applicantName
|
||||
}
|
||||
}});
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '发起时间', key: "applyTime", });
|
||||
this.tableColumn.push({
|
||||
name: '兑换清单', key: "goodsNumber", render: (data) => {
|
||||
|
@ -568,17 +570,21 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
|
|||
|
||||
public doSave() {
|
||||
//添加 处理更新
|
||||
let tmpParam = {} as any;
|
||||
if (this.updateParams.id) {
|
||||
this.updateParams.oldstatus = this.updateParams.status
|
||||
if (this.updateParams.status === 1) {
|
||||
tmpParam.type = 'agree'
|
||||
this.updateParams.status = 2
|
||||
} else {
|
||||
if (this.updateParams.approvalResult === 0) {
|
||||
this.updateParams.status = 1
|
||||
tmpParam.type = 'reject'
|
||||
} else if (this.updateParams.approvalResult === 1) {
|
||||
this.updateParams.status = 3
|
||||
tmpParam.type = 'agree'
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
this.updateParams.status = 2
|
||||
}
|
||||
|
@ -607,22 +613,28 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
|
|||
}
|
||||
})
|
||||
} else if (this.updateParams.id) {
|
||||
let tmpParam = {
|
||||
"taskId": this.updateParams.taskInfo?.taskId ?? "",
|
||||
"type": this.updateParams.approvalResult === 0 ? "reject" : 'agree',
|
||||
"bizData": [{
|
||||
tmpParam.taskId = this.updateParams.taskInfo?.taskId ?? "";
|
||||
tmpParam.bizData = [{
|
||||
"bizId": this.updateParams.id,
|
||||
"data": JSON.stringify(this.updateParams)
|
||||
}]
|
||||
}
|
||||
this.integralFlowService.taskHandle(tmpParam).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
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 = {
|
||||
pointExchangeDetails: [],
|
||||
} as any
|
||||
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) {
|
||||
if (data.value === "cancel") {
|
||||
this.subShowUpdate = false
|
||||
|
|
|
@ -473,6 +473,41 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
|||
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>
|
||||
<style lang="scss" scoped src="../../common.component.scss"></style>
|
||||
|
|
|
@ -641,6 +641,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
} as any;
|
||||
this.getTableData()
|
||||
}
|
||||
|
||||
// 分页数据
|
||||
|
|
|
@ -31,6 +31,8 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
public params = {
|
||||
areaName: "",
|
||||
unitName: "",
|
||||
areaId: '',
|
||||
unitId: '',
|
||||
name: ""
|
||||
} as any;
|
||||
|
||||
|
@ -340,12 +342,19 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
// 树点击
|
||||
public handleNodeClick(data) {
|
||||
this.params.unitName = "";
|
||||
this.params.areaName = "";
|
||||
this.params.areaId = "";
|
||||
this.params.unitName = "";
|
||||
this.params.unitId = "";
|
||||
|
||||
console.log('data', data);
|
||||
|
||||
if (data.areaId) {
|
||||
this.params.unitName = data.name
|
||||
this.params.unitName = data.name;
|
||||
this.params.unitId = data.id;
|
||||
} else {
|
||||
this.params.areaName = data.name === "全部" ? "" : data.name
|
||||
this.params.areaName = data.name === "全部" ? "" : data.name;
|
||||
this.params.areaId = data.name === "全部" ? "" : data.id;
|
||||
}
|
||||
this.getTableData()
|
||||
}
|
||||
|
@ -549,10 +558,13 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
this.params = {
|
||||
areaName: "",
|
||||
unitName: "",
|
||||
areaId: '',
|
||||
unitId: '',
|
||||
name: "",
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
} as any;
|
||||
this.getTableData()
|
||||
}
|
||||
|
||||
// 分页数据
|
||||
|
@ -570,6 +582,11 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
identifyTime: moment().format('YYYY-MM-DD'),
|
||||
identifyUserId: this.account.userId,
|
||||
} as any;
|
||||
//树点击
|
||||
if (this.params.areaId) {
|
||||
this.updateParams.areaId = this.params.areaId;
|
||||
this.loadUnitData(this.params.areaId)
|
||||
}
|
||||
this.updateActionsForm()
|
||||
} else {
|
||||
this.tableService.getListDetail({ id: row.id }).then((res) => {
|
||||
|
|
|
@ -278,8 +278,11 @@ export default class TrainRecords extends BaseRecordComponent<any> {
|
|||
width: "calc(50% - 20px)",
|
||||
controls: false,
|
||||
showError: false,
|
||||
max: 100,
|
||||
min: 0,
|
||||
// max: 100,
|
||||
// min: 0,
|
||||
rules: [
|
||||
{ pattern: /^(([1-9]?\d(\.\d{1,2})?)|100|100.00)$/, message: '在0~100之间,保留两位小数', }
|
||||
],
|
||||
hide: !(this.subUpdateParams.examStatus === 1)
|
||||
},]
|
||||
this.subUpdateActions = [{
|
||||
|
@ -389,7 +392,6 @@ export default class TrainRecords extends BaseRecordComponent<any> {
|
|||
}, 0)
|
||||
}
|
||||
}
|
||||
|
||||
public scoreFormat(data: any, item: any) {
|
||||
if (item && item.key === 'score') {
|
||||
this.updateParams.score = null;
|
||||
|
|
Loading…
Reference in New Issue