Browse Source

init

undefined
wangxiaohua 3 years ago
parent
commit
646ebb5ac2
3 changed files with 67 additions and 45 deletions
  1. +7
    -5
      config.js
  2. +58
    -38
      pages/center/Piabodata/TrendAnalysis.vue
  3. +2
    -2
      utils/http.js

+ 7
- 5
config.js View File

@@ -2,11 +2,11 @@
* 小程序配置文件
*/
// 此处主机域名修改成腾讯云解决方案分配的域名
var host = 'http://39.97.167.65/autoSR/api'; // 测试站
var hosts = 'http://39.97.167.65/'; // 测试站
// var host = 'http://39.97.167.65/autoSR/api'; // 测试站
// var hosts = 'http://39.97.167.65/'; // 测试站

// var host = 'http://192.168.31.134:9999/autoSR/api'; // 佳豪
// var hosts = 'http://192.168.31.134:9999/'; // 佳豪
var host = 'http://192.168.31.134:9999/autoSR/api'; // 佳豪
var hosts = 'http://192.168.31.134:9999/'; // 佳豪

// var host = 'http://8kdmng.natappfree.cc/autoSR/api'; // 佳豪
// var hosts = 'http://8kdmng.natappfree.cc/'; // 佳豪
@@ -24,7 +24,9 @@ var config = {
//登录
login: `${hosts}auth/oauth/token`,
logout: `${hosts}auth/token/logout`,
logout: `${hosts}auth/token/logout`,
findListByUser: `${hosts}admin/dept/findListByUser`,
//获取用户信息
getUser: `${host}/user/getUser`,


+ 58
- 38
pages/center/Piabodata/TrendAnalysis.vue View File

@@ -213,6 +213,7 @@
</template>
<script>
import newcalendar from '@/components/newcalendar/newcalendar.vue';
var config = require(".../../../config");
export default {
data() {
return {
@@ -934,34 +935,65 @@
},
//获取团队列表
getuanduilist() {
this.$u.post("/cusLvStatistics/findAllDeptIdByHouseId ", {
houseId: this.pamect.houseId
}).then(data => {
this.selectlist4 = [{
value: "",
label: "全部"
}];
if (data.length == 0) {
this.Selecttuandui = false;
this.lineOptsect = {
categories: [],
series: []
};
return
} else {
this.Selecttuandui = true;
data.forEach(item => {
this.selectlist4.push({
value: item.deptId,
label: item.deptName
uni.request({
url: config.service.findListByUser + "?houseId=" +this.pamect.houseId,
method: "GET",
header: {
'content-type': 'application/json',
'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
if (data.data.data.length == 0) {
this.Selecttuandui = false;
this.lineOptsect = {
categories: [],
series: []
};
return
} else {
this.Selecttuandui = true;
data.data.data.forEach(item => {
this.selectlist4.push({
value: item.deptId,
label: item.name
})
})
})
this.Selecttuanduiobj.id = "";
this.Selecttuanduiobj.name = "全部";
this.pamect.deptId = this.Selecttuanduiobj.id;
this.TeamCompared()
this.Selecttuanduiobj.id = this.selectlist4[0].value;
this.Selecttuanduiobj.name = this.selectlist4[0].label;
this.pamect.deptId = this.Selecttuanduiobj.id;
this.TeamCompared()
}
}
})
})
// this.$u.post("/cusLvStatistics/findAllDeptIdByHouseId ", {
// houseId: this.pamect.houseId
// }).then(data => {
// this.selectlist4 = [{
// value: "",
// label: "全部"
// }];
// if (data.length == 0) {
// this.Selecttuandui = false;
// this.lineOptsect = {
// categories: [],
// series: []
// };
// return
// } else {
// this.Selecttuandui = true;
// data.forEach(item => {
// this.selectlist4.push({
// value: item.deptId,
// label: item.deptName
// })
// })
// this.Selecttuanduiobj.id = "";
// this.Selecttuanduiobj.name = "全部";
// this.pamect.deptId = this.Selecttuanduiobj.id;
// this.TeamCompared()
// }
// })
},
//团队对比
TeamCompared() {
@@ -1051,26 +1083,14 @@
// // 处理表格数据
let arr = [
['时间', '时段一', '时段二', '变化']
// {
// time:'时间',
// time1:'时段一',
// time2:'时段二',
// compare:'变化'
// },
]
that.lineOptsect.categories.map((item, index) => {
let newarr = [item, data
.lastValue.receptionStatList[index].fraction, data.firstValue.receptionStatList[index].fraction,data.contrast
.receptionStatList[index].data
]
// obj.time=item
// obj.time1=data.firstValue[index].fraction
// obj.time2=data.lastValue[index].fraction
// obj.compare=data.contrast[index].data
// arr.push(obj)
arr.push(newarr)
})
// console.log(arr)
that.tableDate = arr
}
}


+ 2
- 2
utils/http.js View File

@@ -1,9 +1,9 @@

const baseUrl = 'http://39.97.167.65/autoSR/api';// 测试站
// const baseUrl = 'http://39.97.167.65/autoSR/api';// 测试站

// const baseUrl = 'http://8kdmng.natappfree.cc/autoSR/api'; // 佳豪

// const baseUrl = 'http://192.168.31.134:9999/autoSR/api'; // 佳豪
const baseUrl = 'http://192.168.31.134:9999/autoSR/api'; // 佳豪


const install = (Vue, vm) => {


Loading…
Cancel
Save