@@ -26,4 +26,25 @@ export default { | |||
.el-tooltip__popper { | |||
max-width: 300px; | |||
} | |||
.nulllist{ | |||
width: 100%; | |||
height: 350px; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
.imgboxc{ | |||
width: 100%; | |||
text-align: center; | |||
.imgboxc-img{ | |||
width: 118px; | |||
height: 118px; | |||
} | |||
.nulltext{ | |||
width: 100%; | |||
text-align: center; | |||
color: #999999; | |||
font-size: 14px; | |||
} | |||
} | |||
} | |||
</style> |
@@ -211,6 +211,7 @@ | |||
style="height: 350px; width: 94%; margin: 0 auto" | |||
> | |||
<div id="data6" style="height:350px;"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -390,7 +391,8 @@ export default { | |||
}, | |||
tablist:[], | |||
houseList:[], | |||
role:'' | |||
role:'', | |||
}; | |||
}, | |||
mounted() { | |||
@@ -853,12 +855,14 @@ export default { | |||
}) | |||
}, | |||
SwitchCARDSsha(data1){ | |||
echarts.init(document.getElementById(data1)).dispose(); | |||
echarts.init(document.getElementById(data1)).dispose(); | |||
}, | |||
SwitchCARDS1(arr1,arr2,timelist,data1) { | |||
echarts.init(document.getElementById(data1)).dispose(); | |||
var chartDom = document.getElementById(data1); | |||
var myChart = echarts.init(chartDom); | |||
var option; | |||
option = { | |||
color: [ | |||
@@ -998,10 +1002,16 @@ export default { | |||
myChart.resize(); | |||
}); | |||
}, | |||
piechart2(arr1,arr2,timelist,data1){ | |||
echarts.init(document.getElementById(data1)).dispose(); | |||
var chartDom = document.getElementById(data1); | |||
var myChart = echarts.init(chartDom); | |||
// try{ | |||
// var myChart = echarts.init(chartDom); | |||
// }catch(err){ | |||
// console.log(err,data1); | |||
// } | |||
var option; | |||
option = { | |||
color: [ | |||
@@ -65,9 +65,6 @@ | |||
</div> | |||
<div id="main"></div> | |||
<!-- <div v-if="Brokenline.length==0" style="display:flex;justify-content: center; align-items: center;height: 60%;"> | |||
<div>暂无数据</div> | |||
</div> --> | |||
</div> | |||
<!-- 三 --> | |||
@@ -89,11 +86,11 @@ | |||
<div class="hejisan"> | |||
<div class="sanbox1" style="width: 40%;"> | |||
<div class="text1-1">合计接待</div> | |||
<div class="text1-2">{{Pinspeak.sum}}个</div> | |||
<div class="text1-2">{{Pinspeak.sum||0}}个</div> | |||
</div> | |||
<div class="sanbox1" style="width: 25%;"> | |||
<div class="text1-1">均值</div> | |||
<div class="text1-2">{{Pinspeak.avg}}%</div> | |||
<div class="text1-2">{{Pinspeak.avg||0}}%</div> | |||
</div> | |||
</div> | |||
<div id="Pinspeak1"></div> | |||
@@ -115,14 +112,15 @@ | |||
<div class="hejisan"> | |||
<div class="sanbox1" style="width: 40%;"> | |||
<div class="text1-1">合计接待</div> | |||
<div class="text1-2">{{Pinspeak2.sum}}个</div> | |||
<div class="text1-2">{{Pinspeak2.sum||0}}个</div> | |||
</div> | |||
<div class="sanbox1" style="width: 25%;"> | |||
<div class="text1-1">均值</div> | |||
<div class="text1-2">{{Pinspeak2.avg}}%</div> | |||
<div class="text1-2">{{Pinspeak2.avg||0}}%</div> | |||
</div> | |||
</div> | |||
<div id="Pinspeak2"></div> | |||
</div> | |||
</div> | |||
@@ -136,18 +134,18 @@ | |||
<div class="hejisan"> | |||
<div class="sanbox1" style="width: 30%;"> | |||
<div class="text1-1">合计</div> | |||
<div class="text1-2">{{ceratelist.sum || ''}}次</div> | |||
<div class="text1-2">{{ceratelist.sum || 0}}次</div> | |||
</div> | |||
<div class="sanbox1" style="width: 40%;"> | |||
<div class="text1-1">顾问</div> | |||
<div class="text1-2">{{ceratelist.num || ''}}个</div> | |||
<div class="text1-2">{{ceratelist.num || 0}}个</div> | |||
</div> | |||
<div class="sanbox1" style="width: 30%;"> | |||
<div class="text1-1">人均接待</div> | |||
<div class="text1-2">{{ceratelist.avg || ''}}次</div> | |||
<div class="text1-2">{{ceratelist.avg || 0}}次</div> | |||
</div> | |||
</div> | |||
<div style="overflow-y:auto;height: 290px;width: 94%;margin: 0 auto;margin-top: 15px;margin-bottom: 16px;"> | |||
<div v-if="ceratelist.list.length!=0" style="overflow-y:auto;height: 290px;width: 94%;margin: 0 auto;margin-top: 15px;margin-bottom: 16px;"> | |||
<div class="jinbox" v-for="(item,i) in ceratelist.list" :key='i'> | |||
<div class="jinboxtit">{{item.name}}</div> | |||
<div class="jinbox-box"> | |||
@@ -156,6 +154,12 @@ | |||
<div class="jinboxbott">{{item.zxl}}个</div> | |||
</div> | |||
</div> | |||
<div class="nulllist" v-if="ceratelist.list.length==0"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="you"> | |||
<div class="title"> | |||
@@ -165,18 +169,18 @@ | |||
<div class="hejisan"> | |||
<div class="sanbox1" style="width: 30%;"> | |||
<div class="text1-1">合计</div> | |||
<div class="text1-2">{{Math.floor(ceratelist1.sum /60) || ''}}分钟</div> | |||
<div class="text1-2">{{Math.floor(ceratelist1.sum /60) || 0}}分钟</div> | |||
</div> | |||
<div class="sanbox1" style="width: 40%;"> | |||
<div class="text1-1">顾问</div> | |||
<div class="text1-2">{{ceratelist1.num || ''}}个</div> | |||
<div class="text1-2">{{ceratelist1.num || 0}}个</div> | |||
</div> | |||
<div class="sanbox1" style="width: 30%;"> | |||
<div class="text1-1">均值</div> | |||
<div class="text1-2">{{Math.floor(ceratelist1.avg /60) || ''}}分钟</div> | |||
<div class="text1-2">{{Math.floor(ceratelist1.avg /60) || 0}}分钟</div> | |||
</div> | |||
</div> | |||
<div style="overflow-y:auto;height: 290px;width: 94%;margin: 0 auto;margin-top: 15px;margin-bottom: 16px;"> | |||
<div v-if="ceratelist1.list.length!=0" style="overflow-y:auto;height: 290px;width: 94%;margin: 0 auto;margin-top: 15px;margin-bottom: 16px;"> | |||
<div class="jinbox" v-for="(item,i) in ceratelist1.list" :key='i'> | |||
<div class="jinboxtit">{{item.name}}</div> | |||
<div class="jinbox-box"> | |||
@@ -185,7 +189,12 @@ | |||
<div class="jinboxbott">{{item.zxl}}分钟</div> | |||
</div> | |||
</div> | |||
<div class="nulllist" v-if="ceratelist1.list.length==0"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -195,7 +204,7 @@ | |||
<div class="title"> | |||
<div class="text1">销讲维度执行排名</div> | |||
</div> | |||
<div style="overflow-y:auto;height: 290px;width: 94%;margin: 0 auto;margin-top: 15px;margin-bottom: 16px;"> | |||
<div v-if="Zxllist.length!=0" style="overflow-y:auto;height: 290px;width: 94%;margin: 0 auto;margin-top: 15px;margin-bottom: 16px;"> | |||
<div class="jinbox" v-for="(item,i) in Zxllist" :key='i'> | |||
<div class="jinboxtit">{{item.name}}</div> | |||
<div class="jinbox-box"> | |||
@@ -203,6 +212,12 @@ | |||
</div> | |||
<div class="jinboxbott">{{item.zxl}}%</div> | |||
</div> | |||
</div> | |||
<div class="nulllist" v-if="Zxllist.length==0"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="you"> | |||
@@ -220,7 +235,7 @@ | |||
</el-select> | |||
</div> | |||
</div> | |||
<div style="overflow-y:auto;height: 290px;width: 94%;margin: 0 auto;margin-top: 15px;margin-bottom: 16px;"> | |||
<div v-if="Zxllistchildren.length!=0" style="overflow-y:auto;height: 290px;width: 94%;margin: 0 auto;margin-top: 15px;margin-bottom: 16px;"> | |||
<div class="jinbox" v-for="(item,i) in Zxllistchildren" :key='i'> | |||
<div class="jinboxtit">{{item.name}}</div> | |||
<div class="jinbox-box"> | |||
@@ -229,7 +244,12 @@ | |||
<div class="jinboxbott">{{item.zxl}}%</div> | |||
</div> | |||
</div> | |||
<div class="nulllist" v-if="Zxllistchildren.length==0"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -300,16 +320,24 @@ export default { | |||
this.overviewfindUserListByHouseId() | |||
this.overviewreceptionOverview() | |||
this.overviewreceptionData() | |||
this.overviewreceptionRanking() | |||
this.overviewreceptionRanking1() | |||
this.overviewreceptionOverviewZxl() | |||
this.overviewteamOrAccountSellingTrends() | |||
this.overviewteamOrAccountSellingTrends1() | |||
}else{ | |||
this.zkhousePage() | |||
} | |||
}, | |||
methods: { | |||
//切换楼盘 | |||
houseChange(){ | |||
this.Zxllist=[]; | |||
this.marketingId=''; | |||
this.consultantlist=[]; | |||
this.consultantsri=''; | |||
this.departmentlist=[]; | |||
this.departmentsri=''; | |||
this.customtime=[]; | |||
this.TimetoAhoose=4; | |||
this.fromobj.statDateStart= ''; | |||
@@ -318,11 +346,13 @@ export default { | |||
this.overviewfindUserListByHouseId() | |||
this.overviewreceptionOverview() | |||
this.overviewreceptionData() | |||
this.overviewreceptionRanking() | |||
this.overviewreceptionRanking1() | |||
this.overviewreceptionOverviewZxl() | |||
this.overviewteamOrAccountSellingTrends() | |||
this.overviewteamOrAccountSellingTrends1() | |||
}, | |||
//获取楼盘 | |||
zkhousePage() { | |||
this.$api.api | |||
.findHouseByUser({ | |||
@@ -339,6 +369,8 @@ export default { | |||
this.overviewreceptionRanking() | |||
this.overviewreceptionRanking1() | |||
this.overviewreceptionOverviewZxl() | |||
this.overviewteamOrAccountSellingTrends() | |||
this.overviewteamOrAccountSellingTrends1() | |||
}); | |||
}, | |||
//切换二级 | |||
@@ -464,7 +496,6 @@ export default { | |||
statDateEnd:this.fromobj.statDateEnd, | |||
deptId:this.departmentsri | |||
} | |||
// console.log(this.departmentsri,'123'); | |||
if(this.TimetoAhoose==8){ | |||
parmo.dateType=null; | |||
} | |||
@@ -545,6 +576,7 @@ export default { | |||
}) | |||
} | |||
this.SwitchCARDS(newline,newline2,Strname) | |||
}, | |||
//获取卡片数据 | |||
overviewreceptionOverview(){ | |||
@@ -563,6 +595,7 @@ export default { | |||
}, | |||
//获取卡片下折线图 | |||
overviewreceptionData(){ | |||
this.Brokenline=[]; | |||
let parmo={ | |||
houseId:this.houseId, | |||
dateType:this.TimetoAhoose, | |||
@@ -573,7 +606,7 @@ export default { | |||
parmo.dateType=null; | |||
} | |||
this.$api.http.overviewreceptionData(parmo).then((res) => { | |||
this.Brokenline=res.data; | |||
this.Brokenline=res.data ||[]; | |||
this.Overviewxlick(1) | |||
}) | |||
}, | |||
@@ -582,13 +615,11 @@ export default { | |||
this.$api.http.overviewfindList({ | |||
houseId:this.houseId, | |||
}).then((res) => { | |||
// this.departmentlist=[{name:'全部',deptId:''}] | |||
// this.departmentlist=this.departmentlist.concat(res.data); | |||
this.departmentlist=res.data; | |||
this.departmentlist=res.data||[]; | |||
if(this.departmentlist.length==0){ | |||
return | |||
} | |||
this.departmentsri=this.departmentlist[0].deptId; | |||
// console.log(this.departmentsri); | |||
// console.log(this.departmentsri,'1'); | |||
this.overviewteamOrAccountSellingTrends() | |||
}) | |||
@@ -599,13 +630,19 @@ export default { | |||
orgType:localStorage.getItem("orgType"), | |||
projectId:this.houseId, | |||
}).then((res) => { | |||
this.consultantlist=res.data; | |||
this.consultantlist=res.data||[]; | |||
if(this.consultantlist.length==0){ | |||
return | |||
} | |||
this.consultantsri=res.data[0].accountId; | |||
this.overviewteamOrAccountSellingTrends1() | |||
}) | |||
}, | |||
//卡片下折线图 | |||
SwitchCARDS(newline,newline2,Strname){ | |||
if(this.Brokenline==0){ | |||
return | |||
} | |||
echarts.init(document.getElementById('main')).dispose(); // 销毁实例 | |||
var chartDom = document.getElementById('main'); | |||
var myChart = echarts.init(chartDom); | |||
@@ -746,6 +783,9 @@ export default { | |||
//团队销讲 | |||
Pinspeakfun1(newline,newline2){ | |||
if( this.Pinspeak.list.length==0){ | |||
return | |||
} | |||
let chartDom = document.getElementById('Pinspeak1'); | |||
let myChart = echarts.init(chartDom); | |||
let option= { | |||
@@ -799,7 +839,6 @@ export default { | |||
type: 'solid', | |||
color: '#DDE1EE',//x线的颜色 | |||
width:'1'//坐标线的宽度 | |||
} | |||
} | |||
}, | |||
@@ -843,6 +882,9 @@ export default { | |||
}, | |||
//员工销讲 | |||
Pinspeakfun2(newline,newline2){ | |||
if( this.Pinspeak2.list.length==0){ | |||
return | |||
} | |||
let chartDom = document.getElementById('Pinspeak2'); | |||
let myChart = echarts.init(chartDom); | |||
let option= { | |||
@@ -896,7 +938,6 @@ export default { | |||
type: 'solid', | |||
color: '#DDE1EE',//x线的颜色 | |||
width:'1'//坐标线的宽度 | |||
} | |||
} | |||
}, | |||
@@ -934,7 +975,6 @@ export default { | |||
}] | |||
}; | |||
option && myChart.setOption(option); | |||
window.addEventListener("resize", () => { myChart.resize();}); | |||
}, | |||
@@ -973,7 +1013,6 @@ export default { | |||
}) | |||
return arr | |||
}, | |||
}, | |||
}; | |||
</script> | |||
@@ -986,6 +1025,7 @@ export default { | |||
padding-bottom: 100px; | |||
} | |||
.container { | |||
display: grid; | |||
grid-template-columns: repeat(5, 19%) ; | |||
@@ -82,14 +82,14 @@ | |||
<div class="hejisan"> | |||
<div class="sanbox1" style="width: 50%;"> | |||
<div class="text1-1">团队总数</div> | |||
<div class="text1-2">{{teamobj1.num}}个</div> | |||
<div class="text1-2">{{teamobj1.num||0}}个</div> | |||
</div> | |||
<div class="sanbox1" style="width: 50%;"> | |||
<div class="text1-1">均值</div> | |||
<div class="text1-2">{{teamobj1.avg}}个</div> | |||
<div class="text1-2">{{teamobj1.avg||0}}个</div> | |||
</div> | |||
</div> | |||
<div style="overflow-y:auto;height: 350px;width: 94%;margin: 0 auto;"> | |||
<div v-if="teamobj1.list.length!=0" style="overflow-y:auto;height: 350px;width: 94%;margin: 0 auto;"> | |||
<div class="jinbox" v-for="(item,i) in teamobj1.list" :key='i'> | |||
<div class="jinboxtit">{{item.name}}</div> | |||
<div class="jinbox-box"> | |||
@@ -98,6 +98,12 @@ | |||
<div class="jinboxbott">{{item.zxl}}个</div> | |||
</div> | |||
</div> | |||
<div class="nulllist" style="height:300px" v-if="teamobj1.list.length==0"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="you"> | |||
<div class="title"> | |||
@@ -106,14 +112,14 @@ | |||
<div class="hejisan"> | |||
<div class="sanbox1" style="width: 50%;"> | |||
<div class="text1-1">团队总数</div> | |||
<div class="text1-2">{{teamobj2.num}}个</div> | |||
<div class="text1-2">{{teamobj2.num||0}}个</div> | |||
</div> | |||
<div class="sanbox1" style="width: 50%;"> | |||
<div class="text1-1">均值</div> | |||
<div class="text1-2">{{Math.floor(teamobj2.avg/60)}}分钟</div> | |||
<div class="text1-2">{{Math.floor(teamobj2.avg/60)||0}}分钟</div> | |||
</div> | |||
</div> | |||
<div style="overflow-y:auto;height: 350px;width: 94%;margin: 0 auto;"> | |||
<div v-if="teamobj2.list.length!=0" style="overflow-y:auto;height: 350px;width: 94%;margin: 0 auto;"> | |||
<div class="jinbox" v-for="(item,i) in teamobj2.list" :key='i'> | |||
<div class="jinboxtit">{{item.name}}</div> | |||
<div class="jinbox-box"> | |||
@@ -122,6 +128,12 @@ | |||
<div class="jinboxbott">{{item.zxl}}分钟</div> | |||
</div> | |||
</div> | |||
<div class="nulllist" style="height:300px" v-if="teamobj2.list.length==0"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -143,14 +155,14 @@ | |||
<div class="hejisan"> | |||
<div class="sanbox1" style="width: 50%;"> | |||
<div class="text1-1">团队总数</div> | |||
<div class="text1-2">{{teamobj3.num}}个</div> | |||
<div class="text1-2">{{teamobj3.num||0}}个</div> | |||
</div> | |||
<div class="sanbox1" style="width: 50%;"> | |||
<div class="text1-1">均值</div> | |||
<div class="text1-2">{{teamobj3.avg || 0}}%</div> | |||
</div> | |||
</div> | |||
<div style="overflow-y:auto;height: 350px;width: 94%;margin: 0 auto;"> | |||
<div v-if="teamobj3.list.length!=0" style="overflow-y:auto;height: 350px;width: 94%;margin: 0 auto;"> | |||
<div class="jinbox" v-for="(item,i) in teamobj3.list" :key='i'> | |||
<div class="jinboxtit">{{item.name}}</div> | |||
<div class="jinbox-box"> | |||
@@ -159,12 +171,24 @@ | |||
<div class="jinboxbott">{{item.zxl}}%</div> | |||
</div> | |||
</div> | |||
<div class="nulllist" style="height:300px" v-if="teamobj3.list.length==0"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="you"> | |||
<div class="title"> | |||
<div class="text1">销讲能力雷达图</div> | |||
</div> | |||
<div id="main" style="height: 350px;width: 94%;margin: 0 auto;"></div> | |||
<div id="main" v-if="isshowcd2==true" style="height: 350px;width: 94%;margin: 0 auto;"></div> | |||
<div class="nulllist" style="height:300px" v-if="isshowcd2==false"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -190,10 +214,10 @@ | |||
</div> | |||
<div class="sanbox1" style="width: 50%;"> | |||
<div class="text1-1">均值</div> | |||
<div class="text1-2">{{teamobj5.avg}}次</div> | |||
<div class="text1-2">{{teamobj5.avg||0}}次</div> | |||
</div> | |||
</div> | |||
<div style="overflow-y:auto;height: 350px;width: 94%;margin: 0 auto;"> | |||
<div v-if="teamobj5.list.length!=0" style="overflow-y:auto;height: 350px;width: 94%;margin: 0 auto;"> | |||
<div class="jinbox" v-for="(item,i) in teamobj5.list" :key='i'> | |||
<div class="jinboxtit">{{item.name}}</div> | |||
<div class="jinbox-box"> | |||
@@ -202,12 +226,24 @@ | |||
<div class="jinboxbott">{{item.zxl}}次</div> | |||
</div> | |||
</div> | |||
<div class="nulllist" style="height:300px" v-if="teamobj5.list.length==0"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="you"> | |||
<div class="title"> | |||
<div class="text1">违禁话术雷达图</div> | |||
</div> | |||
<div id="main2" style="height: 350px;width: 94%;margin: 0 auto;"></div> | |||
<div v-if="isshowcd==true" id="main2" style="height: 350px;width: 94%;margin: 0 auto;"></div> | |||
<div class="nulllist" style="height:300px" v-if="isshowcd==false"> | |||
<div class="imgboxc"> | |||
<img class="imgboxc-img" src="/img/nullnull.png" alt=""> | |||
<div class="nulltext">暂无数据</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -252,7 +288,9 @@ export default { | |||
teamAllLeve2id:'', | |||
ceratelist:[], | |||
role:'', | |||
houseList:[] | |||
houseList:[], | |||
isshowcd:true, | |||
isshowcd2:true | |||
}; | |||
}, | |||
mounted() { | |||
@@ -562,6 +600,12 @@ export default { | |||
}, | |||
initecah(namelist,datalist,newlinename){ | |||
if(datalist.length==0){ | |||
this.isshowcd2=false | |||
return | |||
}else{ | |||
this.isshowcd2=true | |||
} | |||
echarts.init(document.getElementById("main")).dispose(); | |||
var chartDom = document.getElementById("main"); | |||
var myChart = echarts.init(chartDom); | |||
@@ -622,6 +666,12 @@ export default { | |||
}); | |||
}, | |||
initecah2(namelist,datalist,newlinename){ | |||
if(datalist.length==0){ | |||
this.isshowcd=false | |||
return | |||
}else{ | |||
this.isshowcd=true | |||
} | |||
echarts.init(document.getElementById("main2")).dispose(); | |||
var chartDom = document.getElementById("main2"); | |||
var myChart = echarts.init(chartDom); | |||
@@ -298,19 +298,8 @@ | |||
</el-select> | |||
</div> | |||
<div v-if="echartsisshow" id="main"></div> | |||
<div | |||
v-else | |||
style=" | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
height: 350px; | |||
" | |||
> | |||
<div>暂无数据</div> | |||
<div id="main"></div> | |||
</div> | |||
</div> | |||
<!-- 表格 --> | |||
<div | |||
@@ -1011,7 +1011,7 @@ export default { | |||
if (data.children.length == 0) { | |||
this.deleteType = "node"; | |||
this.deleteId = data.id; | |||
this.dialogVisible = true; | |||
this.dialogVisible = true;findByTempId | |||
} else { | |||
this.$message({ | |||
message: "请先清空子级", | |||
@@ -89,7 +89,8 @@ | |||
<el-button type="text" size="small" v-if="scope.row.status==1&&tem_pwl_stop" @click="clickstateis(scope.row)">启用</el-button> | |||
<el-button type="text" size="small" v-if="scope.row.status==0&&tem_pwl_stop" @click="clickstateno(scope.row)">停用</el-button> | |||
<el-button type="text" size="small" v-if="tem_pwl_edit" @click="clickbianji(scope.row)">编辑</el-button> | |||
<el-button type="text" size="small" v-if="tem_pwl_del" @click="templatedel(scope.row)">删除</el-button> | |||
<el-button type="text" size="small" v-if="tem_pwl_del" @click="templatedel(scope.row)">删除</el-button> | |||
<el-button type="text" size="small" @click="goinfo(scope.row)">查看</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -105,6 +106,31 @@ | |||
</el-pagination> | |||
</div> | |||
</div> | |||
<el-dialog title="查看" :visible.sync="dialogFormVisible"> | |||
<div style="height: 400px;overflow-y: auto;width:80%;margin: 0 auto;"> | |||
<div style="border: 2px dashed #CCCCCC;margin-top: 10px;padding:6px;border-radius: 6px;font-size: 14px;" | |||
v-for="(item,index) in newlist" :key="index"> | |||
<div style="display: flex;align-items: center;height: 30px;"> | |||
<div >{{item.name||''}}:{{item.fraction}}分</div> | |||
</div> | |||
<div class="erji" style="margin-left: 30px;" v-for="(asd,idx) in item.children" :key="idx"> | |||
<div style="display: flex;align-items: center;height: 30px;"> | |||
<div>{{asd.name||''}}:{{asd.fraction}}分</div> | |||
<div> | |||
</div> | |||
</div> | |||
<div class="sanji" style="width:90%;" > | |||
<div style="display: flex;align-items: center;height: 30px;" v-for="(sanji,indx) in asd.children" :key="indx"> | |||
<div style="width:85% ;margin-left: 30px;">{{sanji.name||''}}</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button @click="dialogFormVisible = false">取 消</el-button> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
@@ -126,6 +152,9 @@ export default { | |||
{label:'启用',value:'0'}, | |||
], | |||
statetest:'', | |||
dialogFormVisible:false, | |||
nodelist:[], | |||
newlist:[] | |||
}; | |||
}, | |||
computed: { | |||
@@ -141,6 +170,74 @@ export default { | |||
this.zkhousePage() | |||
}, | |||
methods: { | |||
goinfo(row){ | |||
this.nodelist=[] | |||
this.newlist=[] | |||
this.dialogFormVisible=true; | |||
this.$api.http.templatedelfindByTempId({tempId:row.id,}).then((res) => { | |||
this.nodelist = res.data.list; | |||
this.listCheckedchaifen() | |||
}) | |||
}, | |||
listCheckedchaifen() { | |||
let arr = []; | |||
let level2 = []; | |||
this.nodelist.forEach((item, index) => { | |||
if (item.pid == 0) { | |||
item.children = []; | |||
arr.push(item); | |||
} else { | |||
level2.push(item); | |||
} | |||
}); | |||
let resultArr = []; //去重后的数组 | |||
var flag; | |||
for (var i in arr) { | |||
flag = true; | |||
for (var j in resultArr) { | |||
if (resultArr[j].id == arr[i].id) { | |||
flag = false; | |||
break; | |||
} | |||
} | |||
if (flag) { | |||
resultArr.push(arr[i]); | |||
} | |||
} | |||
let resultArrlist = []; //去重后的数组 | |||
var flags; | |||
for (var i in level2) { | |||
flags = true; | |||
for (var j in resultArrlist) { | |||
if (resultArrlist[j].id == level2[i].id) { | |||
flags = false; | |||
break; | |||
} | |||
} | |||
if (flags) { | |||
resultArrlist.push(level2[i]); | |||
} | |||
} | |||
let level3 = []; | |||
resultArrlist.forEach((res, index) => { | |||
resultArr.forEach((asd) => { | |||
if (res.pid == asd.id) { | |||
res.children = []; | |||
asd.children.push(res); | |||
} | |||
}); | |||
}); | |||
resultArrlist.forEach((xzd) => { | |||
resultArr.forEach((asd) => { | |||
asd.children.forEach((qwe) => { | |||
if (xzd.pid == qwe.id) { | |||
qwe.children.push(xzd); | |||
} | |||
}); | |||
}); | |||
}); | |||
this.newlist = resultArr; | |||
}, | |||
//停用 | |||
clickstateno(item){ | |||
this.$confirm('此操作将停用此模板, 是否继续?', '提示', { | |||
@@ -304,6 +401,14 @@ export default { | |||
</script> | |||
<style scoped="scoped" lang="scss" > | |||
.custom-tree-node { | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
font-size: 14px; | |||
padding-right: 8px; | |||
} | |||
.box-center { | |||
width: 100%; | |||
padding: 15px; | |||
@@ -174,7 +174,7 @@ | |||
</el-form> | |||
</div> | |||
<div style="margin: 0 0 10px 10px" v-if="sys_user_add"> | |||
<div style="margin: 0 0 10px 10px" v-if="sys_user_add==true && choseFlag==false"> | |||
<!-- <el-button type="primary" :disabled='checkRole.length==0' @click="delIds">批量删除</el-button> --> | |||
<el-button type="primary" @click="addRole">添加</el-button> | |||
</div> | |||
@@ -3,9 +3,9 @@ | |||
* https://cli.vuejs.org/zh/config/ | |||
*/ | |||
// const url = 'http://pigx-gateway' | |||
const url = 'http://39.97.167.65:9999' //测试 | |||
// const url = 'http://39.97.167.65:9999' //测试 | |||
// const url = 'http://192.168.31.169:9999' //长龙 | |||
// const url = 'http://192.168.31.134:9999' //嘉豪 | |||
const url = 'http://192.168.31.134:9999' //嘉豪 | |||
// const url = 'http://192.168.31.100:9999' //王笑 | |||
// const url = 'http://nitu5e.natappfree.cc' //王笑 | |||