Tartarus 3 gadi atpakaļ
vecāks
revīzija
9edaf3cd70

+ 27 - 0
src/utils/request.js

xqd xqd xqd
@@ -7,6 +7,31 @@ import store from '@/store'
 import {
   getToken
 } from '@/utils/auth'
+import {Loading} from 'element-ui'
+const loading={
+	loadingInstance:null,
+	// 打开加载
+	open(){
+		if(this.loadingInstance===null){
+			this.loadingInstance=Loading.service({
+				text:'加载中...',  //加载图标下的文字
+				spinner:'el-icon-loading',  //加载图标
+				// background:'rgba(0,0,0,0.8)', //背景色
+				customClass:'loading'  //自定义样式的类名
+			})
+		}
+	},
+	// 关闭加载
+	close(){
+		if(this.loadingInstance!==null){
+			this.loadingInstance.close()
+		}
+		this.loadingInstance=null
+	}
+}
+
+
+
 
 // create an axios instance
 const service = axios.create({
@@ -20,6 +45,7 @@ const service = axios.create({
 })
 service.interceptors.request.use(
   config => {
+		loading.open()
     const token = getToken()
     if (token) {
       config.headers.Authorization = token
@@ -75,6 +101,7 @@ service.interceptors.response.use(
 	 * You can also judge the status by HTTP Status Code
 	 */
   response => {
+		loading.close()
     const res = response.data
     // if the custom code is not 20000, it is judged as an error.
     // if (res.code !== 200) {

+ 4 - 1
src/views/contracts/detail.vue

xqd xqd
@@ -173,7 +173,7 @@
           align="center"
           prop="created_at"
           label="操作"
-          width="250"
+          width="300"
         >
           <template slot-scope="scope">
             <el-tag
@@ -909,6 +909,9 @@
 .el-button--danger {
   margin-left: 10px;
 }
+.el-button--primary{
+	margin-left: 10px;
+}
 
 ::v-deep .el-textarea__inner {
   height: 150px !important;

+ 34 - 19
src/views/databackup/index.vue

xqd xqd xqd
@@ -62,6 +62,7 @@
       element-loading-text="Loading"
       border
       fit
+	  ref="multipleTable"
       highlight-current-row
       @select="handleSelectionChange"
       @select-all="handleAll"
@@ -419,6 +420,9 @@ export default {
             type: "success",
             message: "删除成功!",
           });
+		  this.$refs.multipleTable.clearSelection();
+		  this.multipleSelection="";
+			this.getAllList();
         } else {
           this.$message({
             type: "danger",
@@ -432,25 +436,36 @@ export default {
         this.multipleSelection,
         ({ fileName }) => fileName
       );
-      this.$request({
-        url: "/api/Database/delete",
-        method: "post",
-        data: {
-          fileNameList: fileNameList,
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-        } else {
-          this.$message({
-            type: "danger",
-            message: "删除失败!",
-          });
-        }
-      });
+	  if(fileNameList==""){
+		  this.$message({
+			  type:'error',
+			  message:'请选择数据!'
+		  })
+	  }else{
+		  this.$request({
+		    url: "/api/Database/delete",
+		    method: "post",
+		    data: {
+		      fileNameList: fileNameList,
+		    },
+		  }).then((res) => {
+		    if (res.code == 200) {
+		      this.$message({
+		        type: "success",
+		        message: "删除成功!",
+		      });
+			  this.$refs.multipleTable.clearSelection();
+			  this.multipleSelection="";
+		  	  this.getAllList();
+		    } else {
+		      this.$message({
+		        type: "danger",
+		        message: "删除失败!",
+		      });
+		    }
+		  });
+	  }
+      
     },
 
     getRowKey(row) {

+ 4 - 2
src/views/sucuirtyaudit/annexList.vue

xqd xqd
@@ -2,12 +2,13 @@
   <div class="app-container">
     <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
       <div class="grid-content bg-purple">
-        <div class="grid-content bg-purple" style="margin-left: 30px">
+        <div class="grid-content bg-purple" >
           <el-input
             placeholder="请输入合同名称"
             v-model="formData.content"
             @change="Search"
-            style="width: 80%"
+			clearable
+            style="width: 100%"
           >
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
@@ -18,6 +19,7 @@
           placeholder="请输入供应商名称"
           v-model="formData.operateUser"
           @change="SearchOperateUser"
+		  clearable
           style="width: 100%"
         >
           <i slot="prefix" class="el-input__icon el-icon-search"></i>

+ 1 - 0
src/views/sucuirtyaudit/index.vue

xqd
@@ -18,6 +18,7 @@
         <el-input
           placeholder="请输入操作人员名称"
           v-model="formData.operateUser"
+					clearable
           @change="SearchOperateUser"
           style="width: 100%"
         >