2c58d9fe by lxs

Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop

2 parents 19a713f9 6429bf56
...@@ -49,11 +49,11 @@ export const checkDeleteDictionaryScheme = (params) => request({ ...@@ -49,11 +49,11 @@ export const checkDeleteDictionaryScheme = (params) => request({
49 data: params 49 data: params
50 }) 50 })
51 // 分页查询 51 // 分页查询
52 // export const getDictionary = (params) => request({ 52 export const getDictionary = (params) => request({
53 // url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/page-list`, 53 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/page-list`,
54 // method: 'post', 54 method: 'post',
55 // data: params 55 data: params
56 // }) 56 })
57 // 查询数据字典启用状态的数据 57 // 查询数据字典启用状态的数据
58 export const getDictionaryAll = (params) => request({ 58 export const getDictionaryAll = (params) => request({
59 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/list-all`, 59 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/list-all`,
...@@ -598,10 +598,10 @@ export const filterVal = (val, type) => { ...@@ -598,10 +598,10 @@ export const filterVal = (val, type) => {
598 /** 获取字典列表 598 /** 获取字典列表
599 * VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据 599 * VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据
600 */ 600 */
601 export const getDictionary = (params) => request({ 601 // export const getDictionary = (params) => request({
602 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/data-dictionary-general/list-all?state=1`, 602 // url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/data-dictionary-general/list-all?state=1`,
603 method: 'post' 603 // method: 'post'
604 }) 604 // })
605 605
606 606
607 607
......
...@@ -24,7 +24,8 @@ import { ...@@ -24,7 +24,8 @@ import {
24 getDbDirDetail, 24 getDbDirDetail,
25 getDbDirTableSelectList, 25 getDbDirTableSelectList,
26 getDbDirFieldSelectList, 26 getDbDirFieldSelectList,
27 updateDataAsset 27 updateDataAsset,
28 getDictionaryAll
28 } from '@/api/modules/dataInventory'; 29 } from '@/api/modules/dataInventory';
29 import { TableColumnWidth } from "@/utils/enum"; 30 import { TableColumnWidth } from "@/utils/enum";
30 import router from "@/router"; 31 import router from "@/router";
...@@ -34,6 +35,10 @@ import { getLabelList } from "@/api/modules/dataLabel"; ...@@ -34,6 +35,10 @@ import { getLabelList } from "@/api/modules/dataLabel";
34 const currentPath = ref<string[]>([]); 35 const currentPath = ref<string[]>([]);
35 const { proxy } = getCurrentInstance() as any; 36 const { proxy } = getCurrentInstance() as any;
36 const route = useRoute(); 37 const route = useRoute();
38 // 分级引用refGradeGuid
39 const refGradeGuid = ref('');
40 // 初始分类classifyDetailGuid
41 const classifyDetailGuidInfo = ref('');
37 // 分级分类树形列表 42 // 分级分类树形列表
38 const CgDirTreeList = ref(); 43 const CgDirTreeList = ref();
39 const getCgDirTreeData = async () => { 44 const getCgDirTreeData = async () => {
...@@ -48,7 +53,9 @@ const getCgDirTreeData = async () => { ...@@ -48,7 +53,9 @@ const getCgDirTreeData = async () => {
48 currentPath.value = [res.data[0].classifyName]; 53 currentPath.value = [res.data[0].classifyName];
49 treeInfo.value.expandedKey.push(res.data[0].classifyDetailGuid); 54 treeInfo.value.expandedKey.push(res.data[0].classifyDetailGuid);
50 treeInfo.value.currentNodeKey = res.data[0].classifyDetailGuid; 55 treeInfo.value.currentNodeKey = res.data[0].classifyDetailGuid;
56 classifyDetailGuidInfo.value = res.data[0].classifyDetailGuid;
51 searchItemList.value[1].options = res.data; 57 searchItemList.value[1].options = res.data;
58 refGradeGuid.value = res.data[0].refGradeGuid;
52 treeInfo.value.loading = false; 59 treeInfo.value.loading = false;
53 } else { 60 } else {
54 proxy.$ElMessage.error(res.msg); 61 proxy.$ElMessage.error(res.msg);
...@@ -63,8 +70,9 @@ const getCgDirFieldPage = async (params = {}) => { ...@@ -63,8 +70,9 @@ const getCgDirFieldPage = async (params = {}) => {
63 pageIndex: 1, 70 pageIndex: 1,
64 pageSize: 50, 71 pageSize: 50,
65 execGuid: '', 72 execGuid: '',
66 classifyDetail: '', 73 classifyDetail: '', // 分类guid
67 gradeDetailGuid: '', 74 gradeDetailGuid: '', // 分级guid
75 labelGuid: '',
68 databaseGuid: '', 76 databaseGuid: '',
69 tableGuid: '', 77 tableGuid: '',
70 fieldGuid: '', 78 fieldGuid: '',
...@@ -84,8 +92,9 @@ const getCgDirFieldPage = async (params = {}) => { ...@@ -84,8 +92,9 @@ const getCgDirFieldPage = async (params = {}) => {
84 }; 92 };
85 93
86 const dictionaryList = ref([]); 94 const dictionaryList = ref([]);
95
87 const getDictionaryList = () => { 96 const getDictionaryList = () => {
88 getDictionary({}).then((res: any) => { 97 getDictionaryAll({ state: 1 }).then((res: any) => {
89 dictionaryList.value = []; 98 dictionaryList.value = [];
90 if (res.code == proxy.$passCode) { 99 if (res.code == proxy.$passCode) {
91 dictionaryList.value = res.data || []; 100 dictionaryList.value = res.data || [];
...@@ -112,11 +121,13 @@ onMounted(async () => { ...@@ -112,11 +121,13 @@ onMounted(async () => {
112 await getExecGuid(); 121 await getExecGuid();
113 await getCgDirTreeData(); 122 await getCgDirTreeData();
114 await getCgDirFieldPage({ 123 await getCgDirFieldPage({
115 execGuid: execGuidInfo.value.execGuid 124 execGuid: execGuidInfo.value.execGuid,
125 classifyDetail: classifyDetailGuidInfo.value
116 }); 126 });
117 getDictionaryList(); 127 getDictionaryList();
118 getSearchTableList(); 128 getSearchTableList();
119 getLabelListData(); 129 getLabelListData();
130 getGradeData(refGradeGuid.value);
120 131
121 }) 132 })
122 133
...@@ -159,7 +170,7 @@ const searchItemList = ref([ ...@@ -159,7 +170,7 @@ const searchItemList = ref([
159 options: [], 170 options: [],
160 props: { 171 props: {
161 label: 'label', 172 label: 'label',
162 value: 'label', 173 value: 'guid',
163 }, 174 },
164 clearable: true, 175 clearable: true,
165 filterable: true, 176 filterable: true,
...@@ -176,7 +187,7 @@ const searchItemList = ref([ ...@@ -176,7 +187,7 @@ const searchItemList = ref([
176 lazy: false, 187 lazy: false,
177 props: { 188 props: {
178 label: "classifyName", 189 label: "classifyName",
179 value: "classifyName", 190 value: "classifyDetailGuid",
180 }, 191 },
181 block: false, 192 block: false,
182 filterable: false, 193 filterable: false,
...@@ -192,7 +203,7 @@ const searchItemList = ref([ ...@@ -192,7 +203,7 @@ const searchItemList = ref([
192 options: [], 203 options: [],
193 props: { 204 props: {
194 label: 'name', 205 label: 'name',
195 value: 'name', 206 value: 'guid',
196 }, 207 },
197 clearable: true, 208 clearable: true,
198 }, 209 },
...@@ -207,16 +218,15 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -207,16 +218,15 @@ const toSearch = (val: any, clear: boolean = false) => {
207 selectedC.value = null; 218 selectedC.value = null;
208 searchItemList.value.map(item => item.default = '') 219 searchItemList.value.map(item => item.default = '')
209 } 220 }
210 console.log('toSearch', val); 221 console.log('toSearch', val, classifyDetailGuidInfo.value);
211 // 差一个label标签 -- 未完成
212 if (activeName.value === 'first') { 222 if (activeName.value === 'first') {
213 getCgDirFieldPage({ 223 getCgDirFieldPage({
214 pageIndex: 1, 224 pageIndex: 1,
215 pageSize: 50, 225 pageSize: 50,
216 execGuid: execGuidInfo.value.execGuid, 226 execGuid: execGuidInfo.value.execGuid,
217 classifyDetail: val.classifyName, 227 classifyDetail: classifyDetailGuidInfo.value,
218 gradeDetailGuid: val.levelName, 228 gradeDetailGuid: val.levelName,
219 label: val.labelName, 229 labelGuid: val.labelName,
220 databaseGuid: selectedA.value, 230 databaseGuid: selectedA.value,
221 tableGuid: selectedB.value, 231 tableGuid: selectedB.value,
222 fieldGuid: selectedC.value, 232 fieldGuid: selectedC.value,
...@@ -227,12 +237,11 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -227,12 +237,11 @@ const toSearch = (val: any, clear: boolean = false) => {
227 pageIndex: 1, 237 pageIndex: 1,
228 pageSize: 50, 238 pageSize: 50,
229 execGuid: execGuidInfo.value.execGuid, 239 execGuid: execGuidInfo.value.execGuid,
230 database: selectedA.value || '', 240 tableGuid: selectedB.value || tableGuid.value || '',
231 tableName: selectedB.value || '', 241 databaseGuid: selectedA.value || dataBaseGuid.value || '',
232 fieldName: selectedC.value || '', 242 classifyDetailGuid: val.classifyName,
233 classifyDetailName: val.classifyName, 243 gradeDetailGuid: val.levelName,
234 gradeDetailName: val.levelName, 244 labelGuid: val.labelName,
235 label: val.labelName,
236 }); 245 });
237 } 246 }
238 if (activeName.value === 'second' && activeTab.value === 'word') { 247 if (activeName.value === 'second' && activeTab.value === 'word') {
...@@ -240,11 +249,12 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -240,11 +249,12 @@ const toSearch = (val: any, clear: boolean = false) => {
240 pageIndex: 1, 249 pageIndex: 1,
241 pageSize: 50, 250 pageSize: 50,
242 execGuid: execGuidInfo.value.execGuid, 251 execGuid: execGuidInfo.value.execGuid,
243 database: selectedA.value || '', 252 tableGuid: selectedB.value || tableGuid.value || '',
244 tableName: selectedB.value || '', 253 databaseGuid: selectedA.value || dataBaseGuid.value || '',
245 classifyDetailName: val.classifyName, 254 fieldGuid: selectedC.value || '',
246 gradeDetailName: val.levelName, 255 classifyDetailGuid: val.classifyName,
247 label: val.labelName, 256 gradeDetailGuid: val.levelName,
257 labelGuid: val.labelName,
248 }); 258 });
249 } 259 }
250 }; 260 };
...@@ -253,8 +263,10 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -253,8 +263,10 @@ const toSearch = (val: any, clear: boolean = false) => {
253 const nodeClick = async (data: any) => { 263 const nodeClick = async (data: any) => {
254 console.log('nodeClick', data); 264 console.log('nodeClick', data);
255 const { guid, classifyDetailGuid, refGradeGuid } = data 265 const { guid, classifyDetailGuid, refGradeGuid } = data
256 getGradeData(refGradeGuid); 266 classifyDetailGuidInfo.value = classifyDetailGuid;
267 // getGradeData(refGradeGuid);
257 searchItemList.value[1].default = data.classifyName; 268 searchItemList.value[1].default = data.classifyName;
269
258 await getCgDirFieldPage({ 270 await getCgDirFieldPage({
259 execGuid: execGuidInfo.value.execGuid, 271 execGuid: execGuidInfo.value.execGuid,
260 classifyDetail: classifyDetailGuid, 272 classifyDetail: classifyDetailGuid,
...@@ -368,7 +380,8 @@ const tablePageChange = (info) => { ...@@ -368,7 +380,8 @@ const tablePageChange = (info) => {
368 getCgDirFieldPage({ 380 getCgDirFieldPage({
369 pageIndex: info.curr, 381 pageIndex: info.curr,
370 pageSize: info.limit, 382 pageSize: info.limit,
371 execGuid: execGuidInfo.value.execGuid 383 execGuid: execGuidInfo.value.execGuid,
384 classifyDetail: classifyDetailGuidInfo.value
372 }); 385 });
373 } 386 }
374 387
...@@ -403,11 +416,13 @@ const tableCheckboxAllSelectChange = (select) => { ...@@ -403,11 +416,13 @@ const tableCheckboxAllSelectChange = (select) => {
403 416
404 // 批量配置业务规则 417 // 批量配置业务规则
405 const batchControlRules = () => { 418 const batchControlRules = () => {
419 console.log('selectedRulesData', selectedRulesData.value);
406 // 判断是否选中数据 420 // 判断是否选中数据
407 if (!selectedRulesData.value || !selectedRulesData.value.guids || selectedRulesData.value.guids.length == 0) { 421 if (!selectedRulesData.value || !selectedRulesData.value.guids || selectedRulesData.value.guids.length == 0) {
408 proxy.$ElMessage.warning('请选择数据'); 422 proxy.$ElMessage.warning('请选择数据');
409 return; 423 return;
410 } 424 }
425
411 drawerInfo.value.visible = true; 426 drawerInfo.value.visible = true;
412 classEditFormItems.value[0].default = selectedRulesData.value.rulesName; 427 classEditFormItems.value[0].default = selectedRulesData.value.rulesName;
413 } 428 }
...@@ -471,7 +486,7 @@ const dataBaseTableInfo = ref({ ...@@ -471,7 +486,7 @@ const dataBaseTableInfo = ref({
471 return status == 0 ? '草稿中' : status == 1 ? '已建表' : '已有默认表'; 486 return status == 0 ? '草稿中' : status == 1 ? '已建表' : '已有默认表';
472 } 487 }
473 }, 488 },
474 { label: "任务修改人", field: "updateUserName", width: 100 }, 489 { label: "任务修改人", field: "taskUpdateUserName", width: 100 },
475 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME }, 490 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
476 { label: "描述", field: "description", width: 120, align: 'center' }, 491 { label: "描述", field: "description", width: 120, align: 'center' },
477 { label: "规划数据资产", field: "isDataAsset", type: 'switch', activeText: '是', inactiveText: '否', activeValue: 'Y', inactiveValue: 'N', switchWidth: 56, width: 120, align: 'center' }, 492 { label: "规划数据资产", field: "isDataAsset", type: 'switch', activeText: '是', inactiveText: '否', activeValue: 'Y', inactiveValue: 'N', switchWidth: 56, width: 120, align: 'center' },
...@@ -778,22 +793,20 @@ const drawerBtnClick = async (btn, info) => { ...@@ -778,22 +793,20 @@ const drawerBtnClick = async (btn, info) => {
778 execGuid: execGuidInfo.value.execGuid 793 execGuid: execGuidInfo.value.execGuid
779 }) 794 })
780 }); 795 });
781 // const params = {
782 // fieldPrecision,
783 // dictionaryGuid,
784 // isUnique,
785 // isNotNull,
786 // fieldLengthCondition,
787 // fieldValueRange,
788 // fieldGuid: selectedRulesData.value.guids,
789 // execGuid: execGuidInfo.value.execGuid
790 // }
791 const res: any = await saveBizRuleConfig(params); 796 const res: any = await saveBizRuleConfig(params);
792 if (res.code == proxy.$passCode) { 797 if (res.code == proxy.$passCode) {
793 btn.loading = false; 798 btn.loading = false;
794 proxy.$ElMessage.success('配置成功!'); 799 proxy.$ElMessage.success('配置成功!');
795 drawerInfo.value.visible = false; 800 drawerInfo.value.visible = false;
796 getCgDirFieldPage(); 801 getCgDirFieldPage({
802 execGuid: execGuidInfo.value.execGuid,
803 classifyDetail: classifyDetailGuidInfo.value,
804 gradeDetailGuid: levelGuidInfo.value,
805 labelGuid: labelGuidInfo.value,
806 databaseGuid: selectedA.value,
807 tableGuid: selectedB.value,
808 fieldGuid: selectedC.value,
809 });
797 } else { 810 } else {
798 btn.loading = false; 811 btn.loading = false;
799 proxy.$ElMessage.error(res.msg); 812 proxy.$ElMessage.error(res.msg);
...@@ -817,6 +830,7 @@ const handleClick = (tab: any) => { ...@@ -817,6 +830,7 @@ const handleClick = (tab: any) => {
817 console.log(tab.props.name); 830 console.log(tab.props.name);
818 activeName.value = tab.props.name; 831 activeName.value = tab.props.name;
819 if (tab.props.name === 'second') { 832 if (tab.props.name === 'second') {
833 classifyDetailGuidInfo.value = '';
820 selectedA.value = null; 834 selectedA.value = null;
821 selectedB.value = null; 835 selectedB.value = null;
822 selectedC.value = null; 836 selectedC.value = null;
...@@ -845,8 +859,7 @@ const getDataBaseTreeData = async () => { ...@@ -845,8 +859,7 @@ const getDataBaseTreeData = async () => {
845 dataBaseTreeInfo.value.loading = true; 859 dataBaseTreeInfo.value.loading = true;
846 const res: any = await getDbDirTreeList({}); 860 const res: any = await getDbDirTreeList({});
847 if (res.code == proxy.$passCode) { 861 if (res.code == proxy.$passCode) {
848 const dataArray = [res.data]; 862 const dataArray = res.data;
849 console.log('dataArray', dataArray, typeof dataArray);
850 // 遍历并添加 GUIDs 863 // 遍历并添加 GUIDs
851 dataArray.forEach(addGuids); 864 dataArray.forEach(addGuids);
852 // 更新到绑定的响应式数据 865 // 更新到绑定的响应式数据
...@@ -865,11 +878,7 @@ const addGuids = (node) => { ...@@ -865,11 +878,7 @@ const addGuids = (node) => {
865 } else if (node.tableGuid) { 878 } else if (node.tableGuid) {
866 node.guid = node.tableGuid; 879 node.guid = node.tableGuid;
867 node.name = node.tableChName; 880 node.name = node.tableChName;
868 } else {
869 node.guid = '1';
870 node.name = node.cgDirName;
871 } 881 }
872
873 if (node.children && Array.isArray(node.children)) { 882 if (node.children && Array.isArray(node.children)) {
874 node.children.forEach(addGuids); 883 node.children.forEach(addGuids);
875 } 884 }
...@@ -883,14 +892,14 @@ const getDataBaseTableData = async (params = {}) => { ...@@ -883,14 +892,14 @@ const getDataBaseTableData = async (params = {}) => {
883 const dataBaseParams = { 892 const dataBaseParams = {
884 pageIndex: dataBasePage.value.curr, 893 pageIndex: dataBasePage.value.curr,
885 pageSize: dataBasePage.value.limit, 894 pageSize: dataBasePage.value.limit,
886 databaseGuid: "",
887 isDataAsset: '', 895 isDataAsset: '',
888 execGuid: execGuidInfo.value.execGuid, 896 execGuid: execGuidInfo.value.execGuid,
889 tableName: "", 897 tableGuid: tableGuid.value,
890 database: "", 898 databaseGuid: dataBaseGuid.value,
891 label: "", 899 fieldGuid: "",
892 classifyDetailName: "", 900 labelGuid: "",
893 gradeDetailName: "" 901 classifyDetailGuid: "",
902 gradeDetailGuid: ""
894 }; 903 };
895 const finalParams = { ...dataBaseParams, ...params }; 904 const finalParams = { ...dataBaseParams, ...params };
896 905
...@@ -934,11 +943,13 @@ const getDataBaseFieldData = async (params = {}) => { ...@@ -934,11 +943,13 @@ const getDataBaseFieldData = async (params = {}) => {
934 const dataBaseParams = { 943 const dataBaseParams = {
935 pageIndex: dataFieldPage.value.curr, 944 pageIndex: dataFieldPage.value.curr,
936 pageSize: dataFieldPage.value.limit, 945 pageSize: dataFieldPage.value.limit,
937 tableGuid: "",
938 execGuid: execGuidInfo.value.execGuid, 946 execGuid: execGuidInfo.value.execGuid,
939 databaseGuid: "", 947 tableGuid: tableGuid.value || '',
940 fieldName: '', 948 databaseGuid: dataBaseGuid.value || '',
941 gradeDetailName: '', 949 fieldGuid: "",
950 labelGuid: "",
951 classifyDetailGuid: "",
952 gradeDetailGuid: ""
942 }; 953 };
943 const finalParams = { ...dataBaseParams, ...params }; 954 const finalParams = { ...dataBaseParams, ...params };
944 const res: any = await getDbDirFieldPageList(finalParams); 955 const res: any = await getDbDirFieldPageList(finalParams);
...@@ -1007,12 +1018,6 @@ const dataBaseInfo = ref<any>({}); ...@@ -1007,12 +1018,6 @@ const dataBaseInfo = ref<any>({});
1007 const dataBasenodeClick = (data: any) => { 1018 const dataBasenodeClick = (data: any) => {
1008 isShowCreateBtn.value = false; 1019 isShowCreateBtn.value = false;
1009 console.log('dataBasenodeClick', data); 1020 console.log('dataBasenodeClick', data);
1010 if (data.cgDirName) {
1011 tableGuid.value = '';
1012 dataBaseGuid.value = '';
1013 getDataBaseFieldData();
1014 getDataBaseTableData();
1015 }
1016 if (data.databaseGuid) { 1021 if (data.databaseGuid) {
1017 dataBaseInfo.value = data; 1022 dataBaseInfo.value = data;
1018 dataBaseGuid.value = data.databaseGuid; 1023 dataBaseGuid.value = data.databaseGuid;
...@@ -1031,9 +1036,7 @@ const dataBasenodeClick = (data: any) => { ...@@ -1031,9 +1036,7 @@ const dataBasenodeClick = (data: any) => {
1031 getDataBaseFieldData({ 1036 getDataBaseFieldData({
1032 tableGuid: data.tableGuid 1037 tableGuid: data.tableGuid
1033 }); 1038 });
1034 // getDataBaseTableData({ 1039
1035 // tableGuid: data.tableGuid
1036 // });
1037 } 1040 }
1038 1041
1039 if (data.databaseGuid || data.cgDirName) { 1042 if (data.databaseGuid || data.cgDirName) {
...@@ -1118,7 +1121,7 @@ const setActiveTab = (tab) => { ...@@ -1118,7 +1121,7 @@ const setActiveTab = (tab) => {
1118 // 数据库字段搜索联动 getDbDirFieldSelectList 1121 // 数据库字段搜索联动 getDbDirFieldSelectList
1119 const getDbDirFieldSelectData = async (type, params = {}) => { 1122 const getDbDirFieldSelectData = async (type, params = {}) => {
1120 const inParams = { 1123 const inParams = {
1121 condition: "database", 1124 condition: "1",
1122 database: "", 1125 database: "",
1123 tableName: "", 1126 tableName: "",
1124 execGuid: execGuidInfo.value.execGuid, 1127 execGuid: execGuidInfo.value.execGuid,
...@@ -1129,14 +1132,20 @@ const getDbDirFieldSelectData = async (type, params = {}) => { ...@@ -1129,14 +1132,20 @@ const getDbDirFieldSelectData = async (type, params = {}) => {
1129 console.log('getDbDirFieldSelectData', res); 1132 console.log('getDbDirFieldSelectData', res);
1130 if (type == 1) { 1133 if (type == 1) {
1131 optionsA.value = res.data.map((item) => ({ 1134 optionsA.value = res.data.map((item) => ({
1132 dbGuid: item.database, // 数据库标识 1135 dbGuid: item.databaseGuid, // 数据库标识
1133 name: item.database, // 数据库名称 1136 name: item.databaseChName, // 数据库名称
1134 })); 1137 }));
1135 } 1138 }
1136 if (type == 2) { 1139 if (type == 2) {
1137 optionsB.value = res.data.map((item) => ({ 1140 optionsB.value = res.data.map((item) => ({
1138 dbGuid: item.tableName, // 表标识 1141 dbGuid: item.tableGuid, // 表标识
1139 name: item.tableName, // 表名称 1142 name: item.tableChName, // 表名称
1143 }));
1144 }
1145 if (type == 3) {
1146 optionsC.value = res.data.map((item) => ({
1147 dbGuid: item.fieldGuid, // 字段标识
1148 name: item.fieldChName, // 字段名称
1140 })); 1149 }));
1141 } 1150 }
1142 } else { 1151 } else {
...@@ -1169,10 +1178,11 @@ const getSearchTableList = async (type = 1, dbGuid = '') => { ...@@ -1169,10 +1178,11 @@ const getSearchTableList = async (type = 1, dbGuid = '') => {
1169 const getDbDirTableSelectData = async (type, params = {}) => { 1178 const getDbDirTableSelectData = async (type, params = {}) => {
1170 console.log('getDbDirTableSelectData', params); 1179 console.log('getDbDirTableSelectData', params);
1171 const inParams = { 1180 const inParams = {
1172 condition: "database", 1181 condition: "1",
1173 database: "",
1174 tableName: "",
1175 execGuid: execGuidInfo.value.execGuid, 1182 execGuid: execGuidInfo.value.execGuid,
1183 databaseGuid: "",
1184 tableGuid: "",
1185
1176 }; 1186 };
1177 const finalParams = { ...inParams, ...params }; 1187 const finalParams = { ...inParams, ...params };
1178 const res: any = await getDbDirTableSelectList(finalParams); 1188 const res: any = await getDbDirTableSelectList(finalParams);
...@@ -1180,21 +1190,28 @@ const getDbDirTableSelectData = async (type, params = {}) => { ...@@ -1180,21 +1190,28 @@ const getDbDirTableSelectData = async (type, params = {}) => {
1180 1190
1181 if (type == 1) { 1191 if (type == 1) {
1182 optionsA.value = res.data.map((item) => ({ 1192 optionsA.value = res.data.map((item) => ({
1183 dbGuid: item.database, // 数据库标识 1193 dbGuid: item.databaseGuid, // 数据库标识
1184 name: item.database, // 数据库名称 1194 name: item.databaseChName, // 数据库名称
1185 })); 1195 }));
1186 } 1196 }
1187 if (type == 2) { 1197 if (type == 2) {
1188 console.log('进来了吗', res); 1198 if (activeTab.value === 'word') {
1199 console.log('进来了吗', res.data);
1200 optionsC.value = res.data.map((item) => ({
1201 dbGuid: item.fieldName, // 字段标识
1202 name: item.fieldName, // 字段名称
1203 }));
1204 return;
1205 }
1189 optionsB.value = res.data.map((item) => ({ 1206 optionsB.value = res.data.map((item) => ({
1190 dbGuid: item.database, // 表标识 1207 dbGuid: item.tableGuid, // 表标识
1191 name: item.database, // 表名称 1208 name: item.tableChName, // 表名称
1192 })); 1209 }));
1193 } 1210 }
1194 if (type == 3) { 1211 if (type == 3) {
1195 optionsC.value = res.data.map((item) => ({ 1212 optionsC.value = res.data.map((item) => ({
1196 dbGuid: item.database, // 字段标识 1213 dbGuid: item.fieldGuid, // 字段标识
1197 name: item.database, // 字段名称 1214 name: item.fieldChName, // 字段名称
1198 })); 1215 }));
1199 } 1216 }
1200 1217
...@@ -1223,10 +1240,14 @@ const onAChange = async () => { ...@@ -1223,10 +1240,14 @@ const onAChange = async () => {
1223 await getSearchTableList(2, selectedA.value); // 分类分级搜索 1240 await getSearchTableList(2, selectedA.value); // 分类分级搜索
1224 } 1241 }
1225 if (activeName.value == 'second') { 1242 if (activeName.value == 'second') {
1226 console.log('onAChange', optionsA.value); 1243 if (activeTab.value === 'word') {
1227 await getDbDirTableSelectData(2, { database: selectedA.value }); // 数据库搜索 1244 await getDbDirFieldSelectData(2, { databaseGuid: selectedA.value, condition: "2" });
1245 } else {
1246 await getDbDirTableSelectData(2, { databaseGuid: selectedA.value, condition: "2" }); // 数据库搜索
1247 }
1228 } 1248 }
1229 1249
1250
1230 }; 1251 };
1231 1252
1232 // 第二个下拉框值改变时 1253 // 第二个下拉框值改变时
...@@ -1239,7 +1260,9 @@ const onBChange = async () => { ...@@ -1239,7 +1260,9 @@ const onBChange = async () => {
1239 await getSearchTableList(3, selectedB.value); // 分类分级搜索 1260 await getSearchTableList(3, selectedB.value); // 分类分级搜索
1240 } 1261 }
1241 if (activeName.value == 'second') { 1262 if (activeName.value == 'second') {
1242 await getDbDirTableSelectData(3, { tableName: selectedB.value }); // 数据库搜索 1263 if (activeTab.value === 'word') {
1264 await getDbDirFieldSelectData(3, { tableGuid: selectedB.value, databaseGuid: selectedA.value, condition: "3" });
1265 }
1243 } 1266 }
1244 }; 1267 };
1245 1268
...@@ -1261,10 +1284,19 @@ const exportDB = async () => { ...@@ -1261,10 +1284,19 @@ const exportDB = async () => {
1261 }); 1284 });
1262 } 1285 }
1263 1286
1264 // 分类选择 1287
1265 const treeSelectNodeChange = (node, item) => { 1288 // 标签guid
1266 const { refGradeGuid } = node; 1289 const labelGuidInfo = ref('');
1267 getGradeData(refGradeGuid); 1290 // 分级guid信息
1291 const levelGuidInfo = ref('');
1292 // 标签选择
1293 const selectChange = (val, row, info) => {
1294 console.log('selectChange', val, row, info);
1295 if (info) {
1296 labelGuidInfo.value = info.labelName;
1297 classifyDetailGuidInfo.value = info.classifyName;
1298 levelGuidInfo.value = info.levelName;
1299 }
1268 } 1300 }
1269 1301
1270 // 这里应该是onActivated 钩子,路由从configure-路由从configure-rules跳转过来要重新请求数据、 1302 // 这里应该是onActivated 钩子,路由从configure-路由从configure-rules跳转过来要重新请求数据、
...@@ -1285,6 +1317,12 @@ onActivated(async () => { ...@@ -1285,6 +1317,12 @@ onActivated(async () => {
1285 } 1317 }
1286 }); 1318 });
1287 1319
1320 const treeSelectNodeClick = (node, item) => {
1321 treeInfo.value.expandedKey = [];
1322 treeInfo.value.expandedKey.push(node.classifyDetailGuid);
1323 treeInfo.value.currentNodeKey = node.classifyDetailGuid;
1324 }
1325
1288 </script> 1326 </script>
1289 1327
1290 <template> 1328 <template>
...@@ -1299,11 +1337,11 @@ onActivated(async () => { ...@@ -1299,11 +1337,11 @@ onActivated(async () => {
1299 <el-option v-for="item in optionsB" :key="item.dbGuid" :label="item.name" :value="item.dbGuid" /> 1337 <el-option v-for="item in optionsB" :key="item.dbGuid" :label="item.name" :value="item.dbGuid" />
1300 </el-select> 1338 </el-select>
1301 <el-select v-model="selectedC" placeholder="选择字段名" :disabled="!selectedB" style="width: 140px;margin-right: 8px" 1339 <el-select v-model="selectedC" placeholder="选择字段名" :disabled="!selectedB" style="width: 140px;margin-right: 8px"
1302 :clearable="true" v-if="isShowWordSearch"> 1340 :clearable="true" v-if="!(activeTab === 'table' && activeName === 'second')">
1303 <el-option v-for="item in optionsC" :key="item.dbGuid" :label="item.name" :value="item.dbGuid" /> 1341 <el-option v-for="item in optionsC" :key="item.dbGuid" :label="item.name" :value="item.dbGuid" />
1304 </el-select> 1342 </el-select>
1305 <TableTools :searchItems="searchItemList" :init="false" :searchId="'files-standard-search'" @search="toSearch" 1343 <TableTools :searchItems="searchItemList" :init="false" :searchId="'files-standard-search'" @search="toSearch"
1306 @treeSelectNodeChange="treeSelectNodeChange" /> 1344 @selectChange="selectChange" @treeSelectNodeClick="treeSelectNodeClick" />
1307 </div> 1345 </div>
1308 <div class="container_wrap full flex"> 1346 <div class="container_wrap full flex">
1309 <div class="aside_wrap"> 1347 <div class="aside_wrap">
...@@ -1419,13 +1457,11 @@ onActivated(async () => { ...@@ -1419,13 +1457,11 @@ onActivated(async () => {
1419 <el-checkbox v-model="checked" label="仅看规划数据资产表" size="large" @change="changeCheck" /> 1457 <el-checkbox v-model="checked" label="仅看规划数据资产表" size="large" @change="changeCheck" />
1420 </div> 1458 </div>
1421 </div> 1459 </div>
1422 <div class="table_panel_wrap_database" v-if="!tableGuid && activeTab === 'table'" 1460 <div class="table_panel_wrap_database" v-if="!tableGuid && activeTab === 'table'">
1423 :style="{ height: '483px', minHeight: '210px' }">
1424 <Table :tableInfo="dataBaseTableInfo" @tablePageChange="dataBaseTablePageChange" 1461 <Table :tableInfo="dataBaseTableInfo" @tablePageChange="dataBaseTablePageChange"
1425 @tableSwitchBeforeChange="tableSwitchBeforeChange" /> 1462 @tableSwitchBeforeChange="tableSwitchBeforeChange" />
1426 </div> 1463 </div>
1427 <div class="table_field" v-if="tableGuid || activeTab === 'word'" 1464 <div class="table_field" v-if="tableGuid || activeTab === 'word'">
1428 :style="{ height: '523px', minHeight: '210px' }">
1429 <Table :tableInfo="tableFieldsDataInfo" @tablePageChange="dataFieldTablePageChange" /> 1465 <Table :tableInfo="tableFieldsDataInfo" @tablePageChange="dataFieldTablePageChange" />
1430 </div> 1466 </div>
1431 </div> 1467 </div>
...@@ -1455,6 +1491,7 @@ onActivated(async () => { ...@@ -1455,6 +1491,7 @@ onActivated(async () => {
1455 padding: 0; 1491 padding: 0;
1456 display: flex; 1492 display: flex;
1457 justify-content: space-between; 1493 justify-content: space-between;
1494 height: calc(100% - 44px);
1458 1495
1459 .aside_wrap { 1496 .aside_wrap {
1460 width: 199px; 1497 width: 199px;
...@@ -1563,19 +1600,21 @@ onActivated(async () => { ...@@ -1563,19 +1600,21 @@ onActivated(async () => {
1563 1600
1564 .table_panel_wrap { 1601 .table_panel_wrap {
1565 width: 100%; 1602 width: 100%;
1566 height: 520px; 1603 height: calc(100% - 130px);
1567 min-height: 210px; 1604 min-height: 210px;
1568 overflow: visible; 1605 overflow: visible;
1569 } 1606 }
1570 1607
1571 .table_panel_wrap_database { 1608 .table_panel_wrap_database {
1572 width: 100%; 1609 width: 100%;
1610 height: calc(100% - 170px);
1573 min-height: 210px; 1611 min-height: 210px;
1574 overflow: visible; 1612 overflow: visible;
1575 } 1613 }
1576 1614
1577 .table_field { 1615 .table_field {
1578 width: 100%; 1616 width: 100%;
1617 height: calc(100% - 130px);
1579 min-height: 210px; 1618 min-height: 210px;
1580 overflow: visible; 1619 overflow: visible;
1581 } 1620 }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 <script lang="ts" setup name="configureRules"> 5 <script lang="ts" setup name="configureRules">
6 import { ref } from "vue"; 6 import { ref } from "vue";
7 import useUserStore from "@/store/modules/user"; 7 import useUserStore from "@/store/modules/user";
8 import { getBizRuleConfigDetail, getNewDataTypeList, saveBizRuleConfig, } from '@/api/modules/dataInventory' 8 import { getBizRuleConfigDetail, getDictionaryAll, getNewDataTypeList, saveBizRuleConfig, } from '@/api/modules/dataInventory'
9 const { proxy } = getCurrentInstance() as any; 9 const { proxy } = getCurrentInstance() as any;
10 const router = useRouter(); 10 const router = useRouter();
11 const route = useRoute(); 11 const route = useRoute();
...@@ -45,9 +45,24 @@ const getFieldTypeData = async () => { ...@@ -45,9 +45,24 @@ const getFieldTypeData = async () => {
45 } 45 }
46 } 46 }
47 47
48 // 获取字典
49 const dictionaryList = ref([]);
50
51 const getDictionaryList = () => {
52 getDictionaryAll({ state: 1 }).then((res: any) => {
53 dictionaryList.value = [];
54 if (res.code == proxy.$passCode) {
55 dictionaryList.value = res.data || [];
56 } else {
57 proxy.$ElMessage.error(res.msg);
58 }
59 })
60 };
61
48 onMounted(async () => { 62 onMounted(async () => {
49 await getFieldTypeData() 63 await getFieldTypeData()
50 await getBizRuleConfigDetailData() 64 await getBizRuleConfigDetailData()
65 getDictionaryList()
51 }) 66 })
52 67
53 68
...@@ -78,6 +93,7 @@ const selectedRows = ref([]); ...@@ -78,6 +93,7 @@ const selectedRows = ref([]);
78 // 监听选中行变化 93 // 监听选中行变化
79 const selectionFieldsChange = (selection) => { 94 const selectionFieldsChange = (selection) => {
80 selectedRows.value = selection; 95 selectedRows.value = selection;
96 console.log('selectedRows', selectedRows.value)
81 }; 97 };
82 98
83 // 上移操作 99 // 上移操作
...@@ -87,7 +103,7 @@ const moveUp = () => { ...@@ -87,7 +103,7 @@ const moveUp = () => {
87 return; 103 return;
88 } 104 }
89 selectedRows.value.forEach((row: any) => { 105 selectedRows.value.forEach((row: any) => {
90 const index = tableData.value.findIndex((item) => item.tableData === row.tableData); 106 const index = tableData.value.findIndex((item) => item.fieldGuid === row.fieldGuid);
91 if (index > 0) { 107 if (index > 0) {
92 [tableData.value[index - 1], tableData.value[index]] = [ 108 [tableData.value[index - 1], tableData.value[index]] = [
93 tableData.value[index], 109 tableData.value[index],
...@@ -105,7 +121,7 @@ const moveDown = () => { ...@@ -105,7 +121,7 @@ const moveDown = () => {
105 } 121 }
106 // 倒序遍历选中行 122 // 倒序遍历选中行
107 [...selectedRows.value].reverse().forEach((row: any) => { 123 [...selectedRows.value].reverse().forEach((row: any) => {
108 const index = tableData.value.findIndex((item) => item.tableData === row.tableData); 124 const index = tableData.value.findIndex((item) => item.fieldGuid === row.fieldGuid);
109 if (index < tableData.value.length - 1) { 125 if (index < tableData.value.length - 1) {
110 [tableData.value[index], tableData.value[index + 1]] = [ 126 [tableData.value[index], tableData.value[index + 1]] = [
111 tableData.value[index + 1], 127 tableData.value[index + 1],
...@@ -383,10 +399,13 @@ const cancel = () => { ...@@ -383,10 +399,13 @@ const cancel = () => {
383 <!-- 关联字典(可编辑)el-tree-select 形式下拉形式 --> 399 <!-- 关联字典(可编辑)el-tree-select 形式下拉形式 -->
384 <el-table-column prop="dictionaryGuid" label="关联字典" width="150" align="center"> 400 <el-table-column prop="dictionaryGuid" label="关联字典" width="150" align="center">
385 <template #default="scope"> 401 <template #default="scope">
386 <span v-if="!scope.row.isEdit || !editableFields.dictionaryGuid">{{ scope.row.isDict ? scope.row.isDict : 402 <span v-if="!scope.row.isEdit">{{ scope.row.dictionaryGuid
387 '--' }}</span> 403 ? dictionaryList.find((item: any) => item.guid === scope.row.dictionaryGuid)?.chName : '--' }}</span>
388 <el-tree-select v-else v-model="scope.row.isDict" :data="data" placeholder="请选择" /> 404 <el-select v-else v-model="scope.row.dictionaryGuid" placeholder="请选择">
405 <el-option v-for="item in dictionaryList" :key="item?.guid" :label="item.chName" :value="item.guid" />
406 </el-select>
389 </template> 407 </template>
408
390 </el-table-column> 409 </el-table-column>
391 410
392 <!-- 数据是否唯一(可编辑) --> 411 <!-- 数据是否唯一(可编辑) -->
......
...@@ -677,7 +677,7 @@ const treePromise = ref(); ...@@ -677,7 +677,7 @@ const treePromise = ref();
677 // 获取数据字典树形数据 677 // 获取数据字典树形数据
678 const getTreeData = (needClick = false, currData = {}) => { 678 const getTreeData = (needClick = false, currData = {}) => {
679 const params = { 679 const params = {
680 paramCode: 'data_structure_code' 680 paramCode: '数据字典类型'
681 } 681 }
682 treeInfo.value.loading = true 682 treeInfo.value.loading = true
683 treePromise.value = getDictionaryTree(params).then((res: any) => { 683 treePromise.value = getDictionaryTree(params).then((res: any) => {
......
...@@ -17,6 +17,7 @@ import { ...@@ -17,6 +17,7 @@ import {
17 getGradeList, 17 getGradeList,
18 getNewDataTypeList, 18 getNewDataTypeList,
19 getDbDirDetail, 19 getDbDirDetail,
20 getDictionaryAll,
20 } from "@/api/modules/dataInventory"; 21 } from "@/api/modules/dataInventory";
21 import existingTableSelect from "./existingTableSelect.vue"; 22 import existingTableSelect from "./existingTableSelect.vue";
22 import useUserStore from "@/store/modules/user"; 23 import useUserStore from "@/store/modules/user";
...@@ -30,6 +31,21 @@ const fullPath = route.fullPath; ...@@ -30,6 +31,21 @@ const fullPath = route.fullPath;
30 const userStore = useUserStore(); 31 const userStore = useUserStore();
31 const execGuid: any = ref(route.query.execGuid); 32 const execGuid: any = ref(route.query.execGuid);
32 33
34
35 // 获取字典
36 const dictionaryList = ref([]);
37
38 const getDictionaryList = () => {
39 getDictionaryAll({ state: 1 }).then((res: any) => {
40 dictionaryList.value = [];
41 if (res.code == proxy.$passCode) {
42 dictionaryList.value = res.data || [];
43 } else {
44 proxy.$ElMessage.error(res.msg);
45 }
46 })
47 };
48
33 // 获取数据库列表 49 // 获取数据库列表
34 const databaseList: any = ref([]); 50 const databaseList: any = ref([]);
35 const getDbDirDataSourceListData = async () => { 51 const getDbDirDataSourceListData = async () => {
...@@ -189,6 +205,7 @@ onMounted(async () => { ...@@ -189,6 +205,7 @@ onMounted(async () => {
189 await getDbDirDataSourceListData(); 205 await getDbDirDataSourceListData();
190 } 206 }
191 await getFieldTypeData(); 207 await getFieldTypeData();
208 getDictionaryList();
192 }); 209 });
193 210
194 const stepsInfo = ref({ 211 const stepsInfo = ref({
...@@ -1034,10 +1051,13 @@ onActivated(() => { ...@@ -1034,10 +1051,13 @@ onActivated(() => {
1034 <!-- 关联字典(可编辑)el-tree-select 形式下拉形式 --> 1051 <!-- 关联字典(可编辑)el-tree-select 形式下拉形式 -->
1035 <el-table-column prop="dictionaryGuid" label="关联字典" width="150" align="center"> 1052 <el-table-column prop="dictionaryGuid" label="关联字典" width="150" align="center">
1036 <template #default="scope"> 1053 <template #default="scope">
1037 <span v-if="!scope.row.isEdit || !editableFields.dictionaryGuid">{{ scope.row.isDict ? scope.row.isDict 1054 <span v-if="!scope.row.isEdit">{{ scope.row.dictionaryGuid
1038 : '--' }}</span> 1055 ? dictionaryList.find((item: any) => item.guid === scope.row.dictionaryGuid)?.chName : '--' }}</span>
1039 <el-tree-select v-else v-model="scope.row.isDict" :data="data" placeholder="请选择" /> 1056 <el-select v-else v-model="scope.row.dictionaryGuid" placeholder="请选择">
1057 <el-option v-for="item in dictionaryList" :key="item?.guid" :label="item.chName" :value="item.guid" />
1058 </el-select>
1040 </template> 1059 </template>
1060
1041 </el-table-column> 1061 </el-table-column>
1042 1062
1043 <!-- 数据是否唯一(可编辑) --> 1063 <!-- 数据是否唯一(可编辑) -->
......
...@@ -33,7 +33,7 @@ import { ...@@ -33,7 +33,7 @@ import {
33 getSubjectTableDetail, 33 getSubjectTableDetail,
34 checkSubjectTableData 34 checkSubjectTableData
35 } from "@/api/modules/dataCatalogService"; 35 } from "@/api/modules/dataCatalogService";
36 import { getFidldEnName, getGradeList, getNewDataTypeList, getTaskExeTreeList, saveDbDirTable } from "@/api/modules/dataInventory"; 36 import { getDictionaryAll, getFidldEnName, getGradeList, getNewDataTypeList, getTaskExeTreeList, saveDbDirTable } from "@/api/modules/dataInventory";
37 import { useDefault } from "@/hooks/useDefault"; 37 import { useDefault } from "@/hooks/useDefault";
38 import uploadExcelFile from "./components/uploadExcelFile.vue"; 38 import uploadExcelFile from "./components/uploadExcelFile.vue";
39 import { add } from "lodash-es"; 39 import { add } from "lodash-es";
...@@ -131,6 +131,20 @@ const getSubjectField = () => { ...@@ -131,6 +131,20 @@ const getSubjectField = () => {
131 }); 131 });
132 } 132 }
133 133
134 // 获取字典
135 const dictionaryList1 = ref([]);
136
137 const getDictionaryList1 = () => {
138 getDictionaryAll({ state: 1 }).then((res: any) => {
139 dictionaryList.value = [];
140 if (res.code == proxy.$passCode) {
141 dictionaryList1.value = res.data || [];
142 } else {
143 proxy.$ElMessage.error(res.msg);
144 }
145 })
146 };
147
134 // 定义分类选择器的属性 148 // 定义分类选择器的属性
135 const treeSelectProps = { 149 const treeSelectProps = {
136 label: "classifyName", 150 label: "classifyName",
...@@ -213,6 +227,7 @@ const nextStep = () => { ...@@ -213,6 +227,7 @@ const nextStep = () => {
213 tableCreateInfo.value.isSync = 'Y'; 227 tableCreateInfo.value.isSync = 'Y';
214 } 228 }
215 stepsInfo.value.step = 1; 229 stepsInfo.value.step = 1;
230 getDictionaryList1()
216 // getDictionaryList(); 231 // getDictionaryList();
217 // getDimListData(); 232 // getDimListData();
218 if (!fieldTypes.value.length) { 233 if (!fieldTypes.value.length) {
...@@ -1861,7 +1876,7 @@ const tableSelectFields = computed(() => { ...@@ -1861,7 +1876,7 @@ const tableSelectFields = computed(() => {
1861 <span v-else>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span> 1876 <span v-else>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span>
1862 </template> 1877 </template>
1863 </el-table-column> 1878 </el-table-column>
1864 <el-table-column prop="dimOrdictionaryGuid" v-if="!isDimTable" label="关联维度/字典" width="130px" align="left" 1879 <!-- <el-table-column prop="dimOrdictionaryGuid" v-if="!isDimTable" label="关联维度/字典" width="130px" align="left"
1865 show-overflow-tooltip> 1880 show-overflow-tooltip>
1866 <template #default="scope"> 1881 <template #default="scope">
1867 <el-tree-select ref="dimOrDictSelectRef" v-if="scope.row['isEdit']" filterable clearable 1882 <el-tree-select ref="dimOrDictSelectRef" v-if="scope.row['isEdit']" filterable clearable
...@@ -1883,7 +1898,35 @@ const tableSelectFields = computed(() => { ...@@ -1883,7 +1898,35 @@ const tableSelectFields = computed(() => {
1883 <span v-else>{{ (scope.row['dictionaryGuid'] ? scope.row["dictionaryChName"] : (scope.row['dimGuid'] ? 1898 <span v-else>{{ (scope.row['dictionaryGuid'] ? scope.row["dictionaryChName"] : (scope.row['dimGuid'] ?
1884 scope.row['dimChName'] : '--')) || '--' }}</span> 1899 scope.row['dimChName'] : '--')) || '--' }}</span>
1885 </template> 1900 </template>
1901 </el-table-column> -->
1902 <!-- <el-table-column prop="dimOrdictionaryGuid" v-if="!isDimTable" label="关联字典" width="120px" align="left"
1903 show-overflow-tooltip>
1904 <template #default="scope">
1905 <el-select v-if="scope.row['dimOrdictionaryGuid']" v-model="scope.row['dimOrdictionaryGuid']"
1906 placeholder="请选择">
1907 <el-option v-for="opt in dictionaryList" :key="opt['guid']" :label="opt['chName']"
1908 :value="opt['guid']" />
1909 </el-select>
1910 <span v-else>{{ dictionaryList.find(d => d.guid === scope.row['dimOrdictionaryGuid'])?.chName || '--'
1911 }}</span>
1912 </template>
1913 </el-table-column> -->
1914
1915 <el-table-column prop="dictionaryGuid" label="关联字典" width="120" align="center" show-overflow-tooltip>
1916 <template #default="scope">
1917 <div v-if="scope.row.isEdit">
1918 <el-select v-if="scope.row['isEdit']" v-model="scope.row['dictionaryGuid']" placeholder="请选择分级"
1919 clearable filterable>
1920 <el-option v-for="opt in dictionaryList1" :key="opt['guid']" :label="opt['chName']"
1921 :value="opt['guid']" />
1922 </el-select>
1923 </div>
1924 <div v-else>
1925 {{ dictionaryList1.find(d => d.guid === scope.row['dictionaryGuid'])?.chName || '--' }}
1926 </div>
1927 </template>
1886 </el-table-column> 1928 </el-table-column>
1929
1887 <el-table-column prop="isPrimary" label="是否主键" width="90px" align="left" show-overflow-tooltip> 1930 <el-table-column prop="isPrimary" label="是否主键" width="90px" align="left" show-overflow-tooltip>
1888 <template #default="scope"> 1931 <template #default="scope">
1889 <el-select v-if="scope.row['isEdit']" v-model="scope.row['isPrimary']" placeholder="请选择"> 1932 <el-select v-if="scope.row['isEdit']" v-model="scope.row['isPrimary']" placeholder="请选择">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!