index.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175
  1. <template>
  2. <div class="app-container home">
  3. <div>
  4. <div style="display: flex; margin-bottom: 40px">
  5. <div style="width: 70%">
  6. <ul class="block">
  7. <li @click="jump('/purchaseRequest')">
  8. <div>
  9. <i
  10. class="el-icon-s-custom"
  11. style="font-size: 50px; text-align: center"
  12. ></i>
  13. <p>采购申请</p>
  14. </div>
  15. </li>
  16. <li @click="jump('/purchaseIssue')">
  17. <div>
  18. <i
  19. class="el-icon-upload2"
  20. style="font-size: 50px; text-align: center"
  21. ></i>
  22. <p>销售出库</p>
  23. </div>
  24. </li>
  25. <li @click="jump('/inStock')">
  26. <div>
  27. <i
  28. class="el-icon-download"
  29. style="font-size: 50px; text-align: center"
  30. ></i>
  31. <p>入库</p>
  32. </div>
  33. </li>
  34. <li @click="jump('/outStock')">
  35. <div>
  36. <i
  37. class="el-icon-upload2"
  38. style="font-size: 50px; text-align: center"
  39. ></i>
  40. <p>出库</p>
  41. </div>
  42. </li>
  43. <li @click="jump('/basicdata/fees')">
  44. <div>
  45. <i
  46. class="el-icon-connection"
  47. style="font-size: 50px; text-align: center"
  48. ></i>
  49. <p>新增物资</p>
  50. </div>
  51. </li>
  52. <li @click="jump('/finance/chargeInvoice')">
  53. <div>
  54. <i
  55. class="el-icon-wallet"
  56. style="font-size: 50px; text-align: center"
  57. ></i>
  58. <p>发票申请</p>
  59. </div>
  60. </li>
  61. <li @click="jump('/finance/salesInvoice')">
  62. <div>
  63. <i
  64. class="el-icon-money"
  65. style="font-size: 50px; text-align: center"
  66. ></i>
  67. <p>销项发票</p>
  68. </div>
  69. </li>
  70. <li @click="jump('')">
  71. <div>
  72. <i
  73. class="el-icon-s-management"
  74. style="font-size: 50px; text-align: center"
  75. ></i>
  76. <p>进项发票</p>
  77. </div>
  78. </li>
  79. <li @click="jump('/finance/charge')">
  80. <div>
  81. <i
  82. class="el-icon-takeaway-box"
  83. style="font-size: 50px; text-align: center"
  84. ></i>
  85. <p>收款</p>
  86. </div>
  87. </li>
  88. <li @click="jump('/finance/payment')">
  89. <div>
  90. <i
  91. class="el-icon-s-order"
  92. style="font-size: 50px; text-align: center"
  93. ></i>
  94. <p>付款</p>
  95. </div>
  96. </li>
  97. </ul>
  98. </div>
  99. <div style="width: 30%">
  100. <div style="width: 100%">
  101. <div style="display: flex">
  102. <div id="box" style="width: 100%; height: 350px"></div>
  103. <el-select
  104. v-model="select"
  105. slot="prepend"
  106. size="mini"
  107. :select="query()"
  108. placeholder="点击切换仓库"
  109. style="position: absolute; width: 8%; right: 1%"
  110. >
  111. <div v-for="(item, index) in warehouse" :key="index">
  112. <el-option
  113. :label="item.fName"
  114. :value="item.fWarehouseid"
  115. ></el-option>
  116. </div>
  117. </el-select>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <div style="display: flex; margin-bottom: 40px">
  123. <div style="width: 70%">
  124. <div>
  125. <div
  126. style="
  127. display: flex;
  128. color: #515a6e;
  129. font-weight: 600;
  130. background-color: #f8f8f9;
  131. height: 42.6px;
  132. font-size: 13px;
  133. justify-content: space-between;
  134. border-bottom: 1px dashed #dfe6ec;
  135. "
  136. >
  137. <div class="home_stock_table">委托方</div>
  138. <div class="home_stock_table">日期</div>
  139. <div class="home_stock_table">提单号</div>
  140. <div class="home_stock_table">业务类型</div>
  141. <div class="home_stock_table_right">
  142. <div>操作</div>
  143. <el-link type="primary" @click="jump('/morePage/stock')"
  144. >更多>
  145. </el-link
  146. >
  147. </div>
  148. </div>
  149. <div v-if="tableData.length > 0">
  150. <div
  151. style="
  152. display: flex;
  153. height: 42.6px;
  154. border-bottom: 1px dashed #dfe6ec;
  155. "
  156. v-for="(item, index) in tableData"
  157. :key="index"
  158. >
  159. <div class="home_stock_table"><p>{{ item.refno1 }}</p></div>
  160. <div class="home_stock_table" style="text-align: center">
  161. {{ item.sendTime ? item.sendTime.slice(0, 10) : item.sendTime }}
  162. </div>
  163. <div class="home_stock_table"><p>{{ item.refno1 }}</p></div>
  164. <div class="home_stock_table">
  165. <span v-if="item.refno2 === 'SJRK'">入库</span>
  166. <span v-else-if="item.refno2 === 'SJCK'">出库</span>
  167. <span v-else-if="item.refno2 === 'HQZY'">货转</span>
  168. <span v-else-if="item.refno2 === 'CKDB'">调拨</span>
  169. <span v-else-if="item.refno2 === 'CCF'">仓储费</span>
  170. <span v-else-if="item.refno2 === 'HWTG'">货物通关</span>
  171. <span v-else-if="item.refno2 === 'ZYF'">作业费</span>
  172. <span v-else-if="item.refno2 === 'SF'">收费</span>
  173. <span v-else-if="item.refno2 === 'DZ'">对账</span>
  174. <span v-else-if="item.refno2 === 'FF'">付费</span>
  175. <span v-else-if="item.refno2 === 'JSCCF'">计算仓储费</span>
  176. <span v-else-if="item.refno2 === 'KHDZ'">凯和对账</span>
  177. <span v-else-if="item.refno2 === 'KHSF'">凯和收费</span>
  178. <span v-else-if="item.refno2 === 'KHFF'">凯和付费</span>
  179. <span v-else-if="item.refno2 === 'ApplyFP'">凯和开票申请</span>
  180. <span v-else-if="item.refno2 === 'KHDD'">凯合订单</span>
  181. <span v-else-if="item.refno2 === 'SE'">下单配船</span>
  182. <span v-else-if="item.refno2 === 'SQ'">采购申请</span>
  183. <span v-else-if="item.refno2 === 'XS'">销售出库</span>
  184. <span v-else-if="item.refno2 === 'XMGL'">项目管理</span>
  185. </div>
  186. <div class="home_stock_table" @click="approval(item)">
  187. 查看详情
  188. </div>
  189. </div>
  190. </div>
  191. <div
  192. v-else
  193. style="
  194. display: flex;
  195. justify-content: center;
  196. height: 213px;
  197. border-bottom: 1px solid #dfe6ec;
  198. "
  199. >
  200. <div style="align-self: center; color: #909399; font-size: 14px">
  201. 暂无数据
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. <div style="width: 30%">
  207. <el-table
  208. :data="tableDataTwo"
  209. :header-cell-style="{ borderBottom: '1px dashed #dfe6ec' }"
  210. :cell-style="cellStyle"
  211. style="margin-left: 20px"
  212. >
  213. <el-table-column
  214. prop="noticeTitle"
  215. :show-overflow-tooltip="true"
  216. label="消息中心"
  217. />
  218. <el-table-column prop="address" label="操作" width="80">
  219. <template slot-scope="scope">
  220. <span
  221. @click="querytoDo(scope.row.noticeContent)"
  222. style="cursor: pointer"
  223. >查看详情</span
  224. >
  225. </template>
  226. </el-table-column>
  227. </el-table>
  228. </div>
  229. </div>
  230. <!-- <div style="display: flex">-->
  231. <!-- <div style="width: 70%">-->
  232. <!-- <div-->
  233. <!-- id="commoDity"-->
  234. <!-- style="width: 100%; height: 350px; margin-left: 40px"-->
  235. <!-- ></div>-->
  236. <!-- </div>-->
  237. <!-- <div style="width: 30%">-->
  238. <!-- <div id="cargoOwner" style="width: 100%; height: 350px"></div>-->
  239. <!-- </div>-->
  240. <!-- </div>-->
  241. </div>
  242. <el-dialog
  243. title="消息提示"
  244. :visible.sync="dialogVisible"
  245. width="80%"
  246. :before-close="handleClose"
  247. :close-on-click-modal="false"
  248. >
  249. <span
  250. v-html="text"
  251. class="text"
  252. style="max-width: 100%; height: auto"
  253. ></span>
  254. <span slot="footer" class="dialog-footer">
  255. <el-button type="primary" @click="dialogVisible = false"
  256. >关 闭</el-button
  257. >
  258. </span>
  259. </el-dialog>
  260. </div>
  261. </template>
  262. <script>
  263. import { queryHomeInfo } from '@/api/fleet/home'
  264. import {
  265. listCorps,
  266. information,
  267. warehouse,
  268. inquiry
  269. } from '../../src/api/index'
  270. import Cookies from 'js-cookie'
  271. export default {
  272. name: 'index',
  273. data() {
  274. return {
  275. bookingData: [
  276. { acc: 'T00345', bcc: '2020-5-12', caa: 'BUGASD', baa: 'ECCC-099897' },
  277. { acc: 'T00345', bcc: '2020-5-02', caa: 'BUGASD', baa: 'ECCC-099897' },
  278. { acc: 'T00345', bcc: '2020-5-05', caa: 'BUGASD', baa: 'ECCC-099897' },
  279. { acc: 'T00345', bcc: '2020-5-09', caa: 'BUGASD', baa: 'ECCC-099897' }
  280. ],
  281. editModel: {},
  282. // 版本号
  283. version: '3.2.1',
  284. select: '',
  285. text: '',
  286. dialogVisible: false,
  287. tableData: [],
  288. chart: [],
  289. warehouse: [],
  290. master: [],
  291. commodity: [],
  292. commoditytwo: [],
  293. name: [],
  294. tableDataTwo: [],
  295. fleetData: '',
  296. upperLeftCntrs: {},
  297. sysType: '',
  298. upperRights: []
  299. }
  300. },
  301. filters: {
  302. statusType(val) {
  303. switch (val) {
  304. case 10:
  305. return '车队安排'
  306. break
  307. case 20:
  308. return '司机受理'
  309. break
  310. case 30:
  311. return '司机出车'
  312. break
  313. case 40:
  314. return '提箱'
  315. break
  316. case 50:
  317. return '装卸货'
  318. break
  319. case 60:
  320. return '还卸柜'
  321. break
  322. case 70:
  323. return '费用确认'
  324. break
  325. default:
  326. return '回单'
  327. }
  328. }
  329. },
  330. created() {
  331. queryHomeInfo().then((response) => {
  332. console.log(response)
  333. this.fleetData = response.data
  334. if (response.data.upperRight.length > 0) {
  335. this.upperRights = response.data.upperRight.slice(0, 10)
  336. }
  337. this.upperLeftCntrs = response.data.upperLeftCntrs
  338. })
  339. this.sysType = Cookies.get('sysType')
  340. console.log(this.sysType)
  341. this.getList()
  342. this.warehouses()
  343. this.inquiry()
  344. },
  345. activated() {
  346. this.getList()
  347. this.warehouses()
  348. this.inquiry()
  349. this.boxDistribution()
  350. this.ranking()
  351. },
  352. methods: {
  353. //箱分布图表
  354. ranking() {
  355. // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
  356. let myChart = this.$echarts.init(document.getElementById('bookingRanking'))
  357. // 绘制图表
  358. myChart.setOption({
  359. title: {
  360. text: '订舱排名',
  361. left: 'center'
  362. },
  363. xAxis: {
  364. type: 'category',
  365. data: ['中国国贸集团', '赛轮集团', '金宇集团', '利群集团', '中华集团', '腾讯集团', '网易公司']
  366. },
  367. yAxis: {
  368. type: 'value'
  369. },
  370. series: [{
  371. data: [150, 230, 224, 218, 135, 147, 260],
  372. type: 'line'
  373. }]
  374. })
  375. },
  376. //箱分布图表
  377. boxDistribution() {
  378. // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
  379. let myChart = this.$echarts.init(document.getElementById('distribution'))
  380. // 绘制图表
  381. myChart.setOption({
  382. title: {
  383. text: '箱分布',
  384. left: 'center'
  385. },
  386. xAxis: {
  387. type: 'category',
  388. data: ['北京', '上海', '天津', '青岛', '深圳', '西安', '甘肃']
  389. },
  390. tooltip: {
  391. trigger: 'axis'
  392. },
  393. yAxis: {
  394. type: 'value'
  395. },
  396. toolbox: {
  397. feature: {
  398. saveAsImage: {}
  399. }
  400. },
  401. series: [{
  402. data: [150, 230, 224, 218, 135, 147, 260],
  403. type: 'line'
  404. }]
  405. })
  406. },
  407. goPage(id) {
  408. this.$router.push({
  409. path: '/track/cabinet',
  410. query: { id: id }
  411. })
  412. },
  413. //跳转审批页面
  414. approval(row) {
  415. console.log(row.refno2)
  416. switch (row.refno2) {
  417. case "XS":
  418. this.$router.push({
  419. path: '/purchaseIssue',
  420. query: {
  421. data: JSON.stringify(row),
  422. list: JSON.stringify(
  423. {
  424. type: 'primary',
  425. size: 'mini',
  426. icon: 'el-icon-edit-outline',
  427. name: '审批',
  428. disabled: false
  429. }
  430. )
  431. }
  432. })
  433. break
  434. case "SQ":
  435. this.$router.push({
  436. path: '/purchaseRequest',
  437. query: {
  438. data: JSON.stringify(row),
  439. list: JSON.stringify(
  440. {
  441. type: 'primary',
  442. size: 'mini',
  443. icon: 'el-icon-edit-outline',
  444. name: '审批',
  445. disabled: false
  446. }
  447. )
  448. }
  449. })
  450. break
  451. case 'XMGL':
  452. this.$router.push({
  453. path: '/project',
  454. query: {
  455. data: JSON.stringify(row),
  456. list: JSON.stringify(
  457. {
  458. type: 'primary',
  459. size: 'mini',
  460. icon: 'el-icon-edit-outline',
  461. name: '审批',
  462. disabled: false
  463. }
  464. )
  465. }
  466. })
  467. break
  468. case 'SJRK': {
  469. this.$router.push({
  470. path: '/business/inStock',
  471. query: { data: JSON.stringify(row) }
  472. })
  473. break
  474. }
  475. case 'SJCK': {
  476. this.$router.push({
  477. path: '/business/outStock',
  478. query: { data: JSON.stringify(row) }
  479. })
  480. break
  481. }
  482. case 'HQZY': {
  483. this.$router.push({
  484. path: '/business/goodsTransfer',
  485. query: { data: JSON.stringify(row) }
  486. })
  487. break
  488. }
  489. case 'CKDB': {
  490. this.$router.push({
  491. path: '/business/stockTransfer',
  492. query: { data: JSON.stringify(row) }
  493. })
  494. break
  495. }
  496. case 'HWTG': {
  497. this.$router.push({
  498. path: '/business/cargoClearance',
  499. query: { data: JSON.stringify(row) }
  500. })
  501. break
  502. }
  503. case 'JSCCF': {
  504. this.$router.push({
  505. path: '/business/agreement',
  506. query: { data: JSON.stringify(row) }
  507. })
  508. break
  509. }
  510. case 'CCF': {
  511. this.$router.push({
  512. path: '/agreement/agreementStorage',
  513. query: { data: JSON.stringify(row) }
  514. })
  515. break
  516. }
  517. case 'ZYF': {
  518. this.$router.push({
  519. path: '/agreement/agreementTask',
  520. query: { data: JSON.stringify(row) }
  521. })
  522. break
  523. }
  524. case 'SF': {
  525. this.$router.push({
  526. path: '/finance/charge',
  527. query: { data: JSON.stringify(row) }
  528. })
  529. break
  530. }
  531. case 'DZ': {
  532. this.$router.push({
  533. path: '/finance/contrast',
  534. query: { data: JSON.stringify(row) }
  535. })
  536. break
  537. }
  538. case 'FF': {
  539. this.$router.push({
  540. path: '/finance/payment',
  541. query: { data: JSON.stringify(row) }
  542. })
  543. break
  544. }
  545. case 'ApplyFP': {
  546. this.$router.push({
  547. path: '/finance/chargeInvoice',
  548. query: { data: JSON.stringify(row) }
  549. })
  550. break
  551. }
  552. case 'KHDZ': {
  553. this.$router.push({
  554. path: '/finance/contrast',
  555. query: { data: JSON.stringify(row) }
  556. })
  557. break
  558. }
  559. case 'KHSF': {
  560. this.$router.push({
  561. path: '/finance/charge',
  562. query: { data: JSON.stringify(row) }
  563. })
  564. break
  565. }
  566. case 'KHFF': {
  567. this.$router.push({
  568. path: '/finance/payment',
  569. query: { data: JSON.stringify(row) }
  570. })
  571. break
  572. }
  573. case 'KHDD': {
  574. this.$router.push({
  575. path: '/domesticTrade/orderInformation',
  576. query: { list: JSON.stringify(row) }
  577. })
  578. break
  579. }
  580. default: {
  581. return this.$message.error('未知错误,无状态')
  582. }
  583. }
  584. },
  585. inquiry() {
  586. let data = {
  587. actId: ''
  588. }
  589. inquiry(data).then((res) => {
  590. res.data.map(e => {
  591. if (e.auditItem) {
  592. e.auditItem = e.auditItem.slice(0, 10)
  593. }
  594. })
  595. this.tableData = res.data
  596. })
  597. },
  598. querytoDo(res) {
  599. this.dialogVisible = true
  600. this.text = res
  601. },
  602. handleClose(done) {
  603. this.dialogVisible = false
  604. },
  605. firstinventory(fId) {
  606. console.log(this.warehouse)
  607. information(fId).then((response) => {
  608. console.log(response)
  609. this.chart = response.data
  610. if (this.chart.whouseList.length !== 0) {
  611. for (let index of this.chart.corpsListWhouse) {
  612. this.master.push({
  613. name: index.fName,
  614. value: index.fGrossweightD
  615. })
  616. this.name.push(index.fName)
  617. }
  618. for (let index of this.chart.goodslistWhouse) {
  619. this.commodity.push(index.fName)
  620. this.commoditytwo.push(index.fGrossweightD)
  621. }
  622. this.drawLine()
  623. // this.drawLinetwo();
  624. // this.commoDity();
  625. } else {
  626. this.chart = {
  627. corpsListWhouse: [
  628. {
  629. balance: 0,
  630. fCorpid: 58,
  631. fGrossweightD: 0,
  632. fName: '展示数据',
  633. fTotalgross: 10000,
  634. fWarehouseName: '展示数据'
  635. }
  636. ],
  637. goodslistWhouse: [
  638. {
  639. balance: 0,
  640. fGoodsid: 13,
  641. fGrossweightD: 0,
  642. fName: '展示商品',
  643. fTotalgross: 10000,
  644. fWarehouseName: '展示数据'
  645. }
  646. ],
  647. whouseList: [
  648. {
  649. fGrossweightD: 0,
  650. fName: '展示数据',
  651. fTotalgross: 10000,
  652. fWarehouseid: 36
  653. }
  654. ]
  655. }
  656. for (let index of this.chart.corpsListWhouse) {
  657. this.master.push({
  658. name: index.fName,
  659. value: index.fGrossweightD
  660. })
  661. this.name.push(index.fName)
  662. }
  663. for (let index of this.chart.goodslistWhouse) {
  664. this.commodity.push(index.fName)
  665. this.commoditytwo.push(index.fGrossweightD)
  666. }
  667. this.drawLine()
  668. this.drawLinetwo()
  669. this.commoDity()
  670. }
  671. })
  672. },
  673. query() {
  674. this.master = []
  675. this.commodity = []
  676. this.commoditytwo = []
  677. this.name = []
  678. if (this.select === '') {
  679. return this.select
  680. } else {
  681. information(this.select).then((response) => {
  682. this.chart = response.data
  683. for (let index of this.chart.corpsListWhouse) {
  684. this.master.push({
  685. name: index.fName,
  686. value: index.fGrossweightD
  687. })
  688. this.name.push(index.fName)
  689. }
  690. for (let index of this.chart.goodslistWhouse) {
  691. this.commodity.push(index.fName)
  692. this.commoditytwo.push(index.fGrossweightD)
  693. }
  694. this.drawLine()
  695. // this.drawLinetwo();
  696. // this.commoDity();
  697. })
  698. }
  699. },
  700. jump(res) {
  701. this.$router.push({ path: res,query: { open: true}})
  702. },
  703. //设置单元格边框
  704. cellStyle({ row, column, rowIndex, columnIndex }) {
  705. return 'border-bottom: 1px dashed rgb(223, 230, 236)'
  706. },
  707. //查询消息中心
  708. getList() {
  709. this.loading = true
  710. listCorps(this.queryParams).then((response) => {
  711. console.log(response)
  712. if (response.rows.length > 0) {
  713. this.tableDataTwo = response.rows.slice(0, 10)
  714. }
  715. })
  716. },
  717. //查询仓库
  718. warehouses() {
  719. warehouse().then((response) => {
  720. this.warehouse = []
  721. for (let index of response.rows) {
  722. this.warehouse.push({
  723. fName: index.fName,
  724. fWarehouseid: index.fWarehouseid
  725. })
  726. }
  727. console.log(this.warehouse)
  728. this.firstinventory(this.warehouse[0].fWarehouseid)
  729. })
  730. },
  731. goTarget(href) {
  732. window.open(href, '_blank')
  733. },
  734. //仓库图表
  735. drawLine() {
  736. // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
  737. let myChart = this.$echarts.init(document.getElementById('box'))
  738. // 绘制图表
  739. myChart.setOption({
  740. title: {
  741. text: this.chart.whouseList[0].fName + '统计',
  742. subtext: '实时数据',
  743. left: 'center'
  744. },
  745. tooltip: {
  746. trigger: 'item',
  747. formatter: '{a} <br/>{b} : {c} ({d}%)'
  748. },
  749. legend: {
  750. bottom: 10,
  751. left: 'center',
  752. data: ['空闲库容', '占用库容']
  753. },
  754. series: [
  755. {
  756. type: 'pie',
  757. name: '实时数据',
  758. radius: '65%',
  759. center: ['50%', '50%'],
  760. selectedMode: 'single',
  761. data: [
  762. {
  763. label: {
  764. backgroundColor: '#eee',
  765. borderColor: '#777',
  766. borderWidth: 1,
  767. borderRadius: 4,
  768. rich: {
  769. title: {
  770. color: '#eee',
  771. align: 'center'
  772. },
  773. abg: {
  774. backgroundColor: '#333',
  775. width: '100%',
  776. align: 'right',
  777. height: 25,
  778. borderRadius: [4, 4, 0, 0]
  779. },
  780. Sunny: {
  781. height: 30,
  782. align: 'left'
  783. },
  784. Cloudy: {
  785. height: 30,
  786. align: 'left'
  787. },
  788. Showers: {
  789. height: 30,
  790. align: 'left'
  791. },
  792. weatherHead: {
  793. color: '#333',
  794. height: 24,
  795. align: 'left'
  796. },
  797. hr: {
  798. borderColor: '#777',
  799. width: '100%',
  800. borderWidth: 0.5,
  801. height: 0
  802. },
  803. value: {
  804. width: 20,
  805. padding: [0, 20, 0, 30],
  806. align: 'left'
  807. },
  808. valueHead: {
  809. color: '#333',
  810. width: 20,
  811. padding: [0, 20, 0, 30],
  812. align: 'center'
  813. },
  814. rate: {
  815. width: 40,
  816. align: 'right',
  817. padding: [0, 10, 0, 0]
  818. },
  819. rateHead: {
  820. color: '#333',
  821. width: 40,
  822. align: 'center',
  823. padding: [0, 10, 0, 0]
  824. }
  825. }
  826. }
  827. },
  828. {
  829. value: this.chart.whouseList[0].fGrossweightD,
  830. name: '占用库容'
  831. },
  832. {
  833. value: parseFloat(
  834. this.chart.whouseList[0].fTotalgross -
  835. this.chart.whouseList[0].fGrossweightD
  836. ).toFixed(1),
  837. name: '空闲库容'
  838. }
  839. ],
  840. emphasis: {
  841. itemStyle: {
  842. shadowBlur: 10,
  843. shadowOffsetX: 0,
  844. shadowColor: 'rgba(0, 0, 0, 0.5)'
  845. }
  846. }
  847. }
  848. ]
  849. })
  850. },
  851. drawLinetwo() {
  852. // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
  853. let myChart = this.$echarts.init(document.getElementById('cargoOwner'))
  854. // 绘制图表
  855. myChart.setOption({
  856. title: {
  857. text: this.chart.whouseList[0].fName + '货权方统计',
  858. subtext: '实时数据',
  859. left: 'center'
  860. },
  861. tooltip: {
  862. trigger: 'item',
  863. formatter: '{a} <br/>{b}: {c} ({d}%)'
  864. },
  865. legend: {
  866. bottom: 10,
  867. left: 'center',
  868. data: this.name
  869. },
  870. series: [
  871. {
  872. name: '访问来源',
  873. type: 'pie',
  874. radius: ['40%', '60%'],
  875. avoidLabelOverlap: false,
  876. label: {
  877. show: false,
  878. position: 'center'
  879. },
  880. emphasis: {
  881. label: {
  882. // show: true,
  883. fontSize: '30',
  884. fontWeight: 'bold'
  885. }
  886. },
  887. labelLine: {
  888. show: false
  889. },
  890. data: this.master
  891. }
  892. ]
  893. })
  894. },
  895. commoDity() {
  896. // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
  897. let myChart = this.$echarts.init(document.getElementById('commoDity'))
  898. // 绘制图表
  899. myChart.setOption({
  900. title: {
  901. text: this.chart.whouseList[0].fName + '商品统计',
  902. subtext: '实时数据',
  903. left: 'center'
  904. },
  905. color: ['#3398DB'],
  906. tooltip: {
  907. trigger: 'axis',
  908. axisPointer: {
  909. // 坐标轴指示器,坐标轴触发有效
  910. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  911. }
  912. },
  913. grid: {
  914. left: '3%',
  915. right: '4%',
  916. bottom: '3%',
  917. containLabel: true
  918. },
  919. xAxis: [
  920. {
  921. type: 'category',
  922. data: this.commodity,
  923. axisTick: {
  924. alignWithLabel: true
  925. }
  926. }
  927. ],
  928. yAxis: [
  929. {
  930. type: 'value'
  931. }
  932. ],
  933. series: [
  934. {
  935. name: '实时状态',
  936. type: 'bar',
  937. barWidth: '60%',
  938. data: this.commoditytwo
  939. }
  940. ]
  941. })
  942. }
  943. }
  944. }
  945. </script>
  946. <style scoped lang="scss">
  947. .block {
  948. width: 100%;
  949. display: flex;
  950. flex-wrap: wrap;
  951. justify-content: space-around;
  952. li:hover {
  953. background-color: #025184;
  954. }
  955. li:nth-child(6),
  956. li:nth-child(7),
  957. li:nth-child(8),
  958. li:nth-child(9),
  959. li:nth-child(10) {
  960. background-color: #2f4554;
  961. }
  962. li:nth-child(6):hover,
  963. li:nth-child(7):hover,
  964. li:nth-child(8):hover,
  965. li:nth-child(9):hover,
  966. li:nth-child(10):hover {
  967. background-color: #2f4454d1;
  968. }
  969. li {
  970. width: 18%;
  971. height: 150px;
  972. background-color: #1c84c6;
  973. margin-left: 10px;
  974. text-align: center;
  975. color: #ffffff;
  976. border-radius: 10px;
  977. cursor: pointer;
  978. margin-bottom: 15px;
  979. div {
  980. margin-top: 40px;
  981. p {
  982. font-size: 20px;
  983. }
  984. }
  985. }
  986. }
  987. .home {
  988. blockquote {
  989. padding: 10px 20px;
  990. margin: 0 0 20px;
  991. font-size: 17.5px;
  992. border-left: 5px solid #eee;
  993. }
  994. hr {
  995. margin-top: 20px;
  996. margin-bottom: 20px;
  997. border: 0;
  998. border-top: 1px solid #eee;
  999. }
  1000. .col-item {
  1001. margin-bottom: 20px;
  1002. }
  1003. ul {
  1004. padding: 0;
  1005. margin: 0;
  1006. }
  1007. font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  1008. font-size: 13px;
  1009. color: #676a6c;
  1010. overflow-x: hidden;
  1011. ul {
  1012. list-style-type: none;
  1013. }
  1014. h4 {
  1015. margin-top: 0px;
  1016. }
  1017. h2 {
  1018. margin-top: 10px;
  1019. font-size: 26px;
  1020. font-weight: 100;
  1021. }
  1022. p {
  1023. margin-top: 10px;
  1024. b {
  1025. font-weight: 700;
  1026. }
  1027. }
  1028. .update-log {
  1029. ol {
  1030. display: block;
  1031. list-style-type: decimal;
  1032. margin-block-start: 1em;
  1033. margin-block-end: 1em;
  1034. margin-inline-start: 0;
  1035. margin-inline-end: 0;
  1036. padding-inline-start: 40px;
  1037. }
  1038. }
  1039. }
  1040. .home-fleet {
  1041. display: flex;
  1042. .home-left {
  1043. width: 40%;
  1044. padding: 0 10px;
  1045. }
  1046. .home-right {
  1047. width: 60%;
  1048. padding: 0 10px;
  1049. }
  1050. .content-top {
  1051. display: flex;
  1052. .content-top-left {
  1053. display: flex;
  1054. width: 50%;
  1055. height: 100px;
  1056. border-bottom: 1px solid #e6ebf5;
  1057. border-right: 1px solid #e6ebf5;
  1058. padding: 10px;
  1059. justify-content: space-between;
  1060. }
  1061. .content-top-right {
  1062. display: flex;
  1063. width: 50%;
  1064. height: 100px;
  1065. border-bottom: 1px solid #e6ebf5;
  1066. padding: 10px;
  1067. justify-content: space-between;
  1068. }
  1069. }
  1070. .content-bottom {
  1071. display: flex;
  1072. height: 81px;
  1073. border-bottom: 1px solid #e6ebf5;
  1074. padding: 10px;
  1075. justify-content: space-between;
  1076. }
  1077. .content-bottom:last-child {
  1078. border-bottom: 0px;
  1079. }
  1080. .upper-right {
  1081. padding: 10px 0;
  1082. height: 260px;
  1083. }
  1084. .upper-right2 {
  1085. padding: 10px 0;
  1086. height: 104px;
  1087. }
  1088. }
  1089. .single_line {
  1090. overflow: hidden;
  1091. text-overflow: ellipsis;
  1092. white-space: nowrap;
  1093. }
  1094. @media screen and (max-width: 920px) {
  1095. .home-fleet {
  1096. display: flex;
  1097. flex-direction: column;
  1098. .home-left {
  1099. width: 100%;
  1100. }
  1101. .home-right {
  1102. width: 100%;
  1103. }
  1104. }
  1105. }
  1106. </style>
  1107. <style lang="scss">
  1108. .text img {
  1109. max-width: 100%;
  1110. height: auto;
  1111. }
  1112. .home_stock_table {
  1113. display: flex;
  1114. width: 20%;
  1115. justify-content: center;
  1116. align-self: center;
  1117. p {
  1118. display: inline-block;
  1119. white-space: nowrap;
  1120. width: 100%;
  1121. overflow: hidden;
  1122. text-overflow: ellipsis;
  1123. text-align: center;
  1124. }
  1125. }
  1126. .home_stock_table:hover {
  1127. color: #1c84c6;
  1128. cursor: pointer
  1129. }
  1130. .home_stock_table_right {
  1131. display: flex;
  1132. width: 20%;
  1133. justify-content: space-around;
  1134. align-self: center;
  1135. }
  1136. </style>