2025-12-03 16:58:06 +08:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<!-- 搜索 -->
|
2026-01-23 15:43:22 +08:00
|
|
|
<div ref="searchBox" class="mt10 mb10">
|
2026-03-18 11:07:40 +08:00
|
|
|
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount">
|
|
|
|
|
<el-button type="primary" size="small" @click="getDataById('add', null)">
|
|
|
|
|
<el-icon style="vertical-align: middle">
|
|
|
|
|
<CirclePlus />
|
|
|
|
|
</el-icon>
|
|
|
|
|
<span style="vertical-align: middle">新增</span>
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="danger" size="small" @click="handleRow()">批量删除</el-button>
|
|
|
|
|
</Search>
|
2025-12-03 16:58:06 +08:00
|
|
|
</div>
|
|
|
|
|
<!-- 表格 -->
|
2026-01-23 15:43:22 +08:00
|
|
|
<div class="tabBox heightBox">
|
2025-12-03 16:58:06 +08:00
|
|
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
|
|
|
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
|
|
|
|
@chooseData="chooseData">
|
|
|
|
|
<template #qblx="{ row }">
|
|
|
|
|
<DictTag :tag="false" :value="row.qblx" :options="D_GS_XS_LX" />
|
|
|
|
|
</template>
|
|
|
|
|
<template #cjlx="{ row }">
|
|
|
|
|
<DictTag :tag="false" :value="row.cjLx" :options="D_BZ_CJLX" />
|
|
|
|
|
</template>
|
2026-03-18 11:07:40 +08:00
|
|
|
<template #qbly="{ row }">
|
|
|
|
|
<DictTag :tag="false" :value="row.qbly" :options="D_GS_XS_LY" />
|
|
|
|
|
</template>
|
2025-12-03 16:58:06 +08:00
|
|
|
<!-- 操作 -->
|
|
|
|
|
<template #controls="{ row }">
|
2026-03-18 11:07:40 +08:00
|
|
|
<el-link size="small" type="primary" @click="getDataById('info',row)">详情</el-link>
|
|
|
|
|
<el-link size="small" type="primary" @click="getDataById('edit',row)">编辑</el-link>
|
|
|
|
|
<el-link size="small" type="danger" @click="handleRow(row.id)">删除</el-link>
|
2025-12-03 16:58:06 +08:00
|
|
|
</template>
|
|
|
|
|
</MyTable>
|
|
|
|
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
|
total: pageData.total
|
|
|
|
|
}"></Pages>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-03-18 11:07:40 +08:00
|
|
|
<AddForm ref="addForm" :dict="{ D_BZ_CJLX, D_GS_XS_LX }" @getList="getList" />
|
2025-12-03 16:58:06 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import MyTable from "@/components/aboutTable/MyTable.vue";
|
|
|
|
|
import Pages from "@/components/aboutTable/Pages.vue";
|
|
|
|
|
import Search from "@/components/aboutTable/Search.vue";
|
|
|
|
|
import { useRoute } from 'vue-router'
|
2025-12-10 21:46:34 +08:00
|
|
|
import { xxcjZxsSelectPage } from "@/api/xxcj.js";
|
2026-03-18 11:07:40 +08:00
|
|
|
import { qcckGet, qcckPost } from '@/api/qcckApi'
|
2025-12-03 16:58:06 +08:00
|
|
|
import { reactive, ref, onMounted, getCurrentInstance, watch } from "vue";
|
|
|
|
|
import AddForm from "./addForm.vue"
|
|
|
|
|
import { getItem } from '@//utils/storage.js'
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
2026-03-18 11:07:40 +08:00
|
|
|
const { D_BZ_CJLX, D_GS_XS_LX,D_GS_XS_LY } = proxy.$dict("D_BZ_CJLX", "D_GS_XS_LX","D_GS_XS_LY"); //获取字典数据
|
2025-12-03 16:58:06 +08:00
|
|
|
const detailDiloag = ref();
|
|
|
|
|
const searchBox = ref(); //搜索框
|
|
|
|
|
const ids = ref([])
|
|
|
|
|
const tableList = ref([]);
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
const { deptBizType, deptLevel } = getItem('deptId')[0]
|
|
|
|
|
const Jb = deptLevel[0] == '2' ? '01' : deptLevel[0] == '3' ? '02' : '03'
|
|
|
|
|
qxkz.deptBizType = deptBizType
|
|
|
|
|
qxkz.deptLevel = Jb
|
|
|
|
|
getRouter()
|
|
|
|
|
tabHeightFn()
|
|
|
|
|
if (route.query.id) {
|
|
|
|
|
detailDiloag.value.init('edit', {
|
|
|
|
|
id: route.query.id
|
|
|
|
|
});
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
getList()
|
|
|
|
|
});
|
|
|
|
|
const chooseData = (val) => {
|
|
|
|
|
ids.value = val.map(item => {
|
|
|
|
|
return item.id
|
|
|
|
|
})
|
|
|
|
|
tableList.value = val
|
|
|
|
|
}
|
|
|
|
|
const qxkz = reactive({
|
|
|
|
|
deptBizType: "",
|
|
|
|
|
deptLevel: ""
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const searchConfiger = ref([
|
|
|
|
|
{ label: "情报标题", prop: 'qbmc', placeholder: "请输入情报标题", showType: "input" },
|
2026-01-26 19:59:57 +08:00
|
|
|
{ label: "时间", prop: 'times', placeholder: "请输入时间", showType: "datetimerange" },
|
|
|
|
|
{ label: "部门", prop: 'ssbmdm', placeholder: "请选择来源单位", showType: "department" }
|
2025-12-03 16:58:06 +08:00
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const pageData = reactive({
|
|
|
|
|
tableData: [],
|
|
|
|
|
keyCount: 0,
|
|
|
|
|
tableConfiger: {
|
|
|
|
|
rowHieght: 61,
|
|
|
|
|
showSelectType: "checkBox",
|
|
|
|
|
loading: false
|
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
pageConfiger: {
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
pageCurrent: 1
|
|
|
|
|
},
|
2026-03-18 11:07:40 +08:00
|
|
|
controlsWidth: 180,
|
2025-12-03 16:58:06 +08:00
|
|
|
tableColumn: [
|
2026-01-25 11:55:12 +08:00
|
|
|
{ label: "情报标题", prop: "qbmc",width:250 },
|
|
|
|
|
{ label: "编号", prop: "xsBh",width:190 },
|
2025-12-10 21:46:34 +08:00
|
|
|
// { label: "情报类型", prop: "qblx", showSolt: true },
|
2026-03-18 11:07:40 +08:00
|
|
|
{ label: "情报来源", prop: "qbly", showSolt: true },
|
2026-01-25 11:55:12 +08:00
|
|
|
{ label: "转线索时间", prop: "zxssj",width:190 },
|
|
|
|
|
{ label: "情报内容", prop: "qbnr",width:190 },
|
2025-12-03 16:58:06 +08:00
|
|
|
{ label: "所属部门", prop: "ssbm" },
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
const queryFrom = ref({});
|
|
|
|
|
|
|
|
|
|
// 搜索
|
|
|
|
|
const onSearch = (val) => {
|
2026-01-26 19:59:57 +08:00
|
|
|
queryFrom.value = { ...val }
|
|
|
|
|
queryFrom.value.startTime = val.times ? val.times[0] : ''
|
|
|
|
|
queryFrom.value.endTime = val.times ? val.times[1] : ''
|
2025-12-03 16:58:06 +08:00
|
|
|
pageData.pageConfiger.pageCurrent = 1;
|
|
|
|
|
getList()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const changeNo = (val) => {
|
|
|
|
|
pageData.pageConfiger.pageCurrent = val;
|
|
|
|
|
getList()
|
|
|
|
|
}
|
|
|
|
|
const changeSize = (val) => {
|
|
|
|
|
pageData.pageConfiger.pageSize = val;
|
|
|
|
|
getList()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取列表
|
|
|
|
|
const getList = () => {
|
|
|
|
|
pageData.tableConfiger.loading = true;
|
|
|
|
|
let data = { ...pageData.pageConfiger, ...queryFrom.value };
|
2026-01-26 19:59:57 +08:00
|
|
|
delete data.times;
|
2026-03-18 11:07:40 +08:00
|
|
|
qcckGet(data, "/mosty-gsxt/xxcj/zxs/selectPage").then((res) => {
|
|
|
|
|
pageData.tableData = res.records || [];
|
|
|
|
|
pageData.total = res.total;
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
pageData.tableConfiger.loading = false;
|
|
|
|
|
})
|
2025-12-03 16:58:06 +08:00
|
|
|
|
2026-03-18 11:07:40 +08:00
|
|
|
// xxcjZxsSelectPage(data).then(res => {
|
|
|
|
|
// pageData.tableData = res.records || [];
|
|
|
|
|
// pageData.total = res.total;
|
|
|
|
|
// pageData.tableConfiger.loading = false;
|
|
|
|
|
// }).catch(() => { pageData.tableConfiger.loading = false; })
|
|
|
|
|
}
|
|
|
|
|
// 删除
|
|
|
|
|
const handleRow = (id) => {
|
|
|
|
|
const promes = {
|
|
|
|
|
ids: id ? [id] : ids.value
|
|
|
|
|
}
|
|
|
|
|
proxy.$confirm("确定要删除?", "警告", { type: "warning" }).then(() => {
|
|
|
|
|
qcckPost(promes, "/mosty-gsxt/xxcj/zxs/deletes").then(() => {
|
|
|
|
|
proxy.$message({ type: "success", message: "删除成功" });
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
};
|
2025-12-03 16:58:06 +08:00
|
|
|
|
|
|
|
|
// 表格高度计算
|
|
|
|
|
const tabHeightFn = () => {
|
2026-03-18 11:07:40 +08:00
|
|
|
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 220;
|
2025-12-03 16:58:06 +08:00
|
|
|
window.onresize = function () {
|
|
|
|
|
tabHeightFn();
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const routerMate = ref({})
|
|
|
|
|
const getRouter = () => {
|
|
|
|
|
routerMate.value = route.meta
|
|
|
|
|
}
|
|
|
|
|
const addForm = ref(null)
|
2026-03-18 11:07:40 +08:00
|
|
|
const getDataById = (type,row) => {
|
|
|
|
|
addForm.value.init(type, row);
|
2025-12-03 16:58:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.label-pop {
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: '*';
|
|
|
|
|
top: 0;
|
|
|
|
|
left: -7px;
|
|
|
|
|
color: red;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.el-loading-mask {
|
|
|
|
|
background: rgba(0, 0, 0, 0.5) !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:v-deep .el-dialog {
|
|
|
|
|
width: 90% !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zdy-model-dialogs {
|
|
|
|
|
/* background-color: rgb(50, 148, 214); */
|
|
|
|
|
background: url("~@/assets/images/bg46.png") no-repeat center center;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
pointer-events: auto !important;
|
|
|
|
|
height: calc(100% - 50px);
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
</style>
|