jyt 2 years ago
parent
commit
32ff213798
4 changed files with 342 additions and 157 deletions
  1. +10
    -0
      src/api/modules/http.js
  2. +2
    -2
      src/page/wel.vue
  3. +106
    -17
      src/views/Customer/index.vue
  4. +224
    -138
      src/views/Equipment/equipmentDetailList.vue

+ 10
- 0
src/api/modules/http.js View File

@@ -844,3 +844,13 @@ export function operationStatisticsDetail(query) {
}) })
} }


// 单/批量转交客户至另一个顾问

export function theCirculation(query) {
return request({
url: 'autoSR/customer/theCirculation',
method: 'get',
params: query
})
}


+ 2
- 2
src/page/wel.vue View File

@@ -351,14 +351,14 @@
<div class="page-container"> <div class="page-container">


<div class="pagechen" @click="jumpto('1')" v-if="role==0"> <div class="pagechen" @click="jumpto('1')" v-if="role==0">
<div class="pageboxtitle1">30天到期的代理商</div>
<div class="pageboxtitle1">45天到期的代理商</div>
<div class="pageboxtitle3"> <div class="pageboxtitle3">
{{sysTop.matuityOfAgent||0}} {{sysTop.matuityOfAgent||0}}
</div> </div>
</div> </div>


<div class="pagechen" @click="jumpto('2')"> <div class="pagechen" @click="jumpto('2')">
<div class="pageboxtitle1">30天到期的楼盘</div>
<div class="pageboxtitle1">45天到期的楼盘</div>
<div class="pageboxtitle3"> <div class="pageboxtitle3">
{{sysTop.matuityOfHouse||0}} {{sysTop.matuityOfHouse||0}}
</div> </div>


+ 106
- 17
src/views/Customer/index.vue View File

@@ -229,7 +229,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="div-labox">
<div class="div-labox">
<div class="labeltext">违禁标签:</div> <div class="labeltext">违禁标签:</div>
<el-select <el-select
v-model="searchForm.sensitiveWords" v-model="searchForm.sensitiveWords"
@@ -255,6 +255,10 @@
<div class="labeltext"></div> <div class="labeltext"></div>
<el-button type="primary" @click="screen">筛选</el-button> <el-button type="primary" @click="screen">筛选</el-button>
<el-button @click="clearScreen">清空筛选条件</el-button> <el-button @click="clearScreen">清空筛选条件</el-button>

<el-button :disabled="isBand" type="primary" @click="transfer"
>批量转交</el-button
>
</div> </div>
<div <div
style="margin-left: auto; margin-right: 10px" style="margin-left: auto; margin-right: 10px"
@@ -267,9 +271,18 @@


<!-- 表格 --> <!-- 表格 -->
<div class="cen-tab"> <div class="cen-tab">
<el-table :data="tableData" stripe style="width: 100%">
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table
:data="tableData"
stripe
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
type="index"
label="序号"
align="center"
></el-table-column>
<el-table-column prop="name" label="客户" align="center"> <el-table-column prop="name" label="客户" align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -363,6 +376,34 @@
</el-pagination> </el-pagination>
</div> </div>
</div> </div>

<!-- 提示转义客户 -->
<el-dialog title="客户流转" :visible.sync="dialogVisible" width="30%">
<div>
<span>员工:</span>
<el-select
v-model="agentId"
clearable
filterable
placeholder="请选择"
class="div-inpbox"
>
<el-option
v-for="item in accountList"
:key="item.accountId"
:label="item.name"
:value="item.accountId"
>
</el-option>
</el-select>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false;agentId = '';">取 消</el-button>
<el-button type="primary" @click="confirmTransfer"
>确 定</el-button
>
</span>
</el-dialog>
</div> </div>
</template> </template>


@@ -516,11 +557,17 @@ export default {
projectId: "", projectId: "",
timeType: "0", timeType: "0",
clientStage: "", clientStage: "",
orderBy:'',
sensitiveWords:[],
orderBy: "",
sensitiveWords: [],
}, },
clientStagelist: [], clientStagelist: [],
sensitiveList:[],//违禁词
sensitiveList: [], //违禁词

dialogVisible: false, // 客户流转提示框
transItem: null, // 转移客户保存的数据
isBand: true, // 批量转交按钮状态
selectMoreIds: "", // 多选客户id
agentId: '', // 移交员工的id
}; };
}, },
computed: { computed: {
@@ -538,6 +585,52 @@ export default {
this.zkhousePage(); this.zkhousePage();
}, },
methods: { methods: {
// 批量转交按钮点击事件
transfer() {
this.dialogVisible = true;
},

// 确认提交转移
confirmTransfer() {
if (!this.agentId) {
this.$message.error('请选择转交员工')
return
}
this.theCirculation({ ids: this.selectMoreIds, agentId: this.agentId })
},

// 单个转交
tranfser(row) {
console.log(row);
this.dialogVisible = true;
this.selectMoreIds = row.id;
},

// 转移客户至其他顾问
theCirculation(query) {
this.$api.http.theCirculation(query).then((res) => {
this.$message({
message: res.message,
type: "warning",
});
});
},

// 全选按钮状态改变
handleSelectionChange(val) {
if (val.length > 0) {
this.isBand = false;
let arr = val.map(item => {
return item.id
})
this.selectMoreIds = arr.join(',')
} else {
this.isBand = true;
this.selectMoreIds = '';
}
console.log(val);
},

downLoad() { downLoad() {
// this.searchForm // this.searchForm
exportMethodPost( exportMethodPost(
@@ -562,10 +655,6 @@ export default {
} }
}); });
}, },
// 转交
tranfser(row) {
console.log(row);
},
// 接待记录列表 // 接待记录列表
findbypage() { findbypage() {
let obj = { let obj = {
@@ -598,8 +687,8 @@ export default {
dateType: null, dateType: null,
searchForm: "", searchForm: "",
timeType: "0", timeType: "0",
orderBy:'',
sensitiveWords:[],
orderBy: "",
sensitiveWords: [],
projectId: projectId:
this.orgType == 3 this.orgType == 3
? localStorage.getItem("houseId") ? localStorage.getItem("houseId")
@@ -608,8 +697,8 @@ export default {
this.findbypage(); this.findbypage();
}, },
houseChange() { houseChange() {
this.searchForm.sensitiveWords=[]
this.searchForm.keywordsId=[]
this.searchForm.sensitiveWords = [];
this.searchForm.keywordsId = [];
this.findbypage(); this.findbypage();
this.findKeywords(); this.findKeywords();
// 获取置业顾问列表 // 获取置业顾问列表
@@ -619,12 +708,12 @@ export default {
this.sensitivewordsList() this.sensitivewordsList()
}, },
// 违禁词 // 违禁词
sensitivewordsList(){
sensitivewordsList() {
let obj = { let obj = {
houseId: this.searchForm.projectId, houseId: this.searchForm.projectId,
}; };
this.$api.api.sensitivewordsList(obj).then((res) => { this.$api.api.sensitivewordsList(obj).then((res) => {
console.log(res,'suhju')
console.log(res, "suhju");
this.sensitiveList = res.data; this.sensitiveList = res.data;
}); });
}, },


+ 224
- 138
src/views/Equipment/equipmentDetailList.vue View File

@@ -50,11 +50,11 @@
</el-option> </el-option>
</el-select> </el-select>
</div> --> </div> -->
<div style="margin-left: 26px" v-if="selValue == 1">
<div style="margin-left: 26px" v-if="selValue == 1">
<el-select <el-select
v-model="houseId"
v-model="houseId"
filterable filterable
placeholder="默认为全部"
placeholder="默认为全部"
@change="change" @change="change"
> >
<el-option <el-option
@@ -69,7 +69,7 @@
<!-- 楼盘 --> <!-- 楼盘 -->
<div style="margin-left: 26px" v-else-if="selValue == 2"> <div style="margin-left: 26px" v-else-if="selValue == 2">
<el-select <el-select
v-model="houseId"
v-model="houseId"
filterable filterable
placeholder="默认为全部" placeholder="默认为全部"
@change="change" @change="change"
@@ -85,7 +85,7 @@
</div> </div>
<div style="margin-left: 26px" v-else> <div style="margin-left: 26px" v-else>
<el-select <el-select
v-model="houseId"
v-model="houseId"
filterable filterable
placeholder="默认为全部" placeholder="默认为全部"
@change="change" @change="change"
@@ -99,7 +99,10 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div style="margin-left: auto;margin-right:10px;" v-if="equ_ed_download">
<div
style="margin-left: auto; margin-right: 10px"
v-if="equ_ed_download"
>
<el-button @click="downLoad">导出</el-button> <el-button @click="downLoad">导出</el-button>
</div> </div>
</div> </div>
@@ -164,7 +167,7 @@
<div style="min-width: 60px"> <div style="min-width: 60px">
{{ selectTime1 ? "时段二: " : "请选择: " }} {{ selectTime1 ? "时段二: " : "请选择: " }}
</div> </div>
<div v-if="selectTime1" style="display: flex;">
<div v-if="selectTime1" style="display: flex">
<!-- {{ selectTime+ "-" + selectTime1}} --> <!-- {{ selectTime+ "-" + selectTime1}} -->
<div style="min-width: 120px; text-align: center"> <div style="min-width: 120px; text-align: center">
{{ selectTime }} {{ selectTime }}
@@ -197,7 +200,7 @@
<div class="alllistbox"> <div class="alllistbox">
<div <div
class="alllist" class="alllist"
@click="compareChange(0,'设备总数')"
@click="compareChange(0, '设备总数')"
:class="compareFlag == 0 ? 'active' : 'noactive'" :class="compareFlag == 0 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">设备总数</div> <div class="alllist-text1">设备总数</div>
@@ -222,7 +225,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(1,'在线设备数')"
@click="compareChange(1, '在线设备数')"
:class="compareFlag == 1 ? 'active' : 'noactive'" :class="compareFlag == 1 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">在线设备数</div> <div class="alllist-text1">在线设备数</div>
@@ -246,7 +249,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(2,'在线设备平均占比')"
@click="compareChange(2, '在线设备平均占比')"
:class="compareFlag == 2 ? 'active' : 'noactive'" :class="compareFlag == 2 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">在线设备平均占比</div> <div class="alllist-text1">在线设备平均占比</div>
@@ -272,7 +275,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(3,'活跃设备数')"
@click="compareChange(3, '活跃设备数')"
:class="compareFlag == 3 ? 'active' : 'noactive'" :class="compareFlag == 3 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">活跃设备数</div> <div class="alllist-text1">活跃设备数</div>
@@ -296,7 +299,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(4,'活跃设备平均占比')"
@click="compareChange(4, '活跃设备平均占比')"
:class="compareFlag == 4 ? 'active' : 'noactive'" :class="compareFlag == 4 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">活跃设备平均占比</div> <div class="alllist-text1">活跃设备平均占比</div>
@@ -322,7 +325,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(5,'指派次数')"
@click="compareChange(5, '指派次数')"
:class="compareFlag == 5 ? 'active' : 'noactive'" :class="compareFlag == 5 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">指派次数</div> <div class="alllist-text1">指派次数</div>
@@ -346,7 +349,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(6,'完整录音次数')"
@click="compareChange(6, '完整录音次数')"
:class="compareFlag == 6 ? 'active' : 'noactive'" :class="compareFlag == 6 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">完整录音次数</div> <div class="alllist-text1">完整录音次数</div>
@@ -372,7 +375,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(7,'完整录音占比')"
@click="compareChange(7, '完整录音占比')"
:class="compareFlag == 7 ? 'active' : 'noactive'" :class="compareFlag == 7 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">完整录音占比</div> <div class="alllist-text1">完整录音占比</div>
@@ -398,7 +401,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(8,'部分录音')"
@click="compareChange(8, '部分录音')"
:class="compareFlag == 8 ? 'active' : 'noactive'" :class="compareFlag == 8 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">部分录音</div> <div class="alllist-text1">部分录音</div>
@@ -426,7 +429,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(9,'未录音')"
@click="compareChange(9, '未录音')"
:class="compareFlag == 9 ? 'active' : 'noactive'" :class="compareFlag == 9 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">未录音</div> <div class="alllist-text1">未录音</div>
@@ -450,7 +453,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(10,'正常关机次数')"
@click="compareChange(10, '正常关机次数')"
:class="compareFlag == 10 ? 'active' : 'noactive'" :class="compareFlag == 10 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">正常关机次数</div> <div class="alllist-text1">正常关机次数</div>
@@ -478,7 +481,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(11,'低电关机次数')"
@click="compareChange(11, '低电关机次数')"
:class="compareFlag == 11 ? 'active' : 'noactive'" :class="compareFlag == 11 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">低电关机次数</div> <div class="alllist-text1">低电关机次数</div>
@@ -506,7 +509,7 @@
</div> </div>
<div <div
class="alllist" class="alllist"
@click="compareChange(12,'异常关机次数')"
@click="compareChange(12, '异常关机次数')"
:class="compareFlag == 12 ? 'active' : 'noactive'" :class="compareFlag == 12 ? 'active' : 'noactive'"
> >
<div class="alllist-text1">异常关机次数</div> <div class="alllist-text1">异常关机次数</div>
@@ -535,8 +538,8 @@
</div> </div>
</div> </div>
</div> </div>
<!-- v-if="selectTime1" -->
<div style="margin-top: 20px" >
<!-- v-if="selectTime1" -->
<div style="margin-top: 20px">
<div class="zgutteruo"> <div class="zgutteruo">
<div class="zgutteruo-tit">对比</div> <div class="zgutteruo-tit">对比</div>
<div id="compare" style="width: 100%; height: 360px"></div> <div id="compare" style="width: 100%; height: 360px"></div>
@@ -756,14 +759,15 @@
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { exportMethodPost} from "@/util/util";
import { exportMethodPost } from "@/util/util";
export default { export default {
data() { data() {
return { return {
houseId: "", houseId: "",
timeType: 0, timeType: 0,
orgType: localStorage.getItem("orgType"), orgType: localStorage.getItem("orgType"),
selValue: localStorage.getItem("orgType") == 0
selValue:
localStorage.getItem("orgType") == 0
? "0" ? "0"
: localStorage.getItem("orgType") == 1 : localStorage.getItem("orgType") == 1
? "1" ? "1"
@@ -870,7 +874,7 @@ export default {
value: "2,3", value: "2,3",
}, },
], ],
houseTypes:'0,1'
houseTypes: "0,1",
}; };
}, },
computed: { computed: {
@@ -888,6 +892,7 @@ export default {
this.flag = true; this.flag = true;
this.houseId = theRequest.houseId; this.houseId = theRequest.houseId;
this.timeType = theRequest.timeType; this.timeType = theRequest.timeType;
this.selValue="2"
} else { } else {
this.flag = false; this.flag = false;
// console.log(1); // console.log(1);
@@ -907,33 +912,52 @@ export default {
// this.getTableList() // this.getTableList()
}, },
methods: { methods: {
downLoad(){
downLoad() {
// this.searchForm // this.searchForm
let obj = {
let obj = {
startDate: this.page.openTime, startDate: this.page.openTime,
endDate: this.page.closeTime, endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
agentId:
localStorage.getItem("orgType") == 1
? localStorage.getItem("agentId")
: this.selValue == 0
? this.houseId
: null,
orgCode:
localStorage.getItem("orgType") == 2
? localStorage.getItem("orgCode")
: this.selValue == 1
? this.houseId
: null,
houseId:
localStorage.getItem("orgType") == 3
? localStorage.getItem("houseId")
: this.selValue == 2
? this.houseId
: null,
timeType: this.timeType, timeType: this.timeType,
orgType: localStorage.getItem("orgType"), orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
queryOrgType: this.selValue / 1 + 1,
houseTypes: this.houseTypes, houseTypes: this.houseTypes,
}; };
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
exportMethodPost('autoSR/zk/equipment/detail/equipmentCountDetailExport','设备使用统计',obj)
exportMethodPost(
"autoSR/zk/equipment/detail/equipmentCountDetailExport",
"设备使用统计",
obj
);
}, },
sysChange(){
this.selValue='0'
this.choicValue = "";
this.timeType = 4;
this.houseId='';
this.getHouseList();
},
selChange() {
sysChange() {
this.selValue = "0";
this.choicValue = ""; this.choicValue = "";
this.timeType = 4; this.timeType = 4;
this.houseId='';
this.houseId = "";
this.getHouseList();
},
selChange() {
this.choicValue = "";
this.timeType = 4;
this.houseId = "";
this.getHouseList(); this.getHouseList();
// this.getTableList(); // this.getTableList();
// this.getdetail(); // this.getdetail();
@@ -941,33 +965,47 @@ export default {
// this.getcompare(); // this.getcompare();
}, },
// 没有对比时的折线图 // 没有对比时的折线图
getNoCompare(){
getNoCompare() {
this.compareFlag = 0; this.compareFlag = 0;
let obj = {
let obj = {
// current: this.pageNum, // current: this.pageNum,
// pageSize: this.pageNum, // pageSize: this.pageNum,
startDate: this.page.openTime, startDate: this.page.openTime,
endDate: this.page.closeTime, endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
agentId:
localStorage.getItem("orgType") == 1
? localStorage.getItem("agentId")
: this.selValue == 0
? this.houseId
: null,
orgCode:
localStorage.getItem("orgType") == 2
? localStorage.getItem("orgCode")
: this.selValue == 1
? this.houseId
: null,
houseId:
localStorage.getItem("orgType") == 3
? localStorage.getItem("houseId")
: this.selValue == 2
? this.houseId
: null,
timeType: this.timeType, timeType: this.timeType,
contrastStartDate: this.selectTime, contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1, contrastEndDate: this.selectTime1,
orgType: localStorage.getItem("orgType"), orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
queryOrgType: this.selValue / 1 + 1,
houseTypes: this.houseTypes, houseTypes: this.houseTypes,
}; };
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
axios({ axios({
url: `autoSR/zk/equipment/detail/usageTrendContrast`, url: `autoSR/zk/equipment/detail/usageTrendContrast`,
method: "get", method: "get",
params: obj, params: obj,
})
.then(res=>{
}).then((res) => {
console.log(res); console.log(res);
})
});
}, },
radioChange() { radioChange() {
this.selectTime = ""; this.selectTime = "";
@@ -988,15 +1026,15 @@ export default {
}, },
}); });
}, },
compareChange(idx,str) {
compareChange(idx, str) {
// if (!this.selectTime1) return; // if (!this.selectTime1) return;
this.compareFlag = idx; this.compareFlag = idx;
this.tabChange(idx,str);
this.tabChange(idx, str);
}, },
timeChange(e) { timeChange(e) {
this.selectTime = ""; this.selectTime = "";
this.selectTime1 = ""; this.selectTime1 = "";
this.pageNum=1
this.pageNum = 1;
// this.page.pageNum=1 // this.page.pageNum=1
this.timeSelect(e); this.timeSelect(e);
this.getdetail(); this.getdetail();
@@ -1065,8 +1103,8 @@ export default {
this.checked = false; this.checked = false;
this.selectTime = ""; this.selectTime = "";
this.selectTime1 = ""; this.selectTime1 = "";
this.pageNum=1
this.page.pageNum=1
this.pageNum = 1;
this.page.pageNum = 1;
//给时间选择器赋值 //给时间选择器赋值
let num = 24 * 3600 * 1000; let num = 24 * 3600 * 1000;
// 获取当前时间戳转换为日期格式 // 获取当前时间戳转换为日期格式
@@ -1082,14 +1120,14 @@ export default {
if (i != -1) { if (i != -1) {
this.customtime = [ this.customtime = [
this.timestampToTime(new Date().getTime() - num), this.timestampToTime(new Date().getTime() - num),
this.timestampToTime(new Date().getTime()-24 * 3600 * 1000),
this.timestampToTime(new Date().getTime() - 24 * 3600 * 1000),
]; ];
} }


this.$set(this, "time", null); this.$set(this, "time", null);
this.getTableList(); this.getTableList();
this.getdetail(); this.getdetail();
this.getcompare()
this.getcompare();
}, },
screening() { screening() {
this.page.pageNum = 1; this.page.pageNum = 1;
@@ -1115,8 +1153,8 @@ export default {
this.timeType = "-1"; this.timeType = "-1";
this.checked = false; this.checked = false;
this.selectTime = ""; this.selectTime = "";
this.pageNum=1
this.page.pageNum=1
this.pageNum = 1;
this.page.pageNum = 1;
this.selectTime1 = ""; this.selectTime1 = "";
this.$set(this, "time", null); this.$set(this, "time", null);
console.log(e); console.log(e);
@@ -1125,11 +1163,11 @@ export default {
this.page.closeTime = this.customtime[1]; this.page.closeTime = this.customtime[1];
this.getTableList(); this.getTableList();
this.getdetail(); this.getdetail();
this.getcompare()
this.getcompare();
}, },
//获取楼盘数据 //获取楼盘数据
getHouseList() { getHouseList() {
if (this.selValue == 1) {
if (this.selValue == 1) {
this.$api.api this.$api.api
.findMyOrg({ .findMyOrg({
orgType: localStorage.getItem("orgType"), orgType: localStorage.getItem("orgType"),
@@ -1164,7 +1202,6 @@ export default {
}); });
} }



// this.$api.api.findHouseByUser({ // this.$api.api.findHouseByUser({
// orgType: localStorage.getItem("orgType"), // orgType: localStorage.getItem("orgType"),
// agentId: localStorage.getItem("agentId"), // agentId: localStorage.getItem("agentId"),
@@ -1210,14 +1247,29 @@ export default {
size: this.pageSize, size: this.pageSize,
startDate: this.page.openTime, startDate: this.page.openTime,
endDate: this.page.closeTime, endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
agentId:
localStorage.getItem("orgType") == 1
? localStorage.getItem("agentId")
: this.selValue == 0
? this.houseId
: null,
orgCode:
localStorage.getItem("orgType") == 2
? localStorage.getItem("orgCode")
: this.selValue == 1
? this.houseId
: null,
houseId:
localStorage.getItem("orgType") == 3
? localStorage.getItem("houseId")
: this.selValue == 2
? this.houseId
: null,
timeType: this.timeType, timeType: this.timeType,
contrastStartDate: this.selectTime, contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1, contrastEndDate: this.selectTime1,
orgType: localStorage.getItem("orgType"), orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
queryOrgType: this.selValue / 1 + 1,
houseTypes: this.houseTypes, houseTypes: this.houseTypes,
}; };
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
@@ -1227,7 +1279,7 @@ export default {
params: obj, params: obj,
}) })
.then((res) => { .then((res) => {
console.log(res,'获取数据')
console.log(res, "获取数据");
this.allCompare = res; this.allCompare = res;
this.total = res.data.firstPage.total; this.total = res.data.firstPage.total;
// 数据处理 // 数据处理
@@ -1259,16 +1311,16 @@ export default {
}); });
this.compareList = arr; this.compareList = arr;
// console.log(this.compareList,'123') // console.log(this.compareList,'123')
this.tabChange(0,'设备总数');
this.tabChange(0, "设备总数");
}) })
.catch((err) => { .catch((err) => {
// console.log(err) // console.log(err)
this.compareList = []; this.compareList = [];
this.tabChange(0,'设备总数');
this.tabChange(0, "设备总数");
}); });
}, },
//处理数据 //处理数据
tabChange(idx,str1) {
tabChange(idx, str1) {
//首先获取到给定的标志,对数据进行操作和赋值 //首先获取到给定的标志,对数据进行操作和赋值
//判断情况 //判断情况
// console.log(idx) // console.log(idx)
@@ -1329,11 +1381,15 @@ export default {
// arr2.push(item.second[str]); // arr2.push(item.second[str]);
// } // }
}); });
this.allCompare.data.first.map((item,idx)=>{
timeDate.push(item.createTime.substring(5)+'VS'+this.allCompare.data.second[idx].createTime.substring(5))
arr1.push(item[str])
arr2.push(this.allCompare.data.second[idx][str])
})
this.allCompare.data.first.map((item, idx) => {
timeDate.push(
item.createTime.substring(5) +
"VS" +
this.allCompare.data.second[idx].createTime.substring(5)
);
arr1.push(item[str]);
arr2.push(this.allCompare.data.second[idx][str]);
});
this.compareList = Object.assign([], this.compareList); this.compareList = Object.assign([], this.compareList);
this.$forceUpdate(); this.$forceUpdate();
var chartDom = document.getElementById("compare"); var chartDom = document.getElementById("compare");
@@ -1342,29 +1398,29 @@ export default {
var option; var option;


option = { option = {
color: [
"#66AFF5",
"#FABD2B",
"#6F8EDC",
"#FFCF8F",
"#F98120",
"#1CC99E",
"#9474FB",
"#657292",
"#7A6A99",
"#BF5D52",
"#EE6666",
"#77B7E4",
"#E6A065",
"#9D5139",
"#C1AA88",
"#F87F7A",
"#F6CF74",
"#7F5506",
"#88BB9B",
"#6E99AA",
"#5789D0",
],
color: [
"#66AFF5",
"#FABD2B",
"#6F8EDC",
"#FFCF8F",
"#F98120",
"#1CC99E",
"#9474FB",
"#657292",
"#7A6A99",
"#BF5D52",
"#EE6666",
"#77B7E4",
"#E6A065",
"#9D5139",
"#C1AA88",
"#F87F7A",
"#F6CF74",
"#7F5506",
"#88BB9B",
"#6E99AA",
"#5789D0",
],
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
}, },
@@ -1443,39 +1499,39 @@ export default {
// console.log(this.allCompare,"第一种"); // console.log(this.allCompare,"第一种");
let timeDate = []; let timeDate = [];
let arr1 = []; let arr1 = [];
this.allCompare.data.first.map(item=>{
timeDate.push(item.createTime.substring(5))
arr1.push(item[str])
})
this.allCompare.data.first.map((item) => {
timeDate.push(item.createTime.substring(5));
arr1.push(item[str]);
});
// console.log(timeDate,arr1); // console.log(timeDate,arr1);
var chartDom = document.getElementById("compare");
var chartDom = document.getElementById("compare");
echarts.init(chartDom).dispose(); echarts.init(chartDom).dispose();
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
option = {
color: [
"#66AFF5",
"#FABD2B",
"#6F8EDC",
"#FFCF8F",
"#F98120",
"#1CC99E",
"#9474FB",
"#657292",
"#7A6A99",
"#BF5D52",
"#EE6666",
"#77B7E4",
"#E6A065",
"#9D5139",
"#C1AA88",
"#F87F7A",
"#F6CF74",
"#7F5506",
"#88BB9B",
"#6E99AA",
"#5789D0",
],
option = {
color: [
"#66AFF5",
"#FABD2B",
"#6F8EDC",
"#FFCF8F",
"#F98120",
"#1CC99E",
"#9474FB",
"#657292",
"#7A6A99",
"#BF5D52",
"#EE6666",
"#77B7E4",
"#E6A065",
"#9D5139",
"#C1AA88",
"#F87F7A",
"#F6CF74",
"#7F5506",
"#88BB9B",
"#6E99AA",
"#5789D0",
],
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
}, },
@@ -1551,14 +1607,29 @@ export default {
let obj = { let obj = {
startDate: this.page.openTime, startDate: this.page.openTime,
endDate: this.page.closeTime, endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
agentId:
localStorage.getItem("orgType") == 1
? localStorage.getItem("agentId")
: this.selValue == 0
? this.houseId
: null,
orgCode:
localStorage.getItem("orgType") == 2
? localStorage.getItem("orgCode")
: this.selValue == 1
? this.houseId
: null,
houseId:
localStorage.getItem("orgType") == 3
? localStorage.getItem("houseId")
: this.selValue == 2
? this.houseId
: null,
timeType: this.timeType, timeType: this.timeType,
contrastStartDate: this.selectTime, contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1, contrastEndDate: this.selectTime1,
orgType: localStorage.getItem("orgType"), orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
queryOrgType: this.selValue / 1 + 1,
houseTypes: this.houseTypes, houseTypes: this.houseTypes,
}; };
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
@@ -1619,7 +1690,7 @@ export default {
var myChart = echarts.init(document.getElementById("mane")); var myChart = echarts.init(document.getElementById("mane"));
var myChart1 = echarts.init(document.getElementById("mane2")); var myChart1 = echarts.init(document.getElementById("mane2"));
var option = { var option = {
color: [
color: [
"#66AFF5", "#66AFF5",
"#FABD2B", "#FABD2B",
"#6F8EDC", "#6F8EDC",
@@ -1660,7 +1731,7 @@ export default {
], ],
}; };
var option1 = { var option1 = {
color: [
color: [
"#66AFF5", "#66AFF5",
"#FABD2B", "#FABD2B",
"#6F8EDC", "#6F8EDC",
@@ -1714,12 +1785,27 @@ export default {
pageSize: this.page.pageSize, pageSize: this.page.pageSize,
startDate: this.page.openTime, startDate: this.page.openTime,
endDate: this.page.closeTime, endDate: this.page.closeTime,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : null,
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : null,
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : null,
agentId:
localStorage.getItem("orgType") == 1
? localStorage.getItem("agentId")
: this.selValue == 0
? this.houseId
: null,
orgCode:
localStorage.getItem("orgType") == 2
? localStorage.getItem("orgCode")
: this.selValue == 1
? this.houseId
: null,
houseId:
localStorage.getItem("orgType") == 3
? localStorage.getItem("houseId")
: this.selValue == 2
? this.houseId
: null,
timeType: this.timeType, timeType: this.timeType,
orgType: localStorage.getItem("orgType"), orgType: localStorage.getItem("orgType"),
queryOrgType:this.selValue/1+1,
queryOrgType: this.selValue / 1 + 1,
houseTypes: this.houseTypes, houseTypes: this.houseTypes,
}; };
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);


Loading…
Cancel
Save