'处理字典选择、展示处理'
This commit is contained in:
@ -13,7 +13,10 @@
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
||||
<template #sflz="{ row }">
|
||||
<DictTag :value="row.sflz" :tag="false" :options="D_BZ_SF" />
|
||||
<DictTag :value="row.newSflz" :options="D_BZ_SF" />
|
||||
</template>
|
||||
<template #gw="{ row }">
|
||||
<DictTag :value="row.gw" :options="D_BAXX_GWLX" />
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
@ -43,7 +46,7 @@ import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import AddPractitionerDialog from "./components/addPractitionerDialog.vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_SF } = proxy.$dict("D_BZ_SF");
|
||||
const { D_BZ_SF, D_BAXX_GWLX } = proxy.$dict("D_BZ_SF", "D_BAXX_GWLX");
|
||||
const addPractitionerRef = ref(null);
|
||||
const queryFrom = ref({});
|
||||
const isVisible = ref(false);
|
||||
@ -94,7 +97,7 @@ const pageData = reactive({
|
||||
{ label: "姓名", prop: "xm" },
|
||||
{ label: "证件号码", prop: "sfzh" },
|
||||
{ label: "联系方式", prop: "lxdh" },
|
||||
{ label: "岗位", prop: "gw" },
|
||||
{ label: "岗位", prop: "gw", showSolt: true },
|
||||
{ label: "入职时间", prop: "rzsj" },
|
||||
{ label: "外派单位", prop: "wpdw", },
|
||||
{ label: "是否在职", prop: "sflz", showSolt: true },
|
||||
@ -155,7 +158,8 @@ const getList = async () => {
|
||||
}, `/mosty-base/baxx/cyry/page`)
|
||||
|
||||
if(res) {
|
||||
pageData.tableData = res.records || [];
|
||||
// 处理sflz为null默认为0
|
||||
pageData.tableData = res.records?.map(i => ({ ...i, newSflz: i?.sflz === null ? 0 : i.sflz })) || [];
|
||||
pageData.total = res.total;
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user