From 6ca4914a18d1b1561e537674292cf9374791de7c Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Tue, 20 Dec 2022 17:23:40 +0800
Subject: [PATCH] Default Changelist
---
src/views/specialWorkSystem/workTicket/zysq/components/broken.vue | 47 +++++++++++++++++++++++++----------------------
1 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/broken.vue b/src/views/specialWorkSystem/workTicket/zysq/components/broken.vue
index 8378a7c..da141bb 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/broken.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/broken.vue
@@ -138,7 +138,7 @@
</template>
<script lang="ts">
- import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+import {toRefs, reactive, defineComponent, ref, defineAsyncComponent} from 'vue';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
import {useUserInfo} from "/@/stores/userInfo";
@@ -170,18 +170,18 @@
materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')),
},
props:['workerList','departList'],
- setup() {
+ setup(props: any, context: any) {
const userInfo = useUserInfo()
const { userInfos } = storeToRefs(userInfo);
const state = reactive<stateType>({
form: {
operatorUids: [],
workType: 5,
- workLevel: null,
+ workLevel: 0,
workContent: '',
workLocation: '',
hazardIdentification: '',
- maId: null,
+ maBaseId: null,
workDetail:{
operationDepId: null,
bcReason: '',
@@ -189,7 +189,7 @@
bcPath: [],
involvedDepIds: []
},
- wmAddReqDTOList: [],
+ receiveUids: [],
workTimeLine: [],
expStartTime: '',
expEndTime: ''
@@ -230,7 +230,8 @@
emitPath: false,
value: 'depId',
label: 'depName',
- multiple: true
+ multiple: true,
+ expandTrigger: 'hover'
},
casProps2: {
emitPath: false,
@@ -264,22 +265,24 @@
// }
const openMaList = ()=>{
- material.value.equipmentDialog = true
- material.value.getMaList(state.form.workType,state.form.workLevel)
- }
-
- const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{
- state.form.maId = null
- state.form.wmAddReqDTOList = []
- if(addList.length > 0){
- for(let i in addList){
- if(addList[i].depId != null && addList[i].useCount != null){
- state.form.wmAddReqDTOList.push(addList[i])
- }
+ if(state.form.operatorUids == []){
+ ElMessage({
+ type: 'warning',
+ message: '请先选择作业人再获取相应物资配置'
+ });
+ }else{
+ if(material.value.receiveUids.length==0){
+ material.value.receiveUids = state.form.operatorUids
}
+ material.value.getMaList(state.form.workType,state.form.workLevel)
+ material.value.workerList = props.workerList
}
- // state.form.wmAddReqDTOList = addList
- state.form.maId = chosenId
+ }
+ const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{
+ state.form.maBaseId = null
+ state.form.receiveUids = []
+ state.form.receiveUids = receiveUids
+ state.form.maBaseId = chosenId
}
const submitForm = async (formEl: FormInstance | undefined) => {
@@ -313,8 +316,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
--
Gitblit v1.9.2