Statistically.vue 63 KB

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