Statistically.vue 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488
  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: 700px;"></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. },
  446. methods: {
  447. handleSizeChange(val) {
  448. this.fourthcurrentPage = 1;
  449. this.fourthPagesize = val;
  450. this.StatisticsGroupCost();
  451. },
  452. handleCurrentChange(val) {
  453. this.fourthcurrentPage = val;
  454. this.StatisticsGroupCost();
  455. },
  456. //保留两位小数
  457. townum(val){
  458. val=Number(val);
  459. return val.toFixed(2);
  460. },
  461. //保留两位小数
  462. cltade(val){
  463. return val.split(" ")[0];
  464. },
  465. //日期处理(年)
  466. TimeProcessingriY(val){
  467. let datetime=new Date(val)
  468. let newsyear=datetime.getFullYear();
  469. // let newsMonth=datetime.getMonth() + 1<10?'0'+(datetime.getMonth() + 1):datetime.getMonth() + 1;
  470. // let newsday=datetime.getDate()<10?'0'+datetime.getDate():datetime.getDate();
  471. return newsyear;
  472. },
  473. //保留两位小数
  474. townum(val){
  475. val=Number(val);
  476. return val.toFixed(2);
  477. },
  478. handleClick(tab, event) {
  479. if(this.activeName=='first'){
  480. this.StatisticsYOY()
  481. }
  482. if(this.activeName=='second'){
  483. this.StatisticsAirTicket()
  484. }
  485. if (this.activeName=='fourth') {
  486. this.input='';
  487. this.StatisticsGroupCost()
  488. }
  489. if (this.activeName=='fifth') {
  490. this.getonline();
  491. }
  492. // console.log(tab, event);
  493. },
  494. //处理时间
  495. getdate(val){
  496. var date=new Date(val);
  497. var y=date.getFullYear();
  498. return y
  499. },
  500. //团组机票
  501. groupstatisone(){
  502. var grossmarginss = echarts.init(document.getElementById('grossmarginss'));
  503. grossmarginss.setOption({
  504. title:{
  505. text: '预订机票数量',
  506. },
  507. legend: {},
  508. tooltip: {
  509. formatter:function(params){
  510. var html="该月总次数:"+params.data[1]+"次<br/>";
  511. for(let i=0;i<params.data[2].length;i++){
  512. html += '团组:'+params.data[2][i].groupName+'&nbsp;&nbsp;&nbsp;'+'预订机票次数:' +params.data[2][i].quantity+"<br/>";
  513. }
  514. return html
  515. }
  516. },
  517. dataset: {
  518. source: this.Airticketnum
  519. },
  520. xAxis: { type: 'category' },
  521. yAxis: {
  522. name: '机票数量',
  523. },
  524. color:['#2e83d4'],
  525. series: [{ type: 'bar' }]
  526. },true);
  527. var Airticketcitybox = echarts.init(document.getElementById('Airticketcitybox'));
  528. Airticketcitybox.setOption({
  529. title:{
  530. text: '机票到达地数量',
  531. },
  532. legend: {},
  533. tooltip: {
  534. formatter:function(params){
  535. var html="该月总次数:"+params.data[1]+"次<br/>";
  536. for(let i=0;i<params.data[2].length;i++){
  537. html += '城市:'+params.data[2][i].city+'&nbsp;&nbsp;&nbsp;'+'到此城市次数:' +params.data[2][i].quantity+"<br/>";
  538. }
  539. return html
  540. }
  541. },
  542. dataset: {
  543. source: this.Airticketcity
  544. },
  545. xAxis: { type: 'category' },
  546. yAxis: {
  547. name: '到达次数',
  548. },
  549. color:['#2e83d4'],
  550. series: [{ type: 'bar' }]
  551. },true);
  552. //预定平台
  553. var AirPredeterminedPlatform = echarts.init(document.getElementById('AirPredeterminedPlatform'));
  554. AirPredeterminedPlatform.setOption({
  555. title:{
  556. text: '机票预订平台排行',
  557. },
  558. legend: {},
  559. tooltip: {
  560. formatter:function(params){
  561. var html=params.data[0]+"预订总次数:"+params.data[1]+"次<br/>"
  562. for(let i=0;i<params.data[2].length;i++){
  563. html += '团组名称:'+params.data[2][i].groupName+'&nbsp;&nbsp;&nbsp;次数:'+params.data[2][i].total+",<br/>";
  564. }
  565. return html
  566. }
  567. },
  568. dataset: {
  569. source: this.AirticketPredetermined
  570. },
  571. xAxis: {
  572. type: 'category',
  573. axisLabel: {
  574. formatter:function(value){
  575. value = value.replace(/\s/g,"");
  576. return value.split("").join("\n");
  577. } ,
  578. },
  579. },
  580. grid:{
  581. left: '1%',
  582. right: '1%',
  583. bottom: '7%',
  584. top: '10%',
  585. containLabel: true
  586. },
  587. yAxis: {
  588. name: '该平台预订次数',
  589. },
  590. color:['#2e83d4'],
  591. series: [{ type: 'bar' }]
  592. },true);
  593. },
  594. //在线引入
  595. getonline(){
  596. // const oScript = document.createElement('script');
  597. // oScript.type = 'text/javascript';
  598. // oScript.src = 'https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.core.js';
  599. // document.body.appendChild(oScript);
  600. this.onlinemap();
  601. },
  602. //在线地图
  603. onlinemap(){
  604. // var token="eyJraWQiOiI1NEIyRkFLODMzIiwidHlwIjoiSldUIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiJIS0YzNzJKU01LIiwiaWF0IjoxNzMzMTkxMzI2LCJvcmlnaW4iOiJvYS5wYW4tYW1lcmljYW4taW50bC5jb20ifQ.1czYQb-Nxh6n4kG9sVylQH32XawN92gBKXjn6i_SU0F2M9fpwbStM-gDRvfANEiEUDz5ogUmm_FQf9eBF8o9Zg";
  605. // mapkit.init({
  606. // authorization: token, // 使用获取到的token
  607. // language: 'zh'
  608. // });
  609. // this.map = new mapkit.Map(document.getElementById('map'), {
  610. // center: new mapkit.Coordinate(37.7749, -122.4194),
  611. // zoom: 11
  612. // });
  613. // const token = mapkitToken.getToken(CLIENT_ID, TEAM_ID, KEY_ID, PRIVATE_KEY);
  614. // const { getToken } = require('mapkit-token');
  615. const token = "eyJraWQiOiI1NEIyRkFLODMzIiwidHlwIjoiSldUIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiJIS0YzNzJKU01LIiwiaWF0IjoxNzMzMTkxMzI2LCJvcmlnaW4iOiJvYS5wYW4tYW1lcmljYW4taW50bC5jb20ifQ.1czYQb-Nxh6n4kG9sVylQH32XawN92gBKXjn6i_SU0F2M9fpwbStM-gDRvfANEiEUDz5ogUmm_FQf9eBF8o9Zg";
  616. mapkit.init({
  617. language: 'zh-Hans',
  618. authorizationCallback: function(done) {
  619. done(token);
  620. }
  621. });
  622. // var map = new mapkit.Map('map', { center: new mapkit.Coordinate(104.096488, 30.635261) });
  623. // const coordinate = new mapkit.Coordinate(104.096488, 30.635261)
  624. // const map = new mapkit.Map("map", {
  625. // center: coordinate,
  626. // countryCode: "CN",
  627. // isZoomEnabled:true,
  628. // })
  629. let map = new mapkit.Map("map", {
  630. center: new mapkit.Coordinate(104.096488, 30.635261),
  631. showsMapTypeControl: true,
  632. showsZoomControl: true,
  633. showsUserLocation: true,
  634. zoomEnabled: true,
  635. region: new mapkit.CoordinateRegion(
  636. new mapkit.Coordinate(104.096488, 30.635261),
  637. new mapkit.CoordinateSpan(0.01, 0.01)
  638. )
  639. });
  640. let overlay = new mapkit.MapOverlay(map.region, {
  641. urlTemplate: "https://example.com/overlay/{x}/{y}/{z}.png"
  642. });
  643. map.addOverlay(overlay);
  644. },
  645. //团组酒店
  646. grouphotel(){
  647. var hoteltopten = echarts.init(document.getElementById('hoteltopten'));
  648. hoteltopten.setOption({
  649. title:{
  650. text: '预订酒店前十排行',
  651. },
  652. legend: {},
  653. tooltip: {
  654. formatter:function(params){
  655. var html="该城市酒店预订总次数:"+params.data[1]+"次<br/>"
  656. for(let i=0;i<params.data[2].length;i++){
  657. 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/>";
  658. }
  659. return html
  660. }
  661. },
  662. dataset: {
  663. source: this.Hoteltop
  664. },
  665. xAxis: {
  666. type: 'category' ,
  667. axisLabel:{
  668. rotate:30
  669. },
  670. },
  671. yAxis: {
  672. name: '预订次数',
  673. },
  674. color:['#2e83d4'],
  675. series: [{ type: 'bar' }]
  676. },true);
  677. //预定平台
  678. var hotelPredeterminedPlatform = echarts.init(document.getElementById('hotelPredeterminedPlatform'));
  679. hotelPredeterminedPlatform.setOption({
  680. title:{
  681. text: '预订酒店平台排行',
  682. },
  683. legend: {},
  684. tooltip: {
  685. formatter:function(params){
  686. var html="该平台预订总次数:"+params.data[1]+"次<br/>"
  687. for(let i=0;i<params.data[2].length;i++){
  688. 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/>";
  689. }
  690. return html
  691. }
  692. },
  693. dataset: {
  694. source: this.hotelPredetermined
  695. },
  696. xAxis: { type: 'category' },
  697. yAxis: {
  698. name: '该平台预订次数',
  699. },
  700. color:['#2e83d4'],
  701. series: [{ type: 'bar' }]
  702. },true);
  703. },
  704. //团组商邀
  705. groupinvitation(){
  706. var invitationtopten = echarts.init(document.getElementById('invitationtopten'));
  707. invitationtopten.setOption({
  708. title:{
  709. text: '邀请国家数量排行',
  710. },
  711. legend: {},
  712. tooltip: {
  713. formatter:function(params){
  714. var html=params.data[0]+":"+params.data[1]+"次<br/>";
  715. return html
  716. }
  717. },
  718. dataset: {
  719. source: this.invitationtop
  720. },
  721. xAxis: {
  722. type: 'category',
  723. axisLabel:{
  724. rotate:30
  725. },
  726. },
  727. yAxis: {
  728. name: '数量',
  729. },
  730. color:['#2e83d4'],
  731. series: [{ type: 'bar' }]
  732. },true);
  733. },
  734. //团组客户合作
  735. teamhz(){
  736. var teamCooperationbox = echarts.init(document.getElementById('teamCooperationbox'));
  737. teamCooperationbox.setOption({
  738. title:{
  739. text: '团组合作客户排行',
  740. },
  741. legend: {},
  742. tooltip: {
  743. formatter:function(params){
  744. var html="客户单位:"+params.data[0]+"<br/>"+"客户负责人:"+params.data[2]+"<br/>"+"合作次数:"+params.data[1];
  745. return html
  746. }
  747. },
  748. dataset: {
  749. source: this.teamCooperation
  750. },
  751. xAxis: {
  752. type: 'category',
  753. axisLabel:{
  754. rotate:25
  755. },
  756. },
  757. yAxis: {
  758. name: '次数',
  759. },
  760. color:['#2e83d4'],
  761. series: [{ type: 'bar' }]
  762. },true);
  763. },
  764. //获取团组预算/实际成本
  765. StatisticsGroupCost(){
  766. var url = "/api/Statistics/StatisticsGroupCost"
  767. var that = this
  768. this.$axios({
  769. method: 'post',
  770. url: url,
  771. headers: {
  772. Authorization: 'Bearer '
  773. },
  774. data:{
  775. portType:1,
  776. pageIndex:that.fourthcurrentPage,
  777. pageSize:that.fourthPagesize,
  778. year:that.getdate(that.year),
  779. search:that.input,
  780. }
  781. }).then(function (res) {
  782. if(res.data.code==200){
  783. that.fourthtotal=res.data.count;
  784. that.fourthData=res.data.data;
  785. }else{
  786. that.$message({
  787. message: res.data.msg,
  788. type: 'warning'
  789. });
  790. }
  791. })
  792. },
  793. //团组数量
  794. teamsl(){
  795. var groupnumbox = echarts.init(document.getElementById('groupnumbox'));
  796. groupnumbox.setOption({
  797. title:{
  798. text: '团组数量统计',
  799. },
  800. legend: {},
  801. tooltip: {},
  802. dataset: {
  803. source: this.groupnum
  804. },
  805. xAxis: { type: 'category' },
  806. yAxis: {
  807. name: '数量',
  808. },
  809. color:['#2e83d4'],
  810. series: [{ type: 'bar' }]
  811. },true);
  812. },
  813. //团组出访人数
  814. teamrs(){
  815. var customersNumberbox = echarts.init(document.getElementById('customersNumberbox'));
  816. customersNumberbox.setOption({
  817. title:{
  818. text: '团组出访人数统计',
  819. },
  820. legend: {},
  821. tooltip: {},
  822. dataset: {
  823. source: this.customersNumber
  824. },
  825. xAxis: { type: 'category' },
  826. yAxis: {
  827. name: '人数',
  828. },
  829. color:['#2e83d4'],
  830. series: [{ type: 'bar' }]
  831. },true);
  832. },
  833. //比例图
  834. teamblt(){
  835. var scaleDrawingbox = echarts.init(document.getElementById('scaleDrawingbox'));
  836. scaleDrawingbox.setOption({
  837. title: {
  838. text: '客户类型分布表',
  839. left: 'center'
  840. },
  841. tooltip: {
  842. trigger: 'item'
  843. },
  844. series: [
  845. {
  846. type: 'pie',
  847. radius: '50%',
  848. data: this.scaleDrawing,
  849. emphasis: {
  850. itemStyle: {
  851. shadowBlur: this.scaleDrawing.length,
  852. shadowOffsetX: 0,
  853. shadowColor: 'rgba(0, 0, 0, 0.5)'
  854. }
  855. }
  856. }
  857. ]
  858. },true);
  859. },
  860. statisone(){
  861. var myChart = echarts.init(document.getElementById('statisticallyone'));
  862. myChart.setOption({
  863. title:{
  864. text: '业务总营业额',
  865. },
  866. legend: {},
  867. tooltip: {},
  868. dataset: {
  869. source: this.businessincome
  870. },
  871. xAxis: { type: 'category' },
  872. yAxis: {
  873. name: '营业额',
  874. },
  875. series: [{ type: 'bar' }, { type: 'bar' },]
  876. },true);
  877. var grossmargins = echarts.init(document.getElementById('grossmargins'));
  878. grossmargins.setOption({
  879. title:{
  880. text: '成本',
  881. },
  882. legend: {},
  883. tooltip: {},
  884. dataset: {
  885. source: this.costing
  886. },
  887. xAxis: { type: 'category' },
  888. yAxis: {
  889. name: '成本额',
  890. },
  891. series: [{ type: 'bar' }, { type: 'bar' },]
  892. },true);
  893. var grossmargin = echarts.init(document.getElementById('grossmargin'));
  894. grossmargin.setOption({
  895. title:{
  896. text: '毛利润',
  897. },
  898. legend: {},
  899. tooltip: {
  900. // formatter:function(params){
  901. // console.log(params);
  902. // var html = params.data[0]+'毛利率'+"<br/>"+ params.data[1]+"%";
  903. // return html
  904. // }
  905. },
  906. dataset: {
  907. source: this.Grossprofit
  908. },
  909. xAxis: { type: 'category' },
  910. yAxis: {
  911. name: '毛利额',
  912. },
  913. color:['#EEAD0E','#a0a7e6'],
  914. // Declare several bar series, each will be mapped
  915. // to a column of dataset.source by default.
  916. series: [{ type: 'bar' },{ type: 'bar' }]
  917. },true);
  918. },
  919. //年change
  920. yearchange(){
  921. if(this.activeName=='first'){
  922. this.StatisticsYOY();
  923. }
  924. if(this.activeName=='second'){
  925. this.countrieschange(this.value);
  926. }
  927. if (this.activeName=='fourth') {
  928. this.input='';
  929. this.StatisticsGroupCost()
  930. }
  931. if (this.activeName=='fifth') {
  932. this.getonline();
  933. }
  934. // this.businessincome=[];
  935. // this.Grossprofit=[];
  936. // this.costing=[];
  937. },
  938. //国交部分类型切换
  939. countrieschange(val){
  940. if(document.getElementById('grossmarginss')!=null){
  941. echarts.init(document.getElementById('grossmarginss')).dispose();
  942. echarts.init(document.getElementById('Airticketcitybox')).dispose();
  943. echarts.init(document.getElementById('AirPredeterminedPlatform')).dispose();
  944. }
  945. if(document.getElementById('teamCooperationbox')!=null){
  946. echarts.init(document.getElementById('teamCooperationbox')).dispose();
  947. echarts.init(document.getElementById('groupnumbox')).dispose();
  948. echarts.init(document.getElementById('customersNumberbox')).dispose();
  949. echarts.init(document.getElementById('scaleDrawingbox')).dispose();
  950. }
  951. if(document.getElementById('hoteltopten')!=null){
  952. echarts.init(document.getElementById('hoteltopten')).dispose();
  953. echarts.init(document.getElementById('hotelPredeterminedPlatform')).dispose();
  954. }
  955. if(document.getElementById('invitationtopten')!=null){
  956. echarts.init(document.getElementById('invitationtopten')).dispose();
  957. }
  958. if(val==1){
  959. this.StatisticsAirTicket();
  960. }
  961. if(val==2){
  962. this.StatisticsHotel();
  963. }
  964. if(val==5){
  965. this.StatisticsInvitation();
  966. }
  967. if (val==7) {
  968. this.StatisticsCooperativeCustomer();
  969. this.StatisticsCooperativeCustomerType();
  970. this.StatisticsGroupNum();
  971. this.StatisticsGroupPeopleNum();
  972. }
  973. if(val==3){
  974. this.StatisticsOP(1);
  975. }
  976. },
  977. //获取营业额、成本支出、毛利润数据
  978. StatisticsYOY(){
  979. var url = "/api/Statistics/StatisticsYOY"
  980. var that = this
  981. this.$axios({
  982. method: 'post',
  983. url: url,
  984. headers: {
  985. Authorization: 'Bearer '
  986. },
  987. data:{
  988. year:that.getdate(that.year),
  989. }
  990. }).then(function (res) {
  991. if(res.data.code==200){
  992. that.businessincome=[];
  993. that.Grossprofit=[];
  994. that.costing=[];
  995. //营业额
  996. that.businessincome.push(['product', '前一年该月营业额', '本年该月营业额']);
  997. for(let i=0;i<res.data.data.salesYOYData.length;i++){
  998. that.businessincome.push([res.data.data.salesYOYData[i].month+'月',res.data.data.salesYOYData[i].lastAmount,res.data.data.salesYOYData[i].thisAmount]);
  999. }
  1000. //毛利润
  1001. that.Grossprofit.push(['product', '前一年该月毛利润', '本年该月毛利润']);
  1002. for(let j=0;j<res.data.data.grossProfitYOYData.length;j++){
  1003. that.Grossprofit.push([res.data.data.grossProfitYOYData[j].month+'月',res.data.data.grossProfitYOYData[j].lastAmount,res.data.data.grossProfitYOYData[j].thisAmount]);
  1004. }
  1005. //成本
  1006. that.costing.push(['product', '前一年该月成本', '本年该月成本']);
  1007. for(let g=0;g<res.data.data.costYOYData.length;g++){
  1008. that.costing.push([res.data.data.costYOYData[g].month+'月',res.data.data.costYOYData[g].lastAmount,res.data.data.costYOYData[g].thisAmount]);
  1009. }
  1010. that.statisone()
  1011. }else{
  1012. that.$message({
  1013. message: res.data.msg,
  1014. type: 'warning'
  1015. });
  1016. }
  1017. })
  1018. },
  1019. //获取国交数据统计数据机票
  1020. StatisticsAirTicket(){
  1021. var url = "/api/Statistics/StatisticsAirTicket"
  1022. var that = this
  1023. this.$axios({
  1024. method: 'post',
  1025. url: url,
  1026. headers: {
  1027. Authorization: 'Bearer '
  1028. },
  1029. data:{
  1030. year:that.getdate(that.year),
  1031. }
  1032. }).then(function (res) {
  1033. if(res.data.code==200){
  1034. that.Airticketnum=[];
  1035. that.Airticketcity=[];
  1036. that.Airticketpred=[];
  1037. var datainfo=res.data.data;
  1038. //机票数
  1039. that.Airticketnum.push(['product','本年机票数量']);
  1040. for(let i=0;i<datainfo.airTicketNumData.length;i++){
  1041. that.Airticketnum.push([datainfo.airTicketNumData[i].month+'月',datainfo.airTicketNumData[i].quantity,datainfo.airTicketNumData[i].aitTicketInfos]);
  1042. }
  1043. //机票到达地
  1044. that.Airticketcity.push(['product','本年机票到达地']);
  1045. for(let i=0;i<datainfo.airTicketAreaData.length;i++){
  1046. that.Airticketcity.push([datainfo.airTicketAreaData[i].month+'月',datainfo.airTicketAreaData[i].quantity,datainfo.airTicketAreaData[i].cityData]);
  1047. }
  1048. //机票预订平台
  1049. that.AirticketPredetermined.push(['product','机票预订平台排行榜']);
  1050. for(let i=0;i<datainfo.airTicketPlatformData.length;i++){
  1051. that.AirticketPredetermined.push([datainfo.airTicketPlatformData[i].platform,datainfo.airTicketPlatformData[i].total,datainfo.airTicketPlatformData[i].children]);
  1052. }
  1053. that.groupstatisone()
  1054. }else{
  1055. that.$message({
  1056. message: res.data.msg,
  1057. type: 'warning'
  1058. });
  1059. }
  1060. })
  1061. },
  1062. //获取国交数据统计数据酒店
  1063. StatisticsHotel(){
  1064. var url = "/api/Statistics/StatisticsHotel"
  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.Hoteltop=[];
  1078. that.hotelPredetermined=[];
  1079. var datainfo=res.data.data.hotelCityData;
  1080. var hotelpred=res.data.data.hotelPlatformData
  1081. //酒店预订数
  1082. that.Hoteltop.push(['product','城市酒店预订排行榜']);
  1083. for(let i=0;i<datainfo.length;i++){
  1084. that.Hoteltop.push([datainfo[i].city,datainfo[i].bookingRoomNum,datainfo[i].hotelData]);
  1085. }
  1086. //酒店预订平台
  1087. that.hotelPredetermined.push(['product','酒店预订平台排行榜']);
  1088. for(let k=0;k<hotelpred.length;k++){
  1089. that.hotelPredetermined.push([hotelpred[k].platform,hotelpred[k].bookingRoomNum,hotelpred[k].hotelData]);
  1090. }
  1091. that.grouphotel()
  1092. }else{
  1093. that.$message({
  1094. message: res.data.msg,
  1095. type: 'warning'
  1096. });
  1097. }
  1098. })
  1099. },
  1100. //获取国交数据统计数据商邀
  1101. StatisticsInvitation(){
  1102. var url = "/api/Statistics/StatisticsInvitation"
  1103. var that = this
  1104. this.$axios({
  1105. method: 'post',
  1106. url: url,
  1107. headers: {
  1108. Authorization: 'Bearer '
  1109. },
  1110. data:{
  1111. year:that.getdate(that.year),
  1112. }
  1113. }).then(function (res) {
  1114. if(res.data.code==200){
  1115. that.invitationtop=[];
  1116. let datainfo=res.data.data.groupByCountry;
  1117. that.invitationtop.push(['product','商邀邀请国家数量']);
  1118. for(let i=0;i<datainfo.length;i++){
  1119. that.invitationtop.push([datainfo[i].country,datainfo[i].timeNum]);
  1120. }
  1121. that.groupinvitation()
  1122. }else{
  1123. that.$message({
  1124. message: res.data.msg,
  1125. type: 'warning'
  1126. });
  1127. }
  1128. })
  1129. },
  1130. //获取国交数据统计数据团组合作
  1131. StatisticsCooperativeCustomer(){
  1132. var url = "/api/Statistics/StatisticsCooperativeCustomer"
  1133. var that = this
  1134. this.$axios({
  1135. method: 'post',
  1136. url: url,
  1137. headers: {
  1138. Authorization: 'Bearer '
  1139. },
  1140. data:{
  1141. year:that.getdate(that.year),
  1142. }
  1143. }).then(function (res) {
  1144. if(res.data.code==200){
  1145. that.teamCooperation=[];
  1146. let datainfo=res.data.data;
  1147. that.teamCooperation.push(['product','团组合作前十的客户']);
  1148. for(let i=0;i<datainfo.length;i++){
  1149. that.teamCooperation.push([datainfo[i].clientUnit,datainfo[i].visitsNum,datainfo[i].clienName]);
  1150. }
  1151. that.teamhz()
  1152. }else{
  1153. that.$message({
  1154. message: res.data.msg,
  1155. type: 'warning'
  1156. });
  1157. }
  1158. })
  1159. },
  1160. //获取国交数据统计数据团组数量
  1161. StatisticsGroupNum(){
  1162. var url = "/api/Statistics/StatisticsGroupNum"
  1163. var that = this
  1164. this.$axios({
  1165. method: 'post',
  1166. url: url,
  1167. headers: {
  1168. Authorization: 'Bearer '
  1169. },
  1170. data:{
  1171. year:that.getdate(that.year),
  1172. }
  1173. }).then(function (res) {
  1174. if(res.data.code==200){
  1175. that.groupnum=[];
  1176. let datainfo=res.data.data;
  1177. that.groupnum.push(['product',datainfo.yearData.yearName+'团组数量']);
  1178. for(let i=0;i<datainfo.quarterData.length;i++){
  1179. that.groupnum.push([datainfo.quarterData[i].quarterName,datainfo.quarterData[i].num]);
  1180. }
  1181. that.teamsl();
  1182. }else{
  1183. that.$message({
  1184. message: res.data.msg,
  1185. type: 'warning'
  1186. });
  1187. }
  1188. })
  1189. },
  1190. //获取会务数据统计
  1191. StatisticsConferenceCity(){
  1192. var url = "/api/Statistics/StatisticsConferenceCity"
  1193. var that = this
  1194. this.$axios({
  1195. method: 'post',
  1196. url: url,
  1197. headers: {
  1198. Authorization: 'Bearer '
  1199. },
  1200. data:{
  1201. year:that.getdate(that.year),
  1202. }
  1203. }).then(function (res) {
  1204. if(res.data.code==200){
  1205. // that.customersNumber=[];
  1206. // let datainfo=res.data.data;
  1207. // that.customersNumber.push(['product',datainfo.yearData.yearName+'出访人数']);
  1208. // for(let i=0;i<datainfo.quarterData.length;i++){
  1209. // that.customersNumber.push([datainfo.quarterData[i].quarterName,datainfo.quarterData[i].num]);
  1210. // }
  1211. // that.teamrs();
  1212. }else{
  1213. that.$message({
  1214. message: res.data.msg,
  1215. type: 'warning'
  1216. });
  1217. }
  1218. })
  1219. },
  1220. //获取国交数据统计数据出访人数
  1221. StatisticsGroupPeopleNum(){
  1222. var url = "/api/Statistics/StatisticsGroupPeopleNum"
  1223. var that = this
  1224. this.$axios({
  1225. method: 'post',
  1226. url: url,
  1227. headers: {
  1228. Authorization: 'Bearer '
  1229. },
  1230. data:{
  1231. year:that.getdate(that.year),
  1232. }
  1233. }).then(function (res) {
  1234. if(res.data.code==200){
  1235. that.customersNumber=[];
  1236. let datainfo=res.data.data;
  1237. that.customersNumber.push(['product',datainfo.yearData.yearName+'出访人数']);
  1238. for(let i=0;i<datainfo.quarterData.length;i++){
  1239. that.customersNumber.push([datainfo.quarterData[i].quarterName,datainfo.quarterData[i].num]);
  1240. }
  1241. that.teamrs();
  1242. }else{
  1243. that.$message({
  1244. message: res.data.msg,
  1245. type: 'warning'
  1246. });
  1247. }
  1248. })
  1249. },
  1250. //获取国交数据统计数据类型比例图
  1251. StatisticsCooperativeCustomerType(){
  1252. var url = "/api/Statistics/StatisticsCooperativeCustomerType"
  1253. var that = this
  1254. this.$axios({
  1255. method: 'post',
  1256. url: url,
  1257. headers: {
  1258. Authorization: 'Bearer '
  1259. },
  1260. data:{
  1261. year:that.getdate(that.year),
  1262. }
  1263. }).then(function (res) {
  1264. if(res.data.code==200){
  1265. that.scaleDrawing=[];
  1266. var newArr = res.data.data.map(item => ({
  1267. name: item.groupTypeName,
  1268. value: item.groupNum
  1269. }))
  1270. that.scaleDrawing=newArr;
  1271. that.teamblt();
  1272. }else{
  1273. that.$message({
  1274. message: res.data.msg,
  1275. type: 'warning'
  1276. });
  1277. }
  1278. })
  1279. },
  1280. //获取国交数据统计数据OP(年)
  1281. StatisticsOP(val){
  1282. this.fullscreenLoading=true;
  1283. var url = "/api/Statistics/StatisticsOP"
  1284. var that = this
  1285. this.$axios({
  1286. method: 'post',
  1287. url: url,
  1288. headers: {
  1289. Authorization: 'Bearer '
  1290. },
  1291. data:{
  1292. year:that.getdate(that.year),
  1293. type:val
  1294. }
  1295. }).then(function (res) {
  1296. if(res.data.code==200){
  1297. that.tableData=[];
  1298. that.tableData=res.data.data;
  1299. that.StatisticsOPmonth(2);
  1300. }else{
  1301. that.fullscreenLoading=false;
  1302. that.$message({
  1303. message: res.data.msg,
  1304. type: 'warning'
  1305. });
  1306. }
  1307. })
  1308. },
  1309. //获取国交数据统计数据OP(月)
  1310. StatisticsOPmonth(val){
  1311. var url = "/api/Statistics/StatisticsOP"
  1312. var that = this
  1313. this.$axios({
  1314. method: 'post',
  1315. url: url,
  1316. headers: {
  1317. Authorization: 'Bearer '
  1318. },
  1319. data:{
  1320. year:that.getdate(that.year),
  1321. type:val
  1322. }
  1323. }).then(function (res) {
  1324. if(res.data.code==200){
  1325. that.tableDatamonth=[];
  1326. that.tableDatamonth=res.data.data;
  1327. that.fullscreenLoading=false;
  1328. }else{
  1329. that.fullscreenLoading=false;
  1330. that.$message({
  1331. message: res.data.msg,
  1332. type: 'warning'
  1333. });
  1334. }
  1335. })
  1336. },
  1337. },
  1338. watch:{
  1339. invitationtop:{
  1340. handler(val,oldval){
  1341. // this.groupinvitation()
  1342. },
  1343. deep:true
  1344. },
  1345. },
  1346. mounted(){
  1347. this.StatisticsYOY();
  1348. // this.countrieschange(this.value);
  1349. // this.StatisticsOP(1);
  1350. // this.StatisticsAirTicket();
  1351. // this.StatisticsHotel();
  1352. // this.StatisticsInvitation();
  1353. }
  1354. }
  1355. </script>
  1356. <style>
  1357. .statistically-all{
  1358. background-color: #fff;
  1359. padding: 10px;
  1360. box-shadow: 0 0 5px #0005;
  1361. border-radius: 10px;
  1362. height: 100%;
  1363. min-height: 830px;
  1364. }
  1365. .canvas-box{
  1366. display: flex;
  1367. flex-wrap: wrap;
  1368. }
  1369. .yeardate{
  1370. margin-bottom: 10px;
  1371. }
  1372. .yeartableul{
  1373. width: 99.9%;
  1374. margin-bottom: 20px;
  1375. display: inline-flex;
  1376. border: 1px solid #E4E7ED;
  1377. }
  1378. .yeartableli{
  1379. width: 8.33%;
  1380. text-align: center;
  1381. }
  1382. .yeartableli div{
  1383. color: #555;
  1384. font-size: 12px;
  1385. overflow: hidden;
  1386. white-space: nowrap;
  1387. text-overflow: ellipsis;
  1388. padding: 8px;
  1389. }
  1390. .yeartableli div{
  1391. border-top: 1px solid #E4E7ED;
  1392. border-left: 1px solid #E4E7ED;
  1393. background-color: #fbfcff;
  1394. }
  1395. .canvas-box .yeartableli .hourbox{
  1396. border-top: 1px solid #E4E7ED;
  1397. border-left: 1px solid #E4E7ED;
  1398. background-color: #fbfcff;
  1399. font-weight:400 ;
  1400. }
  1401. .yeartableli div:nth-child(1){
  1402. border-top:none;
  1403. background-color: #f0f9ff;
  1404. color: #555;
  1405. font-weight: 600;
  1406. }
  1407. .yeartableli:nth-child(1) div{
  1408. border-left: none;
  1409. }
  1410. .monthtableul{
  1411. margin-bottom: 500px;
  1412. }
  1413. .monthtableli{
  1414. background-color: #fbfcff;
  1415. }
  1416. .canvas-box .monthtableli:nth-child(1){
  1417. background-color: #f0f9ff;
  1418. color: #555;
  1419. font-weight: 600;
  1420. }
  1421. .monthtableli{
  1422. font-size: 12px;
  1423. display: flex;
  1424. }
  1425. .monthtableli:nth-last-child(1){
  1426. border-bottom: 1px solid #E4E7ED;
  1427. }
  1428. .monthtablebox{
  1429. width: 8.3%;
  1430. overflow: hidden;
  1431. white-space: nowrap;
  1432. text-overflow: ellipsis;
  1433. padding: 8px;
  1434. border-top: 1px solid #E4E7ED;
  1435. border-left: 1px solid #E4E7ED;
  1436. }
  1437. .monthtablebox:nth-last-child(1){
  1438. border-right: 1px solid #E4E7ED;
  1439. }
  1440. .tabletitle{
  1441. font-size: 17px;
  1442. font-weight: 600;
  1443. color: #555;
  1444. margin-bottom:15px ;
  1445. }
  1446. /*设置table表格中每行的背景色 及 显示的字体颜色*/
  1447. .device_err .el-table tr {
  1448. background-color: #fbfcff !important;
  1449. font-weight: bold;
  1450. }
  1451. .el-table td.el-table__cell div{
  1452. text-align: center !important;
  1453. }
  1454. .el-table th.el-table__cell>.cell{
  1455. text-align: center !important;
  1456. }
  1457. .statistically-all .block{
  1458. margin-top: 10px;
  1459. text-align: center;
  1460. }
  1461. .Search-yscb-ul{
  1462. display: flex;
  1463. align-items: center;
  1464. margin-bottom: 10px;
  1465. }
  1466. .Search-yscb-ul label{
  1467. width: 70px;
  1468. }
  1469. .Search-yscb-ul .el-input{
  1470. width: 200px;
  1471. margin-right: 10px;
  1472. }
  1473. </style>