Browse Source

fix--删除不必要的代码

feature/tsjb-1.0
buaixuexideshitongxue 4 weeks ago
parent
commit
35c2e9338e
  1. 25
      src/api/data/complaintCollection.ts
  2. 6
      src/components/data/complaint_detail.vue
  3. 360
      src/components/data/complaintdes.vue
  4. 266
      src/components/data/complaintproblemInfo.vue
  5. 65
      src/views/data/ComplaintCollection.vue

25
src/api/data/complaintCollection.ts

@ -32,12 +32,6 @@ export function updateComplaintCollection(body) {
}); });
} }
export function addComplaintCollectionBlame(body) {
return request.post({
url: `/data/complaintCollection/addComplaintCollectionBlame`,
body
});
}
export function watchDetail(body) { export function watchDetail(body) {
@ -57,16 +51,6 @@ export function maileRepeatt(body) {
}); });
} }
/**
*
*/
export function handlerData(body) {
return request.post({
url: `/data/complaintCollection/handlerData`,
body
});
}
/** /**
* *
@ -117,15 +101,6 @@ export function saveInvolveJson(body) {
}); });
} }
/**
* --
*/
export function forceTermination(body) {
return request.post({
url: `/data/complaintCollection/forceTermination`,
body
});
}
/** /**
* *

6
src/components/data/complaint_detail.vue

@ -3,11 +3,11 @@
<div style="min-height: 50vh" v-loading="loading"> <div style="min-height: 50vh" v-loading="loading">
<div class="row" style="margin: 0 60px"> <div class="row" style="margin: 0 60px">
<div class="col col-24"> <div class="col col-24">
<complaint-problem-info :data="base" :dict="dict" /> <!-- <complaint-problem-info :data="base" :dict="dict" />-->
</div> </div>
<div class="col col-24"> <div class="col col-24">
<complaintdes :data="base" :dict="dict" /> <!-- <complaintdes :data="base" :dict="dict" />-->
</div> </div>
</div> </div>
</div> </div>
@ -24,8 +24,6 @@
import {computed, ref, watch} from "vue"; import {computed, ref, watch} from "vue";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
import {watchDetail} from "@/api/data/complaintCollection.ts"; import {watchDetail} from "@/api/data/complaintCollection.ts";
import ComplaintProblemInfo from "@/components/data/complaintproblemInfo.vue";
import Complaintdes from "@/components/data/complaintdes.vue";
const props = defineProps({ const props = defineProps({
modelValue: { type: Boolean, default: false }, modelValue: { type: Boolean, default: false },

360
src/components/data/complaintdes.vue

@ -1,360 +0,0 @@
<template>
<el-collapse v-model="activeNames" class="detail-collapse">
<!-- ================== 核查办理 ================== -->
<el-collapse-item name="verify">
<template #title>
<span class="collapse-title">核查情况</span>
</template>
<div>
<div class="row">
<div class="col col-12">
<label>涉及案件/警情编号</label>
<span>{{ data.caseNumber || "/" }}</span>
</div>
<div class="col col-12">
<label>涉及举报对象</label>
<span>{{ getDictLabel(dict?.accountabilityTarget, data.accountabilityTarget) }}</span>
</div>
<div class="col col-12">
<label>核查结论</label>
<span>{{ data.checkStatusName || "/" }}</span>
</div>
<div class="col col-12">
<label>涉及单位</label>
<span>{{ data.involveDepartName || "/" }}</span>
</div>
<div class="col col-12">
<label>办结情况</label>
<span>
{{
data.completionStatus === "1"
? "程序办结"
: data.completionStatus === "2"
? "已解决合理诉求"
: "/"
}}
</span>
</div>
<div class="col col-12">
<label>群众认可</label>
<span>
{{
data.publicRecognition === "1"
? "认可"
: data.publicRecognition === "2"
? "不认可"
: data.publicRecognition === "3"
? "不接电话"
: "/"
}}
</span>
</div>
</div>
<div class="col col-24">
<label>问题核查情况</label>
<span>{{ data.checkStatusDesc || "/" }}</span>
</div>
</div>
</el-collapse-item>
<!-- ================== 涉及单位 ================== -->
<template v-if="personalBlames.length">
<el-collapse-item
v-for="(item, index) in personalBlames.filter(
(item) => item.type === BlameType.DEPARTMENT
)"
:key="item.id || index"
title="涉及单位"
:name="`dept${index}`"
>
<div class="row">
<div class="col col-6">
<label>班子成员姓名</label>
<span>{{ item.blameName || "/" }}</span>
</div>
<div class="col col-6">
<label>身份证号码</label>
<span>{{ item.blameIdCode || "/" }}</span>
</div>
<div class="col col-6">
<label>人员属性</label>
<span>{{ item.ivPersonTypeName || item.ivPersonType || "/" }}</span>
</div>
</div>
<div
class="row"
v-for="(problem, index) in item.problems"
:key="index"
>
<div class="col col-24">
<label>问题类型{{ index + 1 }}</label>
<span
>{{ problem.oneLevelContent || "/" }} /
{{ problem.twoLevelContent || "/" }} /
{{ problem.threeLevelContent || "/" }}
{{ problem.threeLevelContent === '其他' && problem.threeLevelContentOther ? `(${problem.threeLevelContentOther})` : ''}}
</span
>
</div>
</div>
<div class="row">
<div class="col col-6" v-if="item.subjectiveAspectName">
<label>主观方面</label>
<span>{{ item.subjectiveAspectName }}</span>
</div>
<div class="col col-6">
<label>责任类别</label>
<span>{{ item.responsibilityTypeName || "/" }}</span>
</div>
<div class="col col-6" v-if="item.handleResultName">
<label>处置结果</label>
<span>
<span>{{ item.handleResultName }}</span>
<span v-if="item.handleResultNameOther">({{ item.handleResultNameOther }})</span>
</span>
</div>
</div>
</el-collapse-item>
</template>
<el-collapse-item v-else name="dept">
<template #title>
<span class="collapse-title">涉及单位</span>
</template>
<div class="col col-24">
<span>/</span>
</div>
</el-collapse-item>
<!-- ================== 涉及人员 ================== -->
<template v-if="personalBlames.length">
<el-collapse-item
v-for="(item, index) in personalBlames.filter(
(item) => item.type === BlameType.PERSONAL
)"
:key="item.id || index"
:title="`涉及人员${index + 1}`"
:name="`involved${index}`"
>
<div class="row">
<div class="col col-6">
<label>涉及人员姓名</label>
<span>
<span>{{ item.blameName || "/" }}</span>
<span class="text-primary ml-10">{{ item.blameEmpNo || "/" }}</span>
</span>
</div>
<div class="col col-6">
<label>身份证</label>
<span>{{ item.blameIdCode || "/" }}</span>
</div>
<div class="col col-6">
<label>人员属性</label>
<span>{{ item.ivPersonTypeName || item.ivPersonType || "/" }}</span>
</div>
</div>
<div
class="row"
v-for="(problem, index) in item.problems"
:key="index"
>
<div class="col col-24">
<label>问题类型{{ index + 1 }}</label>
<span
>{{ problem.oneLevelContent || "/" }} /
{{ problem.twoLevelContent || "/" }} /
{{ problem.threeLevelContent || "/" }}
{{ problem.threeLevelContent === '其他' && problem.threeLevelContentOther ? `(${problem.threeLevelContentOther})` : ''}}
</span
>
</div>
</div>
<div class="row">
<div class="col col-6" v-if="item.responsibilityTypeName">
<label>责任类别</label>
<span>{{ item.responsibilityTypeName }}</span>
</div>
<div class="col col-6" v-if="item.subjectiveAspectName">
<label>主观方面</label>
<span>{{ item.subjectiveAspectName }}</span>
</div>
<div class="col col-6" v-if="item.handleResultName">
<label>处置结果</label>
<span>
<span>{{ item.handleResultName }}</span>
<span v-if="item.handleResultNameOther">({{ item.handleResultNameOther }})</span>
</span>
</div>
<div class="col col-6" v-if="item.protectRightsName">
<label>维权容错</label>
<span>{{ item.protectRightsName }}</span>
</div>
<div class="col col-6" v-if="item.superviseMeasuresName">
<label>督察措施</label>
<span>{{ item.superviseMeasuresName }}</span>
</div>
</div>
<div class="row">
<div class="col col-12" v-if="item.ConfinementData">
<label>禁闭时间</label>
<span >{{item.ConfinementData.startTime+ " - " + item.ConfinementData.endTime}}</span>
</div>
<div class="col col-4" v-if="item.ConfinementData">
<label>禁闭时长</label>
<span >{{item.ConfinementData.confinementTime}}</span>
</div>
<div class="col col-24" v-if="item.ConfinementData">
<label>禁闭措施</label>
<span>{{item.ConfinementData.matter}}</span>
</div>
</div>
<div class="row" style="background: #f5f5f5">
<div class="col col-6">
<label>涉及领导姓名</label>
<span v-if="item.leadName">{{ item.leadName }} {{ item.leadEmpNo }}</span>
<span v-else>/</span>
</div>
<div class="col col-6">
<label>身份证</label>
<span>{{ item.leadIdCode || "/" }}</span>
</div>
<div class="col col-6" v-if="item.leadResponsibilityTypeName">
<label>责任类别</label>
<span>{{ item.leadResponsibilityTypeName }}</span>
</div>
<div class="col col-6" v-if="item.leadMeasuresName">
<label>督察措施</label>
<span>{{ item.leadMeasuresName }}</span>
</div>
<div class="col col-6" v-if="item.leadHandleResultName">
<label>处置结果</label>
<span>
<span>{{ item.leadHandleResultName }}</span>
<span v-if="item.leadHandleResultNameOther">({{ item.leadHandleResultNameOther }})</span>
</span>
</div>
</div>
<div class="row" style="background: #f5f5f5" v-if="item.leadConfinement">
<div class="col col-12"v-if="item.leadConfinement" >
<label>禁闭时间</label>
<span >{{item.leadConfinement.startTime+ " - " + item.leadConfinement.endTime}}</span>
</div>
<div class="col col-4" v-if="item.leadConfinement">
<label>禁闭时长</label>
<span >{{item.leadConfinement.confinementTime}}</span>
</div>
<div class="col col-24" v-if="item.leadConfinement">
<label>禁闭措施</label>
<span>{{item.leadConfinement.matter}}</span>
</div>
</div>
<div class="row" style="background: #f5f5f5">
<div class="col col-6" v-if="item.leadProtectRightsName">
<label>维权容错</label>
<span>{{ item.leadProtectRightsName }}</span>
</div>
</div>
</el-collapse-item>
</template>
<!-- ================== 办结佐证材料 ================== -->
<el-collapse-item name="attachments" v-if="fileCount > 0">
<template #title>
<div class="title-with-count">
<span class="collapse-title">办结佐证材料</span>
<span class="count">{{ fileCount }}个附件</span>
</div>
</template>
<div>
<file-list :files="data.files" />
</div>
</el-collapse-item>
</el-collapse>
</template>
<script setup>
import { computed, ref, watchEffect } from "vue";
import {BlameType} from "@/enums/dictEnums.ts";
const props = defineProps({
data: {
type: Object,
required: true,
},
dict: {
type: Object,
default: () => ({}),
},
});
function getDictLabel(list, value) {
if (!Array.isArray(list) || value === null || value === undefined || value === "") return "/";
const item = list.find((d) => d.dictValue == value);
return item?.dictLabel || "/";
}
const personalBlames = computed(() => props.data?.personalBlames || []);
const deptBlames = computed(() => personalBlames.value.filter((item) => item.type === BlameType.DEPARTMENT));
const fileCount = computed(() => props.data?.files?.length ?? 0);
/**
* 默认展开哪些面板
* - attachments 只有在存在附件时才显示/展开
*/
const activeNames = ref(["verify"]);
watchEffect(() => {
// activeNames
let newActiveNames = ["verify"];
//
for (let i = 0; i < personalBlames.value.length; i++) {
newActiveNames.push("involved" + i);
}
//
if (deptBlames.value.length > 0) {
newActiveNames.push("dept0");
}
//
if (fileCount.value > 0) {
newActiveNames.push("attachments");
}
activeNames.value = newActiveNames;
});
</script>
<style scoped>
/* 让折叠头部更接近你截图:蓝色标题 + 右侧箭头(箭头 element-plus 自带) */
.detail-collapse {
--el-collapse-header-text-color: var(--primary-color);
--el-collapse-header-font-size: 16px;
}
.collapse-title {
font-weight: 600;
}
.title-with-count {
display: flex;
align-items: center;
gap: 8px;
}
.count {
font-size: 12px;
color: #666;
}
</style>

266
src/components/data/complaintproblemInfo.vue

@ -1,266 +0,0 @@
<template>
<div class="info-container">
<h3>问题信息</h3>
<div class="row">
<div class="col col-12">
<label>来源</label>
<span>{{ sourcePathText }}</span>
</div>
<div class="col col-12">
<label>业务类型</label>
<span>{{ getDictLabel(dict?.businessType, data.businessTypeCode) }}</span>
</div>
<div class="col col-12">
<label>编号</label>
<span>{{ data.originId || "/" }}</span>
</div>
<div class="col col-12">
<label>登记/受理时间</label>
<span>{{ formatTime(data.discoveryTime) }}</span>
</div>
<div class="col col-12">
<label>来件人姓名</label>
<span>{{ data.responderName || "/" }}</span>
</div>
<div class="col col-12">
<label>身份证号码</label>
<span>{{ data.responderIdCode || "/" }}</span>
</div>
<div class="col col-12">
<label>联系电话</label>
<span>{{ data.responderPhone || "/" }}</span>
</div>
<div class="col col-12">
<label>涉及二级机构</label>
<span>{{ data.secondDepartName || "/" }}</span>
</div>
<div class="col col-24">
<label>来件内容</label>
<span>{{ data.thingDesc || "/" }}</span>
</div>
<div class="col col-12">
<label>涉嫌问题</label>
<span>{{ suspectProblemText }}</span>
</div>
<div class="col col-12">
<label>是否重复件</label>
<div class="inline-actions">
<span>{{ getDictLabel(dict?.yesNo, data.repeatt) }}</span>
<el-button
v-if="String(data.repeatt) === '1'"
class="repeat-btn"
type="primary"
link
@click="onRepeatClick"
>
查看
</el-button>
</div>
</div>
<div class="col col-12">
<label>标签</label>
<span>{{ tagText }}</span>
</div>
<div class="col col-24">
<label>办理方式</label>
<span>{{ getDictLabel(dict?.handleMethodType, data.handleMethod) }}</span>
</div>
</div>
<div v-if="data.thingFiles?.length">
<div class="text-primary mt-10 mb-10">附件</div>
<file-list :files="data.thingFiles" />
</div>
</div>
<DuplicateDrawerWithDetail
v-model="duplicateDrawerVisible"
:dict="dict"
:query="{
responderIdCode: data.responderIdCode,
responderName: data.responderName,
responderPhone: data.responderPhone
}"
:requestFn="maileRepeatt"
detailIdKey="complaintId"
:excludeId="data.id"
/>
</template>
<script setup>
import { computed } from "vue";
import dayjs from "dayjs";
import { ElMessage } from "element-plus";
import DuplicateDrawerWithDetail from "@/views/data/DuplicateDrawerWithDetail.vue";
import {maileRepeatt} from "@/api/data/complaintCollection.ts";
const props = defineProps({
data: { type: Object, default: () => ({}) }, // base
dict: { type: Object, default: () => ({}) },
});
const data = computed(() => props.data || {});
const dict = computed(() => props.dict || {});
function formatTime(v) {
return v ? dayjs(v).format("YYYY-MM-DD HH:mm:ss") : "/";
}
/** 兼容:单值/数组/逗号串 */
function getDictLabel(list, value) {
if (!Array.isArray(list)) return "/";
if (value === null || value === undefined || value === "") return "/";
const values = Array.isArray(value)
? value
: typeof value === "string" && value.includes(",")
? value.split(",").map((v) => v.trim())
: [value];
const labels = values
.map((v) => list.find((d) => d.dictValue == v)?.dictLabel)
.filter(Boolean);
return labels.length ? labels.join(",") : "/";
}
/** 来源展示:sourceTablePath 优先,其次 sourcePath */
const sourcePathText = computed(() => {
if (data.value?.sourceTablePath) return data.value.sourceTablePath;
if (Array.isArray(data.value?.sourcePath) && data.value.sourcePath.length) {
return data.value.sourcePath.join(" / ");
}
return "/";
});
/** 涉嫌问题:involveProblemStr 优先,否则 involveProblemIdList -> dict.suspectProblem */
const suspectProblemText = computed(() => {
if (data.value?.involveProblemStr) return data.value.involveProblemStr;
const ids = data.value?.involveProblemIdList;
if (!Array.isArray(ids) || !ids.length) return "/";
const labels = ids
.map((v) => getDictLabel(dict.value?.suspectProblem, v))
.filter((x) => x && x !== "/");
return labels.length ? labels.join(",") : "/";
});
/** 标签:按你原 info-container:base.tag 逗号拆分 -> dict.sfssTags */
const tagText = computed(() => {
const v = data.value?.tag;
if (!v) return "/";
return String(v)
.split(",")
.map((x) => getDictLabel(dict.value?.sfssTags, x))
.filter((x) => x && x !== "/")
.join(",") || "/";
});
const duplicateDrawerVisible = ref(false);
const onRepeatClick = () => {
duplicateDrawerVisible.value = true;
};
</script>
<style scoped>
/* 沿用你原来的 info-container 样式 */
.info-container {
border: 1px solid #eee;
background: #fafcff;
padding: 12px 16px;
border-radius: 6px;
margin-bottom: 12px;
}
.info-container h3 {
margin-top: 0;
margin-bottom: 12px;
font-size: 16px;
font-weight: 600;
}
.row {
display: flex;
flex-wrap: wrap;
gap: 10px 0;
}
.col {
display: flex;
gap: 8px;
line-height: 22px;
}
.col-12 {
width: 50%;
}
.col-24 {
width: 100%;
}
label {
width: 120px;
color: #666;
flex: 0 0 auto;
}
span {
color: #222;
flex: 1 1 auto;
word-break: break-word;
}
.col-24 span {
text-align: justify;
text-align-last: left;
line-height: 1.6;
}
.text-primary {
color: #409eff;
font-weight: 500;
}
.mt-10 {
margin-top: 10px;
}
.mb-10 {
margin-bottom: 10px;
}
.inline-actions {
display: inline-flex;
align-items: center;
gap: 8px;
flex: 0 0 auto;
}
.repeat-btn {
padding: 0; /* link 按钮默认就很轻,这行是让它更像文字 */
}
</style>

65
src/views/data/ComplaintCollection.vue

@ -352,7 +352,7 @@
> >
<el-button type="primary" v-if="row.status === '0'" 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" v-if="row.status === '0'" 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' || row.status === '2'" link @click="handleWatchDetail(row)">查看详情</el-button> <!-- <el-button type="primary" v-if="row.status === '1' || row.status === '2'" link @click="handleWatchDetail(row)">查看详情</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -392,29 +392,6 @@
@submit="submitUpdate" @submit="submitUpdate"
/> />
<!-- 办理 -->
<el-dialog
v-model="negativeVerifySfssDailog"
title="办理情况"
width="80vw"
top="5vh"
destroy-on-close
>
<div v-loading="submitLoading" element-loading-text="请稍等...">
<negative-verify-sfss ref="negativeVerifySfssRef" :extraDict="dict"/>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="negativeVerifySfssDailog = false">取消</el-button>
<el-button type="primary" @click="handleSubmit" :loading="submitLoading" :disabled="submitLoading">办结
</el-button>
<el-button type="primary" @click="handleSaveInvolve" :loading="saveLoading">临时保存</el-button>
<el-button type="danger" @click="forceTerminationFun" :loading="forceTerminationLoading">强制终结</el-button>
</div>
</template>
</el-dialog>
<!-- 查看详情 --> <!-- 查看详情 -->
<complaint_detail <complaint_detail
width="80vw" width="80vw"
@ -438,9 +415,9 @@ 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, addComplaintCollectionBlame, addComplaintCollection,
delComplaintCollection, exportData, forceTermination, delComplaintCollection, exportData,
getComplaintCollectionPage, handlerData, saveInvolveJson, getComplaintCollectionPage, saveInvolveJson,
updateComplaintCollection updateComplaintCollection
} from "@/api/data/complaintCollection.ts"; } from "@/api/data/complaintCollection.ts";
import Complaint_detail from "@/components/data/complaint_detail.vue"; import Complaint_detail from "@/components/data/complaint_detail.vue";
@ -773,40 +750,6 @@ function getDictLabel(list, value) {
const negativeVerifySfssDailog = ref(false) const negativeVerifySfssDailog = ref(false)
const submitLoading = ref(false) const submitLoading = ref(false)
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
//
const handleAction = async (row) => {
submitLoading.value = true
try {
// 1
negativeSfss.value.currentRow = JSON.parse(JSON.stringify(row))
// 2
const res = await handlerData({ id: row.id })
const data = res?.data ?? res ?? {}
// 3 involveJson
let involveObj = {}
if (data.involveJson) {
try {
involveObj = JSON.parse(data.involveJson)
} catch (e) {
console.error("involveJson 解析失败", e)
}
}
// 4 negative🔥
Object.assign(negativeSfss.value, {
...data,
...involveObj, // blames / blameLeaders / handlePolices
})
negativeVerifySfssDailog.value = true
} catch (e) {
console.error("加载办理数据失败", e)
} finally {
submitLoading.value = false
}
}
const negativeVerifySfssRef = ref(); const negativeVerifySfssRef = ref();
// //

Loading…
Cancel
Save