2024-07-11 18:04:46 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="content">
|
2025-03-20 18:31:51 +08:00
|
|
|
|
<view v-if="isView !== '1'" class="flex-end padding" style="padding: 20upx;">
|
|
|
|
|
<u-button type="primary" text="添加" size="mini" class="bth-mini" @click="goToAdd"/>
|
|
|
|
|
</view>
|
2024-07-11 18:04:46 +08:00
|
|
|
|
<u-list v-if="list.length > 0">
|
|
|
|
|
<u-list-item v-for="(item, index) in list" :key="index">
|
|
|
|
|
<view class="flex-between main-title">
|
|
|
|
|
<text>分析时间:{{ item.ANALYZE_TIME }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title">
|
|
|
|
|
<text>分析地点:{{ item.ANALYZE_PLACE }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title" v-if="GAS_NAME1 && item.DATA1">
|
|
|
|
|
<text>{{ GAS_NAME1 }}:{{ item.DATA1 }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title" v-if="GAS_NAME2 && item.DATA2">
|
|
|
|
|
<text>{{ GAS_NAME2 }}:{{ item.DATA2 }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title" v-if="GAS_NAME3 && item.DATA3">
|
|
|
|
|
<text>{{ GAS_NAME3 }}:{{ item.DATA3 }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title" v-if="GAS_NAME4 && item.DATA4">
|
|
|
|
|
<text>{{ GAS_NAME4 }}:{{ item.DATA4 }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title">
|
|
|
|
|
<text>含氧量:{{ item.OXYGEN_CONTENT }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title">
|
|
|
|
|
<text>分析人:{{ item.ANALYZE_USER_NAME }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between mt-10 subtitle">
|
|
|
|
|
<view></view>
|
|
|
|
|
<view class="flex-between">
|
|
|
|
|
<u-button type="error" text="删除" size="mini" class="bth-mini"
|
|
|
|
|
@click="fnDelete(item)"/>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-list-item>
|
|
|
|
|
</u-list>
|
|
|
|
|
<empty v-else></empty>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getConfinedSpaceGasInfo, setConfinedSpaceGasDelete} from "@/api";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
GAS_NAME1: '',
|
|
|
|
|
GAS_NAME2: '',
|
|
|
|
|
GAS_NAME3: '',
|
|
|
|
|
GAS_NAME4: '',
|
|
|
|
|
EW_RU_TASK_ID: '',
|
|
|
|
|
EW_RU_JOB_ID: '',
|
2025-03-20 18:31:51 +08:00
|
|
|
|
list: [],
|
|
|
|
|
isView: '0'
|
2024-07-11 18:04:46 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(query) {
|
|
|
|
|
this.GAS_NAME1 = query.GAS_NAME1;
|
|
|
|
|
this.GAS_NAME2 = query.GAS_NAME2;
|
|
|
|
|
this.GAS_NAME3 = query.GAS_NAME3;
|
|
|
|
|
this.GAS_NAME4 = query.GAS_NAME4;
|
|
|
|
|
this.EW_RU_TASK_ID = query.EW_RU_TASK_ID;
|
|
|
|
|
this.EW_RU_JOB_ID = query.EW_RU_JOB_ID;
|
2025-03-20 18:31:51 +08:00
|
|
|
|
this.isView = query.isView
|
2024-07-11 18:04:46 +08:00
|
|
|
|
},
|
|
|
|
|
onNavigationBarButtonTap(e) {
|
|
|
|
|
if (e.index === 0) {
|
|
|
|
|
uni.$u.route({
|
|
|
|
|
url: '/pages/eight_assignments/confined_space/gas/add',
|
|
|
|
|
params: {
|
|
|
|
|
GAS_NAME1: this.GAS_NAME1,
|
|
|
|
|
GAS_NAME2: this.GAS_NAME2,
|
|
|
|
|
GAS_NAME3: this.GAS_NAME3,
|
|
|
|
|
GAS_NAME4: this.GAS_NAME4,
|
|
|
|
|
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
|
|
|
|
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.resetList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async getData() {
|
|
|
|
|
let resData = await getConfinedSpaceGasInfo({
|
|
|
|
|
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
|
|
|
|
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
|
|
|
|
postMethod: 'application/json',
|
|
|
|
|
});
|
|
|
|
|
this.list = [...this.list, ...resData.data.main];
|
|
|
|
|
},
|
|
|
|
|
resetList() {
|
|
|
|
|
this.list = []
|
|
|
|
|
this.getData()
|
|
|
|
|
},
|
|
|
|
|
fnDelete(item) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '确定要删除这条记录?',
|
|
|
|
|
success: async res => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
await setConfinedSpaceGasDelete({
|
|
|
|
|
data: item,
|
|
|
|
|
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
|
|
|
|
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
|
|
|
|
postMethod: 'application/json',
|
|
|
|
|
})
|
|
|
|
|
uni.$u.toast('删除成功')
|
|
|
|
|
this.resetList()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-03-20 18:31:51 +08:00
|
|
|
|
},
|
|
|
|
|
goToAdd() {
|
|
|
|
|
uni.$u.route({
|
|
|
|
|
url: '/pages/eight_assignments/confined_space/gas/add',
|
|
|
|
|
params: {
|
|
|
|
|
GAS_NAME1: this.GAS_NAME1,
|
|
|
|
|
GAS_NAME2: this.GAS_NAME2,
|
|
|
|
|
GAS_NAME3: this.GAS_NAME3,
|
|
|
|
|
GAS_NAME4: this.GAS_NAME4,
|
|
|
|
|
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
|
|
|
|
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
|
|
|
|
}
|
|
|
|
|
})
|
2024-07-11 18:04:46 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
2025-03-20 18:31:51 +08:00
|
|
|
|
|
2024-07-11 18:04:46 +08:00
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
|
|
</style>
|