|
|
|
|
@ -10,7 +10,7 @@
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="问题来源"> |
|
|
|
|
<el-select |
|
|
|
|
<el-select |
|
|
|
|
clearable |
|
|
|
|
v-model="query.taskType" |
|
|
|
|
> |
|
|
|
|
@ -118,6 +118,13 @@
|
|
|
|
|
> |
|
|
|
|
{{row.problemState == '1'?'删除':'恢复'}} |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
@click="upProblemFun(row)" |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
v-if="row.distributionState === '0'"> |
|
|
|
|
编辑 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-if="row.distributionState === '0'" |
|
|
|
|
type="primary" |
|
|
|
|
@ -173,6 +180,14 @@
|
|
|
|
|
</el-tag> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-12"> |
|
|
|
|
<label>创建人</label> |
|
|
|
|
<span>{{ activeRow.createName || '/' }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-12"> |
|
|
|
|
<label>下发人</label> |
|
|
|
|
<span>{{ activeRow.issueUserName || '/' }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-24"> |
|
|
|
|
<label>问题类型</label> |
|
|
|
|
<span>{{ activeRow.problemType || '/' }}</span> |
|
|
|
|
@ -347,31 +362,101 @@
|
|
|
|
|
</footer> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog @close="upClose" title="编辑问题" v-model="upShow" width="50vw" top="2vh"> |
|
|
|
|
<el-form :label-width="120" ref="upFormRefs" :model="upFormData" v-loading="upLoading"> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="发现时间"> |
|
|
|
|
<el-date-picker |
|
|
|
|
value-format="YYYY-MM-DD HH:mm" |
|
|
|
|
time-format="HH:mm" |
|
|
|
|
style="width: 100%" |
|
|
|
|
v-model="upFormData.createTime" |
|
|
|
|
type="datetime" |
|
|
|
|
placeholder="请输入发现时间" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="问题来源"> |
|
|
|
|
<el-select |
|
|
|
|
clearable |
|
|
|
|
v-model="upFormData.taskType" |
|
|
|
|
style="width:100%" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in dict.taskType" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.dictLabel" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="涉及单位"> |
|
|
|
|
<depart-tree-select v-model="upFormData.departId" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="涉及人员"> |
|
|
|
|
<el-select |
|
|
|
|
:remote-method="inputPeopleFun" |
|
|
|
|
:loading="peoplesloading" |
|
|
|
|
filterable |
|
|
|
|
multiple |
|
|
|
|
v-model="upFormData.peopleIds"> |
|
|
|
|
<el-option v-for="(item,index) in polices" :key="index" :value="item.idCode" :label="item.name"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="问题类型"> |
|
|
|
|
<problem-type-select v-model="upFormData.problemTypeCode"></problem-type-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"></el-col> |
|
|
|
|
<el-col :span="12" > |
|
|
|
|
<el-form-item label="问题描述"> |
|
|
|
|
<el-input type="textarea" v-model="upFormData.thingDesc"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<file-upload |
|
|
|
|
style="width: 100%" |
|
|
|
|
:uploadDrag="true" |
|
|
|
|
:files="upFormData.files"></file-upload> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<footer class="flex end mt-20"> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
size="large" |
|
|
|
|
@click="handleUpData" |
|
|
|
|
v-loading="upLoading" |
|
|
|
|
>确认</el-button |
|
|
|
|
> |
|
|
|
|
</footer> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<script setup> |
|
|
|
|
import { getDictLable } from "@/utils/util"; |
|
|
|
|
import { listTaskProblem, getTaskProblem,delTaskProblem,upProblemState } from '@/api/mobileSupervision/taskProblem' |
|
|
|
|
import { listTaskProblem, getTaskProblem,delTaskProblem,upProblemState,upTaskProblem } from '@/api/mobileSupervision/taskProblem' |
|
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
|
import {TestingAlcoholIssueMatterFun} from "@/api/mobileSupervision/testingAlcohol"; |
|
|
|
|
import feedback from "@/utils/feedback"; |
|
|
|
|
|
|
|
|
|
import {listPoliceData} from "@/api/system/police"; |
|
|
|
|
const catchStore = useCatchStore(); |
|
|
|
|
const dict = catchStore.getDicts(["taskType","policeType","approvalFlow","suspectProblem","businessType","distributionFlow", "distributionState"]); |
|
|
|
|
const loading = ref(false); |
|
|
|
|
const taskTypes = [ |
|
|
|
|
{ |
|
|
|
|
dictLabel: '测酒任务', |
|
|
|
|
dictValue: '' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
dictLabel: '督察任务', |
|
|
|
|
dictValue: '' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
dictLabel: '所队自查', |
|
|
|
|
dictValue: '' |
|
|
|
|
} |
|
|
|
|
]; |
|
|
|
|
const upLoading = ref(false); |
|
|
|
|
const peoplesloading = ref(false); |
|
|
|
|
const upShow = ref(false); |
|
|
|
|
const upFormData = ref({}) |
|
|
|
|
|
|
|
|
|
//任务分发 |
|
|
|
|
const distributeShow = ref(false) |
|
|
|
|
const issueForm = ref({}) |
|
|
|
|
@ -402,9 +487,50 @@
|
|
|
|
|
distributeShow.value=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const upQuery = ref({ |
|
|
|
|
departBranch:true |
|
|
|
|
}) |
|
|
|
|
const polices = ref() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getPeoplesFun =async ()=>{ |
|
|
|
|
peoplesloading.value=true; |
|
|
|
|
if(upQuery.value.idCodes){ |
|
|
|
|
delete upQuery.value.idCodes |
|
|
|
|
} |
|
|
|
|
const res = await listPoliceData(upQuery.value) |
|
|
|
|
polices.value = res.records.map(s=> { |
|
|
|
|
return{ |
|
|
|
|
"name":s.name, |
|
|
|
|
"idCode":s.idCode, |
|
|
|
|
"empNo":s.empNo |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
delete upQuery.value.idCodes |
|
|
|
|
console.log('polices',upFormData.value.peoples) |
|
|
|
|
peoplesloading.value=false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取用户表 |
|
|
|
|
function inputPeopleFun(val){ |
|
|
|
|
upQuery.value.name = val; |
|
|
|
|
getPeoplesFun(); |
|
|
|
|
} |
|
|
|
|
inputPeopleFun(); |
|
|
|
|
const handleUpData = async()=>{ |
|
|
|
|
upLoading.value=true |
|
|
|
|
console.log('upFormData',upFormData.value) |
|
|
|
|
const res = await upTaskProblem(upFormData.value) |
|
|
|
|
upShow.value=false; |
|
|
|
|
getList() |
|
|
|
|
upLoading.value=false |
|
|
|
|
} |
|
|
|
|
const addClose =()=>{ |
|
|
|
|
issueForm.value={ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
const upClose = ()=>{ |
|
|
|
|
upFormData.value={ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//下发问题 |
|
|
|
|
@ -468,6 +594,38 @@
|
|
|
|
|
show.value = true |
|
|
|
|
activeRow.value = await getTaskProblem(row.id) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const upProblemFun = async (row)=>{ |
|
|
|
|
upFormData.value=await getTaskProblem(row.id) |
|
|
|
|
upFormData.value.files = JSON.parse(upFormData.value.files ) |
|
|
|
|
if(upFormData.value.peoples ){ |
|
|
|
|
console.log('peoples',upFormData.value.peoples) |
|
|
|
|
let lists = JSON.parse(upFormData.value.peoples ); |
|
|
|
|
upFormData.value.peoples=lists; |
|
|
|
|
upFormData.value.peopleIds = lists.map((s)=>{ |
|
|
|
|
return s.idCode |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
let idCodes = [] |
|
|
|
|
upFormData.value.peoples.forEach(s=>{ |
|
|
|
|
if(s.idCode){ |
|
|
|
|
idCodes.push(s.idCode) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
upQuery.value.idCodes = idCodes; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
upShow.value=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(()=>upFormData.value.departId,(val)=>{ |
|
|
|
|
upQuery.value.departId = val; |
|
|
|
|
|
|
|
|
|
getPeoplesFun() |
|
|
|
|
|
|
|
|
|
},{deep:true,immediate:true}) |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
|
|