26 changed files with 1071 additions and 331 deletions
@ -0,0 +1,28 @@ |
|||||||
|
import request from "@/api/request"; |
||||||
|
|
||||||
|
export function importCaseVerif(body) { |
||||||
|
return request.post({ |
||||||
|
url: '/data/caseVerif/import', |
||||||
|
body |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
export function listCaseVerif(query) { |
||||||
|
return request.get({ |
||||||
|
url: '/data/caseVerif', |
||||||
|
query |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
export function addCaseVerif(dataUpdateMethod, body) { |
||||||
|
return request.post({ |
||||||
|
url: `/data/caseVerif/${dataUpdateMethod}`, |
||||||
|
body |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
export function delCaseVerif(id) { |
||||||
|
return request.del({ |
||||||
|
url: `/data/caseVerif/${id}` |
||||||
|
}); |
||||||
|
} |
||||||
@ -0,0 +1,51 @@ |
|||||||
|
<template> |
||||||
|
<el-date-picker |
||||||
|
type="datetimerange" |
||||||
|
start-placeholder="开始时间" |
||||||
|
end-placeholder="结束时间" |
||||||
|
value-format="YYYY-MM-DD HH:mm:ss" |
||||||
|
:shortcuts="shortcuts" |
||||||
|
/> |
||||||
|
</template> |
||||||
|
<script setup> |
||||||
|
const shortcuts = [ |
||||||
|
{ |
||||||
|
text: "今天", |
||||||
|
value: () => { |
||||||
|
const end = new Date(); |
||||||
|
const start = new Date(); |
||||||
|
start.setHours(0, 0, 0, 0); |
||||||
|
return [start, end]; |
||||||
|
}, |
||||||
|
}, |
||||||
|
{ |
||||||
|
text: "近一周", |
||||||
|
value: () => { |
||||||
|
const end = new Date(); |
||||||
|
const start = new Date(); |
||||||
|
start.setDate(start.getDate() - 7); |
||||||
|
return [start, end]; |
||||||
|
}, |
||||||
|
}, |
||||||
|
{ |
||||||
|
text: "近一个月", |
||||||
|
value: () => { |
||||||
|
const end = new Date(); |
||||||
|
const start = new Date(); |
||||||
|
start.setMonth(start.getMonth() - 1) |
||||||
|
return [start, end]; |
||||||
|
}, |
||||||
|
}, |
||||||
|
{ |
||||||
|
text: "近三个月", |
||||||
|
value: () => { |
||||||
|
const end = new Date(); |
||||||
|
const start = new Date(); |
||||||
|
start.setMonth(start.getMonth() - 3) |
||||||
|
return [start, end]; |
||||||
|
}, |
||||||
|
}, |
||||||
|
]; |
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
</style> |
||||||
@ -0,0 +1,349 @@ |
|||||||
|
<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.originId" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="投诉人"> |
||||||
|
<div class="flex gap"> |
||||||
|
<el-select |
||||||
|
v-model="query.responderKey" |
||||||
|
style="width: 160px" |
||||||
|
@change="delete query.responderValue" |
||||||
|
> |
||||||
|
<el-option value="name" label="姓名" /> |
||||||
|
<el-option value="phone" label="电话" /> |
||||||
|
</el-select> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.responderValue" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</div> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="登记时间"> |
||||||
|
<date-time-range-picker-ext v-model="query.discoveryTime" /> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="具体内容"> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.thingDesc" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
</el-row> |
||||||
|
</el-form> |
||||||
|
<div class="mb-25 flex between"> |
||||||
|
<el-button type="primary" @click="show = true" |
||||||
|
>数据导入</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="originId" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="受理时间" |
||||||
|
prop="discoveryTime" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="问题发生时间" |
||||||
|
prop="happenTime" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="问题来源" |
||||||
|
prop="problemSources" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="投诉人" |
||||||
|
prop="responderName" |
||||||
|
width="90" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="投诉人电话" |
||||||
|
prop="contactPhone" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="业务类别" |
||||||
|
prop="businessTypeName" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="涉嫌问题" |
||||||
|
prop="involveProblem" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="涉及警种" |
||||||
|
prop="policeTypeName" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="涉及单位" |
||||||
|
prop="complainedDepartName" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="具体内容" |
||||||
|
prop="thingDesc" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column label="操作" width="200"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<!-- <el-button type="primary" link>核查情况</el-button> --> |
||||||
|
<el-button type="danger" link @click="handleDel(row)">删除</el-button> |
||||||
|
<!-- <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 style="min-height: 500px"> |
||||||
|
<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 class="table-container"> |
||||||
|
<el-table :data="importTableData" ref="tableRef"> |
||||||
|
<el-table-column type="selection" /> |
||||||
|
<el-table-column |
||||||
|
label="案件编号" |
||||||
|
prop="originId" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="受理时间" |
||||||
|
prop="discoveryTime" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="问题发生时间" |
||||||
|
prop="happenTime" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="问题来源" |
||||||
|
prop="problemSources" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="投诉人" |
||||||
|
prop="responderName" |
||||||
|
width="90" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="投诉人电话" |
||||||
|
prop="contactPhone" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="业务类别" |
||||||
|
prop="businessTypeName" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="涉嫌问题" |
||||||
|
prop="involveProblem" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="涉及警种" |
||||||
|
prop="policeTypeName" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="涉及单位" |
||||||
|
prop="complainedDepartName" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="具体内容" |
||||||
|
prop="thingDesc" |
||||||
|
show-overflow-tooltip |
||||||
|
/> |
||||||
|
<el-table-column label="数据校验" width="120"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<el-tag type="success">正确</el-tag> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
</el-table> |
||||||
|
</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" |
||||||
|
>下一步</el-button |
||||||
|
> |
||||||
|
<el-button |
||||||
|
type="primary" |
||||||
|
size="large" |
||||||
|
@click="handleSaveImport" |
||||||
|
:disabled="checkRowSize === 0" |
||||||
|
v-else |
||||||
|
>确认导入</el-button |
||||||
|
> |
||||||
|
</footer> |
||||||
|
</el-dialog> |
||||||
|
</template> |
||||||
|
<script setup> |
||||||
|
import { BASE_PATH } from "@/api/request"; |
||||||
|
import { |
||||||
|
importCaseVerif, |
||||||
|
listCaseVerif, |
||||||
|
addCaseVerif, |
||||||
|
delCaseVerif |
||||||
|
} from "@/api/data/caseVerif"; |
||||||
|
import { ProblemSources } from '@/enums/dictEnums' |
||||||
|
import feedback from "@/utils/feedback"; |
||||||
|
|
||||||
|
const query = ref({ |
||||||
|
size: 10, |
||||||
|
current: 1, |
||||||
|
responderKey: 'name' |
||||||
|
}); |
||||||
|
|
||||||
|
const list = ref([]); |
||||||
|
const total = ref(0); |
||||||
|
function getList() { |
||||||
|
listCaseVerif(query.value).then((data) => { |
||||||
|
list.value = data.records; |
||||||
|
total.value = data.total; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
function reset() { |
||||||
|
query.value = { |
||||||
|
size: 10, |
||||||
|
current: 1, |
||||||
|
responderKey: 'name' |
||||||
|
}; |
||||||
|
getList(); |
||||||
|
} |
||||||
|
|
||||||
|
getList(); |
||||||
|
|
||||||
|
const show = ref(false); |
||||||
|
const dataUpdateMethod = ref("incremental"); |
||||||
|
|
||||||
|
const fileList = ref([]); |
||||||
|
|
||||||
|
const importTableData = ref([]); |
||||||
|
const step = ref(1); |
||||||
|
async function handleImport() { |
||||||
|
const formData = new FormData(); |
||||||
|
formData.append("file", fileList.value[fileList.value.length - 1].raw); |
||||||
|
importTableData.value = await importCaseVerif(formData); |
||||||
|
step.value = 2; |
||||||
|
nextTick(() => { |
||||||
|
tableRef.value.toggleAllSelection(); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
const checkRowSize = computed( |
||||||
|
() => tableRef.value?.getSelectionRows().length || 0 |
||||||
|
); |
||||||
|
|
||||||
|
const tableRef = ref(null); |
||||||
|
async function handleSaveImport() { |
||||||
|
const rows = tableRef.value.getSelectionRows(); |
||||||
|
await addCaseVerif(dataUpdateMethod.value, [...rows]); |
||||||
|
feedback.msgSuccess(`成功导入${rows.length}条数据`); |
||||||
|
show.value = false; |
||||||
|
step.value = 1 |
||||||
|
importTableData.value = [] |
||||||
|
fileList.value = [] |
||||||
|
getList(); |
||||||
|
} |
||||||
|
|
||||||
|
async function handleDel(row) { |
||||||
|
await feedback.confirm('确定要删除该数据?') |
||||||
|
await delCaseVerif(row.originId) |
||||||
|
getList() |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
</style> |
||||||
Loading…
Reference in new issue