21 changed files with 1537 additions and 1000 deletions
@ -0,0 +1,8 @@ |
|||||||
|
import request from "@/api/request"; |
||||||
|
|
||||||
|
export function listVideoInspection(query) { |
||||||
|
return request.get({ |
||||||
|
url: `/videoInspection`, |
||||||
|
query: query |
||||||
|
}); |
||||||
|
} |
||||||
@ -0,0 +1,28 @@ |
|||||||
|
import request from "@/api/request"; |
||||||
|
|
||||||
|
export function listNews(query) { |
||||||
|
return request.get({ |
||||||
|
url: '/news', |
||||||
|
query |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
export function addNews(body) { |
||||||
|
return request.post({ |
||||||
|
url: '/news', |
||||||
|
body |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
export function updateNews(body) { |
||||||
|
return request.put({ |
||||||
|
url: '/news', |
||||||
|
body |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
export function delNews(id) { |
||||||
|
return request.del({ |
||||||
|
url: '/news/' + id |
||||||
|
}); |
||||||
|
} |
||||||
@ -0,0 +1,284 @@ |
|||||||
|
<template> |
||||||
|
<el-dialog title="公安部信访投诉导入" width="80vw" ref="dialogRef"> |
||||||
|
<header class="flex center mb-40"> |
||||||
|
<el-steps |
||||||
|
:space="400" |
||||||
|
:active="activeStep" |
||||||
|
finish-status="success" |
||||||
|
style="width: 800px" |
||||||
|
> |
||||||
|
<el-step title="数据导入" /> |
||||||
|
<el-step title="数据校验" /> |
||||||
|
<el-step title="数据导入" /> |
||||||
|
</el-steps> |
||||||
|
</header> |
||||||
|
<div style="min-height: 50vh"> |
||||||
|
<template v-if="activeStep === 0"> |
||||||
|
<el-upload |
||||||
|
drag |
||||||
|
:multiple="false" |
||||||
|
:auto-upload="false" |
||||||
|
:show-file-list="false" |
||||||
|
v-model:file-list="fileList" |
||||||
|
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" |
||||||
|
class="mt-20" |
||||||
|
> |
||||||
|
<template v-if="fileList.length === 0"> |
||||||
|
<el-icon class="el-icon--upload" |
||||||
|
><upload-filled |
||||||
|
/></el-icon> |
||||||
|
<div class="el-upload__text"> |
||||||
|
<p>点击或拖拽文件到此区域上传</p> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<template v-else> |
||||||
|
<el-icon class="el-icon--upload"><Select /></el-icon> |
||||||
|
<div class="el-upload__text"> |
||||||
|
已选择文件:{{ fileList[fileList.length - 1].name }} |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-upload> |
||||||
|
<div class="mt-20"> |
||||||
|
<span>文件模板</span> |
||||||
|
<a |
||||||
|
class="link" |
||||||
|
:href="`${BASE_PATH}/templates/公安信访投诉数据导入模板.xls`" |
||||||
|
target="__blank" |
||||||
|
>公安信访投诉数据导入模板.xls 下载</a |
||||||
|
> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<template v-if="activeStep === 1"> |
||||||
|
<div class="table-container"> |
||||||
|
<el-table :data="importTableData"> |
||||||
|
<el-table-column |
||||||
|
label="办理单位" |
||||||
|
prop="discoverTime" |
||||||
|
width="180" |
||||||
|
> |
||||||
|
<template #default="{ row }"> |
||||||
|
<depart-tree-select |
||||||
|
size="small" |
||||||
|
v-model="row.departId" |
||||||
|
/> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column |
||||||
|
label="责任部门" |
||||||
|
prop="involveDepartName" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="问题发生地" |
||||||
|
prop="occurred" |
||||||
|
width="160" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访件编号" |
||||||
|
prop="originId" |
||||||
|
width="160" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访形式" |
||||||
|
prop="channelForFilingComplaints" |
||||||
|
width="86" |
||||||
|
align="center" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="姓名" |
||||||
|
prop="responderName" |
||||||
|
width="86" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="身份证号" |
||||||
|
prop="responderIdCode" |
||||||
|
width="174" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="住址" |
||||||
|
prop="responderAddress" |
||||||
|
width="174" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="手机号码" |
||||||
|
prop="contactPhone" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访日期" |
||||||
|
prop="discoveryTime" |
||||||
|
width="110" |
||||||
|
/> |
||||||
|
|
||||||
|
<el-table-column |
||||||
|
label="信访内容" |
||||||
|
prop="thingDesc" |
||||||
|
width="160" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="异常动态" |
||||||
|
prop="abnormal" |
||||||
|
width="100" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="问题发生日期" |
||||||
|
prop="happenTime" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访人数" |
||||||
|
prop="peopleNumber" |
||||||
|
width="86" |
||||||
|
align="center" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访诉求" |
||||||
|
prop="appeal" |
||||||
|
width="140" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="公安业务分类" |
||||||
|
prop="businessTypeName" |
||||||
|
width="140" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="档案编号" |
||||||
|
prop="fileNo" |
||||||
|
width="110" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="转往处" |
||||||
|
prop="turnAround" |
||||||
|
width="150" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="办理方式" |
||||||
|
prop="handingMethod" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="核查人" |
||||||
|
prop="reviewPersonName" |
||||||
|
width="90" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="具体承办单位" |
||||||
|
prop="handleDepartName" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
|
||||||
|
</el-table> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<template v-if="activeStep === 2"> |
||||||
|
<el-result |
||||||
|
icon="success" |
||||||
|
title="导入成功" |
||||||
|
:sub-title="` 已成功导入${importTableData.length}条数据。`" |
||||||
|
> |
||||||
|
</el-result> |
||||||
|
</template> |
||||||
|
</div> |
||||||
|
<footer class="flex end mt-20 v-center"> |
||||||
|
<el-button size="large" @click="handlePrev" v-if="activeStep !== 3" |
||||||
|
>上一步</el-button |
||||||
|
> |
||||||
|
<el-button |
||||||
|
type="primary" |
||||||
|
size="large" |
||||||
|
@click="handleNext" |
||||||
|
v-loading="loading" |
||||||
|
>{{ activeStep === 2 ? "确定" : "下一步" }}</el-button |
||||||
|
> |
||||||
|
</footer> |
||||||
|
</el-dialog> |
||||||
|
</template> |
||||||
|
<script setup> |
||||||
|
import { |
||||||
|
importPetitionComplaintGab, |
||||||
|
addPetitionComplaintGab, |
||||||
|
} from "@/api/data/petitionComplaint"; |
||||||
|
import feedback from "@/utils/feedback"; |
||||||
|
import { onMounted } from "vue"; |
||||||
|
|
||||||
|
const emit = defineEmits(["close", "update"]); |
||||||
|
|
||||||
|
const activeStep = ref(0) |
||||||
|
|
||||||
|
const fileList = ref([]); |
||||||
|
|
||||||
|
const importTableData = ref([]); |
||||||
|
|
||||||
|
const loading = ref(false); |
||||||
|
|
||||||
|
async function handleNext() { |
||||||
|
if (activeStep.value === 0) { |
||||||
|
if (fileList.value.length === 0) { |
||||||
|
return; |
||||||
|
} |
||||||
|
const formData = new FormData(); |
||||||
|
formData.append("file", fileList.value[fileList.value.length - 1].raw); |
||||||
|
loading.value = true; |
||||||
|
try { |
||||||
|
importTableData.value = await importPetitionComplaintGab( |
||||||
|
formData |
||||||
|
); |
||||||
|
} catch (e) { |
||||||
|
loading.value = false; |
||||||
|
throw e; |
||||||
|
} |
||||||
|
loading.value = false; |
||||||
|
activeStep.value = 1; |
||||||
|
return; |
||||||
|
} |
||||||
|
if (activeStep.value === 1) { |
||||||
|
importTableData.value.forEach((item) => { |
||||||
|
if (!item.departId) { |
||||||
|
feedback.msgWarning("请选择办理单位"); |
||||||
|
throw e; |
||||||
|
} |
||||||
|
}); |
||||||
|
loading.value = true; |
||||||
|
try { |
||||||
|
await addPetitionComplaintGab(importTableData.value); |
||||||
|
} catch(e) { |
||||||
|
loading.value = false |
||||||
|
return |
||||||
|
} |
||||||
|
loading.value = false |
||||||
|
activeStep.value = 2; |
||||||
|
emit('update') |
||||||
|
return; |
||||||
|
} |
||||||
|
if (activeStep.value === 2) { |
||||||
|
emit('close') |
||||||
|
activeStep.value = 0 |
||||||
|
importTableData.value = [] |
||||||
|
fileList.value = [] |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function handlePrev() { |
||||||
|
activeStep.value = activeStep.value - 1; |
||||||
|
} |
||||||
|
|
||||||
|
const dialogRef = ref() |
||||||
|
|
||||||
|
watch(() => dialogRef.value?.visible, (val) => { |
||||||
|
if (!val) { |
||||||
|
activeStep.value = 0 |
||||||
|
importTableData.value = [] |
||||||
|
fileList.value = [] |
||||||
|
} |
||||||
|
}) |
||||||
|
|
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
</style> |
||||||
@ -0,0 +1,247 @@ |
|||||||
|
<template> |
||||||
|
<el-dialog title="国家信访投诉导入" width="80vw" ref="dialogRef"> |
||||||
|
<header class="flex center mb-40"> |
||||||
|
<el-steps |
||||||
|
:space="300" |
||||||
|
:active="activeStep" |
||||||
|
finish-status="success" |
||||||
|
style="width: 800px" |
||||||
|
> |
||||||
|
<el-step title="数据导入" /> |
||||||
|
<el-step title="数据校验" /> |
||||||
|
<el-step title="数据导入" /> |
||||||
|
</el-steps> |
||||||
|
</header> |
||||||
|
<div style="min-height: 50vh"> |
||||||
|
<template v-if="activeStep === 0"> |
||||||
|
<el-upload |
||||||
|
drag |
||||||
|
:multiple="false" |
||||||
|
:auto-upload="false" |
||||||
|
:show-file-list="false" |
||||||
|
v-model:file-list="fileList" |
||||||
|
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" |
||||||
|
class="mt-20" |
||||||
|
> |
||||||
|
<template v-if="fileList.length === 0"> |
||||||
|
<el-icon class="el-icon--upload" |
||||||
|
><upload-filled |
||||||
|
/></el-icon> |
||||||
|
<div class="el-upload__text"> |
||||||
|
<p>点击或拖拽文件到此区域上传</p> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<template v-else> |
||||||
|
<el-icon class="el-icon--upload"><Select /></el-icon> |
||||||
|
<div class="el-upload__text"> |
||||||
|
已选择文件:{{ fileList[fileList.length - 1].name }} |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-upload> |
||||||
|
<div class="mt-20"> |
||||||
|
<span>文件模板</span> |
||||||
|
<a |
||||||
|
class="link" |
||||||
|
:href="`${BASE_PATH}/templates/国家信访投诉数据导入模板.xls`" |
||||||
|
target="__blank" |
||||||
|
>国家信访投诉数据导入模板.xls 下载</a |
||||||
|
> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<template v-if="activeStep === 1"> |
||||||
|
<div class="table-container"> |
||||||
|
<el-table :data="importTableData"> |
||||||
|
<el-table-column |
||||||
|
label="办理单位" |
||||||
|
prop="discoverTime" |
||||||
|
width="180" |
||||||
|
> |
||||||
|
<template #default="{ row }"> |
||||||
|
<depart-tree-select |
||||||
|
size="small" |
||||||
|
v-model="row.departId" |
||||||
|
/> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column |
||||||
|
label="去向机构" |
||||||
|
prop="handleDepartName" |
||||||
|
width="120" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="问题发生地" |
||||||
|
prop="occurred" |
||||||
|
width="160" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访件编号" |
||||||
|
prop="originId" |
||||||
|
width="196" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访形式" |
||||||
|
prop="channelForFilingComplaints" |
||||||
|
width="86" |
||||||
|
align="center" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="姓名" |
||||||
|
prop="responderName" |
||||||
|
width="86" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="身份证号" |
||||||
|
prop="responderIdCode" |
||||||
|
width="174" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访人住址" |
||||||
|
prop="responderAddress" |
||||||
|
width="174" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="手机号码" |
||||||
|
prop="responderPhone" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访日期" |
||||||
|
prop="discoveryTime" |
||||||
|
width="110" |
||||||
|
/> |
||||||
|
|
||||||
|
<el-table-column |
||||||
|
label="信访内容" |
||||||
|
prop="thingDesc" |
||||||
|
width="160" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="是否重信" |
||||||
|
prop="initialPetition" |
||||||
|
width="86" |
||||||
|
align="center" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="信访人数" |
||||||
|
prop="peopleNumber" |
||||||
|
width="86" |
||||||
|
align="center" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="公安业务分类" |
||||||
|
prop="businessTypeName" |
||||||
|
width="140" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
</el-table> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<template v-if="activeStep === 2"> |
||||||
|
<el-result |
||||||
|
icon="success" |
||||||
|
title="导入成功" |
||||||
|
:sub-title="` 已成功导入${importTableData.length}条数据。`" |
||||||
|
> |
||||||
|
</el-result> |
||||||
|
</template> |
||||||
|
</div> |
||||||
|
<footer class="flex end mt-20 v-center"> |
||||||
|
<el-button size="large" @click="handlePrev" v-if="activeStep !== 3" |
||||||
|
>上一步</el-button |
||||||
|
> |
||||||
|
<el-button |
||||||
|
type="primary" |
||||||
|
size="large" |
||||||
|
@click="handleNext" |
||||||
|
v-loading="loading" |
||||||
|
>{{ activeStep === 2 ? "确定" : "下一步" }}</el-button |
||||||
|
> |
||||||
|
</footer> |
||||||
|
</el-dialog> |
||||||
|
</template> |
||||||
|
<script setup> |
||||||
|
import { |
||||||
|
importPetitionComplaintGj, |
||||||
|
addPetitionComplaintGj, |
||||||
|
} from "@/api/data/petitionComplaint"; |
||||||
|
import feedback from "@/utils/feedback"; |
||||||
|
import { onMounted } from "vue"; |
||||||
|
|
||||||
|
const emit = defineEmits(["close", "update"]); |
||||||
|
|
||||||
|
const activeStep = ref(0) |
||||||
|
|
||||||
|
const fileList = ref([]); |
||||||
|
|
||||||
|
const importTableData = ref([]); |
||||||
|
|
||||||
|
const loading = ref(false); |
||||||
|
|
||||||
|
async function handleNext() { |
||||||
|
if (activeStep.value === 0) { |
||||||
|
if (fileList.value.length === 0) { |
||||||
|
return; |
||||||
|
} |
||||||
|
const formData = new FormData(); |
||||||
|
formData.append("file", fileList.value[fileList.value.length - 1].raw); |
||||||
|
loading.value = true; |
||||||
|
try { |
||||||
|
importTableData.value = await importPetitionComplaintGj( |
||||||
|
formData |
||||||
|
); |
||||||
|
} catch (e) { |
||||||
|
loading.value = false; |
||||||
|
throw e; |
||||||
|
} |
||||||
|
loading.value = false; |
||||||
|
activeStep.value = 1; |
||||||
|
return; |
||||||
|
} |
||||||
|
if (activeStep.value === 1) { |
||||||
|
importTableData.value.forEach((item) => { |
||||||
|
if (!item.departId) { |
||||||
|
feedback.msgWarning("请选择办理单位"); |
||||||
|
throw e; |
||||||
|
} |
||||||
|
}); |
||||||
|
loading.value = true; |
||||||
|
try { |
||||||
|
await addPetitionComplaintGj(importTableData.value); |
||||||
|
} catch(e) { |
||||||
|
loading.value = false |
||||||
|
return |
||||||
|
} |
||||||
|
loading.value = false |
||||||
|
activeStep.value = 2; |
||||||
|
emit('update') |
||||||
|
return; |
||||||
|
} |
||||||
|
if (activeStep.value === 2) { |
||||||
|
emit('close') |
||||||
|
activeStep.value = 0 |
||||||
|
importTableData.value = [] |
||||||
|
fileList.value = [] |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function handlePrev() { |
||||||
|
activeStep.value = activeStep.value - 1; |
||||||
|
} |
||||||
|
|
||||||
|
const dialogRef = ref() |
||||||
|
|
||||||
|
watch(() => dialogRef.value?.visible, (val) => { |
||||||
|
if (!val) { |
||||||
|
activeStep.value = 0 |
||||||
|
importTableData.value = [] |
||||||
|
fileList.value = [] |
||||||
|
} |
||||||
|
}) |
||||||
|
|
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
</style> |
||||||
@ -1,568 +0,0 @@ |
|||||||
<template> |
|
||||||
<el-dialog width="80vw" top="5vh" v-model="show" :title="title"> |
|
||||||
<div style="height: 600px"> |
|
||||||
<template v-if="step === 1"> |
|
||||||
<div class="mt-20"> |
|
||||||
<span>信访投诉数据台账模板</span> |
|
||||||
<a |
|
||||||
class="link" |
|
||||||
:href="`${BASE_PATH}/templates/信访投诉数据台账(模板).xlsx`" |
|
||||||
target="__blank" |
|
||||||
>下载</a |
|
||||||
> |
|
||||||
</div> |
|
||||||
<el-upload |
|
||||||
drag |
|
||||||
:multiple="false" |
|
||||||
:auto-upload="false" |
|
||||||
:show-file-list="false" |
|
||||||
v-model:file-list="fileList" |
|
||||||
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" |
|
||||||
class="mt-20" |
|
||||||
> |
|
||||||
<template v-if="fileList.length === 0"> |
|
||||||
<el-icon class="el-icon--upload" |
|
||||||
><upload-filled |
|
||||||
/></el-icon> |
|
||||||
<div class="el-upload__text"> |
|
||||||
点击或拖拽文件到此区域上传 |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<template v-else> |
|
||||||
<el-icon class="el-icon--upload"><Select /></el-icon> |
|
||||||
<div class="el-upload__text"> |
|
||||||
已选择文件:{{ fileList[fileList.length - 1].name }} |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
</el-upload> |
|
||||||
<el-radio-group v-model="dataUpdateMethod" class="mt-20"> |
|
||||||
<el-radio value="incremental" border>增量更新</el-radio> |
|
||||||
<el-radio value="overwrite" border>覆盖更新</el-radio> |
|
||||||
</el-radio-group> |
|
||||||
</template> |
|
||||||
<template v-else> |
|
||||||
<el-page-header @back="step = 1" class="mb-20"></el-page-header> |
|
||||||
<div style="height: 556px; overflow: hidden"> |
|
||||||
<el-scrollbar height="556px"> |
|
||||||
<el-tabs v-model="activeTab"> |
|
||||||
<el-tab-pane label="全部" name="all"> |
|
||||||
<div class="table-container"> |
|
||||||
<el-table |
|
||||||
:data="importTableData" |
|
||||||
ref="tableRef" |
|
||||||
> |
|
||||||
<el-table-column |
|
||||||
type="selection" |
|
||||||
:selectable=" |
|
||||||
(row) => row.state === 'success' |
|
||||||
" |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="信件编号" |
|
||||||
prop="originId" |
|
||||||
show-overflow-tooltip |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="投诉渠道" |
|
||||||
prop="channelForFilingComplaints" |
|
||||||
show-overflow-tooltip |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="受理层级" |
|
||||||
prop="acceptanceLevel" |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="登记时间" |
|
||||||
prop="discoveryTime" |
|
||||||
width="100" |
|
||||||
show-overflow-tooltip |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="投诉人" |
|
||||||
prop="responderName" |
|
||||||
width="90" |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="投诉人电话" |
|
||||||
prop="contactPhone" |
|
||||||
width="120" |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="初重信访" |
|
||||||
align="center" |
|
||||||
width="85" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<span>{{ |
|
||||||
getDictLable( |
|
||||||
dict.initialPetition, |
|
||||||
row.initialPetition |
|
||||||
) |
|
||||||
}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column |
|
||||||
label="缠访闹访" |
|
||||||
width="85" |
|
||||||
align="center" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<span |
|
||||||
v-if=" |
|
||||||
row.entanglementVisits === |
|
||||||
true |
|
||||||
" |
|
||||||
>是</span |
|
||||||
> |
|
||||||
<span |
|
||||||
v-if=" |
|
||||||
row.entanglementVisits === |
|
||||||
false |
|
||||||
" |
|
||||||
>否</span |
|
||||||
> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column |
|
||||||
label="群众集访" |
|
||||||
width="85" |
|
||||||
align="center" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<span |
|
||||||
v-if=" |
|
||||||
row.massVisits === true |
|
||||||
" |
|
||||||
>是</span |
|
||||||
> |
|
||||||
<span |
|
||||||
v-if=" |
|
||||||
row.massVisits === false |
|
||||||
" |
|
||||||
>否</span |
|
||||||
> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="被投诉二级机构" prop="involveSecondDepartName" show-overflow-tooltip /> |
|
||||||
<el-table-column label="被投诉所队" prop="involveThirdDepartName" show-overflow-tooltip /> |
|
||||||
<el-table-column |
|
||||||
label="具体内容" |
|
||||||
prop="thingDesc" |
|
||||||
show-overflow-tooltip |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="数据校验" |
|
||||||
width="90" |
|
||||||
align="center" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<el-tag |
|
||||||
type="success" |
|
||||||
v-if=" |
|
||||||
row.state === 'success' |
|
||||||
" |
|
||||||
>正确</el-tag |
|
||||||
> |
|
||||||
<el-tooltip |
|
||||||
effect="dark" |
|
||||||
:content="row.errMsg" |
|
||||||
placement="top-start" |
|
||||||
v-else |
|
||||||
> |
|
||||||
<el-tag type="danger" |
|
||||||
>异常</el-tag |
|
||||||
> |
|
||||||
</el-tooltip> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column |
|
||||||
label="操作" |
|
||||||
width="100" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<el-button |
|
||||||
type="primary" |
|
||||||
link |
|
||||||
@click="handleEdit(row)" |
|
||||||
>编辑</el-button |
|
||||||
> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
</el-table> |
|
||||||
</div> |
|
||||||
</el-tab-pane> |
|
||||||
<el-tab-pane name="fail"> |
|
||||||
<template #label> |
|
||||||
<el-badge |
|
||||||
:value="importTableFailData.length" |
|
||||||
class="item" |
|
||||||
> |
|
||||||
<span>异常</span> |
|
||||||
</el-badge> |
|
||||||
</template> |
|
||||||
<div class="table-container"> |
|
||||||
<el-table :data="importTableFailData"> |
|
||||||
<el-table-column |
|
||||||
label="信件编号" |
|
||||||
prop="originId" |
|
||||||
show-overflow-tooltip |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="投诉渠道" |
|
||||||
prop="channelForFilingComplaints" |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="受理层级" |
|
||||||
prop="acceptanceLevel" |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="登记时间" |
|
||||||
prop="discoveryTime" |
|
||||||
show-overflow-tooltip |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="投诉人" |
|
||||||
prop="responderName" |
|
||||||
width="90" |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="投诉人电话" |
|
||||||
prop="contactPhone" |
|
||||||
width="120" |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="初重信访" |
|
||||||
align="center" |
|
||||||
width="90" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<span>{{ |
|
||||||
getDictLable( |
|
||||||
dict.initialPetition, |
|
||||||
row.initialPetition |
|
||||||
) |
|
||||||
}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column |
|
||||||
label="缠访闹访" |
|
||||||
width="90" |
|
||||||
align="center" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<span |
|
||||||
v-if=" |
|
||||||
row.entanglementVisits === |
|
||||||
true |
|
||||||
" |
|
||||||
>是</span |
|
||||||
> |
|
||||||
<span |
|
||||||
v-if=" |
|
||||||
row.entanglementVisits === |
|
||||||
false |
|
||||||
" |
|
||||||
>否</span |
|
||||||
> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column |
|
||||||
label="群众集访" |
|
||||||
width="90" |
|
||||||
align="center" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<span |
|
||||||
v-if=" |
|
||||||
row.massVisits === true |
|
||||||
" |
|
||||||
>是</span |
|
||||||
> |
|
||||||
<span |
|
||||||
v-if=" |
|
||||||
row.massVisits === false |
|
||||||
" |
|
||||||
>否</span |
|
||||||
> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="被投诉二级机构" prop="involveSecondDepartName" show-overflow-tooltip /> |
|
||||||
<el-table-column label="被投诉所队" prop="involveThirdDepartName" show-overflow-tooltip /> |
|
||||||
<el-table-column |
|
||||||
label="具体内容" |
|
||||||
prop="thingDesc" |
|
||||||
show-overflow-tooltip |
|
||||||
/> |
|
||||||
<el-table-column |
|
||||||
label="数据校验" |
|
||||||
width="120" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<el-tooltip |
|
||||||
effect="dark" |
|
||||||
:content="row.errMsg" |
|
||||||
placement="top-start" |
|
||||||
> |
|
||||||
<el-tag type="danger" |
|
||||||
>异常</el-tag |
|
||||||
> |
|
||||||
</el-tooltip> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column |
|
||||||
label="操作" |
|
||||||
width="120" |
|
||||||
> |
|
||||||
<template #default="{ row }"> |
|
||||||
<el-button |
|
||||||
type="primary" |
|
||||||
link |
|
||||||
@click="handleEdit(row)" |
|
||||||
>编辑</el-button |
|
||||||
> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
</el-table> |
|
||||||
</div> |
|
||||||
</el-tab-pane> |
|
||||||
</el-tabs> |
|
||||||
</el-scrollbar> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
</div> |
|
||||||
<footer class="flex end mt-20 v-center"> |
|
||||||
<span class="mr-20" v-if="step === 2" |
|
||||||
>选中:<b>{{ checkRowSize }}</b |
|
||||||
>条数据</span |
|
||||||
> |
|
||||||
<el-button size="large" @click="show = false">取消</el-button> |
|
||||||
<el-button |
|
||||||
type="primary" |
|
||||||
size="large" |
|
||||||
@click="handleImport" |
|
||||||
:disabled="fileList.length === 0" |
|
||||||
v-if="step === 1" |
|
||||||
v-loading="loading" |
|
||||||
>下一步</el-button |
|
||||||
> |
|
||||||
<el-button |
|
||||||
type="primary" |
|
||||||
size="large" |
|
||||||
@click="handleSaveImport" |
|
||||||
:disabled="checkRowSize === 0" |
|
||||||
v-else |
|
||||||
>确认导入</el-button |
|
||||||
> |
|
||||||
</footer> |
|
||||||
</el-dialog> |
|
||||||
|
|
||||||
<el-dialog width="660px" top="5vh" v-model="editShow" title="编辑数据"> |
|
||||||
<el-form :label-width="120" :model="form" ref="formRef"> |
|
||||||
<el-form-item |
|
||||||
label="信件编号" |
|
||||||
prop="originId" |
|
||||||
:rules="{ |
|
||||||
required: true, |
|
||||||
message: '请选择', |
|
||||||
trigger: ['blur'], |
|
||||||
}" |
|
||||||
> |
|
||||||
<el-input placeholder="请输入" v-model="form.originId" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="投诉渠道"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="form.channelForFilingComplaints" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="受理层级"> |
|
||||||
<el-input placeholder="请输入" v-model="form.acceptanceLevel" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="登记时间"> |
|
||||||
<el-date-picker type="datetime" v-model="form.discoveryTime" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="投诉人"> |
|
||||||
<el-input placeholder="请输入" v-model="form.responderName" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="投诉人电话"> |
|
||||||
<el-input placeholder="请输入" v-model="form.contactPhone" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item |
|
||||||
label="初重信访" |
|
||||||
prop="initialPetition" |
|
||||||
:rules="{ |
|
||||||
required: true, |
|
||||||
message: '请选择', |
|
||||||
trigger: ['blur'], |
|
||||||
}" |
|
||||||
> |
|
||||||
<el-select clearable v-model="form.initialPetition"> |
|
||||||
<el-option |
|
||||||
v-for="item in dict.initialPetition" |
|
||||||
:key="item.id" |
|
||||||
:label="item.dictLabel" |
|
||||||
:value="item.dictValue" |
|
||||||
/> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item |
|
||||||
label="缠访闹访" |
|
||||||
prop="entanglementVisits" |
|
||||||
:rules="{ |
|
||||||
required: true, |
|
||||||
message: '请选择', |
|
||||||
trigger: ['blur'], |
|
||||||
}" |
|
||||||
> |
|
||||||
<el-select v-model="form.entanglementVisits"> |
|
||||||
<el-option :value="true" label="是" /> |
|
||||||
<el-option :value="false" label="否" /> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item |
|
||||||
label="群众集访" |
|
||||||
prop="massVisits" |
|
||||||
:rules="{ |
|
||||||
required: true, |
|
||||||
message: '请选择', |
|
||||||
trigger: ['blur'], |
|
||||||
}" |
|
||||||
> |
|
||||||
<el-select v-model="form.massVisits"> |
|
||||||
<el-option :value="true" label="是" /> |
|
||||||
<el-option :value="false" label="否" /> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item |
|
||||||
label="被投诉机构" |
|
||||||
prop="involveThirdDepartId" |
|
||||||
|
|
||||||
> |
|
||||||
<depart-tree-select |
|
||||||
v-model="form.involveThirdDepartId" |
|
||||||
:check-strictly="false" |
|
||||||
@node-click=" |
|
||||||
(node) => |
|
||||||
(form.involveThirdDepartName = node.shortName) |
|
||||||
" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item |
|
||||||
label="具体内容" |
|
||||||
prop="thingDesc" |
|
||||||
:rules="{ |
|
||||||
required: true, |
|
||||||
message: '请输入', |
|
||||||
trigger: ['blur'], |
|
||||||
}" |
|
||||||
> |
|
||||||
<el-input type="textarea" v-model="form.thingDesc" /> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<footer class="flex end mt-20"> |
|
||||||
<el-button @click="editShow = false">取消</el-button> |
|
||||||
<el-button type="primary" @click="handleEditSumbit" |
|
||||||
>确认修改</el-button |
|
||||||
> |
|
||||||
</footer> |
|
||||||
</el-dialog> |
|
||||||
</template> |
|
||||||
<script setup> |
|
||||||
import { BASE_PATH } from "@/api/request"; |
|
||||||
import { getDictLable } from "@/utils/util"; |
|
||||||
import { |
|
||||||
importPetitionComplaint, |
|
||||||
addPetitionComplaint, |
|
||||||
} from "@/api/data/petitionComplaint"; |
|
||||||
import feedback from "@/utils/feedback"; |
|
||||||
import useCatchStore from "@/stores/modules/catch"; |
|
||||||
import { computed } from "vue"; |
|
||||||
|
|
||||||
const catchStore = useCatchStore(); |
|
||||||
const dict = catchStore.getDicts(["initialPetition"]); |
|
||||||
|
|
||||||
const props = defineProps({ |
|
||||||
modelValue: { |
|
||||||
type: Boolean, |
|
||||||
default: false, |
|
||||||
}, |
|
||||||
title: { |
|
||||||
type: String, |
|
||||||
}, |
|
||||||
problemSourcesCode: { |
|
||||||
type: String, |
|
||||||
}, |
|
||||||
}); |
|
||||||
const emit = defineEmits(["update:modelValue", "close", "update"]); |
|
||||||
|
|
||||||
const show = ref(false); |
|
||||||
watch( |
|
||||||
() => props.modelValue, |
|
||||||
(val) => { |
|
||||||
show.value = val; |
|
||||||
} |
|
||||||
); |
|
||||||
watch(show, (val) => { |
|
||||||
emit("update:modelValue", val); |
|
||||||
}); |
|
||||||
|
|
||||||
const dataUpdateMethod = ref("incremental"); |
|
||||||
const fileList = ref([]); |
|
||||||
|
|
||||||
const importTableData = ref([]); |
|
||||||
const importTableFailData = computed(() => { |
|
||||||
return importTableData.value.filter((item) => item.state === "fail"); |
|
||||||
}); |
|
||||||
|
|
||||||
const step = ref(1); |
|
||||||
const loading = ref(false); |
|
||||||
async function handleImport() { |
|
||||||
const formData = new FormData(); |
|
||||||
formData.append("file", fileList.value[fileList.value.length - 1].raw); |
|
||||||
loading.value = true; |
|
||||||
importTableData.value = await importPetitionComplaint(formData); |
|
||||||
loading.value = false; |
|
||||||
step.value = 2; |
|
||||||
nextTick(() => {}); |
|
||||||
} |
|
||||||
|
|
||||||
const checkRowSize = computed( |
|
||||||
() => tableRef.value?.getSelectionRows().length || 0 |
|
||||||
); |
|
||||||
|
|
||||||
const tableRef = ref(null); |
|
||||||
async function handleSaveImport() { |
|
||||||
const rows = tableRef.value.getSelectionRows(); |
|
||||||
await addPetitionComplaint({ |
|
||||||
dataUpdateMethod: dataUpdateMethod.value, |
|
||||||
problemSourcesCode: props.problemSourcesCode, |
|
||||||
data: [...rows], |
|
||||||
}); |
|
||||||
feedback.msgSuccess(`成功导入${rows.length}条数据`); |
|
||||||
step.value = 1; |
|
||||||
importTableData.value = []; |
|
||||||
fileList.value = []; |
|
||||||
emit("close"); |
|
||||||
emit("update"); |
|
||||||
} |
|
||||||
|
|
||||||
let activeIndex = -1; |
|
||||||
function handleEdit(row) { |
|
||||||
form.value = { ...row }; |
|
||||||
activeIndex = importTableData.value.indexOf(row); |
|
||||||
editShow.value = true; |
|
||||||
} |
|
||||||
const editShow = ref(false); |
|
||||||
const form = ref({}); |
|
||||||
const formRef = ref(); |
|
||||||
const activeTab = ref("all"); |
|
||||||
|
|
||||||
async function handleEditSumbit() { |
|
||||||
await formRef.value.validate(); |
|
||||||
form.value.state = "success"; |
|
||||||
importTableData.value[activeIndex] = form.value; |
|
||||||
editShow.value = false; |
|
||||||
} |
|
||||||
</script> |
|
||||||
<style lang="scss" scoped> |
|
||||||
</style> |
|
||||||
@ -0,0 +1,162 @@ |
|||||||
|
<template> |
||||||
|
<div class="container"> |
||||||
|
<header> |
||||||
|
<el-form :label-width="114"> |
||||||
|
<el-row> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="预警类型"> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.systemKeyName" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="案事件名称"> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.title" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="发生单位"> |
||||||
|
<depart-tree-select |
||||||
|
v-model="query.departId" |
||||||
|
placeholder="涉及单位" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
</el-row> |
||||||
|
</el-form> |
||||||
|
<div class="flex end mt-20 mb-26"> |
||||||
|
<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> |
||||||
|
<div class="table-container"> |
||||||
|
<el-table :data="list"> |
||||||
|
<el-table-column |
||||||
|
label="预警级别" |
||||||
|
prop="alarmLevel" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<el-table-column label="预警类别" prop="systemKeyName" /> |
||||||
|
<el-table-column label="预警时间" prop="" /> |
||||||
|
<el-table-column label="案事件名称" prop="title" /> |
||||||
|
<el-table-column label="发生单位名称" prop="fsdwGajgmc" /> |
||||||
|
<el-table-column label="下发状态" width="120"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<span class="text-danger">未下发</span> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column label="操作" width="160"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<el-button type="primary" link>查看详情</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]" |
||||||
|
v-model:page-size="query.size" |
||||||
|
v-model:current-page="query.current" |
||||||
|
layout="total, sizes, prev, pager, next" |
||||||
|
:total="total" |
||||||
|
> |
||||||
|
</el-pagination> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<el-dialog title="视频督察详情" v-model="show" width="80vw"> |
||||||
|
<div class="row"> |
||||||
|
<div class="col col-6"> |
||||||
|
<label>预警时间</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-6"> |
||||||
|
<label>预警级别</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-6"> |
||||||
|
<label>预警开始时间</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-6"> |
||||||
|
<label>预警结束时间</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-12"> |
||||||
|
<label>登记单位</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-12"> |
||||||
|
<label>发生单位</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-24"> |
||||||
|
<label>督察方式</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-24"> |
||||||
|
<label>督察方式</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-24"> |
||||||
|
<label>预警名称</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
<div class="col col-24"> |
||||||
|
<label>预警标题</label> |
||||||
|
<span>{{ }}</span> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</el-dialog> |
||||||
|
|
||||||
|
</template> |
||||||
|
<script setup> |
||||||
|
import { listVideoInspection } from "@/api/data/videoInspection"; |
||||||
|
import feedback from "@/utils/feedback"; |
||||||
|
const query = ref({ |
||||||
|
current: 1, |
||||||
|
size: 10, |
||||||
|
}); |
||||||
|
|
||||||
|
const list = ref([]); |
||||||
|
const total = ref(0); |
||||||
|
function getList() { |
||||||
|
listVideoInspection(query.value).then((data) => { |
||||||
|
list.value = data.records; |
||||||
|
total.value = data.total; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
onMounted(() => { |
||||||
|
getList(); |
||||||
|
}); |
||||||
|
|
||||||
|
function reset() { |
||||||
|
query.value = { |
||||||
|
current: 1, |
||||||
|
size: 10, |
||||||
|
}; |
||||||
|
getList(); |
||||||
|
} |
||||||
|
|
||||||
|
const show = ref(false); |
||||||
|
</script> |
||||||
|
<style scoped> |
||||||
|
</style> |
||||||
@ -0,0 +1,272 @@ |
|||||||
|
<template> |
||||||
|
<div class="container"> |
||||||
|
<header> |
||||||
|
<el-form :label-width="120"> |
||||||
|
<el-row> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="发布时间"> |
||||||
|
<date-time-range-picker-ext |
||||||
|
v-model="query.releaseTime" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="动态类型"> |
||||||
|
<el-select v-model="query.hostLevel" clearable> |
||||||
|
<el-option |
||||||
|
v-for="item in dict.newsWorkSource" |
||||||
|
:key="item.id" |
||||||
|
:label="item.dictLabel" |
||||||
|
:value="item.dictValue" |
||||||
|
/> |
||||||
|
</el-select> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="动态分类"> |
||||||
|
<el-select v-model="query.hostLevel" clearable> |
||||||
|
<el-option |
||||||
|
v-for="item in dict.newsWorkType" |
||||||
|
:key="item.id" |
||||||
|
:label="item.dictLabel" |
||||||
|
:value="item.dictValue" |
||||||
|
/> |
||||||
|
</el-select> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="动态内容"> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.contextTxt" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
</el-row> |
||||||
|
</el-form> |
||||||
|
<div class="flex between mt-20 mb-26"> |
||||||
|
<el-button type="primary" @click="handleAdd"> |
||||||
|
<template #icon> |
||||||
|
<icon name="el-icon-Plus" /> |
||||||
|
</template> |
||||||
|
新增动态 |
||||||
|
</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> |
||||||
|
<div class="table-container"> |
||||||
|
<el-table :data="list"> |
||||||
|
<el-table-column label="发布时间" prop="releaseTime" width="160" /> |
||||||
|
<el-table-column label="动态类型" prop="source" width="130" /> |
||||||
|
<el-table-column label="动态分类" prop="workType" width="120" /> |
||||||
|
<el-table-column label="动态内容" prop="contentTxt" /> |
||||||
|
<el-table-column label="操作" width="160"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<el-button type="primary" link @click="handleEdit(row)" |
||||||
|
>编辑</el-button |
||||||
|
> |
||||||
|
<el-button type="danger" link @click="handleDel(row)" |
||||||
|
>删除</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]" |
||||||
|
v-model:page-size="query.size" |
||||||
|
v-model:current-page="query.current" |
||||||
|
layout="total, sizes, prev, pager, next" |
||||||
|
:total="total" |
||||||
|
> |
||||||
|
</el-pagination> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<el-dialog |
||||||
|
v-model="show" |
||||||
|
:title="mode === 'add' ? '新增工作动态' : '编辑工作动态'" |
||||||
|
width="900" |
||||||
|
> |
||||||
|
<el-form |
||||||
|
:label-width="140" |
||||||
|
:model="formData" |
||||||
|
ref="fomrRef" |
||||||
|
style="min-height: 40vh" |
||||||
|
> |
||||||
|
<el-row> |
||||||
|
<el-col :span="12"> |
||||||
|
<el-form-item |
||||||
|
label="动态类型" |
||||||
|
prop="source" |
||||||
|
:rules="{ |
||||||
|
required: true, |
||||||
|
message: '请选择', |
||||||
|
trigger: ['blur'], |
||||||
|
}" |
||||||
|
> |
||||||
|
<el-radio-group v-model="formData.source"> |
||||||
|
<el-radio |
||||||
|
v-for="item in dict.newsWorkSource" |
||||||
|
:key="item.dictCode" |
||||||
|
:value="item.dictValue" |
||||||
|
>{{ item.dictLabel |
||||||
|
}}{{ |
||||||
|
item.remark ? `(${item.remark})` : "" |
||||||
|
}}</el-radio |
||||||
|
> |
||||||
|
</el-radio-group> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="12"> |
||||||
|
<el-form-item |
||||||
|
label="发布时间" |
||||||
|
prop="releaseTime" |
||||||
|
:rules="{ |
||||||
|
required: true, |
||||||
|
message: '请选择', |
||||||
|
trigger: ['blur'], |
||||||
|
}" |
||||||
|
> |
||||||
|
<el-date-picker |
||||||
|
v-model="formData.releaseTime" |
||||||
|
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="workType" |
||||||
|
:rules="{ |
||||||
|
required: true, |
||||||
|
message: '请选择', |
||||||
|
trigger: ['blur'], |
||||||
|
}" |
||||||
|
> |
||||||
|
<el-radio-group v-model="formData.workType"> |
||||||
|
<el-radio |
||||||
|
v-for="item in dict.newsWorkType" |
||||||
|
:key="item.dictCode" |
||||||
|
:value="item.dictValue" |
||||||
|
>{{ item.dictLabel |
||||||
|
}}{{ item.remark ? `(${item.remark})` : "" }}</el-radio |
||||||
|
> |
||||||
|
</el-radio-group> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item |
||||||
|
label="动态内容" |
||||||
|
prop="contentTxt" |
||||||
|
:rules="{ |
||||||
|
required: true, |
||||||
|
message: '请输入', |
||||||
|
trigger: ['blur'], |
||||||
|
}" |
||||||
|
> |
||||||
|
<el-input |
||||||
|
v-model="formData.contentTxt" |
||||||
|
clearable |
||||||
|
placeholder="请输入" |
||||||
|
type="textarea" |
||||||
|
:autosize="{ minRows: 6, maxRows: 10 }" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-form> |
||||||
|
<footer class="flex end mt-40"> |
||||||
|
<el-button @click="show = false" size="large">取消</el-button> |
||||||
|
<el-button type="primary" @click="submit" size="large" |
||||||
|
>保存</el-button |
||||||
|
> |
||||||
|
</footer> |
||||||
|
</el-dialog> |
||||||
|
</template> |
||||||
|
<script setup> |
||||||
|
import { listNews, addNews, updateNews, delNews } from "@/api/work/news"; |
||||||
|
import feedback from "@/utils/feedback"; |
||||||
|
import useCatchStore from "@/stores/modules/catch"; |
||||||
|
|
||||||
|
const catchStore = useCatchStore(); |
||||||
|
const dict = catchStore.getDicts(["newsWorkType", "newsWorkSource"]); |
||||||
|
|
||||||
|
const query = ref({ |
||||||
|
current: 1, |
||||||
|
size: 10, |
||||||
|
}); |
||||||
|
|
||||||
|
const list = ref([]); |
||||||
|
const total = ref(0); |
||||||
|
function getList() { |
||||||
|
listNews(query.value).then((data) => { |
||||||
|
list.value = data.records; |
||||||
|
total.value = data.total; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
function reset() { |
||||||
|
query.value = { |
||||||
|
current: 1, |
||||||
|
size: 10, |
||||||
|
}; |
||||||
|
getList(); |
||||||
|
} |
||||||
|
|
||||||
|
onMounted(() => { |
||||||
|
getList(); |
||||||
|
}); |
||||||
|
|
||||||
|
const show = ref(false); |
||||||
|
const mode = ref("add"); |
||||||
|
const formData = ref({}); |
||||||
|
const fomrRef = ref(); |
||||||
|
|
||||||
|
function handleAdd() { |
||||||
|
formData.value = { internalId: "" }; |
||||||
|
show.value = true; |
||||||
|
mode.value = "add"; |
||||||
|
} |
||||||
|
function handleEdit(row) { |
||||||
|
formData.value = { ...row }; |
||||||
|
show.value = true; |
||||||
|
mode.value = "edit"; |
||||||
|
} |
||||||
|
|
||||||
|
async function handleDel(row) { |
||||||
|
await feedback.confirm("确定要删除该数据?"); |
||||||
|
await delNews(row.id); |
||||||
|
getList(); |
||||||
|
feedback.msgSuccess("删除成功"); |
||||||
|
} |
||||||
|
|
||||||
|
async function submit() { |
||||||
|
await fomrRef.value.validate(); |
||||||
|
if (mode.value === "add") { |
||||||
|
await addNews(formData.value); |
||||||
|
} else { |
||||||
|
await updateNews(formData.value); |
||||||
|
} |
||||||
|
show.value = false; |
||||||
|
formData.value = {}; |
||||||
|
getList(); |
||||||
|
feedback.msgSuccess("操作成功"); |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
</style> |
||||||
Loading…
Reference in new issue