瀏覽代碼

Update documentCollectionApprovalExcel.vue

胡俊炜 2 年之前
父節點
當前提交
78863379b0
共有 1 個文件被更改,包括 34 次插入10 次删除
  1. 34 10
      src/pages/main/documentCollection/documentCollectionApprovalExcel.vue

+ 34 - 10
src/pages/main/documentCollection/documentCollectionApprovalExcel.vue

@@ -45,21 +45,26 @@
             <el-form :model="testModel" ref="addInfoList">
                 <div>
                     <div class="info-line">
-                        <el-radio v-if="type == '1' || type == '2'" v-model="authType" label="1" style="margin: 10px">无特殊权限</el-radio>
+                        <el-radio v-if="type == '1' || type == '2'" v-model="authType" label="1"
+                            style="margin: 10px">无特殊权限</el-radio>
                         <div id="noLimit" class="info-line">
                             <span style="margin-right:10px;margin-left: 10px">负责人:</span>
-                            <el-button v-if="type == '1' || type == '2'" type="primary" @click="noLimitUserAdd()">组织机构</el-button>
+                            <el-button v-if="type == '1' || type == '2'" type="primary"
+                                @click="noLimitUserAdd()">组织机构</el-button>
                             <span style="margin-right: 10px;margin-left: 10px;display: inline-block;color: blue;">{{
                                 noLimitUserName }}</span>
                         </div>
                     </div>
                     <div class="info-line">
-                        <el-radio v-if="type == '1' || type == '2'" v-model="authType" label="2" style="margin: 10px">特殊权限</el-radio>
+                        <el-radio v-if="type == '1' || type == '2'" v-model="authType" label="2"
+                            style="margin: 10px">特殊权限</el-radio>
                         <div id="limit">
                             <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" @click="limitUserAdd(index)">组织机构</el-button>
-                                <div style="margin-right: 10px;margin-left: 10px;display: inline-block;color: blue;">{{ item.userName }}
+                                <el-button v-if="type == '1' || type == '2'" type="primary"
+                                    @click="limitUserAdd(index)">组织机构</el-button>
+                                <div style="margin-right: 10px;margin-left: 10px;display: inline-block;color: blue;">{{
+                                    item.userName }}
                                 </div>
                                 <div style="margin-right: 5px;margin-left: 5px;display: inline-block;">可编辑行:从</div>
 
@@ -93,6 +98,9 @@
                             <el-button style="width: 80px;margin-right: 20px;margin-left: 40px"
                                 v-if="type == '1' || type == '2'" @click="addNewLimitAuth()">添加
                             </el-button>
+                            <el-button style="width: 80px;margin-right: 20px;margin-left: 40px" type="danger"
+                                v-if="(type == '1' || type == '2') && limitList.length > 1" @click="delNewLimitAuth()">删除
+                            </el-button>
                         </div>
                     </div>
                     <div slot="footer" style="text-align: right;padding-bottom: 20px;padding-top: 20px">
@@ -260,11 +268,12 @@ export default {
     methods: {
         // 填报日期
         handleWrite(value) {
-            if (value) {
+            if (value) {//
+                let time = value.getTime() + 86400000
                 let range =
-                    new Date().getTime() > value.getTime()
+                    new Date().getTime() > time
                         ? new Date().getTime()
-                        : value.getTime();
+                        : time;
                 this.pickOptions = {
                     disabledDate(time) {
                         return time.getTime() < range;
@@ -454,7 +463,12 @@ export default {
                 },
             }).then((res) => {
                 this.loading = false;
-                if (res.data.result === 1) {
+                if (res.data.desc == '请编辑回复内容后提交') {
+                    _this.$message({
+                        message: res.data.desc,
+                        type: 'error'
+                    });
+                } else if (res.data.result === 1) {
                     _this.$message({
                         message: res.data.desc,
                         type: 'error'
@@ -465,7 +479,7 @@ export default {
                         message: '处理成功',
                         type: 'success'
                     });
-                    this.BtnDisabled = false
+                    
                     //没找到关闭标签页之前的临时处理措施
                     // const newUrl = '#' + this.$route.path + '?type=5&id=' + this.getUrlKey("id");
                     // console.log(newUrl);
@@ -475,6 +489,7 @@ export default {
                     //this.$router.go(-1);
                     this.$router.push("documentCollectionApproval");
                 }
+                this.BtnDisabled = false
             });
 
         },
@@ -688,6 +703,9 @@ export default {
         showdubanDialog() {
             this.dubanStatus = true;
         },
+        getOutUrl() {
+            this.$router.go(-1);
+        },
         closeauthSettingStatus() {
             this.success = true;
             if (this.authType == '1') {
@@ -907,6 +925,9 @@ export default {
             }
 
         },
+        delNewLimitAuth() {
+            this.limitList.pop()
+        },
         processNoLimitUsers() {
             // console.log(this.treeList);
             // console.log(this.treeListonly);
@@ -1063,6 +1084,9 @@ export default {
         window['dubanBtnDialog'] = (rp) => {
             this.showdubanDialog(rp);
         }
+        window['getOutUrl'] = (rp) => {
+            this.getOutUrl(rp);
+        }
         window['addNewTemplate'] = (sheetName, excelData, templateType) => {
             this.addNewTemplate(sheetName, excelData, templateType);
         };