This commit is contained in:
2025-07-14 16:53:38 +08:00
parent dc43ddd3c5
commit 6a2b4e12c5
2 changed files with 118 additions and 8 deletions

View File

@ -0,0 +1,99 @@
<template>
<el-dialog v-model="modelValue" title="合并详情" width="1500px" @close="handleClose">
<div style="width:100%">
<MyTable
:tableData="pageForm.tableData"
:tableColumn="pageForm.tableColumn"
:tableHeight="pageForm.tableHeight"
:key="pageForm.keyCount"
:tableConfiger="pageForm.tableConfiger"
:controlsWidth="pageForm.controlsWidth"
>
<template #xlLx="{row}">
<DictTag :tag="false" :value="row.xlLx" :options="props.dic.D_GS_XS_LX" />
</template>
<template #qbLy="{row}">
<DictTag :tag="false" :value="row.qbLy" :options="props.dic.D_GS_XS_LY" />
</template>
<template #czzt="{row}">
<DictTag :tag="false" :value="row.czzt" :options="props.dic.D_GS_XS_CZZT" />
</template>
<template #shzt="{row}">
<DictTag :tag="false" :value="row.shzt" :options="props.dic.D_BZ_XSSHZT" />
</template>
<template #qtlx="{row}">
<DictTag :tag="false" :value="row.qtlx" :options="props.dic.D_GS_XS_QTLX" />
</template>
</MyTable>
</div>
</el-dialog>
</template>
<script setup>
import { qcckGet } from "@/api/qcckApi.js";
import MyTable from "@/components/aboutTable/MyTable.vue";
import { defineProps,defineEmits, reactive, watch} from 'vue';
const props = defineProps({
modelValue:{
type:Boolean,
default:false
},
dic:{
type:Object,
default:{}
},
id:{
type:String,
default:''
},
})
const pageForm = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false,
haveControls:false
},
tableHeight:600,
tableColumn: [
{ label: "线索编号", prop: "xsBh" },
{ label: "线索名称", prop: "xsMc" },
{ label: "线索来源", prop: "qbLy",showSolt:true },
{ label: "开始时间", prop: "zxkssj" },
{ label: "截至时间", prop: "zxjssj" },
{ label: "指向地点", prop: "zxdz" },
{ label: "线索内容", prop: "xsNr" },
{ label: "群体类型", prop: "qtlx",showSolt:true },
{ label: "群体名称", prop: "qtmc" },
{ label: "上报单位", prop: "ssbm" },
{ label: "上报时间", prop: "sxsbsj" },
{ label: "涉及人数", prop: "sjrs" },
{ label: "附件", prop: "fjdz",showSolt: true},
{ label: "处置状态", prop: "czzt",showSolt: true},
{ label: "状态", prop: "shzt",showSolt: true },
]
});
const emits = defineEmits(["update:modelValue"]);
const getList = () =>{
qcckGet({},'/mosty-gsxt/qbcj/getXshbXq').then(res=>{
console.log(res,'============监听');
pageForm.tableData = res || [];
})
}
watch(()=>props.modelValue,val=>{
if(val) getList()
},{immediate:true,deep:true})
const handleClose = () =>{
emits('update:modelValue',false);
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -39,7 +39,7 @@
<DictTag :tag="false" :value="row.qtlx" :options="props.dic.D_GS_XS_QTLX" />
</template>
<template #controls="{ row }">
<el-link size="small" type="primary" @click="addEdit('detail', row)">详情</el-link>
<el-link size="small" type="primary" @click="lookDetail(row)">详情</el-link>
</template>
</MyTable>
<div class="flex just-end">
@ -84,12 +84,15 @@
</div>
</div>
</div>
<!-- 合并后的详情 -->
<HbDetail v-model="isOpenDetail" :id="detailId"></HbDetail>
</template>
<script setup>
import { timeValidate, timeSlotChange } from "@/utils/tools.js";
import { timeSlotChange } from "@/utils/tools.js";
import * as MOSTY from "@/components/MyComponents/index";
import MyTable from "@/components/aboutTable/MyTable.vue";
import HbDetail from './hbDetail.vue'
import Pages from "@/components/aboutTable/Pages.vue";
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
@ -97,6 +100,8 @@ const emit = defineEmits(["change"]);
const props = defineProps({
dic:Object
})
const isOpenDetail = ref(false)
const detailId = ref('')
const active = ref('本周')
const btns = ref(['本周','本月','本季度','本年'])
const { proxy } = getCurrentInstance();
@ -149,12 +154,12 @@ const config = reactive({
onMounted(()=>{
tabHeightFn();
gethb_before()
gethb_after()
})
// 初始化数据
const init = (type, row) => {
const init = () => {
dialogForm.value = true;
gethb_before()
gethb_after()
tabHeightFn()
};
@ -168,9 +173,9 @@ const gethb_before = () =>{
const handleZdhb = () =>{
proxy.$confirm("是否确定要合并?", "警告", {type: "warning"}).then(() => {
qcckPost({xsMc:keyWords.value},'/mosty-gsxt/qbcj/getXshbZdhb').then(res=>{
proxy.$message({ type: "success", message: "合并成功" });
gethb_before();
gethb_after();
proxy.$message({ type: "success", message: "合并成功" });
gethb_before();
gethb_after();
})
})
}
@ -218,6 +223,12 @@ const gethb_after = () =>{
})
}
// 查看详情
const lookDetail = (row) =>{
detailId.value = row.id;
isOpenDetail.value = true;
}
// 分页
const changeNo = (val) => {
config.pageCurrent = val;