feat:试剂瓶回收
This commit is contained in:
@@ -3,21 +3,15 @@
|
||||
<uni-section titleFontSize="20px" type="line" title="设备使用记录"> </uni-section>
|
||||
<scroll-view scroll-y="true" class="content">
|
||||
<up-row>
|
||||
<up-col span="6"
|
||||
<up-col span="4"
|
||||
>开始使用人:
|
||||
<text class="value">{{ detailInfo.userName }}</text>
|
||||
</up-col>
|
||||
<up-col span="6"
|
||||
<up-col span="4"
|
||||
>开始时间:
|
||||
<text class="value">{{ nx.$helper.formateToDateTime(detailInfo.useTimeStart) }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<up-row>
|
||||
<up-col span="6"
|
||||
>结束使用人:
|
||||
<text class="value">{{ detailInfo.userNameEnd }}</text>
|
||||
</up-col>
|
||||
<up-col span="6"
|
||||
<up-col span="4"
|
||||
>结束时间:
|
||||
<text class="value">{{ nx.$helper.formateToDateTime(detailInfo.useTimeEnd) }}</text>
|
||||
</up-col>
|
||||
@@ -28,20 +22,24 @@
|
||||
<text class="value">{{ detailInfo.stateBefore }}</text>
|
||||
</up-col>
|
||||
<up-col span="4"
|
||||
>使用后状态:
|
||||
<text class="value">{{ detailInfo.stateAfter }}</text>
|
||||
>使用中状态:
|
||||
<text class="value">{{ detailInfo.stateRun }}</text>
|
||||
</up-col>
|
||||
<up-col span="4"
|
||||
>温度(℃):
|
||||
<text class="value">{{ detailInfo.temperature }}</text>
|
||||
>使用后状态:
|
||||
<text class="value">{{ detailInfo.stateAfter }}</text>
|
||||
</up-col>
|
||||
</up-row>
|
||||
<up-row>
|
||||
<up-col span="4"
|
||||
>温度(℃):
|
||||
<text class="value">{{ detailInfo.temperature }}</text>
|
||||
</up-col>
|
||||
<up-col span="4"
|
||||
>湿度(%RH):
|
||||
<text class="value">{{ detailInfo.humidity }}</text>
|
||||
</up-col>
|
||||
<up-col span="6"
|
||||
<up-col span="4"
|
||||
>检测项目:
|
||||
<text class="value">{{ detailInfo.useItem }}</text>
|
||||
</up-col>
|
||||
|
||||
@@ -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(() => {})
|
||||
|
||||
@@ -76,6 +76,11 @@ const column = reactive([
|
||||
name: 'stateBefore',
|
||||
width: 110
|
||||
},
|
||||
{
|
||||
label: '使用中状态',
|
||||
name: 'stateRun',
|
||||
width: 110
|
||||
},
|
||||
{
|
||||
label: '使用后状态',
|
||||
name: 'stateAfter',
|
||||
|
||||
@@ -56,6 +56,7 @@ watch(allChecked, value => {
|
||||
const searchParams = computed(() => {
|
||||
return {
|
||||
treatmentStatus: '0',
|
||||
businessType:'清洗回收',
|
||||
pageSize: 999
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user