159 lines
4.6 KiB
Vue
159 lines
4.6 KiB
Vue
<template>
|
|
<div>
|
|
<!-- 搜索 -->
|
|
<div ref="searchBox" class="mt10 mb10">
|
|
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
|
|
</div>
|
|
<!-- 表格 -->
|
|
<div class="tabBox heightBox">
|
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
|
|
|
<template #jflx="{ row }">
|
|
<DictTag :tag="false" :value="row.jflx" :options="jflxArr" />
|
|
</template>
|
|
<!-- 操作 -->
|
|
<template #controls="{ row }">
|
|
<el-link type="primary" @click="addEdit( row)">详情</el-link>
|
|
</template>
|
|
</MyTable>
|
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
|
...pageData.pageConfiger,
|
|
total: pageData.total
|
|
}"></Pages>
|
|
</div>
|
|
<!-- 编辑详情 -->
|
|
<!-- <EditAddForm v-if="show" ref="detailDiloag" :dic="{ JQLB,JQLX,JQXL,JQZL,D_BZ_JQLY,D_BZ_JQFL,JQLB_DP,D_BZ_JQBQ,D_GS_SSYJ }"
|
|
@updateDate="getList" /> -->
|
|
</div>
|
|
<AddForm ref="addForm" />
|
|
</template>
|
|
|
|
<script setup>
|
|
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
|
import MyTable from "@/components/aboutTable/MyTable.vue";
|
|
import Pages from "@/components/aboutTable/Pages.vue";
|
|
import Search from "@/components/aboutTable/Search.vue";
|
|
// import EditAddForm from "./components/editAddForm.vue";
|
|
import { importantBaseSelectPage } from '@/api/HumanIntelligence/integralList.js'
|
|
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
|
import AddForm from "./addForm.vue";
|
|
const { proxy } = getCurrentInstance();
|
|
// const { D_GS_JFLX, } = proxy.$dict("D_GS_JFLX",); //获取字典数据
|
|
const { D_GS_JFLX, } = proxy.$fzdict("BD_D_SJLB",); //获取字典数据
|
|
const detailDiloag = ref();
|
|
const show = ref(false)
|
|
const jflxArr = [{ label: '优秀信息员', value: '01' }, { label: '优秀研判员', value: '02' }] // jflx
|
|
const searchConfiger = ref([
|
|
{
|
|
label: "姓名",
|
|
prop: "xm",
|
|
placeholder: "请输入姓名",
|
|
showType: "input"
|
|
},
|
|
// {
|
|
// label: "身份证号",
|
|
// prop: "sfzh",
|
|
// placeholder: "请输入身份证号",
|
|
// showType: "input"
|
|
// },
|
|
{
|
|
label: "积分类型",
|
|
prop: "jflx",
|
|
placeholder: "请选择积分类型",
|
|
showType: "select",
|
|
options: jflxArr
|
|
},
|
|
{
|
|
label: "积分来源类型",
|
|
prop: "jflylx",
|
|
placeholder: "请选择积分来源类型",
|
|
showType: "select",
|
|
// options: Object.keys(jflylxTypes).map(key => ({ label: jflylxTypes[key], value: key }))
|
|
},
|
|
]);
|
|
const searchBox = ref(); //搜索框
|
|
const pageData = reactive({
|
|
tableData: [], //表格数据
|
|
keyCount: 0,
|
|
tableConfiger: {
|
|
rowHieght: 61,
|
|
showSelectType: "null",
|
|
loading: false,
|
|
},
|
|
total: 0,
|
|
pageConfiger: {
|
|
pageSize: 20,
|
|
pageCurrent: 1
|
|
}, //分页
|
|
controlsWidth: 160, //操作栏宽度
|
|
tableColumn: [
|
|
{ label: "编号", prop: "baseNo" },
|
|
{ label: "信息类型名称", prop: "typeName" },
|
|
{ label: "信息类别名称", prop: "categoryName" },
|
|
{ label: "接收单位", prop: "receiveUnit" },
|
|
{ label: "上报单位名称", prop: "reportUnitName" },
|
|
{ label: "信息专报日期类型", prop: "timeTypeName" },
|
|
{ label: "标题", prop: "title" },
|
|
{ label: "状态名称", prop: "ztmc" },
|
|
]
|
|
});
|
|
onMounted(() => {
|
|
tabHeightFn();
|
|
getList()
|
|
});
|
|
const listQuery = ref({})
|
|
// 搜索
|
|
const onSearch = (val) => {
|
|
listQuery.value = { ...val };
|
|
pageData.pageConfiger.pageCurrent = 1;
|
|
getList()
|
|
}
|
|
|
|
//获取数据
|
|
const getList = () => {
|
|
pageData.tableConfiger.loading = true;
|
|
const params = {
|
|
pageCurrent: pageData.pageConfiger.pageCurrent,
|
|
pageSize: pageData.pageConfiger.pageSize,
|
|
...listQuery.value
|
|
}
|
|
importantBaseSelectPage(params).then(res => {
|
|
pageData.tableData = res.records || [];
|
|
pageData.total = res.total;
|
|
}).finally(() => {
|
|
pageData.tableConfiger.loading = false;
|
|
})
|
|
}
|
|
// 分页
|
|
const changeNo = (val) => {
|
|
pageData.pageConfiger.pageCurrent = val;
|
|
getList()
|
|
}
|
|
// 每页条数
|
|
const changeSize = (val) => {
|
|
pageData.pageConfiger.pageSize = val;
|
|
getList()
|
|
}
|
|
const addForm=ref()
|
|
// 查看详情
|
|
const addEdit = (type, row) => {
|
|
addForm.value.init(type, row,);
|
|
};
|
|
|
|
|
|
// 表格高度计算
|
|
const tabHeightFn = () => {
|
|
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 200;
|
|
window.onresize = function() {
|
|
tabHeightFn();
|
|
};
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
.el-loading-mask {
|
|
background: rgba(0, 0, 0, 0.5) !important;
|
|
}
|
|
</style>
|