更新数据
This commit is contained in:
@ -313,7 +313,7 @@ const createScroll = () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 触底加载
|
||||
// 滚动-触底加载
|
||||
const loadTable = () => {
|
||||
emit("changePage",props.tabelModel);
|
||||
};
|
||||
|
@ -111,9 +111,8 @@ const isShow = ref(false)
|
||||
const searchConfiger = ref([
|
||||
{ label: "线索名称", prop: 'xsMc', placeholder: "请输入线索名称", showType: "input" },
|
||||
{ label: "内容关键字", prop: 'xsNr', placeholder: "请输入语义关键字", showType: "input" },
|
||||
{ label: "线索类型", prop: 'xlLx', placeholder: "请选择线索类型", showType: "select" },
|
||||
{ label: "线索来源", prop: 'qbLy', placeholder: "请选择线索来源", showType: "select" },
|
||||
{ label: "线索状态", prop: 'xszt', placeholder: "请选择线索状态", showType: "select" },
|
||||
{ label: "线索类型", prop: 'xlLx', placeholder: "请选择线索类型", showType: "select",options:D_GS_XS_LX },
|
||||
{ label: "线索来源", prop: 'qbLy', placeholder: "请选择线索来源", showType: "select",options:D_GS_XS_LY },
|
||||
{ label: "开始时间", prop: 'zxkssj', placeholder: "请选择开始时间", showType: "date" },
|
||||
{ label: "结束时间", prop: 'zxjssj', placeholder: "请选择结束时间", showType: "date" },
|
||||
{ label: "指向地点", prop: 'zxdz', placeholder: "请输入指向地点", showType: "input" },
|
||||
|
@ -9,9 +9,9 @@
|
||||
</div>
|
||||
<div class="commCnt">
|
||||
<div class="hh50">
|
||||
<div class="comm-title">处置统计</div>
|
||||
<div class="comm-title">类型统计</div>
|
||||
<div class="echartsBox">
|
||||
<MoreBarEcharts echartsId="cztjEcharts" :data="obj.data_cztj"></MoreBarEcharts>
|
||||
<MoreBarEcharts echartsId="cztjEcharts" :data="obj.data_lxtj"></MoreBarEcharts>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh50">
|
||||
@ -39,10 +39,10 @@
|
||||
<div class="comm-title title-s">{{ it.title }}</div>
|
||||
<div class="list-table" >
|
||||
<MyTable
|
||||
:tableData="it.tableData"
|
||||
:tableData="it.tableList"
|
||||
:tableColumn="pageData.tableColumn"
|
||||
:tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount+idx"
|
||||
:key="it.keyCount"
|
||||
:isScroll="true"
|
||||
:fixed="false"
|
||||
:tabelModel="it.title"
|
||||
@ -67,22 +67,25 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { qcckPost, qcckGet } from "@/api/qcckApi.js";
|
||||
import MoreBarEcharts from "@/views/home/echarts/moreBarEcharts.vue";
|
||||
import LineEcharts from "@/views/home/echarts/moreLineEcharts.vue";
|
||||
import Search from "@/components/aboutTable/Search.vue";
|
||||
import MyTable from "@/components/aboutTable/DarkTable.vue";
|
||||
import { nextTick, onMounted, reactive ,ref } from 'vue';
|
||||
import { nextTick, onMounted, reactive,getCurrentInstance ,ref, watch } from 'vue';
|
||||
import { set } from "lodash";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {D_BZ_SSZT,D_GS_XS_LY} = proxy.$dict("D_BZ_SSZT","D_GS_XS_LY"); //获取字典数据
|
||||
const searchBox = ref();
|
||||
const listBoxRef = ref();
|
||||
// 图数据
|
||||
const obj = reactive({
|
||||
data_cztj:{
|
||||
data_lxtj:{
|
||||
xData:['上访','诈骗','敲诈勒索','盗窃','涉黄','涉毒','强奸猥亵','灾害事故','自杀'],
|
||||
color:[['#0DBAC5','#28EEBF'],['#F06C0D','#EEB416']],
|
||||
labelColor:'#000',
|
||||
list:[
|
||||
{label:'总数',val:[30,20,10,60,50,60,35,45,20]},
|
||||
{label:'未办结',val:[40,30,20,50,30,44,50,45,62]},
|
||||
]
|
||||
},
|
||||
data_hstj:{
|
||||
@ -91,56 +94,27 @@ const obj = reactive({
|
||||
labelColor:'#000',
|
||||
list:[
|
||||
{label:'总数',val:[30,20,10,60,50,60,35,45,20]},
|
||||
{label:'已会商',val:[40,30,20,50,30,44,50,45,62]},
|
||||
]
|
||||
}
|
||||
})
|
||||
// 搜索
|
||||
const searchConfiger = ref([
|
||||
{ label: "专题来源", prop: "ztly", placeholder: "请选择", showType: "select"},
|
||||
{ label: "所属专题", prop: "sszt", placeholder: "请输入", showType: "input"},
|
||||
{ label: "线索内容", prop: "xsnr", placeholder: "请输入", showType: "input"},
|
||||
{ label: "时间段", prop: "sjd", showType: "daterange"},
|
||||
{ label: "会商情况", prop: "hsqk", placeholder: "请选择", showType: "select"},
|
||||
{ label: "线索来源", prop: 'qbLy', placeholder: "请选择线索来源", showType: "select",options:D_GS_XS_LY },
|
||||
{ label: "线索内容", prop: "xsNr", placeholder: "请输入", showType: "input"},
|
||||
{ label: "开始时间", prop: 'zxkssj', placeholder: "请选择开始时间", showType: "date" },
|
||||
{ label: "结束时间", prop: 'zxjssj', placeholder: "请选择结束时间", showType: "date" },
|
||||
])
|
||||
// 每个列表对应的值
|
||||
const list = reactive([
|
||||
{ title:'上访', tableData:[
|
||||
{ bt:' 张三上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 李四上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 王五上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 赵二上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 王五上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 赵二上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 王五上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 赵二上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 王五上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 赵二上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 王五上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 赵二上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 王五上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 赵二上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 王五上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 赵二上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 王五上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
{ bt:' 赵二上访', nr:'低价快速的还是', rs:'25', ztfl:'上访', sbsj:'2025/02/19',},
|
||||
]},
|
||||
{ title:'诈骗', tableData:[]},
|
||||
{ title:'敲诈勒索',tableData:[]},
|
||||
{ title:'盗窃',tableData:[]},
|
||||
{ title:'涉黄',tableData:[]},
|
||||
{ title:'涉赌',tableData:[]},
|
||||
{ title:'涉毒',tableData:[]},
|
||||
{ title:'强奸猥亵',tableData:[]},
|
||||
const list = ref([
|
||||
// { title:'诈骗', tableList:[]},
|
||||
])
|
||||
// 列表公用
|
||||
const pageData = reactive({
|
||||
tableColumn:[
|
||||
{ label: "线索标题", width:55, prop: "bt",showOverflowTooltip: true},
|
||||
{ label: "线索内容", prop: "nr",showOverflowTooltip: true},
|
||||
{ label: "涉及人数",width:55, prop: "rs",showOverflowTooltip: true},
|
||||
{ label: "专题分类", prop: "ztfl",showOverflowTooltip: true},
|
||||
{ label: "上报时间",width:55, prop: "sbsj",showOverflowTooltip: true},
|
||||
{ label: "线索标题", prop: "xsMc",showOverflowTooltip: true},
|
||||
{ label: "线索内容", prop: "xsNr",showOverflowTooltip: true},
|
||||
{ label: "涉及人数", prop: "sjrs",showOverflowTooltip: true},
|
||||
{ label: "上报时间", prop: "sxsbsj",showOverflowTooltip: true},
|
||||
],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
@ -153,17 +127,46 @@ const pageData = reactive({
|
||||
controlsWidth: 200, //操作栏宽度
|
||||
});
|
||||
onMounted(() => {
|
||||
tabHeightFn();
|
||||
getCount(); //获取统计数据
|
||||
});
|
||||
|
||||
const getCount = () => {
|
||||
// 获取处置状态统计
|
||||
qcckPost({}, '/mosty-gsxt/qbcj/getXscjTjByXslx').then(res => {
|
||||
let arr = res || [];
|
||||
obj.data_lxtj.xData = arr.map(v => v.zdmc);
|
||||
obj.data_lxtj.list = [{ label: '总数', val: arr.map(v => v.count) }];
|
||||
});
|
||||
// 会商统计
|
||||
qcckPost({}, '/mosty-gsxt/wshs/getWshyZttj').then(res => {
|
||||
let arr = res || [];
|
||||
obj.data_hstj.xData = arr.map(v => v.zdmc);
|
||||
obj.data_hstj.list = [{ label: '总数', val: arr.map(v => v.count) }];
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 滚动加载
|
||||
const changePage = (val) => {
|
||||
console.log(val,'滚动加载');
|
||||
list.value.forEach((item, index) => {
|
||||
if(val == item.title && item.tableList.length < item.total) {
|
||||
item.page++;
|
||||
let params = { sszt: item.dm, pageNum: item.page, pageSize: 20, };
|
||||
qcckPost(params, '/mosty-gsxt/qbcj/selectPage').then(res => {
|
||||
let arr = res.records || [];
|
||||
list.value[index].tableList = item.page == 1 ? arr : [...list.value[index].tableList, ...arr];
|
||||
list.value[index].total = res.total;
|
||||
item.keyCount++;
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.boxHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
|
||||
pageData.boxHeight = window.innerHeight - searchBox.value.offsetHeight - 250
|
||||
nextTick(() => {
|
||||
pageData.tableHeight = listBoxRef.value[0].offsetHeight - 40;
|
||||
});
|
||||
@ -172,6 +175,26 @@ const tabHeightFn = () => {
|
||||
};
|
||||
};
|
||||
|
||||
const handleGetList = () => {
|
||||
list.value.forEach((item, index) => {
|
||||
let params = { sszt: item.dm, pageNum: 1, pageSize: 20 };
|
||||
qcckGet(params, '/mosty-gsxt/qbcj/selectPage').then(res => {
|
||||
list.value[index].tableList = res.records || [];
|
||||
list.value[index].total = res.total;
|
||||
item.keyCount++;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
watch(()=>D_BZ_SSZT.value, (val) => {
|
||||
let zdlist = val || [];
|
||||
list.value = zdlist.map(v => ({ title: v.zdmc,dm:v.dm,keyCount:0, tableList: [],page:1,total:0 }));
|
||||
if(list.value.length > 0) handleGetList();
|
||||
setTimeout(() => {
|
||||
tabHeightFn();
|
||||
}, 400);
|
||||
}, { immediate: true });
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -299,9 +322,6 @@ const tabHeightFn = () => {
|
||||
margin-bottom:0 !important;
|
||||
padding: 2px !important;
|
||||
}
|
||||
::v-deep .pageSearch .box .item {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
::v-deep .el-table .table_blue_row {
|
||||
background: #fff !important;
|
||||
|
Reference in New Issue
Block a user