feat:排查任务优化

dev
kongyeqing 2023-07-27 13:51:23 +08:00
parent 0969ada1c2
commit f59a246700
6 changed files with 37 additions and 30 deletions

View File

@ -9,6 +9,12 @@ export default class DutyService extends BaseService<any>{
const url = this.prefix.prevention+'/risk/task/list'; const url = this.prefix.prevention+'/risk/task/list';
return this.get(url,params,true) return this.get(url,params,true)
} }
public selectByPageRecord(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/task/recordList';
return this.get(url,params,true)
}
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{ public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/task'; const url = this.prefix.prevention+'/risk/task';
return this.deleteBatch(url,params,{},true) return this.deleteBatch(url,params,{},true)

View File

@ -15,13 +15,13 @@ export default class MeasuresReportService extends BaseService<any>{
} }
public selectById(params):Promise<AxiosResponse<ActionResult<any>>>{ public selectById(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/task/list'; const url = this.prefix.prevention+'/risk/task/recordList';
return this.get(url,params,true) return this.get(url,params,true)
} }
// 更新 // 更新
public addOrUpdate(params: any,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{ public addOrUpdate(params: any,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/control/batch'; const url = this.prefix.prevention+'/risk/control/publish';
return this.put(url,params,{},showLoading) return this.put(url,params,{},showLoading)
} }
} }

View File

@ -537,6 +537,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
reformModeName: this.reformModeMap[res.data.reformMode], reformModeName: this.reformModeMap[res.data.reformMode],
unitName: (this.unitList.find((item: any) => item.value === res.data.unitId) as any).name, unitName: (this.unitList.find((item: any) => item.value === res.data.unitId) as any).name,
areaName: (this.areaList.find((item: any) => item.value === res.data.areaId) as any).name, areaName: (this.areaList.find((item: any) => item.value === res.data.areaId) as any).name,
type: "随手拍",
}, res.data) }, res.data)
// //
this.center = [res.data.locationLng, res.data.locationLat]; this.center = [res.data.locationLng, res.data.locationLat];
@ -647,7 +648,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then(res => { this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then(res => {
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功"); this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功");
if (isSubmit) { if (isSubmit) {
this.startWorkFlow([this.updateParams.id || res.data], [this.updateParams.reformUserId]) this.startWorkFlow(res.data, [this.updateParams.reformUserId])
} else { } else {
this.getTableData(); this.getTableData();
} }
@ -656,23 +657,13 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
} }
public startWorkFlow(ids, userIds) { public startWorkFlow(ids, userIds) {
const keyValue = ids.map(id => {
return {
F_Id: id,
F_FormId: 1742822461669376,
F_Type: 2,
F_UrlAddress: "ceshi1"
}
})
this.workFlowService.startWorkFlow({ this.workFlowService.startWorkFlow({
"F_Id": "1743872031226688", "bpmSchemeCode": "prevention-yhzl",
"relationTaskList": "[]", "userList": userIds,
"keyValue": JSON.stringify(keyValue), "bizData": [{
"userJson": "[]", "bizId": ids,
"fileValue": [], "data": JSON.stringify(this.updateParams)
"nextNodeName": "确认", }]
"nodeName": "上报",
"userList": userIds
}).then((res: any) => { }).then((res: any) => {
this.getTableData() this.getTableData()
// //

View File

@ -60,6 +60,10 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
name: "分析对象", name: "分析对象",
key: "itemName", key: "itemName",
type: "text", type: "text",
}, {
name: "隐患排查任务",
key: "taskName",
type: "text",
}]; }];
public showUpdate = false; public showUpdate = false;
@ -144,7 +148,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
] ]
}, { }, {
name: "问题描述", name: "问题描述",
key: "taskName", key: "description",
type: "textarea", type: "textarea",
width: "100%", width: "100%",
hide: this.updateParams.result === 1, hide: this.updateParams.result === 1,
@ -326,7 +330,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
}) })
this.updateParams.taskChargeUserName = this.userListName[this.updateParams.checkUserId] this.updateParams.taskChargeUserName = this.userListName[this.account.userId]
this.updateParams.ownerName = this.userListName[this.updateParams.ownerId] this.updateParams.ownerName = this.userListName[this.updateParams.ownerId]
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id).then((res) => { this.tableService.addOrUpdate(this.updateParams, this.updateParams.id).then((res) => {
this.$message.success("编辑成功!"); this.$message.success("编辑成功!");
@ -339,7 +343,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
if (item && item.key === "result") { if (item && item.key === "result") {
if (data === 1) { if (data === 1) {
this.updateParams.dangerFlag = null this.updateParams.dangerFlag = null
this.updateParams.taskName = null // this.updateParams.taskName = null
this.updateParams.taskType = null this.updateParams.taskType = null
this.updateParams.ownerId = null this.updateParams.ownerId = null
} }
@ -353,6 +357,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
} }
this.subUpdateForm() this.subUpdateForm()
} }
this.subUpdateForm()
} }
@ -443,11 +448,12 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
public showSubModal(row) { public showSubModal(row) {
const mathData = Math.floor(Math.random() * 1000); const mathData = Math.floor(Math.random() * 1000);
this.updateParams = Object.assign({ this.updateParams = Object.assign({
checkUserId: this.account.userId, // checkUserId: this.account.userId,
checkTime: moment().format('YYYY-MM-DD HH:mm'), checkTime: moment().format('YYYY-MM-DD HH:mm'),
imeiCode: moment().format('DDHHmm') + mathData, imeiCode: moment().format('DDHHmm') + mathData,
result:1 result:1
}, row) }, row)
this.updateParams.checkUserId = this.account.userId,
this.updateParams.status = 1 this.updateParams.status = 1
this.updateParams.endTime = moment().format('YYYY-MM-DD HH:mm:ss') this.updateParams.endTime = moment().format('YYYY-MM-DD HH:mm:ss')
this.subUpdateForm() this.subUpdateForm()

View File

@ -239,8 +239,6 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
// //
if (data.value === "search") { if (data.value === "search") {
this.getTableData() this.getTableData()
console.log('this.tableData', this.tableData);
// //
} else if (data.value === "reset") { } else if (data.value === "reset") {
this.reset() this.reset()
@ -263,7 +261,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
} }
// //
public getTableData() { public getTableData() {
this.tableService.selectByPage2(this.params).then(res => { this.tableService.selectByPageRecord(this.params).then(res => {
this.tableData = res.data as any; this.tableData = res.data as any;
}) })
} }

View File

@ -101,6 +101,10 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
name: "分析对象", name: "分析对象",
key: "analName", key: "analName",
type: "text", type: "text",
}, {
name: "隐患排查任务",
key: "taskName",
type: "text",
}]; }];
public showUpdate = false; public showUpdate = false;
@ -251,9 +255,9 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
// //
this.proTableColumn.push({ name: '序号', key: "index", width: "80px" }); this.proTableColumn.push({ name: '序号', key: "index", width: "80px" });
this.proTableColumn.push({ name: '排查时间', key: "generateTime", width: "150px" }); this.proTableColumn.push({ name: '排查时间', key: "checkTime", width: "150px" });
this.proTableColumn.push({ this.proTableColumn.push({
name: '排查人', key: "checkUserId", render: (data) => { name: '排查执行人', key: "checkUserId", render: (data) => {
if (data.checkUserId) { if (data.checkUserId) {
return this.$store.getters.user_map[data.checkUserId] return this.$store.getters.user_map[data.checkUserId]
} }
@ -271,10 +275,12 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
}); });
this.proTableColumn.push({ this.proTableColumn.push({
name: '是否为隐患', key: "dangerFlag", render: (data) => { name: '是否为隐患', key: "dangerFlag", render: (data) => {
if (data.status == 1) { if (data.dangerFlag == 1) {
return "<span class='noDraw'>是</span>" return "<span class='noDraw'>是</span>"
} else if (data.status == 0) { } else if (data.dangerFlag == 0) {
return "<span>否</span>" return "<span>否</span>"
}else{
return '--'
} }
} }
}); });