23cc819c by xukangle

fix: 修改分类分级展示

1 parent 88f1a7ff
...@@ -336,7 +336,11 @@ const tableInfo = ref({ ...@@ -336,7 +336,11 @@ const tableInfo = ref({
336 { label: "序号", type: "index", width: 56, align: "center" }, 336 { label: "序号", type: "index", width: 56, align: "center" },
337 { label: "字段名", field: "fieldName", width: 140 }, 337 { label: "字段名", field: "fieldName", width: 140 },
338 { label: "字段中文名", field: "fieldChName", width: 180 }, 338 { label: "字段中文名", field: "fieldChName", width: 180 },
339 { label: "分类", field: "classifyDetailName", width: 120 }, 339 {
340 label: "分类", field: "classifyDetailNameRoutes", width: 120, getName: (scope) => {
341 return scope.row.classifyDetailNameRoutes.join('/');
342 }
343 },
340 { label: "分级", field: "gradeDetailName", width: 80 }, 344 { label: "分级", field: "gradeDetailName", width: 80 },
341 { label: "标签", field: "label", width: 140 }, 345 { label: "标签", field: "label", width: 140 },
342 { label: "规则", field: "ruleDetail", width: 180 }, 346 { label: "规则", field: "ruleDetail", width: 180 },
...@@ -416,7 +420,7 @@ const dataBaseTreeInfo = ref<any>({ ...@@ -416,7 +420,7 @@ const dataBaseTreeInfo = ref<any>({
416 editTreeItem: false, 420 editTreeItem: false,
417 queryValue: "", 421 queryValue: "",
418 className: 'tree-list', 422 className: 'tree-list',
419 queryPlaceholder: "输入标准集名称搜索", 423 queryPlaceholder: "输入名称搜索",
420 props: { 424 props: {
421 label: "name", 425 label: "name",
422 value: "guid", 426 value: "guid",
...@@ -913,14 +917,23 @@ const dataBaseTablePageChange = (info) => { ...@@ -913,14 +917,23 @@ const dataBaseTablePageChange = (info) => {
913 } 917 }
914 918
915 919
920 // 字段信息分页
921 const dataFieldTablePageChange = (info) => {
922 dataFieldPage.value.curr = Number(info.curr);
923 dataFieldPage.value.limit = Number(info.limit);
924 getDataBaseFieldData({
925 pageIndex: info.curr,
926 pageSize: info.limit
927 });
928 }
916 // 获取字段信息getDbDirFieldPageList 929 // 获取字段信息getDbDirFieldPageList
917 const tableFieldsLoading = ref(false); 930 const tableFieldsLoading = ref(false);
918 const tableFieldsData = ref([]); 931 const tableFieldsData = ref([]);
919 const getDataBaseFieldData = async (params = {}) => { 932 const getDataBaseFieldData = async (params = {}) => {
920 tableFieldsDataInfo.value.loading = true; 933 tableFieldsDataInfo.value.loading = true;
921 const dataBaseParams = { 934 const dataBaseParams = {
922 pageIndex: 1, 935 pageIndex: dataFieldPage.value.curr,
923 pageSize: -1, 936 pageSize: dataFieldPage.value.limit,
924 tableGuid: "", 937 tableGuid: "",
925 execGuid: execGuidInfo.value.execGuid, 938 execGuid: execGuidInfo.value.execGuid,
926 databaseGuid: "", 939 databaseGuid: "",
...@@ -932,12 +945,28 @@ const getDataBaseFieldData = async (params = {}) => { ...@@ -932,12 +945,28 @@ const getDataBaseFieldData = async (params = {}) => {
932 if (res.code == proxy.$passCode) { 945 if (res.code == proxy.$passCode) {
933 tableFieldsData.value = res.data.records; 946 tableFieldsData.value = res.data.records;
934 tableFieldsDataInfo.value.data = res.data.records; 947 tableFieldsDataInfo.value.data = res.data.records;
948 tableFieldsDataInfo.value.page.rows = res.data.totalRows;
949 tableFieldsDataInfo.value.page.limit = res.data.pageSize
950 tableFieldsDataInfo.value.page.curr = res.data.pageIndex
935 } else { 951 } else {
936 proxy.$ElMessage.error(res.msg); 952 proxy.$ElMessage.error(res.msg);
937 } 953 }
938 tableFieldsDataInfo.value.loading = false; 954 tableFieldsDataInfo.value.loading = false;
939 }; 955 };
940 956
957
958
959 const dataFieldPage = ref({
960 limit: 50,
961 curr: 1,
962 sizes: [
963 { label: "10", value: 10 },
964 { label: "50", value: 50 },
965 { label: "100", value: 100 },
966 { label: "150", value: 150 },
967 { label: "200", value: 200 },
968 ],
969 });
941 const tableFieldsDataInfo = ref({ 970 const tableFieldsDataInfo = ref({
942 id: "data-field-table", 971 id: "data-field-table",
943 multiple: false, 972 multiple: false,
...@@ -955,11 +984,10 @@ const tableFieldsDataInfo = ref({ ...@@ -955,11 +984,10 @@ const tableFieldsDataInfo = ref({
955 { label: "标签", field: "label", width: 120, align: 'center' }, 984 { label: "标签", field: "label", width: 120, align: 'center' },
956 ], 985 ],
957 data: [], 986 data: [],
958 showPage: false,
959 page: { 987 page: {
960 // type: "normal", 988 type: "normal",
961 // rows: 0, 989 rows: 0,
962 // ...dataBasePage.value, 990 ...dataFieldPage.value,
963 991
964 }, 992 },
965 actionInfo: { 993 actionInfo: {
...@@ -1392,13 +1420,13 @@ onActivated(async () => { ...@@ -1392,13 +1420,13 @@ onActivated(async () => {
1392 </div> 1420 </div>
1393 </div> 1421 </div>
1394 <div class="table_panel_wrap_database" v-if="!tableGuid && activeTab === 'table'" 1422 <div class="table_panel_wrap_database" v-if="!tableGuid && activeTab === 'table'"
1395 :style="{ height: `calc(100% - ${tipHeight1}px)`, minHeight: '210px' }"> 1423 :style="{ height: '483px', minHeight: '210px' }">
1396 <Table :tableInfo="dataBaseTableInfo" @tablePageChange="dataBaseTablePageChange" 1424 <Table :tableInfo="dataBaseTableInfo" @tablePageChange="dataBaseTablePageChange"
1397 @tableSwitchBeforeChange="tableSwitchBeforeChange" /> 1425 @tableSwitchBeforeChange="tableSwitchBeforeChange" />
1398 </div> 1426 </div>
1399 <div class="table_field" v-if="tableGuid || activeTab === 'word'" 1427 <div class="table_field" v-if="tableGuid || activeTab === 'word'"
1400 :style="{ height: `calc(100% - ${tipHeight}px)`, minHeight: '210px' }"> 1428 :style="{ height: '523px', minHeight: '210px' }">
1401 <Table :tableInfo="tableFieldsDataInfo" /> 1429 <Table :tableInfo="tableFieldsDataInfo" @tablePageChange="dataFieldTablePageChange" />
1402 </div> 1430 </div>
1403 </div> 1431 </div>
1404 <Drawer :drawerInfo="drawerInfo" @drawerBtnClick="drawerBtnClick" class="v-drawer" /> 1432 <Drawer :drawerInfo="drawerInfo" @drawerBtnClick="drawerBtnClick" class="v-drawer" />
...@@ -1470,6 +1498,7 @@ onActivated(async () => { ...@@ -1470,6 +1498,7 @@ onActivated(async () => {
1470 1498
1471 .main_wrap { 1499 .main_wrap {
1472 padding: 11px 16px 0 16px; 1500 padding: 11px 16px 0 16px;
1501 height: 100%;
1473 1502
1474 .top-tool-tip { 1503 .top-tool-tip {
1475 display: flex; 1504 display: flex;
...@@ -1534,7 +1563,7 @@ onActivated(async () => { ...@@ -1534,7 +1563,7 @@ onActivated(async () => {
1534 1563
1535 .table_panel_wrap { 1564 .table_panel_wrap {
1536 width: 100%; 1565 width: 100%;
1537 height: calc(100% - 117px); 1566 height: 520px;
1538 min-height: 210px; 1567 min-height: 210px;
1539 overflow: visible; 1568 overflow: visible;
1540 } 1569 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!