maxScreen.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463
  1. <template>
  2. <div class="maxScreen">
  3. <!-- <div v-show="step === 0" class="tc">
  4. <div class="plr15 pt20">
  5. <van-field v-model="deviceNum" clearable label="" placeholder="请输入设备编号" />
  6. </div>
  7. <div class="tc mt20">
  8. <van-button color="#17b3ec" @click="init(1)" type="primary">启动</van-button>
  9. </div>
  10. </div> -->
  11. <div class="step-1">
  12. <div class="title-banner ">
  13. <img src="./img/maxTitle1.png" alt="" />
  14. <img src="./img/i-maxzizhu.png" alt="" />
  15. </div>
  16. <div class="wrapper">
  17. <div class="item" @click="indexFuncClick({ contentType: 1, nextContentType: 13 })">
  18. <img src="./img/zzqy.png" />
  19. </div>
  20. <div class="item" @click="indexFuncClick({ contentType: 1, nextContentType: 4 })">
  21. <img src="./img/mzjs.png" />
  22. </div>
  23. <div class="item" @click="indexFuncClick({ contentType: 1, nextContentType: 20 })">
  24. <img src="./img/ycz.png" />
  25. </div>
  26. </div>
  27. <van-swipe class="swipe">
  28. <van-swipe-item v-for="(item, index) in videoList" :key="index" @click="gotoDetail(item)">
  29. <template v-if="item.categoryCode == 1">
  30. <video class="swipe-item-video" loop autoplay muted :src="setImgUrl(item.url)"></video>
  31. </template>
  32. <template v-else>
  33. <img :src="setImgUrl(item.url)" />
  34. </template>
  35. </van-swipe-item>
  36. </van-swipe>
  37. <div class="activeWrapper" @click="toSmallScreen">
  38. <div class="left">
  39. <img src="./img/ax.png" style="width: 15px;height: 15px;object-fit: cover;margin-right: 5px;" />
  40. <div style="font-weight: bold;font-size: 11px;color: #3D92E0;">
  41. 医院动态 |
  42. </div>
  43. </div>
  44. <div class="right" v-if="ggList.length">{{ ggContent }}</div>
  45. <div class="right" v-else>暂无数据</div>
  46. </div>
  47. <div class="footer">
  48. <div class="qrcodeTest">
  49. <div @click="playTest" class="qrcode ">
  50. <img src="./img/igongzhonghao.png" alt="" />
  51. </div>
  52. <div class="text">
  53. <div>微信【扫一扫】</div>
  54. <div>关注厦门i健康公众号</div>
  55. </div>
  56. </div>
  57. <div class="qrcodeTest">
  58. <div class="qrcode ">
  59. <img src="./img/iapp.png" alt="" />
  60. </div>
  61. <div class="text">
  62. <div>微信【扫一扫】</div>
  63. <div>下载厦门i健康</div>
  64. </div>
  65. </div>
  66. <div class="qrcodeTest">
  67. <div class="qrcode ">
  68. <img src="./img/weixin.png" alt="" />
  69. </div>
  70. <div class="text">
  71. <div>微信【扫一扫】</div>
  72. <div>打开儿童医保码</div>
  73. </div>
  74. </div>
  75. <div class="qrcodeTest">
  76. <div class="qrcode ">
  77. <img src="./img/zhifubao.png" alt="" />
  78. </div>
  79. <div class="text">
  80. <div>支付宝【扫一扫】</div>
  81. <div>打开儿童医保码</div>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="lck">
  86. <div @click="show(2)">取药说明</div>
  87. <div style="width: 1px;height: 16px;background: #3D92E0;"></div>
  88. <div @click="show(1)">处方续方说明</div>
  89. <div style="width: 1px;height: 16px;background: #3D92E0;"></div>
  90. <div @click="show(3)">门诊结算说明</div>
  91. </div>
  92. <div style="text-align: center;margin-top: 9px;">
  93. <div style="font-weight: 500;font-size: 12px;color: #FFFFFF;white-space: nowrap; transform: scale(0.66);">
  94. 主办方:厦门市思明区人民政府鼓浪屿街道办事处 | 厦门市鼓浪屿医院
  95. </div>
  96. <div><img src="./img/logomax.png" alt="" style="height: 13px;width: 162px;" /></div>
  97. </div>
  98. </div>
  99. <div class="illustration-mask" v-show="illustrationMskShow">
  100. <div class="illustration-inner">
  101. <img v-show="curImg == 1" class="pic" src="./img/chufang_tankang_img.png" alt="" />
  102. <img v-show="curImg == 2" class="pic" src="./img/quyao_tankuang_img.png" alt="" />
  103. <img v-show="curImg == 3" class="pic" src="./img/z-menzhenjiesuanliuc.png" alt="" />
  104. <div class="close">
  105. <span>{{ times }}s</span>
  106. <img @click="close1()" src="./img/z-guanbi.png" alt="" />
  107. </div>
  108. </div>
  109. </div>
  110. <div v-if="step==4">
  111. <Instro @onClose="step=1"/>
  112. </div>
  113. <Recharge ref="Recharge" :orgCode="orgCode" :deviceNum="deviceNum"
  114. :cardSn="cardSn" :cardNo="cardNo" :idcard="idcard" :userName="userName"
  115. @onClose="isShow=true" @onShow="isShow=false"/>
  116. <DrugTaking ref="DrugTaking" :orgCode="orgCode" :deviceNum="deviceNum" @startSendShipment="startSendShipment"
  117. :cardSn="cardSn" :cardNo="cardNo" :idcard="idcard" :userName="userName"
  118. @onClose="isShow=true" @onShow="isShow=false" @printSettle="printSettle"/>
  119. <TipsDialog ref="TipsDialog" @onPickCompleteClose="$refs.DrugTaking&&$refs.DrugTaking.onClose()" @readcard="readcard" @SetPrintPage="SetPrintPage"/>
  120. <audio id='audioPlay' src='' hidden='true'/>
  121. </div>
  122. </template>
  123. <script>
  124. import { playAudio } from '@/views/machine/utils/audioPlay.js'
  125. import Illustration from './components/Illustration.vue'
  126. import Instro from './components/Instro.vue'
  127. import Recharge from './components/Recharge.vue'
  128. import DrugTaking from './components/DrugTaking.vue'
  129. import TipsDialog from './components/TipsDialog.vue'
  130. import medicineAbinetApi from '@/api/api-medicineAbinet'
  131. import socketUtils from './utils/socket'
  132. import ybUtils from './utils/ybUtils'
  133. import ybApi from '@/api/api-yb'
  134. var countDownFunc,
  135. timeoutInterval,
  136. readCardCountDown,
  137. test = 0,
  138. closeThread,
  139. TIMES = 60
  140. export default {
  141. name: 'machineIndex',
  142. components: {
  143. DrugTaking,
  144. TipsDialog,
  145. Recharge,
  146. Instro,
  147. Illustration
  148. },
  149. data() {
  150. return {
  151. funcMgn: {
  152. jiesuan: true,
  153. quyao: true,
  154. yujiaojin: true
  155. },
  156. timer: null,
  157. curImg: '',
  158. isErr: 2, //1设备维护 2正常使用
  159. deviceNum: this.$route.query.deviceNum, //|| '14912202107000001500000000000000',//14912202107000001500000000000000 14912202111000001000000000000000
  160. step: 0, //0启动页 1首页 2扫码页 3订单页
  161. times: TIMES,
  162. curImg: '',
  163. illustrationMskShow: false,
  164. socketUrl: '',
  165. socket: '',
  166. layerNo: '0',
  167. ggContent: '',
  168. currentIndex: 0, // 当前项的索引
  169. ggList: [],
  170. wayerNo: '0',
  171. forceClose: false,
  172. heartbitInterval: '',
  173. currindex: 0,
  174. orderdetail: [],
  175. rsType: 0, // 1:订单信息 2订单错误 3订单成功 4出药完成 5订单列表
  176. imgList: [],
  177. videoList: [],
  178. inCheckBarcode: false,
  179. orderInfo: '',
  180. orderList: [],
  181. times: 30,
  182. shippingType: '', //取药方式(1、扫码,2、医保卡)
  183. inOut: false,
  184. eventName: '',
  185. showPrintComplete: false,
  186. nextOrderDetail: '',
  187. oldCardNo: '',
  188. reconnect: false,
  189. orgCode: '',
  190. isTest: false,
  191. cardSn: '',
  192. cardNo: '',
  193. idcard: '',
  194. userName: '',
  195. isShow: true,
  196. humidity: '',
  197. temperature: '',
  198. prevReadCard: false,
  199. printType: ''
  200. }
  201. },
  202. watch: {
  203. step(n) {
  204. if (n == 2) {
  205. this.clearCountDown()
  206. this.countDown()
  207. } else if (n != 3) {
  208. this.rsType = 0
  209. this.oldCardNo = ''
  210. }
  211. },
  212. rsType(n) {
  213. this.clearCountDown()
  214. if (n != 4 && this.step == 3) {
  215. this.countDown()
  216. }
  217. }
  218. },
  219. created() {
  220. //由于开太久会导致程序崩溃, 设定每天凌晨3点重载页面
  221. setInterval(() => {
  222. var d = new Date()
  223. if (d.getHours() == 3) {
  224. this.systemUpdate()
  225. }
  226. }, 30 * 60 * 1000)
  227. window.vm2 = this
  228. this.init()
  229. window.socketUtils = socketUtils
  230. },
  231. methods: {
  232. gotoDetail(item) {
  233. if (item.linkUrl) {
  234. window.location.href = item.linkUrl
  235. } else if (item.content) {
  236. var obj = {
  237. title: item.title,
  238. url: item.url,
  239. content: item.content
  240. }
  241. this.$router.push({ path: '/machine/detail', query: { item: JSON.stringify(obj) } })
  242. }
  243. },
  244. show(type) {
  245. this.curImg = type
  246. this.illustrationMskShow = true
  247. closeThread = setInterval(() => {
  248. this.times--
  249. if (this.times == 0) {
  250. this.close1()
  251. }
  252. }, 1000)
  253. },
  254. close1() {
  255. this.illustrationMskShow = false
  256. this.times = TIMES
  257. if (closeThread) {
  258. clearInterval(closeThread)
  259. }
  260. },
  261. indexFuncClick(data) {
  262. var { jiesuan, quyao, yujiaojin } = this.funcMgn
  263. if (data.nextContentType == 13) {
  264. if (quyao === true) {
  265. this.onPrevReadCard(data)
  266. } else {
  267. this.$toast(quyao || '该功能暂未开放')
  268. }
  269. } else if (data.nextContentType == 4) {
  270. if (jiesuan === true) {
  271. this.onPrevReadCard(data)
  272. } else {
  273. this.$toast(jiesuan || '该功能暂未开放')
  274. }
  275. } else if (data.nextContentType == 20) {
  276. if (yujiaojin === true) {
  277. this.onPrevReadCard(data)
  278. } else {
  279. this.$toast(yujiaojin || '该功能暂未开放')
  280. }
  281. }
  282. },
  283. loopCharge(v, item, j) {
  284. return new Promise((resolve, reject) => {
  285. item.sort = j
  286. setTimeout(() => {
  287. resolve()
  288. }, 1000)
  289. })
  290. },
  291. async playTest() {
  292. return
  293. var list = [
  294. { needCharge: true, chargeList: [{}, {}] },
  295. { needCharge: true, chargeList: [{}, {}] }
  296. ]
  297. var isErr = false
  298. for (var i = 0; i < list.length; i++) {
  299. var v = list[i]
  300. if (v.needCharge) {
  301. for (var j = 0; j < v.chargeList.length; j++) {
  302. var res = await this.loopCharge(v, v.chargeList[j], i + j).catch(err => {
  303. isErr = err
  304. // api.saveCheckHttpLog.call(this, (err&&err.message) || err, 'chargeByYb', reqParams, _.map(list, v=>{return v.RECIPE_NO}).join(","))
  305. reject(err)
  306. })
  307. console.log(i + ',' + j)
  308. if (isErr || res) {
  309. console.log(isErr || res)
  310. return reject(isErr || res)
  311. }
  312. }
  313. }
  314. }
  315. console.log(list)
  316. return
  317. this.showTipsDialog({
  318. contentType: 1,
  319. payUrl: 'aaa',
  320. nextContentType: 20
  321. })
  322. return
  323. playAudio(test)
  324. test++
  325. },
  326. SetPrintPageTest() {
  327. socketUtils.SetPrintPageTest()
  328. },
  329. printSettle(obj) {
  330. this.printType = 2
  331. // socketUtils.getMessage({
  332. // data: JSON.stringify({
  333. // type: 'PrintComplete',
  334. // mess: '',
  335. // })
  336. // })
  337. socketUtils.send(obj)
  338. },
  339. clearCountDown() {
  340. if (countDownFunc) {
  341. clearInterval(countDownFunc)
  342. }
  343. },
  344. onPrevReadCard(params) {
  345. playAudio(16)
  346. this.prevReadCard = params
  347. readCardCountDown = setTimeout(() => {
  348. this.$toast.clear()
  349. this.clearReadCardCountDown()
  350. if (this.prevReadCard) {
  351. this.showTipsDialog(this.prevReadCard)
  352. this.prevReadCard = false
  353. }
  354. }, 30000)
  355. this.$loading(' ')
  356. this.readcard()
  357. },
  358. startSendShipment: function(data) {
  359. var item = data.item
  360. if (item.status == -99) {
  361. this.showTipsDialog({
  362. contentType: 3,
  363. message: '该订单已被锁定,请联系药房处理'
  364. })
  365. return
  366. }
  367. playAudio(2)
  368. socketUtils.sendShipment(item, data.shippingType)
  369. },
  370. showTipsDialog(item) {
  371. this.$EventBus.$emit('MachineTipsDialog', item)
  372. },
  373. readcard(data) {
  374. if (data == 1) {
  375. //医保凭证
  376. var TipsDialog = this.$refs.TipsDialog
  377. // this.$refs.DrugTaking.toolReadcardMsg({}, TipsDialog.nextContentType)
  378. // return
  379. // if(TipsDialog.nextContentType == 20){
  380. // this.$refs.Recharge.show({
  381. // contentType: 1
  382. // })
  383. // } else {
  384. // this.$refs.DrugTaking.toolReadcardMsg({}, TipsDialog.nextContentType)
  385. // }
  386. // return
  387. ybUtils
  388. .readCardInfo(
  389. {
  390. equ_num: this.deviceNum,
  391. orgCode: this.orgCode,
  392. mdtrt_cert_type: '01' //凭证类型01扫医保凭证 02身份证 03医保卡
  393. },
  394. this.deviceNum
  395. )
  396. .then(res => {
  397. var CardInfo = res
  398. res = res.output ? res.output.baseinfo : res.data.output.baseinfo
  399. this.cardSn = ''
  400. this.cardNo = res.cardno
  401. this.idcard = res.certno
  402. this.userName = res.psn_name
  403. this.$nextTick(() => {
  404. if (TipsDialog.nextContentType == 20) {
  405. this.$refs.Recharge.show({
  406. contentType: 1
  407. })
  408. } else {
  409. this.$refs.DrugTaking.toolReadcardMsg({}, TipsDialog.nextContentType, '', CardInfo, '01')
  410. }
  411. })
  412. })
  413. .catch(err => {
  414. console.error(err)
  415. this.showTipsDialog({
  416. contentType: 3,
  417. message: (err && err.message) || err
  418. })
  419. playAudio(15)
  420. })
  421. return
  422. }
  423. if (data == 12) {
  424. // 临时卡
  425. socketUtils.sendReadCard('ReadTempCard')
  426. return
  427. }
  428. if (data) {
  429. var TipsDialog = this.$refs.TipsDialog
  430. this.$refs.DrugTaking.toolReadcardMsg({}, TipsDialog.nextContentType, data)
  431. return
  432. }
  433. socketUtils.sendReadCard()
  434. },
  435. init() {
  436. if (!this.deviceNum) {
  437. return
  438. }
  439. this.findById()
  440. this.devinfoAdvList(1)
  441. this.devinfoAdvList(2)
  442. socketUtils.$on('inited', () => {
  443. this.step = 1
  444. console.log('inited')
  445. })
  446. socketUtils.$on('onMessage', msg => {
  447. if (msg.type == 'CardInfo') {
  448. var TipsDialog = this.prevReadCard ? this.prevReadCard : this.$refs.TipsDialog
  449. if (this.prevReadCard || TipsDialog.contentType == 2) {
  450. if (
  451. this.prevReadCard &&
  452. (msg.mess.indexOf('IC卡没有插入') != -1 || msg.mess.indexOf('未插卡') != -1 || msg.mess.indexOf('读取临时卡信息失败') != -1 || msg.mess.indexOf('读取信息失败') != -1)
  453. ) {
  454. if (msg.mess.indexOf('读取临时卡信息失败') != -1) {
  455. //已经读取医保卡和临时卡 并都未读取到卡信息
  456. this.clearReadCardCountDown()
  457. this.$toast.clear()
  458. this.showTipsDialog(this.prevReadCard)
  459. this.prevReadCard = false
  460. } else {
  461. //读取不到医保卡 继续读取临时卡
  462. this.readcard(12)
  463. }
  464. return
  465. }
  466. this.clearReadCardCountDown()
  467. this.$toast.clear()
  468. this.prevReadCard = false
  469. if (
  470. msg.mess.indexOf('异常') != -1 ||
  471. msg.mess.indexOf('读取信息失败') != -1 ||
  472. msg.mess.indexOf('读取识别码失败') != -1 ||
  473. msg.mess.indexOf('读取临时卡信息失败') != -1
  474. ) {
  475. playAudio(3)
  476. this.showTipsDialog({
  477. contentType: 3,
  478. message: msg.mess
  479. })
  480. return
  481. }
  482. //等待读卡的时候 才处理
  483. var arr = msg.mess.split('\n')
  484. var json = {}
  485. arr.forEach(v => {
  486. var tmp = v.split(':')
  487. json[tmp[0]] = tmp[1]
  488. })
  489. this.cardSn = json['卡识别码']
  490. this.cardNo = json['卡号']
  491. this.idcard = json['身份证号']
  492. this.userName = json['姓名']
  493. this.$nextTick(() => {
  494. if (TipsDialog.nextContentType == 20) {
  495. this.$refs.Recharge.show({
  496. contentType: 1
  497. })
  498. } else {
  499. this.$loading(' ')
  500. this.$refs.TipsDialog.nextContentType = TipsDialog.nextContentType
  501. this.$refs.DrugTaking.toolReadcardMsg(msg, TipsDialog.nextContentType)
  502. }
  503. })
  504. } else {
  505. this.clearReadCardCountDown()
  506. this.$toast.clear()
  507. }
  508. } else if (msg.type == 'medical_recharge') {
  509. // message:"{\"result\":\"succ\",\"resultName\":\"支付成功交易成功\"}"
  510. var TipsDialog = this.$refs.TipsDialog
  511. if (!TipsDialog || TipsDialog.contentType != 7) {
  512. return
  513. }
  514. var mess = JSON.parse(msg.mess)
  515. if (mess.payUrl == TipsDialog.payUrl) {
  516. if (mess.result == 'succ') {
  517. this.showTipsDialog({
  518. contentType: 16
  519. })
  520. this.$EventBus.$emit('RechargeEvent', { type: 'onPayed' })
  521. } else {
  522. this.showTipsDialog({
  523. contentType: 3,
  524. message: mess.resultName
  525. })
  526. }
  527. }
  528. } else if (msg.type == 'PrintComplete') {
  529. if (this.printType == 1) {
  530. this.showTipsDialog({
  531. contentType: 3,
  532. message: '您的医嘱已打印,请注意取走医嘱',
  533. isPickComplete: true
  534. })
  535. } else {
  536. this.showTipsDialog({
  537. contentType: 8,
  538. isHis: this.$refs.DrugTaking && this.$refs.DrugTaking.isHis
  539. })
  540. }
  541. } else if (msg.type == 'humidity_temperature') {
  542. var mess = JSON.parse(msg.mess)
  543. this.humidity = mess.now_humidity
  544. this.temperature = mess.now_temperature
  545. }
  546. })
  547. socketUtils.$on('checkNextEvent', msg => {
  548. this.checkNextEvent(msg.type, msg)
  549. })
  550. socketUtils.init({
  551. deviceNum: this.deviceNum,
  552. isTest: this.isTest
  553. })
  554. },
  555. findById() {
  556. this.$loading('加载中..')
  557. let p = {
  558. equNum: this.deviceNum
  559. }
  560. medicineAbinetApi
  561. .findDeviceByIdNoLogin(p)
  562. .then(res => {
  563. console.log('findDeviceByIdNoLogin', res)
  564. this.$toast.clear()
  565. // this.isErr = res.obj.saleStatus==1? 2 : 1
  566. this.isErr = 2
  567. this.orgCode = res.obj.belongCommunity
  568. this.humidity = res.obj.nowHumidity
  569. this.temperature = res.obj.nowTemperature
  570. if (res.obj.modules) {
  571. try {
  572. this.funcMgn = JSON.parse(res.obj.modules)
  573. } catch (error) {
  574. console.error(error)
  575. }
  576. }
  577. // this.funcMgn = {
  578. // jiesuan: "111",
  579. // quyao: "dsfasd",
  580. // yujiaojin: "该功能暂未开放",
  581. // }
  582. })
  583. .catch(err => {
  584. console.error(err)
  585. })
  586. },
  587. onPrev() {
  588. this.nextOrderDetail = ''
  589. this.showPrintComplete = false
  590. if (this.step == 2) {
  591. this.step = 1
  592. } else {
  593. if (this.rsType == 5) {
  594. this.step = 1
  595. } else if (this.rsType == 1 || this.rsType == 2 || this.rsType == 4) {
  596. var orderLen = this.orderList && this.orderList.length > 1
  597. if (orderLen) {
  598. if (this.rsType == 4) {
  599. this.orderList.splice(this.orderList.indexOf(this.orderInfo), 1)
  600. }
  601. this.rsType = 5
  602. } else {
  603. this.step = 1
  604. }
  605. }
  606. }
  607. },
  608. updateAdvice(arr) {
  609. this.timer = setInterval(() => {
  610. this.ggContent = arr[this.currentIndex % arr.length].title
  611. this.currentIndex++
  612. }, 3000)
  613. },
  614. devinfoAdvList(type) {
  615. var p = {
  616. page: 1,
  617. size: 5,
  618. publishLocation: type
  619. }
  620. medicineAbinetApi
  621. .getByPublishLocation(p)
  622. .then(res => {
  623. console.log('devinfoAdvList', res)
  624. this.$toast.clear()
  625. if (res.status == 200) {
  626. if (type == 1) {
  627. this.videoList = res.detailModelList
  628. } else {
  629. if (res.detailModelList.length > 0) {
  630. this.ggList = res.detailModelList
  631. // 使用setInterval定时更新currentIndex
  632. this.updateAdvice(this.ggList)
  633. }
  634. }
  635. console.log(this.videoList, 'lkkkkkkkkkkkkkkkkkkkkkkkk')
  636. } else {
  637. this.$toast(res.message || '获取广告失败')
  638. }
  639. })
  640. .catch(err => {
  641. console.error(err)
  642. })
  643. },
  644. onComplete(data) {
  645. this.checkOrderAndReturn({ pickUpNum: data, cardNum: '' })
  646. },
  647. checkOrderAndReturn({ pickUpNum = '', cardNum = '', ehcCard = '' }) {
  648. this.$toast.clear()
  649. this.$loading('加载中..')
  650. this.shippingType = pickUpNum ? 1 : 2
  651. this.oldCardNo = cardNum || ''
  652. let p = {
  653. deviceId: this.deviceNum, //设备编号
  654. pickUpNum, //取药码
  655. cardNum, //社保卡号 //"DA7292254" ||
  656. ehcCard //电子社保卡
  657. }
  658. // p = {
  659. // deviceId: this.deviceNum, //设备编号
  660. // cardNum: '',
  661. // ehcCard: "2AA15E2786973077D40FF5DEFFB5E7B12D79E3BD50BE59F22559FF361667E22C:0:445D0CE646F8F9DFEF648D36910287B5:3502A0001GZHA0002"
  662. // }
  663. console.log('params', p)
  664. medicineAbinetApi
  665. .checkOrderAndReturnOrderList(p)
  666. .then(res => {
  667. console.log('checkOrderAndReturnOrderList', res)
  668. if (res.status == 200) {
  669. this.$toast.clear()
  670. if (res.obj && res.obj.orderList) {
  671. var list = _.filter(res.obj.orderList, v => {
  672. return v.status === 0 || v.status == -5
  673. })
  674. if (list.length) {
  675. list.forEach(v => {
  676. var allPrice = 0
  677. if (v.status == -5) {
  678. v.status = -99
  679. }
  680. v.drugList.forEach(d => {
  681. allPrice += d.price * ((d.quantity && Number(d.quantity)) || 1)
  682. })
  683. v.price = allPrice.toFixed(2)
  684. })
  685. this.orderList = list || []
  686. if (list.length == 1) {
  687. this.showOrderDetail(list[0])
  688. } else {
  689. this.rsType = 5
  690. this.step = 3
  691. }
  692. this.inCheckBarcode = false
  693. return
  694. }
  695. }
  696. this.$toast('查不到订单信息')
  697. } else {
  698. this.$toast(res.message || '获取订单失败')
  699. }
  700. this.inCheckBarcode = false
  701. })
  702. .catch(err => {
  703. console.error(err)
  704. this.inCheckBarcode = false
  705. })
  706. },
  707. showOrderDetail(item) {
  708. item.drugList.forEach(v => {
  709. v.success = false
  710. })
  711. this.orderdetail = item.drugList
  712. this.orderInfo = item
  713. this.rsType = item.orderStatus == 1 ? 1 : 2
  714. this.step = 3
  715. },
  716. updateOrderOutStatus(shipmentLogId, status, msg) {
  717. return new Promise((resolve, reject) => {
  718. var p = {
  719. shipmentLogId: shipmentLogId || '',
  720. status: status || '',
  721. msg: msg || '',
  722. shippingType: this.shippingType //取药方式(1、扫码,2、医保卡)
  723. }
  724. console.log('updateOrderOutStatus', p)
  725. medicineAbinetApi
  726. .updateOrderOutStatus(p)
  727. .then(res => {
  728. console.log('updateOrderOutStatus', res)
  729. if (res.status == 200) {
  730. resolve()
  731. return
  732. }
  733. reject()
  734. })
  735. .catch(err => {
  736. console.error(err)
  737. reject()
  738. })
  739. })
  740. },
  741. shipComplete(msg) {
  742. if (!this.inOut) {
  743. //已出药完成
  744. return
  745. }
  746. this.inOut = false
  747. this.clearTimeoutInterval()
  748. this.$toast.clear()
  749. this.orderList.splice(this.orderList.indexOf(this.orderInfo), 1)
  750. if (msg) {
  751. this.$dialog
  752. .alert({
  753. title: '',
  754. message: msg,
  755. confirmButtonText: '返回首页'
  756. })
  757. .then(() => {
  758. this.step = 1
  759. if (this.eventName) {
  760. var eventName = this.eventName
  761. this.eventName = ''
  762. this.checkNextEvent(eventName)
  763. return
  764. }
  765. })
  766. return
  767. }
  768. this.rsType = 4
  769. if (this.eventName) {
  770. var eventName = this.eventName
  771. this.eventName = ''
  772. this.checkNextEvent(eventName)
  773. return
  774. }
  775. },
  776. countDown() {
  777. this.times = 30
  778. countDownFunc = setInterval(() => {
  779. if (this.times === 0) {
  780. this.clearCountDown()
  781. this.onPrev()
  782. }
  783. this.times--
  784. }, 1000)
  785. },
  786. clearTimeoutInterval() {
  787. clearTimeout(timeoutInterval)
  788. },
  789. clearReadCardCountDown() {
  790. if (readCardCountDown) {
  791. clearTimeout(readCardCountDown)
  792. readCardCountDown = undefined
  793. }
  794. },
  795. resetTimeoutInterval() {
  796. this.clearTimeoutInterval()
  797. timeoutInterval = setTimeout(() => {
  798. var msg = '出药超时,请联系管理员'
  799. var item = this.orderdetail[this.currindex]
  800. this.shipComplete(msg)
  801. this.updateOrderOutStatus(item.id, 3, msg).catch(err => {
  802. console.error(err)
  803. })
  804. }, 30 * 1000)
  805. },
  806. videoSwipeChange(i) {
  807. var video = this.$refs.videoSwipe.$el.getElementsByTagName('video')[i]
  808. video && video.play()
  809. return
  810. var videoList = this.$refs.videoSwipe.$el.getElementsByTagName('video')
  811. if (videoList.length > 1) {
  812. i++
  813. if (i >= videoList.length) {
  814. i = 0
  815. }
  816. videoList[i].play()
  817. }
  818. },
  819. playEnded(event, i) {
  820. if (this.videoList.length == 1) {
  821. return
  822. }
  823. this.$refs.videoSwipe.next()
  824. },
  825. systemUpdate() {
  826. this.$loading('系统将进行更新,请勿操作')
  827. setTimeout(() => {
  828. location.reload(true)
  829. }, 3000)
  830. },
  831. checkNextEvent(eventName, data) {
  832. if (eventName == 'equ_normal') {
  833. //设备上线
  834. if (this.inOut) {
  835. this.eventName = eventName
  836. return
  837. }
  838. this.isErr = 2
  839. } else if (eventName == 'equ_maintenance') {
  840. //设备维护
  841. if (this.inOut) {
  842. this.eventName = eventName
  843. return
  844. }
  845. this.isErr = 1
  846. } else if (eventName == 'systemUpdate') {
  847. //系统更新
  848. if (this.inOut) {
  849. this.eventName = eventName
  850. return
  851. }
  852. this.systemUpdate()
  853. } else if (eventName == 'openDebug') {
  854. if (!window.vConsole) {
  855. window.vConsole = new VConsole()
  856. }
  857. } else if (eventName == 'closeDebug') {
  858. if (window.vConsole) {
  859. window.vConsole.destroy()
  860. window.vConsole = ''
  861. }
  862. } else if (eventName == 'exeUpdate') {
  863. jsApp.update()
  864. } else if (eventName == 'indexFuncManage') {
  865. if (data.mess) {
  866. this.funcMgn = _.assign(this.funcMgn, JSON.parse(data.mess))
  867. }
  868. }
  869. },
  870. checkCardNo(item) {
  871. if (this.oldCardNo) {
  872. this.nextOrderDetail = item
  873. this.sendReadCard()
  874. } else {
  875. this.showOrderDetail(item)
  876. }
  877. },
  878. SetPrintPage() {
  879. this.printType = 1
  880. socketUtils.SetPrintPage()
  881. },
  882. onloadeddata(e) {},
  883. onerror() {},
  884. onstalled(e) {},
  885. onsuspend(e) {},
  886. onemptied(e) {},
  887. onended(e) {},
  888. open: function() {
  889. if (this.reconnect === 1) {
  890. this.$toast('服务器重连成功')
  891. this.reconnect = false
  892. }
  893. console.log('socket连接成功')
  894. this.heartbit()
  895. },
  896. error: function() {
  897. console.log('连接错误')
  898. this.reconnectTimeout()
  899. return
  900. // this.socket.close()
  901. },
  902. getMessage: function(msg) {
  903. console.log(msg.data)
  904. //有收到消息后 重置重连定时器时间
  905. // this.reconnectTimeout()
  906. var msgobj = JSON.parse(msg.data)
  907. if (msgobj.type == 'ShipInfo') {
  908. if (!this.inOut) {
  909. //有可能前端15秒已超时 但是后端还没超时 等了1分钟才返回数据
  910. return
  911. }
  912. var item = this.orderdetail[this.currindex]
  913. if (msgobj.mess == item.layerNo + ';' + item.wayerNo) {
  914. this.updateOrderOutStatus(item.id, 2, msgobj.mess)
  915. .then(res => {
  916. this.currindex++
  917. if (this.orderdetail.length > this.currindex) {
  918. this.$loading(`正在出第${this.currindex + 1}个药..`)
  919. this.nextShipment(this.orderdetail[this.currindex])
  920. } else {
  921. this.$toast.clear()
  922. setTimeout(() => {
  923. this.shipComplete()
  924. }, 200)
  925. }
  926. })
  927. .catch(err => {
  928. console.error(err)
  929. this.shipComplete('更新订单状态失败:' + (err && err.message))
  930. })
  931. } else {
  932. this.updateOrderOutStatus(item.id, 3, msgobj.mess)
  933. .then(res => {
  934. this.shipComplete(`出药异常中断,请联系管理员(${msgobj.mess})`)
  935. })
  936. .catch(err => {
  937. console.error(err)
  938. this.shipComplete('更新订单状态失败:' + (err && err.message))
  939. })
  940. }
  941. } else if (msgobj.type == 'BarCodeInfo') {
  942. if (msgobj.mess.indexOf('异常') != -1) {
  943. this.$toast(msgobj.mess)
  944. console.log(msgobj.mess)
  945. return
  946. }
  947. if (this.inCheckBarcode || this.step != 2) {
  948. return
  949. }
  950. this.inCheckBarcode = true
  951. if (msgobj.mess && msgobj.mess.length > 20) {
  952. this.checkOrderAndReturn({ ehcCard: msgobj.mess })
  953. } else {
  954. this.checkOrderAndReturn({ pickUpNum: msgobj.mess })
  955. }
  956. } else if (msgobj.type == 'CardInfo') {
  957. if (!readCardCountDown) {
  958. return
  959. }
  960. this.clearReadCardCountDown()
  961. try {
  962. if (msgobj.mess.indexOf('异常') != -1 || msgobj.mess.indexOf('读取信息失败') != -1) {
  963. if (this.nextOrderDetail) {
  964. this.$toast({
  965. forbidClick: true, // 禁用背景点击
  966. message: msgobj.mess,
  967. onClose: () => {
  968. this.onPrev()
  969. }
  970. })
  971. } else {
  972. this.$toast(msgobj.mess)
  973. }
  974. return
  975. }
  976. var arr = msgobj.mess.split('\n')
  977. var json = {}
  978. arr.forEach(v => {
  979. var tmp = v.split(':')
  980. json[tmp[0]] = tmp[1]
  981. })
  982. var cardNo = json['卡号']
  983. if (this.nextOrderDetail) {
  984. if (cardNo != this.oldCardNo) {
  985. this.$toast({
  986. forbidClick: true, // 禁用背景点击
  987. message: '医保卡信息不匹配,请重新操作',
  988. onClose: () => {
  989. this.onPrev()
  990. }
  991. })
  992. } else {
  993. this.$toast.clear()
  994. var order = this.nextOrderDetail
  995. this.nextOrderDetail = ''
  996. this.showOrderDetail(order)
  997. }
  998. return
  999. }
  1000. this.checkOrderAndReturn({ cardNum: cardNo })
  1001. } catch (e) {
  1002. console.error(e)
  1003. }
  1004. } else if (msgobj.type == 'PrintComplete') {
  1005. this.showPrintComplete = true
  1006. return
  1007. this.$dialog
  1008. .alert({
  1009. title: '',
  1010. message: '打印完成',
  1011. confirmButtonText: '返回首页'
  1012. })
  1013. .then(() => {
  1014. this.onPrev()
  1015. })
  1016. } else if (msgobj.type == 'heart') {
  1017. if (this.heartbitTimeout) {
  1018. clearTimeout(this.heartbitTimeout)
  1019. }
  1020. } else {
  1021. this.checkNextEvent(msgobj.type)
  1022. }
  1023. // var obj = {
  1024. // type: "自定义类型",
  1025. // mess: "数据",
  1026. // devid:"设备号"+"_T"
  1027. // }
  1028. },
  1029. // sendReadCard: function() {
  1030. // this.$loading('读取中..')
  1031. // this.clearReadCardCountDown()
  1032. // readCardCountDown = setTimeout(()=>{
  1033. // if(this.nextOrderDetail){
  1034. // this.$toast.loading({
  1035. // duration: 0,
  1036. // forbidClick: true, // 禁用背景点击
  1037. // loadingType: 'loading',
  1038. // message: "读取医保卡超时",
  1039. // onClose: ()=>{
  1040. // this.onPrev()
  1041. // }
  1042. // });
  1043. // } else {
  1044. // this.$toast('读取医保卡超时')
  1045. // }
  1046. // }, 20 * 1000)
  1047. // var obj = {
  1048. // type: "ReadCard",
  1049. // mess: ""
  1050. // }
  1051. // this.send(obj);
  1052. // },
  1053. sendShipment: function() {
  1054. this.clearCountDown()
  1055. this.currindex = 0
  1056. this.$loading(`正在出第${this.currindex + 1}个药..`)
  1057. //循环订单返回的列表,读取第一个
  1058. if (this.orderdetail.length > this.currindex) {
  1059. this.inOut = true
  1060. this.nextShipment(this.orderdetail[this.currindex])
  1061. } else {
  1062. this.shipComplete()
  1063. }
  1064. },
  1065. nextShipment: function(row) {
  1066. this.resetTimeoutInterval()
  1067. //检查刷新是否已经完成数据,没有完成继续,这个设计是为了防断网
  1068. var obj = {
  1069. type: 'Shipment',
  1070. mess: "{detailid:'" + row.id + "'}", //整串返回
  1071. layerNo: row.layerNo,
  1072. wayerNo: row.wayerNo
  1073. }
  1074. this.send(obj)
  1075. },
  1076. send: function(obj) {
  1077. if (obj.type != 'heart') {
  1078. //发送消息时 重置重连定时器时间
  1079. // this.reconnectTimeout()
  1080. }
  1081. this.socket.send(JSON.stringify(obj))
  1082. },
  1083. send2: function() {
  1084. var obj = {
  1085. type: '读取设备功能列表',
  1086. mess: ''
  1087. }
  1088. this.send(obj)
  1089. },
  1090. close: function() {
  1091. console.log('socket已经关闭')
  1092. this.reconnectTimeout()
  1093. return
  1094. this.clearHeartbit()
  1095. if (!this.forceClose) {
  1096. this.reconnect = true
  1097. this.$loading('服务器异常断开,正在重连..')
  1098. setTimeout(() => {
  1099. this.init()
  1100. }, 2000)
  1101. }
  1102. this.forceClose = false
  1103. },
  1104. reconnectTimeout() {
  1105. if (this.reconnect === true) {
  1106. return
  1107. }
  1108. this.clearHeartbit()
  1109. if (!this.forceClose) {
  1110. this.reconnect = true
  1111. this.$loading('服务器异常断开,正在重连..')
  1112. setTimeout(() => {
  1113. this.init()
  1114. }, 2000)
  1115. }
  1116. this.forceClose = false
  1117. return
  1118. if (this.reconnectInterval) {
  1119. clearInterval(this.reconnectInterval)
  1120. }
  1121. this.reconnectInterval = setInterval(() => {
  1122. if (this.socket) {
  1123. this.forceClose = true
  1124. this.socket.close()
  1125. }
  1126. setTimeout(() => {
  1127. this.init()
  1128. }, 200)
  1129. }, 5 * 60 * 1000 + 5000)
  1130. },
  1131. clearHeartbit() {
  1132. if (this.heartbitInterval) {
  1133. clearInterval(this.heartbitInterval)
  1134. this.heartbitInterval = undefined
  1135. }
  1136. if (this.heartbitTimeout) {
  1137. clearInterval(this.heartbitTimeout)
  1138. this.heartbitTimeout = undefined
  1139. }
  1140. },
  1141. heartbit() {
  1142. this.clearHeartbit()
  1143. this.heartbitInterval = setInterval(() => {
  1144. var obj = {
  1145. type: 'heart',
  1146. mess: ''
  1147. }
  1148. this.send(obj)
  1149. //8s没接收到heart的回执 就重连
  1150. // this.heartbitTimeout = setTimeout(()=>{
  1151. // this.socket.close()
  1152. // }, 8000)
  1153. }, 30 * 1000)
  1154. // this.reconnectTimeout()
  1155. },
  1156. sendDeviceInfo: function() {
  1157. var obj = {
  1158. type: 'ReadDevice',
  1159. mess: ''
  1160. }
  1161. this.send(obj)
  1162. },
  1163. toSmallScreen() {
  1164. this.$router.push('/machine/small?deviceNum=' + this.deviceNum)
  1165. }
  1166. },
  1167. destroyed() {
  1168. this.forceClose = true
  1169. clearInterval(this.heartbitInterval)
  1170. this.clearCountDown()
  1171. clearInterval(this.timer)
  1172. }
  1173. }
  1174. </script>
  1175. <style lang="scss" scoped>
  1176. .maxScreen {
  1177. width: 100vw;
  1178. height: 100vh;
  1179. background: url('./img/maxBg.png') no-repeat;
  1180. background-size: cover;
  1181. .step-1 {
  1182. .title-banner {
  1183. padding-top: 33px;
  1184. img {
  1185. display: block;
  1186. margin: 0 auto;
  1187. &:first-child {
  1188. width: 254px;
  1189. height: 29px;
  1190. margin-left: 63px;
  1191. }
  1192. &:nth-child(2) {
  1193. width: 250px;
  1194. height: 24px;
  1195. margin-top: 10px;
  1196. margin-left: 58px;
  1197. }
  1198. }
  1199. }
  1200. .banner-list {
  1201. width: 333px;
  1202. margin: calc(94px / 6) auto 0;
  1203. -webkit-box-pack: justify;
  1204. color: #fff;
  1205. .banner-list-item-1 {
  1206. background-image: url('./img/i-quyao.png');
  1207. background-size: 100% 100%;
  1208. width: 178px;
  1209. height: 117px;
  1210. font-size: 23px;
  1211. line-height: 28px;
  1212. font-weight: 700;
  1213. padding-left: 102px;
  1214. letter-spacing: 5px;
  1215. display: -webkit-box;
  1216. -webkit-box-orient: vertical;
  1217. -webkit-box-pack: center;
  1218. }
  1219. .banner-list-item-2 {
  1220. background-image: url('./img/i-jiesuan.png');
  1221. background-size: 100% 100%;
  1222. width: 144px;
  1223. height: 53px;
  1224. display: -webkit-box;
  1225. -webkit-box-align: center;
  1226. padding-left: 51px;
  1227. }
  1228. .banner-list-item-3 {
  1229. background-image: url('./img/i-yujiao.png');
  1230. background-size: 100% 100%;
  1231. width: 144px;
  1232. height: 53px;
  1233. margin-top: 11px;
  1234. display: -webkit-box;
  1235. -webkit-box-align: center;
  1236. padding-left: 51px;
  1237. }
  1238. }
  1239. .wrapper {
  1240. padding: 0 21px;
  1241. display: flex;
  1242. margin-top: 115px;
  1243. justify-content: space-between;
  1244. align-items: center;
  1245. .item {
  1246. width: 107px;
  1247. height: 96px;
  1248. img {
  1249. width: 100%;
  1250. height: 100%;
  1251. object-fit: cover;
  1252. }
  1253. }
  1254. }
  1255. .video-swipe {
  1256. width: 333px;
  1257. height: 101px;
  1258. margin: calc(90px / 6) auto 0;
  1259. overflow: hidden;
  1260. border-radius: 7px;
  1261. video {
  1262. width: 100%;
  1263. height: 100%;
  1264. display: block;
  1265. }
  1266. .van-swipe-item {
  1267. &::after {
  1268. content: '';
  1269. position: absolute;
  1270. width: 100%;
  1271. height: 100%;
  1272. top: 0;
  1273. left: 0;
  1274. z-index: 2;
  1275. opacity: 0;
  1276. }
  1277. }
  1278. }
  1279. .img-swipe {
  1280. width: 333px;
  1281. height: 101px;
  1282. margin: calc(83px / 6) auto 0;
  1283. overflow: hidden;
  1284. border-radius: 7px;
  1285. background-color: #000000;
  1286. img {
  1287. width: 100%;
  1288. height: 100%;
  1289. display: block;
  1290. }
  1291. }
  1292. .activeWrapper {
  1293. display: flex;
  1294. align-items: center;
  1295. width: 333px;
  1296. height: 25px;
  1297. background: #d3e9f7;
  1298. border-radius: 13px;
  1299. margin: 10px auto 0;
  1300. color: #3d92e0;
  1301. .left {
  1302. display: flex;
  1303. align-items: center;
  1304. padding: 0 8px;
  1305. }
  1306. .right {
  1307. width: 70%;
  1308. overflow: hidden;
  1309. white-space: nowrap;
  1310. font-size: 11px;
  1311. text-overflow: ellipsis;
  1312. -o-text-overflow: ellipsis;
  1313. }
  1314. }
  1315. .footer {
  1316. margin-top: 25px;
  1317. text-align: center;
  1318. .qrcodeTest {
  1319. display: inline-flex;
  1320. width: 80px;
  1321. flex-direction: column;
  1322. align-items: center;
  1323. justify-content: center;
  1324. font-size: 12px;
  1325. font-weight: 400;
  1326. color: #fff;
  1327. .text {
  1328. white-space: nowrap;
  1329. text-align: center;
  1330. bottom: 0;
  1331. display: flex;
  1332. flex-direction: column;
  1333. align-items: center;
  1334. transform: scale(0.58);
  1335. }
  1336. }
  1337. .qrcode {
  1338. padding-top: 2px;
  1339. img {
  1340. width: 58px;
  1341. height: 58px;
  1342. display: block;
  1343. }
  1344. }
  1345. }
  1346. .lck {
  1347. width: 316px;
  1348. height: 34px;
  1349. margin: 0 auto;
  1350. background: url('./img/lck.png') no-repeat;
  1351. background-size: cover;
  1352. display: flex;
  1353. align-items: center;
  1354. padding: 0 22px;
  1355. font-weight: 600;
  1356. font-size: 11px;
  1357. color: #1c7cd5;
  1358. justify-content: space-around;
  1359. }
  1360. }
  1361. .illustration-mask {
  1362. position: fixed;
  1363. width: 100vw;
  1364. height: 100vh;
  1365. left: 0;
  1366. top: 0;
  1367. background: rgba($color: #000000, $alpha: 0.5);
  1368. .illustration-inner {
  1369. position: absolute;
  1370. left: 50%;
  1371. top: 50%;
  1372. transform: translateX(-50%) translateY(-50%);
  1373. background: #000000;
  1374. border-radius: calc(20px / 6);
  1375. .pic {
  1376. display: block;
  1377. width: 333px;
  1378. img {
  1379. }
  1380. }
  1381. .close {
  1382. position: absolute;
  1383. right: 5px;
  1384. top: 5px;
  1385. img {
  1386. width: 20px;
  1387. height: 20px;
  1388. vertical-align: middle;
  1389. }
  1390. span {
  1391. color: #ff3153;
  1392. font-size: 15px;
  1393. font-weight: 600;
  1394. vertical-align: middle;
  1395. margin-right: 4px;
  1396. }
  1397. }
  1398. }
  1399. }
  1400. }
  1401. .swipe {
  1402. width: 333px;
  1403. height: 101px;
  1404. margin: 10px auto 0;
  1405. box-sizing: content-box;
  1406. padding-bottom: 20px;
  1407. img {
  1408. width: 100%;
  1409. height: 100%;
  1410. }
  1411. .van-swipe-item {
  1412. height: 101px;
  1413. overflow: hidden;
  1414. img {
  1415. border-radius: 4px;
  1416. }
  1417. .swipe-item-img {
  1418. width: 100%;
  1419. height: 100%;
  1420. display: block;
  1421. }
  1422. }
  1423. .swipe-item-video {
  1424. width: 100%;
  1425. }
  1426. }
  1427. ::v-deep .van-swipe__indicators {
  1428. bottom: 0px;
  1429. .van-swipe__indicator {
  1430. background: #fff;
  1431. opacity: 1;
  1432. }
  1433. .van-swipe__indicator--active {
  1434. background: #1c7cd5;
  1435. }
  1436. }
  1437. </style>