Browse Source

fix: 优化

wanggaokun 1 year ago
parent
commit
7b88e03d33

+ 0 - 71
src/api/interface/system/menu.ts

@@ -1,71 +0,0 @@
-import { MenuTypeEnum } from '@/enums/MenuTypeEnum'
-import { BaseEntity } from '@/api/interface/index'
-
-/**
- * 菜单树形结构类型
- */
-export interface MenuTreeOption {
-  id: string | number
-  label: string
-  parentId: string | number
-  weight: number
-  children?: MenuTreeOption[]
-}
-
-export interface RoleMenuTree {
-  menus: MenuTreeOption[]
-  checkedKeys: string[]
-}
-
-/**
- * 菜单查询参数类型
- */
-export interface MenuQuery {
-  keywords?: string
-  menuName?: string
-  status?: string
-}
-
-/**
- * 菜单视图对象类型
- */
-export interface MenuVO extends BaseEntity {
-  parentName: string
-  parentId: string | number
-  children: MenuVO[]
-  menuId: string | number
-  menuName: string
-  orderNum: number
-  path: string
-  component: string
-  queryParam: string
-  isFrame: string
-  isCache: string
-  menuType: MenuTypeEnum
-  visible: string
-  status: string
-  icon: string
-  remark: string
-}
-
-export interface MenuForm {
-  parentName?: string
-  parentId?: string | number
-  children?: MenuForm[]
-  menuId?: string | number
-  menuName: string
-  orderNum: number
-  path: string
-  component?: string
-  queryParam?: string
-  isFrame?: string
-  isCache?: string
-  menuType?: MenuTypeEnum
-  visible?: string
-  status?: string
-  icon?: string
-  remark?: string
-  query?: string
-  perms?: string
-  version?: number
-}

+ 35 - 0
src/typings/element.d.ts

@@ -0,0 +1,35 @@
+import type * as ep from 'element-plus'
+declare global {
+  declare type ElTagType = 'success' | 'info' | 'warning' | 'danger' | ''
+  declare type ElFormInstance = ep.FormInstance
+  declare type ElTableInstance = ep.TableInstance
+  declare type ElUploadInstance = ep.UploadInstance
+  declare type ElScrollbarInstance = ep.ScrollbarInstance
+  declare type ElInputInstance = ep.InputInstance
+  declare type ElInputNumberInstance = ep.InputNumberInstance
+  declare type ElRadioInstance = ep.RadioInstance
+  declare type ElRadioGroupInstance = ep.RadioGroupInstance
+  declare type ElRadioButtonInstance = ep.RadioButtonInstance
+  declare type ElCheckboxInstance = ep.CheckboxInstance
+  declare type ElSwitchInstance = ep.SwitchInstance
+  declare type ElCascaderInstance = ep.CascaderInstance
+  declare type ElColorPickerInstance = ep.ColorPickerInstance
+  declare type ElRateInstance = ep.RateInstance
+  declare type ElSliderInstance = ep.SliderInstance
+
+  declare type ElTreeInstance = InstanceType<typeof ep.ElTree>
+  declare type ElTreeSelectInstance = InstanceType<typeof ep.ElTreeSelect>
+  declare type ElSelectInstance = InstanceType<typeof ep.ElSelect>
+  declare type ElCardInstance = InstanceType<typeof ep.ElCard>
+  declare type ElDialogInstance = InstanceType<typeof ep.ElDialog>
+  declare type ElCheckboxGroupInstance = InstanceType<typeof ep.ElCheckboxGroup>
+  declare type ElDatePickerInstance = InstanceType<typeof ep.ElDatePicker>
+  declare type ElTimePickerInstance = InstanceType<typeof ep.ElTimePicker>
+  declare type ElTimeSelectInstance = InstanceType<typeof ep.ElTimeSelect>
+
+  declare type TransferKey = ep.TransferKey
+  declare type CheckboxValueType = ep.CheckboxValueType
+  declare type ElFormRules = ep.FormRules
+  declare type DateModelType = ep.DateModelType
+  declare type UploadFile = ep.UploadFile
+}

+ 15 - 0
src/views/manage/faultCase/index.vue

@@ -254,6 +254,7 @@ const setItemsOptions = () => {
     {
       label: '机型',
       prop: 'aircraftType',
+      span: 12,
       compOptions: {
         placeholder: '请输入机型'
       }
@@ -261,6 +262,7 @@ const setItemsOptions = () => {
     {
       label: '单位',
       prop: 'unitName',
+      span: 12,
       compOptions: {
         placeholder: '请输入单位'
       }
@@ -268,6 +270,7 @@ const setItemsOptions = () => {
     {
       label: '故障件名称',
       prop: 'itemName',
+      span: 12,
       compOptions: {
         placeholder: '请输入故障件名称'
       }
@@ -275,6 +278,7 @@ const setItemsOptions = () => {
     {
       label: '专业',
       prop: 'specialty',
+      span: 12,
       compOptions: {
         placeholder: '请输入专业'
       }
@@ -283,12 +287,14 @@ const setItemsOptions = () => {
       label: '故障现象',
       prop: 'faultPhenomenon',
       compOptions: {
+        type: 'textarea',
         placeholder: '请输入故障现象'
       }
     },
     {
       label: '发动机型别',
       prop: 'engineType',
+      span: 12,
       compOptions: {
         placeholder: '请输入发动机型别'
       }
@@ -296,6 +302,7 @@ const setItemsOptions = () => {
     {
       label: '故障发生地点',
       prop: 'locationFault',
+      span: 12,
       compOptions: {
         placeholder: '请输入故障发生地点'
       }
@@ -303,6 +310,7 @@ const setItemsOptions = () => {
     {
       label: '故障件型别',
       prop: 'itemType',
+      span: 12,
       compOptions: {
         placeholder: '请输入故障件型别'
       }
@@ -310,6 +318,7 @@ const setItemsOptions = () => {
     {
       label: '发生日期',
       prop: 'occurDate',
+      span: 12,
       compOptions: {
         elTagName: 'date-picker',
         type: 'date',
@@ -319,6 +328,7 @@ const setItemsOptions = () => {
     {
       label: '系统',
       prop: 'systemName',
+      span: 12,
       compOptions: {
         placeholder: '请输入系统'
       }
@@ -327,12 +337,14 @@ const setItemsOptions = () => {
       label: '故障原因',
       prop: 'causeFault',
       compOptions: {
+        type: 'textarea',
         placeholder: '请输入故障原因'
       }
     },
     {
       label: '故障性质',
       prop: 'natureFault',
+      span: 12,
       compOptions: {
         placeholder: '请输入故障性质'
       }
@@ -340,6 +352,7 @@ const setItemsOptions = () => {
     {
       label: '判明方法',
       prop: 'methodDetermination',
+      span: 12,
       compOptions: {
         placeholder: '请输入判明方法'
       }
@@ -347,6 +360,7 @@ const setItemsOptions = () => {
     {
       label: '排除方法',
       prop: 'methodRectification',
+      span: 12,
       compOptions: {
         placeholder: '请输入排除方法'
       }
@@ -355,6 +369,7 @@ const setItemsOptions = () => {
       label: '备注',
       prop: 'remarks',
       compOptions: {
+        type: 'textarea',
         placeholder: '请输入备注'
       }
     }

+ 0 - 1
src/views/manage/reasoning/index.vue

@@ -322,7 +322,6 @@ const setItemsOptions = () => {
         return [2, 3].includes(active.value)
       },
       compOptions: {
-        validateEvent: false,
         elTagName: 'slot'
       }
     }