diff --git a/src/api/mes/workstation/index.ts b/src/api/mes/workstation/index.ts index e397ff645..336c9714a 100644 --- a/src/api/mes/workstation/index.ts +++ b/src/api/mes/workstation/index.ts @@ -48,45 +48,8 @@ export const exportWorkstation = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/mes/workstation/get-import-template' }) -}// 查询班组列表 -export const getTeamPage = async (params) => { - params.workstationCode = goalParams.workstationCode - if (params.isSearch) { - delete params.isSearch - const data = {...params} - return await request.post({ url: '/mes/team/senior', data }) - } else { - return await request.get({ url: `/mes/team/pageListByWorkstationCode`, params }) - } -} -// 查询选择班组列表 -export const checkTeamPageList = async (params) => { - params.workstationCode = goalParams.workstationCode - if (params.isSearch) { - delete params.isSearch - const data = {...params} - return await request.post({ url: '/mes/team/senior', data }) - } else { - return await request.get({ url: `/mes/team/pageCheckListByWorkstationCode`, params }) - } -} -// 添加班组关联 -export const createTeamRelation = async (teamCodes:string[]) => { - const data = { - workstationCode : goalParams.workstationCode, - teamCodes : teamCodes - } - return await request.post({ url: `/mes/team/createRelation`, data }) } -// 删除班组关联 -export const deleteTeamRelation = async (teamCodes:string[]) => { - const data = { - workstationCode : goalParams.workstationCode, - teamCodes : teamCodes - } - return await request.post({ url: `/mes/team/deleteRelation`, data }) -} export const getEquipmentPage = async (params) => { params.workstationCode = goalParams.workstationCode if (params.isSearch) { diff --git a/src/components/listTable/index.ts b/src/components/ListTable/index.ts similarity index 100% rename from src/components/listTable/index.ts rename to src/components/ListTable/index.ts diff --git a/src/components/listTable/src/ListTable.vue b/src/components/ListTable/src/ListTable.vue similarity index 100% rename from src/components/listTable/src/ListTable.vue rename to src/components/ListTable/src/ListTable.vue diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 327d30923..1e85ee1d4 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -86,7 +86,7 @@ import { TabsList, Team, Workstation, - WorkstationRules, teamPopList,equipmentPopList,processPopList,stepPopList + WorkstationRules,equipmentPopList,processPopList,stepPopList } from './workstation.data' import * as WorkstationApi from '@/api/mes/workstation' import * as defaultButtons from '@/utils/disposition/defaultButtons' @@ -97,8 +97,8 @@ import { } from "@/api/mes/workstation"; import Detail from './components/Detail.vue' defineOptions({ name: 'Workstation' }) -let tabsDeleteApi = WorkstationApi.deleteTeamRelation -let tabsCreateApi = WorkstationApi.createTeamRelation +let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation +let tabsCreateApi = WorkstationApi.createEquipmentRelation const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 @@ -271,19 +271,13 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } // 子包装数据 const detailAllSchemas = ref(Team.allSchemas) -const apiPage = ref(WorkstationApi.getTeamPage) +const apiPage = ref(WorkstationApi.getEquipmentPage) const tableKey = ref("Team"); -let tmpPopList = teamPopList.allSchemas +let tmpPopList = equipmentPopList.allSchemas // tabs 切换事件 const changeTabs = (data) =>{ tableKey.value = data.prop - if(data.prop == 'Team'){ - apiPage.value = WorkstationApi.getTeamPage - detailAllSchemas.value = Team.allSchemas - tabsDeleteApi = WorkstationApi.deleteTeamRelation - tabsCreateApi = WorkstationApi.createTeamRelation - tmpPopList = teamPopList.allSchemas - }else if(data.prop == 'Equipment'){ + if(data.prop == 'Equipment'){ apiPage.value = WorkstationApi.getEquipmentPage detailAllSchemas.value = Equipment.allSchemas tabsDeleteApi = WorkstationApi.deleteEquipmentRelation diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index 60e3aa682..31278352b 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -16,10 +16,6 @@ export const WorkstationRules = reactive({ productionLineCode: [required] }) export const TabsList = [{ - label: "班组", - prop: 'Team', -}, - { label: "设备", prop: 'Equipment', }, @@ -280,30 +276,7 @@ export const Opersteps = useCrudSchemas(reactive([ isTableForm:true, } ])) -export const teamPopList = useCrudSchemas(reactive([ - { - label: '选择班组', - field: 'list', - sort: 'custom', - isSearch: false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择选择班组', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '选择班组', // 查询弹窗标题 - searchAllSchemas: Team.allSchemas, // 查询弹窗所需类 - searchPage: WorkstationApi.checkTeamPageList, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - } -])) + export const equipmentPopList = useCrudSchemas(reactive([ { label: '选择设备', diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index baf4fad85..0413a48aa 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -51,7 +51,7 @@ :isShowAddBtn="false" :detailButtonIsShow="true" /> - +