Compare commits

..

No commits in common. '60140e6b40da57b95eea2b9103d85d9ed8b113b5' and '8fdcd76407a82145e14960cef84ba64d97eea311' have entirely different histories.

  1. 12
      src/api/data/complaintCollection.ts
  2. 76
      src/components/negative/verify-sfss.vue
  3. 226
      src/views/data/ComplaintCollection.vue

12
src/api/data/complaintCollection.ts

@ -105,14 +105,4 @@ export async function exportData(body) {
document.body.removeChild(a) document.body.removeChild(a)
window.URL.revokeObjectURL(url) window.URL.revokeObjectURL(url)
} }
/**
* / JSON
*/
export function saveInvolveJson(body) {
return request.post({
url: `/data/complaintCollection/saveInvolveJson`,
body
});
}

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

@ -83,6 +83,10 @@
</div> </div>
</div> </div>
<!-- <div v-if="currentRow.reportFile?.length">-->
<!-- <div class="text-primary mt-10 mb-10">督察报告附件</div>-->
<!-- <file-list :files="currentRow.reportFile"/>-->
<!-- </div>-->
<div v-if="currentRow.thingFiles?.length"> <div v-if="currentRow.thingFiles?.length">
<div class="text-primary mt-10 mb-10">附件</div> <div class="text-primary mt-10 mb-10">附件</div>
@ -255,21 +259,6 @@
:autosize="{ minRows: 4 }" :autosize="{ minRows: 4 }"
/> />
</el-form-item> </el-form-item>
<el-form-item
prop="files"
label-position="top"
>
<template #label>
<h5 class="inline-block mb-0" style="text-align: left">佐证材料</h5>
</template>
<div style="width: 100%" class="mb-10 mt-10">
<file-upload-group
v-model:files="form.files"
:problemSourcesCode="negative.problemSourcesCode"
/>
</div>
<file-list v-model:files="form.files" :removeEnable="true"/>
</el-form-item>
<template <template
v-if=" v-if="
negative.problemSourcesCode === ProblemSources.GJXFPT || negative.problemSourcesCode === ProblemSources.GJXFPT ||
@ -615,6 +604,7 @@
}" }"
> >
<el-radio-group <el-radio-group
:disabled="true"
v-model="item.ivPersonTypeCode" v-model="item.ivPersonTypeCode"
@change=" @change="
(val) => (val) =>
@ -1563,6 +1553,21 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item
prop="files"
label-position="top"
>
<template #label>
<h5 class="inline-block mb-0" style="text-align: left">佐证材料</h5>
</template>
<div style="width: 100%" class="mb-10 mt-10">
<file-upload-group
v-model:files="form.files"
:problemSourcesCode="negative.problemSourcesCode"
/>
</div>
<file-list v-model:files="form.files" :removeEnable="true" />
</el-form-item>
</el-form> </el-form>
</template> </template>
@ -1661,29 +1666,11 @@ const problemIsTrue = computed(() => {
return form.value.checkStatusCode === '1' || form.value.checkStatusCode === '2' || form.value.checkStatusCode === '3'; return form.value.checkStatusCode === '1' || form.value.checkStatusCode === '2' || form.value.checkStatusCode === '3';
}); });
getFormData();
// complaintId currentRow.id watch(negative, () => {
watch( getFormData();
() => negative?.value?.currentRow?.id, });
(id) => {
if (id) getFormData()
},
{immediate: true}
)
// <script setup>
watch(
problemIsTrue,
(now, prev) => {
//
if (prev === true && now === false) {
//
form.value.blames = []
form.value.blameLeaders = []
}
},
{ immediate: true }
)
async function getFormData() { async function getFormData() {
const row = negative.value?.currentRow ?? {} const row = negative.value?.currentRow ?? {}
@ -1703,9 +1690,9 @@ async function getFormData() {
rectifyRestrictionDays: negative.value.rectifyRestrictionDays, rectifyRestrictionDays: negative.value.rectifyRestrictionDays,
accountabilityTarget: negative.value.accountabilityTarget, accountabilityTarget: negative.value.accountabilityTarget,
unrectifyReason: negative.value.unrectifyReason, unrectifyReason: negative.value.unrectifyReason,
blames: JSON.parse(JSON.stringify(negative.value.blames || [])), blames: negative.value.blames,
blameLeaders: JSON.parse(JSON.stringify(negative.value.blameLeaders || [])), blameLeaders: negative.value.blameLeaders,
files: JSON.parse(JSON.stringify(negative.value.files || [])), files: negative.value.files || [],
handlePolices: handlePolices:
!negative.value.handlePolices || negative.value.handlePolices.length === 0 !negative.value.handlePolices || negative.value.handlePolices.length === 0
? [{}] ? [{}]
@ -1719,8 +1706,6 @@ async function getFormData() {
handleResult12337: negative.value.handleResult12337, handleResult12337: negative.value.handleResult12337,
handleResult12337Group: negative.value.handleResult12337Group, handleResult12337Group: negative.value.handleResult12337Group,
verifiedIsLeader: negative.value.verifiedIsLeader, verifiedIsLeader: negative.value.verifiedIsLeader,
completionStatus: String(negative.value?.completionStatus ?? row?.completionStatus ?? ''),
publicRecognition: String(negative.value?.publicRecognition ?? row?.publicRecognition ?? ''),
}; };
if (negative.value.blames) { if (negative.value.blames) {
negative.value.blames.forEach((item) => { negative.value.blames.forEach((item) => {
@ -1994,7 +1979,7 @@ function getDictLabel(list: any[] = [], value: any) {
function getData() { function getData() {
return JSON.parse(JSON.stringify(toRaw(form.value))) return form.value;
} }
@ -2014,6 +1999,11 @@ defineExpose({
getData, getData,
}); });
</script> </script>
<style>
.widthClass {
min-width: 50% !important;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-item .el-form-item { .el-form-item .el-form-item {
margin-bottom: 18px; margin-bottom: 18px;

226
src/views/data/ComplaintCollection.vue

@ -67,33 +67,23 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="办理状态"> <el-form-item label="办理情况">
<el-select <el-select
v-model="query.status" v-model="query.xxx"
clearable :disabled="true"
placeholder="办理状态"
> >
<el-option value="0" label="未办理"/> <el-option value="-1" label="全部"/>
<el-option value="1" label="已办理"/> <el-option value="0" label="自办"/>
<el-option value="1" label="下发"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="标签"> <el-form-item label="办结时间">
<el-select <date-time-range-picker-ext
placeholder="全部" v-model="query.xxxxTime"
clearable :disabled="true"
v-model="query.tags" />
multiple
collapse-tags
>
<el-option
v-for="item in dict.sfssTags"
:key="item.id"
:value="item.dictValue"
:label="item.dictLabel"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -120,10 +110,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="核查结论" > <el-form-item label="标签">
<el-select v-model="query.checkStatusList" clearable multiple <el-select
style="width: 280px"> placeholder="全部"
<el-option v-for="item in dict.checkStatus" :value="item.dictValue" :label="item.dictLabel"></el-option> clearable
v-model="query.tags"
multiple
collapse-tags
>
<el-option
v-for="item in dict.sfssTags"
:key="item.id"
:value="item.dictValue"
:label="item.dictLabel"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -144,9 +144,73 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="核查结论">-->
<!-- <el-select-->
<!-- v-model="query.xxx"-->
<!-- :disabled="true"-->
<!-- >-->
<!-- <el-option value="-1" label="全部"/>-->
<!-- <el-option value="0" label="否"/>-->
<!-- <el-option value="1" label="是"/>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="涉及对象">-->
<!-- <el-select-->
<!-- v-model="query.xxx"-->
<!-- :disabled="true"-->
<!-- >-->
<!-- <el-option value="-1" label="全部"/>-->
<!-- <el-option value="0" label="否"/>-->
<!-- <el-option value="1" label="是"/>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="问题核查情况">-->
<!-- <el-input-->
<!-- placeholder="请输入问题核查情况"-->
<!-- v-model="query.xxx"-->
<!-- clearable-->
<!-- :disabled="true"-->
<!-- style="width: 200px"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="涉及人员姓名">-->
<!-- <el-input-->
<!-- placeholder="请输入涉及人员姓名"-->
<!-- v-model="query.xxx"-->
<!-- clearable-->
<!-- :disabled="true"-->
<!-- style="width: 200px"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="涉及人员姓名">-->
<!-- <el-input-->
<!-- placeholder="请输入涉及人员姓名"-->
<!-- v-model="query.xxx"-->
<!-- clearable-->
<!-- :disabled="true"-->
<!-- style="width: 200px"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form> </el-form>
<div class="mb-25 flex between"> <div class="mb-25 flex between">
<div> <div>
<!-- <el-button type="primary" @click="show = true"-->
<!-- >数据导入-->
<!-- </el-button>-->
<el-button type="primary" @click="add()">添加</el-button> <el-button type="primary" @click="add()">添加</el-button>
<el-button type="primary" @click="handleExport">数据导出</el-button> <el-button type="primary" @click="handleExport">数据导出</el-button>
</div> </div>
@ -162,7 +226,7 @@
</div> </div>
</header> </header>
<div class="table-container" v-loading="loading"> <div class="table-container" v-loading="loading">
<el-table :data="list" @click="onHeaderDblClick"> <el-table :data="list">
<el-table-column type="expand" v-if="false"> <el-table-column type="expand" v-if="false">
<template #default="{ row }"> <template #default="{ row }">
<div class="row mt-10"> <div class="row mt-10">
@ -246,11 +310,6 @@
<el-table-column label="办理情况" width="100" prop="xxx" v-if="false"/> <el-table-column label="办理情况" width="100" prop="xxx" v-if="false"/>
<el-table-column label="业务类别" width="100" prop="businessTypeName"/> <el-table-column label="业务类别" width="100" prop="businessTypeName"/>
<el-table-column label="业务类别Code" width="100" prop="businessTypeCode" v-if="false"/> <el-table-column label="业务类别Code" width="100" prop="businessTypeCode" v-if="false"/>
<el-table-column label="核查结论" width="140" prop="checkStatus" show-overflow-tooltip>
<template #default="{ row }">
{{ getDictLabel(dict.checkStatus, row.checkStatus) }}
</template>
</el-table-column>
<el-table-column label="状态" prop="status" width="100"> <el-table-column label="状态" prop="status" width="100">
<template #default="{ row }"> <template #default="{ row }">
<span :style="row.status === '0' ? 'color: red' : ''"> <span :style="row.status === '0' ? 'color: red' : ''">
@ -335,9 +394,6 @@
<el-button @click="negativeVerifySfssDailog = false">取消</el-button> <el-button @click="negativeVerifySfssDailog = false">取消</el-button>
<el-button type="primary" @click="handleSubmit" :loading="submitLoading" :disabled="submitLoading">提交 <el-button type="primary" @click="handleSubmit" :loading="submitLoading" :disabled="submitLoading">提交
</el-button> </el-button>
<el-button type="primary" @click="handleSaveInvolve" :loading="saveLoading">
临时保存
</el-button>
</div> </div>
</template> </template>
@ -360,7 +416,7 @@ import useCatchStore from "@/stores/modules/catch";
import { import {
addComplaintCollection, addComplaintCollectionBlame, addComplaintCollection, addComplaintCollectionBlame,
delComplaintCollection, exportData, delComplaintCollection, exportData,
getComplaintCollectionPage, handlerData, saveInvolveJson, getComplaintCollectionPage, handlerData,
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";
@ -760,29 +816,10 @@ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const handleAction = async (row) => { const handleAction = async (row) => {
submitLoading.value = true submitLoading.value = true
try { try {
// 1 //
negativeSfss.value.currentRow = JSON.parse(JSON.stringify(row)) negativeSfss.value.currentRow = JSON.parse(JSON.stringify(row))
const res = await handlerData({id: row.id})
// 2 Object.assign(negativeSfss.value, res?.data ?? res)
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 negativeVerifySfssDailog.value = true
} catch (e) { } catch (e) {
console.error("加载办理数据失败", e) console.error("加载办理数据失败", e)
@ -812,54 +849,6 @@ const handleSubmit = async () => {
submitLoading.value = false submitLoading.value = false
} }
} }
//
const saveLoading = ref(false)
const handleSaveInvolve = async () => {
if (saveLoading.value) return
saveLoading.value = true
try {
// el-input / el-select / model
await nextTick()
//
const formData = negativeVerifySfssRef.value.getData()
// + Proxy/
const plain = JSON.parse(JSON.stringify(toRaw(formData)))
const payload = {
blames: plain.blames || [],
blameLeaders: plain.blameLeaders || [],
files: plain.files || [],
}
await saveInvolveJson({
complaintId: plain.complaintId,
//
checkStatusCode: plain.checkStatusCode,
checkStatusName: plain.checkStatusName,
checkStatusDesc: plain.checkStatusDesc,
accountabilityTarget: plain.accountabilityTarget,
involveDepartId: plain.involveDepartId,
involveDepartName: plain.involveDepartName,
completionStatus: plain.completionStatus,
publicRecognition: plain.publicRecognition,
caseNumber: plain.caseNumber,
// JSON
involveJson: JSON.stringify(payload),
})
feedback.msgSuccess("操作成功")
negativeVerifySfssDailog.value = false
getList()
} catch (e) {
console.error(e)
feedback.notifyError("操作失败")
} finally {
saveLoading.value = false
}
}
const negativeSfss = ref({ const negativeSfss = ref({
@ -873,18 +862,6 @@ const negativeSfss = ref({
handlePolices: [{}], handlePolices: [{}],
}); });
provide('negative', negativeSfss) provide('negative', negativeSfss)
watch(negativeVerifySfssDailog, (open) => {
if (!open) {
negativeSfss.value = {
currentRow: {},
blames: [],
blameLeaders: [],
handlePolices: [{}],
files: [],
}
}
})
// endregion // endregion
@ -897,15 +874,6 @@ const handleWatchDetail = async (row) => {
} }
// endregion // endregion
// region
const onHeaderDblClick = () => {
const rows = JSON.parse(JSON.stringify(toRaw(list.value || [])))
console.groupCollapsed(`[DEBUG] list 全量(${rows.length}条)`)
console.log('raw:', rows)
console.groupEnd()
}
// endregion
// region // region
const handleExport = async () => { const handleExport = async () => {
let body = { let body = {
@ -913,10 +881,14 @@ const handleExport = async () => {
} }
await exportData(body); await exportData(body);
} }
// endregion
</script> </script>
<style>
.widthClass {
min-width: 50% !important;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-item .el-form-item { .el-form-item .el-form-item {

Loading…
Cancel
Save