mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-10-31 10:18:43 +08:00 
			
		
		
		
	重写商户信息
This commit is contained in:
		
							
								
								
									
										11
									
								
								src/types/auto-components.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								src/types/auto-components.d.ts
									
									
									
									
										vendored
									
									
								
							| @@ -52,12 +52,17 @@ declare module '@vue/runtime-core' { | |||||||
|     ElForm: typeof import('element-plus/es')['ElForm'] |     ElForm: typeof import('element-plus/es')['ElForm'] | ||||||
|     ElFormItem: typeof import('element-plus/es')['ElFormItem'] |     ElFormItem: typeof import('element-plus/es')['ElFormItem'] | ||||||
|     ElIcon: typeof import('element-plus/es')['ElIcon'] |     ElIcon: typeof import('element-plus/es')['ElIcon'] | ||||||
|  |     ElImage: typeof import('element-plus/es')['ElImage'] | ||||||
|     ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] |     ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] | ||||||
|     ElInput: typeof import('element-plus/es')['ElInput'] |     ElInput: typeof import('element-plus/es')['ElInput'] | ||||||
|  |     ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] | ||||||
|     ElLink: typeof import('element-plus/es')['ElLink'] |     ElLink: typeof import('element-plus/es')['ElLink'] | ||||||
|     ElOption: typeof import('element-plus/es')['ElOption'] |     ElOption: typeof import('element-plus/es')['ElOption'] | ||||||
|     ElPagination: typeof import('element-plus/es')['ElPagination'] |     ElPagination: typeof import('element-plus/es')['ElPagination'] | ||||||
|     ElPopover: typeof import('element-plus/es')['ElPopover'] |     ElPopover: typeof import('element-plus/es')['ElPopover'] | ||||||
|  |     ElRadio: typeof import('element-plus/es')['ElRadio'] | ||||||
|  |     ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] | ||||||
|  |     ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] | ||||||
|     ElRow: typeof import('element-plus/es')['ElRow'] |     ElRow: typeof import('element-plus/es')['ElRow'] | ||||||
|     ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] |     ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] | ||||||
|     ElSelect: typeof import('element-plus/es')['ElSelect'] |     ElSelect: typeof import('element-plus/es')['ElSelect'] | ||||||
| @@ -67,7 +72,13 @@ declare module '@vue/runtime-core' { | |||||||
|     ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] |     ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] | ||||||
|     ElTabPane: typeof import('element-plus/es')['ElTabPane'] |     ElTabPane: typeof import('element-plus/es')['ElTabPane'] | ||||||
|     ElTabs: typeof import('element-plus/es')['ElTabs'] |     ElTabs: typeof import('element-plus/es')['ElTabs'] | ||||||
|  |     ElTag: typeof import('element-plus/es')['ElTag'] | ||||||
|  |     ElTimeline: typeof import('element-plus/es')['ElTimeline'] | ||||||
|  |     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] | ||||||
|     ElTooltip: typeof import('element-plus/es')['ElTooltip'] |     ElTooltip: typeof import('element-plus/es')['ElTooltip'] | ||||||
|  |     ElTransfer: typeof import('element-plus/es')['ElTransfer'] | ||||||
|  |     ElTree: typeof import('element-plus/es')['ElTree'] | ||||||
|  |     ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] | ||||||
|     ElUpload: typeof import('element-plus/es')['ElUpload'] |     ElUpload: typeof import('element-plus/es')['ElUpload'] | ||||||
|     Error: typeof import('./../components/Error/src/Error.vue')['default'] |     Error: typeof import('./../components/Error/src/Error.vue')['default'] | ||||||
|     FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default'] |     FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default'] | ||||||
|   | |||||||
| @@ -69,7 +69,6 @@ import * as TenantPackageApi from '@/api/system/tenantPackage' | |||||||
| import * as MenuApi from '@/api/system/menu' | import * as MenuApi from '@/api/system/menu' | ||||||
| import { ElTree } from 'element-plus' | import { ElTree } from 'element-plus' | ||||||
| import { handleTree } from '@/utils/tree' | import { handleTree } from '@/utils/tree' | ||||||
|  |  | ||||||
| const { t } = useI18n() // 国际化 | const { t } = useI18n() // 国际化 | ||||||
| const message = useMessage() // 消息弹窗 | const message = useMessage() // 消息弹窗 | ||||||
|  |  | ||||||
| @@ -92,7 +91,7 @@ const formRules = reactive({ | |||||||
| const formRef = ref() // 表单 Ref | const formRef = ref() // 表单 Ref | ||||||
| const menuOptions = ref<any[]>([]) // 树形结构数据 | const menuOptions = ref<any[]>([]) // 树形结构数据 | ||||||
| const menuExpand = ref(false) // 展开/折叠 | const menuExpand = ref(false) // 展开/折叠 | ||||||
| const treeRef = ref<InstanceType<typeof ElTree>>() // 树组件Ref | const treeRef = ref<ElTree>() // 树组件 Ref | ||||||
| const treeNodeAll = ref(false) // 全选/全不选 | const treeNodeAll = ref(false) // 全选/全不选 | ||||||
|  |  | ||||||
| /** 打开弹窗 */ | /** 打开弹窗 */ | ||||||
| @@ -133,8 +132,8 @@ const submitForm = async () => { | |||||||
|   try { |   try { | ||||||
|     const data = formData.value as unknown as TenantPackageApi.TenantPackageVO |     const data = formData.value as unknown as TenantPackageApi.TenantPackageVO | ||||||
|     data.menuIds = [ |     data.menuIds = [ | ||||||
|       ...(treeRef.value!.getCheckedKeys(false) as unknown as Array<number>), // 获得当前选中节点 |       ...(treeRef.value.getCheckedKeys(false) as unknown as Array<number>), // 获得当前选中节点 | ||||||
|       ...(treeRef.value!.getHalfCheckedKeys() as unknown as Array<number>) // 获得半选中的父节点 |       ...(treeRef.value.getHalfCheckedKeys() as unknown as Array<number>) // 获得半选中的父节点 | ||||||
|     ] |     ] | ||||||
|     if (formType.value === 'create') { |     if (formType.value === 'create') { | ||||||
|       await TenantPackageApi.createTenantPackage(data) |       await TenantPackageApi.createTenantPackage(data) | ||||||
| @@ -168,17 +167,19 @@ const resetForm = () => { | |||||||
|   formRef.value?.resetFields() |   formRef.value?.resetFields() | ||||||
| } | } | ||||||
|  |  | ||||||
| // 全选/全不选 | /** 全选/全不选 */ | ||||||
| const handleCheckedTreeNodeAll = () => { | const handleCheckedTreeNodeAll = () => { | ||||||
|   treeRef.value!.setCheckedNodes(treeNodeAll.value ? menuOptions.value : []) |   treeRef.value.setCheckedNodes(treeNodeAll.value ? menuOptions.value : []) | ||||||
| } | } | ||||||
|  |  | ||||||
| // 全部(展开/折叠)TODO:for循环全部展开和折叠树组件数据 | /** 展开/折叠全部 */ | ||||||
| const handleCheckedTreeExpand = () => { | const handleCheckedTreeExpand = () => { | ||||||
|   const nodes = treeRef.value?.store.nodesMap |   const nodes = treeRef.value?.store.nodesMap | ||||||
|   for (let node in nodes) { |   for (let node in nodes) { | ||||||
|     if (nodes[node].expanded === menuExpand.value) continue |     if (nodes[node].expanded === menuExpand.value) { | ||||||
|     nodes[node].expanded = !nodes[node].expanded |       continue | ||||||
|  |     } | ||||||
|  |     nodes[node].expanded = menuExpand.value | ||||||
|   } |   } | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 admin
					admin