feat:设备管理修改

This commit is contained in:
houjunxiang
2026-03-20 17:56:17 +08:00
parent f0dffc29fa
commit 904d1c4ea4
15 changed files with 564 additions and 468 deletions

View File

@@ -48,7 +48,7 @@
</up-row>
<up-row justify="space-around">
<up-col span="3.5">
<view class="p5">{{isHighTemperature?'使用':''}}温度</view>
<view class="p5">{{ isHighTemperature ? '使用' : '' }}温度</view>
<up-input v-model="formData.temperature"></up-input>
</up-col>
<up-col v-if="!isHighTemperature" span="3.5">
@@ -148,6 +148,7 @@ const detailSchema = [
{ label: '使用班组', value: 'deptName' }
]
const columns = ref([
{ title: '任务单号', key: 'taskNo', align: 'center' },
{ title: '样品名称', key: 'sampleName', align: 'center' },
{ title: '样品编号', key: 'sampleCode', align: 'center' },
{ title: '操作', key: 'action', width: '100px', align: 'center' }
@@ -167,7 +168,6 @@ function handleSampleSelect(dataList, type) {
const transformData = newData => {
if (type === 'sample') {
return {
id: newData.id,
detailType: 'sample',
sampleCode: newData.sampleCode,
sampleName: newData.sampleName,
@@ -176,16 +176,16 @@ function handleSampleSelect(dataList, type) {
}
} else {
return {
id: newData.id,
detailType: 'standard',
sampleCode: newData.code,
sampleName: newData.name
sampleName: newData.name,
taskId: newData.id
}
}
}
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 taskIdKey = type === 'sample' ? 'businessAssayTaskId' : 'id'
const index = tableData.value.findIndex(item => item.taskId === newData[taskIdKey])
const transformedItem = transformData(newData)
if (index > -1) {
@@ -206,7 +206,6 @@ const userId = nx.$store('user').userInfo['id']
const userName = nx.$store('user').userInfo['realname']
let detailInfo = ref({})
function handleScanResult(result) {
const codeObj = JSON.parse(result)
if (!pageLoading.value) {
@@ -244,12 +243,12 @@ function handleTestAction(id) {
getLastDailyCheckOfToday(id)
}
// 是否是高温设备
const isHighTemperature = computed(()=>{
if(detailInfo.value.customConfigJson&&detailInfo.value.customConfigJson.highTemperature){
return true
}else{
return false
}
const isHighTemperature = computed(() => {
if (detailInfo.value.customConfigJson && detailInfo.value.customConfigJson.highTemperature) {
return true
} else {
return false
}
})
// 获取设备详情
async function getDeviceInfo(id) {