Parcourir la source

Merge branch 'hjw-222' into 'master'

文件收集审批前端优化

See merge request spfm/spfm-market-front!448
徐兴安 il y a 2 ans
Parent
commit
6058e33cdb

+ 58 - 12
src/pages/main/documentCollection/documentCollectionApprovalExcel.vue

@@ -5,7 +5,7 @@
                 name="excelIframe" id="excelIframe"></iframe>
         </fullscreen>
         <el-dialog :title="'督办'" :visible.sync="dubanStatus" width="50%" :destroy-on-close="true"
-            :modal-append-to-body="false" :close-on-click-modal="false">
+            :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closeduban">
             <el-form ref="form" :model="testModel" :rules="rules">
                 <div>
                     <div style="padding: 10px 20%;">
@@ -34,14 +34,14 @@
                         </el-form-item>
                     </div>
                     <div slot="footer" style="text-align: right;padding-bottom: 20px;padding-top: 20px">
-                        <el-button @click="dubanStatus = false">取 消</el-button>
+                        <el-button @click="closeduban">取 消</el-button>
                         <el-button type="primary" @click="processAuthduban()">确 定</el-button>
                     </div>
                 </div>
             </el-form>
         </el-dialog>
         <el-dialog :title="'权限设置'" :visible.sync="authSettingStatus" width="100%" :show-close="true"
-            :modal-append-to-body="false">
+            :modal-append-to-body="false" :before-close="closequanxian">
             <el-form :model="testModel" ref="addInfoList">
                 <div>
                     <div class="info-line">
@@ -59,6 +59,7 @@
                         <el-radio v-if="type == '1' || type == '2'" v-model="authType" label="2"
                             style="margin: 10px">特殊权限</el-radio>
                         <div id="limit">
+                            <div style="margin: 10px;display: inline-block;color: red;">注:分配的行的权限不能重复</div>
                             <div v-for="(item, index) in limitList">
                                 <div style="margin-right: 10px;margin-left: 10px;display: inline-block;">负责人:</div>
                                 <el-button v-if="type == '1' || type == '2'" type="primary"
@@ -113,10 +114,10 @@
         <el-dialog title="选择填报人" :visible.sync="noLimitDialog" width="100%" :destroy-on-close="true"
             :modal-append-to-body="false" :close-on-click-modal="false">
             <div style="max-height:500px ;">
-                <deptTreeUserNew v-if="authType == '1'" @treeCheck="treeCheckonly" :defaultList="defaultList"
-                    :type="depttype" :closeList="closeList" :oneORmore="authType" treeListType="1"></deptTreeUserNew>
-                <deptTreeUserNew v-if="authType == '2'" @treeCheck="treeCheckonly" :defaultList="defaultList"
-                    :type="depttype" :closeList="closeList" :oneORmore="authType" treeListType="1"></deptTreeUserNew>
+                <!-- <deptTreeUserNew v-if="authType == '1'" @treeCheck="treeCheckonly" :defaultList="defaultList"
+                    :type="depttype" :closeList="closeList" :oneORmore="authType" treeListType="1"></deptTreeUserNew> -->
+                <deptTreeUserNew @treeCheck="treeCheckonly" :defaultList="defaultList" :type="depttype"
+                    :closeList="closeList" oneORmore="2" treeListType="1"></deptTreeUserNew>
 
                 <div slot="footer" style="text-align: right;padding-bottom: 20px">
                     <el-button @click="noLimitDialog = false">取 消</el-button>
@@ -125,7 +126,7 @@
             </div>
         </el-dialog>
         <el-dialog :title="'提交'" :visible.sync="authDialog" width="50%" :destroy-on-close="true"
-            :modal-append-to-body="false" :close-on-click-modal="false">
+            :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closetijiao">
             <el-form :model="testModel" ref="addInfoList">
                 <div>
                     <div class="info-line">
@@ -150,7 +151,7 @@
                     </div>
                     <br />
                     <div slot="footer" style="text-align: right;padding-bottom: 20px;padding-top: 20px">
-                        <el-button @click="authDialog = false">取 消</el-button>
+                        <el-button @click="closetijiao()">取 消</el-button>
                         <el-button type="primary" @click="processAudit()" :disabled="BtnDisabled">确 定</el-button>
                     </div>
                 </div>
@@ -266,6 +267,16 @@ export default {
         }
     },
     methods: {
+        closequanxian() {
+            this.authSettingStatus = false
+            this.limitList = [{}]
+            this.noLimitUserName = ''
+            this.authType = '2'
+        },
+        closeduban() {
+            this.dubanStatus = false
+            this.testModel = {}
+        },
         // 填报日期
         handleWrite(value) {
             if (value) {//
@@ -307,6 +318,12 @@ export default {
             //     };
             // }
         },
+        closetijiao() {
+            this.authDialog = false;
+            this.treeListType = '';
+            this.auditForm.receiverName = '';
+            this.auditForm.authType = ''
+        },
         auditUserAdd() {
             this.checkexapeople = true;
         },
@@ -479,7 +496,7 @@ export default {
                         message: '处理成功',
                         type: 'success'
                     });
-                    
+
                     //没找到关闭标签页之前的临时处理措施
                     // const newUrl = '#' + this.$route.path + '?type=5&id=' + this.getUrlKey("id");
                     // console.log(newUrl);
@@ -787,9 +804,9 @@ export default {
                 }
             } else if (this.authType == '2') {
                 this.limitList.map((o) => {
-                    console.log(o.userIds);
+                    // console.log(o.userIds);
                     console.log(o.editStart);
-                    console.log(o.editStartCol);
+                    console.log(o.editEnd);
                     let str = o.editStartCol + o.editEndCol
                     if (o.userIds == null || o.userIds[0].key == null) {
                         this.$message({
@@ -863,6 +880,34 @@ export default {
                         return;
                     }
                 })
+                // let arr = []
+                // this.limitList.map((o) => {
+                //     for (var i = o.editStart; i <= o.editEnd; i++) {
+                //         arr.push(i);
+                //     }
+                // })
+                // console.log(arr);
+
+                // let arr2 = arr.sort();
+                // for (let i = 0; i < arr2.length; i++) {
+
+                //     if (typeof (arr2[i]) === 'number') {
+                //         arr2[i] = arr2[i].toString()
+                //     }
+                //     if (typeof (arr2[i + 1]) === 'number') {
+                //         arr2[i + 1] = arr2[i + 1].toString()
+                //     }
+                //     console.log(typeof (arr2[i]));
+                //     console.log((arr2[i]));
+                //     if (arr2[i] === arr2[i + 1]) {
+                //         this.$message({
+                //             message: '分配的行的权限不能重复',
+                //             type: 'error'
+                //         });
+                //         this.success = false;
+                //         return;
+                //     }
+                // }
                 console.log(this.limitList);
             }
             if (this.success) {
@@ -1180,6 +1225,7 @@ export default {
 span {
     width: 80px;
 }
+
 ::v-deep .el-button--text {
     display: none !important;
 }

+ 1 - 1
src/pages/main/documentCollection/newTree.vue

@@ -97,7 +97,7 @@ export default {
       }
       if (v.o !== this.treeId) {
         this.$http({
-          url: "/sysmgr/sysuserinfo/queryListByName",
+          url: "/sysmgr/sysuserinfo/querySysUserListByNameOrderByDuty",
           method: "post",
           headers: {
             "Content-Type": "application/json",