Merge remote-tracking branch 'origin/pet' into pet

liujun-相关方离职流程简化
liujun 2024-12-04 20:08:47 +08:00
commit a0c3a23bb5
14 changed files with 250 additions and 18 deletions

View File

@ -230,6 +230,24 @@
"navigationBarTitleText": "动火作业气体分析"
}
},
{
"path": "pages/eight_assignments/electricity/gas/name",
"style": {
"navigationBarTitleText": "临时用电气体分析"
}
},
{
"path": "pages/eight_assignments/electricity/gas/list",
"style": {
"navigationBarTitleText": "临时用电气体分析"
}
},
{
"path": "pages/eight_assignments/electricity/gas/add",
"style": {
"navigationBarTitleText": "临时用电气体分析"
}
},
{
"path": "pages/eight_assignments/high_work/apply",
"style": {

View File

@ -175,8 +175,8 @@ export default {
BOARD_INSTALL_TIME: '',
WORK_END_DATE: '',
WORK_USER: '',
WORK_LONGITUDE: '1',
WORK_LATITUDE: '1',
WORK_LONGITUDE: '',
WORK_LATITUDE: '',
MEDIUM: '',
TEMPERATURE: '',
PRESSURE: '',

View File

@ -128,8 +128,8 @@ export default {
CORP_NAME: '',
WORK_START_DATE: '',
WORK_END_DATE: '',
WORK_LONGITUDE: '1',
WORK_LATITUDE: '1',
WORK_LONGITUDE: '',
WORK_LATITUDE: '',
WORK_PLACE: '',
JOB_CONTENT: '',
WORK_CONTENT: '',

View File

@ -119,8 +119,8 @@ export default {
WORK_CONTENT: '',
WORK_START_DATE: '',
WORK_END_DATE: '',
WORK_LONGITUDE: '1',
WORK_LATITUDE: '1',
WORK_LONGITUDE: '',
WORK_LATITUDE: '',
WORK_USER: '',
SPECIAL_WORK: '',
RISK_IDENTIFICATION: '',

View File

@ -27,7 +27,7 @@
<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="ANALYZE_PLACE" borderBottom required>
<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="氧气含量" prop="OXYGEN_CONTENT" borderBottom required>

View File

@ -28,7 +28,7 @@
</u-form-item>
</u-form>
<view class="mt-10">
<u-button v-if="isView !== '1'" type="primary" text="气体分析" @click="$u.debounce(fnSubmit, 1000,true)"/>
<u-button type="primary" text="气体分析" @click="$u.debounce(fnSubmit, 1000,true)"/>
</view>
</view>
</view>

View File

@ -128,8 +128,8 @@ export default {
CORP_NAME: '',
WORK_START_DATE: '',
WORK_END_DATE: '',
WORK_LONGITUDE: '1',
WORK_LATITUDE: '1',
WORK_LONGITUDE: '',
WORK_LATITUDE: '',
OTHER_DEPT: '',
WORK_REASON: '',
WORK_CONTENT: '',

View File

@ -132,8 +132,8 @@ export default {
CORP_NAME: '',
WORK_START_DATE: '',
WORK_END_DATE: '',
WORK_LONGITUDE: '1',
WORK_LATITUDE: '1',
WORK_LONGITUDE: '',
WORK_LATITUDE: '',
WORK_PLACE: '',
WORK_CONTENT: '',
WORK_USER: '',

View File

@ -0,0 +1,107 @@
<template>
<view class="content">
<view class="card">
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
<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="ANALYZE_PLACE" borderBottom required>
<u-input v-model="form.ANALYZE_PLACE" border="none" />
</u-form-item>
<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="ANALYZE_USER_NAME" borderBottom required>
<u-input v-model="form.ANALYZE_USER_NAME" border="none" />
</u-form-item>
</u-form>
<view class="mt-10">
<u-button type="primary" text="保存" @click="$u.debounce(fnSubmit, 1000, true)" />
</view>
</view>
<u-datetime-picker :show="dateTimePicker.show" v-model="dateTimePicker.value" :mode="dateTimePicker.mode"
:maxDate="dateTimePicker.max" :key="dateTimePicker.type" @confirm="fnDateTimePickerConfirm"
@cancel="fnDateTimePickerCancel" />
</view>
</template>
<script>
import { getHotWorkGasInfoSave } from "@/api";
export default {
data() {
return {
form: {
/** 动火分析时间 */
ANALYZE_TIME: '',
/** 分析点名称 */
ANALYZE_PLACE: '',
/** 分析数据(%LEL) */
ANALYZE_RESULT: '',
/** 分析人 */
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: {
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,
value: Number(new Date()),
max: new Date().getTime(),
mode: 'datetime',
type: 'datetime-picker'
},
}
},
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
},
methods: {
fnDateTimePickerClick(event) {
this.dateTimePicker.type = event
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
this.dateTimePicker.show = true
},
fnDateTimePickerConfirm(event) {
this.form[this.dateTimePicker.type] = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM')
this.fnDateTimePickerCancel()
},
fnDateTimePickerCancel() {
this.dateTimePicker.show = false
},
async fnSubmit() {
try {
await this.$refs.formRef.validate()
try {
await getHotWorkGasInfoSave({
...this.form
})
uni.$u.toast('保存成功')
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index'
})
}, 2000)
} catch {
}
} catch (e) {
uni.$u.toast('请补全必填项')
}
}
}
}
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,94 @@
<template>
<view class="content">
<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>
<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">
<text>分析数据(%LEL): {{ item.ANALYZE_PLACE }}</text>
</view>
<view class="flex-between main-title">
<text>分析人{{ item.ANALYZE_USER_NAME }}</text>
</view>
<view v-if="isView !== '1'" 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 {getHotWorkGasInfo, getHotWorkGasDelete} from "@/api";
import {getHotWorkGasAll} from "../../../../api";
export default {
data() {
return {
list: [],
EW_RU_TASK_ID: '',
EW_RU_JOB_ID: '',
TYPE: '',
isView: '0'
}
},
onLoad(query) {
this.EW_RU_TASK_ID = query.taskId
this.TYPE = query.type
this.EW_RU_JOB_ID = query.EW_RU_JOB_ID
this.isView = query.isView
},
onShow() {
this.resetList()
},
methods: {
async getData() {
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 = []
this.getData()
},
fnDelete(item) {
uni.showModal({
title: '提示',
content: '确定要删除这条记录?',
success: async res => {
if (res.confirm) {
await getHotWorkGasDelete({
EW_SP_EG_ID: item.EW_SP_EG_ID
})
uni.$u.toast('删除成功')
this.resetList()
}
}
})
},
goToAdd() {
uni.$u.route({
url: '/pages/eight_assignments/hot_work/gas/add',
params: {
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
TYPE: this.TYPE
}
})
}
}
}
</script>

View File

@ -0,0 +1,13 @@
<template>
<view>name的预留位置</view>
</template>
<script>
export default {
data() {
return {}
}
}
</script>
<style scoped lang="scss"></style>

View File

@ -121,8 +121,8 @@ export default {
WORK_CONTENT: '',
WORK_START_DATE: '',
WORK_END_DATE: '',
WORK_LONGITUDE: '1',
WORK_LATITUDE: '1',
WORK_LONGITUDE: '',
WORK_LATITUDE: '',
SPECIAL_WORK: '',
RISK_IDENTIFICATION: '',
},

View File

@ -136,8 +136,8 @@ export default {
WORK_CONTENT: '',
WORK_START_DATE: '',
WORK_END_DATE: '',
WORK_LONGITUDE: '1',
WORK_LATITUDE: '1',
WORK_LONGITUDE: '',
WORK_LATITUDE: '',
SPECIAL_WORK: '',
RISK_IDENTIFICATION: '',
},

View File

@ -43,8 +43,8 @@ export default {
{name: '纬度', key_name: 'WORK_LATITUDE', type: 0}
],
form: {
WORK_LONGITUDE: '1',
WORK_LATITUDE: '1'
WORK_LONGITUDE: '',
WORK_LATITUDE: ''
},
rules: {
WORK_LONGITUDE: [{type: 'string', required: true, message: '请输入经度', trigger: ['blur', 'change']}],