|
@@ -32,7 +32,10 @@
|
|
|
<uni-forms-item label="整改截止时间" name="dangerDeadLine" required>
|
|
|
<uni-datetime-picker type="datetime" return-type="string" v-model="formData.dangerDeadLine"/>
|
|
|
</uni-forms-item>
|
|
|
- <uni-forms-item label="处理人员" name="accountId" required>
|
|
|
+ <uni-forms-item label="评审部门" name="handleGroup" required>
|
|
|
+ <uni-data-select v-model="formData.handleGroup" :localdata="groupList" @change="changeHandGroup"></uni-data-select>
|
|
|
+ </uni-forms-item>
|
|
|
+ <uni-forms-item label="评审人员" name="accountId" required>
|
|
|
<uni-data-select v-model="formData.accountId" :localdata="userList"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="描述" name="dangerDesc">
|
|
@@ -54,7 +57,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {getUserList} from '@/api/system/user.js'
|
|
|
+ import {getUserList,selectUserByGroupId} from '@/api/system/user.js'
|
|
|
import {getGroupView,getGroupByList} from '@/api/system/groupApi.js'
|
|
|
import {getDangerCatByList} from '@/api/danger.js'
|
|
|
import {getRiskPointByList} from '@/api/riskPiont.js'
|
|
@@ -63,6 +66,7 @@
|
|
|
import {upload} from '@/api/system/upload.js'
|
|
|
import {getchecklistRecord} from '@/api/aqpt/checklistPoint.js'
|
|
|
import { getChecklistHazardRecordView } from '@/api/aqpt/checklistRecordHazardApi'
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -73,8 +77,10 @@
|
|
|
{ value: 3, text: "政府执法" },
|
|
|
],
|
|
|
dangerLevelRange:[
|
|
|
- { value: 1, text: "一般隐患" },
|
|
|
- { value: 2, text: "重大隐患" }
|
|
|
+ { value: 1, text: "重大隐患" },
|
|
|
+ { value: 2, text: "较大隐患" },
|
|
|
+ { value: 3, text: "严重隐患" },
|
|
|
+ { value: 4, text: "一般隐患" }
|
|
|
],
|
|
|
groupList:[],
|
|
|
riskPointRange:[],
|
|
@@ -91,7 +97,8 @@
|
|
|
dangerCatId: undefined,
|
|
|
dangerCatTitle: '',
|
|
|
riskPointId: undefined,
|
|
|
- dangerLocation: '',
|
|
|
+ dangerLocation: '',
|
|
|
+ accountId:"",
|
|
|
attachList:[]
|
|
|
},
|
|
|
rules: {
|
|
@@ -100,6 +107,16 @@
|
|
|
{required: true,errorMessage: '请填写姓名',},
|
|
|
]
|
|
|
},
|
|
|
+ handleGroup: {
|
|
|
+ rules:[
|
|
|
+ {required: true,errorMessage: '请选择评审部门',},
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ accountId: {
|
|
|
+ rules:[
|
|
|
+ {required: true,errorMessage: '请选择评审人员',},
|
|
|
+ ]
|
|
|
+ },
|
|
|
// dangerCode: {rules:[{required: true,errorMessage: '请填写隐患编码'}]},
|
|
|
dangerDeadLine: {rules:[{required: true,errorMessage: '请填写整改截止时间'}]}
|
|
|
},
|
|
@@ -138,6 +155,33 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ changeHandGroup(id){
|
|
|
+ this.userList=[]
|
|
|
+ this.formData.accountId="";
|
|
|
+ if(!id){
|
|
|
+ this.getUserList();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ selectUserByGroupId(id).then((res)=>{
|
|
|
+ var userList=[]
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ userList.push({
|
|
|
+ value: -i,
|
|
|
+ text: res.data[i].name,
|
|
|
+ disable:true
|
|
|
+ })
|
|
|
+ for(let j = 0; j < res.data[i].children.length; j++){
|
|
|
+ userList.push({
|
|
|
+ ...res.data[i].children[j],
|
|
|
+ value: res.data[i].children[j].accountId,
|
|
|
+ text: res.data[i].children[j].accountName
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log({userList})
|
|
|
+ this.userList=userList
|
|
|
+ })
|
|
|
+ },
|
|
|
getRiskPoint(){
|
|
|
let app=uni.getStorageSync('qrcode');
|
|
|
this.formData.dangerLocation=app.riskPointTitle
|
|
@@ -183,7 +227,7 @@
|
|
|
}
|
|
|
}
|
|
|
let noPassPoints=points.filter(item=>item.checkResult===-1)
|
|
|
- let dangerDesc=noPassPoints.reduce((acc, cur) => `${cur.pointContent}【未通过】;\n` + acc, "")
|
|
|
+ let dangerDesc=noPassPoints.reduce((acc, cur) => `${cur?.pointContent}【未通过】;\n` + acc, "")
|
|
|
this.formData.dangerDesc=dangerDesc
|
|
|
this.formData.dangerTitle=res.data.targetTitle
|
|
|
})
|
|
@@ -231,12 +275,13 @@
|
|
|
this.$refs.form.validate().then(res=>{
|
|
|
let flow=this.userList.filter(item=>this.formData.accountId===item.accountId)[0]
|
|
|
let group=this.groupList.filter(item=>this.formData.groupId===item.groupId)[0]
|
|
|
- res.curGroupId = res.groupId
|
|
|
- res.curGroupName = group.groupName
|
|
|
+ res.curGroupId = flow.groupId
|
|
|
+ res.curGroupName = flow.groupName
|
|
|
res.curPositionId = flow.positionId
|
|
|
res.curPositionName = flow.positionName
|
|
|
res.curAccountId = flow.accountId
|
|
|
res.curAccountName = flow.accountName
|
|
|
+ res.groupId=this.formData.groupId
|
|
|
res.formCode= 'submit'
|
|
|
res.dangerId=this.flowData.wfInsId
|
|
|
res.dangerLocation=this.formData.dangerLocation
|
|
@@ -252,11 +297,13 @@
|
|
|
"activityCode":this.flowData.activityCode,
|
|
|
"actionInsId":this.flowData.actionInsId,
|
|
|
"actionDefId":this.flowData.actionDefList[0].actionDefId,
|
|
|
- "actionCode":this.flowData.actionDefList[0].actionCode,
|
|
|
- "groupIdTo": res.groupId||flow.groupId,
|
|
|
+ "actionCode":this.flowData.actionDefList[0].actionCode,
|
|
|
+ "groupId":this.formData.groupId,
|
|
|
+ "groupName":group.groupName,
|
|
|
+ "groupIdTo": flow.groupId,
|
|
|
"accountIdTo": flow.accountId,
|
|
|
"accountNameTo": flow.accountName,
|
|
|
- "groupNameTo": group.groupName||flow.groupName,
|
|
|
+ "groupNameTo": flow.groupName,
|
|
|
"positionIdTo": flow.positionId,
|
|
|
"positionNameTo": flow.positionName,
|
|
|
"actionRemark":this.formData.dangerDesc
|
|
@@ -282,8 +329,8 @@
|
|
|
targetGroupId:qrcode.groupId,
|
|
|
targetGroupName:qrcode.groupName,
|
|
|
}
|
|
|
- let data=await handleWorkflow({...workflowForm,attachList})
|
|
|
- let resq=await handleDanger({...res,...qrcode_target,attachList,status:1,riskPointId:qrcode.targetId})
|
|
|
+ let flow=await handleWorkflow({...workflowForm,attachList})
|
|
|
+ let resq=await handleDanger({... this.formData,...qrcode_target,attachList,status:1,riskPointId:qrcode.targetId})
|
|
|
uni.showToast({
|
|
|
icon:'none',
|
|
|
title:"提交成功!",
|