Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop
Showing
6 changed files
with
103 additions
and
21 deletions
| ... | @@ -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 | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -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="请选择"> | ... | ... |
-
Please register or sign in to post a comment