diff --git a/src/views/eam/basic/classType/classType.data.ts b/src/views/eam/basic/classType/classType.data.ts index a5fd35b..7eb4c51 100644 --- a/src/views/eam/basic/classType/classType.data.ts +++ b/src/views/eam/basic/classType/classType.data.ts @@ -13,225 +13,223 @@ export const ClassTypeRules = reactive({ engineerRoleName: [required], type: [required], factoryAreaNumber: [required], - factoryAreaName: [required], + factoryAreaName: [required] }) const userStore = useUserStore() -const FactoryAreaNoPage = await deptApi.getDeptPage({'deptGroup':'factory'}) +const FactoryAreaNoPage = await deptApi.getDeptPage({ deptGroup: 'factory' }) const roleList = await roleApi.getSimpleRoleList({}) const factoryList = await selectAllFactoryArea() // 假设你想添加一个新的工厂区域 // const factoryList = [...factoryListResult, { // ...userStore.userSelfInfo.dept // }] -console.log('FactoryAreaNoPage',FactoryAreaNoPage); -console.log('roleList',roleList); +console.log('FactoryAreaNoPage', FactoryAreaNoPage) +console.log('roleList', roleList) - const FactoryAreaNumbers = useCrudSchemas(reactive([ +const FactoryAreaNumbers = useCrudSchemas( + reactive([ + { + label: '编号', - { - - label: '编号', - - field: 'id', - - sort: 'custom', - - isSearch: true, - isForm: true, - - table: { - - width: 180, - - fixed: 'left' - - }, - - }, - - { - - label: '名称', - - field: 'name', - - sort: 'custom', - - } - - ])) -export const ClassType = useCrudSchemas(reactive([ - { - label: '维修工角色', - field: 'workerRoleId', - hiddenSearchHigh: true, - sort: 'custom', - isForm: false, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return roleList.find((item) => item.id == cellValue)?.name - }, - }, - { - label: '维修工角色', - field: 'workerRoleName', - hiddenSearchHigh: true, - sort: 'custom', - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择角色', // 输入框占位文本 - searchField: 'id', // 查询弹窗赋值字段 - searchTitle: '维修工角色', // 查询弹窗标题 - searchAllSchemas: Role.allSchemas, // 查询弹窗所需类 - searchPage: roleApi.getRolePages, // 查询弹窗所需分页方法 - searchCondition: [ - // { - // key: 'deptGroup', - // value: 'factory', - // isMainValue: false - // } - ] + field: 'id', + + sort: 'custom', + + isSearch: true, + isForm: true, + + table: { + width: 180, + + fixed: 'left' } }, - isDetail: false, - isTable: false, - isTableForm: false, - }, - { - label: '工程师角色', - field: 'engineerRoleId', - hiddenSearchHigh: true, - sort: 'custom', - isForm: false, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return roleList.find((account) => account.id == cellValue)?.name - }, - }, - { - label: '工程师角色', - field: 'engineerRoleName', - hiddenSearchHigh: true, - sort: 'custom', - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择角色', // 输入框占位文本 - searchField: 'id', // 查询弹窗赋值字段 - searchTitle: '工程师角色', // 查询弹窗标题 - searchAllSchemas: Role.allSchemas, // 查询弹窗所需类 - searchPage: roleApi.getRolePages, // 查询弹窗所需分页方法 - searchCondition: [ - // { - // key: 'deptGroup', - // value: 'factory', - // isMainValue: false - // } - ] + + { + label: '名称', + + field: 'name', + + sort: 'custom' + } + ]) +) +export const ClassType = useCrudSchemas( + reactive([ + { + label: '维修工角色', + field: 'workerRoleId', + hiddenSearchHigh: true, + sort: 'custom', + isForm: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return roleList.find((item) => item.id == cellValue)?.name } }, - isDetail: false, - isTable: false, - isTableForm: false, - }, - { - label: '班组类型', - field: 'type', - dictType: DICT_TYPE.CLASS_TYPE, - isSearch: true, - dictClass: 'string', - sort: 'custom', - form: { - component: 'Select' - }, - }, - { - label: '描述', - field: 'describes', - sort: 'custom', - }, - { - label: '所属厂区', - field: 'factoryAreaNumber', - hiddenSearchHigh: true, - isSearch: true, - sort: 'custom', - isForm: false, - search: { - show: true, - component: 'Select', - api: () => factoryList, - componentProps: { - optionsAlias: { - labelField: 'name', - valueField: 'id' - }, - filterable: true, + { + label: '维修工角色', + field: 'workerRoleName', + hiddenSearchHigh: true, + sort: 'custom', + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择角色', // 输入框占位文本 + searchField: 'id', // 查询弹窗赋值字段 + searchTitle: '维修工角色', // 查询弹窗标题 + searchAllSchemas: Role.allSchemas, // 查询弹窗所需类 + searchPage: roleApi.getRolePages, // 查询弹窗所需分页方法 + searchCondition: [ + // { + // key: 'deptGroup', + // value: 'factory', + // isMainValue: false + // } + ] + } + }, + isDetail: false, + isTable: false, + isTableForm: false + }, + { + label: '工程师角色', + field: 'engineerRoleId', + hiddenSearchHigh: true, + sort: 'custom', + isForm: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return roleList.find((account) => account.id == cellValue)?.name } }, - //给列表用的 - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name + { + label: '工程师角色', + field: 'engineerRoleName', + hiddenSearchHigh: true, + sort: 'custom', + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择角色', // 输入框占位文本 + searchField: 'id', // 查询弹窗赋值字段 + searchTitle: '工程师角色', // 查询弹窗标题 + searchAllSchemas: Role.allSchemas, // 查询弹窗所需类 + searchPage: roleApi.getRolePages, // 查询弹窗所需分页方法 + searchCondition: [ + // { + // key: 'deptGroup', + // value: 'factory', + // isMainValue: false + // } + ] + } + }, + isDetail: false, + isTable: false, + isTableForm: false }, - }, - { - label: '所属厂区', - field: 'factoryAreaName', - hiddenSearchHigh: true, - isSearch: false, - sort: 'custom', - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择厂区', // 输入框占位文本 - searchField: 'id', // 查询弹窗赋值字段 - searchTitle: '厂区信息', // 查询弹窗标题 - searchAllSchemas: FactoryAreaNumbers.allSchemas, // 查询弹窗所需类 - searchPage: deptApi.getDeptPages, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'deptGroup', - value: 'factory', - isMainValue: false - } - ] + { + label: '班组类型', + field: 'type', + dictType: DICT_TYPE.CLASS_TYPE, + isSearch: true, + dictClass: 'string', + sort: 'custom', + form: { + component: 'Select' } }, - isDetail: false, - isTable: false, - isTableForm: false, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - isSearch: false, - hiddenSearchHigh: true, - isForm: false, - table: { - width: 150 + + { + label: '所属厂区', + field: 'factoryAreaNumber', + hiddenSearchHigh: true, + isSearch: true, + sort: 'custom', + isForm: false, + search: { + show: true, + component: 'Select', + api: () => factoryList, + componentProps: { + optionsAlias: { + labelField: 'name', + valueField: 'id' + }, + filterable: true } }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - hiddenSearchHigh: true, - isForm: false, - table: { - width: 170 + //给列表用的 + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name + } + }, + { + label: '所属厂区', + field: 'factoryAreaName', + hiddenSearchHigh: true, + isSearch: false, + sort: 'custom', + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择厂区', // 输入框占位文本 + searchField: 'id', // 查询弹窗赋值字段 + searchTitle: '厂区信息', // 查询弹窗标题 + searchAllSchemas: FactoryAreaNumbers.allSchemas, // 查询弹窗所需类 + searchPage: deptApi.getDeptPages, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'deptGroup', + value: 'factory', + isMainValue: false + } + ] } }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' + isDetail: false, + isTable: false, + isTableForm: false + }, + + { + label: '描述', + field: 'describes', + sort: 'custom' + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + hiddenSearchHigh: true, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + hiddenSearchHigh: true, + isForm: false, + table: { + width: 170 + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } } - } -])) + ]) +) diff --git a/src/views/eam/basic/classType/index.vue b/src/views/eam/basic/classType/index.vue index 9ae9946..8487023 100644 --- a/src/views/eam/basic/classType/index.vue +++ b/src/views/eam/basic/classType/index.vue @@ -112,7 +112,7 @@ const { getList, setSearchParams } = tableMethods const HeadButttondata = [ defaultButtons.defaultAddBtn({hasPermi:'eam:classType:create'}), // defaultButtons.defaultImportBtn({hasPermi:'eam:classType:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'eam:classType:export'}), // 导出 + defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 diff --git a/src/views/eam/basic/costCenterMapping/index.vue b/src/views/eam/basic/costCenterMapping/index.vue index 8143e32..c665b6a 100644 --- a/src/views/eam/basic/costCenterMapping/index.vue +++ b/src/views/eam/basic/costCenterMapping/index.vue @@ -101,7 +101,7 @@ const { getList, setSearchParams } = tableMethods const HeadButttondata = [ defaultButtons.defaultAddBtn({hasPermi:'eam:cost-center-mapping:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'eam:cost-center-mapping:import'}), // 导入 - // defaultButtons.defaultExportBtn({hasPermi:'eam:cost-center-mapping:export'}), // 导出 + defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置