动火气体分析模块开发
parent
bb96cb2954
commit
8d7f6979fa
|
@ -2,19 +2,19 @@
|
|||
<view class="content">
|
||||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<u-form-item label="动火分析时间" prop="GAS_TIME" borderBottom required @click="fnDateTimePickerClick('GAS_TIME')">
|
||||
<u-input v-model="form.GAS_TIME" border="none" readonly />
|
||||
<u-form-item label="动火分析时间" prop="ANALYZE_TIME" borderBottom required @click="fnDateTimePickerClick('ANALYZE_TIME')">
|
||||
<u-input v-model="form.ANALYZE_TIME" border="none" readonly />
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="分析点名称" prop="GAS_NAME" borderBottom required>
|
||||
<u-input v-model="form.GAS_NAME" border="none" />
|
||||
<u-form-item label="分析点名称" prop="ANALYZE_PLACE" borderBottom required>
|
||||
<u-input v-model="form.ANALYZE_PLACE" border="none" />
|
||||
</u-form-item>
|
||||
<u-form-item label="分析数据(%LEL)" prop="GAS_NUMBER" borderBottom required>
|
||||
<u-input v-model="form.GAS_NUMBER" border="none" type="number" placeholder="0" />
|
||||
<u-form-item label="分析数据(%LEL)" prop="ANALYZE_RESULT" borderBottom required>
|
||||
<u-input v-model="form.ANALYZE_RESULT" border="none" type="number" placeholder="0" />
|
||||
<view class="title">(%LEL)</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="分析人" prop="gasUserName" borderBottom required>
|
||||
<u-input v-model="form.gasUserName" border="none" />
|
||||
<u-form-item label="分析人" prop="ANALYZE_USER_NAME" borderBottom required>
|
||||
<u-input v-model="form.ANALYZE_USER_NAME" border="none" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
|
@ -36,19 +36,23 @@ export default {
|
|||
return {
|
||||
form: {
|
||||
/** 动火分析时间 */
|
||||
GAS_TIME: '',
|
||||
ANALYZE_TIME: '',
|
||||
/** 分析点名称 */
|
||||
GAS_NAME: '',
|
||||
ANALYZE_PLACE: '',
|
||||
/** 分析数据(%LEL) */
|
||||
GAS_NUMBER: '',
|
||||
ANALYZE_RESULT: '',
|
||||
/** 分析人 */
|
||||
gasUserName: this.$store.getters.getUserInfo.NAME
|
||||
ANALYZE_USER_NAME: this.$store.getters.getUserInfo.NAME,
|
||||
ANALYZE_USER_ID: this.$store.getters.getUserInfo.USER_ID,
|
||||
EW_RU_TASK_ID:'',
|
||||
EW_RU_JOB_ID:'',
|
||||
TYPE: ''
|
||||
},
|
||||
rules: {
|
||||
GAS_TIME: [{ type: 'string', required: true, message: '请选择动火分析时间', trigger: ['blur', 'change'] }],
|
||||
GAS_NAME: [{ type: 'string', required: true, message: '请输入分析点名称', trigger: ['blur', 'change'] }],
|
||||
GAS_NUMBER: [{ type: 'string', required: true, message: '请输入分析数据', trigger: ['blur', 'change'] }],
|
||||
gasUserName: [{ type: 'string', required: true, message: '请输入分析人', trigger: ['blur', 'change'] }],
|
||||
ANALYZE_TIME: [{ type: 'string', required: true, message: '请选择动火分析时间', trigger: ['blur', 'change'] }],
|
||||
ANALYZE_PLACE: [{ type: 'string', required: true, message: '请输入分析点名称', trigger: ['blur', 'change'] }],
|
||||
ANALYZE_RESULT: [{ type: 'string', required: true, message: '请输入分析数据', trigger: ['blur', 'change'] }],
|
||||
ANALYZE_USER_NAME: [{ type: 'string', required: true, message: '请输入分析人', trigger: ['blur', 'change'] }],
|
||||
},
|
||||
dateTimePicker: {
|
||||
show: false,
|
||||
|
@ -59,6 +63,12 @@ export default {
|
|||
},
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
this.form.EW_RU_TASK_ID = query.EW_RU_TASK_ID
|
||||
this.TYPE = query.TYPE
|
||||
this.form.EW_RU_JOB_ID = query.EW_RU_JOB_ID
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
fnDateTimePickerClick(event) {
|
||||
this.dateTimePicker.type = event
|
||||
|
@ -76,14 +86,8 @@ export default {
|
|||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
try {
|
||||
// for (let i = 0; i < 4; i++) {
|
||||
// if (this[`GAS_NAME${i + 1}`] && !this.form[`DATA${i + 1}`]) this.form[`DATA${i + 1}`] = 0
|
||||
// }
|
||||
await getHotWorkGasInfoSave({
|
||||
data: { ...this.form },
|
||||
// EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
// EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
postMethod: 'application/json',
|
||||
...this.form
|
||||
})
|
||||
uni.$u.toast('保存成功')
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
<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.GAS_TIME }}</text>
|
||||
<text>动火分析时间: {{ item.ANALYZE_TIME }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title">
|
||||
<text>分析点名称: {{ item.GAS_NAME }}</text>
|
||||
<text>分析点名称: {{ item.ANALYZE_PLACE }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title">
|
||||
<text>分析数据(%LEL): {{ item.GAS_NUMBER }}</text>
|
||||
<text>分析数据(%LEL): {{ item.ANALYZE_PLACE }}</text>
|
||||
</view>
|
||||
<view class="flex-between main-title">
|
||||
<text>分析人:{{ item.userName }}</text>
|
||||
<text>分析人:{{ item.ANALYZE_USER_NAME }}</text>
|
||||
</view>
|
||||
<view class="flex-between mt-10 subtitle">
|
||||
<view></view>
|
||||
|
@ -28,32 +28,30 @@
|
|||
|
||||
<script>
|
||||
import { getHotWorkGasInfo, getHotWorkGasDelete } from "@/api";
|
||||
import {getHotWorkGasAll} from "../../../../api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
list: [],
|
||||
EW_RU_TASK_ID: '',
|
||||
EW_RU_JOB_ID: '',
|
||||
TYPE: ''
|
||||
}
|
||||
},
|
||||
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;
|
||||
this.EW_RU_TASK_ID = query.taskId
|
||||
this.TYPE = query.type
|
||||
this.EW_RU_JOB_ID = query.EW_RU_JOB_ID
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if (e.index === 0) {
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/hot_work/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,
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
TYPE: this.TYPE
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -63,19 +61,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
// let resData = await getHotWorkGasInfo({
|
||||
// EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
// EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
// postMethod: 'application/json',
|
||||
// });
|
||||
let mockData = [{
|
||||
// Number(new Date())
|
||||
GAS_TIME: '2024-08-30 15:23:43',
|
||||
GAS_NAME: '234',
|
||||
GAS_NUMBER: 'fasf',
|
||||
userName: 'zhangxiao'
|
||||
}]
|
||||
this.list = [...this.list, ...mockData];
|
||||
let resData = await getHotWorkGasAll({
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
});
|
||||
this.list = [...this.list, ...resData.list];
|
||||
},
|
||||
resetList() {
|
||||
this.list = []
|
||||
|
@ -88,10 +78,7 @@ export default {
|
|||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await getHotWorkGasDelete({
|
||||
data: item,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
postMethod: 'application/json',
|
||||
EW_SP_EG_ID: item.EW_SP_EG_ID
|
||||
})
|
||||
uni.$u.toast('删除成功')
|
||||
this.resetList()
|
||||
|
|
|
@ -210,7 +210,7 @@ export const resolveNextOperation = async (
|
|||
})
|
||||
return
|
||||
}
|
||||
// 有限空间作业气体分析
|
||||
// 流程特殊权限校验
|
||||
if (info.otherFlag !== null && info.otherFlag.redirectFlag === '1') {
|
||||
uni.$u.route({
|
||||
url: info.otherFlag.url,
|
||||
|
|
Loading…
Reference in New Issue