diff --git a/src/api/mes/workstation/index.ts b/src/api/mes/workstation/index.ts index 1e8e44a8f..cc75e6142 100644 --- a/src/api/mes/workstation/index.ts +++ b/src/api/mes/workstation/index.ts @@ -46,4 +46,41 @@ export const exportWorkstation = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/mes/workstation/get-import-template' }) -} \ No newline at end of file +} +// 查询班组列表 +export const getTeamPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/team/senior', data }) + } else { + return await request.get({ url: `/wms/team/page`, params }) + } +} +export const getEquipmentPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/equipment/senior', data }) + } else { + return await request.get({ url: `/mes/equipment/page`, params }) + } +} +export const getProcessPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/process/senior', data }) + } else { + return await request.get({ url: `/wms/process/page`, params }) + } +} +export const getProductionPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/production/senior', data }) + } else { + return await request.get({ url: `/wms/production/page`, params }) + } +} diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 4c96ef8e5..70695a55e 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -4,8 +4,9 @@ v-model="dialogVisible" :width="dialogWidth" :close-on-click-modal="false" - v-loading="formLoading" + :vLoading="formLoading" > +
+ diff --git a/src/components/Dialog/src/Dialog.vue b/src/components/Dialog/src/Dialog.vue index a1eb550c8..a7d75553a 100644 --- a/src/components/Dialog/src/Dialog.vue +++ b/src/components/Dialog/src/Dialog.vue @@ -11,7 +11,8 @@ const props = defineProps({ fullscreen: propTypes.bool.def(true), width: propTypes.oneOfType([String, Number]).def('40%'), scroll: propTypes.bool.def(false), // 是否开启滚动条。如果是的话,按照 maxHeight 设置最大高度 - maxHeight: propTypes.oneOfType([String, Number]).def('400px') + maxHeight: propTypes.oneOfType([String, Number]).def('400px'), + vLoading:propTypes.bool.def(false) }) const getBindValue = computed(() => { @@ -50,11 +51,34 @@ watch( } ) +let demo = null +watch( + () => props.vLoading, + async (val: boolean) => { + await nextTick() + if (val) { + initDialog() + } else { + if (demo !== null) demo.close() + } + }, + { + immediate: true + } +) + const dialogStyle = computed(() => { return { height: unref(dialogHeight) } }) + + +const initDialog = () => { + // 用服务生成一个el-loading实例,包括了自定义svg的指令如何在服务中使用 + demo = ElLoading.service({ target: '.loading', text: '加载中...', background: 'rgba(246, 246, 246, 0.8)' }) +} +