Browse Source

fix: 恒生5435 设备档案、校准记录标签打印样式调整

johnsen 4 tháng trước cách đây
mục cha
commit
f64ca714e0

+ 36 - 15
src/views/component/device/index.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="main-container">
-
     <ibps-container class="page">
       <template>
         <ibps-crud
@@ -441,6 +440,13 @@
       :state-list="stateList"
       @scanOff="scanOff"
     />
+    <DeviceTagTemplateHengSheng
+      v-else-if="tagName === 'hengsheng'"
+      :scan-visible="printVisible"
+      :obj="printObj"
+      :state-list="stateList"
+      @scanOff="scanOff"
+    />
     <DeviceTag
       v-else
       :scan-visible="printVisible"
@@ -497,12 +503,14 @@ import dayjs from 'dayjs'
 import DeviceTag from '@/views/system/jbdScan/goods/deviceTag.vue'
 // import DeviceTagWeiNing from '@/views/system/jbdScan/goods/deviceTagWeiNing.vue'
 import DeviceTagTemplateTwo from '@/views/system/jbdScan/goods/deviceTagTemplateTwo'
+import DeviceTagTemplateHengSheng from '@/views/system/jbdScan/goods/deviceTag-hengsheng'
 import DeviceTagTemplateThree from '@/views/system/jbdScan/goods/deviceTagTemplateThree'
 export default {
   components: {
     DeviceTag,
     // DeviceTagWeiNing,
     DeviceTagTemplateTwo,
+    DeviceTagTemplateHengSheng,
     DeviceTagTemplateThree,
     DataTemplateFormrenderDialog,
     DeviceDialog,
@@ -585,7 +593,11 @@ export default {
       level: level.second || level.first,
       userId: userId,
       search: {
-        pos: setting?.dept?.default ? (isHighLevel||this.$route.fullPath === '/xxgl/sbda' ? '' : mainPositionId) : '',
+        pos: setting?.dept?.default
+          ? isHighLevel || this.$route.fullPath === '/xxgl/sbda'
+            ? ''
+            : mainPositionId
+          : '',
         time: [],
         nowNumber: '',
         preNumber: '',
@@ -597,7 +609,7 @@ export default {
         deviceClass: '',
         validity: ''
       },
-      showDeptSeach: false,   //部门选择搜索是否禁用
+      showDeptSeach: false, //部门选择搜索是否禁用
       loading: false,
       pkKey: 'id', // 主键  如果主键不是pk需要传主键
       pkValue: '',
@@ -796,7 +808,9 @@ export default {
         bianZhiBuMen: '部门',
         sheBeiMingCheng: '设备名称',
         // sheBeiShiBieH: '设备编号(导入无需填写)',
-        yuanSheBeiBian: setting?.device?.hideSysDeviceNo ? '设备编号(必填,且不可重复)' : '原设备编号(必填,且不可重复)',
+        yuanSheBeiBian: setting?.device?.hideSysDeviceNo
+          ? '设备编号(必填,且不可重复)'
+          : '原设备编号(必填,且不可重复)',
         sheBeiZhuangTa: '设备状态(合格/停用/限用)',
         sheBeiLeiXing: '设备类型(检验系统/通用设备/软件/信息系统)',
         shiFouWeiHu: '是否维护(是/否)',
@@ -838,7 +852,9 @@ export default {
         shiJiShiYongF: '关机时间(时间格式,时分秒)'
       },
       projectColums: {
-        yuanSheBeiBian: setting?.device?.hideSysDeviceNo ? '设备编号*' : '原设备编号*',
+        yuanSheBeiBian: setting?.device?.hideSysDeviceNo
+          ? '设备编号*'
+          : '原设备编号*',
         sheBeiMingCheng: '设备名称*',
         weiHuLeiXing:
           '维护类型*(日保养/周保养/月保养/季度保养/半年保养/年保养/按需保养)',
@@ -856,7 +872,9 @@ export default {
       requiredFieldMap: {
         bianZhiBuMen: '部门',
         sheBeiMingCheng: '设备名称',
-        yuanSheBeiBian: setting?.device?.hideSysDeviceNo ? '设备编号' :'原设备编号',
+        yuanSheBeiBian: setting?.device?.hideSysDeviceNo
+          ? '设备编号'
+          : '原设备编号',
         sheBeiZhuangTa: '设备状态',
         sheBeiLeiXing: '设备类型',
         shiFouWeiHu: '是否维护',
@@ -899,7 +917,9 @@ export default {
         ziChanYuanZhi: '资产原值(元)'
       },
       maintenanceRequiredFieldMap: {
-        yuanSheBeiBian: setting?.device?.hideSysDeviceNo ? '设备编号' : '原设备编号',
+        yuanSheBeiBian: setting?.device?.hideSysDeviceNo
+          ? '设备编号'
+          : '原设备编号',
         sheBeiMingCheng: '设备名称',
         weiHuLeiXing: '维护类型',
         weiHuRiQi: '维护日期',
@@ -948,6 +968,7 @@ export default {
     }
   },
   async mounted() {
+    const res = await getSetting()
     const {
       stateList,
       hideSysDeviceNo,
@@ -957,8 +978,8 @@ export default {
       typeList,
       hasFuZeRenDianHua,
       hasChangJiaLianXiRen
-    } = (await getSetting('device')) || {}
-    const { tagData, tagName } = (await getSetting('deviceTag')) || {}
+    } = res.device || {}
+    const { tagData, tagName } = res.deviceTag || {}
     if (tagName) {
       console.debug('tagName', tagName)
       this.tagName = tagName
@@ -1052,7 +1073,7 @@ export default {
         })
         this.showDeptSeach = true
         parameters.parameters.push(obj)
-      }else{
+      } else {
         this.showDeptSeach = false
       }
       // 建档时间搜索
@@ -1554,11 +1575,11 @@ export default {
         )
       } else {
         let attachmentId = 'device_maintainProject'
-        if(this.hideSysDeviceNo){
+        if (this.hideSysDeviceNo) {
           attachmentId = 'device_maintainProject_new'
         }
         const res = await download({ attachmentId })
-       
+
         // 判断 ArrayBuffer 的大小,主要用于兼容没有文件的情况
         if (res.data?.byteLength === 0) {
           this.xlsx(
@@ -1743,9 +1764,9 @@ export default {
         if (indices.length > 1) {
           return [
             {
-              field: `发现重复的${this.hideSysDeviceNo ? '设备编号': '原设备编号'}:${key} 在第 ${indices.join(
-                ', '
-              )} 行`
+              field: `发现重复的${
+                this.hideSysDeviceNo ? '设备编号' : '原设备编号'
+              }:${key} 在第 ${indices.join(', ')} 行`
             }
           ]
         }

+ 427 - 0
src/views/system/jbdScan/goods/deviceTag-hengsheng.vue

@@ -0,0 +1,427 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="11cm"
+      height="10cm"
+      :modal-append-to-body="true"
+      :append-to-body="true"
+      title="设备标签"
+      :visible.sync="dialogVisible"
+      @close="close"
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px">
+        <div id="box" ref="qrcode">
+          <vue-easy-print ref="easyPrint" table-show :one-page-row="onePageRow">
+            <div v-for="(item, index) in list" :key="index">
+              <div class="All">
+                <div>
+                  <div class="one">
+                    <div class="container">
+                      <div
+                        :class="
+                          item.deviceStatus === '合格'
+                            ? 'triangle'
+                            : item.deviceStatus === '停用'
+                            ? 'triangleRed'
+                            : item.deviceStatus === '限用'
+                            ? 'triangleYellow'
+                            : 'triangleGray'
+                        "
+                      >
+                        <div class="label" style="border: 0">
+                          {{ item.prove }}
+                        </div>
+                      </div>
+                      <div style="position: absolute; top: 25px; width: 100%">
+                        <div
+                          style="
+                            display: flex;
+                            justify-content: space-between;
+                            font-size: 14px;
+                            font-weight: 800;
+                            margin: 0 8px;
+                          "
+                        >
+                          <div>{{ item.slogan }}</div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                  <div class="tagBox">
+                    <div
+                      v-for="(e, t) in midData.columns"
+                      v-if="
+                        (e.field == 'range' && item[e.field] !== '') ||
+                        e.field != 'range'
+                      "
+                      :key="'zi' + t"
+                      class="lh"
+                      :style="
+                        e.field == 'verificationDate'
+                          ? item['range'] !== ''
+                            ? 'border-bottom: 1px solid #000000;'
+                            : 'border-bottom: 0px;'
+                          : ''
+                      "
+                    >
+                      <div :class="e.field == 'name' ? 'qianZhi' : ''">
+                        {{ e.label }}:
+                      </div>
+                      <div>{{ item[e.field] }}</div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </vue-easy-print>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" @click="printDemo">打印标签</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import VueBarcode from 'vue-barcode'
+import vueEasyPrint from 'vue-easy-print'
+
+export default {
+  components: {
+    VueBarcode,
+    vueEasyPrint
+  },
+  props: {
+    obj: {
+      default: () => [],
+      type: Array
+    },
+    onePageRow: {
+      type: Number,
+      default: 3
+    },
+    blankLines: {
+      type: Boolean,
+      default: true
+    },
+    scanVisible: {
+      type: Boolean,
+      default: false
+    },
+    stateList: {
+      type: Object,
+      default: function () {
+        return { 停用: '停用', 报废: '报废', 合格: '合格' }
+      }
+    },
+    tagData: {
+      type: Object,
+      default: () => {}
+    }
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      value: '',
+      id: '',
+      list: [
+        {
+          name: '设备名称',
+          serial: '设备编号',
+          original: '原设备编号',
+          model: '型号规格',
+          verifier: '核查人',
+          verificationDate: '核查日期',
+          // status: 1
+          prove: '测试证', // 证名
+          slogan: '标语', // 标语
+          deviceStatus: '设备状态',
+          range: '限用范围', // 限用范围
+          assetNum: '固定资产号'
+        }
+      ],
+      visible: true,
+      midData: {}
+    }
+  },
+  watch: {
+    obj() {
+      this.getInit()
+    },
+    scanVisible: {
+      handler(val) {
+        this.dialogVisible = val
+      },
+      immediate: true
+    },
+    tagData: {
+      handler(val) {
+        if (this.tagData && this.tagData.hasOwnProperty('columns')) {
+          this.midData = val
+        } else {
+          this.midData = {
+            columns: [
+              { label: '设备名称', field: 'name' },
+              { label: '设备型号', field: 'model' },
+              { label: '原设备编号', field: 'original' },
+              { label: '固定资产号', field: 'assetNum' },
+              { label: '核查人', field: 'verifier' },
+              { label: '核查日期', field: 'verificationDate' },
+              { label: '限用范围', field: 'range' }
+            ],
+            width: 330
+          }
+        }
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getInit()
+  },
+  methods: {
+    close() {
+      this.dialogVisible = false
+      this.$emit('scanOff')
+    },
+    printDemo() {
+      this.$refs.easyPrint.print()
+    },
+    getInit() {
+      var idStr = ''
+      this.obj.forEach((item) => {
+        idStr += item.split(' ')[0] + ','
+      })
+      idStr = idStr.substring(0, idStr.length - 1)
+      this.getLook(idStr)
+    },
+    getLook(id) {
+      // const sql = `select she_bei_ming_cheng_, she_bei_shi_bie_h, gui_ge_xing_hao_, she_bei_zhuang_ta, bi_xu_de_huan_jin, bi_xu_she_shi_, cai_gou_he_tong_, zi_chan_bian_hao_, yuan_she_bei_bian FROM t_sbdj WHERE find_in_set(id_, ${id})`
+      // const personSql = `select * from ibps_party_employee`
+      Promise.all([
+        this.$common.request('query', {
+          key: 'getDeviceInfoByIds',
+          params: [id]
+        }),
+        this.$common.request('query', {
+          key: 'getAllUser',
+          params: [null]
+        })
+      ]).then(([res1, res2]) => {
+        const { data } = res1.variables || []
+        const personData = res2.variables.data || []
+        console.log(data)
+        // console.log(personData)
+        const list = []
+        data.forEach((item) => {
+          const verificationDateStr = item.bi_xu_she_shi_
+            ? item.bi_xu_she_shi_
+            : ''
+          const o = {
+            prove: this.switchProve(item.she_bei_zhuang_ta),
+            slogan: this.switchSlogan(item.she_bei_zhuang_ta),
+            deviceStatus: item.she_bei_zhuang_ta,
+            range: this.judgementVal(item.cai_gou_he_tong_)
+              ? item.cai_gou_he_tong_
+              : '',
+            assetNum: item.zi_chan_bian_hao_,
+
+            name: item.she_bei_ming_cheng_,
+            serial: item.she_bei_shi_bie_h,
+            original: item.yuan_she_bei_bian,
+            model: item.gui_ge_xing_hao_,
+            verifier: this.findPersonName(item.bi_xu_de_huan_jin, personData),
+            verificationDate: verificationDateStr.substring(0, 10)
+          }
+          list.push(o)
+          console.log(o)
+        })
+        this.list = list
+      })
+    },
+    judgementVal(value) {
+      return value != null && value != undefined
+    },
+    switchProve(status) {
+      console.log('this.stateList===>', this.stateList, status)
+      return `${this.stateList[status] || '测试'}`
+    },
+    switchSlogan(status) {
+      switch (status) {
+        case '合格':
+          return 'PASS'
+        case '停用':
+          return 'STOP'
+        case '限用':
+          return 'RESTRICT'
+        case '报废':
+          return 'SCRAP'
+        default:
+          return 'TEST'
+      }
+    },
+    findPersonName(id, personData) {
+      if (!personData) {
+        return '核查人列表为空'
+      }
+      if (!id) {
+        return ''
+      }
+      const people = personData.find((i) => i.ID_ === id)
+      return people?.NAME_
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.All {
+  text-align: center;
+  margin: 10px 0px;
+}
+
+.bg {
+  // height: auto;
+}
+
+.tagBox {
+  width: 400px; // 300  240 231
+  // height: 283px;  // 180  150  94
+  position: relative;
+  border: 1px solid #000000;
+  border-top: 0px;
+  //   padding: 2px;
+  display: inline-block;
+  // justify-content: space-around;
+  // flex-direction: column;
+  //   margin: 10px 5px;
+  //   border-radius: 4px;
+  background-color: #fff;
+}
+
+.ewm {
+  margin-left: 10px;
+}
+
+/*
+.tagBox {
+  width: 177.5px;   // 300  240
+  height: 106.5px;  // 180  150
+  position: relative;
+  border: 1px solid #000000;
+  padding: 20px;
+  display: flex;
+  justify-content: space-around;
+  flex-direction: column;
+  margin: 20px auto;
+  border-radius: 15px;
+  background-color: #fff;
+}
+*/
+.qianZhi {
+  white-space: nowrap;
+}
+
+.la {
+  font-size: 12px; //16
+  display: flex;
+  align-items: center;
+  padding: 1px;
+  width: 50%;
+}
+
+.zuoJuZhong {
+  text-align: left;
+}
+
+.lh {
+  display: flex;
+  align-items: center;
+  //   line-height: auto;
+  padding: 1px;
+  font-size: 16px; //16
+  display: flex;
+  align-items: center;
+  border-bottom: 1px solid #000000;
+}
+
+.container {
+  width: 400px;
+  height: 50px;
+  position: relative;
+  border: 1px solid #000000;
+}
+
+.triangle,
+.triangleYellow,
+.triangleRed,
+.triangleGray {
+  width: 0;
+  height: 0;
+  position: relative;
+  border-right: 200px solid transparent;
+  border-left: 200px solid transparent;
+  border-bottom: 200px solid transparent;
+  text-align: center;
+  //   float: left;
+}
+
+.triangle {
+  border-top: 50px solid #fff;
+}
+
+.triangleYellow {
+  border-top: 50px solid #fff;
+}
+
+.triangleRed {
+  border-top: 50px solid #fff;
+}
+.triangleGray {
+  border-top: 50px solid #fff;
+}
+.triangle > .label,
+.triangleYellow > .label,
+.triangleRed > .label,
+.triangleGray > .label {
+  width: 120px;
+  position: relative;
+  top: -45px;
+  left: 50%;
+  transform: translateX(-50%);
+  font-size: 24px;
+  font-weight: bold;
+  color: #000000;
+}
+
+.top-triangle {
+  border-left: 100px solid transparent;
+  border-right: 100px solid transparent;
+  top: 0;
+  left: 0;
+}
+
+.left-triangle {
+  /* border-top: 100px solid transparent; */
+  border-right: 100px solid black;
+  border-bottom: 50px solid rgb(217, 217, 233);
+  top: 0;
+  left: 0;
+}
+
+.right-triangle {
+  border-left: 100px solid black; //red
+  border-bottom: 50px solid rgb(217, 217, 233);
+  top: 0;
+  left: 100px;
+}
+
+.one {
+  justify-content: center;
+  align-items: center;
+  display: flex;
+}
+</style>

+ 413 - 0
src/views/system/jbdScan/goods/deviceVerificationTag-hengsheng.vue

@@ -0,0 +1,413 @@
+<template>
+  <div class="bg">
+    <el-dialog
+      width="11cm"
+      height="10cm"
+      :modal-append-to-body="true"
+      :append-to-body="true"
+      title="设备检定校准标签"
+      :visible.sync="scanVisible"
+    >
+      <!-- 表单是否显示 -->
+      <div style="height: 500px">
+        <div id="box" ref="qrcode">
+          <vue-easy-print ref="easyPrint" table-show :one-page-row="onePageRow">
+            <div v-for="(item, index1) in list" :key="index1">
+              <!-- style="page-break-after:always" -->
+              <div class="All">
+                <div>
+                  <div class="one">
+                    <div class="container">
+                      <div
+                        :class="
+                          item.deviceStatus === '合格'
+                            ? 'triangle'
+                            : item.deviceStatus === '停用'
+                            ? 'triangleRed'
+                            : 'triangleYellow'
+                        "
+                      >
+                        <div class="label" style="border: 0">
+                          {{ item.prove }}
+                        </div>
+                      </div>
+                      <div style="position: absolute; top: 25px; width: 100%">
+                        <div
+                          style="
+                            display: flex;
+                            justify-content: space-between;
+                            font-size: 14px;
+                            font-weight: 800;
+                            margin: 0 8px;
+                          "
+                        >
+                          <div>{{ item.slogan }}</div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                  <div class="tagBox">
+                    <div class="lh">
+                      <div class="qianZhi">设备名称:</div>
+                      <div>{{ item.name }}</div>
+                    </div>
+                    <div v-if="modelTF" class="lh">
+                      <div>设备型号:</div>
+                      <div>{{ item.model }}</div>
+                    </div>
+                    <div class="lh">
+                      <div>原设备编号:</div>
+                      <div>{{ item.original }}</div>
+                    </div>
+
+                    <div class="lh">
+                      <div class="la">
+                        <div>校准日期:</div>
+                        <div>{{ item.jiaoZhunTime }}</div>
+                      </div>
+                      <div class="la" style="border-left: 1px solid #000000">
+                        <div>有效期至:</div>
+                        <div>{{ item.validTo }}</div>
+                      </div>
+                    </div>
+                    <div
+                      class="lh"
+                      :style="
+                        item.range !== ''
+                          ? 'border-bottom: 1px solid #000000;'
+                          : 'border-bottom: 0px;'
+                      "
+                    >
+                      <div class="qianZhi">校准单位:</div>
+                      <div class="zuoJuZhong">{{ item.unit }}</div>
+                    </div>
+                    <!-- <div class="lh" style="border-bottom: 0px;" v-if="item.range !== ''">
+                                            <div class="qianZhi">限用范围:</div>
+                                            <div class="zuoJuZhong">{{ item.range }}</div>
+                                        </div> -->
+                  </div>
+                </div>
+              </div>
+            </div>
+          </vue-easy-print>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="scanVisible = false">取 消</el-button>
+        <el-button type="primary" @click="printDemo">打印标签</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import VueBarcode from 'vue-barcode'
+import vueEasyPrint from 'vue-easy-print'
+import { getSetting } from '@/utils/query'
+
+export default {
+  components: {
+    VueBarcode,
+    vueEasyPrint
+  },
+  props: {
+    obj: {
+      default: () => [],
+      type: Array
+    },
+    onePageRow: {
+      type: Number,
+      default: 3
+    },
+    blankLines: {
+      type: Boolean,
+      default: true
+    },
+    scanVisible: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      value: '',
+      id: '',
+      list: [
+        {
+          name: 1,
+          serial: 1,
+          original: 1,
+          validTo: 1,
+          model: 1,
+          unit: 1,
+          jiaoZhunTime: 1,
+          // status: 1
+          prove: 1, // 证名
+          slogan: 1, // 标语
+          deviceStatus: 1,
+          range: 1 // 限用范围
+        }
+      ],
+      visible: true,
+      orgTF: false,
+      modelTF: true
+    }
+  },
+  watch: {
+    obj() {
+      this.getInit()
+      // console.log(this.obj)
+    }
+  },
+  created() {
+    this.getInit()
+  },
+  methods: {
+    printDemo() {
+      this.$refs.easyPrint.print()
+    },
+    async getInit() {
+      var idStr = ''
+      this.obj.forEach((item) => {
+        idStr += item.split(' ')[0] + ','
+      })
+      idStr = idStr.substring(0, idStr.length - 1)
+      this.getLook(idStr)
+      const { tagData } = (await getSetting('verificationTag')) || {}
+      this.orgTF =
+        tagData && tagData.hasOwnProperty('originalDevice')
+          ? tagData.originalDevice
+          : false
+      this.modelTF =
+        tagData && tagData.hasOwnProperty('originalDevice')
+          ? tagData.modelNumber
+          : true
+    },
+    getLook(id) {
+      // const sql = `select dj.she_bei_ming_cheng_, dj.she_bei_shi_bie_h, dj.gui_ge_xing_hao_, dj.she_bei_zhuang_ta, dj.cai_gou_he_tong_, dj.yuan_she_bei_bian, zx.shi_shi_ri_qi_, zx.chu_chang_bian_ha, zx.jian_ding_dan_wei FROM t_sbdj dj RIGHT JOIN t_mjsbjdxzjhzb zx ON zx.bian_hao_zhong_we = dj.she_bei_shi_bie_h WHERE find_in_set(zx.id_, '${id}')`
+      this.$common
+        .request('query', {
+          key: 'deviceVerificationTag',
+          params: [id]
+        })
+        .then((res) => {
+          const { data } = res.variables || []
+          // console.log(data)
+          const list = []
+          data.forEach((item) => {
+            const o = {
+              prove: this.switchProve(item.she_bei_zhuang_ta),
+              slogan: this.switchSlogan(item.she_bei_zhuang_ta),
+              deviceStatus: item.she_bei_zhuang_ta,
+              range: this.judgementVal(item.cai_gou_he_tong_)
+                ? item.cai_gou_he_tong_
+                : '',
+
+              name: item.she_bei_ming_cheng_,
+              serial: item.she_bei_shi_bie_h,
+              original: item.yuan_she_bei_bian,
+              validTo: item.chu_chang_bian_ha,
+              model: item.gui_ge_xing_hao_,
+              unit: item.jian_ding_dan_wei,
+              jiaoZhunTime: item.shi_shi_ri_qi_
+            }
+            list.push(o)
+          })
+
+          this.list = list
+        })
+    },
+    judgementVal(value) {
+      return value != null && value != undefined
+    },
+    switchProve(status) {
+      switch (status) {
+        case '合格':
+          return '合格'
+        case '停用':
+          return '停用'
+        case '限用':
+          return '限用'
+        case '报废':
+          return '报废'
+        default:
+          return '测试'
+      }
+    },
+    switchSlogan(status) {
+      switch (status) {
+        case '合格':
+          return 'PASS'
+        case '停用':
+          return 'STOP'
+        case '限用':
+          return 'RESTRICT'
+        default:
+          return 'TEST'
+      }
+    },
+    getTime(second) {
+      const date = new Date(second)
+      const year = date.getFullYear()
+      let month = ''
+      let day = ''
+      if (date.getMonth() + 1 <= 9) {
+        month = '0' + (date.getMonth() + 1)
+      } else {
+        month = date.getMonth() + 1
+      }
+      if (date.getDate() <= 9) {
+        day = '0' + date.getDate()
+      } else {
+        day = date.getDate()
+      }
+      return year + '-' + month + '-' + day
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.All {
+  text-align: center;
+  margin: 10px 0px;
+}
+
+.bg {
+  // height: auto;
+}
+
+.tagBox {
+  width: 400px; // 300  240 231
+  // height: 283px;  // 180  150  94
+  position: relative;
+  border: 1px solid #000000;
+  border-top: 0px;
+  //   padding: 2px;
+  display: inline-block;
+  // justify-content: space-around;
+  // flex-direction: column;
+  //   margin: 10px 5px;
+  //   border-radius: 4px;
+  background-color: #fff;
+}
+
+.ewm {
+  margin-left: 10px;
+}
+
+/*
+.tagBox {
+  width: 177.5px;   // 300  240
+  height: 106.5px;  // 180  150
+  position: relative;
+  border: 1px solid #000000;
+  padding: 20px;
+  display: flex;
+  justify-content: space-around;
+  flex-direction: column;
+  margin: 20px auto;
+  border-radius: 15px;
+  background-color: #fff;
+}
+*/
+.qianZhi {
+  white-space: nowrap;
+}
+
+.la {
+  font-size: 16px; //16
+  display: flex;
+  align-items: center;
+  padding: 1px;
+  width: 50%;
+}
+
+.zuoJuZhong {
+  text-align: left;
+}
+
+.lh {
+  display: flex;
+  align-items: center;
+  //   line-height: auto;
+  padding: 1px;
+  font-size: 16px; //16
+  display: flex;
+  align-items: center;
+  border-bottom: 1px solid #000000;
+}
+
+.container {
+  width: 400px;
+  height: 50px;
+  position: relative;
+  border: 1px solid #000000;
+}
+
+.triangle,
+.triangleYellow,
+.triangleRed {
+  width: 0;
+  height: 0;
+  position: relative;
+  border-right: 200px solid transparent;
+  border-left: 200px solid transparent;
+  border-bottom: 200px solid transparent;
+  text-align: center;
+  //   float: left;
+}
+
+.triangle {
+  border-top: 50px solid #fff;
+}
+
+.triangleYellow {
+  border-top: 50px solid #ffff00;
+}
+
+.triangleRed {
+  border-top: 50px solid #ff0000;
+}
+
+.triangle > .label,
+.triangleYellow > .label,
+.triangleRed > .label {
+  width: 150px;
+  position: relative;
+  top: -45px;
+  left: 50%;
+  transform: translateX(-50%);
+  font-size: 24px;
+  font-weight: bold;
+  color: #000000;
+}
+
+.top-triangle {
+  border-left: 100px solid transparent;
+  border-right: 100px solid transparent;
+  top: 0;
+  left: 0;
+}
+
+.left-triangle {
+  /* border-top: 100px solid transparent; */
+  border-right: 100px solid black;
+  border-bottom: 50px solid rgb(217, 217, 233);
+  top: 0;
+  left: 0;
+}
+
+.right-triangle {
+  border-left: 100px solid black; //red
+  border-bottom: 50px solid rgb(217, 217, 233);
+  top: 0;
+  left: 100px;
+}
+
+.one {
+  justify-content: center;
+  align-items: center;
+  display: flex;
+}
+</style>

+ 4 - 0
src/views/system/jbdScan/scan.vue

@@ -13,6 +13,8 @@
 <script>
 /* 共同调用类, 与脚本统一调用。*/
 import deviceTag from './goods/deviceTag.vue'
+import deviceTagHengSheng from './goods/deviceTag-hengsheng.vue'
+import deviceVerificationTagHengSheng from './goods/deviceVerificationTag-hengsheng.vue'
 import deviceVerificationTag from './goods/deviceVerificationTag.vue'
 import deviceFailureTag from './goods/deviceFailureTag.vue'
 import neishenzhuangtai from './goods/neishenzhuangtai'
@@ -23,6 +25,8 @@ import renkeshenbao from './goods/renkeshenbao'
 export default {
   components: {
     deviceTag,
+    deviceTagHengSheng,
+    deviceVerificationTagHengSheng,
     deviceVerificationTag,
     deviceFailureTag,
     neishenzhuangtai,