|
|
|
|
@ -10,10 +10,7 @@
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="问题来源"> |
|
|
|
|
<el-select |
|
|
|
|
clearable |
|
|
|
|
v-model="query.taskType" |
|
|
|
|
> |
|
|
|
|
<el-select clearable v-model="query.taskType"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in dict.taskType" |
|
|
|
|
:key="item.id" |
|
|
|
|
@ -30,10 +27,7 @@
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="分发状态"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="query.distributionState" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-select v-model="query.distributionState" clearable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in dict.distributionState" |
|
|
|
|
:label="item.dictLabel" |
|
|
|
|
@ -45,8 +39,10 @@
|
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<div class="flex between"> |
|
|
|
|
<el-button type="primary" @click=""> |
|
|
|
|
生成督察通报</el-button> |
|
|
|
|
<el-button type="primary" @click="handleShowGenReport"> |
|
|
|
|
生成督察通报 |
|
|
|
|
<span v-if="selectRows.length">({{ selectRows.length }})</span></el-button |
|
|
|
|
> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" @click="getList"> |
|
|
|
|
<template #icon> |
|
|
|
|
@ -59,67 +55,52 @@
|
|
|
|
|
</div> |
|
|
|
|
</header> |
|
|
|
|
|
|
|
|
|
<el-tabs |
|
|
|
|
class="demo-tabs" |
|
|
|
|
@tab-click="handleTabClick" |
|
|
|
|
> |
|
|
|
|
<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" v-loading="loading"> |
|
|
|
|
<el-table-column label="发现时间" prop="createTime" width="120" /> |
|
|
|
|
<el-table-column label="问题录入时间" prop="supTime" width="120"></el-table-column> |
|
|
|
|
<el-table-column label="问题来源" width="100"> |
|
|
|
|
<el-table :data="list" v-loading="loading" @selection-change="handleTableSelect"> |
|
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
|
<el-table-column label="发现时间" prop="createTime" width="150" /> |
|
|
|
|
<el-table-column label="录入时间" prop="supTime" width="150" /> |
|
|
|
|
<el-table-column label="是否存在问题" width="80" align="center"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<span>{{ row.hasProblem ? "是" : "否" }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="问题来源" width="120"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<span>{{ getDictLable(dict.taskType, row.taskType) }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column |
|
|
|
|
label="涉及单位" |
|
|
|
|
prop="departName" |
|
|
|
|
width="120" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
label="涉及人员" |
|
|
|
|
prop="peoples" |
|
|
|
|
width="80" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="问题类型" |
|
|
|
|
prop="problemType" |
|
|
|
|
width="100" |
|
|
|
|
align="center" |
|
|
|
|
width="90" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="问题描述" |
|
|
|
|
prop="thingDesc" |
|
|
|
|
show-overflow-tooltip |
|
|
|
|
|
|
|
|
|
/> |
|
|
|
|
<el-table-column label="分发状态" width="100"> |
|
|
|
|
<el-table-column label="涉及单位" prop="departName" show-overflow-tooltip /> |
|
|
|
|
<el-table-column label="问题类型" prop="problemType" show-overflow-tooltip /> |
|
|
|
|
<el-table-column label="问题描述" prop="thingDesc" show-overflow-tooltip /> |
|
|
|
|
<el-table-column label="分发状态" width="90"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<span v-if="row.distributionState === '0'">未分发</span> |
|
|
|
|
<span v-if="row.distributionState === '1'">已分发</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" width="240"> |
|
|
|
|
<el-table-column label="操作" width="260"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
@click="showDeatil(row)" |
|
|
|
|
>问题详情</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" link @click="showDeatil(row)">问题详情</el-button> |
|
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
@click="upProblemFun(row)" |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
v-if="row.distributionState === '0'"> |
|
|
|
|
v-if="row.distributionState === '0'" |
|
|
|
|
> |
|
|
|
|
编辑 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
@ -129,18 +110,18 @@
|
|
|
|
|
@click="issueMatterFun(row)" |
|
|
|
|
>问题下发</el-button |
|
|
|
|
> |
|
|
|
|
<!-- <el-button--> |
|
|
|
|
<!-- type="danger"--> |
|
|
|
|
<!-- link--> |
|
|
|
|
<!-- @click="delProblemsFun(row)"--> |
|
|
|
|
<!-- >删除</el-button--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- <el-button--> |
|
|
|
|
<!-- type="danger"--> |
|
|
|
|
<!-- link--> |
|
|
|
|
<!-- @click="delProblemsFun(row)"--> |
|
|
|
|
<!-- >删除</el-button--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<el-button |
|
|
|
|
:type="row.problemState == '1'?'danger':'primary' " |
|
|
|
|
:type="row.problemState == '1' ? 'danger' : 'primary'" |
|
|
|
|
link |
|
|
|
|
@click="upProblemStateFun(row)" |
|
|
|
|
> |
|
|
|
|
{{row.problemState == '1'?'删除':'恢复'}} |
|
|
|
|
{{ row.problemState == "1" ? "删除" : "恢复" }} |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
@ -178,22 +159,22 @@
|
|
|
|
|
<div class="col col-12"> |
|
|
|
|
<label>涉及人员</label> |
|
|
|
|
<span v-if="activeRow.peoples"> |
|
|
|
|
<el-tag v-for="(item,index) in JSON.parse(activeRow.peoples)" :key="index"> |
|
|
|
|
{{item.name}} |
|
|
|
|
<el-tag v-for="(item, index) in JSON.parse(activeRow.peoples)" :key="index"> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</el-tag> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-12"> |
|
|
|
|
<label>创建人</label> |
|
|
|
|
<span>{{ activeRow.createName || '/' }}</span> |
|
|
|
|
<span>{{ activeRow.createName || "/" }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-12"> |
|
|
|
|
<label>下发人</label> |
|
|
|
|
<span>{{ activeRow.issueUserName || '/' }}</span> |
|
|
|
|
<span>{{ activeRow.issueUserName || "/" }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-24"> |
|
|
|
|
<label>问题类型</label> |
|
|
|
|
<span>{{ activeRow.problemType || '/' }}</span> |
|
|
|
|
<span>{{ activeRow.problemType || "/" }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-24"> |
|
|
|
|
<label>问题描述</label> |
|
|
|
|
@ -201,17 +182,31 @@
|
|
|
|
|
</div> |
|
|
|
|
<div class="col col-24"> |
|
|
|
|
<label>分发状态</label> |
|
|
|
|
<span>{{ getDictLable(dict.distributionState, activeRow.distributionState) }}</span> |
|
|
|
|
<span>{{ |
|
|
|
|
getDictLable(dict.distributionState, activeRow.distributionState) |
|
|
|
|
}}</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<file-list :files="activeRow.files? JSON.parse(activeRow.files) : []" /> |
|
|
|
|
<file-list :files="activeRow.files ? JSON.parse(activeRow.files) : []" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog @close="addClose" 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-dialog |
|
|
|
|
@close="addClose" |
|
|
|
|
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" |
|
|
|
|
@ -278,11 +273,7 @@
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="涉及警种" prop="policeType"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="issueForm.policeType" |
|
|
|
|
clearable |
|
|
|
|
style="width: 280px" |
|
|
|
|
> |
|
|
|
|
<el-select v-model="issueForm.policeType" clearable style="width: 280px"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in dict.policeType" |
|
|
|
|
:key="item.id" |
|
|
|
|
@ -321,7 +312,8 @@
|
|
|
|
|
v-for="item in dict.distributionFlow" |
|
|
|
|
:key="item.dictCode" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
>{{ item.dictLabel }}</el-radio> |
|
|
|
|
>{{ item.dictLabel }}</el-radio |
|
|
|
|
> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
@ -337,8 +329,7 @@
|
|
|
|
|
v-for="item in dict.approvalFlow" |
|
|
|
|
:key="item.dictCode" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
>{{ item.dictLabel |
|
|
|
|
}}{{ item.remark ? `(${item.remark})` : "" }}</el-radio |
|
|
|
|
>{{ item.dictLabel }}{{ item.remark ? `(${item.remark})` : "" }}</el-radio |
|
|
|
|
> |
|
|
|
|
</el-radio-group> |
|
|
|
|
<div class="tips mt-10"> |
|
|
|
|
@ -366,7 +357,12 @@
|
|
|
|
|
</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-form |
|
|
|
|
:label-width="120" |
|
|
|
|
ref="upFormRefs" |
|
|
|
|
:model="upFormData" |
|
|
|
|
v-loading="upLoading" |
|
|
|
|
> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="发现时间"> |
|
|
|
|
@ -382,11 +378,7 @@
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="问题来源"> |
|
|
|
|
<el-select |
|
|
|
|
clearable |
|
|
|
|
v-model="upFormData.taskType" |
|
|
|
|
style="width:100%" |
|
|
|
|
> |
|
|
|
|
<el-select clearable v-model="upFormData.taskType" style="width: 100%"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in dict.taskType" |
|
|
|
|
:key="item.id" |
|
|
|
|
@ -408,18 +400,26 @@
|
|
|
|
|
: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> |
|
|
|
|
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> |
|
|
|
|
<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-col :span="24"> |
|
|
|
|
<el-form-item label="问题描述"> |
|
|
|
|
<el-input type="textarea" v-model="upFormData.thingDesc"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
@ -428,215 +428,365 @@
|
|
|
|
|
<file-upload |
|
|
|
|
style="width: 100%" |
|
|
|
|
:uploadDrag="true" |
|
|
|
|
v-model:files="upFormData.files"></file-upload> |
|
|
|
|
v-model: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 type="primary" size="large" @click="handleUpData" v-loading="upLoading" |
|
|
|
|
>确认</el-button |
|
|
|
|
> |
|
|
|
|
</footer> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog title="生成督察通报" v-model="showGenReport" width="1100" top="1vh" style="margin-bottom: 0"> |
|
|
|
|
<el-scrollbar height="81vh" style="padding: 10px"> |
|
|
|
|
<el-form label-width="148" :model="formData" ref="formRef"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="督察通报文件名" |
|
|
|
|
prop="" |
|
|
|
|
:rules="{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入督察通报文件名', |
|
|
|
|
trigger: ['blur'], |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<el-input v-model="formData.fileName" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-divider /> |
|
|
|
|
<h3 style="font-size: 16px">通报内容</h3> |
|
|
|
|
<div class="mb-32"> |
|
|
|
|
<div class="flex gap"> |
|
|
|
|
<el-input v-model="formData.contents1.title" /> |
|
|
|
|
<el-button @click="formData.contents1.list.push({})"> |
|
|
|
|
<icon name="el-icon-Plus" /> |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
<ul style="list-style: circle"> |
|
|
|
|
<li v-for="(item, index) in formData.contents1.list" class="mb-16"> |
|
|
|
|
<div class="flex gap"> |
|
|
|
|
<el-input v-model="item.content" type="textarea" /> |
|
|
|
|
<el-button @click="formData.contents1.list.splice(index, 1)"> |
|
|
|
|
<icon name="el-icon-Minus" /> |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div class="flex gap"> |
|
|
|
|
<el-input v-model="formData.contents2.title" /> |
|
|
|
|
<el-button @click="formData.contents2.list.push({})"> |
|
|
|
|
<icon name="el-icon-Plus" /> |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
<ul style="list-style: circle"> |
|
|
|
|
<li v-for="item in formData.contents2.list" class="mb-16"> |
|
|
|
|
<div class="flex gap mb-10"> |
|
|
|
|
<el-input v-model="item.title" /> |
|
|
|
|
<el-button @click="formData.contents2.list.splice(index, 1)"> |
|
|
|
|
<icon name="el-icon-Minus" /> |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex gap"> |
|
|
|
|
<el-input v-model="item.content" type="textarea" /> |
|
|
|
|
<div style="width: 46px"></div> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
</el-scrollbar> |
|
|
|
|
|
|
|
|
|
<footer class="flex end"> |
|
|
|
|
<!-- <el-button @click="showGenReport = false" size="large">通报预览</el-button> --> |
|
|
|
|
<el-button type="primary" @click="handleGenReport" size="large">生成通报</el-button> |
|
|
|
|
</footer> |
|
|
|
|
</el-dialog> |
|
|
|
|
</template> |
|
|
|
|
<script setup> |
|
|
|
|
import { getDictLable } from "@/utils/util"; |
|
|
|
|
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 upLoading = ref(false); |
|
|
|
|
const peoplesloading = ref(false); |
|
|
|
|
const upShow = ref(false); |
|
|
|
|
const upFormData = ref({}) |
|
|
|
|
|
|
|
|
|
//任务分发 |
|
|
|
|
const distributeShow = ref(false) |
|
|
|
|
const issueForm = ref({}) |
|
|
|
|
const issueLoading = ref(false) |
|
|
|
|
const formRefs =ref(); |
|
|
|
|
//六项规定督察下发问题 |
|
|
|
|
const issueMatterFun = async (row)=>{ |
|
|
|
|
const data = await getTaskProblem(row.id) |
|
|
|
|
switch (row.taskType){ |
|
|
|
|
import { getToken } from '@/utils/token' |
|
|
|
|
import { BASE_PATH } from "@/api/request"; |
|
|
|
|
import { getDictLable } from "@/utils/util"; |
|
|
|
|
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 upLoading = ref(false); |
|
|
|
|
const peoplesloading = ref(false); |
|
|
|
|
const upShow = ref(false); |
|
|
|
|
const upFormData = ref({}); |
|
|
|
|
|
|
|
|
|
//任务分发 |
|
|
|
|
const distributeShow = ref(false); |
|
|
|
|
const issueForm = ref({}); |
|
|
|
|
const issueLoading = ref(false); |
|
|
|
|
const formRefs = ref(); |
|
|
|
|
//六项规定督察下发问题 |
|
|
|
|
const issueMatterFun = async (row) => { |
|
|
|
|
const data = await getTaskProblem(row.id); |
|
|
|
|
switch (row.taskType) { |
|
|
|
|
case "selfexamination": |
|
|
|
|
issueForm.value.problemVo = data |
|
|
|
|
issueForm.value.problemVo = data; |
|
|
|
|
break; |
|
|
|
|
case "inspection": |
|
|
|
|
issueForm.value.problemVo = data |
|
|
|
|
issueForm.value.problemVo = data; |
|
|
|
|
break; |
|
|
|
|
case "testing_alcohol": |
|
|
|
|
issueForm.value.taskId = data.taskId; |
|
|
|
|
issueForm.value.empNo =data.empNo; |
|
|
|
|
issueForm.value.empNo = data.empNo; |
|
|
|
|
break; |
|
|
|
|
case "risk_personal": |
|
|
|
|
issueForm.value.supRecordId =row.id |
|
|
|
|
issueForm.value.supRecordId = row.id; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
issueForm.value.problemVo = data; |
|
|
|
|
break |
|
|
|
|
} |
|
|
|
|
issueForm.value.tableKey=row.taskType; |
|
|
|
|
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 |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
const res = await listPoliceData(upQuery.value) |
|
|
|
|
polices.value = res.records.map(s=> { |
|
|
|
|
return{ |
|
|
|
|
"name":s.name, |
|
|
|
|
"idCode":s.idCode, |
|
|
|
|
"empNo":s.empNo |
|
|
|
|
issueForm.value.tableKey = row.taskType; |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
delete upQuery.value.idCodes; |
|
|
|
|
console.log("polices", upFormData.value.peoples); |
|
|
|
|
peoplesloading.value = false; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//获取用户表 |
|
|
|
|
function inputPeopleFun(val){ |
|
|
|
|
//获取用户表 |
|
|
|
|
function inputPeopleFun(val) { |
|
|
|
|
upQuery.value.name = val; |
|
|
|
|
getPeoplesFun(); |
|
|
|
|
} |
|
|
|
|
inputPeopleFun(); |
|
|
|
|
const handleUpData = async()=>{ |
|
|
|
|
upLoading.value=true |
|
|
|
|
|
|
|
|
|
const res = await upTaskProblem(upFormData.value) |
|
|
|
|
upShow.value=false; |
|
|
|
|
getList() |
|
|
|
|
upLoading.value=false |
|
|
|
|
} |
|
|
|
|
const addClose =()=>{ |
|
|
|
|
issueForm.value={ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
const upClose = ()=>{ |
|
|
|
|
upFormData.value={ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
inputPeopleFun(); |
|
|
|
|
const handleUpData = async () => { |
|
|
|
|
upLoading.value = true; |
|
|
|
|
|
|
|
|
|
//下发问题 |
|
|
|
|
const handleSubmitTask =async ()=>{ |
|
|
|
|
const res = await upTaskProblem(upFormData.value); |
|
|
|
|
upShow.value = false; |
|
|
|
|
getList(); |
|
|
|
|
upLoading.value = false; |
|
|
|
|
}; |
|
|
|
|
const addClose = () => { |
|
|
|
|
issueForm.value = {}; |
|
|
|
|
}; |
|
|
|
|
const upClose = () => { |
|
|
|
|
upFormData.value = {}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//下发问题 |
|
|
|
|
const handleSubmitTask = async () => { |
|
|
|
|
await formRefs.value.validate(); |
|
|
|
|
issueLoading.value = true |
|
|
|
|
issueLoading.value = true; |
|
|
|
|
try { |
|
|
|
|
await TestingAlcoholIssueMatterFun(issueForm.value) |
|
|
|
|
} catch(e) { |
|
|
|
|
issueLoading.value = false |
|
|
|
|
return |
|
|
|
|
await TestingAlcoholIssueMatterFun(issueForm.value); |
|
|
|
|
} catch (e) { |
|
|
|
|
issueLoading.value = false; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
issueLoading.value = false |
|
|
|
|
issueLoading.value = false; |
|
|
|
|
feedback.msgSuccess("下发成功"); |
|
|
|
|
distributeShow.value = false; |
|
|
|
|
getList() |
|
|
|
|
} |
|
|
|
|
getList(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleTabClick= (tab)=>{ |
|
|
|
|
query.value.actionType=tab.props.name |
|
|
|
|
console.log('tab',tab.props.name) |
|
|
|
|
const handleTabClick = (tab) => { |
|
|
|
|
query.value.actionType = tab.props.name; |
|
|
|
|
console.log("tab", tab.props.name); |
|
|
|
|
getList(); |
|
|
|
|
} |
|
|
|
|
const delProblemsFun =async (row)=>{ |
|
|
|
|
}; |
|
|
|
|
const delProblemsFun = async (row) => { |
|
|
|
|
await feedback.confirm("确定要删除该数据?"); |
|
|
|
|
delTaskProblem(row.id).then(res=>{ |
|
|
|
|
getList() |
|
|
|
|
}) |
|
|
|
|
delTaskProblem(row.id).then((res) => { |
|
|
|
|
getList(); |
|
|
|
|
}); |
|
|
|
|
feedback.msgSuccess("删除成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function upProblemStateFun(row){ |
|
|
|
|
await feedback.confirm(`确定要${row.problemState == '1'?'删除':'恢复'}该问题项(可在回收站中查看已删除的问题项)?`); |
|
|
|
|
upProblemState(row.id).then(res=>{ |
|
|
|
|
getList() |
|
|
|
|
}) |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
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; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
getList() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const show = ref(false) |
|
|
|
|
const activeRow = ref({}) |
|
|
|
|
async function showDeatil(row) { |
|
|
|
|
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 ){ |
|
|
|
|
} |
|
|
|
|
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; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let lists = JSON.parse(upFormData.value.peoples ); |
|
|
|
|
upFormData.value.peoples=lists; |
|
|
|
|
upFormData.value.peopleIds = lists.map((s)=>{ |
|
|
|
|
return s.idCode |
|
|
|
|
}) |
|
|
|
|
onMounted(() => { |
|
|
|
|
getList(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const show = ref(false); |
|
|
|
|
const activeRow = ref({}); |
|
|
|
|
async function showDeatil(row) { |
|
|
|
|
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) { |
|
|
|
|
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) |
|
|
|
|
let idCodes = []; |
|
|
|
|
upFormData.value.peoples.forEach((s) => { |
|
|
|
|
if (s.idCode) { |
|
|
|
|
idCodes.push(s.idCode); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
upQuery.value.idCodes = idCodes; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
upShow.value=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
upShow.value = true; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
watch(()=>upFormData.value.departId,(val)=>{ |
|
|
|
|
watch( |
|
|
|
|
() => upFormData.value.departId, |
|
|
|
|
(val) => { |
|
|
|
|
upQuery.value.departId = val; |
|
|
|
|
|
|
|
|
|
getPeoplesFun() |
|
|
|
|
|
|
|
|
|
},{deep:true,immediate:true}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(()=>upFormData.value.files,(val)=>{ |
|
|
|
|
console.log('val',val) |
|
|
|
|
getPeoplesFun(); |
|
|
|
|
}, |
|
|
|
|
{ deep: true, immediate: true } |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
() => upFormData.value.files, |
|
|
|
|
(val) => { |
|
|
|
|
console.log("val", val); |
|
|
|
|
upFormData.value.files = val; |
|
|
|
|
},{immediate:true,deep:true}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
{ immediate: true, deep: true } |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
const selectRows = ref([]); |
|
|
|
|
function handleTableSelect(selection) { |
|
|
|
|
selectRows.value = selection; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const showGenReport = ref(false); |
|
|
|
|
const formData = ref({}); |
|
|
|
|
|
|
|
|
|
function handleShowGenReport() { |
|
|
|
|
if (selectRows.value.length === 0) { |
|
|
|
|
feedback.msgWarning("请选择要生成报告的数据"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
formData.value = { |
|
|
|
|
contents1: { |
|
|
|
|
title: "好的方面", |
|
|
|
|
list: [], |
|
|
|
|
}, |
|
|
|
|
contents2: { |
|
|
|
|
title: "发现的问题", |
|
|
|
|
list: [], |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
formData.value.contents1.list = selectRows.value |
|
|
|
|
.filter((item) => !item.hasProblem) |
|
|
|
|
.map((item) => { |
|
|
|
|
return { |
|
|
|
|
content: item.thingDesc, |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
const problmes = selectRows.value.filter((item) => item.hasProblem) |
|
|
|
|
const set = new Set(problmes.filter(item => item.problemType).map(item => item.problemType.indexOf('/') === -1 ? item.problemType : item.problemType.substring(0, item.problemType.indexOf('/')))) |
|
|
|
|
console.log(set) |
|
|
|
|
const arr = []; |
|
|
|
|
set.forEach(item => { |
|
|
|
|
const content = problmes.filter(p => p.problemType && p.problemType.indexOf(item) === 0).map(item => item.thingDesc).join('。') |
|
|
|
|
arr.push({ |
|
|
|
|
title: item, |
|
|
|
|
content: content |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
formData.value.contents2.list = arr |
|
|
|
|
showGenReport.value = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const formRef = ref() |
|
|
|
|
async function handleGenReport() { |
|
|
|
|
await formRef.value.validate(); |
|
|
|
|
fetch(`${BASE_PATH}/task/problem/genReport`, |
|
|
|
|
{ |
|
|
|
|
method: 'POST', |
|
|
|
|
body: JSON.stringify(formData.value), |
|
|
|
|
headers: { |
|
|
|
|
"Authorization": getToken(), |
|
|
|
|
"Content-Type": "application/json" |
|
|
|
|
} |
|
|
|
|
}).then(response => response.blob()) |
|
|
|
|
.then(blob => { |
|
|
|
|
// 创建Blob URL |
|
|
|
|
const blobUrl = URL.createObjectURL(blob); |
|
|
|
|
const a = document.createElement('a'); |
|
|
|
|
a.href = blobUrl; |
|
|
|
|
a.download = formData.value.fileName + ".docx"; |
|
|
|
|
document.body.appendChild(a); |
|
|
|
|
a.click(); |
|
|
|
|
document.body.removeChild(a); |
|
|
|
|
// 释放Blob URL |
|
|
|
|
URL.revokeObjectURL(blobUrl); |
|
|
|
|
}) |
|
|
|
|
.catch(error => console.error('下载失败', error)); |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|
<style lang="scss" scoped></style> |
|
|
|
|
|