Browse Source

基础数据导出修改

master
叶佳兴 6 days ago
parent
commit
2d5c5993e8
  1. 60
      src/views/eam/basic/classType/classType.data.ts
  2. 2
      src/views/eam/basic/classType/index.vue
  3. 2
      src/views/eam/basic/costCenterMapping/index.vue

60
src/views/eam/basic/classType/classType.data.ts

@ -13,23 +13,22 @@ export const ClassTypeRules = reactive({
engineerRoleName: [required], engineerRoleName: [required],
type: [required], type: [required],
factoryAreaNumber: [required], factoryAreaNumber: [required],
factoryAreaName: [required], factoryAreaName: [required]
}) })
const userStore = useUserStore() const userStore = useUserStore()
const FactoryAreaNoPage = await deptApi.getDeptPage({'deptGroup':'factory'}) const FactoryAreaNoPage = await deptApi.getDeptPage({ deptGroup: 'factory' })
const roleList = await roleApi.getSimpleRoleList({}) const roleList = await roleApi.getSimpleRoleList({})
const factoryList = await selectAllFactoryArea() const factoryList = await selectAllFactoryArea()
// 假设你想添加一个新的工厂区域 // 假设你想添加一个新的工厂区域
// const factoryList = [...factoryListResult, { // const factoryList = [...factoryListResult, {
// ...userStore.userSelfInfo.dept // ...userStore.userSelfInfo.dept
// }] // }]
console.log('FactoryAreaNoPage',FactoryAreaNoPage); console.log('FactoryAreaNoPage', FactoryAreaNoPage)
console.log('roleList',roleList); console.log('roleList', roleList)
const FactoryAreaNumbers = useCrudSchemas(reactive<CrudSchema[]>([
const FactoryAreaNumbers = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '编号', label: '编号',
field: 'id', field: 'id',
@ -40,27 +39,23 @@ console.log('roleList',roleList);
isForm: true, isForm: true,
table: { table: {
width: 180, width: 180,
fixed: 'left' fixed: 'left'
}
},
}, },
{ {
label: '名称', label: '名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom'
} }
])
])) )
export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([ export const ClassType = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '维修工角色', label: '维修工角色',
field: 'workerRoleId', field: 'workerRoleId',
@ -69,7 +64,7 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return roleList.find((item) => item.id == cellValue)?.name return roleList.find((item) => item.id == cellValue)?.name
}, }
}, },
{ {
label: '维修工角色', label: '维修工角色',
@ -96,7 +91,7 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isDetail: false, isDetail: false,
isTable: false, isTable: false,
isTableForm: false, isTableForm: false
}, },
{ {
label: '工程师角色', label: '工程师角色',
@ -106,7 +101,7 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return roleList.find((account) => account.id == cellValue)?.name return roleList.find((account) => account.id == cellValue)?.name
}, }
}, },
{ {
label: '工程师角色', label: '工程师角色',
@ -133,7 +128,7 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isDetail: false, isDetail: false,
isTable: false, isTable: false,
isTableForm: false, isTableForm: false
}, },
{ {
label: '班组类型', label: '班组类型',
@ -144,13 +139,9 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
form: { form: {
component: 'Select' component: 'Select'
}
}, },
},
{
label: '描述',
field: 'describes',
sort: 'custom',
},
{ {
label: '所属厂区', label: '所属厂区',
field: 'factoryAreaNumber', field: 'factoryAreaNumber',
@ -167,13 +158,13 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'id'
}, },
filterable: true, filterable: true
} }
}, },
//给列表用的 //给列表用的
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name
}, }
}, },
{ {
label: '所属厂区', label: '所属厂区',
@ -201,7 +192,13 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isDetail: false, isDetail: false,
isTable: false, isTable: false,
isTableForm: false, isTableForm: false
},
{
label: '描述',
field: 'describes',
sort: 'custom'
}, },
{ {
label: '创建者', label: '创建者',
@ -234,4 +231,5 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ])
)

2
src/views/eam/basic/classType/index.vue

@ -112,7 +112,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:classType:create'}), defaultButtons.defaultAddBtn({hasPermi:'eam:classType:create'}),
// defaultButtons.defaultImportBtn({hasPermi:'eam:classType:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'eam:classType:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:classType:export'}), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

2
src/views/eam/basic/costCenterMapping/index.vue

@ -101,7 +101,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:cost-center-mapping:create'}), // defaultButtons.defaultAddBtn({hasPermi:'eam:cost-center-mapping:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:cost-center-mapping:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'eam:cost-center-mapping:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'eam:cost-center-mapping:export'}), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

Loading…
Cancel
Save