|
@@ -107,6 +107,7 @@ import VertivalBarLineChart from "../../components/chart/combination/health-bar-
|
|
|
import SvgIcon from "../../components/coms/icon/svg-icon.vue";
|
|
|
import Panel from "../../components/coms/panel/panel.vue";
|
|
|
import HealthReport from "../../components/other/healthReport/index.vue";
|
|
|
+import api from "@api/wisdomOverhaul/health/index.js";
|
|
|
|
|
|
export default {
|
|
|
components: { SvgIcon, Panel, VertivalBarLineChart, HealthReport },
|
|
@@ -223,58 +224,86 @@ export default {
|
|
|
},
|
|
|
// 健康报告推荐
|
|
|
requestRecommen(url) {
|
|
|
- let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "POST",
|
|
|
- subUrl: url,
|
|
|
- success(res) {
|
|
|
- if (res.code == 200) that.recommenList = res.data;
|
|
|
- },
|
|
|
- });
|
|
|
+ api.requestRecommen({
|
|
|
+ url:url
|
|
|
+ }).then(res =>{
|
|
|
+ if (res.code == 200) this.recommenList = res.data;
|
|
|
+ })
|
|
|
+ // let that = this;
|
|
|
+ // that.API.requestData({
|
|
|
+ // method: "POST",
|
|
|
+ // subUrl: url,
|
|
|
+ // success(res) {
|
|
|
+ // if (res.code == 200) that.recommenList = res.data;
|
|
|
+ // },
|
|
|
+ // });
|
|
|
},
|
|
|
// 操作推荐内容(提交/取消)
|
|
|
requestOption(url, rid) {
|
|
|
- let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "POST",
|
|
|
- subUrl: url,
|
|
|
- data: { rid: rid },
|
|
|
- success(res) {
|
|
|
- if (res.code == 200) that.onClickRecommon(that.recommenIndex);
|
|
|
- },
|
|
|
- });
|
|
|
+ let data ={
|
|
|
+ rid: rid
|
|
|
+ }
|
|
|
+ api.requestRecommen(url,data).then(res =>{
|
|
|
+ if (res.code == 200) this.onClickRecommon(that.recommenIndex);
|
|
|
+ })
|
|
|
+ // let that = this;
|
|
|
+ // that.API.requestData({
|
|
|
+ // method: "POST",
|
|
|
+ // subUrl: url,
|
|
|
+ // data: { rid: rid },
|
|
|
+ // success(res) {
|
|
|
+ // if (res.code == 200) that.onClickRecommon(that.recommenIndex);
|
|
|
+ // },
|
|
|
+ // });
|
|
|
},
|
|
|
// 操作推荐内容全部(提交/取消)
|
|
|
requestOptionAll(url) {
|
|
|
- let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "POST",
|
|
|
- subUrl: url,
|
|
|
- data: { typeid: that.recommenIndex },
|
|
|
- success(res) {
|
|
|
- if (res.code == 200) that.onClickRecommon(that.recommenIndex);
|
|
|
- },
|
|
|
- });
|
|
|
+ let data = { typeid: this.recommenIndex }
|
|
|
+ api.requestRecommen(url,data).then(res =>{
|
|
|
+ if (res.code == 200) this.onClickRecommon(that.recommenIndex);
|
|
|
+ })
|
|
|
+ // let that = this;
|
|
|
+ // that.API.requestData({
|
|
|
+ // method: "POST",
|
|
|
+ // subUrl: url,
|
|
|
+ // data: { typeid: that.recommenIndex },
|
|
|
+ // success(res) {
|
|
|
+ // if (res.code == 200) that.onClickRecommon(that.recommenIndex);
|
|
|
+ // },
|
|
|
+ // });
|
|
|
},
|
|
|
// 损失电量分析 type:1 表示24小时健康趋势,2 表示七天健康趋势 3 表示30天健康趋势
|
|
|
requestCoulometry(type) {
|
|
|
- let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "POST",
|
|
|
- timeout: 8000,
|
|
|
- subUrl: "recommen/findAllChartjz",
|
|
|
- data: { wpId: 0, type: type },
|
|
|
- success(res) {
|
|
|
- if (res.code == 200) {
|
|
|
- that.bardata.legend = ["优数量", "良数量", "差数量"];
|
|
|
- that.lineData = res.data.lvchart;
|
|
|
- that.bardata.area = res.data.datechart;
|
|
|
- that.bardata.data[2] = res.data.cslchart;
|
|
|
- that.bardata.data[1] = res.data.lslchart;
|
|
|
- that.bardata.data[0] = res.data.yslchart;
|
|
|
+ api.findAllChartjz({
|
|
|
+ wpId: 0,
|
|
|
+ type: type
|
|
|
+ }).then(res =>{
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.bardata.legend = ["优数量", "良数量", "差数量"];
|
|
|
+ this.lineData = res.data.lvchart;
|
|
|
+ this.bardata.area = res.data.datechart;
|
|
|
+ this.bardata.data[2] = res.data.cslchart;
|
|
|
+ this.bardata.data[1] = res.data.lslchart;
|
|
|
+ this.bardata.data[0] = res.data.yslchart;
|
|
|
}
|
|
|
- },
|
|
|
- });
|
|
|
+ })
|
|
|
+ // let that = this;
|
|
|
+ // that.API.requestData({
|
|
|
+ // method: "POST",
|
|
|
+ // timeout: 8000,
|
|
|
+ // subUrl: "recommen/findAllChartjz",
|
|
|
+ // data: { wpId: 0, type: type },
|
|
|
+ // success(res) {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // that.bardata.legend = ["优数量", "良数量", "差数量"];
|
|
|
+ // that.lineData = res.data.lvchart;
|
|
|
+ // that.bardata.area = res.data.datechart;
|
|
|
+ // that.bardata.data[2] = res.data.cslchart;
|
|
|
+ // that.bardata.data[1] = res.data.lslchart;
|
|
|
+ // that.bardata.data[0] = res.data.yslchart;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // });
|
|
|
},
|
|
|
},
|
|
|
};
|