|
@@ -21,7 +21,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
|
<van-button style="width: 80px; height: 30px; margin: 0; font-size: 14px" class="scan-txt" type="primary"
|
|
<van-button style="width: 80px; height: 30px; margin: 0; font-size: 14px" class="scan-txt" type="primary"
|
|
|
- size="small" :disabled="loading" v-if="['10', '20', '30', '50','60','70'].includes(v.controlMode)"
|
|
|
|
|
|
|
+ size="small" :disabled="loading" v-if="['10', '20', '30', '50', '60', '70'].includes(v.controlMode)"
|
|
|
@click="handleGetOn(v)">
|
|
@click="handleGetOn(v)">
|
|
|
{{ v.controlMode == '10' ? '上机' : '扫码上机' }}
|
|
{{ v.controlMode == '10' ? '上机' : '扫码上机' }}
|
|
|
</van-button>
|
|
</van-button>
|
|
@@ -211,27 +211,30 @@ export default {
|
|
|
* appointRow 当前预约信息
|
|
* appointRow 当前预约信息
|
|
|
*/
|
|
*/
|
|
|
async handleCodeInfo(content, appointRow) {
|
|
async handleCodeInfo(content, appointRow) {
|
|
|
- if (content.includes('id')) {
|
|
|
|
|
- if (JSON.parse(content).id == appointRow.instId) {
|
|
|
|
|
- this.handleGetOnByAppointId(appointRow.id)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- showNotify({ type: 'warning', message: '扫码机器不是预约机器' })
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- // 拿到解码信息(仪器编码)获取仪器id
|
|
|
|
|
- const [instErr, instRes] = await to(instApi.getIdByTerminal({ terminal: content }))
|
|
|
|
|
- if (instErr) {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- if (instRes.data.id == appointRow.instId) {
|
|
|
|
|
- this.handleGetOnByAppointId(appointRow.id)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- showNotify({ type: 'warning', message: '扫码机器不是预约机器' })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (content.includes('id')) {
|
|
|
|
|
+ // if (JSON.parse(content).id == appointRow.instId) {
|
|
|
|
|
+ // this.handleGetOnByAppointId(appointRow.id)
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.loading = false
|
|
|
|
|
+ // showNotify({ type: 'warning', message: '扫码机器不是预约机器' })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // // 拿到解码信息(仪器编码)获取仪器id
|
|
|
|
|
+ // const [instErr, instRes] = await to(instApi.getIdByTerminal({ terminal: content }))
|
|
|
|
|
+ // if (instErr) {
|
|
|
|
|
+ // this.loading = false
|
|
|
|
|
+ // return
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (instRes.data.id == appointRow.instId) {
|
|
|
|
|
+ // this.handleGetOnByAppointId(appointRow.id)
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.loading = false
|
|
|
|
|
+ // showNotify({ type: 'warning', message: '扫码机器不是预约机器' })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ console.log(content)
|
|
|
|
|
+ // 不管有没有 id 都不要再校验“扫码机器不是预约机器”,直接上机
|
|
|
|
|
+ this.handleGetOnByAppointId(appointRow.id)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//蓝牙 重新解码函数,获取解码内容之后 执行跳转操作
|
|
//蓝牙 重新解码函数,获取解码内容之后 执行跳转操作
|