Browse Source

fit:1、批量下发改造(督察报告关联);2、我的待办改造(督察报告关联);3、问题界面改造(督察报告附件展示)

main
pengwei 7 months ago
parent
commit
4b86ecde1a
  1. 46
      src/api/superviseReport/superviseReport.ts
  2. 72
      src/components/negative/add.vue
  3. 70
      src/components/negative/confirmation-completion.vue
  4. 6
      src/components/negative/description.vue
  5. 38
      src/components/negative/dialog.vue
  6. 224
      src/views/superviseReport/superviseReport.vue
  7. 62
      src/views/work/BatchDistribute.vue

46
src/api/superviseReport/superviseReport.ts

@ -0,0 +1,46 @@
import request from "@/api/request";
/**
*
* */
export function getListData(query) {
return request.get({
url: '/supervise/report',
query
});
}
/**
*
* */
export function getReportFile(query){
return request.get({
url: '/supervise/report/getReportFile',
query
});
}
/**
*
* */
export function addOrUpDataFun(body){
return request.post({
url:'/supervise/report',
body
})
}
/**
*
* */
export function removeByIdFun(id){
return request.del({
url:`/supervise/report/${id}`
})
}
export function getReportDetailFun(id){
return request.get({
url:`/supervise/report/getReportDetail/${id}`
})
}

72
src/components/negative/add.vue

@ -111,10 +111,25 @@
trigger: ['blur'], trigger: ['blur'],
}" }"
> >
<el-input <!-- <el-input-->
placeholder="请输入" <!-- placeholder="请输入"-->
v-model="form.reportNumber" <!-- v-model="form.reportNumber"-->
<!-- />-->
<el-select v-model="reportData"
filterable
remote
reserve-keyword
placeholder="请选择通报期数"
:remote-method="getReportListDataFun"
:loading="reportLoading"
>
<el-option
v-for="(item,id) in reportList"
:key="id"
:label="item.reportName"
:value="item.id"
/> />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -358,6 +373,9 @@
:autosize="{ minRows: 4 }" :autosize="{ minRows: 4 }"
/> />
</el-form-item> </el-form-item>
<el-form-item label="督察报告附件" v-if="reportFiles?.length > 0">
<file-list v-model:files="reportFiles" :removeEnable="false" />
</el-form-item>
<el-form-item label="问题附件" prop="thingFiles"> <el-form-item label="问题附件" prop="thingFiles">
<file-upload <file-upload
v-model:files="form.thingFiles" v-model:files="form.thingFiles"
@ -562,7 +580,8 @@ import { secondList, listByFirstHost } from "@/api/system/depart";
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import { disabledDate } from "@/utils/util"; import { disabledDate } from "@/utils/util";
import useUserStore from "@/stores/modules/user"; import useUserStore from "@/stores/modules/user";
import {getListData} from "@/api/superviseReport/superviseReport";
import {computed, watch} from "vue";
const userStore = useUserStore(); const userStore = useUserStore();
const catchStore = useCatchStore(); const catchStore = useCatchStore();
@ -686,6 +705,51 @@ function handleChangeProblem(node, problem) {
problem.twoLevelContent = node.parent.label; problem.twoLevelContent = node.parent.label;
} }
} }
const reportData = ref(null)
watch(()=>reportData.value,(val)=>{
if(val){
form.value.reportNumber = reportList.value.find(s=>s.id == val).reportName;
form.value.reportId = val;
}
},{deep:true,immediate:true})
const reportQuery = ref({
current: 1,
size: 100,
departBranch:false
})
const reportList = ref([]);
const reportLoading = ref(false);
const getReportListDataFun =async (val=null)=>{
reportLoading.value=true;
try{
if(val){
reportQuery.value.reportName = val;
}else{
reportQuery.value.reportName =null;
}
console.log('reportQuery.value.reportName',reportQuery.value.reportName)
const res = await getListData(reportQuery.value);
reportList.value=res.records;
reportLoading.value=false;
}catch (e){
reportLoading.value=false;
}
}
const reportFiles = computed(()=> {
if( form.value.reportNumber){
let data= reportList.value.find(s=>s.id === form.value.reportId);
console.log('data',data)
return data.files;
}else{
return []
}
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.add-negation-container { .add-negation-container {

70
src/components/negative/confirmation-completion.vue

@ -178,6 +178,25 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-form-item label="督察报告" style="width: 50%" v-if="!negative.reportId">
<el-select v-model="reportNumber"
filterable
remote
reserve-keyword
placeholder="请选择通报期数"
:remote-method="getReportListDataFun"
:loading="reportLoading"
>
<el-option
v-for="(item,id) in reportList"
:key="id"
:label="item.reportName"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-row>
<el-form-item <el-form-item
label="认定办结意见" label="认定办结意见"
prop="completionComment" prop="completionComment"
@ -194,6 +213,9 @@
:autosize="{ minRows: 4 }" :autosize="{ minRows: 4 }"
/> />
</el-form-item> </el-form-item>
<el-form-item label="督察报告附件" v-if="reportFiles?.length > 0">
<file-list v-model:files="reportFiles" :removeEnable="false" />
</el-form-item>
</el-form> </el-form>
</div> </div>
<footer class="flex end mt-40"> <footer class="flex end mt-40">
@ -209,7 +231,8 @@ import { BASE_PATH } from "@/api/request";
import { getCompletionInfo } from "@/api/work/negative"; import { getCompletionInfo } from "@/api/work/negative";
import { getDictLable } from "@/utils/util"; import { getDictLable } from "@/utils/util";
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import {computed} from "vue";
import {getListData} from "@/api/superviseReport/superviseReport";
const catchStore = useCatchStore(); const catchStore = useCatchStore();
const dict = catchStore.getDicts([ const dict = catchStore.getDicts([
"verifySituation", "verifySituation",
@ -223,10 +246,12 @@ const formData = ref({
const formRef = ref(null); const formRef = ref(null);
const negative = inject("negative"); const negative = inject("negative");
const loading = ref(false); const loading = ref(false);
const blames = ref([]); const blames = ref([]);
let negativeLevels = []; let negativeLevels = [];
watch(negative, () => { watch(negative, () => {
console.log('negative',negative)
init(); init();
}); });
@ -234,6 +259,49 @@ onMounted(() => {
init(); init();
}); });
const reportNumber = ref(null)
watch(()=>reportNumber.value,(val)=>{
if(val){
formData.value.reportNumber = reportList.value.find(s=>s.id == val).reportName;
formData.value.reportId = val
console.log(formData.value)
}
},{deep:true,immediate:true})
const reportQuery = ref({
current: 1,
size: 100,
departBranch:false
})
const reportList = ref([]);
const reportLoading = ref(false);
const getReportListDataFun = async (val=null)=>{
reportLoading.value=true;
try{
if(val){
reportQuery.value.reportName = val;
}else{
reportQuery.value.reportName =null;
}
const res = await getListData(reportQuery.value);
reportList.value=res.records;
reportLoading.value=false;
}catch (e){
reportLoading.value=false;
}
}
const reportFiles = computed(()=> {
if(formData.value.reportNumber){
let data= reportList.value.find(s=>s.id === formData.value.reportId);
console.log('data',data)
return data.files;
}else{
return []
}
})
async function init() { async function init() {
if (!negative.value.id) { if (!negative.value.id) {
return; return;

6
src/components/negative/description.vue

@ -71,6 +71,10 @@
<div class="text-primary mt-10">事情简要描述</div> <div class="text-primary mt-10">事情简要描述</div>
<div class="content">{{ negative.thingDesc }}</div> <div class="content">{{ negative.thingDesc }}</div>
</div> </div>
<div v-if="negative.reportFile?.length">
<div class="text-primary mt-10 mb-10">督察报告附件</div>
<file-list :files="negative.reportFile" />
</div>
<div v-if="negative.thingFiles?.length"> <div v-if="negative.thingFiles?.length">
<div class="text-primary mt-10 mb-10">附件</div> <div class="text-primary mt-10 mb-10">附件</div>
<file-list :files="negative.thingFiles" /> <file-list :files="negative.thingFiles" />
@ -85,6 +89,8 @@ const catchSotre = useCatchStore();
const dict = catchSotre.getDicts([ const dict = catchSotre.getDicts([
"specialSupervision", "suspectProblem" "specialSupervision", "suspectProblem"
]); ]);
console.log('negative',negative)
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.info-container { .info-container {

38
src/components/negative/dialog.vue

@ -220,12 +220,12 @@
</template> </template>
<!-- 会签--> <!-- 会签-->
<negative-countersign-description /> <negative-countersign-description />
<!-- 会签意见-->
<template <template
v-if=" v-if="
components.indexOf('negative-countersign') > -1 components.indexOf('negative-countersign') > -1
" "
> >
<!-- 会签意见-->
<negative-countersign <negative-countersign
ref="componentRef" ref="componentRef"
@submit="handleSubmitExecute" @submit="handleSubmitExecute"
@ -406,25 +406,17 @@
</el-dialog> </el-dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ApprovalFlow } from "@/enums/dictEnums"; import {FlowActionEnum, FlowNodeEnum, ProcessingStatus,} from "@/enums/flowEnums";
import { import {getNegativeDetails, negativeExecute, spotCheckNegative,} from "@/api/work/negative";
FlowActionEnum, import {addFav, delFav} from "@/api/work/fav";
FlowNodeEnum,
ProcessingStatus,
} from "@/enums/flowEnums";
import {
getNegativeDetails,
negativeExecute,
spotCheckNegative,
} from "@/api/work/negative";
import { addFav, delFav } from "@/api/work/fav";
import feedback from "@/utils/feedback"; import feedback from "@/utils/feedback";
import { getComponents } from "@/utils/flow"; import {getComponents} from "@/utils/flow";
import { getDictLable } from "@/utils/util"; import {getDictLable} from "@/utils/util";
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import { nextTick, onMounted } from "vue"; import {nextTick} from "vue";
import {getConfinementListAll} from "@/api/work/confinement"; import {getConfinementListAll} from "@/api/work/confinement";
import {getReportFile} from "@/api/superviseReport/superviseReport";
const dict = useCatchStore().getDicts([ const dict = useCatchStore().getDicts([
"processingStatus", "processingStatus",
@ -483,7 +475,9 @@ function getDetails() {
loading.value = true; loading.value = true;
getNegativeDetails(props.id, work?.value.workId).then((data) => { getNegativeDetails(props.id, work?.value.workId).then((data) => {
negative.value = data.negative; negative.value = data.negative;
console.log('negative',negative)
getConfinementData(); getConfinementData();
getSuperviseReportFun(data.negative.reportNumber)
flowActions.value = data.flowActions; flowActions.value = data.flowActions;
actionHistory.value = data.actionHistory; actionHistory.value = data.actionHistory;
signReturns.value = data.signReturns; signReturns.value = data.signReturns;
@ -500,6 +494,18 @@ function getDetails() {
loading.value = false; loading.value = false;
}); });
} }
/**
* 获取附件
* */
const getSuperviseReportFun = async (val)=>{
if(val){
negative.value.reportFile = await getReportFile({
reportName: val
});
}else{
negative.value.reportFile = null;
}
}
/** /**
* 禁闭信息入参 * 禁闭信息入参
* */ * */

224
src/views/superviseReport/superviseReport.vue

@ -0,0 +1,224 @@
<script setup>
import {getListData,addOrUpDataFun,removeByIdFun} from "@/api/superviseReport/superviseReport";
import {timeFormat} from "@/utils/util";
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 handleSumbit = async ()=>{
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();
}
//
</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 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="`创建督察报告`" v-model="editShow" v-loading="editLoading">
<el-form :model="editRow" >
<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>
</div>
</template>
<style scoped lang="scss">
</style>

62
src/views/work/BatchDistribute.vue

@ -189,6 +189,31 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="通报期数"
prop="reportNumber"
width="110"
>
<template #default="{ row }">
<el-select v-model="row.reportId"
filterable
remote
clearable
reserve-keyword
@change="setReportNameFun(row)"
placeholder="请选择通报期数"
:remote-method="getReportListDataFun"
:loading="reportLoading"
>
<el-option
v-for="(item,id) in reportList"
:key="item.id"
:value="item.id"
:label="item.reportName"
/>
</el-select>
</template>
</el-table-column>
<el-table-column <el-table-column
label="案件/警情编号" label="案件/警情编号"
prop="caseNumber" prop="caseNumber"
@ -225,11 +250,7 @@
prop="specialSupervisionName" prop="specialSupervisionName"
width="110" width="110"
/> />
<el-table-column
label="通报期数"
prop="reportNumber"
width="110"
/>
<el-table-column <el-table-column
label="问题发生时间" label="问题发生时间"
prop="happenTime" prop="happenTime"
@ -679,6 +700,7 @@ import {
import feedback from "@/utils/feedback"; import feedback from "@/utils/feedback";
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import { BASE_PATH } from "@/api/request"; import { BASE_PATH } from "@/api/request";
import {getListData,getReportDetailFun} from "@/api/superviseReport/superviseReport";
const catchStore = useCatchStore(); const catchStore = useCatchStore();
const dict = catchStore.getDicts([ const dict = catchStore.getDicts([
@ -816,6 +838,36 @@ watch(auditImportShow, (val) => {
} }
}); });
const reportQuery = ref({
current: 1,
size: 100,
departBranch:false
})
const reportList = ref([]);
const reportLoading = ref(false);
const getReportListDataFun = async (val=null)=>{
reportLoading.value=true;
try{
if(val){
reportQuery.value.reportName = val;
}else{
reportQuery.value.reportName =null;
}
const res = await getListData(reportQuery.value);
reportList.value=res.records;
reportLoading.value=false;
}catch (e){
reportLoading.value=false;
}
}
const setReportNameFun = async(row)=>{
let res = await getReportDetailFun(row.reportId);
row.reportNumber=res?.reportName;
}
function handleExport12337(id) { function handleExport12337(id) {
window.open( window.open(
`${BASE_PATH}/data/petitionComplaint12337/export/result?taksId=${id}` `${BASE_PATH}/data/petitionComplaint12337/export/result?taksId=${id}`

Loading…
Cancel
Save