Sfoglia il codice sorgente

用户管理优化及合同管理限制修改

cuixq 3 anni fa
parent
commit
712cafa458

+ 9 - 5
front-vue/src/views/service/contract/addContract.vue

@@ -324,12 +324,12 @@ export default {
           break;
         }
       }
-        this.noneBtnDealImg = fileList.length >= this.limitCountImg;
+        // this.noneBtnDealImg = fileList.length >= this.limitCountImg;
     },
     handleExceed(files, fileList) {
       this.$message.warning(`当前限制选择 1 个文件`);
     },
-    beforeUpload(files){
+    beforeUpload(files,fileList){
       var testmsg=files.name.substring(files.name.lastIndexOf('.')+1);                            
       const extension2 = testmsg === 'docx'
       if(!extension2){
@@ -338,7 +338,12 @@ export default {
       return extension2;
     },
     dealImgChange(files, fileList){
-      this.noneBtnDealImg = fileList.length >= this.limitCountImg;
+      var testmsg=files.name.substring(files.name.lastIndexOf('.')+1);                            
+      const extension2 = testmsg === 'docx'
+      if(extension2){
+         this.noneBtnDealImg = fileList.length >= this.limitCountImg;
+      }
+
      },
     //手动上传文件触发
     httpRequest(param) {
@@ -358,12 +363,11 @@ export default {
           this.msgSuccess("上传成功");
           loading.close();
         }
-        this.noneBtnDealImg = fileList.length >= this.limitCountImg;
       }).catch((response) =>{
           if(!response){
             this.$message.warning(`上传失败`);
           }
-           this.noneBtnDealImg = fileList.length >= this.limitCountImg;
+           this.noneBtnDealImg = this.fileList.length >= this.limitCountImg;
           loading.close();
       });
     },

+ 1 - 0
front-vue/src/views/service/contract/editContract.vue

@@ -153,6 +153,7 @@
           :http-request="httpRequest"
           :before-remove="beforeRemove"
           :on-preview="handleFileDownload"
+           :before-upload="beforeUpload"
           accept=".docx"
           multiple
           :limit="1"

+ 4 - 2
front-vue/src/views/system/user/index.vue

@@ -794,10 +794,12 @@ export default {
         /** 查询用户列表 */
         getList() {
             this.loading = true;
-            listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
+            listUser(
+                this.addDateRange(this.queryParams, this.dateRange)).then(
                 (response) => {
                     let userList = response.rows;
-                      handlerDo(userList[0]).then((response) => {
+                    console.log(userList)
+                      handlerDo(userList).then((response) => {
                     for (let i = 0; i < userList.length; i++) {
                              for (let j = 0; j < response.data.length; j++) {
                                  console.log(userList[i].userId,"iser")