Statistically.vue 62 KB

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