소스 검색

fiex:修复BUG

Tang 3 년 전
부모
커밋
5e6fb5d637

+ 2 - 2
src/views/resource/bankManagement/topicManagement/excelPop.vue

@@ -36,9 +36,9 @@ export default {
   methods: {
     getDowm() {
       let url =
-        baseUrls.BASE_IMG_URL + "/oss/images/file/20220317/1647479718953.docx";
+        baseUrls.BASE_IMG_URL + "/oss/images/file/20220307/1646623385198.xlsx";
       let link = document.createElement("a");
-      let fileName = "导入模板" + ".docx";
+      let fileName = "导入模板" + ".xlsx";
       document.body.appendChild(link);
       link.href = url;
       link.dowmload = fileName;

+ 72 - 17
src/views/systemManagement/auditManagement/assignReviewers/index.vue

@@ -59,8 +59,10 @@
                   v-for="(items, indexs) in item.children"
                   :key="indexs"
                   style="margin-bottom: 4px; cursor: pointer"
-                  :style="active === items.id ? 'color:red;' : ''"
-                  @click="getapiUserList(items.id)"
+                  :style="
+                    activeBusList.businessId === items.id ? 'color:red;' : ''
+                  "
+                  @click="getapiUserList(items)"
                 >
                   {{ items.onlyName }}
                 </li>
@@ -70,7 +72,7 @@
               </ul>
             </div>
           </el-col>
-          <el-col :span="12" v-if="active">
+          <el-col :span="12" v-if="activeBusList.businessId">
             <el-select
               v-model="activeUserid"
               placeholder="请选择审核人"
@@ -81,20 +83,48 @@
                 :key="index"
                 :label="item.nickName"
                 :value="item.userId"
-                :disabled="newUserList.indexOf(item.userId) !== -1"
+                :disabled="userList1.indexOf(item.userId) !== -1"
+              >
+              </el-option>
+            </el-select>
+            <ul style="max-height: 300px; overflow: auto">
+              <li
+                v-for="(item, index) in userList1"
+                :key="index"
+                class="userName"
+              >
+                {{ getuserName(item) }}
+                <i
+                  class="el-icon-error clearSty"
+                  @click="userList1.splice(index, 1)"
+                ></i>
+                <div style="clear: both"></div>
+              </li>
+            </ul>
+            <el-select
+              v-model="activeUserid"
+              placeholder="请选择复审人"
+              @change="editUserLists"
+            >
+              <el-option
+                v-for="(item, index) in options"
+                :key="index"
+                :label="item.nickName"
+                :value="item.userId"
+                :disabled="userList2.indexOf(item.userId) !== -1"
               >
               </el-option>
             </el-select>
             <ul style="max-height: 300px; overflow: auto">
               <li
-                v-for="(item, index) in newUserList"
+                v-for="(item, index) in userList2"
                 :key="index"
                 class="userName"
               >
                 {{ getuserName(item) }}
                 <i
                   class="el-icon-error clearSty"
-                  @click="newUserList.splice(index, 1)"
+                  @click="userList2.splice(index, 1)"
                 ></i>
                 <div style="clear: both"></div>
               </li>
@@ -120,10 +150,11 @@ export default {
       statePop: "",
       educationType: [],
       options: [], //审核人列表
+      activeUserid: "", //select的v-model绑定值
       activeFist: "", //当前选中教育类型ID
-      active: "", //当前选中业务层次ID
-      activeUserid: "",
-      newUserList: [], //审核人索引值
+      activeBusList: {},
+      userList1: [],
+      userList2: [],
     };
   },
   mounted() {
@@ -138,24 +169,48 @@ export default {
       }
     },
     submits() {
-      if (!this.newUserList.length) {
+      if (!this.userList1.length) {
         this.$message.warning("请选择指派审核人");
         return;
       }
+      if (!this.userList2.length) {
+        this.$message.warning("请选择指派复审人");
+        return;
+      }
       /**
        * 提交api
        */
+      let ays = {
+        ...this.activeBusList,
+        userList1: this.userList1,
+        userList2: this.userList2,
+      };
+
+      console.log(ays, "数据");
       this.$message.success("指派成功");
     },
     editUserList(int) {
-      this.newUserList.push(int);
+      this.userList1.push(int);
+      this.activeUserid = "";
+    },
+    editUserLists(int) {
+      this.userList2.push(int);
       this.activeUserid = "";
     },
     /**
      * 点击业务层次获取对应审核人
      */
-    getapiUserList(id) {
-      this.active = id;
+    getapiUserList(item) {
+      this.activeBusList = {
+        educationId: item.educationId,
+        projectId: item.projectId,
+        businessId: item.id,
+      };
+      /**
+       * 模拟数据
+       */
+      this.userList1 = [];
+      this.userList2 = [];
     },
     /**
      * 获取教育类型及业务层次
@@ -216,11 +271,11 @@ export default {
     },
     getInfo(int) {
       this.statePop = int;
-      (this.activeFist = ""), (this.active = ""); //当前选中业务层次ID
+      this.activeFist = "";
       this.activeUserid = "";
-      this.newUserList = []; //审核人索引值
+      this.userList1 = [];
+      this.userList2 = [];
       this.dialogVisible = true;
-      console.log(this.educationType, this.businessLevel);
     },
   },
 };
@@ -361,7 +416,7 @@ export default {
   }
 }
 .userName {
-  float: left;
+  display: table;
   border-radius: 4px;
   border: 1px solid #999;
   margin: 0px 6px 6px 0px;