Commit 93655a7d authored by huangyuanyuan's avatar huangyuanyuan

update

parent d6048ce2
This diff is collapsed.
<template>
<div class="Feedback">
<ul style="overflow: initial!important">
<li>
<span>
<em>线路</em>
</span>
<el-select filterable v-model="msg.CreateBy" @change="getLineTeamList(msg.LineId)">
<el-option label="不限" value='-1'></el-option>
<el-option v-for="item in LineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'></el-option>
</el-select>
</li>
<li>
<span>
<em>系列</em>
</span>
<el-select filterable v-model="msg.CreateBy">
<el-option label="不限" value='-1'></el-option>
<el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'>
</el-option>
</el-select>
</li>
<li>
<span>
<em>只看有评分</em>
</span>
<el-select filterable class='multiple_input' v-model='msg.Brand' :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" :value="-1"></el-option>
<el-option label="是" :value="-1"></el-option>
<el-option label="否" :value="-1"></el-option>
</el-select>
</li>
<li>
<span>
<em>发团时间</em>
</span>
<el-date-picker
value-format="yyyy-mm-dd"
size="small"
v-model="dateList"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</li>
<li>
<input
type="button"
class="hollowFixedBtn"
value="查询"
@click="resetPageIndex(),getList()"
>
<el-button @click="goUrl" type="danger" style="border-radius:14px;margin-left:8px" size="small">旅客反馈分析</el-button>
</li>
</ul>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>发团日期</th>
<th>团号</th>
<th>整体评分</th>
<th v-for="(item,i) in fields" :key="i">{{item}}</th>
<th>操作</th>
</tr>
<tr v-for="(item,i) in dataList" :key="i">
<td>{{item.start}}</td>
<td>没有字段({{item.tcid}})</td>
<td>
{{(item.sumScore/fields.length).toFixed(1)}}
</td>
<td v-for="(c,childIndex) in fields" :key="childIndex">{{item[c]?item[c]:0}}</td>
<td>
<span style="cursor:pointer" @click="chaKan(item)">明细</span>
</td>
</tr>
<tr v-if="dataList.length==0">
<td colspan="10" align="center">暂无数据</td>
</tr>
</table>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="msg.pageSize"
:total="total"
></el-pagination>
</div>
</template>
<script>
export default {
name: 'Feedback',
data (){
return{
dataList:[],
loading:false,
msg:{
pageSize:10,
pageIndex:1,
},
total:0,
currentPage:1,
dateList:[],
LineList:[],
LineTeamList:[],
fields:[]
}
},
mounted(){
this.getLineList();
this.getList();
},
methods:{
chaKan(item){
console.log("item",item)
this.$router.push({ name:'investigationList',query:{"TCID":item.tcid,blank: 'y'} })
},
goUrl(){
this.$router.push({ name:'FeedbackChart',query:{"customerId":1,blank: 'y'} })
},
getLineList() {
this.apipost("line_post_GetAllList_V2", {LineDirection: 0}, res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
});
},
//获取系列列表
getLineTeamList(lineId) {
this.LineTeamList = []
this.apipost("team_post_GetList", {
lineID: lineId,
isTOOP: 1
}, res => {
if (res.data.resultCode == 1) {
this.LineTeamList = res.data.data;
}
});
},
getList(){
if(this.dateList){
this.msg.startDate=this.dateList[0];
this.msg.endDate=this.dateList[1];
}else{
this.msg.startDate="";
this.msg.endDate="";
}
this.apiJavaPost("/api/erp/survey//getSurveyList", this.msg, res => {
// this.loading = false;
console.log(res);
if (res.data.resultCode === 1) {
let arrays=[]
res.data.data.pageData.forEach(x => {
let isHave=false
if(this.fields.indexOf(x.title)==-1){
this.fields.push(x.title)
}
if(arrays.length>0){
arrays.forEach(y=>{
if(y.tcid==x.tCID){
y[x.title]=x.scoreNum
y.sumScore+=x.scoreNum
isHave=true
return false
}
})
}
if(!isHave){
let obj={
tcid:x.tCID,
start:x.startDate.split('T')[0],
sumScore:x.scoreNum
}
obj[x.title]=x.scoreNum
arrays.push(obj)
}
});
this.dataList=arrays;
this.total=this.dataList.length;
console.log(this.dataList,'datalist');
} else {
this.Error(res.data.message)
}
}, null);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
}
}
</script>
<style scoped>
.Feedback ul>li{
display: inline-block;
font-size: 12px;
color: #666;
margin: 20px 30px 0px 0;
}
.Feedback .singeRowTable{
margin-top: 20px;
}
</style>
<template>
<div id="Usersuggest">
<div style="margin:0 auto;width:1200px">
<div style="font-size:14px;color:#666666;margin:10px 0">
<span @click="goUrl('FeedbackChart')" style="cursor:pointer">旅客反馈数据分析 > </span>
<span style="color:#3751FE">用户建议</span>
</div>
<div class="people">
<p>
<span>用户建议</span>
<span style="float:right;font-size:12px;color:#333333">查看全部</span>
</p>
<ul>
<li>
<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>
</div>
</li>
</ul>
<div>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="msg.pageSize"
:total="total"
></el-pagination>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Feedbackchart',
data (){
return{
msg:{
pageIndex:1,
pageSize:15
},
currentPage:1,
total:0,
}
},
mounted(){
},
methods:{
getList(){
},
goUrl(path){
this.$router.push({ name:path,query:{blank: 'y'} })
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
}
}
</script>
<style>
#Usersuggest .el-pagination{
border-top:none!important;
}
#Usersuggest .people li{
padding:15px 0;
border-bottom: 1px dashed #DCDCDC;
display: flex;
align-items: center;
}
#Usersuggest .people .Item{
font-size: 12px;
display: inline-block;
margin-left:10px;
width:90%;
}
#Usersuggest .people{
background:rgba(255,255,255,1);
border:2px solid rgba(235, 237, 244, 1);
border-radius:8px;
margin-top: 20px;
padding: 30px;
box-sizing: border-box;
}
</style>
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