You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
471 lines
14 KiB
471 lines
14 KiB
<script setup> |
|
import {getListData,addOrUpDataFun,removeByIdFun,getNegativePageByQuery} from "@/api/superviseReport/superviseReport"; |
|
import {timeFormat,getDictLable,formatTimeText, getInvolveProblem ,getYearTime} from "@/utils/util"; |
|
import { ProcessingStatus } from "@/enums/flowEnums"; |
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
const catchStore = useCatchStore(); |
|
const dict = catchStore.getDicts([ |
|
"businessType", |
|
"inspectCase", |
|
"isRectify", |
|
"processingStatus", |
|
"suspectProblem", |
|
"policeType", |
|
"specialSupervision" |
|
]); |
|
const tableRef = ref(null) |
|
const query = ref({ |
|
current: 1, |
|
size: 10, |
|
departBranch:false |
|
}) |
|
const listData = ref([]); |
|
const total = ref(0); |
|
const loading = ref(false); |
|
/** |
|
* 获取表单数据 |
|
* */ |
|
const getList =async ()=>{ |
|
loading.value=true |
|
try{ |
|
const res = await getListData(query.value); |
|
listData.value=res.records; |
|
total.value = res.total; |
|
loading.value = false |
|
}catch (e) { |
|
loading.value = false |
|
} |
|
} |
|
const reset =()=>{ |
|
query.value={ |
|
current: 1, |
|
size: 10, |
|
departBranch:false |
|
} |
|
getList() |
|
} |
|
|
|
onMounted(()=>{ |
|
getList(); |
|
}) |
|
|
|
//编辑 |
|
const editShow =ref(false); |
|
const editLoading = ref(false); |
|
const editRow =ref({}); |
|
|
|
const editShowFun = () =>{ |
|
editRow.value={} |
|
editShow.value=true; |
|
} |
|
const UpDataShowFun = (row) =>{ |
|
editShow.value=true; |
|
editRow.value=row; |
|
} |
|
|
|
const formRef = ref(null) |
|
//保存数据 |
|
const handleSumbit = async ()=>{ |
|
await formRef.value.validate(); |
|
editLoading.value=true; |
|
const res = await addOrUpDataFun(editRow.value); |
|
editShow.value=false; |
|
await getList(); |
|
} |
|
|
|
//详情 |
|
const detailShow = ref(false); |
|
const detailRow = ref({}) |
|
const getDetailData = (row)=>{ |
|
detailShow.value=true; |
|
detailRow.value =row |
|
} |
|
|
|
//删除数据 |
|
const delReportData = async (row)=>{ |
|
const res = await removeByIdFun(row.id); |
|
await getList(); |
|
} |
|
|
|
//督察问题 |
|
const negativeShow = ref(false) |
|
const negativeTable = ref(); |
|
const negativeQuery = ref({ |
|
current: 1, |
|
size: 10, |
|
departBranch:false |
|
}) |
|
const negativeTotal = ref(0); |
|
const negativeLoging = ref(false); |
|
|
|
const handleNegativeTable =async (row)=>{ |
|
if(row.superviseNumber > 0){ |
|
try{ |
|
negativeLoging.value=true; |
|
await getNegativePageFun(row); |
|
negativeShow.value = true; |
|
}catch (e){ |
|
console.log("督察问题获取失败") |
|
negativeLoging.value=false; |
|
} |
|
} |
|
} |
|
|
|
const getNegativePageFun = async (row)=>{ |
|
negativeQuery.value.id =row.id; |
|
const res = await getNegativePageByQuery(row); |
|
negativeTable.value =res.records; |
|
negativeTotal.value = res.total; |
|
negativeLoging.value=false; |
|
} |
|
|
|
const closeAdd =()=>{ |
|
console.log('12-----') |
|
editRow.value={} |
|
console.log(editRow.value) |
|
} |
|
watch(()=>editRow.value.files,(val)=>{ |
|
console.log(val) |
|
if(val){ |
|
console.log(val[0]?.fileName.split(".")[0]) |
|
editRow.value.reportName = val[0]?.fileName.split(".")[0] |
|
} |
|
|
|
}) |
|
|
|
</script> |
|
|
|
<template> |
|
<div class="container"> |
|
<header> |
|
<el-form> |
|
<el-row :gutter="20"> |
|
<el-col :span="6"> |
|
<el-form-item label="报告名称"> |
|
<el-input v-model="query.reportName" placeholder="请输入督察报告名称"></el-input> |
|
</el-form-item> |
|
</el-col> |
|
<el-col :span="6"> |
|
<el-form-item label="创建用户"> |
|
<el-input v-model="query.crtUser" placeholder="请输入督察报告名称"></el-input> |
|
</el-form-item> |
|
</el-col> |
|
</el-row> |
|
<div class="flex between mt-20 mb-26"> |
|
<div> |
|
<el-button type="primary" @click="editShowFun" >创建督察报告</el-button> |
|
</div> |
|
<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> |
|
</el-form> |
|
</header> |
|
<main> |
|
<div class="table-container" v-loading="loading"> |
|
<el-table |
|
:data="listData" |
|
ref="tableRef" |
|
style="width: 100%" |
|
> |
|
<el-table-column prop="reportName" label="督察报告名称" width="120"></el-table-column> |
|
<el-table-column prop="crtTime" label="创建时间" > |
|
<template #default="{row}"> |
|
{{ timeFormat(row.crtTime) }} |
|
</template> |
|
</el-table-column> |
|
<el-table-column prop="crtDepart" label="创建单位名称" ></el-table-column> |
|
<el-table-column prop="crtEmpNo" label="创建警号"></el-table-column> |
|
<el-table-column prop="crtUser" label="创建警员" ></el-table-column> |
|
<el-table-column prop="superviseNumber" label="督察问题数"> |
|
<template #default="{row}"> |
|
<el-button type="primary" link @click="handleNegativeTable(row)">{{row.superviseNumber}}</el-button> |
|
</template> |
|
</el-table-column> |
|
<el-table-column label="操作" fixed="right"> |
|
<template #default="{ row }"> |
|
<div class="flex v-center"> |
|
<el-button type="primary" link @click="UpDataShowFun(row)" >编辑</el-button> |
|
<el-button type="primary" link @click="getDetailData(row)" >查看详情</el-button> |
|
<el-button type="danger" link @click="delReportData(row)" >删除</el-button> |
|
</div> |
|
</template> |
|
</el-table-column> |
|
</el-table> |
|
</div> |
|
<div class="flex end mt-8"> |
|
<el-pagination |
|
@size-change="getList" |
|
@current-change="getList" |
|
: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" |
|
/> |
|
</div> |
|
</main> |
|
|
|
<!-- 创建督察报告--> |
|
<el-dialog :title="`创建督察报告`" destroy-on-close v-model="editShow" v-loading="editLoading" @close="closeAdd"> |
|
<el-form :model="editRow" ref="formRef"> |
|
<el-form-item label="督察报告名称" prop="reportName" :rules="{ |
|
required: true, |
|
message: '请填写督察报告名称', |
|
}"> |
|
<el-input v-model="editRow.reportName"></el-input> |
|
</el-form-item> |
|
<div class="flex v-center" style="height:30px;"> |
|
<h5>文件</h5> |
|
</div> |
|
<el-form-item :rules="{ |
|
required: true, |
|
message: '请上传督察报告', |
|
}" prop="files" style="width: 100%"> |
|
<file-upload |
|
style="width: 100%" |
|
:uploadDrag="true" |
|
v-model:files="editRow.files"></file-upload> |
|
</el-form-item> |
|
</el-form> |
|
<footer class="flex end" style="margin-top: 10px"> |
|
<el-button @click="editShow = false" size="large">取消</el-button> |
|
<el-button type="primary" @click="handleSumbit" size="large" |
|
>确定 |
|
</el-button |
|
> |
|
</footer> |
|
</el-dialog> |
|
<!--督察报告详情--> |
|
<el-dialog :title="`督察报告详情`" v-model="detailShow"> |
|
<el-row> |
|
<el-col > |
|
<el-form-item label="督察报告名称"> |
|
{{detailRow.reportName}} |
|
</el-form-item> |
|
</el-col> |
|
</el-row> |
|
<el-row> |
|
<el-col :span="12"> |
|
<el-form-item label="创建警号">{{detailRow.crtEmpNo}}</el-form-item> |
|
</el-col> |
|
<el-col :span="12"> |
|
<el-form-item label="创建人">{{detailRow.crtUser}}</el-form-item> |
|
</el-col> |
|
</el-row> |
|
<el-row> |
|
<el-col :span="12"> |
|
<el-form-item label="创建单位">{{detailRow.crtDepart}}</el-form-item> |
|
</el-col> |
|
<el-col :span="12"> |
|
<el-form-item label="创建时间"> {{ timeFormat(detailRow.crtTime) }} </el-form-item> |
|
</el-col> |
|
</el-row> |
|
<el-row> |
|
<el-form-item label="附件"> |
|
<file-list v-model:files="detailRow.files" :removeEnable="false" /> |
|
</el-form-item> |
|
</el-row> |
|
</el-dialog> |
|
<!-- 督察报告关联问题--> |
|
<el-dialog :title="`督察报告关联问题`" v-model="negativeShow" width="70vw" > |
|
<el-table :data="negativeTable" v-loading="loading"> |
|
<el-table-column type="expand"> |
|
<template #default="{ row }"> |
|
<div class="row mt-10"> |
|
<div class="col col-6"> |
|
<label>样本源头编号</label> |
|
<span>{{ row.originId }}</span> |
|
</div> |
|
<div class="col col-6"> |
|
<label>问题发现时间</label> |
|
<span>{{ row.discoveryTime }}</span> |
|
</div> |
|
<div class="col col-6"> |
|
<label>问题发生时间</label> |
|
<span>{{ row.happenTime || "/" }}</span> |
|
</div> |
|
</div> |
|
<div class="row mt-10"> |
|
<div class="col col-6"> |
|
<label>问题来源</label> |
|
<span>{{ row.problemSources }}</span> |
|
</div> |
|
<div class="col col-6"> |
|
<label>业务类别</label> |
|
<span>{{ row.businessTypeName }}</span> |
|
</div> |
|
<div class="col col-12"> |
|
<label>涉嫌问题</label> |
|
<span>{{ |
|
getInvolveProblem( |
|
row.involveProblem, |
|
dict.suspectProblem |
|
) || "/" |
|
}}</span> |
|
</div> |
|
</div> |
|
<div class="row mt-10"> |
|
<div class="col col-6" v-if="row.responderName"> |
|
<label>投诉反映人</label> |
|
<span>{{ row.responderName }}</span> |
|
</div> |
|
<div class="col col-6" v-if="row.contactPhone"> |
|
<label>联系电话</label> |
|
<span>{{ row.contactPhone }}</span> |
|
</div> |
|
</div> |
|
|
|
<div class="row mt-10"> |
|
<div class="col col-6"> |
|
<label>涉及警种</label> |
|
<span>{{ row.policeTypeName }}</span> |
|
</div> |
|
<div class="col col-6"> |
|
<label>涉及单位</label> |
|
<span>{{ |
|
row.involveDepartName || "/" |
|
}}</span> |
|
</div> |
|
</div> |
|
<div class="row mt-10"> |
|
<div class="col col-24"> |
|
<label>事情简要描述</label> |
|
<span>{{ row.thingDesc }}</span> |
|
</div> |
|
</div> |
|
</template> |
|
</el-table-column> |
|
<el-table-column |
|
label="问题录入时间" |
|
prop="crtTime" |
|
width="150" |
|
sortable="custom" |
|
/> |
|
<el-table-column |
|
label="问题发现时间" |
|
prop="discoveryTime" |
|
width="150" |
|
sortable="custom" |
|
/> |
|
<el-table-column |
|
label="问题来源" |
|
prop="problemSources" |
|
width="110" |
|
show-overflow-tooltip |
|
/> |
|
<el-table-column |
|
label="业务类别" |
|
prop="businessTypeName" |
|
width="110" |
|
/> |
|
<el-table-column |
|
label="问题内容" |
|
prop="thingDesc" |
|
show-overflow-tooltip |
|
/> |
|
<el-table-column label="办理单位" show-overflow-tooltip> |
|
<template #default="{ row }"> |
|
<span |
|
>{{ row.handleSecondDepartName |
|
}}{{ row.handleThreeDepartName }}</span |
|
> |
|
</template> |
|
</el-table-column> |
|
<el-table-column |
|
label="是否属实" |
|
prop="checkStatusName" |
|
width="100" |
|
align="center" |
|
/> |
|
<el-table-column |
|
label="流程限时" |
|
width="150" |
|
align="center" |
|
v-if="remainingTimeFlag" |
|
> |
|
<template #default="{ row }"> |
|
<countdown |
|
:time="row.remainingDuration" |
|
v-if=" |
|
row.remainingDuration && |
|
row.processingStatus !== |
|
ProcessingStatus.COMPLETED |
|
" |
|
/> |
|
<el-tag |
|
v-else-if="row.handleTimeout" |
|
type="danger" |
|
effect="dark" |
|
>办结超时 |
|
{{ formatTimeText(row.handleTimeout) }}</el-tag |
|
> |
|
</template> |
|
</el-table-column> |
|
<el-table-column label="办理状态" width="110"> |
|
<template #default="{ row }"> |
|
<el-tag |
|
:type=" |
|
row.processingStatus === |
|
ProcessingStatus.COMPLETED |
|
? 'success' |
|
: 'primary' |
|
" |
|
v-if="row.processingStatus" |
|
>{{ |
|
getDictLable( |
|
dict.processingStatus, |
|
row.processingStatus |
|
) |
|
}}</el-tag |
|
> |
|
</template> |
|
</el-table-column> |
|
<el-table-column |
|
label="当前处理对象" |
|
prop="currentProcessingObject" |
|
show-overflow-tooltip |
|
> |
|
<template #default="{ row }"> |
|
<span |
|
v-if=" |
|
row.processingStatus === |
|
ProcessingStatus.COMPLETED |
|
" |
|
>无</span |
|
> |
|
<span v-else>{{ |
|
row.currentProcessingObject |
|
}}</span> |
|
</template> |
|
</el-table-column> |
|
</el-table> |
|
<div class="flex end mt-8"> |
|
<el-pagination |
|
@size-change="getNegativePageFun" |
|
@current-change="getNegativePageFun" |
|
:page-sizes="[10, 20, 50, 100]" |
|
v-model:page-size="negativeQuery.size" |
|
v-model:current-page="negativeQuery.current" |
|
layout="total, sizes, prev, pager, next" |
|
:total="negativeTotal" |
|
> |
|
</el-pagination> |
|
</div> |
|
</el-dialog> |
|
</div> |
|
</template> |
|
|
|
<style scoped lang="scss"> |
|
|
|
</style>
|
|
|