Browse Source

fit:1、7月28号督察任务编辑和下发改造v1 2、7月29号 督察问题下发和督察问题状态变更;督察问题删除

main
pengwei 6 months ago
parent
commit
46bdc4c1b9
  1. 14
      src/api/mobileSupervision/taskProblem.ts
  2. 26
      src/components/police-picker.vue
  3. 140
      src/views/mobileSupervise/Inspection.vue
  4. 271
      src/views/mobileSupervise/TaskProblem.vue

14
src/api/mobileSupervision/taskProblem.ts

@ -13,3 +13,17 @@ export function getTaskProblem(id) {
url: '/task/problem/' + id
});
}
export function delTaskProblem(id){
return request.del({
url:`/task/problem/${id}`
})
}
export function upProblemState(id){
return request.put({
url:`/task/problem/${id}`
})
}

26
src/components/police-picker.vue

@ -178,6 +178,8 @@ watch(() => props.departId, (val) => {
query.value.departId = val;
getList()
})
const total = ref(0);
const ableRef = ref(null)
const treeData = catchSotre.getDepartsAll();
@ -209,6 +211,12 @@ const setCheckFun = (row) => {
const checkPolices = ref([]);
watch(()=>props.modelValue,(val)=>{
console.log('val',val)
checkPolices.value =val;
getList();
},{immediate:true,deep:true})
const changeCheck = (row)=>{
let checkIndex =checkPolices.value.map(s=>s.empNo);
if(row.isCheck){
@ -231,13 +239,17 @@ function handleSelectDepart(node) {
}
function handleRemove(index) {
polices.value.forEach(s=>{
if(s.empNo == checkPolices.value[index].empNo){
s.isCheck =false
}
})
checkPolices.value.splice(index, 1)
if(polices.value.length >0){
console.log('s',polices.value)
console.log('checkPolices.value[index]',checkPolices.value)
polices.value.forEach(s=>{
if(s.empNo == checkPolices.value[index].empNo){
s.isCheck =false
}
})
}
checkPolices.value.splice(index, 1)
emit('update:modelValue', checkPolices.value)
}
@ -250,6 +262,8 @@ function submit() {
show.value = false
}
onMounted(() => {
getList();
});

140
src/views/mobileSupervise/Inspection.vue

@ -118,6 +118,9 @@
type="primary" link @click="showSupervise(row)"
>督察情况
</el-button>
<el-button type="primary" link @click="editTable(row)">
编辑
</el-button>
<el-button
type="danger"
link
@ -143,8 +146,8 @@
</div>
</div>
<!--任务发布-->
<el-dialog title="发布任务" v-model="show" width="80vw" top="5vh"
style="margin-bottom: 0"
<el-dialog title="发布任务" @close="addColse" v-model="show" width="80vw" top="5vh"
style="margin-bottom: 0" v-loading="editLoading"
>
<el-scrollbar max-height="76vh">
<el-form
@ -1148,7 +1151,7 @@
width="140"
show-overflow-tooltip
/>
<el-table-column label="具体情况" prop="detail"/>
<el-table-column label="具体情况" prop="thingDesc"/>
<el-table-column
label="创建时间"
prop="createTime"
@ -1166,7 +1169,7 @@
type="primary"
link
v-if="row.hasProblem && row.distributionState == '0'"
@click="issueMatterFun(row,'rcdc')"
@click="issueMatterFun(row,'inspection')"
>
下发
</el-button>
@ -1198,7 +1201,7 @@
<el-col :span="6">
<el-form-item label="具体情况">
<el-input
v-model="problemQuery.detail"
v-model="selfPeopleQuery.detail"
clearable
placeholder="请输入具体情况"
/>
@ -1243,7 +1246,8 @@
width="140"
show-overflow-tooltip
/>
<el-table-column label="具体情况" prop="detail"/>
<el-table-column label="具体情况" prop="thingDesc"/>
<el-table-column label="下发状态" >
<template #default="{row}">
<el-tag type="info" v-if=" row.hasProblem && row.distributionState == '0' ">未下发</el-tag>
@ -1269,7 +1273,7 @@
type="primary"
link
v-if="row.hasProblem && row.distributionState == '0'"
@click="issueMatterFun(row,'sdzc')"
@click="issueMatterFun(row,'selfexamination')"
>
下发
</el-button>
@ -1408,7 +1412,7 @@
@click="handleShowPeople(row)"
>详情
</el-button>
<el-button v-if="row.drinkResult === '饮酒' " type="primary" link @click="issueMatterFun(row,'lxgddc')">下发</el-button>
<el-button v-if="row.drinkResult === '饮酒' && (!row.distributionState || row.distributionState == '0')" type="primary" link @click="issueMatterFun(row,'testing_alcohol')">下发</el-button>
</template>
</el-table-column>
</el-table>
@ -1505,7 +1509,12 @@
</div>
<div class="col col-12">
<label>涉及人员</label>
<span>{{ activeRowData.peoples }}</span>
<span v-if="activeRowData.peoples">
<el-tag v-for="(item,index) in JSON.parse(activeRowData.peoples)" :key="index">
{{item.name}}
</el-tag>
</span>
</div>
<div class="col col-24">
<label>问题类型</label>
@ -1644,7 +1653,7 @@
<el-table-column label="督察情况" prop="supDesc"></el-table-column>
<el-table-column label="操作">
<template #default="{row}">
<el-button v-if="['失控','无法确认'].includes(row.supStatus)" @click="issueMatterFun(row,'zdrydc')" type="primary" link>下发</el-button>
<el-button v-if="row.supStatus != '在控'" @click="issueMatterFun(row,'risk_personal')" type="primary" link>下发</el-button>
</template>
</el-table-column>
</el-table>
@ -1820,34 +1829,6 @@
</footer>
</el-dialog>
<el-dialog title="配置涉及单位" v-model="editDepartShow" width="500">
<el-form
:label-width="120"
:model="editDepartForm"
ref="editDepartFormRef"
>
<el-form-item
label="涉及单位"
:rules="{
required: true,
message: '请选择涉及单位',
}"
>
<depart-tree-select
v-model="editDepartForm.departId"
@node-click="
(node) => (editDepartForm.name = node.shortName)
"
/>
</el-form-item>
</el-form>
<footer class="flex end mt-40">
<el-button @click="editDepartShow = false">取消</el-button>
<el-button type="primary" @click="handleUpdatDepartModelClue"
>确认</el-button
>
</footer>
</el-dialog>
</template>
@ -1886,7 +1867,8 @@ import {disabledDate} from "@/utils/util";
let cardContent = ref()
const catchStore = useCatchStore();
const dict = catchStore.getDicts(["supervisionType","policeType","suspectProblem", "approvalFlow","distributionFlow","personnelTypeArray", "inspectorType", "personType","businessType", "controlLevel", "controlType"]);
const dict = catchStore.getDicts(["supervisionType","policeType","suspectProblem", "approvalFlow","distributionFlow","personnelTypeArray", "inspectorType", "personType","businessType", "controlLevel","distributionState", "controlType"]);
const fileListData = ref([]);
const list = ref([]);
@ -2005,6 +1987,10 @@ async function submit() {
feedback.msgSuccess("发布成功");
show.value = false;
getList();
}
//
const addColse =()=>{
form.value = {
files: [],
supervisionType: '日常督察',
@ -2051,6 +2037,51 @@ const activeRow = ref({
supRiskDtoList: []
});
const editLoading = ref(false)
const editTable =async (row)=>{
console.log('row',row.taskType)
show.value = true;
editLoading.value = true;
try {
const res = await getTaskManagementDetail(row.id);
console.log('res',res)
form.value = res;
if(res.files){
form.value.files = JSON.parse(res.files)
}
if (res.samplingTarget == '自定义人员' && res.samplingIds) {
getSamplingList()
delete samplingQuery.value.ids
}
if (res.selfOrgs) {
getDepartByIdsFun(res.selfOrgs)
} else {
slofOrgList.value = []
}
showRiskDataTable.value=true
editLoading.value = false;
} catch (e) {
editLoading.value = false;
}
}
const tableRef =ref()
function setCheck() {
if( form.value.samplingIds && form.value.samplingIds.length > 0){
let idList = form.value.samplingIds;
samplingList.value.forEach(item => {
if (form.value.samplingIds && idList.indexOf(item.id) >= 0) {
nextTick(() => {
tableRef.value.toggleRowSelection(item, true);
})
}
})
}
}
/**
* 显示督察任务详情
* */
@ -2063,7 +2094,7 @@ async function handleShowDetail(row) {
if(res.files){
activeRow.value.files = JSON.parse(res.files)
}
if (res.samplingTarget == '自定义人员') {
if (res.samplingTarget == '自定义人员' && res.samplingIds) {
samplingQuery.value.ids = res.samplingIds;
getSamplingList()
delete samplingQuery.value.ids
@ -2209,7 +2240,7 @@ const handSupRiskCard = async (row)=>{
* 重点督察人员前端列表
* */
const getRiskDataTableSubmit = () => {
filterDataTable.value = form.value.supRiskDtoList.length > 0 ? form.value.supRiskDtoList : activeRow.value.supRiskDtoList
filterDataTable.value = (form.value.supRiskDtoList && form.value.supRiskDtoList.length > 0) ? form.value.supRiskDtoList : activeRow.value.supRiskDtoList
//
if (riskDataQuery.value.controlLevel) {
filterDataTable.value = filterDataTable.value.filter(s => s.controlLevel.includes(riskDataQuery.value.controlLevel));
@ -2377,6 +2408,7 @@ function getSamplingList() {
samplingloading.value = true
selectListData(samplingQuery.value).then((res) => {
samplingList.value = res.records;
setCheck();
samplingTotal.value = res.total;
samplingloading.value = false
})
@ -2468,25 +2500,23 @@ const departs = catchStore.getDepartsAll();
//
const distributeShow = ref(false)
const editDepartShow =ref(false)
const issueForm = ref({})
const issueLoading = ref(false)
const formRefs =ref();
//
const issueMatterFun =(row,key)=>{
console.log('row',row)
switch (key){
case "sdzc":
case "selfexamination":
issueForm.value.problemVo = row
break;
case "rcdc":
case "inspection":
issueForm.value.problemVo = row
break;
case "lxgddc":
case "testing_alcohol":
issueForm.value.taskId = row.taskId;
issueForm.value.empNo =row.empNo;
break;
case "zdrydc":
case "risk_personal":
issueForm.value.supRecordId =row.id
break;
}
@ -2509,16 +2539,16 @@ const handleSubmitTask =async ()=>{
feedback.msgSuccess("下发成功");
distributeShow.value = false;
switch (issueForm.value.tableKey){
case "sdzc":
case "selfexamination":
getSelfexaminationProblemFun();
break;
case "rcdc":
case "inspection":
getProblems();
break;
case "lxgddc":
case "testing_alcohol":
getTestingAlcoholPeople();
break;
case "zdrydc":
case "risk_personal":
getTaskSupDataFun();
break;
}
@ -2567,9 +2597,13 @@ const getRiskDataTableList = (val) => {
* 获取重点督察人员表单
* */
watch(() => form.value.supRiskDtoList, (newVal) => {
if (form.value.supRiskDtoList.length > 0) {
if (form.value.supRiskDtoList && form.value.supRiskDtoList.length > 0) {
getRiskDataTableSubmit();
}
if(!activeRow.value.supRiskDtoList || activeRow.value.supRiskDtoList.length == 0){
riskDataTotal.value = 0;
riskDataTable.value =[];
}
}, {immediate: true, deep: true})
/**
@ -2589,7 +2623,7 @@ watch(departs, () => {
watch(() => form.value.specialType, (newVal) => {
if (newVal === '六项规定督察') {
form.value.samplingTarget = '1'
form.value.samplingTarget = '自定义人员'
}
}, {immediate: true})

271
src/views/mobileSupervise/TaskProblem.vue

@ -58,8 +58,17 @@
</div>
</div>
</header>
<el-tabs
class="demo-tabs"
@tab-click="handleTabClick"
>
<el-tab-pane label="全部" name="0"></el-tab-pane>
<el-tab-pane label="待下发" name="1"></el-tab-pane>
<el-tab-pane label="待确认" name="2"></el-tab-pane>
</el-tabs>
<div class="table-container">
<el-table :data="list">
<el-table :data="list" v-loading="loading">
<el-table-column label="发现时间" prop="createTime" />
<el-table-column label="问题来源" >
<template #default="{ row }">
@ -103,17 +112,26 @@
>问题详情</el-button
>
<el-button
type="primary"
link
@click="upProblemStateFun(row)"
>
{{row.problemState == '1'?'移至待确认':'移至问题项'}}
</el-button>
<el-button
v-if="row.distributionState === '0'"
type="primary"
link
@click="handleProblemsShow(row)"
@click="issueMatterFun(row)"
>问题下发</el-button
>
<!-- <el-button
type="primary"
<el-button
type="danger"
link
@click="handleProblemsShow(row)"
>处置情况</el-button
> -->
@click="delProblemsFun(row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
@ -149,7 +167,11 @@
</div>
<div class="col col-12">
<label>涉及人员</label>
<span>{{ activeRow.peoples }}</span>
<span v-if="activeRow.peoples">
<el-tag v-for="(item,index) in JSON.parse(activeRow.peoples)" :key="index">
{{item.name}}
</el-tag>
</span>
</div>
<div class="col col-24">
<label>问题类型</label>
@ -169,15 +191,173 @@
</div>
</div>
</el-dialog>
<el-dialog title="任务分发" v-model="distributeShow" width="50vw" top="2vh" style="margin-bottom: 0">
<el-form :label-width="120" ref="formRefs" :model="issueForm" v-loading="issueLoading">
<el-form-item
label="任务名称"
prop="taskName"
:rules="{
required: true,
message: '请输入任务名称',
}"
>
<el-input
v-model="issueForm.taskName"
style="width: 280px"
placeholder="请输入"
/>
</el-form-item>
<el-form-item label="指定办理单位" prop="handleDepartId">
<div class="flex gap">
<div style="width: 280px">
<depart-tree-select v-model="issueForm.handleDepartId" />
</div>
<div class="tips mt-10">
<p>指定具体办理单位 指将问题分派给哪个单位办理</p>
</div>
</div>
</el-form-item>
<el-form-item
label="业务类别"
prop="businessTypeCode"
:rules="{
required: true,
message: '请选择业务类别',
trigger: ['blur'],
}"
>
<el-select v-model="issueForm.businessTypeCode" style="width: 280px">
<el-option
v-for="item in dict.businessType"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label="涉嫌问题"
prop="involveProblem"
:rules="{
required: true,
message: '请选择涉嫌问题',
trigger: ['blur'],
}"
>
<el-select
v-model="issueForm.involveProblem"
multiple
clearable
style="width: 280px"
>
<el-option
v-for="item in dict.suspectProblem"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="涉及警种" prop="policeType">
<el-select
v-model="issueForm.policeType"
clearable
style="width: 280px"
>
<el-option
v-for="item in dict.policeType"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label="办理时限"
prop="timeLimit"
:rules="{
required: true,
message: '请选择办理时限',
}"
>
<time-limit-select
v-model="issueForm.timeLimit"
v-model:maxSignDuration="issueForm.maxSignDuration"
v-model:maxHandleDuration="issueForm.maxHandleDuration"
v-model:maxExtensionDuration="issueForm.maxExtensionDuration"
/>
</el-form-item>
<el-form-item
label="下发流程"
prop="distributionFlow"
:rules="{
required: true,
message: '请选择下发流程',
}"
>
<el-radio-group v-model="issueForm.distributionFlow" class="block">
<el-radio
v-for="item in dict.distributionFlow"
:key="item.dictCode"
:value="item.dictValue"
>{{ item.dictLabel }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="审核流程"
prop="approvalFlow"
:rules="{
required: true,
message: '请选择审核流程',
}"
>
<el-radio-group v-model="issueForm.approvalFlow">
<el-radio
v-for="item in dict.approvalFlow"
:key="item.dictCode"
:value="item.dictValue"
>{{ item.dictLabel
}}{{ item.remark ? `(${item.remark})` : "" }}</el-radio
>
</el-radio-group>
<div class="tips mt-10">
<p>
三级审核 在问题提交办结时需经过所队>二级机构>市局三级审核通过后方可办结
</p>
<p>
二级审核 在问题提交办结时仅需经过所队>二级机构两级审核通过后即可办结
</p>
</div>
</el-form-item>
<el-form-item label="附件说明" prop="thingFiles">
<file-upload v-model:files="issueForm.thingFiles" />
</el-form-item>
</el-form>
<footer class="flex end mt-20">
<el-button
type="primary"
size="large"
@click="handleSubmitTask"
v-loading="issueLoading"
>确认下发</el-button
>
</footer>
</el-dialog>
</template>
<script setup>
import { getDictLable } from "@/utils/util";
import { listTaskProblem, getTaskProblem } from '@/api/mobileSupervision/taskProblem'
import { listTaskProblem, getTaskProblem,delTaskProblem,upProblemState } from '@/api/mobileSupervision/taskProblem'
import useCatchStore from "@/stores/modules/catch";
import {TestingAlcoholIssueMatterFun} from "@/api/mobileSupervision/testingAlcohol";
import feedback from "@/utils/feedback";
const catchStore = useCatchStore();
const dict = catchStore.getDicts(["taskType", "distributionState"]);
const dict = catchStore.getDicts(["taskType","policeType","approvalFlow","suspectProblem","businessType","distributionFlow", "distributionState"]);
const loading = ref(false);
const taskTypes = [
{
dictLabel: '测酒任务',
@ -192,16 +372,83 @@
dictValue: ''
}
];
//
const distributeShow = ref(false)
const issueForm = ref({})
const issueLoading = ref(false)
const formRefs =ref();
//
const issueMatterFun =(row)=>{
switch (row.taskType){
case "selfexamination":
issueForm.value.problemVo = row
break;
case "inspection":
issueForm.value.problemVo = row
break;
case "testing_alcohol":
issueForm.value.taskId = row.taskId;
issueForm.value.empNo =row.empNo;
break;
case "risk_personal":
issueForm.value.supRecordId =row.id
break;
default:
issueForm.value.problemVo = row;
break
}
issueForm.value.tableKey=row.taskType;
distributeShow.value=true;
}
//
const handleSubmitTask =async ()=>{
await formRefs.value.validate();
issueLoading.value = true
try {
await TestingAlcoholIssueMatterFun(issueForm.value)
} catch(e) {
issueLoading.value = false
return
}
issueLoading.value = false
feedback.msgSuccess("下发成功");
distributeShow.value = false;
getList()
}
const query = ref({})
const handleTabClick= (tab)=>{
query.value.actionType=tab.props.name
console.log('tab',tab.props.name)
getList();
}
const delProblemsFun =async (row)=>{
await feedback.confirm("确定要删除该数据?");
delTaskProblem(row.id).then(res=>{
getList()
})
feedback.msgSuccess("删除成功");
}
async function upProblemStateFun(row){
await feedback.confirm(`确定要变更为${row.problemState == '1'?'待确认':'问题项'}状态?`);
upProblemState(row.id).then(res=>{
getList()
})
feedback.msgSuccess("变更成功");
}
const query = ref({
actionType:"0"
})
const list = ref([])
const total = ref(0)
function getList() {
loading.value=true
listTaskProblem(query.value).then(data => {
list.value = data.records
total.value = data.total
loading.value=false;
})
}

Loading…
Cancel
Save