浏览代码

修复bug

hwy 3 月之前
父节点
当前提交
8cc355bbc7
共有 1 个文件被更改,包括 43 次插入115 次删除
  1. 43 115
      mini-pro-web/src/views/machine/maxScreen.vue

+ 43 - 115
mini-pro-web/src/views/machine/maxScreen.vue

@ -16,18 +16,11 @@
          <img src="./img/ycz.png" />
        </div>
      </div>
      <div class="video-swipe">
        <van-swipe ref="videoSwipe" @change="videoSwipeChange" :touchable="false" :autoplay="0" indicator-color="white">
          <template v-if="videoList && videoList.length">
            <van-swipe-item v-for="(item, i) in videoList" :key="i">
              <video class="swipe-item-video" @ended="playEnded($event, i)" :loop="videoList.length == 1" :autoplay="i == 0" muted :src="setImgUrl(item.url)"></video>
            </van-swipe-item>
          </template>
          <van-swipe-item v-else>
            <video class="swipe-item-video" loop autoplay muted src="./img/default.mp4"></video>
          </van-swipe-item>
        </van-swipe>
      </div>
      <van-swipe class="swipe" :autoplay="3000">
        <van-swipe-item v-for="(item, index) in videoList" :key="index" @click="gotoDetail(item)">
          <img :src="item" />
        </van-swipe-item>
      </van-swipe>
      <div class="activeWrapper">
        <div class="left">
          <img src="./img/ax.png" style="width: 15px;height: 15px;object-fit: cover;margin-right: 5px;" />
@ -152,7 +145,7 @@ export default {
      orderdetail: [],
      rsType: 0, // 1:订单信息 2订单错误  3订单成功  4出药完成  5订单列表
      imgList: [],
      videoList: [],
      videoList: ['https://img01.yzcdn.cn/vant/apple-1.jpg', 'https://img01.yzcdn.cn/vant/apple-1.jpg', 'https://img01.yzcdn.cn/vant/apple-1.jpg'],
      inCheckBarcode: false,
      orderInfo: '',
      orderList: [],
@ -208,6 +201,9 @@ export default {
    // window.socketUtils = socketUtils
  },
  methods: {
    gotoDetail() {
      window.location.href = 'https://mp.weixin.qq.com/s/IOTPRVQMiO_xWWM7RMjvig'
    },
    show(type) {
      this.curImg = type
      this.illustrationMskShow = true
@ -1135,103 +1131,6 @@ export default {
      }
      this.send(obj)
    }
    // SetPrintPage: function() {
    // 	// string type; //text 文本 |line 间隔行|barcode 条码|qrcode 二维码|reset 重置打印机 |nline 走纸【进行【
    // 	// string text;  //文本内容
    // 	// int nLan;//文本编码类型0:GBK   1:UTF-8
    // 	// int nOrgx;//打印的文本位置,各值定义如下:-1 左对齐 -2 居中对齐 -3 右对齐 >=0   在第n点位置开始打印
    // 	// int nWidthTimes;//字符宽度放大的倍数,范围[0,7]
    // 	// int nHeightTimes;// 字符高度放大的倍数,范围[0,7]
    // 	// int FontType;//打印的字体类型,各值定义如下:度值  定义 0:  12*24  1:  9*17
    // 	// int nFontStyle;// 打印的字体类型,各值定义如下:需要合并的把两个值相加得到整数回传 值  定义0x00  正常0x08  加粗0x80    1点下划线0x100   2点下划线0x200 倒置打印 0x400 反显、黑底白字0x1000 每个字符顺时针旋转 90
    // 	// int nBarcodeType;//打印的条码类型,各值定义如下:值   类型 0x41     UPC-A  0x42     UPC-E 0x43     EAN13  0x44     EAN80x45     CODE39 0x46     ITF0x47     CODABAR0x48     CODE93
    // 	// int  nUnitWidth;// 打印的条码宽度,值范围[1,6]
    // 	// int  nUnitHeight;//打印的条码高度,值范围[1,255]
    // 	// int  FontPosition;//可读字符(HRI)的打印位置,各值定义如下:值    定义 0     不打印1     条码上方2     条码下方 3   条码上方和下方
    // 	// int nWidth;// 二维码的宽度,取值范围[1,6}二维码单元宽度越大,QR码越大。
    // 	// int nVersion;// 二维码的规格,取值范围[0,16],0表示自动计算版本。 二维码码版本越大,能编码的字符就越多,QR码也越大。
    // 	// int nErrlevenl;//二维码纠错等级,取值[1,4]
    // 	var printcon =[
    // 		{type:"reset"},
    // 		{type:"nline"},
    // 		{type:"text", text:"智慧药房\n小票凭据\n",nLan:0,nOrgx:-2,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0},
    // 		{type:"text", text:"--------------------------------\n",nLan:0,nOrgx:-2,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0},
    // 	];
    // 	var allPrice = 0, allcount = 0
    // 	var obj = _.groupBy(this.orderdetail.concat([]), 'drugCode')
    // 	var list = []
    // 	for(var k in obj){
    // 		var tem = obj[k]
    // 		tem[0].quantity = tem.length
    // 		list.push(tem[0])
    // 		tem.forEach(v=>{
    // 			allPrice += v.price
    // 			allcount += 1
    // 		})
    // 	}
    // 	list.forEach(v=>{
    // 		printcon.push({
    // 			type:"text", text: (v.drugName||v.goodsName)+"\n",nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
    // 		})
    // 		printcon.push({
    // 			type:"text", text: `数量:${v.quantity}${v.unit}\n规格:${v.specif}\n用法:${v.useWay||''}  ${v.useDose||''}${v.unit||''}  ${v.useRate||''}`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
    // 		})
    // 		printcon.push({type:"line"})
    // 	})
    // 	var {date, phone, num, remark, time, community, qrCodeContent, info} = this.orderInfo
    // 	// printcon.push({
    // 	// 	type:"text", text: `药品总价:${(allPrice).toFixed(2)}元\n药品数量:${allcount}\n订单金额:${allPrice.toFixed(2)}元\n`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
    // 	// })
    // 	var infoArr = (info&&info.split(',')) || [],
    // 		infoTextArr = []
    // 	if(infoArr.indexOf("community") != -1){
    // 		infoTextArr.push(`机构名称:${community}\n`)
    // 	}
    // 	if(infoArr.indexOf("phone") != -1){
    // 		infoTextArr.push(`客服电话:${phone}\n`)
    // 	}
    // 	// if(infoArr.indexOf("equNum") != -1){
    // 	// 	infoTextArr.push(`设备编号:${this.deviceNum}\n`)
    // 	// }
    // 	if(infoArr.indexOf("orderNo") != -1){
    // 		infoTextArr.push(`处方单号:${num}\n`)
    // 	}
    // 	if(infoArr.indexOf("shipTime") != -1){
    // 		infoTextArr.push(`取药日期:${date} ${time}\n`)
    // 	}
    // 	if(infoTextArr&&infoTextArr.length){
    // 		printcon.push({type:"text", text:"--------------------------------\n",nLan:0,nOrgx:-2,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0})
    // 		printcon.push({
    // 			type:"text", text: infoTextArr.join(''),nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
    // 		})
    // 	}
    // 	// printcon.push({
    // 	// 	type:"text", text: `商家名称:${community}\n客服电话:${phone}\n药柜编码:${this.deviceNum}\n销售单号:${num}\n取药日期:${date}\n取药时间:${time}\n`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
    // 	// })
    // 	printcon.push({type:"text", text:"--------------------------------\n",nLan:0,nOrgx:-2,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0})
    // 	printcon.push({
    // 		type:"text", text: `备注:${remark||""}\n`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
    // 	})
    // 	// if(qrCodeContent){
    // 		printcon.push({type:"qrcode",text: qrCodeContent||"http://weixin.qq.com/r/hj9vd_LEAL9-raYU92qU", nWidth:6,nVersion:0,nErrlevenl:4})
    // 	// }
    // 	printcon.push({type:"nline"})
    // 	printcon.push({type:"nline"})
    // 	printcon.push({type:"nline"})
    // 	printcon.push({type:"nline"})
    // 	printcon.push({type:"nline"})
    // 	console.log('printcon', printcon)
    // 	var obj = {
    // 		type: "PrintPage",
    // 		mess: JSON.stringify(printcon),
    // 	}
    // 	this.send(obj);
    // },
  },
  destroyed() {
    this.forceClose = true
@ -1365,7 +1264,7 @@ export default {
      height: 25px;
      background: #d3e9f7;
      border-radius: 13px;
      margin: calc(90px / 6) auto 0;
      margin: 10px auto 0;
      color: #3d92e0;
      .left {
        display: flex;
@ -1382,11 +1281,11 @@ export default {
      }
    }
    .footer {
      display: flex;
      justify-content: space-around;
      margin-top: 32px;
      margin-top: 25px;
      text-align: center;
      .qrcodeTest {
        display: flex;
        display: inline-flex;
        width: 80px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
@ -1395,6 +1294,7 @@ export default {
        color: #fff;
        .text {
          white-space: nowrap;
          text-align: center;
          bottom: 0;
          display: flex;
          flex-direction: column;
@ -1467,4 +1367,32 @@ export default {
    }
  }
}
.swipe {
  width: 333px;
  height: 101px;
  margin: 10px auto 0;
  box-sizing: content-box;
  padding-bottom: 20px;
  img {
    width: 100%;
    height: 100%;
  }
  .van-swipe-item {
    height: 101px;
    img {
      border-radius: 4px;
    }
  }
}
::v-deep .van-swipe__indicators {
  bottom: 0px;
  .van-swipe__indicator {
    background: #fff;
    opacity: 1;
  }
  .van-swipe__indicator--active {
    background: #1c7cd5;
  }
}
</style>