Compare commits

..

5 Commits

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

10
src/api/data/complaintCollection.ts

@ -106,3 +106,13 @@ export async function exportData(body) {
document.body.removeChild(a)
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,10 +83,6 @@
</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 class="text-primary mt-10 mb-10">附件</div>
@ -259,6 +255,21 @@
:autosize="{ minRows: 4 }"
/>
</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
v-if="
negative.problemSourcesCode === ProblemSources.GJXFPT ||
@ -604,7 +615,6 @@
}"
>
<el-radio-group
:disabled="true"
v-model="item.ivPersonTypeCode"
@change="
(val) =>
@ -1553,21 +1563,6 @@
</div>
</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>
</template>
@ -1666,11 +1661,29 @@ const problemIsTrue = computed(() => {
return form.value.checkStatusCode === '1' || form.value.checkStatusCode === '2' || form.value.checkStatusCode === '3';
});
getFormData();
watch(negative, () => {
getFormData();
});
// complaintId currentRow.id
watch(
() => 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() {
const row = negative.value?.currentRow ?? {}
@ -1690,9 +1703,9 @@ async function getFormData() {
rectifyRestrictionDays: negative.value.rectifyRestrictionDays,
accountabilityTarget: negative.value.accountabilityTarget,
unrectifyReason: negative.value.unrectifyReason,
blames: negative.value.blames,
blameLeaders: negative.value.blameLeaders,
files: negative.value.files || [],
blames: JSON.parse(JSON.stringify(negative.value.blames || [])),
blameLeaders: JSON.parse(JSON.stringify(negative.value.blameLeaders || [])),
files: JSON.parse(JSON.stringify(negative.value.files || [])),
handlePolices:
!negative.value.handlePolices || negative.value.handlePolices.length === 0
? [{}]
@ -1706,6 +1719,8 @@ async function getFormData() {
handleResult12337: negative.value.handleResult12337,
handleResult12337Group: negative.value.handleResult12337Group,
verifiedIsLeader: negative.value.verifiedIsLeader,
completionStatus: String(negative.value?.completionStatus ?? row?.completionStatus ?? ''),
publicRecognition: String(negative.value?.publicRecognition ?? row?.publicRecognition ?? ''),
};
if (negative.value.blames) {
negative.value.blames.forEach((item) => {
@ -1979,7 +1994,7 @@ function getDictLabel(list: any[] = [], value: any) {
function getData() {
return form.value;
return JSON.parse(JSON.stringify(toRaw(form.value)))
}
@ -1999,11 +2014,6 @@ defineExpose({
getData,
});
</script>
<style>
.widthClass {
min-width: 50% !important;
}
</style>
<style lang="scss" scoped>
.el-form-item .el-form-item {
margin-bottom: 18px;

224
src/views/data/ComplaintCollection.vue

@ -67,23 +67,33 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="办理情况">
<el-form-item label="办理状态">
<el-select
v-model="query.xxx"
:disabled="true"
v-model="query.status"
clearable
placeholder="办理状态"
>
<el-option value="-1" label="全部"/>
<el-option value="0" label="自办"/>
<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="办结时间">
<date-time-range-picker-ext
v-model="query.xxxxTime"
:disabled="true"
<el-form-item label="标签">
<el-select
placeholder="全部"
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-form-item>
</el-col>
</el-row>
@ -110,20 +120,10 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="标签">
<el-select
placeholder="全部"
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-form-item label="核查结论" >
<el-select v-model="query.checkStatusList" clearable multiple
style="width: 280px">
<el-option v-for="item in dict.checkStatus" :value="item.dictValue" :label="item.dictLabel"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -144,73 +144,9 @@
</el-form-item>
</el-col>
</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>
<div class="mb-25 flex between">
<div>
<!-- <el-button type="primary" @click="show = true"-->
<!-- >数据导入-->
<!-- </el-button>-->
<el-button type="primary" @click="add()">添加</el-button>
<el-button type="primary" @click="handleExport">数据导出</el-button>
</div>
@ -226,7 +162,7 @@
</div>
</header>
<div class="table-container" v-loading="loading">
<el-table :data="list">
<el-table :data="list" @click="onHeaderDblClick">
<el-table-column type="expand" v-if="false">
<template #default="{ row }">
<div class="row mt-10">
@ -310,6 +246,11 @@
<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="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">
<template #default="{ row }">
<span :style="row.status === '0' ? 'color: red' : ''">
@ -394,6 +335,9 @@
<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>
</div>
</template>
@ -416,7 +360,7 @@ import useCatchStore from "@/stores/modules/catch";
import {
addComplaintCollection, addComplaintCollectionBlame,
delComplaintCollection, exportData,
getComplaintCollectionPage, handlerData,
getComplaintCollectionPage, handlerData, saveInvolveJson,
updateComplaintCollection
} from "@/api/data/complaintCollection.ts";
import Complaint_detail from "@/components/data/complaint_detail.vue";
@ -816,10 +760,29 @@ 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))
const res = await handlerData({id: row.id})
Object.assign(negativeSfss.value, res?.data ?? res)
// 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)
@ -849,6 +812,54 @@ const handleSubmit = async () => {
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({
@ -862,6 +873,18 @@ const negativeSfss = ref({
handlePolices: [{}],
});
provide('negative', negativeSfss)
watch(negativeVerifySfssDailog, (open) => {
if (!open) {
negativeSfss.value = {
currentRow: {},
blames: [],
blameLeaders: [],
handlePolices: [{}],
files: [],
}
}
})
// endregion
@ -874,6 +897,15 @@ const handleWatchDetail = async (row) => {
}
// 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
const handleExport = async () => {
let body = {
@ -881,14 +913,10 @@ const handleExport = async () => {
}
await exportData(body);
}
// endregion
</script>
<style>
.widthClass {
min-width: 50% !important;
}
</style>
<style lang="scss" scoped>
.el-form-item .el-form-item {

Loading…
Cancel
Save