feat:天平连接
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
<!-- 样品详情 -->
|
||||
<sample-detail-popup
|
||||
ref="sampleDetailPopup"
|
||||
:showPopup="showDetailPopup"
|
||||
v-model:showPopup="showDetailPopup"
|
||||
:detailPopupParam="detailPopupParam"
|
||||
></sample-detail-popup>
|
||||
</view>
|
||||
@@ -324,11 +324,6 @@ const printTask = () => {
|
||||
onMounted(() => {
|
||||
getDicSampleProcessCodeList()
|
||||
getAssayTask()
|
||||
|
||||
// 监听 popup 关闭
|
||||
uni.$on('sample-detail-popup_close', () => {
|
||||
showDetailPopup.value = false
|
||||
})
|
||||
})
|
||||
|
||||
onBackPress(() => {
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<view class="auncel-weight">
|
||||
<view class="weight">
|
||||
<view
|
||||
:style="{ textAlign: currentAuncel.isConnected != 1 ? 'center' : 'right' }"
|
||||
:class="
|
||||
currentAuncel.weightStable === 0
|
||||
? 'weight-data-yellow'
|
||||
@@ -89,7 +90,7 @@
|
||||
|
||||
<u-button
|
||||
class="btn-operation"
|
||||
v-if="currentAuncel.code === ''"
|
||||
v-if="currentAuncel.code !== ''"
|
||||
type="success"
|
||||
:disabled="confirmWeightDisabled"
|
||||
shape="circle"
|
||||
@@ -200,6 +201,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed, nextTick, onMounted } from 'vue'
|
||||
import { onLoad, onBackPress, onShow, onHide, onUnload } from '@dcloudio/uni-app'
|
||||
import request from '@/nx/request'
|
||||
import { calcAnalysisValue } from '@/nx/helper/calcAnalysisValue'
|
||||
import { number } from 'mathjs'
|
||||
@@ -207,6 +209,7 @@ import AuncelSelectPopup from '@/components/sample/auncel-select-popup.vue'
|
||||
import { getTenantId } from '@/defaultBaseUrl'
|
||||
import { useScreenOrientation } from '@/nx/hooks/useScreenOrientation'
|
||||
import nx from '@/nx'
|
||||
import text from '@/uview-plus/components/u-text/text'
|
||||
|
||||
// 响应式数据定义
|
||||
const elId = nx.$helper.uuid()
|
||||
@@ -944,7 +947,7 @@ const listenDeviceData = () => {
|
||||
//设备数据
|
||||
uni.$on('deviceData', res => {
|
||||
switch (res.deviceType) {
|
||||
case 'auncel':
|
||||
case 'balance':
|
||||
if (currentAuncel.id === res.deviceId) {
|
||||
currentAuncel.weightData = res.weightData
|
||||
currentAuncel.weightUnit = res.weightUnit
|
||||
@@ -1233,7 +1236,7 @@ onBackPress(() => {
|
||||
}
|
||||
|
||||
.auncel {
|
||||
width: 100%;
|
||||
width: 90%;
|
||||
height: 55vh;
|
||||
background-image: url(/static/images/auncel.png);
|
||||
background-repeat: no-repeat;
|
||||
@@ -1263,31 +1266,29 @@ onBackPress(() => {
|
||||
.weight {
|
||||
font-size: 42px;
|
||||
width: 100%;
|
||||
padding-right: 10px;
|
||||
padding: 0 60px;
|
||||
}
|
||||
|
||||
.weight-data {
|
||||
color: #4cd964;
|
||||
text-align: right;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-data-yellow {
|
||||
color: #ffff00;
|
||||
text-align: center;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-data-warning {
|
||||
color: #ff3333;
|
||||
text-align: right;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-unit {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
color: #ffffff;
|
||||
font-size: 32px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.auncel {
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import request from '@/nx/request'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { calcAnalysisValue } from '@/nx/helper/calcAnalysisValue'
|
||||
import nx from '@/nx'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
@@ -198,17 +198,9 @@ const applyRollbackSample = () => {
|
||||
taskId: currentTask.value.id,
|
||||
detailIds: detailIdList.join(',')
|
||||
}
|
||||
|
||||
uni.showLoading({ title: '正在发起申请...' })
|
||||
nx.$api.assayTask
|
||||
.createRollbackApply(data)
|
||||
.then(() => {
|
||||
getAssayTaskDetail(currentTaskNo.value)
|
||||
})
|
||||
.catch(console.error)
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
nx.$api.assayTask.createRollbackApply(data).then(() => {
|
||||
getAssayTaskDetail(currentTaskNo.value)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user