This commit is contained in:
lcw
2025-08-06 14:25:36 +08:00
parent 2b06febd8e
commit 71487ac647
15 changed files with 1067 additions and 383 deletions

View File

@ -47,7 +47,8 @@ import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import { qcckPost } from "@/api/qcckApi.js";
import {ref,reactive, nextTick,getCurrentInstance} from 'vue';
import { ref, reactive, nextTick, getCurrentInstance } from 'vue';
import { useRouter,useRoute } from 'vue-router'
const { proxy } = getCurrentInstance();
const { D_GS_ZDR_RYJB,D_GS_ZDR_YJDJ} = proxy.$dict("D_GS_ZDR_RYJB","D_GS_ZDR_YJDJ"); //获取字典数据
const showDialog = ref(false)
@ -57,6 +58,9 @@ const searchConfiger = ref(
{ label: "姓名", prop: 'ryXm', placeholder: "请输入姓名", showType: "input"},
{ label: "身份证号", prop: 'rySfzh', placeholder: "请输入身份证号", showType: "input"},
]);
const emit=defineEmits(['getData'])
const router = useRouter()
const route=useRoute()
const pageData = reactive({
tableData: [], //表格数据
keyCount: 0,
@ -122,7 +126,9 @@ const getList = () =>{
const close = () =>{
pageData.tableData = [];
showDialog.value = false;
showDialog.value = false;
router.replace(route.query)
emit("getData")
}
const init = (val,lxs) =>{
@ -147,4 +153,4 @@ defineExpose({init})
}
}
</style>
</style>

View File

@ -11,30 +11,37 @@
<!-- 研判类型 -->
<CheckBox :data="checkData.yplxBtn" @changeData="changeData_yplx"></CheckBox>
</div>
<div ref="searchBox" >
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch"> </Search>
</div>
<ul class="cntlsit mb10" v-if="show" v-infinite-scroll="load" :style="{height:listHeight+'px'}" v-loading="loading">
<li class="cntItem" @click.stop="lookDeatl(it)" v-for="(it,idx) in list" :key="idx">
<ul class="cntlsit mb10" v-if="show" v-infinite-scroll="load" :style="{ height: listHeight + 'px' }"
v-loading="loading">
<li class="cntItem" @click.stop="lookDeatl(it)" v-for="(it, idx) in list" :key="idx">
<div class="ww100"><img class="ww100" style="height: 168px;" src="@/assets/images/mxbg.jpg" alt=""></div>
<div class="f14 lh24 pl4 pr4 one_text_detail">名称{{ it.ypMc }}</div>
<div class="flex ww100 f14 lh24 pl4 pr4 one_text_detail">类型<DictTag :value="it.ypLx" :tag="false" :options="D_SG_TSYPGZ" /></div>
<div class="flex ww100 f14 lh24 pl4 pr4 one_text_detail">类型
<DictTag :value="it.ypLx" :tag="false" :options="D_SG_TSYPGZ" />
</div>
<div class="f14 lh24 pl4 pr4 one_text_detail">数量{{ it.num }}</div>
<div class="foot">
<span class="ml10 pointer" @click.stop="handleYp(it)" style="color:#027ff0 ;"><el-icon style="top: 2px;"><Document /></el-icon>报告</span>
<span class="ml10 pointer" @click="handleHs(it)" style="color:#f4ac47 ;"><el-icon style="top: 2px;"><Files /></el-icon>会商</span>
<span class="ml10 pointer" @click.stop="handleYp(it)" style="color:#027ff0 ;"><el-icon style="top: 2px;">
<Document />
</el-icon>报告</span>
<span class="ml10 pointer" @click="handleHs(it)" style="color:#f4ac47 ;"><el-icon style="top: 2px;">
<Files />
</el-icon>会商</span>
</div>
</li>
<div class="ww100 flex just-center">
<MOSTY.Empty :show="!loading && list.length <= 0"></MOSTY.Empty>
</div>
<div class="tc ww100 mb4" style="color: #a29f9f;" v-if="total == list.length && total>0">暂时没有数据了</div>
<div class="tc ww100 mb4" style="color: #a29f9f;" v-if="total == list.length && total > 0">暂时没有数据了</div>
</ul>
</div>
</div>
<!-- 详情 -->
<Detail ref="detailForm"></Detail>
<YpModel v-model="showModel" :textContent="textContent" ></YpModel>
<Detail ref="detailForm" @getData="getLits"></Detail>
<YpModel v-model="showModel" :textContent="textContent"></YpModel>
</template>
<script setup>
@ -45,14 +52,14 @@ import CheckBox from "@/components/checkBox/index.vue";
import Search from "@/components/aboutTable/Search.vue";
import { qcckPost } from "@/api/qcckApi.js";
import { useRoute, useRouter } from 'vue-router';
import { reactive, ref, onMounted, getCurrentInstance,watch, nextTick } from "vue";
import { reactive, ref, onMounted, getCurrentInstance, watch, nextTick } from "vue";
const router = useRouter();
const { proxy } = getCurrentInstance();
const { D_SG_SJLY,D_SG_TSYPGZ} = proxy.$dict("D_SG_SJLY","D_SG_TSYPGZ"); //获取字典数据
const { D_SG_SJLY, D_SG_TSYPGZ } = proxy.$dict("D_SG_SJLY", "D_SG_TSYPGZ"); //获取字典数据
const searchBox = ref(); //搜索框
const showModel = ref(false);
const textContent = ref('');
const refBtn = ref();
const refBtn = ref();
const show = ref(false)
const detailForm = ref()
const listHeight = ref()
@ -60,11 +67,11 @@ const searchConfiger = ref([
{ label: "研判名称", prop: "ypMc", placeholder: "请输入研判名称", showType: "input" },
]);
const checkData = reactive({
sjlxBtn:{
sjlxBtn: {
hasChoose: [],
list: []
},
yplxBtn:{
yplxBtn: {
hasChoose: [],
list: []
},
@ -74,25 +81,29 @@ const total = ref(0)
const list = ref([])
const loading = ref(false);
const formData = ref({})
watch(()=>[D_SG_SJLY.value,D_SG_TSYPGZ.value],val=>{
checkData.sjlxBtn.list = val[0].map(v=>v.zdmc);
checkData.yplxBtn.list = val[1].map(v=>v.zdmc);
checkData.yplxBtn.hasChoose = val[1].map(v=>v.zdmc);
},{immediate:true,deep:true});
onMounted(()=>{
watch(() => [D_SG_SJLY.value, D_SG_TSYPGZ.value], val => {
checkData.sjlxBtn.list = val[0].map(v => v.zdmc);
checkData.yplxBtn.list = val[1].map(v => v.zdmc);
checkData.yplxBtn.hasChoose = val[1].map(v => v.zdmc);
}, { immediate: true, deep: true });
const route = useRoute();
onMounted(() => {
show.value = true;
getLits()
tabHeightFn();
if (route.query.id) {
lookDeatl(route.query)
} else {
getLits()
}
})
// 数据类型
const changeData_sjly = (val) =>{
const changeData_sjly = (val) => {
checkData.sjlxBtn.hasChoose = val;
let dms = [];
D_SG_SJLY.value.forEach(item => {
if(val.includes(item.zdmc)) dms.push(item.dm);
if (val.includes(item.zdmc)) dms.push(item.dm);
});
formData.value.sjLx = dms;
page.value = 1;
@ -100,68 +111,70 @@ const changeData_sjly = (val) =>{
}
// 研判类型
const changeData_yplx = (val) =>{
const changeData_yplx = (val) => {
checkData.yplxBtn.hasChoose = val;
let dms = [];
D_SG_TSYPGZ.value.forEach(item => {
if(val.includes(item.zdmc)) dms.push(item.dm);
if (val.includes(item.zdmc)) dms.push(item.dm);
});
formData.value.ypLx = dms;
page.value = 1;
getLits();
}
const onSearch = (val) =>{
formData.value = {...formData.value,...val,};
const onSearch = (val) => {
formData.value = { ...formData.value, ...val, };
page.value = 1;
getLits();
}
const load = () =>{
if(total.value == list.value.length) return;
const load = () => {
if (total.value == list.value.length) return;
page.value++;
getLits();
}
const getLits = () =>{
const getLits = () => {
let params = {
pageCurrent:page.value,
pageSize:8,
pageCurrent: page.value,
pageSize: 8,
...formData.value
}
loading.value = true;
qcckPost(params,'/mosty-gsxt/tsyp/selectPage').then(res=>{
console.log(params);
qcckPost(params, '/mosty-gsxt/tsyp/selectPage').then(res => {
let arr = res.records || [];
list.value = page.value == 1 ? arr : list.value.concat(arr);
total.value = res.total;
loading.value = false;
}).catch(()=>{
}).catch(() => {
loading.value = false;
})
}
const handleYp = (val) =>{
let params = { tsypid:val.id, }
qcckPost(params,'/mosty-gsxt/wshs/getDcypbg').then(res=>{
const handleYp = (val) => {
let params = { tsypid: val.id, }
qcckPost(params, '/mosty-gsxt/wshs/getDcypbg').then(res => {
let data = res || {};
let html = `<p class="html_bt">${data.bt}</p>`
html+=`<p>${data.head}</p>`
html+=`<p>${data.nr}</p>`
html+=`<p>${data.bc}</p>`
html+=`<p>${data.end}</p>`
html += `<p>${data.head}</p>`
html += `<p>${data.nr}</p>`
html += `<p>${data.bc}</p>`
html += `<p>${data.end}</p>`
textContent.value = html;
showModel.value = true;
})
}
const handleHs = (val) =>{
router.push({path:'/MeetingRoom',query:{tsypid:val.id}})
const handleHs = (val) => {
router.push({ path: '/MeetingRoom', query: { tsypid: val.id } })
}
// 查看详情
const lookDeatl = (val) =>{
nextTick(()=>{
detailForm.value.init(val,formData.value.sjLx)
const lookDeatl = (val) => {
nextTick(() => {
detailForm.value.init(val, formData.value.sjLx)
})
}
@ -229,13 +242,15 @@ const tabHeightFn = () => {
margin-left: 10px;
border-radius: 4px;
box-sizing: border-box;
.btnsBox{
.btnsBox {
background: #fff;
padding: 10px 5px;
border-radius: 4px;
margin-bottom: 10px;
}
.cntlsit{
.cntlsit {
display: flex;
flex-wrap: wrap;
align-content: start;
@ -245,21 +260,23 @@ const tabHeightFn = () => {
background: #fff;
padding: 4px;
box-sizing: border-box;
.cntItem{
.cntItem {
width: 300px;
border: 1px solid #ccc;
color: #787878;
border-radius: 4px;
overflow: hidden;
.foot{
.foot {
text-align: right;
margin-top: 4px;
border-top:1px solid #ccc;
border-top: 1px solid #ccc;
padding: 4px;
box-sizing: border-box;
}
}
}
}
}