liuhj месяцев назад: 5
Родитель
Сommit
3ddfe98261
1 измененных файлов с 29 добавлено и 4 удалено
  1. 29 4
      src/components/statistics/Statistically.vue

+ 29 - 4
src/components/statistics/Statistically.vue

@@ -20,6 +20,18 @@
                     </div>
                 </el-tab-pane>
                 <el-tab-pane label="团组预算/实际成本" name="fourth">
+                    <div class="Search-yscb">
+                        <div class="Search-yscb-ul">
+                            <label>团组名称</label>
+                            <el-input
+                            size="small "
+                            placeholder="请输入内容"
+                            v-model="input"
+                            clearable>
+                            </el-input>
+                            <el-button @click="StatisticsGroupCost" size="small " type="primary">查询</el-button>
+                        </div>
+                    </div>
                     <div class="fourth-table">
                         <el-table
                             :data="fourthData"
@@ -425,6 +437,7 @@ export default {
             fourthcurrentPage:1,
             fourthPagesize:10,
             fourthtotal:0,
+            input:'',
         }
     }, 
     methods: {
@@ -468,6 +481,7 @@ export default {
                 this.StatisticsAirTicket()
             } 
             if (this.activeName=='fourth') {
+                this.input='';
                 this.StatisticsGroupCost()
             }
             // console.log(tab, event);
@@ -541,8 +555,6 @@ export default {
                 legend: {},
                 tooltip: {
                     formatter:function(params){
-                        console.log(params);
-                        
                         var html=params.data[0]+"预订总次数:"+params.data[1]+"次<br/>"
                         for(let i=0;i<params.data[2].length;i++){
                             html += '团组名称:'+params.data[2][i].groupName+'&nbsp;&nbsp;&nbsp;次数:'+params.data[2][i].total+",<br/>";
@@ -558,10 +570,10 @@ export default {
                     type: 'category',
                     axisLabel:  {
                         formatter:function(value){
+                            value = value.replace(/\s/g,"");
                             return value.split("").join("\n");
                         } ,
                     },
-
                  },
                  grid:{
                         left: '1%',
@@ -703,7 +715,7 @@ export default {
                     pageIndex:that.fourthcurrentPage,
                     pageSize:that.fourthPagesize,
                     year:that.getdate(that.year),
-                    search:"",
+                    search:that.input,
                 }
             }).then(function (res) {
                 if(res.data.code==200){
@@ -853,6 +865,7 @@ export default {
                 this.countrieschange(this.value);
             }
             if (this.activeName=='fourth') {
+                this.input='';
                 this.StatisticsGroupCost()
             }
             // this.businessincome=[];
@@ -1386,4 +1399,16 @@ export default {
     margin-top: 10px;
     text-align: center;
 }
+.Search-yscb-ul{
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+}
+.Search-yscb-ul label{
+    width: 70px;
+}
+.Search-yscb-ul .el-input{
+    width: 200px;
+    margin-right: 10px;
+}
 </style>