zhangjie 7 月之前
父節點
當前提交
b325bea909
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/modules/exam/components/BatchAddExamTask.vue

+ 6 - 2
src/modules/exam/components/BatchAddExamTask.vue

@@ -79,8 +79,8 @@
                 size="small"
                 style="width: 150px"
                 placeholder="请选择"
-                clearable
                 filterable
+                :disabled="!scope.row.canEdit"
               >
                 <el-option
                   v-for="user in scope.row.users"
@@ -250,8 +250,12 @@ export default {
       this.modalForm.batchNo = data.batchNo;
       this.batchConfirmMessage = data.errorMsg;
       this.tasks = data.tasks.map((item) => {
-        if (!item.userId)
+        if (item.userId) {
+          item.canEdit = false;
+        } else {
+          item.canEdit = true;
           item.userId = item.users.length === 1 ? item.users[0].id : "";
+        }
         return item;
       });
       this.$refs.modalFormComp.validateField("batchNo");