|
@@ -51,28 +51,30 @@
|
|
|
<el-input
|
|
|
placeholder="请输入内容"
|
|
|
v-model="input"
|
|
|
+ @input="Inquireclick()"
|
|
|
clearable>
|
|
|
</el-input>
|
|
|
- <el-button type="primary"><i class="icon-sousuo"></i></el-button>
|
|
|
+ <!-- <el-button type="primary"><i class="icon-sousuo"></i></el-button> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<template>
|
|
|
<el-table
|
|
|
- :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
|
|
|
+ :data="groupDatas.slice((currentPage-1)*pageSize,currentPage*pageSize)"
|
|
|
border
|
|
|
style="width: 100%">
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="teamName"
|
|
|
label="团组名"
|
|
|
- width="220">
|
|
|
+ width="350">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="name"
|
|
|
+ prop="clientUnit"
|
|
|
label="团组单位">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- width="260"
|
|
|
- prop="address"
|
|
|
+ width="120"
|
|
|
+ prop="visitDate"
|
|
|
+ :formatter="filteryear"
|
|
|
label="出访时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column width="80" label="管控">
|
|
@@ -90,7 +92,7 @@
|
|
|
:page-sizes="[8,10,15,20]"
|
|
|
:page-size="pageSize"
|
|
|
layout="total, sizes, prev, pager, next"
|
|
|
- :total="tableData.length">
|
|
|
+ :total="groupDatas.length">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -151,7 +153,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- tableData: [
|
|
|
+ groupData: [
|
|
|
{
|
|
|
date: '2016-05-03',
|
|
|
name: '王小虎',
|
|
@@ -238,6 +240,7 @@ export default {
|
|
|
address: '上海市普陀区金沙江路 1518 弄'
|
|
|
}
|
|
|
],
|
|
|
+ groupDatas:[],
|
|
|
currentPage: 1, // 当前页码
|
|
|
pageSize: 8 ,// 每页的数据条数
|
|
|
//日程数据
|
|
@@ -344,9 +347,94 @@ export default {
|
|
|
},
|
|
|
handleDateClick(inif){
|
|
|
// console.log(info)
|
|
|
- }
|
|
|
+ },
|
|
|
+ Grouplist(){
|
|
|
+ var url="/api/Groups/GetGroupList"
|
|
|
+ var that=this
|
|
|
+ that.fullscreenLoading = true;
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url:url,
|
|
|
+ headers:{
|
|
|
+ Authorization:'Bearer '+this.token
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ portType: 1,
|
|
|
+ }
|
|
|
+ }).then(function(res){
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.groupData=res.data.data
|
|
|
+ that.groupData.forEach(item=>{
|
|
|
+ if(item.clientName==null){
|
|
|
+ item.clientName = ''
|
|
|
+ }
|
|
|
+ if(item.clientUnit==null){
|
|
|
+ item.clientUnit = ''
|
|
|
+ }
|
|
|
+ if(item.id==null){
|
|
|
+ item.id = ''
|
|
|
+ }
|
|
|
+ if(item.isSure==null){
|
|
|
+ item.isSure = ''
|
|
|
+ }
|
|
|
+ if(item.jietuanOperator==null){
|
|
|
+ item.jietuanOperator = ''
|
|
|
+ }
|
|
|
+ if(item.salesQuoteNo==null){
|
|
|
+ item.salesQuoteNo = ''
|
|
|
+ }
|
|
|
+ if(item.teamName==null){
|
|
|
+ item.teamName = ''
|
|
|
+ }
|
|
|
+ if(item.teamType==null){
|
|
|
+ item.teamType = ''
|
|
|
+ }
|
|
|
+ if(item.tourCode==null){
|
|
|
+ item.tourCode = ''
|
|
|
+ }
|
|
|
+ if(item.visitDate==null){
|
|
|
+ item.visitDate = ''
|
|
|
+ }
|
|
|
+ if(item.visitDays==null){
|
|
|
+ item.visitDays = ''
|
|
|
+ }
|
|
|
+ if(item.visitPNumber==null){
|
|
|
+ item.visitPNumber = ''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ that.groupDatas=that.groupData;
|
|
|
+ console.log(that.groupData)
|
|
|
+ that.fullscreenLoading = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ Inquireclick() {
|
|
|
+ var newarr = [];
|
|
|
+ if (this.input == "") {
|
|
|
+ newarr = this.groupData;
|
|
|
+ } else {
|
|
|
+ for (var i = 0; i < this.groupData.length; i++) {
|
|
|
+ if (this.groupData[i].teamName.indexOf(this.input) != -1) {
|
|
|
+ newarr.push(this.groupData[i]);
|
|
|
+ }
|
|
|
+ else if (this.groupData[i].clientUnit.indexOf(this.input) != -1) {
|
|
|
+ newarr.push(this.groupData[i]);
|
|
|
+ }
|
|
|
+ else if (this.groupData[i].visitDate.indexOf(this.input) != -1) {
|
|
|
+ newarr.push(this.groupData[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.groupDatas = newarr;
|
|
|
+ this.currentPage = 1;
|
|
|
+ },
|
|
|
+ filteryear(val){
|
|
|
+ let gstime=val.visitDate.split(' ')[0]
|
|
|
+ return gstime;
|
|
|
+ },
|
|
|
},
|
|
|
mounted(){
|
|
|
+ this.Grouplist()
|
|
|
// this.calendarOptions.events.push({
|
|
|
// color: '#ff9900',
|
|
|
// title: "kljkl",
|