数字督察一体化平台-前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

912 lines
36 KiB

<template>
<div class="container">
<header>
<div class="crumbs flex gap wrap">
<el-tag
type="info"
closable
v-for="item in queryCrumbs"
:key="item.key"
@close="removeQueryItem(item.key)"
>
<span>{{ item.label }}:</span>
<span class="text-primary">{{ item.text }}</span>
</el-tag>
</div>
<el-form :label-width="120">
<el-row>
<el-col :span="6">
<el-form-item label="问题发现时间">
<date-time-range-picker-ext
v-model="query.discoveryTime"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="问题发生时间">
<date-time-range-picker-ext
v-model="query.happenTime"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="问题录入时间">
<date-time-range-picker-ext
v-model="query.crtTime"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="样本源头编号">
<el-input
placeholder="请输入"
v-model="query.originId"
clearable
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="涉及单位">
<depart-tree-select
v-model="query.involveDepartId"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="办理单位">
<depart-tree-select
v-model="query.handleDepartId"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="投诉反映人">
<div class="flex gap">
<el-select
v-model="query.responderKey"
style="width: 160px"
@change="delete query.responderValue"
>
<el-option value="name" label="姓名" />
<el-option value="phone" label="电话" />
</el-select>
<el-input
placeholder="请输入"
v-model="query.responderValue"
clearable
/>
</div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="事情简述">
<el-input
placeholder="请输入"
v-model="query.thingDesc"
clearable
/>
</el-form-item>
</el-col>
</el-row>
<query-select-row
v-for="(item, index) in queryItems"
:key="index"
:label="item.label"
:data="item.data"
v-model="query[item.key]"
@update="getList"
/>
<div class="form-row flex">
<label class="text-center">其他选项</label>
<div class="flex wrap query-box">
<el-tree-select
:data="dictProblemSources"
:props="{ value: 'id' }"
node-key="id"
v-model="query.problemSourcesCode"
clearable
filterable
size="small"
style="width: 180px"
placeholder="问题来源"
/>
<el-select
size="small"
style="width: 146px"
placeholder="业务类别"
clearable
v-model="query.businessTypeCode"
>
<el-option
v-for="item in dict.businessType"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
<el-select
size="small"
style="width: 120px"
placeholder="核查情况"
clearable
v-model="query.checkStatus"
>
<el-option
v-for="item in dict.inspectCase"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
<el-select
size="small"
style="width: 120px"
placeholder="是否整改"
clearable
v-model="query.isRectifyCode"
>
<el-option
v-for="item in dict.isRectify"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
<el-select
size="small"
style="width: 120px"
placeholder="办理状态"
clearable
v-model="query.processingStatus"
multiple
>
<el-option
v-for="item in dict.processingStatus"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
<el-select
size="small"
style="width: 150px"
placeholder="流程阶段"
clearable
v-model="query.flowKey"
>
<el-option
v-for="item in flowNodes"
:key="item.flowKey"
:label="item.flowName"
:value="item.flowKey"
/>
</el-select>
<el-select
size="small"
style="width: 120px"
placeholder="是否超时"
clearable
v-model="query.timeoutFlag"
>
<el-option label="未超时" :value="false" />
<el-option label="已超时" :value="true" />
</el-select>
<el-select
size="small"
style="width: 120px"
placeholder="申请延期"
clearable
v-model="query.extensionFlag"
>
<el-option label="已申请" :value="true" />
<el-option label="未申请" :value="false" />
</el-select>
<el-input placeholder="任务ID" size="small" style="width: 146px" clearable />
</div>
</div>
</el-form>
<div class="flex between mt-20 mb-26">
<el-button type="primary" @click="handleExport"
>数据导出</el-button
>
<div>
<el-button type="primary" @click="getList">
<template #icon
><icon name="el-icon-Search"
/></template>
查询</el-button
>
<el-button @click="reset">重置</el-button>
</div>
</div>
</header>
<main>
<div class="table-container" v-loading="loading">
<el-table :data="list" @sort-change="handleTableSort" ref="tableRef">
<el-table-column type="expand">
<template #default="{ row }">
<div class="row mt-10">
<div class="col col-6">
<label>样本源头编号</label>
<span>{{ row.originId }}</span>
</div>
<div class="col col-6">
<label>问题发现时间</label>
<span>{{ row.discoveryTime }}</span>
</div>
<div class="col col-6">
<label>问题发生时间</label>
<span>{{ row.happenTime || "/" }}</span>
</div>
</div>
<div class="row mt-10">
<div class="col col-6">
<label>问题来源</label>
<span>{{ row.problemSources }}</span>
</div>
<div class="col col-6">
<label>业务类别</label>
<span>{{ row.businessTypeName }}</span>
</div>
<div class="col col-12">
<label>涉嫌问题</label>
<span>{{
getInvolveProblem(row.involveProblem)
}}</span>
</div>
</div>
<div class="row mt-10">
<div class="col col-6">
<label>投诉反映人</label>
<span>{{ row.responderName }}</span>
</div>
<div class="col col-6">
<label>联系电话</label>
<span>{{ row.contactPhone }}</span>
</div>
</div>
<div class="row mt-10">
<div class="col col-6">
<label>涉及警种</label>
<span>{{ row.policeTypeName }}</span>
</div>
<div class="col col-6">
<label>涉及单位</label>
<span>{{
row.involveDepartName || "/"
}}</span>
</div>
</div>
<div class="row mt-10">
<div class="col col-24">
<label>事情简要描述</label>
<span>{{ row.thingDesc }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column
label="问题录入时间"
prop="crtTime"
width="150"
sortable="custom"
/>
<el-table-column
label="问题发现时间"
prop="discoveryTime"
width="150"
sortable="custom"
/>
<el-table-column
label="问题来源"
prop="problemSources"
width="110"
/>
<el-table-column
label="业务类别"
prop="businessTypeName"
width="110"
/>
<el-table-column
label="问题内容"
prop="thingDesc"
show-overflow-tooltip
/>
<el-table-column label="办理单位" show-overflow-tooltip>
<template #default="{ row }">
<span
>{{ row.handleSecondDepartName
}}{{ row.handleThreeDepartName }}</span
>
</template>
</el-table-column>
<el-table-column
label="是否属实"
prop="checkStatusName"
width="100"
align="center"
/>
<el-table-column
label="流程限时"
width="150"
align="center"
>
<template #default="{ row }">
<countdown
:time="row.remainingDuration"
v-if="
row.remainingDuration &&
row.processingStatus !==
ProcessingStatus.COMPLETED
"
/>
<el-tag
v-else-if="row.handleTimeout"
type="danger"
effect="dark"
>办理超时
{{ formatTimeText(row.handleTimeout) }}</el-tag
>
</template>
</el-table-column>
<el-table-column label="办理状态" width="110">
<template #default="{ row }">
<el-tag
:type="
row.processingStatus ===
ProcessingStatus.COMPLETED
? 'success'
: 'primary'
"
v-if="row.processingStatus"
>{{
getDictLable(
dict.processingStatus,
row.processingStatus
)
}}</el-tag
>
</template>
</el-table-column>
<el-table-column
label="当前处理对象"
prop="currentProcessingObject"
show-overflow-tooltip
>
<template #default="{ row }">
<span
v-if="
row.processingStatus ===
ProcessingStatus.COMPLETED
"
>无</span
>
<span v-else>{{
row.currentProcessingObject
}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="160">
<template #default="{ row }">
<el-button
type="primary"
link
@click="handleAction(row)"
>详情</el-button
>
<el-button
type="primary"
link
@click="handleEdit(row)"
v-perms="['negative:edit']"
>编辑</el-button
>
<el-button
type="danger"
link
@click="handleDel(row)"
v-perms="['negative:del']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex end mt-8">
<el-pagination
@size-change="getList"
@current-change="getList"
:current-page="query.current"
:page-sizes="[10, 20, 50]"
:page-size="query.size"
v-model:current-page="query.current"
layout="total, sizes, prev, pager, next"
:total="total"
>
</el-pagination>
</div>
</main>
</div>
<negative-dialog
v-model="show"
:id="activeNegativeId"
@close="show = false"
/>
<el-dialog v-model="editShow" title="问题编辑" width="900px">
<el-form label-width="148" :model="formData" ref="formRef">
<div style="margin-bottom: 80px">
<el-row>
<el-col :span="12">
<el-form-item
label="问题来源"
prop="problemSourcesCode"
:rules="{
required: true,
message: '请选择问题来源',
trigger: ['blur'],
}"
>
<dict-select
name="problemSources"
v-model="formData.problemSourcesCode"
@change="
(nodeData) =>
(formData.problemSources =
nodeData.label)
"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="业务类别"
prop="businessTypeCode"
:rules="{
required: true,
message: '请选择业务类别',
trigger: ['blur'],
}"
>
<el-select
v-model="formData.businessTypeCode"
@change="
(val) =>
(formData.businessTypeName =
dict.businessType.filter(
(item) => item.dictValue === val
)[0].dictLabel)
"
>
<el-option
v-for="item in dict.businessType"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="formData.problemSourcesCode === ProblemSources.ZXDC">
<el-col :span="12">
<el-form-item
label="专项督察"
prop="specialSupervision"
:rules="{
required: true,
message: '请选择专项督察',
trigger: ['blur'],
}"
>
<el-select
v-model="formData.specialSupervision"
clearable
>
<el-option
v-for="item in dict.specialSupervision"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="通报期数"
prop="reportNumber"
:rules="{
required: true,
message: '请选择通报期数',
trigger: ['blur'],
}"
>
<el-input
placeholder="请输入"
v-model="formData.reportNumber"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label="涉及案件/警情编号"
prop="caseNumber"
>
<el-input
v-model="formData.caseNumber"
placeholder="请输入"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="涉嫌问题"
prop="involveProblem"
:rules="{
required: true,
message: '请选择涉嫌问题',
trigger: ['blur'],
}"
>
<el-select
v-model="formData.involveProblemCode"
multiple
@change="handleSelectInvolveProblem"
clearable
>
<el-option
v-for="item in dict.suspectProblem"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item-ext
label="涉及警种"
content="囊括了市局除分县市局以外的所有业务警种,便于后期统计分析业务条线的问题。"
prop="policeType"
>
<el-select
v-model="formData.policeType"
@change="
(val) =>
(formData.policeTypeName =
dict.policeType.filter(
(item) => item.dictValue === val
)[0].dictLabel)
"
clearable
>
<el-option
v-for="item in dict.policeType"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item-ext>
</el-col>
<el-col :span="12">
<el-form-item
label="问题涉及单位"
prop="involveDepartId"
:rules="{
required: true,
message: '请选择问题涉及单位',
trigger: ['blur'],
}"
>
<depart-tree-select
v-model="formData.involveDepartId"
:check-strictly="true"
@node-click="
(row) =>
(formData.involveDepartName =
row.shortName)
"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
v-if="
ProblemSources_XFTS.includes(
formData.problemSourcesCode
)
"
>
<el-col :span="12">
<el-form-item label="投诉反映人" prop="responderName">
<el-input
placeholder="请输入"
v-model="formData.responderName"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="contactPhone">
<el-input
v-model="formData.contactPhone"
placeholder="请输入"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label="问题发现时间"
prop="discoveryTime"
:rules="{
required: true,
message: '请选择问题发现时间',
trigger: ['blur'],
}"
>
<el-date-picker
v-model="formData.discoveryTime"
type="datetime"
placeholder="请选择"
value-format="YYYY-MM-DD HH:mm"
time-format="HH:mm"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="问题发生时间" prop="happenTime">
<el-date-picker
v-model="formData.happenTime"
type="datetime"
placeholder="请选择"
value-format="YYYY-MM-DD HH:mm"
time-format="HH:mm"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label="事情简要描述"
prop="thingDesc"
:rules="{
required: true,
message: '请输入事情简要描述',
trigger: ['blur'],
}"
>
<el-input
type="textarea"
placeholder="请输入"
v-model="formData.thingDesc"
:autosize="{ minRows: 4 }"
/>
</el-form-item>
</div>
</el-form>
<footer class="flex end">
<el-button @click="editShow = false" size="large">取消</el-button>
<el-button type="primary" @click="handleSumbit" size="large"
>确定</el-button
>
</footer>
</el-dialog>
</template>
<script setup>
import moment from "moment";
import { ElLoading } from "element-plus";
import {
listNegative,
negativeExport,
delNegative,
updateNegative,
} from "@/api/work/negative";
import { getDictLable, formatTimeText, getInvolveProblem } from "@/utils/util";
import feedback from "@/utils/feedback";
import { ProcessingStatus } from "@/enums/flowEnums";
import { ProblemSources_XFTS, ProblemSources } from "@/enums/dictEnums";
import useCatchStore from "@/stores/modules/catch";
const catchStore = useCatchStore();
const dict = catchStore.getDicts([
"businessType",
"inspectCase",
"isRectify",
"processingStatus",
"suspectProblem",
"policeType",
"specialSupervision",
]);
const flowNodes = catchStore.getFlowNodes();
const dictProblemSources = catchStore.getDictProblemSources();
const queryCrumbs = ref([]);
const queryItems = ref([]);
const query = ref({
current: 1,
size: 10,
responderKey: "name",
});
const list = ref([]);
const total = ref(0);
const loading = ref(true);
function getList() {
loading.value = true;
listNegative(query.value).then((data) => {
list.value = data.records;
total.value = data.total;
loading.value = false;
});
}
function handleTableSort(orderObj) {
if (orderObj.order) {
query.value.order = orderObj.order
query.value.orderProp = orderObj.prop
} else {
query.value.order = ''
query.value.orderProp = ''
}
getList()
}
const tableRef = ref()
function reset() {
query.value = {
current: 1,
size: 10,
responderKey: "name",
};
tableRef.value.clearSort()
getList();
// 重置路由
router.push("/query");
}
const route = useRoute();
watch(
() => route.query,
() => {
updateQuery();
getList();
}
);
function updateQuery() {
if (route.query.processingStatus) {
query.value.processingStatus = [route.query.processingStatus];
} else {
query.value.processingStatus = [];
}
if (route.query.crtTime === "today") {
query.value.crtTime = [
moment().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"),
];
} else {
query.value.crtTime = [];
}
if (route.query.extensionFlag === "true") {
query.value.extensionFlag = true
} else {
query.value.extensionFlag = '';
}
}
onMounted(() => {
updateQuery();
getList();
});
const show = ref(false);
const activeNegativeId = ref("");
function handleAction(row) {
show.value = true;
activeNegativeId.value = row.id;
}
const router = useRouter();
async function handleExport() {
await feedback.confirm("请确定导出当前页面所有数据");
const loading = ElLoading.service({
lock: true,
text: "导出中...",
background: "rgba(0, 0, 0, 0.5)",
});
await negativeExport(query.value);
loading.close();
await feedback.confirm("导出任务已生成,请到“导出记录”页面查看");
router.push("/negative/export");
}
async function handleDel(row) {
await feedback.confirm(`确定删除该数据?`);
await delNegative(row.id);
feedback.msgSuccess("操作成功");
getList();
}
const editShow = ref(false);
const formData = ref({});
const formRef = ref(null);
function handleEdit(row) {
console.log(row);
editShow.value = true;
formData.value = { ...row };
if (row.involveProblem) {
formData.value.involveProblem = JSON.parse(row.involveProblem);
formData.value.involveProblemCode = JSON.parse(row.involveProblem).map(
(item) => item.dictValue
);
}
}
async function handleSumbit() {
await formRef.value.validate();
await updateNegative(formData.value);
editShow.value = false;
feedback.msgSuccess("操作成功");
getList();
}
function handleSelectInvolveProblem(vals) {
formData.value.involveProblem = vals.map((val) => {
const dictItem = dict.suspectProblem.filter(
(item) => item.dictValue === val
)[0];
return {
dictType: "suspectProblem",
dictLabel: dictItem.dictLabel,
dictValue: dictItem.dictValue,
};
});
}
</script>
<style lang="scss" scoped>
.form-row {
padding: 8px 0;
box-shadow: inset 0px -1px 0px 0px #ebebeb;
label {
width: 120px;
line-height: 24px;
padding-right: 12px;
box-sizing: border-box;
text-align: right;
& + * {
width: calc(100% - 126px);
}
}
.btn-box {
width: 70px;
}
.el-form-item {
margin-bottom: 0;
}
}
.query-box {
gap: 10px 20px;
}
</style>