forked from xxhjsb/hbt-prevention-ui
feat:排查任务优化
parent
0969ada1c2
commit
f59a246700
|
@ -9,6 +9,12 @@ export default class DutyService extends BaseService<any>{
|
|||
const url = this.prefix.prevention+'/risk/task/list';
|
||||
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>>>{
|
||||
const url = this.prefix.prevention+'/risk/task';
|
||||
return this.deleteBatch(url,params,{},true)
|
||||
|
|
|
@ -15,13 +15,13 @@ export default class MeasuresReportService extends BaseService<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)
|
||||
}
|
||||
|
||||
// 更新
|
||||
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)
|
||||
}
|
||||
}
|
|
@ -537,6 +537,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
reformModeName: this.reformModeMap[res.data.reformMode],
|
||||
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,
|
||||
type: "随手拍",
|
||||
}, res.data)
|
||||
// 地图定位
|
||||
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.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功");
|
||||
if (isSubmit) {
|
||||
this.startWorkFlow([this.updateParams.id || res.data], [this.updateParams.reformUserId])
|
||||
this.startWorkFlow(res.data, [this.updateParams.reformUserId])
|
||||
} else {
|
||||
this.getTableData();
|
||||
}
|
||||
|
@ -656,23 +657,13 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
}
|
||||
|
||||
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({
|
||||
"F_Id": "1743872031226688",
|
||||
"relationTaskList": "[]",
|
||||
"keyValue": JSON.stringify(keyValue),
|
||||
"userJson": "[]",
|
||||
"fileValue": [],
|
||||
"nextNodeName": "确认",
|
||||
"nodeName": "上报",
|
||||
"userList": userIds
|
||||
"bpmSchemeCode": "prevention-yhzl",
|
||||
"userList": userIds,
|
||||
"bizData": [{
|
||||
"bizId": ids,
|
||||
"data": JSON.stringify(this.updateParams)
|
||||
}]
|
||||
}).then((res: any) => {
|
||||
this.getTableData()
|
||||
// 发起工作流成功
|
||||
|
|
|
@ -60,6 +60,10 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
name: "分析对象",
|
||||
key: "itemName",
|
||||
type: "text",
|
||||
}, {
|
||||
name: "隐患排查任务",
|
||||
key: "taskName",
|
||||
type: "text",
|
||||
}];
|
||||
|
||||
public showUpdate = false;
|
||||
|
@ -144,7 +148,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
]
|
||||
}, {
|
||||
name: "问题描述",
|
||||
key: "taskName",
|
||||
key: "description",
|
||||
type: "textarea",
|
||||
width: "100%",
|
||||
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.tableService.addOrUpdate(this.updateParams, this.updateParams.id).then((res) => {
|
||||
this.$message.success("编辑成功!");
|
||||
|
@ -339,7 +343,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
if (item && item.key === "result") {
|
||||
if (data === 1) {
|
||||
this.updateParams.dangerFlag = null
|
||||
this.updateParams.taskName = null
|
||||
// this.updateParams.taskName = null
|
||||
this.updateParams.taskType = null
|
||||
this.updateParams.ownerId = null
|
||||
}
|
||||
|
@ -353,6 +357,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
this.subUpdateForm()
|
||||
}
|
||||
this.subUpdateForm()
|
||||
|
||||
}
|
||||
|
||||
|
@ -443,11 +448,12 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
public showSubModal(row) {
|
||||
const mathData = Math.floor(Math.random() * 1000);
|
||||
this.updateParams = Object.assign({
|
||||
checkUserId: this.account.userId,
|
||||
// checkUserId: this.account.userId,
|
||||
checkTime: moment().format('YYYY-MM-DD HH:mm'),
|
||||
imeiCode: moment().format('DDHHmm') + mathData,
|
||||
result:1
|
||||
}, row)
|
||||
this.updateParams.checkUserId = this.account.userId,
|
||||
this.updateParams.status = 1
|
||||
this.updateParams.endTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
this.subUpdateForm()
|
||||
|
|
|
@ -239,8 +239,6 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
|||
// 查询
|
||||
if (data.value === "search") {
|
||||
this.getTableData()
|
||||
console.log('this.tableData', this.tableData);
|
||||
|
||||
// 重置
|
||||
} else if (data.value === "reset") {
|
||||
this.reset()
|
||||
|
@ -263,7 +261,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
|||
}
|
||||
// 分页数据
|
||||
public getTableData() {
|
||||
this.tableService.selectByPage2(this.params).then(res => {
|
||||
this.tableService.selectByPageRecord(this.params).then(res => {
|
||||
this.tableData = res.data as any;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -101,6 +101,10 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
name: "分析对象",
|
||||
key: "analName",
|
||||
type: "text",
|
||||
}, {
|
||||
name: "隐患排查任务",
|
||||
key: "taskName",
|
||||
type: "text",
|
||||
}];
|
||||
|
||||
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: "generateTime", width: "150px" });
|
||||
this.proTableColumn.push({ name: '排查时间', key: "checkTime", width: "150px" });
|
||||
this.proTableColumn.push({
|
||||
name: '排查人', key: "checkUserId", render: (data) => {
|
||||
name: '排查执行人', key: "checkUserId", render: (data) => {
|
||||
if (data.checkUserId) {
|
||||
return this.$store.getters.user_map[data.checkUserId]
|
||||
}
|
||||
|
@ -271,10 +275,12 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
});
|
||||
this.proTableColumn.push({
|
||||
name: '是否为隐患', key: "dangerFlag", render: (data) => {
|
||||
if (data.status == 1) {
|
||||
if (data.dangerFlag == 1) {
|
||||
return "<span class='noDraw'>是</span>"
|
||||
} else if (data.status == 0) {
|
||||
} else if (data.dangerFlag == 0) {
|
||||
return "<span>否</span>"
|
||||
}else{
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue