Statistically.vue 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452
  1. <template>
  2. <div v-loading.fullscreen.lock="fullscreenLoading">
  3. <div class="statistically-all">
  4. <div class="yeardate">
  5. <el-date-picker
  6. value-format="yyyy-MM-dd"
  7. @change="yearchange"
  8. style="width:200px;"
  9. v-model="year"
  10. type="year"
  11. placeholder="选择年">
  12. </el-date-picker>
  13. </div>
  14. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  15. <el-tab-pane label="营业额、成本支出、毛利润" name="first">
  16. <div class="canvas-box">
  17. <div id="statisticallyone" style="width: 100%;height:400px;"></div>
  18. <div id="grossmargins" style="width: 100%;height:400px;"></div>
  19. <div id="grossmargin" style="width: 100%;height:400px;"></div>
  20. </div>
  21. </el-tab-pane>
  22. <el-tab-pane label="团组预算/实际成本" name="fourth">
  23. <div class="Search-yscb">
  24. <div class="Search-yscb-ul">
  25. <label>团组名称:</label>
  26. <el-input
  27. size="small "
  28. placeholder="请输入内容"
  29. v-model="input"
  30. clearable>
  31. </el-input>
  32. <el-button @click="StatisticsGroupCost" size="small " type="primary">查询</el-button>
  33. </div>
  34. </div>
  35. <div class="fourth-table">
  36. <el-table
  37. :data="fourthData"
  38. border
  39. style="width: 100%">
  40. <el-table-column
  41. prop="rowNumber"
  42. label="序号"
  43. width="50">
  44. </el-table-column>
  45. <el-table-column
  46. prop="groupName"
  47. label="团组名">
  48. </el-table-column>
  49. <el-table-column
  50. prop="clientUnit"
  51. label="客户单位">
  52. </el-table-column>
  53. <el-table-column
  54. prop="visitDate"
  55. label="出访日期"
  56. width="110">
  57. <template slot-scope="scope">
  58. {{ cltade(scope.row.visitDate) }}
  59. </template>
  60. </el-table-column>
  61. <el-table-column
  62. prop="visitDays"
  63. label="天数"
  64. width="50">
  65. </el-table-column>
  66. <el-table-column
  67. prop="visitPNumber"
  68. label="人数"
  69. width="50">
  70. </el-table-column>
  71. <el-table-column
  72. prop="budgetAmount"
  73. label="团组预算"
  74. width="120">
  75. <template slot-scope="scope">
  76. {{ townum(scope.row.budgetAmount) }}
  77. </template>
  78. </el-table-column>
  79. <el-table-column
  80. prop="realityAmount"
  81. label="团组实际成本"
  82. width="120">
  83. <template slot-scope="scope">
  84. {{ townum(scope.row.realityAmount) }}
  85. </template>
  86. </el-table-column>
  87. <el-table-column
  88. prop="excessAmount"
  89. label="实际比预算超出金额"
  90. width="160">
  91. <template slot-scope="scope">
  92. {{ townum(scope.row.excessAmount) }}
  93. </template>
  94. </el-table-column>
  95. <el-table-column
  96. prop="excessPercentage"
  97. label="实际比预算超出百分比"
  98. width="180">
  99. </el-table-column>
  100. <el-table-column
  101. label="详细"
  102. width="100">
  103. <template slot-scope="scope">
  104. <el-popover
  105. placement="left"
  106. width="1000"
  107. trigger="hover">
  108. <el-table
  109. height="600"
  110. :data="scope.row.details"
  111. border
  112. style="width: 100%;font-size:12px">
  113. <el-table-column
  114. prop="module"
  115. label="模块"
  116. width="100">
  117. </el-table-column>
  118. <el-table-column
  119. prop="budgetAmountDesc"
  120. label="该模块预算"
  121. width="350">
  122. </el-table-column>
  123. <el-table-column
  124. prop="realityAmountDesc"
  125. label="实际费用的金额 ">
  126. </el-table-column>
  127. </el-table>
  128. <span style="cursor: pointer;color: #48a2ff;" slot="reference" type="text">移上查看</span>
  129. </el-popover>
  130. </template>
  131. </el-table-column>
  132. </el-table>
  133. <div class="block">
  134. <el-pagination
  135. @size-change="handleSizeChange"
  136. @current-change="handleCurrentChange"
  137. :current-page="fourthcurrentPage"
  138. :page-sizes="[5, 10, 20, 30]"
  139. :page-size="fourthPagesize"
  140. layout="total, sizes, prev, pager, next, jumper"
  141. :total="fourthtotal">
  142. </el-pagination>
  143. </div>
  144. </div>
  145. </el-tab-pane>
  146. <el-tab-pane label="国交数据统计" name="second">
  147. <el-select style="width:200px; margin-bottom: 10px;" @change="countrieschange" v-model="value" filterable placeholder="请选择">
  148. <el-option
  149. v-for="item in options"
  150. :key="item.value"
  151. :label="item.label"
  152. :value="item.value">
  153. </el-option>
  154. </el-select>
  155. <div class="canvas-box">
  156. <div v-if="value==7" style="width: 100%;">
  157. <div id="teamCooperationbox" style="width: 100%;height:400px;"></div>
  158. <div style="display: flex;justify-content: space-between;">
  159. <div id="groupnumbox" style="width: 50%;height:400px;"></div>
  160. <div id="customersNumberbox" style="width: 50%;height:400px;"></div>
  161. </div>
  162. <div id="scaleDrawingbox" style="width: 50%;height:400px;"></div>
  163. </div>
  164. <div v-else-if="value==1" style="width: 100%;">
  165. <div id="grossmarginss" style="width: 100%;height:400px;"></div>
  166. <div id="Airticketcitybox" style="width: 100%;height:400px;"></div>
  167. <div id="AirPredeterminedPlatform" style="width: 100%;height:700px;"></div>
  168. </div>
  169. <div v-else-if="value==2" style="width: 100%;">
  170. <div id="hoteltopten" style="width: 100%;height:400px;"></div>
  171. <div id="hotelPredeterminedPlatform" style="width: 100%;height:400px;"></div>
  172. </div>
  173. <div v-else-if="value==5" style="width: 100%;">
  174. <div id="invitationtopten" style="width: 100%;height:400px;"></div>
  175. </div>
  176. <div v-else-if="value==3" style="width: 100%;text-align: center;">
  177. <div class="tabletitle">年记录</div>
  178. <div class="yeartableul">
  179. <div class="yeartableli">
  180. <div>年份</div>
  181. <div>{{TimeProcessingriY(year)}}</div>
  182. <div>{{(TimeProcessingriY(year))-1}}</div>
  183. </div>
  184. <div class="yeartableli" v-for="(item,index) in tableData" :key="index">
  185. <div>{{item.feeName}}</div>
  186. <el-popover
  187. placement="top"
  188. width="600"
  189. trigger="hover">
  190. <!-- <div>
  191. <div>{{TimeProcessingriY(year)}}年/{{TimeProcessingriY(year)-1}}年{{item.monthName}}{{items.feeName}}增长率:{{items.currPeriodFee}}/{{items.samePeriodFee}}({{items.yoy}} %)</div>
  192. </div> -->
  193. <div class="device_err">
  194. <el-table size="small" :header-cell-style="{color: '#555',fontSize: '14px', backgroundColor: '#f0f9ff'}" border :data="item.subFeeData">
  195. <el-table-column type="expand">
  196. <div class="device_err" slot-scope="props">
  197. <el-table
  198. size="small"
  199. height="205"
  200. :header-cell-style="{color: '#555',fontSize: '14px', backgroundColor: '#f0f9ff'}"
  201. border
  202. :data="props.row.cityData"
  203. style="width: 100%">
  204. <el-table-column
  205. prop="cityName"
  206. label="城市"
  207. width="100">
  208. </el-table-column>
  209. <el-table-column
  210. label="本年费用"
  211. width="150">
  212. <template slot-scope="props">
  213. {{townum(props.row.currPeriodFee)}}
  214. </template>
  215. </el-table-column>
  216. <el-table-column
  217. width="150"
  218. label="前一年费用">
  219. <template slot-scope="props">
  220. {{townum(props.row.samePeriodFee)}}
  221. </template>
  222. </el-table-column>
  223. <el-table-column property="yoy" label="增长率">
  224. <template slot-scope="props">
  225. {{props.row.yoy}} %
  226. </template>
  227. </el-table-column>
  228. </el-table>
  229. </div>
  230. </el-table-column>
  231. <el-table-column width="150" property="feeName" label="类型"></el-table-column>
  232. <el-table-column width="150" property="currPeriodFee" label="本年费用">
  233. <template slot-scope="props">
  234. {{townum(props.row.currPeriodFee)}}
  235. </template>
  236. </el-table-column>
  237. <el-table-column width="150" property="samePeriodFee" label="前一年费用">
  238. <template slot-scope="props">
  239. {{townum(props.row.samePeriodFee)}}
  240. </template>
  241. </el-table-column>
  242. <el-table-column width="99" property="yoy" label="增长率">
  243. <template slot-scope="props">
  244. {{props.row.yoy}} %
  245. </template>
  246. </el-table-column>
  247. </el-table>
  248. </div>
  249. <div class="hourbox" style="cursor: pointer;" slot="reference">{{townum(item.currPeriodFee)}}</div>
  250. </el-popover>
  251. <!-- <div></div> -->
  252. <div>{{townum(item.samePeriodFee)}}</div>
  253. </div>
  254. </div>
  255. <div class="tabletitle">月记录</div>
  256. <div class="monthtableul">
  257. <div class="monthtableli">
  258. <div class="monthtablebox" v-for="(item,index) in tableheader" :key="index">{{item}}</div>
  259. </div>
  260. <div class="monthtableli" v-for="(item,index) in tableDatamonth" :key="index">
  261. <!-- <div class="monthtablebox" v-for="(item,index) in tableheader" :key="index">{{item}}</div> -->
  262. <div class="monthtablebox">{{item.monthName}}</div>
  263. <div class="monthtablebox" v-for="(items,index) in item.feeDatas" :key="index">
  264. <el-popover
  265. placement="top"
  266. width="600"
  267. trigger="hover">
  268. <div>
  269. <div>{{TimeProcessingriY(year)}}年/{{TimeProcessingriY(year)-1}}年{{item.monthName}}{{items.feeName}}增长率:{{items.currPeriodFee}}/{{items.samePeriodFee}}({{items.yoy}} %)</div>
  270. </div>
  271. <div class="device_err">
  272. <el-table size="small" :header-cell-style="{color: '#555',fontSize: '14px', backgroundColor: '#f0f9ff'}" border :data="items.subFeeData">
  273. <el-table-column type="expand">
  274. <div class="device_err" slot-scope="props">
  275. <el-table
  276. size="small"
  277. height="205"
  278. :header-cell-style="{color: '#555',fontSize: '14px', backgroundColor: '#f0f9ff'}"
  279. border
  280. :data="props.row.cityData"
  281. style="width: 100%">
  282. <el-table-column
  283. prop="cityName"
  284. label="城市"
  285. width="100">
  286. </el-table-column>
  287. <el-table-column
  288. label="本年费用"
  289. width="150">
  290. <template slot-scope="props">
  291. {{townum(props.row.currPeriodFee)}}
  292. </template>
  293. </el-table-column>
  294. <el-table-column
  295. width="150"
  296. label="前一年费用">
  297. <template slot-scope="props">
  298. {{townum(props.row.samePeriodFee)}}
  299. </template>
  300. </el-table-column>
  301. <el-table-column property="yoy" label="增长率">
  302. <template slot-scope="props">
  303. {{props.row.yoy}} %
  304. </template>
  305. </el-table-column>
  306. </el-table>
  307. </div>
  308. </el-table-column>
  309. <el-table-column width="150" property="feeName" label="类型"></el-table-column>
  310. <el-table-column width="150" property="currPeriodFee" label="本年费用">
  311. <template slot-scope="props">
  312. {{townum(props.row.currPeriodFee)}}
  313. </template>
  314. </el-table-column>
  315. <el-table-column width="150" property="samePeriodFee" label="前一年费用">
  316. <template slot-scope="props">
  317. {{townum(props.row.samePeriodFee)}}
  318. </template>
  319. </el-table-column>
  320. <el-table-column width="99" property="yoy" label="增长率">
  321. <template slot-scope="props">
  322. {{props.row.yoy}} %
  323. </template>
  324. </el-table-column>
  325. </el-table>
  326. </div>
  327. <span style="cursor: pointer;" slot="reference">{{items.currPeriodFee}}/{{items.samePeriodFee}}({{items.yoy}} %)</span>
  328. </el-popover>
  329. </div>
  330. </div>
  331. </div>
  332. <!-- <el-table
  333. :data="tableData"
  334. border
  335. style="width: 100%">
  336. <el-table-column
  337. prop="date"
  338. label="日期"
  339. width="180">
  340. </el-table-column>
  341. <el-table-column
  342. prop="name"
  343. label="姓名"
  344. width="180">
  345. </el-table-column>
  346. <el-table-column
  347. prop="address"
  348. label="地址">
  349. </el-table-column>
  350. </el-table> -->
  351. </div>
  352. </div>
  353. </el-tab-pane>
  354. <el-tab-pane label="地图" name="fifth">
  355. <div id="map" style="width:100%; height: 800px;"></div>
  356. </el-tab-pane>
  357. <!-- <el-tab-pane label="会务数据统计" name="third">会务数据统计</el-tab-pane> -->
  358. </el-tabs>
  359. </div>
  360. </div>
  361. </template>
  362. <script>
  363. import { getToken } from 'mapkit-token';
  364. import * as echarts from 'echarts';
  365. export default {
  366. data () {
  367. return {
  368. fullscreenLoading:false,
  369. year:new Date(),
  370. businessincome:[],
  371. Grossprofit:[],
  372. costing:[],
  373. Airticketnum:[],
  374. Airticketcity:[],
  375. AirticketPredetermined:[],
  376. Hoteltop:[],
  377. hotelPredetermined:[],
  378. invitationtop:[],
  379. teamCooperation:[],
  380. groupnum:[],
  381. customersNumber:[],
  382. scaleDrawing:[],
  383. aaa:[
  384. ['product', '去年销售额', '今年销售额'],
  385. ['1月', 43.3, 85.8],
  386. ['2月', 83.1, 73.4],
  387. ['3月', 86.4, 65.2],
  388. ['4月', 72.4, 53.9],
  389. ['5月', 72.4, 53.9],
  390. ['6月', 72.4, 53.9],
  391. ['7月', 72.4, 53.9],
  392. ['8月', 72.4, 53.9],
  393. ['9月', 72.4, 53.9],
  394. ['10月', 72.4, 53.9],
  395. ['11月', 72.4, 53.9],
  396. ['12月', 72.4, 53.9],
  397. ],
  398. bbb:[
  399. ['product', '毛利率',],
  400. ['1月', 43.3,],
  401. ['2月', 83.1,],
  402. ['3月', 86.4,],
  403. ['4月', 72.4,],
  404. ['5月', 72.4,],
  405. ['6月', 72.4,],
  406. ['7月', 72.4,],
  407. ['8月', 72.4,],
  408. ['9月', 72.4,],
  409. ['10月', 72.4,],
  410. ['11月', 72.4,],
  411. ['12月', 72.4,],
  412. ],
  413. activeName: 'first',
  414. options: [{
  415. value: 1,
  416. label: '机票'
  417. }, {
  418. value: 2,
  419. label: '酒店'
  420. }, {
  421. value: 3,
  422. label: 'OP'
  423. }, {
  424. value: 4,
  425. label: '签证'
  426. }, {
  427. value: 5,
  428. label: '商邀'
  429. }, {
  430. value: 7,
  431. label: '团组数据'
  432. }],
  433. value: 1,
  434. tableData:[],
  435. tableDatamonth:[],
  436. tableheader:['月份','车费','导游费','司机费','小费','接送机费','餐费','住补费','景点费','翻译费','饮料/零食/水果费','其他费用'],
  437. fourthData:[],
  438. fourthcurrentPage:1,
  439. fourthPagesize:10,
  440. fourthtotal:0,
  441. input:'',
  442. map:null
  443. }
  444. },
  445. methods: {
  446. handleSizeChange(val) {
  447. this.fourthcurrentPage = 1;
  448. this.fourthPagesize = val;
  449. this.StatisticsGroupCost();
  450. },
  451. handleCurrentChange(val) {
  452. this.fourthcurrentPage = val;
  453. this.StatisticsGroupCost();
  454. },
  455. //保留两位小数
  456. townum(val){
  457. val=Number(val);
  458. return val.toFixed(2);
  459. },
  460. //保留两位小数
  461. cltade(val){
  462. return val.split(" ")[0];
  463. },
  464. //日期处理(年)
  465. TimeProcessingriY(val){
  466. let datetime=new Date(val)
  467. let newsyear=datetime.getFullYear();
  468. // let newsMonth=datetime.getMonth() + 1<10?'0'+(datetime.getMonth() + 1):datetime.getMonth() + 1;
  469. // let newsday=datetime.getDate()<10?'0'+datetime.getDate():datetime.getDate();
  470. return newsyear;
  471. },
  472. //保留两位小数
  473. townum(val){
  474. val=Number(val);
  475. return val.toFixed(2);
  476. },
  477. handleClick(tab, event) {
  478. if(this.activeName=='first'){
  479. this.StatisticsYOY()
  480. }
  481. if(this.activeName=='second'){
  482. this.StatisticsAirTicket()
  483. }
  484. if (this.activeName=='fourth') {
  485. this.input='';
  486. this.StatisticsGroupCost()
  487. }
  488. // console.log(tab, event);
  489. },
  490. //处理时间
  491. getdate(val){
  492. var date=new Date(val);
  493. var y=date.getFullYear();
  494. return y
  495. },
  496. //团组机票
  497. groupstatisone(){
  498. var grossmarginss = echarts.init(document.getElementById('grossmarginss'));
  499. grossmarginss.setOption({
  500. title:{
  501. text: '预订机票数量',
  502. },
  503. legend: {},
  504. tooltip: {
  505. formatter:function(params){
  506. var html="该月总次数:"+params.data[1]+"次<br/>";
  507. for(let i=0;i<params.data[2].length;i++){
  508. html += '团组:'+params.data[2][i].groupName+'&nbsp;&nbsp;&nbsp;'+'预订机票次数:' +params.data[2][i].quantity+"<br/>";
  509. }
  510. return html
  511. }
  512. },
  513. dataset: {
  514. source: this.Airticketnum
  515. },
  516. xAxis: { type: 'category' },
  517. yAxis: {
  518. name: '机票数量',
  519. },
  520. color:['#2e83d4'],
  521. series: [{ type: 'bar' }]
  522. },true);
  523. var Airticketcitybox = echarts.init(document.getElementById('Airticketcitybox'));
  524. Airticketcitybox.setOption({
  525. title:{
  526. text: '机票到达地数量',
  527. },
  528. legend: {},
  529. tooltip: {
  530. formatter:function(params){
  531. var html="该月总次数:"+params.data[1]+"次<br/>";
  532. for(let i=0;i<params.data[2].length;i++){
  533. html += '城市:'+params.data[2][i].city+'&nbsp;&nbsp;&nbsp;'+'到此城市次数:' +params.data[2][i].quantity+"<br/>";
  534. }
  535. return html
  536. }
  537. },
  538. dataset: {
  539. source: this.Airticketcity
  540. },
  541. xAxis: { type: 'category' },
  542. yAxis: {
  543. name: '到达次数',
  544. },
  545. color:['#2e83d4'],
  546. series: [{ type: 'bar' }]
  547. },true);
  548. //预定平台
  549. var AirPredeterminedPlatform = echarts.init(document.getElementById('AirPredeterminedPlatform'));
  550. AirPredeterminedPlatform.setOption({
  551. title:{
  552. text: '机票预订平台排行',
  553. },
  554. legend: {},
  555. tooltip: {
  556. formatter:function(params){
  557. var html=params.data[0]+"预订总次数:"+params.data[1]+"次<br/>"
  558. for(let i=0;i<params.data[2].length;i++){
  559. html += '团组名称:'+params.data[2][i].groupName+'&nbsp;&nbsp;&nbsp;次数:'+params.data[2][i].total+",<br/>";
  560. }
  561. return html
  562. }
  563. },
  564. dataset: {
  565. source: this.AirticketPredetermined
  566. },
  567. xAxis: {
  568. type: 'category',
  569. axisLabel: {
  570. formatter:function(value){
  571. value = value.replace(/\s/g,"");
  572. return value.split("").join("\n");
  573. } ,
  574. },
  575. },
  576. grid:{
  577. left: '1%',
  578. right: '1%',
  579. bottom: '7%',
  580. top: '10%',
  581. containLabel: true
  582. },
  583. yAxis: {
  584. name: '该平台预订次数',
  585. },
  586. color:['#2e83d4'],
  587. series: [{ type: 'bar' }]
  588. },true);
  589. },
  590. //在线引入
  591. getonline(){
  592. const oScript = document.createElement('script');
  593. oScript.type = 'text/javascript';
  594. oScript.src = 'https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.core.js';
  595. document.body.appendChild(oScript);
  596. this.onlinemap();
  597. },
  598. //在线地图
  599. onlinemap(){
  600. // var token="eyJraWQiOiI1NEIyRkFLODMzIiwidHlwIjoiSldUIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiJIS0YzNzJKU01LIiwiaWF0IjoxNzMzMTkxMzI2LCJvcmlnaW4iOiJvYS5wYW4tYW1lcmljYW4taW50bC5jb20ifQ.1czYQb-Nxh6n4kG9sVylQH32XawN92gBKXjn6i_SU0F2M9fpwbStM-gDRvfANEiEUDz5ogUmm_FQf9eBF8o9Zg";
  601. // mapkit.init({
  602. // authorization: token, // 使用获取到的token
  603. // language: 'zh'
  604. // });
  605. // this.map = new mapkit.Map(document.getElementById('map'), {
  606. // center: new mapkit.Coordinate(37.7749, -122.4194),
  607. // zoom: 11
  608. // });
  609. // const token = mapkitToken.getToken(CLIENT_ID, TEAM_ID, KEY_ID, PRIVATE_KEY);
  610. // const { getToken } = require('mapkit-token');
  611. const token = "eyJraWQiOiI1NEIyRkFLODMzIiwidHlwIjoiSldUIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiJIS0YzNzJKU01LIiwiaWF0IjoxNzMzMTkxMzI2LCJvcmlnaW4iOiJvYS5wYW4tYW1lcmljYW4taW50bC5jb20ifQ.1czYQb-Nxh6n4kG9sVylQH32XawN92gBKXjn6i_SU0F2M9fpwbStM-gDRvfANEiEUDz5ogUmm_FQf9eBF8o9Zg";
  612. mapkit.init({
  613. language: 'zh-CN',
  614. authorizationCallback: function(done) {
  615. done(token);
  616. }
  617. });
  618. var map = new mapkit.Map("map");
  619. },
  620. //团组酒店
  621. grouphotel(){
  622. var hoteltopten = echarts.init(document.getElementById('hoteltopten'));
  623. hoteltopten.setOption({
  624. title:{
  625. text: '预订酒店前十排行',
  626. },
  627. legend: {},
  628. tooltip: {
  629. formatter:function(params){
  630. var html="该城市酒店预订总次数:"+params.data[1]+"次<br/>"
  631. for(let i=0;i<params.data[2].length;i++){
  632. html += '酒店名称:'+params.data[2][i].hotelName+',&nbsp;&nbsp;&nbsp;'+'单人间:' +params.data[2][i].singleRoomCount+',&nbsp;&nbsp;&nbsp;'+'双人间:' +params.data[2][i].doubleRoomCount+',&nbsp;&nbsp;&nbsp;'+'套房:' +params.data[2][i].suiteRoomCount+',&nbsp;&nbsp;&nbsp;'+'其他房型:' +params.data[2][i].otherRoomCount+',&nbsp;&nbsp;&nbsp;'+'总房数:' +params.data[2][i].roomTotal+",<br/>";
  633. }
  634. return html
  635. }
  636. },
  637. dataset: {
  638. source: this.Hoteltop
  639. },
  640. xAxis: {
  641. type: 'category' ,
  642. axisLabel:{
  643. rotate:30
  644. },
  645. },
  646. yAxis: {
  647. name: '预订次数',
  648. },
  649. color:['#2e83d4'],
  650. series: [{ type: 'bar' }]
  651. },true);
  652. //预定平台
  653. var hotelPredeterminedPlatform = echarts.init(document.getElementById('hotelPredeterminedPlatform'));
  654. hotelPredeterminedPlatform.setOption({
  655. title:{
  656. text: '预订酒店平台排行',
  657. },
  658. legend: {},
  659. tooltip: {
  660. formatter:function(params){
  661. var html="该平台预订总次数:"+params.data[1]+"次<br/>"
  662. for(let i=0;i<params.data[2].length;i++){
  663. html += '酒店名称:'+params.data[2][i].hotelName+',&nbsp;&nbsp;&nbsp;'+'单人间:' +params.data[2][i].singleRoomCount+',&nbsp;&nbsp;&nbsp;'+'双人间:' +params.data[2][i].doubleRoomCount+',&nbsp;&nbsp;&nbsp;'+'套房:' +params.data[2][i].suiteRoomCount+',&nbsp;&nbsp;&nbsp;'+'其他房型:' +params.data[2][i].otherRoomCount+',&nbsp;&nbsp;&nbsp;'+'总房数:' +params.data[2][i].roomTotal+",<br/>";
  664. }
  665. return html
  666. }
  667. },
  668. dataset: {
  669. source: this.hotelPredetermined
  670. },
  671. xAxis: { type: 'category' },
  672. yAxis: {
  673. name: '该平台预订次数',
  674. },
  675. color:['#2e83d4'],
  676. series: [{ type: 'bar' }]
  677. },true);
  678. },
  679. //团组商邀
  680. groupinvitation(){
  681. var invitationtopten = echarts.init(document.getElementById('invitationtopten'));
  682. invitationtopten.setOption({
  683. title:{
  684. text: '邀请国家数量排行',
  685. },
  686. legend: {},
  687. tooltip: {
  688. formatter:function(params){
  689. var html=params.data[0]+":"+params.data[1]+"次<br/>";
  690. return html
  691. }
  692. },
  693. dataset: {
  694. source: this.invitationtop
  695. },
  696. xAxis: { type: 'category' },
  697. yAxis: {
  698. name: '数量',
  699. },
  700. color:['#2e83d4'],
  701. series: [{ type: 'bar' }]
  702. },true);
  703. },
  704. //团组客户合作
  705. teamhz(){
  706. var teamCooperationbox = echarts.init(document.getElementById('teamCooperationbox'));
  707. teamCooperationbox.setOption({
  708. title:{
  709. text: '团组合作客户排行',
  710. },
  711. legend: {},
  712. tooltip: {
  713. formatter:function(params){
  714. var html="客户单位:"+params.data[0]+"<br/>"+"客户负责人:"+params.data[2]+"<br/>"+"合作次数:"+params.data[1];
  715. return html
  716. }
  717. },
  718. dataset: {
  719. source: this.teamCooperation
  720. },
  721. xAxis: { type: 'category' },
  722. yAxis: {
  723. name: '次数',
  724. },
  725. color:['#2e83d4'],
  726. series: [{ type: 'bar' }]
  727. },true);
  728. },
  729. //获取团组预算/实际成本
  730. StatisticsGroupCost(){
  731. var url = "/api/Statistics/StatisticsGroupCost"
  732. var that = this
  733. this.$axios({
  734. method: 'post',
  735. url: url,
  736. headers: {
  737. Authorization: 'Bearer '
  738. },
  739. data:{
  740. portType:1,
  741. pageIndex:that.fourthcurrentPage,
  742. pageSize:that.fourthPagesize,
  743. year:that.getdate(that.year),
  744. search:that.input,
  745. }
  746. }).then(function (res) {
  747. if(res.data.code==200){
  748. that.fourthtotal=res.data.count;
  749. that.fourthData=res.data.data;
  750. }else{
  751. that.$message({
  752. message: res.data.msg,
  753. type: 'warning'
  754. });
  755. }
  756. })
  757. },
  758. //团组数量
  759. teamsl(){
  760. var groupnumbox = echarts.init(document.getElementById('groupnumbox'));
  761. groupnumbox.setOption({
  762. title:{
  763. text: '团组数量统计',
  764. },
  765. legend: {},
  766. tooltip: {},
  767. dataset: {
  768. source: this.groupnum
  769. },
  770. xAxis: { type: 'category' },
  771. yAxis: {
  772. name: '数量',
  773. },
  774. color:['#2e83d4'],
  775. series: [{ type: 'bar' }]
  776. },true);
  777. },
  778. //团组出访人数
  779. teamrs(){
  780. var customersNumberbox = echarts.init(document.getElementById('customersNumberbox'));
  781. customersNumberbox.setOption({
  782. title:{
  783. text: '团组出访人数统计',
  784. },
  785. legend: {},
  786. tooltip: {},
  787. dataset: {
  788. source: this.customersNumber
  789. },
  790. xAxis: { type: 'category' },
  791. yAxis: {
  792. name: '人数',
  793. },
  794. color:['#2e83d4'],
  795. series: [{ type: 'bar' }]
  796. },true);
  797. },
  798. //比例图
  799. teamblt(){
  800. var scaleDrawingbox = echarts.init(document.getElementById('scaleDrawingbox'));
  801. scaleDrawingbox.setOption({
  802. title: {
  803. text: '客户类型分布表',
  804. left: 'center'
  805. },
  806. tooltip: {
  807. trigger: 'item'
  808. },
  809. series: [
  810. {
  811. type: 'pie',
  812. radius: '50%',
  813. data: this.scaleDrawing,
  814. emphasis: {
  815. itemStyle: {
  816. shadowBlur: this.scaleDrawing.length,
  817. shadowOffsetX: 0,
  818. shadowColor: 'rgba(0, 0, 0, 0.5)'
  819. }
  820. }
  821. }
  822. ]
  823. },true);
  824. },
  825. statisone(){
  826. var myChart = echarts.init(document.getElementById('statisticallyone'));
  827. myChart.setOption({
  828. title:{
  829. text: '业务总营业额',
  830. },
  831. legend: {},
  832. tooltip: {},
  833. dataset: {
  834. source: this.businessincome
  835. },
  836. xAxis: { type: 'category' },
  837. yAxis: {
  838. name: '营业额',
  839. },
  840. series: [{ type: 'bar' }, { type: 'bar' },]
  841. },true);
  842. var grossmargins = echarts.init(document.getElementById('grossmargins'));
  843. grossmargins.setOption({
  844. title:{
  845. text: '成本',
  846. },
  847. legend: {},
  848. tooltip: {},
  849. dataset: {
  850. source: this.costing
  851. },
  852. xAxis: { type: 'category' },
  853. yAxis: {
  854. name: '成本额',
  855. },
  856. series: [{ type: 'bar' }, { type: 'bar' },]
  857. },true);
  858. var grossmargin = echarts.init(document.getElementById('grossmargin'));
  859. grossmargin.setOption({
  860. title:{
  861. text: '毛利润',
  862. },
  863. legend: {},
  864. tooltip: {
  865. // formatter:function(params){
  866. // console.log(params);
  867. // var html = params.data[0]+'毛利率'+"<br/>"+ params.data[1]+"%";
  868. // return html
  869. // }
  870. },
  871. dataset: {
  872. source: this.Grossprofit
  873. },
  874. xAxis: { type: 'category' },
  875. yAxis: {
  876. name: '毛利额',
  877. },
  878. color:['#EEAD0E','#a0a7e6'],
  879. // Declare several bar series, each will be mapped
  880. // to a column of dataset.source by default.
  881. series: [{ type: 'bar' },{ type: 'bar' }]
  882. },true);
  883. },
  884. //年change
  885. yearchange(){
  886. if(this.activeName=='first'){
  887. this.StatisticsYOY();
  888. }
  889. if(this.activeName=='second'){
  890. this.countrieschange(this.value);
  891. }
  892. if (this.activeName=='fourth') {
  893. this.input='';
  894. this.StatisticsGroupCost()
  895. }
  896. // this.businessincome=[];
  897. // this.Grossprofit=[];
  898. // this.costing=[];
  899. },
  900. //国交部分类型切换
  901. countrieschange(val){
  902. if(document.getElementById('grossmarginss')!=null){
  903. echarts.init(document.getElementById('grossmarginss')).dispose();
  904. echarts.init(document.getElementById('Airticketcitybox')).dispose();
  905. echarts.init(document.getElementById('AirPredeterminedPlatform')).dispose();
  906. }
  907. if(document.getElementById('teamCooperationbox')!=null){
  908. echarts.init(document.getElementById('teamCooperationbox')).dispose();
  909. echarts.init(document.getElementById('groupnumbox')).dispose();
  910. echarts.init(document.getElementById('customersNumberbox')).dispose();
  911. echarts.init(document.getElementById('scaleDrawingbox')).dispose();
  912. }
  913. if(document.getElementById('hoteltopten')!=null){
  914. echarts.init(document.getElementById('hoteltopten')).dispose();
  915. echarts.init(document.getElementById('hotelPredeterminedPlatform')).dispose();
  916. }
  917. if(document.getElementById('invitationtopten')!=null){
  918. echarts.init(document.getElementById('invitationtopten')).dispose();
  919. }
  920. if(val==1){
  921. this.StatisticsAirTicket();
  922. }
  923. if(val==2){
  924. this.StatisticsHotel();
  925. }
  926. if(val==5){
  927. this.StatisticsInvitation();
  928. }
  929. if (val==7) {
  930. this.StatisticsCooperativeCustomer();
  931. this.StatisticsCooperativeCustomerType();
  932. this.StatisticsGroupNum();
  933. this.StatisticsGroupPeopleNum();
  934. }
  935. if(val==3){
  936. this.StatisticsOP(1);
  937. }
  938. },
  939. //获取营业额、成本支出、毛利润数据
  940. StatisticsYOY(){
  941. var url = "/api/Statistics/StatisticsYOY"
  942. var that = this
  943. this.$axios({
  944. method: 'post',
  945. url: url,
  946. headers: {
  947. Authorization: 'Bearer '
  948. },
  949. data:{
  950. year:that.getdate(that.year),
  951. }
  952. }).then(function (res) {
  953. if(res.data.code==200){
  954. that.businessincome=[];
  955. that.Grossprofit=[];
  956. that.costing=[];
  957. //营业额
  958. that.businessincome.push(['product', '前一年该月营业额', '本年该月营业额']);
  959. for(let i=0;i<res.data.data.salesYOYData.length;i++){
  960. that.businessincome.push([res.data.data.salesYOYData[i].month+'月',res.data.data.salesYOYData[i].lastAmount,res.data.data.salesYOYData[i].thisAmount]);
  961. }
  962. //毛利润
  963. that.Grossprofit.push(['product', '前一年该月毛利润', '本年该月毛利润']);
  964. for(let j=0;j<res.data.data.grossProfitYOYData.length;j++){
  965. that.Grossprofit.push([res.data.data.grossProfitYOYData[j].month+'月',res.data.data.grossProfitYOYData[j].lastAmount,res.data.data.grossProfitYOYData[j].thisAmount]);
  966. }
  967. //成本
  968. that.costing.push(['product', '前一年该月成本', '本年该月成本']);
  969. for(let g=0;g<res.data.data.costYOYData.length;g++){
  970. that.costing.push([res.data.data.costYOYData[g].month+'月',res.data.data.costYOYData[g].lastAmount,res.data.data.costYOYData[g].thisAmount]);
  971. }
  972. that.statisone()
  973. }else{
  974. that.$message({
  975. message: res.data.msg,
  976. type: 'warning'
  977. });
  978. }
  979. })
  980. },
  981. //获取国交数据统计数据机票
  982. StatisticsAirTicket(){
  983. var url = "/api/Statistics/StatisticsAirTicket"
  984. var that = this
  985. this.$axios({
  986. method: 'post',
  987. url: url,
  988. headers: {
  989. Authorization: 'Bearer '
  990. },
  991. data:{
  992. year:that.getdate(that.year),
  993. }
  994. }).then(function (res) {
  995. if(res.data.code==200){
  996. that.Airticketnum=[];
  997. that.Airticketcity=[];
  998. that.Airticketpred=[];
  999. var datainfo=res.data.data;
  1000. //机票数
  1001. that.Airticketnum.push(['product','本年机票数量']);
  1002. for(let i=0;i<datainfo.airTicketNumData.length;i++){
  1003. that.Airticketnum.push([datainfo.airTicketNumData[i].month+'月',datainfo.airTicketNumData[i].quantity,datainfo.airTicketNumData[i].aitTicketInfos]);
  1004. }
  1005. //机票到达地
  1006. that.Airticketcity.push(['product','本年机票到达地']);
  1007. for(let i=0;i<datainfo.airTicketAreaData.length;i++){
  1008. that.Airticketcity.push([datainfo.airTicketAreaData[i].month+'月',datainfo.airTicketAreaData[i].quantity,datainfo.airTicketAreaData[i].cityData]);
  1009. }
  1010. //机票预订平台
  1011. that.AirticketPredetermined.push(['product','机票预订平台排行榜']);
  1012. for(let i=0;i<datainfo.airTicketPlatformData.length;i++){
  1013. that.AirticketPredetermined.push([datainfo.airTicketPlatformData[i].platform,datainfo.airTicketPlatformData[i].total,datainfo.airTicketPlatformData[i].children]);
  1014. }
  1015. that.groupstatisone()
  1016. }else{
  1017. that.$message({
  1018. message: res.data.msg,
  1019. type: 'warning'
  1020. });
  1021. }
  1022. })
  1023. },
  1024. //获取国交数据统计数据酒店
  1025. StatisticsHotel(){
  1026. var url = "/api/Statistics/StatisticsHotel"
  1027. var that = this
  1028. this.$axios({
  1029. method: 'post',
  1030. url: url,
  1031. headers: {
  1032. Authorization: 'Bearer '
  1033. },
  1034. data:{
  1035. year:that.getdate(that.year),
  1036. }
  1037. }).then(function (res) {
  1038. if(res.data.code==200){
  1039. that.Hoteltop=[];
  1040. that.hotelPredetermined=[];
  1041. var datainfo=res.data.data.hotelCityData;
  1042. var hotelpred=res.data.data.hotelPlatformData
  1043. //酒店预订数
  1044. that.Hoteltop.push(['product','城市酒店预订排行榜']);
  1045. for(let i=0;i<datainfo.length;i++){
  1046. that.Hoteltop.push([datainfo[i].city,datainfo[i].bookingRoomNum,datainfo[i].hotelData]);
  1047. }
  1048. //酒店预订平台
  1049. that.hotelPredetermined.push(['product','酒店预订平台排行榜']);
  1050. for(let k=0;k<hotelpred.length;k++){
  1051. that.hotelPredetermined.push([hotelpred[k].platform,hotelpred[k].bookingRoomNum,hotelpred[k].hotelData]);
  1052. }
  1053. that.grouphotel()
  1054. }else{
  1055. that.$message({
  1056. message: res.data.msg,
  1057. type: 'warning'
  1058. });
  1059. }
  1060. })
  1061. },
  1062. //获取国交数据统计数据商邀
  1063. StatisticsInvitation(){
  1064. var url = "/api/Statistics/StatisticsInvitation"
  1065. var that = this
  1066. this.$axios({
  1067. method: 'post',
  1068. url: url,
  1069. headers: {
  1070. Authorization: 'Bearer '
  1071. },
  1072. data:{
  1073. year:that.getdate(that.year),
  1074. }
  1075. }).then(function (res) {
  1076. if(res.data.code==200){
  1077. that.invitationtop=[];
  1078. let datainfo=res.data.data;
  1079. that.invitationtop.push(['product','商邀邀请国家数量']);
  1080. for(let i=0;i<datainfo.length;i++){
  1081. that.invitationtop.push([datainfo[i].country,datainfo[i].timeNum]);
  1082. }
  1083. that.groupinvitation()
  1084. }else{
  1085. that.$message({
  1086. message: res.data.msg,
  1087. type: 'warning'
  1088. });
  1089. }
  1090. })
  1091. },
  1092. //获取国交数据统计数据团组合作
  1093. StatisticsCooperativeCustomer(){
  1094. var url = "/api/Statistics/StatisticsCooperativeCustomer"
  1095. var that = this
  1096. this.$axios({
  1097. method: 'post',
  1098. url: url,
  1099. headers: {
  1100. Authorization: 'Bearer '
  1101. },
  1102. data:{
  1103. year:that.getdate(that.year),
  1104. }
  1105. }).then(function (res) {
  1106. if(res.data.code==200){
  1107. that.teamCooperation=[];
  1108. let datainfo=res.data.data;
  1109. that.teamCooperation.push(['product','团组合作前十的客户']);
  1110. for(let i=0;i<datainfo.length;i++){
  1111. that.teamCooperation.push([datainfo[i].clientUnit,datainfo[i].visitsNum,datainfo[i].clienName]);
  1112. }
  1113. that.teamhz()
  1114. }else{
  1115. that.$message({
  1116. message: res.data.msg,
  1117. type: 'warning'
  1118. });
  1119. }
  1120. })
  1121. },
  1122. //获取国交数据统计数据团组数量
  1123. StatisticsGroupNum(){
  1124. var url = "/api/Statistics/StatisticsGroupNum"
  1125. var that = this
  1126. this.$axios({
  1127. method: 'post',
  1128. url: url,
  1129. headers: {
  1130. Authorization: 'Bearer '
  1131. },
  1132. data:{
  1133. year:that.getdate(that.year),
  1134. }
  1135. }).then(function (res) {
  1136. if(res.data.code==200){
  1137. that.groupnum=[];
  1138. let datainfo=res.data.data;
  1139. that.groupnum.push(['product',datainfo.yearData.yearName+'团组数量']);
  1140. for(let i=0;i<datainfo.quarterData.length;i++){
  1141. that.groupnum.push([datainfo.quarterData[i].quarterName,datainfo.quarterData[i].num]);
  1142. }
  1143. that.teamsl();
  1144. }else{
  1145. that.$message({
  1146. message: res.data.msg,
  1147. type: 'warning'
  1148. });
  1149. }
  1150. })
  1151. },
  1152. //获取会务数据统计
  1153. StatisticsConferenceCity(){
  1154. var url = "/api/Statistics/StatisticsConferenceCity"
  1155. var that = this
  1156. this.$axios({
  1157. method: 'post',
  1158. url: url,
  1159. headers: {
  1160. Authorization: 'Bearer '
  1161. },
  1162. data:{
  1163. year:that.getdate(that.year),
  1164. }
  1165. }).then(function (res) {
  1166. if(res.data.code==200){
  1167. // that.customersNumber=[];
  1168. // let datainfo=res.data.data;
  1169. // that.customersNumber.push(['product',datainfo.yearData.yearName+'出访人数']);
  1170. // for(let i=0;i<datainfo.quarterData.length;i++){
  1171. // that.customersNumber.push([datainfo.quarterData[i].quarterName,datainfo.quarterData[i].num]);
  1172. // }
  1173. // that.teamrs();
  1174. }else{
  1175. that.$message({
  1176. message: res.data.msg,
  1177. type: 'warning'
  1178. });
  1179. }
  1180. })
  1181. },
  1182. //获取国交数据统计数据出访人数
  1183. StatisticsGroupPeopleNum(){
  1184. var url = "/api/Statistics/StatisticsGroupPeopleNum"
  1185. var that = this
  1186. this.$axios({
  1187. method: 'post',
  1188. url: url,
  1189. headers: {
  1190. Authorization: 'Bearer '
  1191. },
  1192. data:{
  1193. year:that.getdate(that.year),
  1194. }
  1195. }).then(function (res) {
  1196. if(res.data.code==200){
  1197. that.customersNumber=[];
  1198. let datainfo=res.data.data;
  1199. that.customersNumber.push(['product',datainfo.yearData.yearName+'出访人数']);
  1200. for(let i=0;i<datainfo.quarterData.length;i++){
  1201. that.customersNumber.push([datainfo.quarterData[i].quarterName,datainfo.quarterData[i].num]);
  1202. }
  1203. that.teamrs();
  1204. }else{
  1205. that.$message({
  1206. message: res.data.msg,
  1207. type: 'warning'
  1208. });
  1209. }
  1210. })
  1211. },
  1212. //获取国交数据统计数据类型比例图
  1213. StatisticsCooperativeCustomerType(){
  1214. var url = "/api/Statistics/StatisticsCooperativeCustomerType"
  1215. var that = this
  1216. this.$axios({
  1217. method: 'post',
  1218. url: url,
  1219. headers: {
  1220. Authorization: 'Bearer '
  1221. },
  1222. data:{
  1223. year:that.getdate(that.year),
  1224. }
  1225. }).then(function (res) {
  1226. if(res.data.code==200){
  1227. that.scaleDrawing=[];
  1228. var newArr = res.data.data.map(item => ({
  1229. name: item.groupTypeName,
  1230. value: item.groupNum
  1231. }))
  1232. that.scaleDrawing=newArr;
  1233. that.teamblt();
  1234. }else{
  1235. that.$message({
  1236. message: res.data.msg,
  1237. type: 'warning'
  1238. });
  1239. }
  1240. })
  1241. },
  1242. //获取国交数据统计数据OP(年)
  1243. StatisticsOP(val){
  1244. this.fullscreenLoading=true;
  1245. var url = "/api/Statistics/StatisticsOP"
  1246. var that = this
  1247. this.$axios({
  1248. method: 'post',
  1249. url: url,
  1250. headers: {
  1251. Authorization: 'Bearer '
  1252. },
  1253. data:{
  1254. year:that.getdate(that.year),
  1255. type:val
  1256. }
  1257. }).then(function (res) {
  1258. if(res.data.code==200){
  1259. that.tableData=[];
  1260. that.tableData=res.data.data;
  1261. that.StatisticsOPmonth(2);
  1262. }else{
  1263. that.fullscreenLoading=false;
  1264. that.$message({
  1265. message: res.data.msg,
  1266. type: 'warning'
  1267. });
  1268. }
  1269. })
  1270. },
  1271. //获取国交数据统计数据OP(月)
  1272. StatisticsOPmonth(val){
  1273. var url = "/api/Statistics/StatisticsOP"
  1274. var that = this
  1275. this.$axios({
  1276. method: 'post',
  1277. url: url,
  1278. headers: {
  1279. Authorization: 'Bearer '
  1280. },
  1281. data:{
  1282. year:that.getdate(that.year),
  1283. type:val
  1284. }
  1285. }).then(function (res) {
  1286. if(res.data.code==200){
  1287. that.tableDatamonth=[];
  1288. that.tableDatamonth=res.data.data;
  1289. that.fullscreenLoading=false;
  1290. }else{
  1291. that.fullscreenLoading=false;
  1292. that.$message({
  1293. message: res.data.msg,
  1294. type: 'warning'
  1295. });
  1296. }
  1297. })
  1298. },
  1299. },
  1300. watch:{
  1301. invitationtop:{
  1302. handler(val,oldval){
  1303. // this.groupinvitation()
  1304. },
  1305. deep:true
  1306. },
  1307. },
  1308. mounted(){
  1309. this.getonline();
  1310. this.StatisticsYOY();
  1311. // this.countrieschange(this.value);
  1312. // this.StatisticsOP(1);
  1313. // this.StatisticsAirTicket();
  1314. // this.StatisticsHotel();
  1315. // this.StatisticsInvitation();
  1316. }
  1317. }
  1318. </script>
  1319. <style>
  1320. .statistically-all{
  1321. background-color: #fff;
  1322. padding: 10px;
  1323. box-shadow: 0 0 5px #0005;
  1324. border-radius: 10px;
  1325. height: 100%;
  1326. min-height: 830px;
  1327. }
  1328. .canvas-box{
  1329. display: flex;
  1330. flex-wrap: wrap;
  1331. }
  1332. .yeardate{
  1333. margin-bottom: 10px;
  1334. }
  1335. .yeartableul{
  1336. width: 99.9%;
  1337. margin-bottom: 20px;
  1338. display: inline-flex;
  1339. border: 1px solid #E4E7ED;
  1340. }
  1341. .yeartableli{
  1342. width: 8.33%;
  1343. text-align: center;
  1344. }
  1345. .yeartableli div{
  1346. color: #555;
  1347. font-size: 12px;
  1348. overflow: hidden;
  1349. white-space: nowrap;
  1350. text-overflow: ellipsis;
  1351. padding: 8px;
  1352. }
  1353. .yeartableli div{
  1354. border-top: 1px solid #E4E7ED;
  1355. border-left: 1px solid #E4E7ED;
  1356. background-color: #fbfcff;
  1357. }
  1358. .canvas-box .yeartableli .hourbox{
  1359. border-top: 1px solid #E4E7ED;
  1360. border-left: 1px solid #E4E7ED;
  1361. background-color: #fbfcff;
  1362. font-weight:400 ;
  1363. }
  1364. .yeartableli div:nth-child(1){
  1365. border-top:none;
  1366. background-color: #f0f9ff;
  1367. color: #555;
  1368. font-weight: 600;
  1369. }
  1370. .yeartableli:nth-child(1) div{
  1371. border-left: none;
  1372. }
  1373. .monthtableul{
  1374. margin-bottom: 500px;
  1375. }
  1376. .monthtableli{
  1377. background-color: #fbfcff;
  1378. }
  1379. .canvas-box .monthtableli:nth-child(1){
  1380. background-color: #f0f9ff;
  1381. color: #555;
  1382. font-weight: 600;
  1383. }
  1384. .monthtableli{
  1385. font-size: 12px;
  1386. display: flex;
  1387. }
  1388. .monthtableli:nth-last-child(1){
  1389. border-bottom: 1px solid #E4E7ED;
  1390. }
  1391. .monthtablebox{
  1392. width: 8.3%;
  1393. overflow: hidden;
  1394. white-space: nowrap;
  1395. text-overflow: ellipsis;
  1396. padding: 8px;
  1397. border-top: 1px solid #E4E7ED;
  1398. border-left: 1px solid #E4E7ED;
  1399. }
  1400. .monthtablebox:nth-last-child(1){
  1401. border-right: 1px solid #E4E7ED;
  1402. }
  1403. .tabletitle{
  1404. font-size: 17px;
  1405. font-weight: 600;
  1406. color: #555;
  1407. margin-bottom:15px ;
  1408. }
  1409. /*设置table表格中每行的背景色 及 显示的字体颜色*/
  1410. .device_err .el-table tr {
  1411. background-color: #fbfcff !important;
  1412. font-weight: bold;
  1413. }
  1414. .el-table td.el-table__cell div{
  1415. text-align: center !important;
  1416. }
  1417. .el-table th.el-table__cell>.cell{
  1418. text-align: center !important;
  1419. }
  1420. .statistically-all .block{
  1421. margin-top: 10px;
  1422. text-align: center;
  1423. }
  1424. .Search-yscb-ul{
  1425. display: flex;
  1426. align-items: center;
  1427. margin-bottom: 10px;
  1428. }
  1429. .Search-yscb-ul label{
  1430. width: 70px;
  1431. }
  1432. .Search-yscb-ul .el-input{
  1433. width: 200px;
  1434. margin-right: 10px;
  1435. }
  1436. </style>