feat:试剂瓶回收
This commit is contained in:
@@ -48,10 +48,10 @@
|
||||
</up-row>
|
||||
<up-row justify="space-around">
|
||||
<up-col span="3.5">
|
||||
<view class="p5">温度(℃):</view>
|
||||
<view class="p5">{{isHighTemperature?'使用':''}}温度(℃):</view>
|
||||
<up-input v-model="formData.temperature"></up-input>
|
||||
</up-col>
|
||||
<up-col span="3.5">
|
||||
<up-col v-if="!isHighTemperature" span="3.5">
|
||||
<view class="p5">湿度(%HR):</view>
|
||||
<up-input v-model="formData.humidity"></up-input>
|
||||
</up-col>
|
||||
@@ -124,7 +124,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, onUnmounted, watch, toRefs } from 'vue'
|
||||
import { ref, reactive, onMounted, onUnmounted, watch, toRefs, computed } from 'vue'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { getDeviceBusInfoById } from '@/nx/api/deviceInfo'
|
||||
import { getUseRecordById, addUseRecord, editUseRecord, getDetailList } from './useRecord.api'
|
||||
@@ -183,7 +183,7 @@ function handleSampleSelect(dataList, type) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tableData.value = tableData.value.filter(item => item.detailType !== type)
|
||||
for (const newData of dataList) {
|
||||
const index = tableData.value.findIndex(item => item.id === newData.id)
|
||||
const transformedItem = transformData(newData)
|
||||
@@ -206,27 +206,6 @@ const userId = nx.$store('user').userInfo['id']
|
||||
const userName = nx.$store('user').userInfo['realname']
|
||||
let detailInfo = ref({})
|
||||
|
||||
// const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
// watch(scanQRInfo, newVal => {
|
||||
// if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusUseRecord/index') {
|
||||
// try {
|
||||
// const codeObj = JSON.parse(newVal)
|
||||
// if (!pageLoading.value) {
|
||||
// getLastDailyCheckOfToday(codeObj.id)
|
||||
// }
|
||||
// scanQRInfo.value = ''
|
||||
// } catch (error) {
|
||||
// scanQRInfo.value = ''
|
||||
// uni.showToast({
|
||||
// title: '请扫描设备码',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// onShow(() => {
|
||||
// scanQRInfo.value = ''
|
||||
// })
|
||||
|
||||
function handleScanResult(result) {
|
||||
const codeObj = JSON.parse(result)
|
||||
@@ -264,6 +243,14 @@ async function getLastDailyCheckOfToday(id) {
|
||||
function handleTestAction(id) {
|
||||
getLastDailyCheckOfToday(id)
|
||||
}
|
||||
// 是否是高温设备
|
||||
const isHighTemperature = computed(()=>{
|
||||
if(detailInfo.value.customConfigJson&&detailInfo.value.customConfigJson.highTemperature){
|
||||
return true
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
})
|
||||
// 获取设备详情
|
||||
async function getDeviceInfo(id) {
|
||||
const res = await getDeviceBusInfoById(id).finally(() => {})
|
||||
|
||||
Reference in New Issue
Block a user