Browse Source

1、绑定设备

master_hella_20240701
bjang03 8 months ago
parent
commit
853647367e
  1. 71
      src/views/mes/workstation/index.vue

71
src/views/mes/workstation/index.vue

@ -4,15 +4,15 @@
<Search :schema="Workstation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="Workstation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="Workstation.allSchemas" :allSchemas="Workstation.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
@ -59,26 +59,34 @@
:apiPage="apiPage" :apiPage="apiPage"
:tabs="TabsList" :tabs="TabsList"
@changeTabs="changeTabs" @changeTabs="changeTabs"
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import {TabsList, Team, Workstation, WorkstationRules} from './workstation.data' import {
Equipment,
Process,
Production,
TabsList,
Team,
Workstation,
WorkstationRules
} from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation' import * as WorkstationApi from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import {
PurchasereceiptRecordDetail,
PurchasereceiptRecordDetailRules,
PurchasereceiptRecordMain
} from "@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data";
import {PurchasereceiptRequestTabsList} from "@/utils/disposition/tabsList";
import * as PurchasereceiptRecordDetailApi from "@/api/wms/purchasereceiptRecordDetail"; import * as PurchasereceiptRecordDetailApi from "@/api/wms/purchasereceiptRecordDetail";
import {getEquipmentPage, getProcessPage, getProductionPage} from "@/api/mes/workstation"; import {
getEquipmentPage,
getProcessPage,
getProductionPage,
goalParams,
params
} from "@/api/mes/workstation";
defineOptions({ name: 'Workstation' }) defineOptions({ name: 'Workstation' })
const message = useMessage() // const message = useMessage() //
@ -188,11 +196,6 @@ const formsSuccess = async (formType,data) => {
getList() getList()
} }
/** 绑定操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation')
}
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {
@ -252,31 +255,31 @@ onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await WorkstationApi.importTemplate() importTemplateData.templateUrl = await WorkstationApi.importTemplate()
}) })
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
goalParams.workstationCode = row.code
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation')
}
// //
const teamRef = ref()
const { tableObject: teamData, tableMethods: teamMethods } = useTable({
getListApi: WorkstationApi.getTeamPage
})
const { getList:teamList } = teamMethods
const detailAllSchemas = ref(Team.allSchemas) const detailAllSchemas = ref(Team.allSchemas)
const apiPage = ref(WorkstationApi.getTeamPage) const apiPage = ref(WorkstationApi.getTeamPage)
const tabeKey = ref("workstationDetail"); const tableKey = ref("workstationDetail");
// tabs // tabs
const changeTabs = (data) =>{ const changeTabs = (data) =>{
tableKey.value = data.prop
if(data.prop == 'Team'){ if(data.prop == 'Team'){
console.log(data)
apiPage.value = WorkstationApi.getTeamPage apiPage.value = WorkstationApi.getTeamPage
detailAllSchemas.value = Team.allSchemas detailAllSchemas.value = Team.allSchemas
}else if(data.prop == 'Equipment'){ }else if(data.prop == 'Equipment'){
apiPage.value = WorkstationApi.getEquipmentPage apiPage.value = WorkstationApi.getEquipmentPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas detailAllSchemas.value = Equipment.allSchemas
}else if(data.prop == 'Process'){ }else if(data.prop == 'Process'){
apiPage.value = WorkstationApi.getProcessPage apiPage.value = WorkstationApi.getProcessPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas detailAllSchemas.value = Process.allSchemas
}else if(data.prop == 'Production'){ }else if(data.prop == 'Production'){
apiPage.value = WorkstationApi.getProductionPage apiPage.value = WorkstationApi.getProductionPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas detailAllSchemas.value = Production.allSchemas
} }
tabeKey.value = data.prop
} }
</script> </script>

Loading…
Cancel
Save