Pārlūkot izejas kodu

提交

newStyle
douzhuo pirms 2 gadiem
vecāks
revīzija
0b9c8cd50d
2 mainītis faili ar 16 papildinājumiem un 12 dzēšanām
  1. +14
    -10
      src/views/Statistics/ConsultantBrand.vue
  2. +2
    -2
      vue.config.js

+ 14
- 10
src/views/Statistics/ConsultantBrand.vue Parādīt failu

@@ -94,6 +94,7 @@
<el-table
:header-cell-style="{ background: '#F5F7FA', color: '#333333' }"
:data="tableData"
@sort-change="customTabLast"
stripe
style="width: 100%"
>
@@ -961,22 +962,21 @@ export default {
},
created() {
this.sta_men_downLoad = this.permissions["sta_men_downLoad"];
if (this.$route.query.types) {
let arr = this.$route.query.types.split(",");
this[arr[0]] = arr[1];
console.log(arr);
}
if (this.$route.query.date) {
let time = this.$route.query.date.split(",");
this.statDateStart = time[0]
this.statDateEnd = time[1]
this.statDateStart = time[0];
this.statDateEnd = time[1];
this.dateType = 7;
this.customtime = time
this.customtime = time;
console.log("时间");
}
},
mounted() {
this.role = localStorage.getItem("orgType");
@@ -990,6 +990,13 @@ export default {
}
},
methods: {
// 排序触发
customTabLast(e) {
console.log(e, "触发了");
let index = this.tableData.findIndex((item) => item.accountName == "");
let obj = this.tableData.splice(index, 1);
this.tableData.push(obj);
},
// 排名颜色
topThreeColor(index) {
let str = "";
@@ -1202,7 +1209,7 @@ export default {
});
}
if (type == 1) {
arr = this.dealData(arr);
arr = this.dealData(arr);
}

if (type == 2) {
@@ -1394,14 +1401,12 @@ export default {
this.deailDate();
},
dealData(arr) {
console.log(arr, "arr");
let num = Math.max.apply(
Math,
arr.map(function (o) {
return o.zxl;
})
); //结果:3
console.log(num, "nums");
arr.map((item) => {
if (num != 0) {
item.zxl1 = Math.floor((item.zxl / num) * 100);
@@ -1409,7 +1414,6 @@ export default {
item.zxl1 = 0;
}
});
console.log(arr, "arr2");
return arr;
},
},


+ 2
- 2
vue.config.js Parādīt failu

@@ -8,9 +8,9 @@
// const url = 'http://62.234.122.43:9999' //正式
// const url = 'http://81.70.55.170:9999' // 新测试服务器IP
// const url = 'http://192.168.31.86:9999' // 胜浩
const url = 'https://zanyong.hfju.com' // 正式域名
// const url = 'https://zanyong.hfju.com' // 正式域名
// const url = 'http://127.0.0.1:9999' // 本地
// const url = 'http://81.70.55.170:9999' // 新测试
const url = 'http://81.70.55.170:9999' // 新测试
// const url = 'http://82.156.35.22:9999' // 新正式ip
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css']


Notiek ielāde…
Atcelt
Saglabāt