updata: tree形下拉框
Showing
3 changed files
with
16 additions
and
7 deletions
| ... | @@ -54,7 +54,6 @@ declare module '@vue/runtime-core' { | ... | @@ -54,7 +54,6 @@ declare module '@vue/runtime-core' { |
| 54 | Table_tools: typeof import('./../components/Tools/table_tools.vue')['default'] | 54 | Table_tools: typeof import('./../components/Tools/table_tools.vue')['default'] |
| 55 | Table_v2: typeof import('./../components/Table/table_v2.vue')['default'] | 55 | Table_v2: typeof import('./../components/Table/table_v2.vue')['default'] |
| 56 | Tabs: typeof import('./../components/Tabs/index.vue')['default'] | 56 | Tabs: typeof import('./../components/Tabs/index.vue')['default'] |
| 57 | TemplateItem: typeof import('./../components/TemplateItem/index.vue')['default'] | ||
| 58 | Toolbar: typeof import('./../components/LineageGraph/toolbar.vue')['default'] | 57 | Toolbar: typeof import('./../components/LineageGraph/toolbar.vue')['default'] |
| 59 | Topbar: typeof import('./../components/LineageGraph/topbar.vue')['default'] | 58 | Topbar: typeof import('./../components/LineageGraph/topbar.vue')['default'] |
| 60 | Transfer: typeof import('./../components/Transfer/index.vue')['default'] | 59 | Transfer: typeof import('./../components/Transfer/index.vue')['default'] | ... | ... |
| ... | @@ -9,7 +9,7 @@ import TableTools from '@/components/Tools/table_tools.vue'; | ... | @@ -9,7 +9,7 @@ import TableTools from '@/components/Tools/table_tools.vue'; |
| 9 | import { MoreFilled } from "@element-plus/icons-vue"; | 9 | import { MoreFilled } from "@element-plus/icons-vue"; |
| 10 | import { commonPageConfig } from '@/components/PageNav/index'; | 10 | import { commonPageConfig } from '@/components/PageNav/index'; |
| 11 | import { useValidator } from '@/hooks/useValidator'; | 11 | import { useValidator } from '@/hooks/useValidator'; |
| 12 | import TemplateItem from '@/components/TemplateItem/index.vue' | 12 | import TemplateItem from './templateItem.vue'; |
| 13 | import { getTempleteClassifyData, saveClassifyGrad, getClassifyGradList, deleteClassifyGrad, updateClassifyGrad, getGradeTreeList } from "@/api/modules/dataInventory"; | 13 | import { getTempleteClassifyData, saveClassifyGrad, getClassifyGradList, deleteClassifyGrad, updateClassifyGrad, getGradeTreeList } from "@/api/modules/dataInventory"; |
| 14 | 14 | ||
| 15 | 15 | ||
| ... | @@ -39,6 +39,7 @@ const getGradeTreeListData = async () => { | ... | @@ -39,6 +39,7 @@ const getGradeTreeListData = async () => { |
| 39 | const res: any = await getGradeTreeList(); | 39 | const res: any = await getGradeTreeList(); |
| 40 | if (res.code == proxy.$passCode) { | 40 | if (res.code == proxy.$passCode) { |
| 41 | gradeTreeData.value = res.data || []; | 41 | gradeTreeData.value = res.data || []; |
| 42 | (classStandardFormItems.value[1].options as any) = gradeTreeData.value; | ||
| 42 | } else { | 43 | } else { |
| 43 | proxy.$ElMessage.error(res.msg); | 44 | proxy.$ElMessage.error(res.msg); |
| 44 | } | 45 | } |
| ... | @@ -211,13 +212,22 @@ const classStandardFormItems = ref([{ | ... | @@ -211,13 +212,22 @@ const classStandardFormItems = ref([{ |
| 211 | type: 'tree-select', | 212 | type: 'tree-select', |
| 212 | placeholder: '请选择', | 213 | placeholder: '请选择', |
| 213 | field: 'gradeStandard', | 214 | field: 'gradeStandard', |
| 214 | default: 1, | 215 | options: [], |
| 215 | options: [], //TODO | 216 | nodeKey: 'guid', |
| 216 | required: true, | 217 | checkStrictly: false,//只能选择叶子节点。 |
| 218 | lazy: false, | ||
| 219 | multiple: false, | ||
| 220 | collapseTagsTooltip: true, | ||
| 221 | collapseTags: true, | ||
| 222 | props: { | ||
| 223 | label: "name", | ||
| 224 | value: "guid", | ||
| 225 | children: "gradeRSVOList" | ||
| 226 | }, | ||
| 217 | filterable: true, | 227 | filterable: true, |
| 218 | clearable: true, | 228 | clearable: true, |
| 219 | visible: true, | 229 | default: '', |
| 220 | block: true, | 230 | required: true |
| 221 | }]); | 231 | }]); |
| 222 | 232 | ||
| 223 | const classStandardFormRules = ref({ | 233 | const classStandardFormRules = ref({ | ... | ... |
-
Please register or sign in to post a comment