Commit ed0ab59e authored by 黄奎's avatar 黄奎
parents cf59425e 1b4b08cb
...@@ -3,26 +3,25 @@ ...@@ -3,26 +3,25 @@
<div class="Feedbackchart"> <div class="Feedbackchart">
<div style="margin:0 auto;width:1200px"> <div style="margin:0 auto;width:1200px">
<div style="font-size:14px;color:#666666;margin:10px 0"> <div style="font-size:14px;color:#666666;margin:10px 0">
<span>线路:不限</span> <span>线路:{{msg.lineName}}</span>
<span>系列:不限</span> <span>系列:{{msg.LineteamName}}</span>
<span>发团日期:2019-08-05至2019-05-20</span> <span>发团日期:
<span v-if="msg.reStartDate!=''">{{msg.reStartDate}} - {{msg.reEndDate}}</span>
<span v-else>不限</span>
</span>
</div> </div>
<div class="bannerList"> <div class="bannerList">
<div class="Item"> <div v-show="index=='整体评分'" v-for="(item,index) in ScoreJson" class="Item">
<img src="../../../assets/img/fk/1.png" alt=""> <img src="../../../assets/img/fk/1.png" alt="">
<p class="num">4.55</p> <p class="num">{{ScoreJson[index]}}</p>
<p style="font-size:14px;color:#666666;">整体评分</p> <p style="font-size:14px;color:#666666;">{{index}}</p>
</div> </div>
<div class="Item"> <div v-show="index!='整体评分'" v-for="(item,index) in ScoreJson" class="Item">
<img src="../../../assets/img/fk/2.png" alt=""> <img src="../../../assets/img/fk/1.png" alt="">
<p class="num">4.55</p> <p class="num">{{ScoreJson[index]}}</p>
<p style="font-size:14px;color:#666666;">住宿安排</p> <p style="font-size:14px;color:#666666;">{{index}}</p>
</div>
<div class="Item">
<img src="../../../assets/img/fk/3.png" alt="">
<p class="num">4.55</p>
<p style="font-size:14px;color:#666666;">餐食安排</p>
</div> </div>
</div> </div>
<div class="pieChart" style="width:100%"> <div class="pieChart" style="width:100%">
<div> <div>
...@@ -47,13 +46,16 @@ ...@@ -47,13 +46,16 @@
<span @click="goUrl('Usersuggest')" style="float:right;font-size:12px;color:#333333;cursor:pointer">查看全部</span> <span @click="goUrl('Usersuggest')" style="float:right;font-size:12px;color:#333333;cursor:pointer">查看全部</span>
</p> </p>
<ul> <ul>
<li> <li v-for="(item,index) in SuggestList" :key="index">
<img style="width:40px;height:40px" src="../../../assets/img/fk/8.png" alt=""> <img style="width:40px;height:40px" src="../../../assets/img/fk/8.png" alt="">
<div class="Item"> <div class="Item">
<p style="color:#3751FE">156456</p> <p style="color:#3751FE">{{item.GuestId}}</p>
<p>henbucooasd</p> <p>{{item.TextContent}}</p>
</div> </div>
</li> </li>
<div v-if="SuggestList.length==0" style="text-align:center;padding:40px 0;">
<i style="font-size:80px" class="iconfont icon-wushuju"></i>
</div>
</ul> </ul>
</div> </div>
</div> </div>
...@@ -68,16 +70,116 @@ export default { ...@@ -68,16 +70,116 @@ export default {
data (){ data (){
return{ return{
zChartcolor:["#3751FE","#7C8DFF","#04E38A","#9DFF86","#FFE689","#FDF39E","#FF918E"], zChartcolor:["#3751FE","#7C8DFF","#04E38A","#9DFF86","#FFE689","#FDF39E","#FF918E"],
msg:{},
ScoreJson:{},
planList:[],
priorityList:[],
destinationList:[],
arr:[{name:"暂无数据",value:100}],
SuggestList:[],
arrZ:[{ name: "暂无数据",type: 'bar',color:"#3751FE",data: [10]}]
} }
}, },
created(){
if(this.$route.query.msg){
this.msg=JSON.parse(this.$route.query.msg);
}
this.getSurveyAnalyze();
this.getNextPlan();
this.getpriority();
this.destination();
this.getSuggest();
},
mounted(){ mounted(){
this.creatChart1();
this.creatChart2();
this.creatChart3();
}, },
methods:{ methods:{
getSuggest() {
this.apiJavaPost("/api/erp/survey/getSuggest", this.msg, res => {
if (res.data.resultCode === 1) {
this.SuggestList=res.data.data.pageData;
} else {
this.Error(res.data.message)
}
}, null);
},
// 下次出游目的地
destination() {
this.apiJavaPost("/api/erp/survey/destination", this.msg, res => {
// console.log("destinationList",res)
if (res.data.resultCode === 1) {
this.destinationList=[];
let data=res.data.data;
data.forEach(item=>{
let a=Math.ceil(Math.random()*this.zChartcolor.length);
let obj={
name: item.TextContent,
type: 'bar',
color:this.zChartcolor[a],
data: [item.num]
};
this.destinationList.push(obj)
})
if(this.destinationList.length==0){
this.destinationList=this.arrZ
}
console.log("this.destinationList=",this.destinationList)
this.creatChart3();
} else {
this.Error(res.data.message)
}
}, null);
},
// 印象优先
getpriority() {
this.apiJavaPost("/api/erp/survey/getpriority", this.msg, res => {
if (res.data.resultCode === 1) {
this.priorityList=res.data.data;
this.priorityList.forEach(item=>{
item.value=item.num;
})
if(this.priorityList.length==0){
this.priorityList=this.arr;
}
this.creatChart2();
} else {
this.Error(res.data.message)
}
}, null);
},
// 计划出游
getNextPlan() {
this.apiJavaPost("/api/erp/survey/getNextPlan", this.msg, res => {
if (res.data.resultCode === 1) {
this.planList=res.data.data;
this.planList.forEach(item=>{
item.value=item.num;
})
if(this.planList.length==0){
this.planList=this.arr;
}
this.creatChart1();
} else {
this.Error(res.data.message)
}
}, null);
},
// 旅客反馈评分
getSurveyAnalyze() {
this.apiJavaPost("/api/erp/survey/getSurveyAnalyze", this.msg, res => {
if (res.data.resultCode === 1) {
this.ScoreJson=res.data.data;
} else {
this.Error(res.data.message)
}
}, null);
},
goUrl(path){ goUrl(path){
this.$router.push({ name:path,query:{blank: 'y'} }) this.$router.push({ name:path,query:{"msg":JSON.stringify(this.msg),blank: 'y'} })
}, },
creatChart1() { creatChart1() {
let myChart = this.$echarts.init(document.getElementById("chart1")); let myChart = this.$echarts.init(document.getElementById("chart1"));
...@@ -142,7 +244,7 @@ export default { ...@@ -142,7 +244,7 @@ export default {
} }
} }
}, },
data: [{"name":"测试1","value":20},{"name":"测试2","value":20},{"name":"测试3","value":20},] data: this.planList
} }
] ]
}; };
...@@ -212,7 +314,7 @@ export default { ...@@ -212,7 +314,7 @@ export default {
} }
} }
}, },
data: [{"name":"测试1","value":20},{"name":"测试2","value":20},{"name":"测试3","value":20},] data:this.priorityList
} }
] ]
}; };
...@@ -248,32 +350,7 @@ export default { ...@@ -248,32 +350,7 @@ export default {
type: 'category', type: 'category',
data: ['目的地'] data: ['目的地']
}, },
series: [ series: this.destinationList
{
name: '2011年',
type: 'bar',
color:"#3751FE",
data: [18203]
},
{
name: '2012年',
type: 'bar',
color:"#7C8DFF",
data: [19325]
},
{
name: '2015年',
type: 'bar',
color:"#04E38A",
data: [700]
},
{
name: '2016年',
type: 'bar',
color:"#9DFF86",
data: [500]
}
]
}; };
myChart.setOption(option); myChart.setOption(option);
...@@ -342,7 +419,7 @@ export default { ...@@ -342,7 +419,7 @@ export default {
} }
.bannerList .Item{ .bannerList .Item{
display: inline-flex; display: inline-flex;
width:154px; width:150px;
height:174px; height:174px;
background:rgba(255,255,255,1); background:rgba(255,255,255,1);
border:2px solid rgba(235, 237, 244, 1); border:2px solid rgba(235, 237, 244, 1);
...@@ -351,7 +428,8 @@ export default { ...@@ -351,7 +428,8 @@ export default {
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
margin-right: 20px; margin-right: 20px;
box-sizing: border-box box-sizing: border-box;
margin-bottom:20px;
} }
.zhanbitu{ .zhanbitu{
......
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
<span> <span>
<em>线路</em> <em>线路</em>
</span> </span>
<el-select filterable v-model="msg.lineID" @change="getLineTeamList(msg.lineID)"> <el-select filterable v-model="obj.LineID" value-key="LineID" @change="getLineTeamList">
<el-option label="不限" :value='0'></el-option> <el-option label="不限" :value='{LineName:"不限",LineID:0}'></el-option>
<el-option v-for="item in LineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'></el-option> <el-option v-for="item in LineList" :label='item.LineName' :value='item' :key='item.LineID'></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<span> <span>
<em>系列</em> <em>系列</em>
</span> </span>
<el-select filterable v-model="msg.LineteamId"> <el-select filterable v-model="obj.LineteamId" value-key="LtID" @change="getLineLtID">
<el-option label="不限" :value='0'></el-option> <el-option label="不限" :value='{LtName:"不限",LtID:0}'></el-option>
<el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'> <el-option v-for="item in LineTeamList" :label='item.LtName' :value='item' :key='item.LtID'>
</el-option> </el-option>
</el-select> </el-select>
</li> </li>
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
<em>发团时间</em> <em>发团时间</em>
</span> </span>
<el-date-picker <el-date-picker
value-format="yyyy-mm-dd" value-format="yyyy-MM-dd"
:picker-options="pickerDisabled"
size="small" size="small"
v-model="dateList" v-model="dateList"
type="daterange" type="daterange"
...@@ -68,7 +69,9 @@ ...@@ -68,7 +69,9 @@
<td>{{item.start}}</td> <td>{{item.start}}</td>
<td>{{item.tCNUM}}</td> <td>{{item.tCNUM}}</td>
<td> <td>
{{(item.sumScore/fields.length).toFixed(1)}} <span v-if="fields.length>0">{{(item.sumScore/fields.length).toFixed(1)}}</span>
<span v-else>{{item.sumScore}}</span>
</td> </td>
<td v-for="(c,childIndex) in fields" :key="childIndex">{{item[c]?item[c]:0}}</td> <td v-for="(c,childIndex) in fields" :key="childIndex">{{item[c]?item[c]:0}}</td>
...@@ -92,11 +95,12 @@ ...@@ -92,11 +95,12 @@
</template> </template>
<script> <script>
import moment from "moment"
export default { export default {
name: 'Feedback', name: 'Feedback',
data (){ data (){
return{ return{
obj:{},
dataList:[], dataList:[],
loading:false, loading:false,
msg:{ msg:{
...@@ -106,14 +110,22 @@ export default { ...@@ -106,14 +110,22 @@ export default {
LineteamId:0, LineteamId:0,
reStartDate:'', reStartDate:'',
reEndDate:'', reEndDate:'',
isScore:0 isScore:0,
lineName:"不限",
LineteamName:"不限",
}, },
total:0, total:0,
currentPage:1, currentPage:1,
dateList:[], dateList:[],
LineList:[], LineList:[],
LineTeamList:[], LineTeamList:[],
fields:[] fields:[],
pickerDisabled: { //验证时间范围
disabledDate:(time)=>{
let _now = Date.now();
return time.getTime() > _now ;
}
}
} }
}, },
mounted(){ mounted(){
...@@ -124,18 +136,25 @@ export default { ...@@ -124,18 +136,25 @@ export default {
chaKan(item){ chaKan(item){
this.$router.push({ name:'investigationList',query:{"TCID":item.tcid,blank: 'y'} }) this.$router.push({ name:'investigationList',query:{"TCID":item.tcid,blank: 'y'} })
}, },
goUrl(){ goUrl(){
this.$router.push({ name:'FeedbackChart',query:{"customerId":1,blank: 'y'} }) this.$router.push({ name:'FeedbackChart',query:{"msg":JSON.stringify(this.msg),blank: 'y'} })
}, },
getLineList() { getLineList() {
this.apipost("line_post_GetAllList_V2", {LineDirection: 0}, res => { this.apipost("line_post_GetAllList_V2", {LineDirection: 0}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.LineList = res.data.data; this.LineList = res.data.data;
} }
}); });
}, },
getLineLtID(val){
this.msg.LineteamId=val.LtID;
this.msg.LineteamName=val.LtName;
},
//获取系列列表 //获取系列列表
getLineTeamList(lineId) { getLineTeamList(val) {
let lineId=val.LineID;
this.msg.lineID=val.LineID;
this.msg.lineName=val.LineName;
this.LineTeamList = [] this.LineTeamList = []
this.apipost("team_post_GetList", { this.apipost("team_post_GetList", {
lineID: lineId, lineID: lineId,
...@@ -149,20 +168,32 @@ export default { ...@@ -149,20 +168,32 @@ export default {
getList(){ getList(){
if(this.dateList){ if(this.dateList && this.dateList.length>0){
this.msg.reStartDate=this.dateList[0]; this.msg.reStartDate=this.dateList[0];
this.msg.reEndDate=this.dateList[1]; this.msg.reEndDate=this.dateList[1];
}else{ //计算相差多少天 day可以是second minute
this.msg.reStartDate=""; let m1=moment(this.msg.reStartDate)
this.msg.reEndDate=""; let m2=moment(this.msg.reEndDate)
} let year = m2.diff(m1, 'year');
if(year>0){
this.Error("最多查询一年的数据!")
return;
}
}else{
this.msg.reStartDate="";
this.msg.reEndDate="";
}
this.loading=true; this.loading=true;
this.apiJavaPost("/api/erp/survey//getSurveyList", this.msg, res => { this.apiJavaPost("/api/erp/survey//getSurveyList", this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
let arrays=[] let arrays=[];
console.log("res.data.data.pageData",res.data.data)
res.data.data.pageData.forEach(x => { res.data.data.pageData.forEach(x => {
let isHave=false let isHave=false
if(x.tCID!=0 || x.tCID || x.tCID!=''){
if(this.fields.indexOf(x.title)==-1&&x.title!=''){ if(this.fields.indexOf(x.title)==-1&&x.title!=''){
this.fields.push(x.title) this.fields.push(x.title)
} }
...@@ -175,20 +206,27 @@ export default { ...@@ -175,20 +206,27 @@ export default {
return false return false
} }
}) })
} }
if(!isHave){ if(!isHave){
let obj={ let obj={
tcid:x.tCID, tcid:x.tCID,
start:x.startDate.split('T')[0], start:"",
sumScore:x.scoreNum, sumScore:x.scoreNum,
tCNUM:x.tCNUM tCNUM:x.tCNUM
} }
obj[x.title]=x.scoreNum if(x.startDate){
arrays.push(obj) obj.start=x.startDate.split('T')[0]
}
obj[x.title]=x.scoreNum
arrays.push(obj)
}
} }
}); });
this.dataList=arrays; this.dataList=arrays;
console.log("this.dataList",this.dataList)
this.total=this.dataList.length; this.total=this.dataList.length;
} else { } else {
this.Error(res.data.message) this.Error(res.data.message)
......
...@@ -10,16 +10,19 @@ ...@@ -10,16 +10,19 @@
<div class="people"> <div class="people">
<p> <p>
<span>用户建议</span> <span>用户建议</span>
<span style="float:right;font-size:12px;color:#333333">查看全部</span> <!-- <span style="float:right;font-size:12px;color:#333333">查看全部</span> -->
</p> </p>
<ul> <ul class="ul">
<li> <li v-for="(item,index) in SuggestList" :key="index">
<img style="width:40px;height:40px" src="../../../assets/img/fk/8.png" alt=""> <img style="width:40px;height:40px" src="../../../assets/img/fk/8.png" alt="">
<div class="Item"> <div class="Item">
<p style="color:#3751FE">156456</p> <p style="color:#3751FE">{{item.GuestId}}</p>
<p>henbucooasd</p> <p>{{item.TextContent}}</p>
</div> </div>
</li> </li>
<div v-if="SuggestList.length==0" style="text-align:center;padding:40px 0;">
<i style="font-size:80px" class="iconfont icon-wushuju"></i>
</div>
</ul> </ul>
<div> <div>
<el-pagination <el-pagination
...@@ -45,20 +48,32 @@ export default { ...@@ -45,20 +48,32 @@ export default {
name: 'Feedbackchart', name: 'Feedbackchart',
data (){ data (){
return{ return{
msg:{ msg:{},
pageIndex:1,
pageSize:15
},
currentPage:1, currentPage:1,
total:0, total:0,
SuggestList:[],
} }
}, },
created(){
if(this.$route.query.msg){
this.msg=JSON.parse(this.$route.query.msg);
}
this.getList();
},
mounted(){ mounted(){
}, },
methods:{ methods:{
getList(){ getList(){
this.apiJavaPost("/api/erp/survey/getSuggest", this.msg, res => {
if (res.data.resultCode === 1) {
this.SuggestList=res.data.data.pageData;
this.total=res.data.data.count;
} else {
this.Error(res.data.message)
}
}, null);
}, },
goUrl(path){ goUrl(path){
this.$router.push({ name:path,query:{blank: 'y'} }) this.$router.push({ name:path,query:{blank: 'y'} })
...@@ -75,7 +90,7 @@ export default { ...@@ -75,7 +90,7 @@ export default {
#Usersuggest .el-pagination{ #Usersuggest .el-pagination{
border-top:none!important; border-top:none!important;
} }
#Usersuggest .people li{ #Usersuggest .people .ul li{
padding:15px 0; padding:15px 0;
border-bottom: 1px dashed #DCDCDC; border-bottom: 1px dashed #DCDCDC;
display: flex; display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment