Files
sgxt_web/src/views/home/components/totalNumberClues.vue

238 lines
6.0 KiB
Vue
Raw Normal View History

2025-12-27 11:10:31 +08:00
<template>
2026-04-15 16:04:50 +08:00
<el-dialog
:model-value="modelValue"
width="70%"
@close="closeDialog"
destroy-on-close
append-to-body
:close-on-click-modal="false"
>
2026-02-02 10:33:58 +08:00
<template #title>
<div class="flex just-between align-center">
<span class="f18">{{ props.title }}</span>
2026-04-15 16:04:50 +08:00
<span
@click="exportFile"
class="f14 pointer"
style="color: #0072ff; margin-right: 30px"
>下载</span
>
2026-02-02 10:33:58 +08:00
</div>
</template>
<div>
2026-04-15 16:04:50 +08:00
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
></Search>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
>
2026-01-06 22:09:05 +08:00
<template #zllx="{ row }">
2025-12-27 11:10:31 +08:00
<DictTag :tag="false" :value="row.zllx" :options="D_GS_XS_ZLLX" />
</template>
2026-01-06 22:09:05 +08:00
<template #zldj="{ row }">
2025-12-27 11:10:31 +08:00
<DictTag :tag="false" :value="row.zldj" :options="D_GS_ZDQT_FXDJ" />
</template>
2026-01-06 22:09:05 +08:00
<template #czzt="{ row }">
2025-12-27 11:10:31 +08:00
<DictTag :tag="false" :value="row.czzt" :options="D_GS_XS_CZZT" />
</template>
2026-01-06 22:09:05 +08:00
<template #sffk="{ row }">
2026-04-15 16:04:50 +08:00
{{ row.sffk == "1" ? "已反馈" : "未反馈" }}
2026-01-06 22:09:05 +08:00
</template>
<template #sfqs="{ row }">
2026-04-15 16:04:50 +08:00
{{ row.sfqs == "0" ? "未签收" : "已签收" }}
2026-01-06 22:09:05 +08:00
</template>
2025-12-27 11:10:31 +08:00
</MyTable>
2026-04-15 16:04:50 +08:00
<Pages
@changeNo="changeNo"
@changeSize="changeSize"
:tableHeight="pageData.tableHeight"
:pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"
></Pages>
2025-12-27 11:10:31 +08:00
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
<el-button type="primary" @click="closeDialog">确认 </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
2026-04-15 16:04:50 +08:00
import { getMultiDictVal } from "@/utils/dict.js";
import { exportExlByObj } from "@/utils/exportExcel.js";
2025-12-27 11:10:31 +08:00
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import Pages from "@/components/aboutTable/Pages.vue";
2026-04-15 16:04:50 +08:00
import { xxcjXfxsSelectPage } from "@/api/xxcj.js";
2025-12-27 11:10:31 +08:00
import { ref, reactive, getCurrentInstance, watch } from "vue";
2026-04-15 16:04:50 +08:00
const { proxy } = getCurrentInstance();
2026-04-28 11:26:26 +08:00
const { D_BZ_SF,
// D_GS_XS_SJLY,
D_GS_XS_ZLLX, D_GS_ZDQT_FXDJ, D_GS_XS_CZZT } =
2026-04-15 16:04:50 +08:00
proxy.$dict(
"D_BZ_SF",
2026-04-28 11:26:26 +08:00
// "D_GS_XS_SJLY",
2026-04-15 16:04:50 +08:00
"D_GS_XS_ZLLX",
"D_GS_ZDQT_FXDJ",
"D_GS_XS_CZZT"
);
2025-12-27 11:10:31 +08:00
const props = defineProps({
modelValue: {
type: Boolean,
default: false
},
dict: {
type: Object,
default: () => ({})
2026-04-15 16:04:50 +08:00
},
2026-02-02 10:33:58 +08:00
title: {
2025-12-27 11:10:31 +08:00
default: "下发总数",
type: String
2026-01-06 22:09:05 +08:00
},
sfqs: {
type: String,
2026-04-15 16:04:50 +08:00
default: ""
2026-01-06 22:09:05 +08:00
},
sffk: {
type: String,
2026-04-15 16:04:50 +08:00
default: ""
2025-12-27 11:10:31 +08:00
}
2026-04-15 16:04:50 +08:00
});
2025-12-27 11:10:31 +08:00
const searchConfiger = ref([
2026-04-15 16:04:50 +08:00
{
label: "指令标题",
prop: "zlbt",
placeholder: "请输入指令标题",
showType: "input"
},
{
label: "指令类型",
prop: "zllx",
placeholder: "请选择指令类型",
showType: "select",
options: D_GS_XS_ZLLX
},
{
label: "指令等级",
prop: "zldj",
placeholder: "请选择指令等级",
showType: "select",
options: D_GS_ZDQT_FXDJ
},
{
label: "处置状态",
prop: "czzt",
placeholder: "请选择处置状态",
showType: "select",
options: D_GS_XS_CZZT
}
2025-12-27 11:10:31 +08:00
]);
2026-04-15 16:04:50 +08:00
const emit = defineEmits(["update:modelValue"]);
2025-12-27 11:10:31 +08:00
const closeDialog = () => {
2026-04-15 16:04:50 +08:00
emit("update:modelValue", false);
};
2025-12-27 11:10:31 +08:00
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
loading: false,
rowHieght: 40,
haveControls: false,
2026-04-15 16:04:50 +08:00
showSelectType: "null"
2025-12-27 11:10:31 +08:00
},
controlsWidth: 160, //操作栏宽度
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
tableColumn: [
2026-04-15 16:04:50 +08:00
{ label: "指令标题", prop: "zlbt" },
{ label: "指令类型", prop: "zllx", showSolt: true },
{ label: "指令等级", prop: "zldj", showSolt: true },
{ label: "反馈截止时间", prop: "jssj" },
{ label: "处置状态", prop: "czzt", showSolt: true },
{ label: "是否反馈", prop: "sffk", showSolt: true },
{ label: "是否签收", prop: "sfqs", showSolt: true }
2025-12-27 11:10:31 +08:00
],
2026-04-15 16:04:50 +08:00
tableHeight: "43vh"
2025-12-27 11:10:31 +08:00
});
2026-04-15 16:04:50 +08:00
const parameter = ref();
2025-12-27 11:10:31 +08:00
const onSearch = (val) => {
2026-04-15 16:04:50 +08:00
parameter.value = { ...val };
2025-12-27 11:10:31 +08:00
pageData.pageConfiger.pageCurrent = 1;
2026-04-15 16:04:50 +08:00
changePage();
};
watch(
() => props.modelValue,
(val) => {
if (val) {
changePage();
}
2025-12-27 11:10:31 +08:00
}
2026-04-15 16:04:50 +08:00
);
2025-12-27 11:10:31 +08:00
const changePage = () => {
2026-01-06 22:09:05 +08:00
pageData.tableConfiger.loading = true;
2025-12-27 11:10:31 +08:00
const promes = {
...parameter.value,
pageCurrent: pageData.pageConfiger.pageCurrent,
2026-01-06 22:09:05 +08:00
pageSize: pageData.pageConfiger.pageSize,
sfqs: props.sfqs,
2026-04-15 16:04:50 +08:00
sffk: props.sffk
};
xxcjXfxsSelectPage(promes)
.then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
2025-12-27 11:10:31 +08:00
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
2026-04-15 16:04:50 +08:00
changePage();
};
2025-12-27 11:10:31 +08:00
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
2026-04-15 16:04:50 +08:00
changePage();
};
2026-02-02 10:33:58 +08:00
// 导出
2026-04-15 16:04:50 +08:00
const exportFile = () => {
2026-02-02 10:33:58 +08:00
const titleObj = {
zlbt: "指令标题",
zllx_name: "指令类型",
zldj_name: "指令等级",
jssj: "反馈截止时间",
czzt_name: "处置状态",
jsffk_name: "是否反馈",
2026-04-15 16:04:50 +08:00
sfqs_name: "是否签收"
};
let list = pageData.tableData.map((item) => ({
...item,
zllx_name: getMultiDictVal(item.zllx, D_GS_XS_ZLLX),
zldj_name: getMultiDictVal(item.zldj, D_GS_ZDQT_FXDJ),
czzt_name: getMultiDictVal(item.czzt, D_GS_XS_CZZT),
sffk_name: getMultiDictVal(item.sffk, D_BZ_SF),
sfqs_name: getMultiDictVal(item.sfqs, D_BZ_SF)
}));
exportExlByObj(titleObj, list, props.title);
};
2025-12-27 11:10:31 +08:00
</script>
<style scoped></style>