Преглед изворни кода

替换图片请求头,导出已限制

hzj18279462576@163.com пре 1 година
родитељ
комит
2b429aedad

+ 1 - 1
config/index.js

@@ -23,9 +23,9 @@ module.exports = {
     // 代理列表, 是否开启代理通过[./dev.env.js]配置
     proxyTable: devEnv.OPEN_PROXY === false ? {} : {
       '/proxyApi': {
+        // target: 'https://mxys.chuanghai-tech.com/sqx_fast/',
         target: 'https://mxys.chuanghai-tech.com/wm-test/wm-api',
         // target: 'http://192.168.0.131:8171/sqx_fast/',
-        // target: 'https://mxys.chuanghai-tech.com/sqx_fast/',
         changeOrigin: true,
         pathRewrite: {
           '^/proxyApi': ''

+ 1 - 1
src/main.js

@@ -30,7 +30,7 @@ Vue.use(Viewer, {
 Vue.prototype.Tupiantou ='https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload'//线上
 // Vue.prototype.Tupiantou ='https://www.daweilinli.com/sqx_fast/alioss/upload'//线下
 Vue.prototype.Tupian =function(img){
-    return 'https://moxuanyunshang.oss-cn-beijing.aliyuncs.com'+img
+    return 'https://mxys.chuanghai-tech.com/wmfile'+img
   }//全局图片请求头
 
 

+ 2 - 2
src/utils/httpRequest.js

@@ -61,10 +61,10 @@ http.interceptors.response.use(response => {
 http.adornUrl = (actionName) => {
   // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
   // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
-	// return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
   // return 'http://r8p8gz.natappfree.cc/sqx_fast/' + actionName
   // return 'https://www.daweilinli.com/sqx_fast/' + actionName
 	// return 'http://192.168.0.131:8171/sqx_fast/' + actionName
+	// return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
 	return 'https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/' + actionName
 }
 
@@ -76,8 +76,8 @@ http.adornUrl2 = (actionName) => {
 http.adornWss = (actionName) => {
   // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
   // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
-	// return 'wss://mxys.chuanghai-tech.com/wss/' + actionName
 	// return 'wss://www.daweilinli.com/wss/' + actionName
+	// return 'wss://mxys.chuanghai-tech.com/wss/' + actionName
 	return 'wss://mxys.chuanghai-tech.com/wss-test/' + actionName
 }
 /**

+ 1 - 1
src/views/banner/bannerList.vue

@@ -397,7 +397,7 @@
 				<div
 					style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
 					<el-upload class="avatar-uploader" v-model="imageUrl"
-						action="https://www.daweilinli.com/sqx_fast/alioss/upload" :show-file-list="false"
+						action="https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload" :show-file-list="false"
 						:on-success="handleAvatarSuccess">
 						<img v-if="imageUrl" :src="imageUrl" class="avatar"
 							style="border-radius: 6px;width: 148px;height: 148px;" />

+ 5 - 1
src/views/downLoad/downList.vue

@@ -5,7 +5,7 @@
       <el-select
         v-model="state"
         style="width:150px;margin-left: 10px;"
-        @change="select()"
+        @change="select"
         :clearable="true"
       >
         <el-option
@@ -211,6 +211,9 @@ export default {
     },
     // 查询
     select() {
+      if(this.state==null){
+        this.state=''
+      }
       this.page = 1;
       this.limit = 10;
       this.dataSelect();
@@ -229,6 +232,7 @@ export default {
     },
     // 获取派单数据列表
     dataSelect() {
+      console.log(this.state);
       // if (this.endTime == '') {
       // 	  this.endTime = this.info2.stockDate2
       //   }

+ 79 - 58
src/views/mission/mission.vue

@@ -591,7 +591,7 @@
         >
       </div>
       <div class="con" v-show="exportFlag == 2">
-        <img src="../../assets/img/loading.png" alt="" />
+        <img class="gundong" src="../../assets/img/loading.png" alt="" />
         <span
           style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
           >导出中...</span
@@ -610,6 +610,13 @@
           >(注:请到个人导出记录查看并下载)</span
         >
       </div>
+      <div class="con" v-show="exportFlag == 4">
+        <img class="gundong" src="../../assets/img/loading.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >版本迭代中,导出暂时无法使用</span
+        >
+      </div>
       <div class="btn">
         <el-button type="primary" @click="exportAffirm">确定</el-button>
       </div>
@@ -1912,64 +1919,65 @@ export default {
     //   });
     // },
     exportList() {
-      this.exportVisible = true;
       console.log(this.tableData2.totalCount,'导出条数');
-
-      if (this.tableData2.totalCount >= 50000) {
-        this.exportTitle = "导出错误";
-        this.exportFlag = 1;
-      } else {
-        this.exportTitle = "导出";
-        this.exportFlag = 2;
-        this.exportVisible = true;
-        var userId = this.$cookie.get('userId')
-        this.$http({
-          url: this.$http.adornUrl("admin/export/excelOrder"),
-          method: "get",
-          // responseType: "blob",
-          params: this.$http.adornParams({
-            // 'page': page,
-            // 'size': this.size,
-            userId:userId,
-            phone: this.phone,
-            userName: this.userName,
-            orderNumber: this.orderNumber,
-            status: this.status,
-            shopName: this.shopName,
-            orderSequence: this.orderSequence,
-            orderType: this.orderType,
-            reservationFlag: this.reservationFlag,
-            indentStatus: this.indentStatus,
-            riderPhone: this.riderPhone,
-            startTime: this.startTime,
-            endTime: this.endTime,
-            payStartTime: this.payStartTime,
-            payEndTime: this.payEndTime
-          })
-        }).then(({ data }) => {
-          console.log(data, "导出");
-          if(data.code==0){
-            this.exportTitle = "导出成功";
-            this.exportFlag = 3;
-          }
-          // let blob = new Blob([data], {
-          //   type:
-          //     "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
-          // });
-          // if (window.navigator.msSaveOrOpenBlob) {
-          //   navigator.msSaveBlob(blob);
-          // } else {
-          //   let url = window.URL.createObjectURL(blob);
-          //   let elink = document.createElement("a");
-          //   elink.download = "订单列表.xlsx";
-          //   elink.style.display = "none";
-          //   elink.href = url;
-          //   document.body.appendChild(elink);
-          //   elink.click();
-          //   document.body.removeChild(elink);
-          // }
-        });
-      }
+      this.exportTitle = "导出";
+      this.exportFlag = 4;
+      this.exportVisible = true;
+      // if (this.tableData2.totalCount >= 50000) {
+      //   this.exportTitle = "导出错误";
+      //   this.exportFlag = 1;
+      // } else {
+      //   this.exportTitle = "导出";
+      //   this.exportFlag = 2;
+      //   this.exportVisible = true;
+      //   var userId = this.$cookie.get('userId')
+      //   this.$http({
+      //     url: this.$http.adornUrl("admin/export/excelOrder"),
+      //     method: "get",
+      //     // responseType: "blob",
+      //     params: this.$http.adornParams({
+      //       // 'page': page,
+      //       // 'size': this.size,
+      //       userId:userId,
+      //       phone: this.phone,
+      //       userName: this.userName,
+      //       orderNumber: this.orderNumber,
+      //       status: this.status,
+      //       shopName: this.shopName,
+      //       orderSequence: this.orderSequence,
+      //       orderType: this.orderType,
+      //       reservationFlag: this.reservationFlag,
+      //       indentStatus: this.indentStatus,
+      //       riderPhone: this.riderPhone,
+      //       startTime: this.startTime,
+      //       endTime: this.endTime,
+      //       payStartTime: this.payStartTime,
+      //       payEndTime: this.payEndTime
+      //     })
+      //   }).then(({ data }) => {
+      //     console.log(data, "导出");
+      //     if(data.code==0){
+      //       this.exportTitle = "导出成功";
+      //       this.exportFlag = 3;
+      //     }
+      //     // let blob = new Blob([data], {
+      //     //   type:
+      //     //     "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+      //     // });
+      //     // if (window.navigator.msSaveOrOpenBlob) {
+      //     //   navigator.msSaveBlob(blob);
+      //     // } else {
+      //     //   let url = window.URL.createObjectURL(blob);
+      //     //   let elink = document.createElement("a");
+      //     //   elink.download = "订单列表.xlsx";
+      //     //   elink.style.display = "none";
+      //     //   elink.href = url;
+      //     //   document.body.appendChild(elink);
+      //     //   elink.click();
+      //     //   document.body.removeChild(elink);
+      //     // }
+      //   });
+      // }
     },
     exportAffirm() {
       this.exportVisible = false;
@@ -1995,6 +2003,19 @@ export default {
   align-items: center;
   margin-bottom: 20px;
 }
+.el-tabs  >>> .export .con .gundong {
+  animation: gundong 3s linear infinite ;
+}
+@keyframes gundong{
+        /* from表示动画的开始位置,也可以使用0%来表示。 */
+        from{
+          transform: rotate(0deg)
+        }
+        /* to表示动画的结束位置,也可以使用100%来表示。 */
+        to{
+          transform: rotate(360deg);
+        }
+    }
 .el-tabs >>> .export img {
   width: 70px;
 }

+ 170 - 46
src/views/shopsList/shopsOrder.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="downloadList">
     <div style="font-size:18px;margin-bottom: 15px;">
       <a href="#" @click="prev" style="text-decoration:none;font-size: 14px;">
         <icon-svg name="jiantou" style="width: 1.2em;height: 1.2em;position: relative;top: 0.3em;"></icon-svg>
@@ -72,7 +72,7 @@
       <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="phoneSelect">查询
       </el-button>
       <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans2">重置</el-button>
-      <el-button style='margin-left:15px;' size="mini" type="warning" icon="document" @click="exportBtn">
+      <el-button style='margin-left:15px;' size="mini" type="warning" icon="document" @click="exportList">
         导出Excel
       </el-button>
     </div>
@@ -331,6 +331,56 @@
         </el-pagination>
       </div>
     </el-dialog>
+
+    <!-- 导出限制 -->
+    <el-dialog
+      custom-class="export"
+      :visible.sync="exportVisible"
+      center
+      :title="exportTitle"
+      :close-on-click-modal="false"
+    >
+      <div class="con" v-show="exportFlag == 1">
+        <img src="../../assets/img/error.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >当前导出条数超过50000条,暂不支持导出</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:数据中的图片、附件只能以链接的形式导出)</span
+        >
+      </div>
+      <div class="con" v-show="exportFlag == 2">
+        <img class="gundong" src="../../assets/img/loading.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >导出中...</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:请到个人导出记录查看并下载)</span
+        >
+      </div>
+      <div class="con" v-show="exportFlag == 3">
+        <img src="../../assets/img/success.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >导出成功</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:请到个人导出记录查看并下载)</span
+        >
+      </div>
+      <div class="con" v-show="exportFlag == 4">
+        <img class="gundong" src="../../assets/img/loading.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >版本迭代中,导出暂时无法使用</span
+        >
+      </div>
+      <div class="btn">
+        <el-button type="primary" @click="exportAffirm">确定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -349,6 +399,8 @@
         token: '',
         taskNum: '',
         taskMoney: '',
+        payStartTime:'',
+        payEndTime:'',
         statesnum: [{
             label: '全部',
             value: 0
@@ -524,6 +576,11 @@
         limit1: 10,
         page1: 1,
         riderPhone:'',
+
+        // 导出限制
+        exportTitle: "导出错误",
+        exportVisible: false,
+        exportFlag: 1 //1 超出限制  2导出中
       }
     },
     methods: {
@@ -934,48 +991,85 @@
         })
       },
       // 导出
-			exportBtn() {
-				this.$http({
-					url: this.$http.adornUrl('admin/order/excelOrder'),
-					method: 'get',
-					responseType: 'blob',
-					params: this.$http.adornParams({
-						// 'page': page,
-						// 'size': this.size,
-            'phone': this.phone,
-            'userName': this.userName,
-            'orderNumber': this.orderNumber,
-            'orderSequence':this.orderSequence,
-            'status': this.status,
-            'shopId': this.shopId,
-            'orderType': this.orderType,
-            'riderPhone':this.riderPhone,
-            'reservationFlag':this.reservationFlag,
-            'indentStatus':this.indentStatus,
-            'payStartTime': this.payStartTime,
-						'payEndTime': this.payEndTime,
-					})
-				}).then(({
-					data
-				}) => {
-          console.log(data,'导出')
-					let blob = new Blob([data], {
-						type: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
-					})
-					if (window.navigator.msSaveOrOpenBlob) {
-						navigator.msSaveBlob(blob)
-					} else {
-						let url = window.URL.createObjectURL(blob)
-						let elink = document.createElement('a')
-						elink.download = '订单列表.xlsx'
-						elink.style.display = 'none'
-						elink.href = url
-						document.body.appendChild(elink)
-						elink.click()
-						document.body.removeChild(elink)
-					}
-				})
-			},
+			// exportBtn() {
+			// 	this.$http({
+			// 		url: this.$http.adornUrl('admin/order/excelOrder'),
+			// 		method: 'get',
+			// 		responseType: 'blob',
+			// 		params: this.$http.adornParams({
+			// 			// 'page': page,
+			// 			// 'size': this.size,
+      //       'phone': this.phone,
+      //       'userName': this.userName,
+      //       'orderNumber': this.orderNumber,
+      //       'orderSequence':this.orderSequence,
+      //       'status': this.status,
+      //       'shopId': this.shopId,
+      //       'orderType': this.orderType,
+      //       'riderPhone':this.riderPhone,
+      //       'reservationFlag':this.reservationFlag,
+      //       'indentStatus':this.indentStatus,
+      //       'payStartTime': this.payStartTime,
+			// 			'payEndTime': this.payEndTime,
+			// 		})
+			// 	}).then(({
+			// 		data
+			// 	}) => {
+      //     console.log(data,'导出')
+			// 		let blob = new Blob([data], {
+			// 			type: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+			// 		})
+			// 		if (window.navigator.msSaveOrOpenBlob) {
+			// 			navigator.msSaveBlob(blob)
+			// 		} else {
+			// 			let url = window.URL.createObjectURL(blob)
+			// 			let elink = document.createElement('a')
+			// 			elink.download = '订单列表.xlsx'
+			// 			elink.style.display = 'none'
+			// 			elink.href = url
+			// 			document.body.appendChild(elink)
+			// 			elink.click()
+			// 			document.body.removeChild(elink)
+			// 		}
+			// 	})
+			// },
+      exportList() {
+        console.log(this.tableData2.totalCount,'导出条数');
+        this.exportTitle = "导出";
+        this.exportFlag = 4;
+        this.exportVisible = true;
+
+        // if (this.duanxinData.totalCount >= 50000) {
+        // this.exportTitle = "导出错误";
+        // this.exportFlag = 1;
+        // } else {
+        // this.exportTitle = "导出";
+        // this.exportFlag = 2;
+        // this.exportVisible = true;
+        // var userId = this.$cookie.get('userId')
+        // // rechargeOrder, String acount,String userId
+        // this.$http({
+        //   url: this.$http.adornUrl("admin/export/excelRecharge"),
+        //   method: "get",
+        //   params: this.$http.adornParams({
+        //     userId:userId,
+        //     rechargeOrder: this.orderNo,
+        //     acount: this.phone,
+        //   })
+        // }).then(({ data }) => {
+        //   console.log(data, "导出");
+        //   if(data.code==0){
+        //     this.exportTitle = "导出成功";
+        //     this.exportFlag = 3;
+        //   }
+        // });
+        // }
+      },
+      exportAffirm() {
+        this.exportVisible = false;
+      },
+
+
       // 商铺列表
       classifySelect() {
         this.tableDataLoading = true
@@ -1190,6 +1284,36 @@
   }
 </script>
 
-<style>
-
+<style scoped>
+/* 导出限制 */
+.downloadList  >>> .export {
+  width: 500px;
+}
+.downloadList  >>> .export .con {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 20px;
+}
+.downloadList >>> .export .con .gundong {
+  animation: gundong 3s linear infinite ;
+}
+@keyframes gundong{
+        /* from表示动画的开始位置,也可以使用0%来表示。 */
+        from{
+          transform: rotate(0deg)
+        }
+        /* to表示动画的结束位置,也可以使用100%来表示。 */
+        to{
+          transform: rotate(360deg);
+        }
+    }
+.downloadList >>> .export img {
+  width: 70px;
+}
+.downloadList >>> .export .btn {
+  display: flex;
+  flex-direction: row-reverse;
+}
 </style>