瀏覽代碼

整改人修改

duy 3 周之前
父節點
當前提交
fde513bebc
共有 1 個文件被更改,包括 13 次插入4 次删除
  1. 13 4
      src/views/patrol/add.vue

+ 13 - 4
src/views/patrol/add.vue

@@ -121,7 +121,7 @@
                         <el-form-item label="整改人" prop="rectifyUser">
                             <HcTasksUser
                                 v-if="isShowUser" :disabled="type === 'changeRow' || type === 'review' || type === 'view'"
-                                :is-change-popele="true" :contract-id="contractId" :project-id="projectId"
+                                :is-change-popele="true" :data="dataInfo"
                                 :users="peoples" ui="w-full"
                                 @change="tasksUserChange"
                             />
@@ -267,6 +267,11 @@ const id = ref(routerQuery?.id || '')
 const projectId = ref(useAppState.getProjectId)
 const contractInfo = ref(useAppState.getContractInfo)
 const contractId = ref(useAppState.getContractId)
+
+const dataInfo = ref({
+    projectId:projectId.value,
+    contractId:contractId.value,
+})
 const addFormRef = ref(null)
 const addForm = ref({})
 const addRules = {
@@ -397,7 +402,8 @@ const getDetail = async (id)=>{
         console.log(data, 'data')
         addForm.value = getObjValue(data)
         processDataList.value = addForm.value.list
-        peoples.value = addForm.value.rectifyUser
+        // peoples.value = addForm.value.rectifyUser
+        peoples.value = addForm.value.rectifyUser ? addForm.value.rectifyUser.split(',') : ''
     } else {
         addForm.value = {}
         processDataList.value = []
@@ -468,8 +474,11 @@ const openAttachment = (row)=>{
 //选择整改人
 const peoples = ref('')
 //任务人选择改变
-const tasksUserChange = (a, b, users) => {
-    addForm.value.rectifyUser = users
+const tasksUserChange = (users) => {
+    console.log(users, 'users')
+    
+    // addForm.value.rectifyUser = users
+    addForm.value.rectifyUser = arrToKey(users, 'userId', ',')
 }
 //关联工程用途及部位
 const linksRelateModal = ref(false)