Commit ed0ab59e authored by 黄奎's avatar 黄奎
parents cf59425e 1b4b08cb
......@@ -3,26 +3,25 @@
<div class="Feedbackchart">
<div style="margin:0 auto;width:1200px">
<div style="font-size:14px;color:#666666;margin:10px 0">
<span>线路:不限</span>
<span>系列:不限</span>
<span>发团日期:2019-08-05至2019-05-20</span>
<span>线路:{{msg.lineName}}</span>
<span>系列:{{msg.LineteamName}}</span>
<span>发团日期:
<span v-if="msg.reStartDate!=''">{{msg.reStartDate}} - {{msg.reEndDate}}</span>
<span v-else>不限</span>
</span>
</div>
<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="">
<p class="num">4.55</p>
<p style="font-size:14px;color:#666666;">整体评分</p>
</div>
<div class="Item">
<img src="../../../assets/img/fk/2.png" alt="">
<p class="num">4.55</p>
<p style="font-size:14px;color:#666666;">住宿安排</p>
<p class="num">{{ScoreJson[index]}}</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 v-show="index!='整体评分'" v-for="(item,index) in ScoreJson" class="Item">
<img src="../../../assets/img/fk/1.png" alt="">
<p class="num">{{ScoreJson[index]}}</p>
<p style="font-size:14px;color:#666666;">{{index}}</p>
</div>
</div>
<div class="pieChart" style="width:100%">
<div>
......@@ -47,13 +46,16 @@
<span @click="goUrl('Usersuggest')" style="float:right;font-size:12px;color:#333333;cursor:pointer">查看全部</span>
</p>
<ul>
<li>
<li v-for="(item,index) in SuggestList" :key="index">
<img style="width:40px;height:40px" src="../../../assets/img/fk/8.png" alt="">
<div class="Item">
<p style="color:#3751FE">156456</p>
<p>henbucooasd</p>
<p style="color:#3751FE">{{item.GuestId}}</p>
<p>{{item.TextContent}}</p>
</div>
</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>
</div>
</div>
......@@ -68,16 +70,116 @@ export default {
data (){
return{
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(){
this.creatChart1();
this.creatChart2();
this.creatChart3();
},
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){
this.$router.push({ name:path,query:{blank: 'y'} })
this.$router.push({ name:path,query:{"msg":JSON.stringify(this.msg),blank: 'y'} })
},
creatChart1() {
let myChart = this.$echarts.init(document.getElementById("chart1"));
......@@ -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 {
}
}
},
data: [{"name":"测试1","value":20},{"name":"测试2","value":20},{"name":"测试3","value":20},]
data:this.priorityList
}
]
};
......@@ -248,32 +350,7 @@ export default {
type: 'category',
data: ['目的地']
},
series: [
{
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]
}
]
series: this.destinationList
};
myChart.setOption(option);
......@@ -342,7 +419,7 @@ export default {
}
.bannerList .Item{
display: inline-flex;
width:154px;
width:150px;
height:174px;
background:rgba(255,255,255,1);
border:2px solid rgba(235, 237, 244, 1);
......@@ -351,7 +428,8 @@ export default {
justify-content: center;
flex-direction: column;
margin-right: 20px;
box-sizing: border-box
box-sizing: border-box;
margin-bottom:20px;
}
.zhanbitu{
......
......@@ -7,18 +7,18 @@
<span>
<em>线路</em>
</span>
<el-select filterable v-model="msg.lineID" @change="getLineTeamList(msg.lineID)">
<el-option label="不限" :value='0'></el-option>
<el-option v-for="item in LineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'></el-option>
<el-select filterable v-model="obj.LineID" value-key="LineID" @change="getLineTeamList">
<el-option label="不限" :value='{LineName:"不限",LineID:0}'></el-option>
<el-option v-for="item in LineList" :label='item.LineName' :value='item' :key='item.LineID'></el-option>
</el-select>
</li>
<li>
<span>
<em>系列</em>
</span>
<el-select filterable v-model="msg.LineteamId">
<el-option label="不限" :value='0'></el-option>
<el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'>
<el-select filterable v-model="obj.LineteamId" value-key="LtID" @change="getLineLtID">
<el-option label="不限" :value='{LtName:"不限",LtID:0}'></el-option>
<el-option v-for="item in LineTeamList" :label='item.LtName' :value='item' :key='item.LtID'>
</el-option>
</el-select>
</li>
......@@ -37,7 +37,8 @@
<em>发团时间</em>
</span>
<el-date-picker
value-format="yyyy-mm-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerDisabled"
size="small"
v-model="dateList"
type="daterange"
......@@ -68,7 +69,9 @@
<td>{{item.start}}</td>
<td>{{item.tCNUM}}</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 v-for="(c,childIndex) in fields" :key="childIndex">{{item[c]?item[c]:0}}</td>
......@@ -92,11 +95,12 @@
</template>
<script>
import moment from "moment"
export default {
name: 'Feedback',
data (){
return{
obj:{},
dataList:[],
loading:false,
msg:{
......@@ -106,14 +110,22 @@ export default {
LineteamId:0,
reStartDate:'',
reEndDate:'',
isScore:0
isScore:0,
lineName:"不限",
LineteamName:"不限",
},
total:0,
currentPage:1,
dateList:[],
LineList:[],
LineTeamList:[],
fields:[]
fields:[],
pickerDisabled: { //验证时间范围
disabledDate:(time)=>{
let _now = Date.now();
return time.getTime() > _now ;
}
}
}
},
mounted(){
......@@ -125,7 +137,7 @@ export default {
this.$router.push({ name:'investigationList',query:{"TCID":item.tcid,blank: 'y'} })
},
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() {
this.apipost("line_post_GetAllList_V2", {LineDirection: 0}, res => {
......@@ -134,8 +146,15 @@ export default {
}
});
},
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.apipost("team_post_GetList", {
lineID: lineId,
......@@ -149,20 +168,32 @@ export default {
getList(){
if(this.dateList){
if(this.dateList && this.dateList.length>0){
this.msg.reStartDate=this.dateList[0];
this.msg.reEndDate=this.dateList[1];
//计算相差多少天 day可以是second minute
let m1=moment(this.msg.reStartDate)
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.apiJavaPost("/api/erp/survey//getSurveyList", this.msg, res => {
this.loading = false;
if (res.data.resultCode === 1) {
let arrays=[]
let arrays=[];
console.log("res.data.data.pageData",res.data.data)
res.data.data.pageData.forEach(x => {
let isHave=false
if(x.tCID!=0 || x.tCID || x.tCID!=''){
if(this.fields.indexOf(x.title)==-1&&x.title!=''){
this.fields.push(x.title)
}
......@@ -179,16 +210,23 @@ export default {
if(!isHave){
let obj={
tcid:x.tCID,
start:x.startDate.split('T')[0],
start:"",
sumScore:x.scoreNum,
tCNUM:x.tCNUM
}
if(x.startDate){
obj.start=x.startDate.split('T')[0]
}
obj[x.title]=x.scoreNum
arrays.push(obj)
}
}
});
this.dataList=arrays;
console.log("this.dataList",this.dataList)
this.total=this.dataList.length;
} else {
this.Error(res.data.message)
......
......@@ -10,16 +10,19 @@
<div class="people">
<p>
<span>用户建议</span>
<span style="float:right;font-size:12px;color:#333333">查看全部</span>
<!-- <span style="float:right;font-size:12px;color:#333333">查看全部</span> -->
</p>
<ul>
<li>
<ul class="ul">
<li v-for="(item,index) in SuggestList" :key="index">
<img style="width:40px;height:40px" src="../../../assets/img/fk/8.png" alt="">
<div class="Item">
<p style="color:#3751FE">156456</p>
<p>henbucooasd</p>
<p style="color:#3751FE">{{item.GuestId}}</p>
<p>{{item.TextContent}}</p>
</div>
</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>
<div>
<el-pagination
......@@ -45,20 +48,32 @@ export default {
name: 'Feedbackchart',
data (){
return{
msg:{
pageIndex:1,
pageSize:15
},
msg:{},
currentPage:1,
total:0,
SuggestList:[],
}
},
created(){
if(this.$route.query.msg){
this.msg=JSON.parse(this.$route.query.msg);
}
this.getList();
},
mounted(){
},
methods:{
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){
this.$router.push({ name:path,query:{blank: 'y'} })
......@@ -75,7 +90,7 @@ export default {
#Usersuggest .el-pagination{
border-top:none!important;
}
#Usersuggest .people li{
#Usersuggest .people .ul li{
padding:15px 0;
border-bottom: 1px dashed #DCDCDC;
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