From cf4de0a3f218b79d49b05450ca0fc4527c2fa78e Mon Sep 17 00:00:00 2001
From: 王旭 <1377869194@qq.com>
Date: 星期三, 22 二月 2023 17:15:55 +0800
Subject: [PATCH] 修改数据管理弹框按钮样式

---
 src/views/userManage/templateManage.vue |  214 ++++++++++++++++++++++++++--------------------------
 1 files changed, 107 insertions(+), 107 deletions(-)

diff --git a/src/views/userManage/templateManage.vue b/src/views/userManage/templateManage.vue
index f97e6be..d5e1a9e 100644
--- a/src/views/userManage/templateManage.vue
+++ b/src/views/userManage/templateManage.vue
@@ -379,53 +379,56 @@
 </template>
 
 <script>
-
 import MyBread from "../../components/MyBread.vue";
 import {
   report_selectByPageAndCount,
   report_upload,
   report_insert,
   report_deletes,
-  report_update
-} from '../../api/api.js'
-import { getToken } from '@/utils/auth';
+  report_update,
+} from "../../api/api.js";
+import { getToken } from "@/utils/auth";
 export default {
   name: "templateManage",
-  components: { MyBread, },
+  components: { MyBread },
   data() {
     return {
-      options: [{
-        value: 'countSizes',
-        label: '鏁版嵁閲忕粺璁�'
-      }, {
-        value: 'countServices',
-        label: '鏈嶅姟璋冪敤閲忕粺璁�'
-      }, {
-        value: 'countOperates ',
-        label: '鐢ㄦ埛娴侀噺缁熻'
-      }],
+      options: [
+        {
+          value: "countSizes",
+          label: "鏁版嵁閲忕粺璁�",
+        },
+        {
+          value: "countServices",
+          label: "鏈嶅姟璋冪敤閲忕粺璁�",
+        },
+        {
+          value: "countOperates ",
+          label: "鐢ㄦ埛娴侀噺缁熻",
+        },
+      ],
       itemdetail: {},
       showinfoBox: false,
-      behavior: '鏂板',
-      selectFileType: '*.*',
+      behavior: "鏂板",
+      selectFileType: "*.*",
       editForm: {
-        fname: '',
-        guid: '',
-        name: '',
-        code: '',
-        type: '',
-        bak: '',
+        fname: "",
+        guid: "",
+        name: "",
+        code: "",
+        type: "",
+        bak: "",
       },
       multipleSelection: [],
       dialogVisible: false,
       tableData: [],
       ruleForm: {
-        name: ''
+        name: "",
       },
       listData: {
         pageIndex: 1,
         pageSize: 10,
-        name: '',
+        name: "",
         count: 0,
       },
       btnStatus: {
@@ -436,28 +439,27 @@
         insert: false,
         update: false,
       },
-       tableHeight: 0,
+      tableHeight: 0,
       timer: 0,
       styleVar: {
-        "height": "calc(100% - 109px)",
+        height: "calc(100% - 109px)",
       },
-    }
+    };
   },
   created() {
     this.showPermsBtn();
     this.showTableData();
-
   },
-   beforeDestroy() {
+  beforeDestroy() {
     this.timer && clearTimeout(this.timer);
     window.removeEventListener("resize", this.onResize);
   },
-    mounted() {
+  mounted() {
     window.addEventListener("resize", this.onResize);
-    this.calHeight()
+    this.calHeight();
   },
   methods: {
-     onResize() {
+    onResize() {
       this.timer && clearTimeout(this.timer);
       this.timer = setTimeout(() => {
         this.calHeight();
@@ -478,16 +480,15 @@
       var blackTheme;
       if (this.$store.state.themeflag == true) {
         blackTheme = {
-          customClass: "Black_theme"
-        }
+          customClass: "Black_theme",
+        };
       }
 
-      this.$confirm('纭鍏抽棴锛�', blackTheme)
+      this.$confirm("纭鍏抽棴锛�", blackTheme)
         .then((_) => {
           this.closeInsertData();
-
         })
-        .catch((_) => { });
+        .catch((_) => {});
     },
     codeData(row, column) {
       let data = row[column.property];
@@ -495,44 +496,44 @@
         return data;
       }
       var val;
-      if (row.code.indexOf('countSizes') != -1) {
-        val = "鏁版嵁閲忕粺璁�"
-      } else if (row.code.indexOf('countServices') != -1) {
-        val = "鏈嶅姟璋冪敤閲忕粺璁�"
-      } else if (row.code.indexOf('countOperates') != -1) {
-        val = "鐢ㄦ埛娴侀噺缁熻"
+      if (row.code.indexOf("countSizes") != -1) {
+        val = "鏁版嵁閲忕粺璁�";
+      } else if (row.code.indexOf("countServices") != -1) {
+        val = "鏈嶅姟璋冪敤閲忕粺璁�";
+      } else if (row.code.indexOf("countOperates") != -1) {
+        val = "鐢ㄦ埛娴侀噺缁熻";
       }
       return val;
     },
     //鏌ョ湅
     showDetail(index, row) {
-
       this.itemdetail = row;
 
       if (parseInt(row.type) == 1) {
-        this.itemdetail.fileType = "World妯℃澘"
+        this.itemdetail.fileType = "World妯℃澘";
       } else if (parseInt(row.type) == 2) {
-        this.itemdetail.fileType = "Excel妯℃澘"
+        this.itemdetail.fileType = "Excel妯℃澘";
       }
-      if (row.code.indexOf('countSizes') != -1) {
-        this.itemdetail.code = "鏁版嵁閲忕粺璁�"
-      } else if (row.code.indexOf('countServices') != -1) {
-        this.itemdetail.code = "鏈嶅姟璋冪敤閲忕粺璁�"
-      } else if (row.code.indexOf('countOperates') != -1) {
-        this.itemdetail.code = "鐢ㄦ埛娴侀噺缁熻"
+      if (row.code.indexOf("countSizes") != -1) {
+        this.itemdetail.code = "鏁版嵁閲忕粺璁�";
+      } else if (row.code.indexOf("countServices") != -1) {
+        this.itemdetail.code = "鏈嶅姟璋冪敤閲忕粺璁�";
+      } else if (row.code.indexOf("countOperates") != -1) {
+        this.itemdetail.code = "鐢ㄦ埛娴侀噺缁熻";
       }
 
       this.itemdetail.uTime = this.format(row.updateTime);
-      this.showinfoBox = true
+      this.showinfoBox = true;
     },
     //鍏抽棴鏌ョ湅
     closeDetial() {
-      this.showinfoBox = false
+      this.showinfoBox = false;
     },
     //涓嬭浇
     handleDownload(index, row) {
       var token = getToken();
-      var url = BASE_URL + "/report/download?token=" + token + "&guid=" + row.guid;
+      var url =
+        BASE_URL + "/report/download?token=" + token + "&guid=" + row.guid;
       $("#downFrame").attr("src", url).click();
     },
     //淇敼鎻愪氦
@@ -542,64 +543,66 @@
         return this.$message.error("淇敼澶辫触");
       }
       this.$message({
-        message: '淇敼鎴愬姛',
-        type: 'success'
+        message: "淇敼鎴愬姛",
+        type: "success",
       });
       this.closeInsertData();
     },
     //鏂囦欢绫诲瀷鍒囨崲
     selFileTypeChange(val) {
       if (parseInt(val) == 1) {
-        this.selectFileType = ".docx"
+        this.selectFileType = ".docx";
       } else if (parseInt(val) == 2) {
-        this.selectFileType = ".xlsx"
+        this.selectFileType = ".xlsx";
       }
     },
     //淇敼
     handleEdit(index, row) {
-      this.behavior = "淇敼"
+      this.behavior = "淇敼";
       this.editForm = row;
       if (parseInt(row.type) == 1) {
-        this.selectFileType = ".docx"
+        this.selectFileType = ".docx";
       } else if (parseInt(row.type) == 2) {
-        this.selectFileType = ".xlsx"
+        this.selectFileType = ".xlsx";
       }
       this.dialogVisible = true;
     },
     //鍒犻櫎
     async delTableData() {
       if (this.multipleSelection.length == 0) {
-        return this.$message('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁');
+        return this.$message("璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁");
       }
       var std = [];
       for (var i in this.multipleSelection) {
-        std.push(this.multipleSelection[i].id)
+        std.push(this.multipleSelection[i].id);
       }
-      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユā鍧�, 鏄惁缁х画?', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(async () => {
-        const data = await report_deletes({ ids: std.toString() })
-        if (data.code == 200) {
-          this.InsertFormdialog = false;
+      this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユā鍧�, 鏄惁缁х画?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(async () => {
+          const data = await report_deletes({ ids: std.toString() });
+          if (data.code == 200) {
+            this.InsertFormdialog = false;
+            this.$message({
+              message: "鍒犻櫎鎴愬姛锛�",
+              type: "success",
+            });
+            this.setRefreshTable();
+          } else {
+            this.$message({
+              message: "鍒犻櫎澶辫触锛�",
+              type: "warning",
+            });
+          }
+        })
+        .catch(() => {
           this.$message({
-            message: '鍒犻櫎鎴愬姛锛�',
-            type: 'success',
+            type: "info",
+            message: "宸插彇娑堝垹闄�",
           });
-          this.setRefreshTable();
-        } else {
-          this.$message({
-            message: '鍒犻櫎澶辫触锛�',
-            type: 'warning',
-          });
-        }
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '宸插彇娑堝垹闄�'
         });
-      });
       // const data = await report_deletes({ ids: std.toString() })
       // if (data.code != 200) {
       //   return this.$message.error("鍒犻櫎澶辫触");
@@ -610,7 +613,6 @@
       // });
       // this.setRefreshTable();
     },
-
 
     //閲嶇疆鏌ヨ
     restRefreshTable() {
@@ -630,8 +632,8 @@
         return this.$message.error("鏂板澶辫触");
       }
       this.$message({
-        message: '鏂板鎴愬姛',
-        type: 'success'
+        message: "鏂板鎴愬姛",
+        type: "success",
       });
       this.closeInsertData();
     },
@@ -639,21 +641,21 @@
     closeInsertData() {
       this.dialogVisible = false;
       this.editForm = {
-        fname: '',
-        guid: '',
-        name: '',
-        code: '',
-        type: '',
-        bak: '',
-      }
+        fname: "",
+        guid: "",
+        name: "",
+        code: "",
+        type: "",
+        bak: "",
+      };
       this.setRefreshTable();
       document.getElementById("editFile").value = "";
     },
     //鏂囦欢涓婁紶
     async geteditFile(res) {
       if (res == 0) {
-        if (this.editForm.type == '') {
-          return this.$message('璇烽�夋嫨涓婁紶鏂囦欢绫诲瀷');
+        if (this.editForm.type == "") {
+          return this.$message("璇烽�夋嫨涓婁紶鏂囦欢绫诲瀷");
         }
 
         $("#editFile").click();
@@ -670,7 +672,6 @@
         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.$message({
             message: "涓婁紶鎴愬姛锛�",
@@ -683,7 +684,6 @@
           });
         }
       }
-
     },
     //鏍煎紡鍖栧垪琛�
     formatData(row, column) {
@@ -703,11 +703,11 @@
       var h = time.getHours();
       var mm = time.getMinutes();
       var s = time.getSeconds();
-      return y + '-' + this.add0(m) + '-' + this.add0(d);
+      return y + "-" + this.add0(m) + "-" + this.add0(d);
     },
     //鏍煎紡鍖栨椂闂�
     add0(m) {
-      return m < 10 ? '0' + m : m;
+      return m < 10 ? "0" + m : m;
     },
     //Table閫夋嫨浜嬩欢
     handleSelectionChange(val) {
@@ -715,8 +715,8 @@
     },
     //鏂板寮圭獥
     setTableInsert() {
-      this.behavior = "鏂板"
-      this.dialogVisible = true
+      this.behavior = "鏂板";
+      this.dialogVisible = true;
     },
     //鍒嗛〉鍒囨崲
     handleSizeChange(val) {
@@ -737,7 +737,7 @@
         return this.$message.error("鍒楄〃璋冪敤澶辫触");
       }
       this.tableData = data.result;
-      this.listData.count = data.count
+      this.listData.count = data.count;
     },
     //鏉冮檺閰嶇疆
     showPermsBtn() {
@@ -762,7 +762,7 @@
   }
 
   .searchComp {
-     padding: 8px;
+    padding: 8px;
     margin-top: 20px;
 
     border-radius: 5px;

--
Gitblit v1.9.3