Browse Source

涉访涉诉--办理初版

master
buaixuexideshitongxue 1 month ago
parent
commit
d8ebc63e3b
  1. 15
      src/api/data/complaintCollection.ts
  2. 394
      src/components/data/complaint_detail.vue
  3. 129
      src/components/data/complaintformdialog.vue
  4. 2011
      src/components/negative/verify-sfss.vue
  5. 15
      src/components/police-select.vue
  6. 150
      src/views/data/ComplaintCollection.vue

15
src/api/data/complaintCollection.ts

@ -28,4 +28,19 @@ export function updateComplaintCollection(body) {
url: `/data/complaintCollection/updateComplaintCollection`, url: `/data/complaintCollection/updateComplaintCollection`,
body body
}); });
}
export function addComplaintCollectionBlame(body) {
return request.post({
url: `/data/complaintCollection/addComplaintCollectionBlame`,
body
});
}
export function watchDetail(body) {
return request.post({
url: `/data/complaintCollection/watchDetail`,
body
});
} }

394
src/components/data/complaint_detail.vue

@ -0,0 +1,394 @@
<template>
<el-dialog title="详情" v-model="visible" width="60vw" :lock-scroll="false" destroy-on-close>
<div style="min-height: 50vh" v-loading="loading">
<div class="row" style="margin: 0 60px">
<!-- ================== 基本信息登记来件 ================== -->
<div class="col col-12">
<label>来源</label>
<span>{{ sourcePathText }}</span>
</div>
<div class="col col-12">
<label>业务类别</label>
<span>{{ dictLabel(dict?.businessType, base.businessTypeCode) }}</span>
</div>
<div class="col col-12">
<label>编号</label>
<span>{{ base.originId || "/" }}</span>
</div>
<div class="col col-12">
<label>受理时间</label>
<span>{{ base.discoveryTime ? dayjs(base.discoveryTime).format('YYYY-MM-DD HH:mm:ss') : '/' }}</span>
</div>
<div class="col col-12">
<label>来件人姓名</label>
<span>{{ base.responderName || "/" }}</span>
</div>
<div class="col col-12">
<label>身份证号码</label>
<span>{{ base.responderIdCode || "/" }}</span>
</div>
<div class="col col-12">
<label>联系电话</label>
<span>{{ base.responderPhone || "/" }}</span>
</div>
<div class="col col-12">
<label>被投诉二级机构</label>
<span>{{ base.secondDepartName || "/" }}</span>
</div>
<div class="col col-12">
<label>涉嫌问题</label>
<span>{{ suspectProblemText }}</span>
</div>
<div class="col col-12">
<label>是否重复件</label>
<span>{{ dictLabel(dict?.yesNo, base.repeatt) }}</span>
</div>
<div class="col col-24">
<label>标签</label>
<span>{{ tagText }}</span>
</div>
<div class="col col-12">
<label>办理方式</label>
<span>{{ dictLabel(dict?.BlameType, base.handleMethod) }}</span>
</div>
<div class="col col-24">
<label>来件内容</label>
<span class="content">{{ base.thingDesc || "/" }}</span>
</div>
<!-- ================== 核查情况新增放在基本信息后涉及信息前 ================== -->
<div class="col col-24 section-title">
<h5>核查情况</h5>
</div>
<div class="col col-12">
<label>涉及案件/警情编号</label>
<span>{{ base.caseNumber || "/" }}</span>
</div>
<div class="col col-12">
<label>涉及单位</label>
<span>{{ base.involveDepartName || "/" }}</span>
</div>
<div class="col col-12">
<label>核查结论</label>
<span>{{ base.checkStatusName || '/'}}</span>
</div>
<div class="col col-12">
<label>涉及对象</label>
<span>{{ dictLabel(dict?.accountabilityTarget, base.accountabilityTarget) }}</span>
<!-- <span>{{ dictLabel(dict?.handleMethodType, base.accountabilityTarget ) }}</span>-->
</div>
<div class="col col-12">
<label>问题核查情况
</label>
<span>{{ base.checkStatusDesc }}</span>
</div>
<!-- ================== 涉及信息人员/单位你上次要的那块保持不变 ================== -->
<div class="col col-24 section-title">
<h5>涉及单位</h5>
</div>
<template v-if="deptBlames.length">
<div class="col col-24 sub-title">
<strong>涉及班子成员</strong>
</div>
<div
class="col col-24 blame-card"
v-for="(item, idx) in deptBlames"
:key="item.id || item.blameEmpNo || idx"
>
<div class="row inner">
<div class="col col-12">
<label>姓名</label>
<span>{{ item.blameName || "/" }}</span>
</div>
<div class="col col-12">
<label>警号</label>
<span>{{ item.blameEmpNo || "/" }}</span>
</div>
<div class="col col-12">
<label>身份证号码</label>
<span>{{ item.blameIdCode || "/" }}</span>
</div>
<div class="col col-12">
<label>人员属性</label>
<span>{{ item.ivPersonTypeName || item.ivPersonType || "/" }}</span>
</div>
</div>
</div>
</template>
<div class="col col-24" v-else>
<label></label>
<span>/</span>
</div>
<div class="col col-24 section-title">
<h5>涉及人员</h5>
</div>
<template v-if="personalBlames.length">
<div
class="col col-24 blame-card"
v-for="(item, idx) in personalBlames"
:key="item.id || item.blameEmpNo || idx"
>
<div class="row inner">
<div class="col col-12">
<label>姓名</label>
<span>{{ item.blameName || "/" }}</span>
</div>
<div class="col col-12">
<label>警号</label>
<span>{{ item.blameEmpNo || "/" }}</span>
</div>
<div class="col col-12">
<label>身份证号码</label>
<span>{{ item.blameIdCode || "/" }}</span>
</div>
<div class="col col-12">
<label>人员属性</label>
<span>{{ item.ivPersonTypeName || item.ivPersonType || "/" }}</span>
</div>
</div>
</div>
</template>
<div class="col col-24" v-else>
<label></label>
<span>/</span>
</div>
</div>
<el-empty v-if="!loading && loaded && !detail?.id" description="未查询到详情数据" />
<el-empty v-if="!loading && !loaded && !id" description="未传入ID" />
</div>
<template #footer>
<div class="dialog-footer">
<el-button size="large" @click="visible = false">关闭</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { computed, ref, watch } from "vue";
import { ElMessage } from "element-plus";
import {watchDetail} from "@/api/data/complaintCollection.ts";
import dayjs from "dayjs";
const props = defineProps({
modelValue: { type: Boolean, default: false },
id: { type: [String, Number], default: "" },
dict: { type: Object, default: () => ({}) },
});
const emit = defineEmits(["update:modelValue"]);
const visible = computed({
get: () => props.modelValue,
set: (v) => emit("update:modelValue", v),
});
const loading = ref(false);
const loaded = ref(false);
const detail = ref({});
/** ✅ 假设接口统一返回:detail = { ...baseFields, negative: { ...核查/涉及信息 } } */
const base = computed(() => detail.value || {});
const neg = computed(() => detail.value?.negative || detail.value?.neg || {});
function dictLabel(list, value) {
if (!Array.isArray(list)) return "/";
if (value === undefined || value === null || value === "") return "/";
const hit = list.find((x) => String(x.dictValue) === String(value));
return hit?.dictLabel ?? "/";
}
/** 来源展示:优先后端给的“全路径”,否则用 sourcePath 数组拼 */
const sourcePathText = computed(() => {
if (base.value?.sourceTablePath) return base.value.sourceTablePath;
if (Array.isArray(base.value?.sourcePath) && base.value.sourcePath.length) {
return base.value.sourcePath.join(" / ");
}
return "/";
});
/** 涉嫌问题:involveProblemStr 优先,其次 involveProblemIdList -> 字典label */
const suspectProblemText = computed(() => {
if (base.value?.involveProblemStr) return base.value.involveProblemStr;
const ids = base.value?.involveProblemIdList;
if (!Array.isArray(ids) || !ids.length) return "/";
const labels = ids
.map((v) => dictLabel(props.dict?.suspectProblem, v))
.filter((x) => x && x !== "/");
return labels.length ? labels.join(",") : "/";
});
/** 标签:优先 tag(单值);其次 tags(数组/逗号串) */
const tagText = computed(() => {
const v = base.value?.tag ?? base.value?.tags;
if (!v) return "/";
if (!Array.isArray(v) && String(v).indexOf(",") === -1 && base.value?.tag !== undefined) {
return dictLabel(props.dict?.tagList, v);
}
const arr = Array.isArray(v) ? v : String(v).split(",");
const labels = arr
.map((x) => dictLabel(props.dict?.tagList, x))
.filter((x) => x && x !== "/");
return labels.length ? labels.join(",") : "/";
});
/** 核查办理里的逻辑:problemIsTrue = checkStatusCode 为 1/2/3 :contentReference[oaicite:2]{index=2} */
const problemIsTrue = computed(() => ["1", "2", "3"].includes(String(neg.value?.checkStatusCode ?? "")));
/** isRectify=NOT checkStatusCode 1/2/3 :contentReference[oaicite:3]{index=3}
* 你枚举里 IsRectify.NOT 是多少不确定这里按你的模板写法isRectifyCode === '0' '2' 这类也可能是未整改
* 为了稳 非真 来判断项目里你再对齐
*/
const showRectifyRestrictionDays = computed(() => {
const code = String(neg.value?.isRectifyCode ?? "");
const isNotRectify = code === "0" || code === "2" || code.toLowerCase() === "not";
return problemIsTrue.value && isNotRectify;
});
/** 未整改原因:你模板里是 (form.isRectifyCode === '0' || form.isRectifyCode === '2') :contentReference[oaicite:4]{index=4} */
const showUnrectifyReason = computed(() => {
const code = String(neg.value?.isRectifyCode ?? "");
return code === "0" || code === "2";
});
/** problemIsTrue && isRectifyCode === InspectCase.TRUE :contentReference[oaicite:5]{index=5}
* 这里同样做宽松兼容'1' / 'true' / 'TRUE'
*/
const showRectifyDesc = computed(() => {
if (!problemIsTrue.value) return false;
const code = String(neg.value?.isRectifyCode ?? "");
return code === "1" || code.toLowerCase() === "true" || code.toUpperCase() === "TRUE";
});
/** 涉及对象分类(人员/单位) */
const BlameType = { PERSONAL: "PERSONAL", DEPARTMENT: "DEPARTMENT" };
const deptBlames = computed(() => (Array.isArray(base.value?.deptBlames) ? base.value.deptBlames : []));
const personalBlames = computed(() => (Array.isArray(base.value?.personalBlames) ? base.value.personalBlames : []));
/**
* 替换为你的真实接口接口一次性返回 base + negative
* 示例
* import { getDetail } from "@/api/xxx";
* return await getDetail({ id })
*/
async function fetchDetail() {
if (!props.id) return;
loading.value = true;
loaded.value = false;
try {
const body={
id:props.id
}
const res = await watchDetail(body);
detail.value = res?.data ?? res ?? {};
loaded.value = true;
} catch (e) {
detail.value = {};
loaded.value = true;
ElMessage.error(e?.message || "详情获取失败");
} finally {
loading.value = false;
}
}
/** 打开弹窗或 id 变化时自动请求 */
watch(
() => [visible.value, props.id],
([v]) => {
if (v) fetchDetail();
}
);
</script>
<style scoped>
/* 参考你给的 row/col 展示结构:普通详情,不是表单禁用态 */
.row {
display: flex;
flex-wrap: wrap;
margin: 0;
row-gap: 14px;
}
.col {
display: flex;
align-items: flex-start;
gap: 10px;
}
.col-12 {
width: 50%;
}
.col-24 {
width: 100%;
}
label {
width: 120px;
color: #606266;
flex: 0 0 auto;
}
span {
flex: 1 1 auto;
color: #303133;
}
.content {
white-space: pre-wrap;
line-height: 1.6;
}
.section-title h5 {
margin: 12px 0 0;
font-size: 14px;
font-weight: 600;
color: #303133;
}
.sub-title {
margin-top: 6px;
color: #606266;
}
.blame-card {
background: #f9faff;
border-radius: 6px;
padding: 10px 12px;
}
.inner {
margin: 0;
row-gap: 10px;
}
.dialog-footer {
padding: 16px 24px 24px;
display: flex;
justify-content: flex-end;
}
</style>

129
src/components/data/complaintformdialog.vue

@ -10,7 +10,8 @@
<el-form <el-form
ref="formRef" ref="formRef"
:model="model" :model="model"
:label-width="120" :label-width="150"
class="form-layout"
style="min-height: 66vh" style="min-height: 66vh"
:rules="rules" :rules="rules"
> >
@ -21,15 +22,34 @@
<el-cascader <el-cascader
v-model="model.sourcePath" v-model="model.sourcePath"
:options="dict.sourceTableAndLevel" :options="dict.sourceTableAndLevel"
:props="{ emitPath: true, checkStrictly: true }" :props="{ emitPath: true, checkStrictly: false }"
clearable clearable
filterable filterable
show-all-levels show-all-levels
style="width: 100%" style="width: 100%"
placeholder="请选择来源(一级/二级)" placeholder="请选择来源(一级/二级)"
:disabled="mode=== 'edit'"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="业务类别" prop="handleMethod">
<el-select
v-model="model.businessTypeCode"
placeholder="业务类别"
clearable
>
<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>
<!-- 编号 + 受理时间 --> <!-- 编号 + 受理时间 -->
@ -38,9 +58,18 @@
<el-form-item label="编号" prop="originId"> <el-form-item label="编号" prop="originId">
<el-input <el-input
v-model="model.originId" v-model="model.originId"
placeholder="请输入编号" :placeholder="model.originIdSkip ? '无' : '请输入编号'"
:disabled="mode === 'edit' || model.originIdSkip" :disabled="mode === 'edit' || model.originIdSkip"
/> >
<template #append>
<el-checkbox
v-model="model.originIdSkip"
@change="(v) => v && (model.originId = '')"
>
</el-checkbox>
</template>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -62,14 +91,41 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="来件人姓名" prop="responderName"> <el-form-item label="来件人姓名" prop="responderName">
<el-input v-model="model.responderName" placeholder="请输入来件人姓名" /> <el-input
v-model="model.responderName"
:placeholder="model.responderNameSkip ? '无' : '请输入来件人姓名'"
:disabled="model.responderNameSkip"
>
<template #append>
<el-checkbox
v-model="model.responderNameSkip"
@change="(v) => v && (model.responderName = '')"
>
</el-checkbox>
</template>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="身份证号码" prop="responderIdCode"> <el-form-item label="身份证号码" prop="responderIdCode">
<el-input v-model="model.responderIdCode" placeholder="请输入身份证号码" /> <el-input
v-model="model.responderIdCode"
:placeholder="model.responderIdCodeSkip ? '无' : '请输入身份证号码'"
:disabled="model.responderIdCodeSkip"
>
<template #append>
<el-checkbox
v-model="model.responderIdCodeSkip"
@change="(v) => v && (model.responderIdCode = '')"
>
</el-checkbox>
</template>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -77,12 +133,25 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="responderPhone"> <el-form-item label="联系电话" prop="responderPhone">
<el-input v-model="model.responderPhone" placeholder="请输入联系电话" /> <el-input
v-model="model.responderPhone"
:placeholder="model.responderPhoneSkip ? '无' : '请输入联系电话'"
:disabled="model.responderPhoneSkip"
>
<template #append>
<el-checkbox
v-model="model.responderPhoneSkip"
@change="(v) => v && (model.responderPhone = '')"
>
</el-checkbox>
</template>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="被投诉二级机构" prop="secondDepartId" label-width="140px"> <el-form-item label="被投诉二级机构" prop="secondDepartId" >
<depart-tree-select <depart-tree-select
v-model="model.secondDepartId" v-model="model.secondDepartId"
:check-strictly="true" :check-strictly="true"
@ -161,10 +230,12 @@
</el-scrollbar> </el-scrollbar>
<template #footer> <template #footer>
<el-button @click="visibleProxy = false" size="large">取消</el-button> <div class="dialog-footer">
<el-button type="primary" @click="onSubmit" size="large"> <el-button @click="visibleProxy = false" size="large">取消</el-button>
{{ mode === 'add' ? '添加' : '修改' }} <el-button type="primary" @click="onSubmit" size="large">
</el-button> {{ mode === 'add' ? '添加' : '修改' }}
</el-button>
</div>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
@ -188,6 +259,19 @@ const visibleProxy = computed({
get: () => props.modelValue, get: () => props.modelValue,
set: (v) => emit("update:modelValue", v), set: (v) => emit("update:modelValue", v),
}); });
watch(
() => visibleProxy.value,
(v) => {
if (v) {
//
props.model.originIdSkip = false
props.model.responderNameSkip = false
props.model.responderIdCodeSkip = false
props.model.responderPhoneSkip = false
}
}
)
// -> addForm watch // -> addForm watch
watch( watch(
@ -200,8 +284,29 @@ watch(
{ deep: true } { deep: true }
); );
function fillFiledName() {
const code = props.model.businessTypeCode;
const hit = props.dict.businessType?.find(
(d) => String(d.dictValue) === String(code)
);
props.model.businessTypeName = hit?.dictLabel || "";
}
async function onSubmit() { async function onSubmit() {
fillFiledName();
await formRef.value.validate(); await formRef.value.validate();
emit("submit"); emit("submit");
} }
</script> </script>
<style>
.form-layout {
padding: 0 34px;
}
.dialog-footer {
padding: 16px 24px 24px;
}
</style>

2011
src/components/negative/verify-sfss.vue

File diff suppressed because it is too large Load Diff

15
src/components/police-select.vue

@ -62,9 +62,18 @@ getPolices();
watch(value, (val) => { watch(value, (val) => {
emit("update:modelValue", val); emit("update:modelValue", val);
}); });
watch(departId, () => { // watch(departId, () => {
getPolices(); // getPolices();
}); // });
watch(
() => props.departId,
(val) => {
departId.value = val;
getPolices(); //
},
{ immediate: true }
);
async function getPolices() { async function getPolices() {
if (departId.value) { if (departId.value) {

150
src/views/data/ComplaintCollection.vue

@ -47,7 +47,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="被投诉二级机构" prop="secondDepartName"> <el-form-item label="涉及二级机构" prop="secondDepartName">
<depart-tree-select <depart-tree-select
v-model="query.secondDepartId" v-model="query.secondDepartId"
:check-strictly="true" :check-strictly="true"
@ -254,7 +254,7 @@
<el-table-column label="来件人姓名" width="100" prop="responderName"/> <el-table-column label="来件人姓名" width="100" prop="responderName"/>
<el-table-column label="身份证号" width="100" prop="responderIdCode" show-overflow-tooltip/> <el-table-column label="身份证号" width="100" prop="responderIdCode" show-overflow-tooltip/>
<el-table-column label="联系电话" width="100" prop="responderPhone" show-overflow-tooltip/> <el-table-column label="联系电话" width="100" prop="responderPhone" show-overflow-tooltip/>
<el-table-column label="被投诉二级机构" width="130" prop="secondDepartName"/> <el-table-column label="被投诉机构" width="130" prop="secondDepartName"/>
<el-table-column label="来信内容" width="100" prop="thingDesc" show-overflow-tooltip/> <el-table-column label="来信内容" width="100" prop="thingDesc" show-overflow-tooltip/>
<el-table-column label="涉嫌问题" width="100" prop="involveProblemStr" show-overflow-tooltip/> <el-table-column label="涉嫌问题" width="100" prop="involveProblemStr" show-overflow-tooltip/>
<el-table-column label="是否重复件" width="100"> <el-table-column label="是否重复件" width="100">
@ -262,7 +262,7 @@
{{ getDictLabel(dict.yesNo, row.repeatt) }} {{ getDictLabel(dict.yesNo, row.repeatt) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否领导批示" width="130"> <el-table-column label="是否领导批示" width="130" v-if="false">
<template #default="{ row }"> <template #default="{ row }">
{{ getDictLabel(dict.yesNo, row.leadApproval) }} {{ getDictLabel(dict.yesNo, row.leadApproval) }}
</template> </template>
@ -277,12 +277,17 @@
{{ getDictLabel(dict.handleMethodType, row.handleMethod) }} {{ getDictLabel(dict.handleMethodType, row.handleMethod) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="办理情况" width="100" prop="petitionProcessingStatus"/> <el-table-column label="办理情况" width="100" prop="xxx" v-if="false"/>
<el-table-column label="业务类别" width="100" prop="businessTypeName"/>
<el-table-column label="业务类别Code" width="100" prop="businessTypeCode" v-if="false"/>
<el-table-column label="状态" width="100" prop="status"/>
<el-table-column label="操作" width="240" fixed="right"> <el-table-column label="操作" width="240" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button type="primary" link @click="handleAction(row)">办理</el-button> <el-button type="primary" v-if="row.status === '0'" link @click="handleAction(row)">办理</el-button>
<el-button type="primary" link @click="handleUpdate(row)">修改</el-button> <el-button type="primary" v-if="row.status === '0'" link @click="handleUpdate(row)">修改</el-button>
<el-button type="danger" link @click="handleDel(row)">删除</el-button> <el-button type="danger" v-if="row.status === '0'" link @click="handleDel(row)">删除</el-button>
<el-button type="primary" v-if="row.status === '1'" link @click="handleWatchDetail(row)">查看详情
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -328,7 +333,7 @@
@submit="submitUpdate" @submit="submitUpdate"
/> />
<!-- 办理 -->
<el-dialog <el-dialog
v-model="negativeVerifySfssDailog" v-model="negativeVerifySfssDailog"
title="办理情况" title="办理情况"
@ -336,13 +341,31 @@
top="5vh" top="5vh"
destroy-on-close destroy-on-close
> >
<negative-verify-sfss ref="negativeVerifySfssRef"/> <div v-loading="submitLoading" element-loading-text="提交中...">
<negative-verify-sfss ref="negativeVerifySfssRef" />
</div>
<template #footer> <template #footer>
<el-button type="primary" @click="handleSubmit">提交</el-button> <div class="dialog-footer">
<el-button @click="negativeVerifySfssDailog = false">取消</el-button>
<el-button type="primary" @click="handleSubmit" :loading="submitLoading" :disabled="submitLoading" >提交</el-button>
</div>
</template> </template>
</el-dialog> </el-dialog>
<!-- 详情 -->
<!-- <negative-dialog-->
<!-- v-model="dialogShow"-->
<!-- id="2003439481629294659"-->
<!-- @close="show = false"-->
<!-- ref="negativeDialogRef"-->
<!-- />-->
<complaint_detail
v-model="detailShow"
:id="activeId"
:dict="dict"/>
</template> </template>
@ -352,11 +375,12 @@ import {timeFormat} from "@/utils/util";
import feedback from "@/utils/feedback"; import feedback from "@/utils/feedback";
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import { import {
addComplaintCollection, addComplaintCollection, addComplaintCollectionBlame,
delComplaintCollection, delComplaintCollection,
getComplaintCollectionPage, getComplaintCollectionPage,
updateComplaintCollection updateComplaintCollection
} from "@/api/data/complaintCollection.ts"; } from "@/api/data/complaintCollection.ts";
import Complaint_detail from "@/components/data/complaint_detail.vue";
const route = useRoute() const route = useRoute()
const catchStore = useCatchStore(); const catchStore = useCatchStore();
@ -465,7 +489,7 @@ const addRules = {
repeatt: [{required: true, message: '请选择是否重复件', trigger: 'change'}], repeatt: [{required: true, message: '请选择是否重复件', trigger: 'change'}],
// leadApproval: [{required: true, message: '', trigger: 'change'}], // leadApproval: [{required: true, message: '', trigger: 'change'}],
// tags: [{required: true, message: '', trigger: 'change'}], // tags: [{required: true, message: '', trigger: 'change'}],
handleMethod: [{required: true, message: '请选择办理方式', trigger: 'change'}], // handleMethod: [{required: true, message: '', trigger: 'change'}],
} }
watch( watch(
() => addForm.value.sourcePath, () => addForm.value.sourcePath,
@ -528,6 +552,8 @@ const handleUpdate = async (row) => {
// //
involveProblemIdList: splitToArray(r.involveProblemIdList ?? r.involveProblem), involveProblemIdList: splitToArray(r.involveProblemIdList ?? r.involveProblem),
tags: splitToArray(r.tags ?? r.tag), tags: splitToArray(r.tags ?? r.tag),
businessTypeName: r.businessTypeName ?? '',
businessTypeCode: r.businessTypeCode ?? '',
}; };
updateShow.value = true updateShow.value = true
} }
@ -542,6 +568,7 @@ const submitUpdate = async () => {
getList() getList()
} }
} }
function splitToArray(val) { function splitToArray(val) {
if (!val) return [] if (!val) return []
if (Array.isArray(val)) return val if (Array.isArray(val)) return val
@ -598,30 +625,34 @@ const localDict = {
{ {
id: 1, id: 1,
label: "局长信箱", label: "局长信箱",
value: "data_mailbox", value: "23",
children: [ children: [
{ {
label: "局长信箱", label: "局长信箱",
value: "data_mailbox_jz", value: "23_jz",
}, },
{ {
label: "厅长信箱", label: "厅长信箱",
value: "data_mailbox_tz", value: "23_tz",
}, },
], ],
}, },
{ {
id: 2, id: 2,
label: "公安部信访", label: "公安部信访",
value: "data_petition_complaint_21", value: "22",
children: [ children: [
{ {
label: "公安部信访子1", label: "公安部信访件",
value: "data_petition_complaint_21_1", value: "22_1",
},
{
label: "省厅信访件",
value: "22_2",
}, },
{ {
label: "公安部信访子2", label: "市局信访件",
value: "data_petition_complaint_21_2", value: "22_3",
}, },
], ],
@ -629,30 +660,38 @@ const localDict = {
{ {
id: 3, id: 3,
label: "国家信访", label: "国家信访",
value: "data_petition_complaint_22", value: "21",
children: [ children: [
{ {
label: "国家信访子1", label: "国家信访件",
value: "data_petition_complaint_22_1", value: "21_1",
},
{
label: "省信访件",
value: "21_2",
}, },
{ {
label: "国家信访子2", label: "市信访件",
value: "data_petition_complaint_22_2", value: "21_3",
}, },
], ],
}, },
{ {
id: 4, id: 4,
label: "12389投诉", label: "12389投诉",
value: "data_case_verif", value: "17",
children: [ children: [
{ {
label: "12389投诉子1", label: "公安部件",
value: "data_case_verif1", value: "17_1",
}, },
{ {
label: "12389投诉子2", label: "省厅件",
value: "data_case_verif2", value: "17_2",
},
{
label: "市局件",
value: "17_3",
}, },
], ],
}, },
@ -662,12 +701,16 @@ const localDict = {
value: "leader_explain", value: "leader_explain",
children: [ children: [
{ {
label: "领导交办子1", label: "市局领导交办",
value: "leader_explain1", value: "18",
},
{
label: "支队领导交办",
value: "19",
}, },
{ {
label: "领导交办子2", label: "上级领导交办",
value: "leader_explain2", value: "20",
}, },
], ],
}, },
@ -712,6 +755,9 @@ function getDictLabel(list, value) {
// endregion // endregion
// region // region
const negativeVerifySfssDailog = ref(false)
const submitLoading = ref(false)
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
// //
const handleAction = async (row) => { const handleAction = async (row) => {
negativeSfss.value.currentRow = JSON.parse(JSON.stringify(row)) negativeSfss.value.currentRow = JSON.parse(JSON.stringify(row))
@ -721,25 +767,30 @@ const handleAction = async (row) => {
const negativeVerifySfssRef = ref(); const negativeVerifySfssRef = ref();
// //
const handleSubmit = async () => { const handleSubmit = async () => {
if (submitLoading.value) return
submitLoading.value = true
await nextTick();
try { try {
// 1. +
// const formData = await negativeVerifySfssRef.value.validate(); // const formData = await negativeVerifySfssRef.value.validate();
const formData = negativeVerifySfssRef.value.getData() const formData = negativeVerifySfssRef.value.getData()
console.log(formData) console.log(formData)
// 2. await sleep(3000);
// await submitApi(formData); let res = await addComplaintCollectionBlame(formData);
feedback.msgSuccess("提交成功"); feedback.msgSuccess("提交成功");
// dialogVisible.value = false; negativeVerifySfssDailog.value = false;
getList();
} catch (err) { } catch (err) {
// validate() throw new Error(...)
feedback.notifyError("提交失败") feedback.notifyError("提交失败")
} finally {
submitLoading.value = false
} }
} }
const negativeVerifySfssDailog = ref(false)
const negativeSfss = ref({ const negativeSfss = ref({
currentRow: {}, currentRow: {},
problemSourcesCode: ProblemSources.GJXFPT, // problemSourcesCode: ProblemSources.GJXFPT,
// //
blames: [], blames: [],
// //
@ -750,6 +801,16 @@ const negativeSfss = ref({
provide('negative', negativeSfss) provide('negative', negativeSfss)
// endregion // endregion
// region
const detailShow = ref(false)
const activeId = ref("")
const handleWatchDetail = async (row) => {
activeId.value = row.id
detailShow.value = true
}
// endregion
</script> </script>
@ -787,4 +848,11 @@ p {
margin-right: 0; margin-right: 0;
} }
.dialog-footer {
display: flex;
justify-content: flex-end; /* 右下角 */
padding: 0 24px 16px; /* 👈 关键:不贴边 */
}
</style> </style>
Loading…
Cancel
Save