From 7f0f5bc0be05b8a9206bcff083442379504db009 Mon Sep 17 00:00:00 2001
From: lixuliang <lixuliang_hd@126.com>
Date: 星期二, 30 四月 2024 14:17:06 +0800
Subject: [PATCH] Merge branch 'master' of http://103.135.160.14:9034/r/~shiwenshuai/DTKZZTX

---
 src/views/userManage/templateManage.vue |  600 ++++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 341 insertions(+), 259 deletions(-)

diff --git a/src/views/userManage/templateManage.vue b/src/views/userManage/templateManage.vue
index a9971b7..ee54228 100644
--- a/src/views/userManage/templateManage.vue
+++ b/src/views/userManage/templateManage.vue
@@ -1,18 +1,25 @@
 <template>
   <div class="authorityManagement_box">
     <My-bread :list="[
-      `${$t('dataManage.dataManage')}`,
-      `${$t('dataManage.templateManage')}`,
+      `鏁版嵁璧勬簮绠$悊`,
+      `閫氱敤妯℃澘绠$悊`,
     ]"></My-bread>
     <el-divider />
-    <div class="searchComp subpage_Div" ref="container">
-      <el-form ref="ruleForm" :model="ruleForm" :inline="true">
+    <div class="searchComp subpage_Div"
+         ref="container">
+      <el-form ref="ruleForm"
+               :model="ruleForm"
+               :inline="true">
         <div class="flex_box">
           <div style="margin-right: auto">
             <el-form-item :label="$t('userManage.authorityM.name')">
-              <el-input style="width:200px" size="small" v-model="ruleForm.name"
-                :placeholder="$t('userManage.authorityM.nameHolder')">
-                <i slot="suffix" class="el-icon-search" @click="setRefreshTable"></i>
+              <el-input style="width:200px"
+                        size="small"
+                        v-model="ruleForm.name"
+                        :placeholder="$t('userManage.authorityM.nameHolder')">
+                <i slot="suffix"
+                   class="el-icon-search"
+                   @click="setRefreshTable"></i>
               </el-input>
             </el-form-item>
           </div>
@@ -27,16 +34,25 @@
             <!--              >{{ $t('common.iquery') }}</el-button>-->
             <!--            </el-form-item>-->
             <el-form-item>
-              <el-button v-if="btnStatus.insert" @click="setTableInsert" icon="el-icon-edit" type="success"
-                size="small">{{ $t('common.append') }}</el-button>
+              <el-button v-if="btnStatus.insert"
+                         @click="setTableInsert"
+                         icon="el-icon-edit"
+                         type="success"
+                         size="small">{{ $t('common.append') }}</el-button>
             </el-form-item>
             <el-form-item>
-              <el-button v-if="btnStatus.delete" icon="el-icon-delete" @click="delTableData" type="danger"
-                size="small">{{
+              <el-button v-if="btnStatus.delete"
+                         icon="el-icon-delete"
+                         @click="delTableData"
+                         type="danger"
+                         size="small">{{
       $t('common.delete') }}</el-button>
             </el-form-item>
             <el-form-item>
-              <el-button icon="el-icon-refresh" @click="restRefreshTable" type="info" size="small">{{ $t('common.empty')
+              <el-button icon="el-icon-refresh"
+                         @click="restRefreshTable"
+                         type="info"
+                         size="small">{{ $t('common.empty')
                 }}</el-button>
             </el-form-item>
           </div>
@@ -45,20 +61,35 @@
       </el-form>
     </div>
     <div class="dividing-line"></div>
-    <div class="table_box" :style="styleVar">
-      <el-table :data="tableData" style="width: 100%" border @selection-change="handleSelectionChange"
-        height="calc(100% - 45px)">
-        <el-table-column type="selection" width="55" />
-        <el-table-column align="center" type="index" :label="$t('dataManage.styleObj.index')" width="70px" />
-        <el-table-column align="center" prop="name" :label="$t('dataManage.styleObj.name')" />
-        <el-table-column align="center" prop="type" :label="$t('common.fileType')">
+    <div class="table_box"
+         :style="styleVar">
+      <el-table :data="tableData"
+                style="width: 100%"
+                border
+                @selection-change="handleSelectionChange"
+                height="calc(100% - 65px)">
+        <el-table-column type="selection"
+                         width="55" />
+        <el-table-column align="center"
+                         type="index"
+                         :label="$t('dataManage.styleObj.index')"
+                         width="70px" />
+        <el-table-column align="center"
+                         prop="name"
+                         :label="$t('dataManage.styleObj.name')" />
+        <el-table-column align="center"
+                         prop="type"
+                         :label="$t('common.fileType')">
           <template slot-scope="scope">
             <span v-if="scope.row.type == 1">World妯℃澘 </span>
             <span v-else-if="scope.row.type == 2">Excel妯℃澘</span>
             <span v-else-if="scope.row.type == 3">Zip妯℃澘</span>
           </template>
         </el-table-column>
-        <el-table-column align="center" prop="code" :label="$t('common.templateType')" :formatter="codeData" />
+        <el-table-column align="center"
+                         prop="code"
+                         :label="$t('common.templateType')"
+                         :formatter="codeData" />
         <!-- <el-table-column
           align="center"
           prop="fname"
@@ -69,25 +100,43 @@
           prop="bak"
           :label="$t('common.bak')"
         /> -->
-        <el-table-column align="center" prop="createName" :label="$t('dataManage.vmobj.createonuser')" />
-        <el-table-column align="center" prop="createTime" :label="$t('dataManage.vmobj.createontime')"
-          :formatter="formatData" />
-        <el-table-column min-width="100" :label="$t('dataManage.dictionaryManageObj.operation')">
+        <el-table-column align="center"
+                         prop="createName"
+                         :label="$t('dataManage.vmobj.createonuser')" />
+        <el-table-column align="center"
+                         prop="createTime"
+                         :label="$t('dataManage.vmobj.createontime')"
+                         :formatter="formatData" />
+        <el-table-column min-width="100"
+                         :label="$t('dataManage.dictionaryManageObj.operation')">
 
           <template slot-scope="scope">
-            <el-button v-if="btnStatus.select" @click="showDetail(scope.$index, scope.row)" type="primary" plain
-              size="small">{{ $t('dataManage.dictionaryManageObj.lookOver') }}</el-button>
-            <el-button v-if="btnStatus.update" @click="handleEdit(scope.$index, scope.row)" type="warning" plain
-              size="small">{{ $t('dataManage.dictionaryManageObj.revamp') }}</el-button>
-            <el-button v-if="btnStatus.download" plain @click="handleDownload(scope.$index, scope.row)" type="info"
-              size="small">{{ $t('common.download') }}</el-button>
+            <el-button v-if="btnStatus.select"
+                       @click="showDetail(scope.$index, scope.row)"
+                       type="primary"
+                       plain
+                       size="small">{{ $t('dataManage.dictionaryManageObj.lookOver') }}</el-button>
+            <el-button v-if="btnStatus.update"
+                       @click="handleEdit(scope.$index, scope.row)"
+                       type="warning"
+                       plain
+                       size="small">{{ $t('dataManage.dictionaryManageObj.revamp') }}</el-button>
+            <el-button v-if="btnStatus.download"
+                       plain
+                       @click="handleDownload(scope.$index, scope.row)"
+                       type="info"
+                       size="small">{{ $t('common.download') }}</el-button>
           </template>
         </el-table-column>
       </el-table>
       <div style="margin-top:10px">
-        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-          :current-page="listData.pageIndex" :page-sizes="[10, 20, 50, 100]" :page-size="listData.pageSize"
-          layout="total, sizes, prev, pager, next, jumper" :total="listData.count">
+        <el-pagination @size-change="handleSizeChange"
+                       @current-change="handleCurrentChange"
+                       :current-page="listData.pageIndex"
+                       :page-sizes="[10, 20, 50, 100]"
+                       :page-size="listData.pageSize"
+                       layout="total, sizes, prev, pager, next, jumper"
+                       :total="listData.count">
         </el-pagination>
       </div>
     </div>
@@ -95,29 +144,48 @@
     <el-dialog :title="behavior == '鏂板'
       ? `${$t('common.append')}`
       : `${$t('common.update')}`
-      " :visible.sync="dialogVisible" :before-close="handleClose">
+      "
+               :visible.sync="dialogVisible"
+               :before-close="handleClose">
       <div style="height: 500px; overflow: auto">
-        <el-form ref="form" :model="editForm" label-width="100px" label-position="top">
+        <el-form ref="form"
+                 :model="editForm"
+                 label-width="100px"
+                 label-position="top">
           <el-form-item :label="$t('dataManage.styleObj.name')">
-            <el-input style="width:85%" v-model="editForm.name"
-              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo') + $t('dataManage.styleObj.name')"></el-input>
+            <el-input style="width:85%"
+                      v-model="editForm.name"
+                      :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo') + $t('dataManage.styleObj.name')"></el-input>
           </el-form-item>
           <el-form-item :label="$t('common.templateType')">
             <!-- <el-input
               style="width:100%"
               v-model=" editForm.code"
             ></el-input> -->
-            <el-select :popper-append-to-body="false" style="width:85%" @change="selFileCodeChange"
-              v-model="editForm.code"
-              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree') + $t('dataManage.common.templateType')">
-              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+            <el-select :popper-append-to-body="false"
+                       style="width:85%"
+                       @change="selFileCodeChange"
+                       v-model="editForm.code"
+                       disabled
+                       :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree') + $t('dataManage.common.templateType')">
+              <el-option v-for="item in options"
+                         :key="item.value"
+                         :label="item.label"
+                         :value="item.value">
               </el-option>
             </el-select>
           </el-form-item>
           <el-form-item :label="$t('common.fileType')">
-            <el-select :popper-append-to-body="false" v-model="editForm.type" @change="selFileTypeChange"
-              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree') + $t('common.fileType')" style="width:85%">
-              <el-option v-for="item in typeOption" :key="item.value" :label="item.label" :value="item.value">
+            <el-select :popper-append-to-body="false"
+                       v-model="editForm.type"
+                       @change="selFileTypeChange"
+                       disabled
+                       :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree') + $t('common.fileType')"
+                       style="width:85%">
+              <el-option v-for="item in typeOption"
+                         :key="item.value"
+                         :label="item.label"
+                         :value="item.value">
               </el-option>
               <!-- <el-option
                 label="World妯℃澘"
@@ -137,38 +205,66 @@
           <el-form-item :label="$t('common.filePath')">
             <div class="BoxFlex">
               <div class="BoxFlexinput">
-                <el-input v-model="editForm.fname" disabled autocomplete="off" style="width:100%"></el-input>
+                <el-input v-model="editForm.fname"
+                          disabled
+                          autocomplete="off"
+                          style="width:100%"></el-input>
               </div>
               <div class="BoxFlexbutton">
-                <input name="file1" type="file" id="editFile" multiple="multiple" :accept="selectFileType"
-                  style="display: none" @change="geteditFile(1)" />
-                <el-button style="margin-left: 6px;" type="primary" size="small" :underline="false"
-                  @click="geteditFile(0)">閫夋嫨</el-button>
-                <el-button type="primary" size="small" :underline="false" @click="geteditFile(2)">涓婁紶</el-button>
+                <input name="file1"
+                       type="file"
+                       id="editFile"
+                       multiple="multiple"
+                       :accept="selectFileType"
+                       style="display: none"
+                       @change="geteditFile(1)" />
+                <el-button style="margin-left: 6px;"
+                           type="primary"
+                           size="small"
+                           :underline="false"
+                           @click="geteditFile(0)">閫夋嫨</el-button>
+                <el-button type="primary"
+                           size="small"
+                           :underline="false"
+                           @click="geteditFile(2)">涓婁紶</el-button>
               </div>
             </div>
           </el-form-item>
           <el-form-item :label="$t('common.bak')">
-            <el-input style="width:85%" v-model="editForm.bak"
-              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo') + $t('common.bak')"></el-input>
+            <el-input style="width:85%"
+                      v-model="editForm.bak"
+                      :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo') + $t('common.bak')"></el-input>
           </el-form-item>
         </el-form>
       </div>
-      <div v-if="behavior == '鏂板'" slot="footer" class="dialog-footer">
-        <el-button size="small" @click="closeInsertData">鍙� 娑�</el-button>
-        <el-button type="primary" size="small" @click="addInsertData">纭� 瀹�</el-button>
+      <div v-if="behavior == '鏂板'"
+           slot="footer"
+           class="dialog-footer">
+        <el-button size="small"
+                   @click="closeInsertData">鍙� 娑�</el-button>
+        <el-button type="primary"
+                   size="small"
+                   @click="addInsertData">纭� 瀹�</el-button>
       </div>
-      <div v-if="behavior != '鏂板'" slot="footer" class="dialog-footer">
-        <el-button size="small" @click="closeEditData">鍙� 娑�</el-button>
-        <el-button type="primary" size="small" @click="addEditData">纭� 瀹�</el-button>
+      <div v-if="behavior != '鏂板'"
+           slot="footer"
+           class="dialog-footer">
+        <el-button size="small"
+                   @click="closeEditData">鍙� 娑�</el-button>
+        <el-button type="primary"
+                   size="small"
+                   @click="addEditData">纭� 瀹�</el-button>
       </div>
     </el-dialog>
-    <div class="infoBox_box" v-show="showinfoBox">
+    <div class="infoBox_box"
+         v-show="showinfoBox">
       <div class="infoBox subpage_Div box_div">
 
-        <div slot="header" class="clearfix">
+        <div slot="header"
+             class="clearfix">
           <span>{{ $t('dataManage.styleObj.deInformation') }}</span>
-          <div style="float: right; cursor: pointer" @click="closeDetial">
+          <div style="float: right; cursor: pointer"
+               @click="closeDetial">
             <i class="el-icon-close"></i>
           </div>
         </div>
@@ -180,10 +276,10 @@
           </p>
           <el-divider></el-divider>
           <p>
-          <p>
-            <label> {{ $t('common.fileType') }}:</label>
-            <label class="boxlabel">{{ itemdetail.fileType }}</label>
-          </p>
+            <p>
+              <label> {{ $t('common.fileType') }}:</label>
+              <label class="boxlabel">{{ itemdetail.fileType }}</label>
+            </p>
           </p>
           <el-divider></el-divider>
           <p>
@@ -225,7 +321,9 @@
 
       </div>
     </div>
-    <iframe id="downFrame" src="" style="display: none; border: 0; padding: 0; height: 0; width: 0"></iframe>
+    <iframe id="downFrame"
+            src=""
+            style="display: none; border: 0; padding: 0; height: 0; width: 0"></iframe>
   </div>
 </template>
 
@@ -243,7 +341,7 @@
 export default {
   name: "templateManage",
   components: { MyBread },
-  data() {
+  data () {
     return {
       options: [],
       itemdetail: {},
@@ -287,66 +385,66 @@
       rowGuid: null,
     };
   },
-  created() {
+  created () {
     this.showPermsBtn();
     this.showTableData();
   },
-  beforeDestroy() {
-    this.timer && clearTimeout(this.timer);
-    window.removeEventListener("resize", this.onResize);
+  beforeDestroy () {
+    this.timer&&clearTimeout(this.timer);
+    window.removeEventListener("resize",this.onResize);
   },
-  mounted() {
+  mounted () {
 
-    var obj = dataStatistics.statistics.filter(res => {
-      if (res.isMenu != false)
+    var obj=dataStatistics.statistics.filter(res => {
+      if(res.isMenu!=false)
         return res;
     })
-    this.options = obj
-    window.addEventListener("resize", this.onResize);
+    this.options=obj
+    window.addEventListener("resize",this.onResize);
     this.calHeight();
   },
   methods: {
-    onResize() {
-      this.timer && clearTimeout(this.timer);
-      this.timer = setTimeout(() => {
+    onResize () {
+      this.timer&&clearTimeout(this.timer);
+      this.timer=setTimeout(() => {
         this.calHeight();
-      }, 500);
+      },500);
     },
-    calHeight() {
+    calHeight () {
       this.$nextTick(() => {
-        const rect = this.$refs.container.getBoundingClientRect();
-        this.tableHeight = `${rect.height + 97}px`;
-        this.styleVar["height"] = `calc(100% - ${rect.height + 30}px)`;
+        const rect=this.$refs.container.getBoundingClientRect();
+        this.tableHeight=`${rect.height+97}px`;
+        this.styleVar["height"]=`calc(100% - ${rect.height+30}px)`;
         // this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`;
       });
     },
     //淇敼鍙栨秷
-    closeEditData() {
+    closeEditData () {
       this.closeInsertData();
     },
-    handleClose() {
+    handleClose () {
       var blackTheme;
-      if (this.$store.state.themeflag == true) {
-        blackTheme = {
+      if(this.$store.state.themeflag==true) {
+        blackTheme={
           customClass: "Black_theme",
         };
       }
 
-      this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?", blackTheme)
+      this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?",blackTheme)
         .then((_) => {
           this.closeInsertData();
         })
         .catch((_) => { });
     },
-    codeData(row, column) {
+    codeData (row,column) {
 
-      var code = row.code;
-      let val = this.options.filter(res => {
-        if (res.value == code) {
+      var code=row.code;
+      let val=this.options.filter(res => {
+        if(res.value==code) {
           return res
         }
       })
-      if (val.length > 0) {
+      if(val.length>0) {
         return val[0].label
       } else {
         return code
@@ -354,23 +452,23 @@
 
     },
     //鏌ョ湅
-    showDetail(index, row) {
-      this.itemdetail = row;
+    showDetail (index,row) {
+      this.itemdetail=row;
 
-      if (parseInt(row.type) == 1) {
-        this.itemdetail.fileType = "World妯℃澘";
-      } else if (parseInt(row.type) == 2) {
-        this.itemdetail.fileType = "Excel妯℃澘";
-      } else if (parseInt(row.type) == 3) {
-        this.itemdetail.fileType = "Zip妯℃澘";
+      if(parseInt(row.type)==1) {
+        this.itemdetail.fileType="World妯℃澘";
+      } else if(parseInt(row.type)==2) {
+        this.itemdetail.fileType="Excel妯℃澘";
+      } else if(parseInt(row.type)==3) {
+        this.itemdetail.fileType="Zip妯℃澘";
       }
-      var val = this.options.filter(res => {
-        if (res.value == row.code) {
+      var val=this.options.filter(res => {
+        if(res.value==row.code) {
           return res
         }
       })
-      if (val.length > 0 && val[0].label) {
-        this.itemdetail.code = val[0].label;
+      if(val.length>0&&val[0].label) {
+        this.itemdetail.code=val[0].label;
       }
 
       // if (row.code.indexOf("countSizes") != -1) {
@@ -385,31 +483,31 @@
       //   this.itemdetail.code = "鐢ㄦ埛娴侀噺缁熻";
       // }
 
-      this.itemdetail.cTime = this.format(row.createTime);
-      if (row.updateTime) {
+      this.itemdetail.cTime=this.format(row.createTime);
+      if(row.updateTime) {
 
-        this.itemdetail.uTime = this.format(row.updateTime);
+        this.itemdetail.uTime=this.format(row.updateTime);
       }
       // this.itemdetail.uTime = this.format(row.updateTime);
-      this.showinfoBox = true;
+      this.showinfoBox=true;
     },
     //鍏抽棴鏌ョ湅
-    closeDetial() {
-      this.showinfoBox = false;
+    closeDetial () {
+      this.showinfoBox=false;
     },
     //涓嬭浇
-    handleDownload(index, row) {
-      var token = getToken();
-      var url =
-        BASE_URL + "/report/download?token=" + token + "&guid=" + row.guid;
-      $("#downFrame").attr("src", url).click();
+    handleDownload (index,row) {
+      var token=getToken();
+      var url=
+        BASE_URL+"/report/download?token="+token+"&guid="+row.guid;
+      $("#downFrame").attr("src",url).click();
     },
     //淇敼鎻愪氦
-    async addEditData() {
-      this.editForm.guid = this.rowGuid;
+    async addEditData () {
+      this.editForm.guid=this.rowGuid;
       debugger
-      const data = await report_update(this.editForm);
-      if (data.code != 200) {
+      const data=await report_update(this.editForm);
+      if(data.code!=200) {
         return this.$message.error("淇敼澶辫触");
       }
       this.$message({
@@ -419,107 +517,98 @@
       this.closeInsertData();
     },
     //鏂囦欢绫诲瀷鍒囨崲
-    selFileTypeChange(val) {
-      if (parseInt(val) == 1) {
-        this.selectFileType = ".docx";
-      } else if (parseInt(val) == 2) {
-        this.selectFileType = ".xlsx";
-      } else if (parseInt(val) == 3) {
-        this.selectFileType = ".zip";
+    selFileTypeChange (val) {
+      if(parseInt(val)==1) {
+        this.selectFileType=".docx";
+      } else if(parseInt(val)==2) {
+        this.selectFileType=".xlsx";
+      } else if(parseInt(val)==3) {
+        this.selectFileType=".zip";
       }
     },
-    selFileCodeChange(res) {
+    selFileCodeChange (res) {
       var name;
-      for (var i in this.options) {
-        if (this.options[i].value == res) {
-          name = this.options[i].label
+      for(var i in this.options) {
+        if(this.options[i].value==res) {
+          name=this.options[i].label
           break;
         }
       }
       console.log(name)
-      if (name.indexOf('缁熻') > -1) {
-        this.typeOption = [{
-          label: "World妯℃澘",
-          value: "1"
-        }, {
+      if(name.indexOf('缁熻')>-1) {
+        this.typeOption=[{
           label: "Excel妯℃澘",
           value: "2"
         }]
 
       } else {
-        this.typeOption = [{
-          label: "World妯℃澘",
-          value: "1"
-        }, {
+        this.typeOption=[{
           label: "Excel妯℃澘",
           value: "2"
-        }, {
-          label: "Zip妯℃澘",
-          value: "3"
         }]
       }
-      this.editForm.type = this.typeOption[0].value
+      this.editForm.type=this.typeOption[0].value
     },
 
 
 
 
     //淇敼
-    handleEdit(index, row) {
-      this.behavior = "淇敼";
-      this.editForm = row;
+    handleEdit (index,row) {
+      this.behavior="淇敼";
+      this.editForm=row;
 
-      if (row.name.indexOf('缁熻') > -1) {
-        this.typeOption = [{
+      if(row.name.indexOf('缁熻')>-1) {
+        this.typeOption=[{
           label: "World妯℃澘",
           value: "1"
-        }, {
+        },{
           label: "Excel妯℃澘",
           value: "2"
         }]
 
       } else {
-        this.typeOption = [{
+        this.typeOption=[{
           label: "World妯℃澘",
           value: "1"
-        }, {
+        },{
           label: "Excel妯℃澘",
           value: "2"
-        }, {
+        },{
           label: "Zip妯℃澘",
           value: "3"
         }]
       }
-      if (parseInt(row.type) == 1) {
-        this.selectFileType = ".docx";
-      } else if (parseInt(row.type) == 2) {
-        this.selectFileType = ".xlsx";
+      if(parseInt(row.type)==1) {
+        this.selectFileType=".docx";
+      } else if(parseInt(row.type)==2) {
+        this.selectFileType=".xlsx";
       }
-      this.rowGuid = row.guid;
+      this.rowGuid=row.guid;
 
 
 
 
-      this.dialogVisible = true;
+      this.dialogVisible=true;
     },
     //鍒犻櫎
-    async delTableData() {
-      if (this.multipleSelection.length == 0) {
+    async delTableData () {
+      if(this.multipleSelection.length==0) {
         return this.$message("璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁");
       }
-      var std = [];
-      for (var i in this.multipleSelection) {
+      var std=[];
+      for(var i in this.multipleSelection) {
         std.push(this.multipleSelection[i].id);
       }
-      this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユā鍧�, 鏄惁缁х画?", "鎻愮ず", {
+      this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユā鍧�, 鏄惁缁х画?","鎻愮ず",{
         confirmButtonText: "纭畾",
         cancelButtonText: "鍙栨秷",
         type: "warning",
       })
         .then(async () => {
-          const data = await report_deletes({ ids: std.toString() });
-          if (data.code == 200) {
-            this.InsertFormdialog = false;
+          const data=await report_deletes({ ids: std.toString() });
+          if(data.code==200) {
+            this.InsertFormdialog=false;
             this.$message({
               message: "鍒犻櫎鎴愬姛锛�",
               type: "success",
@@ -550,21 +639,21 @@
     },
 
     //閲嶇疆鏌ヨ
-    restRefreshTable() {
-      this.ruleForm.name = "";
+    restRefreshTable () {
+      this.ruleForm.name="";
       this.setRefreshTable();
     },
     //閲嶇疆鍒锋柊Table
-    setRefreshTable() {
-      this.listData.pageIndex = 1;
-      this.listData.pageSize = 10;
+    setRefreshTable () {
+      this.listData.pageIndex=1;
+      this.listData.pageSize=10;
       this.showTableData();
     },
     //鏂板涓�鏉℃暟鎹�
-    async addInsertData() {
-      this.editForm.guid = this.rowGuid;
-      const data = await report_insert(this.editForm);
-      if (data.code != 200) {
+    async addInsertData () {
+      this.editForm.guid=this.rowGuid;
+      const data=await report_insert(this.editForm);
+      if(data.code!=200) {
         return this.$message.error("鏂板澶辫触");
       }
       this.$message({
@@ -574,9 +663,9 @@
       this.closeInsertData();
     },
     //鍏抽棴鏂板
-    closeInsertData() {
-      this.dialogVisible = false;
-      this.editForm = {
+    closeInsertData () {
+      this.dialogVisible=false;
+      this.editForm={
         fname: "",
         guid: "",
         name: "",
@@ -585,45 +674,46 @@
         bak: "",
       };
       this.setRefreshTable();
-      document.getElementById("editFile").value = "";
+      document.getElementById("editFile").value="";
     },
     //鏂囦欢涓婁紶
-    async geteditFile(res) {
+    async geteditFile (res) {
 
-      if (parseInt(this.editForm.type) == 1) {
-        this.selectFileType = ".docx";
-      } else if (parseInt(this.editForm.type) == 2) {
-        this.selectFileType = ".xlsx";
-      }
+      // if(parseInt(this.editForm.type)==1) {
+      //   this.selectFileType=".docx";
+      // } else if(parseInt(this.editForm.type)==2) {
+      //   this.selectFileType=".xlsx";
+      // }
+      this.selectFileType=".xlsx";
       this.$nextTick(() => {
         this.setEditFile(res)
       })
 
     },
-    async setEditFile(res) {
-      if (res == 0) {
-        if (this.editForm.type == "") {
+    async setEditFile (res) {
+      if(res==0) {
+        if(this.editForm.type=="") {
           return this.$message("璇烽�夋嫨涓婁紶鏂囦欢绫诲瀷");
         }
 
 
 
         $("#editFile").click();
-      } else if (res == 1) {
-        var val = document.getElementById("editFile").files;
-        if (!val || !val.length) return;
-        this.editForm.fname = val[0].name;
-      } else if (res == 2) {
-        var fs = document.getElementById("editFile");
-        if (fs.files.length == 0) {
+      } else if(res==1) {
+        var val=document.getElementById("editFile").files;
+        if(!val||!val.length) return;
+        this.editForm.fname=val[0].name;
+      } else if(res==2) {
+        var fs=document.getElementById("editFile");
+        if(fs.files.length==0) {
           return;
         }
-        var formData = new FormData();
-        formData.append("file", fs.files[0]);
-        var val_data = await report_upload(formData);
-        if (val_data.code == 200) {
-          this.editForm.guid = val_data.result;
-          this.rowGuid = val_data.result;
+        var formData=new FormData();
+        formData.append("file",fs.files[0]);
+        var val_data=await report_upload(formData);
+        if(val_data.code==200) {
+          this.editForm.guid=val_data.result;
+          this.rowGuid=val_data.result;
           this.$message({
             message: "涓婁紶鎴愬姛锛�",
             type: "success",
@@ -637,103 +727,94 @@
       }
     },
     //鏍煎紡鍖栧垪琛�
-    formatData(row, column) {
-      let data = row[column.property];
-      if (data == null) {
+    formatData (row,column) {
+      let data=row[column.property];
+      if(data==null) {
         return data;
       }
       return this.format(data);
     },
     //鏍煎紡鍖栨椂闂�
-    format(shijianchuo) {
+    format (shijianchuo) {
       //shijianchuo鏄暣鏁帮紝鍚﹀垯瑕乸arseInt杞崲
-      var time = new Date(shijianchuo);
-      var y = time.getFullYear();
-      var m = time.getMonth() + 1;
-      var d = time.getDate();
-      var h = time.getHours();
-      var mm = time.getMinutes();
-      var s = time.getSeconds();
-      return y + "-" + this.add0(m) + "-" + this.add0(d);
+      var time=new Date(shijianchuo);
+      var y=time.getFullYear();
+      var m=time.getMonth()+1;
+      var d=time.getDate();
+      var h=time.getHours();
+      var mm=time.getMinutes();
+      var s=time.getSeconds();
+      return y+"-"+this.add0(m)+"-"+this.add0(d);
     },
     //鏍煎紡鍖栨椂闂�
-    add0(m) {
-      return m < 10 ? "0" + m : m;
+    add0 (m) {
+      return m<10? "0"+m:m;
     },
     //Table閫夋嫨浜嬩欢
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
+    handleSelectionChange (val) {
+      this.multipleSelection=val;
     },
 
-    editFormStart() {
-      this.editForm.code = "dataTable";
+    editFormStart () {
+      this.editForm.code="dataTable";
       var name;
-      for (var i in this.options) {
-        if (this.options[i].value == this.editForm.code) {
-          name = this.options[i].label
+      for(var i in this.options) {
+        if(this.options[i].value==this.editForm.code) {
+          name=this.options[i].label
           break;
         }
       }
 
-      if (name.indexOf('缁熻') > -1) {
-        this.typeOption = [{
-          label: "World妯℃澘",
-          value: "1"
-        }, {
+      if(name.indexOf('缁熻')>-1) {
+        this.typeOption=[{
           label: "Excel妯℃澘",
           value: "2"
         }]
 
       } else {
-        this.typeOption = [{
-          label: "World妯℃澘",
-          value: "1"
-        }, {
+        this.typeOption=[{
           label: "Excel妯℃澘",
           value: "2"
-        }, {
-          label: "Zip妯℃澘",
-          value: "3"
         }]
       }
-      this.editForm.type = this.typeOption[0].value
+      this.editForm.type=this.typeOption[0].value
     },
 
     //鏂板寮圭獥
-    setTableInsert() {
+    setTableInsert () {
       this.editFormStart();
-      this.behavior = "鏂板";
-      this.dialogVisible = true;
+      this.behavior="鏂板";
+      this.dialogVisible=true;
     },
     //鍒嗛〉鍒囨崲
-    handleSizeChange(val) {
-      this.listData.pageSize = val;
-      this.listData.pageIndex = 1;
+    handleSizeChange (val) {
+      this.listData.pageSize=val;
+      this.listData.pageIndex=1;
       this.showTableData();
     },
     //鍒嗛〉鍒囨崲
-    handleCurrentChange(val) {
-      this.listData.pageIndex = val;
+    handleCurrentChange (val) {
+      this.listData.pageIndex=val;
       this.showTableData();
     },
     //鍒楄〃璋冪敤
-    async showTableData() {
-      this.listData.name = this.ruleForm.name;
-      const data = await report_selectByPageAndCount(this.listData);
-      if (data.code != 200) {
+    async showTableData () {
+      this.listData.name=this.ruleForm.name;
+      const data=await report_selectByPageAndCount(this.listData);
+      if(data.code!=200) {
         return this.$message.error("鍒楄〃璋冪敤澶辫触");
       }
 
-      this.tableData = data.result;
-      this.listData.count = data.count;
+      this.tableData=data.result;
+      this.listData.count=data.count;
     },
     //鏉冮檺閰嶇疆
-    showPermsBtn() {
-      let currentPerms = this.$store.state.currentPerms;
-      let permsEntity = this.$store.state.permsEntity;
+    showPermsBtn () {
+      let currentPerms=this.$store.state.currentPerms;
+      let permsEntity=this.$store.state.permsEntity;
       permsEntity
-        .filter((item) => item.perms == currentPerms)
-        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
+        .filter((item) => item.perms==currentPerms)
+        .map((item) => (this.btnStatus[item.tag.substr(1)]=true));
     },
   },
 };
@@ -742,10 +823,11 @@
 <style lang="less" scoped>
 //@import url(); 寮曞叆鍏叡css绫�
 .authorityManagement_box {
-  height: 98%;
-  width: 98%;
+  height: calc(97.5% - 20px);
+  width: calc(99% - 20px);
   padding: 0.5%;
-
+  background: #f4f8ff;
+  margin: 10px;
   .el-input {
     width: 730px;
   }

--
Gitblit v1.9.3