受限空间气体分析bug修复
parent
ad600e05c7
commit
4c3d577aff
|
@ -29,7 +29,7 @@
|
|||
<view class="flex-between main-title">
|
||||
<text>分析人:{{ item.ANALYZE_USER_NAME }}</text>
|
||||
</view>
|
||||
<view class="flex-between mt-10 subtitle">
|
||||
<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"
|
||||
|
|
|
@ -3,28 +3,28 @@
|
|||
<view class="card">
|
||||
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
|
||||
<u-form-item label="有毒有害气体名称1" prop="GAS_NAME1" borderBottom>
|
||||
<u-input v-model="form.GAS_NAME1" border="none"/>
|
||||
<u-input :disabled="this.isView === '1'" v-model="form.GAS_NAME1" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="合格标准" prop="GAS_STANDARD1" borderBottom>
|
||||
<u-input v-model="form.GAS_STANDARD1" border="none"/>
|
||||
<u-input :disabled="this.isView === '1'" v-model="form.GAS_STANDARD1" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="有毒有害气体名称2" prop="GAS_NAME2" borderBottom>
|
||||
<u-input v-model="form.GAS_NAME2" border="none"/>
|
||||
<u-input :disabled="this.isView === '1'" v-model="form.GAS_NAME2" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="合格标准" prop="GAS_STANDARD2" borderBottom>
|
||||
<u-input v-model="form.GAS_STANDARD2" border="none"/>
|
||||
<u-input :disabled="this.isView === '1'" v-model="form.GAS_STANDARD2" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="可燃气体名称1" prop="GAS_NAME3" borderBottom>
|
||||
<u-input v-model="form.GAS_NAME3" border="none"/>
|
||||
<u-input :disabled="this.isView === '1'" v-model="form.GAS_NAME3" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="合格标准" prop="GAS_STANDARD3" borderBottom>
|
||||
<u-input v-model="form.GAS_STANDARD3" border="none"/>
|
||||
<u-input :disabled="this.isView === '1'" v-model="form.GAS_STANDARD3" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="可燃气体名称2" prop="GAS_NAME4" borderBottom>
|
||||
<u-input v-model="form.GAS_NAME4" border="none"/>
|
||||
<u-input :disabled="this.isView === '1'" v-model="form.GAS_NAME4" border="none"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="合格标准" prop="GAS_STANDARD4" borderBottom>
|
||||
<u-input v-model="form.GAS_STANDARD4" border="none"/>
|
||||
<u-input :disabled="this.isView === '1'" v-model="form.GAS_STANDARD4" border="none"/>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
|
@ -77,37 +77,52 @@ export default {
|
|||
this.form = resData.data.aux[0] || {}
|
||||
},
|
||||
async fnSubmit() {
|
||||
if (!this.form.GAS_NAME1 && !this.form.GAS_NAME2 && !this.form.GAS_NAME3 && !this.form.GAS_NAME4) {
|
||||
uni.$u.toast('最少填写一项气体名称')
|
||||
return
|
||||
}
|
||||
for (let i = 0; i < 4; i++) {
|
||||
if (this.form['GAS_NAME' + (i + 1)] && !this.form['GAS_STANDARD' + (i + 1)]) {
|
||||
uni.$u.toast('请填写气体名称(' + this.form['GAS_NAME' + (i + 1)] + ')的合格标准')
|
||||
if (this.isView === '1') {
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/confined_space/gas/list',
|
||||
params: {
|
||||
isView: this.isView,
|
||||
GAS_NAME1: this.form.GAS_NAME1,
|
||||
GAS_NAME2: this.form.GAS_NAME2,
|
||||
GAS_NAME3: this.form.GAS_NAME3,
|
||||
GAS_NAME4: this.form.GAS_NAME4,
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (!this.form.GAS_NAME1 && !this.form.GAS_NAME2 && !this.form.GAS_NAME3 && !this.form.GAS_NAME4) {
|
||||
uni.$u.toast('最少填写一项气体名称')
|
||||
return
|
||||
}
|
||||
if (this.form['GAS_STANDARD' + (i + 1)] && !this.form['GAS_NAME' + (i + 1)]) {
|
||||
uni.$u.toast('请填写合格标准(' + this.form['GAS_STANDARD' + (i + 1)] + ')的气体名称')
|
||||
return
|
||||
for (let i = 0; i < 4; i++) {
|
||||
if (this.form['GAS_NAME' + (i + 1)] && !this.form['GAS_STANDARD' + (i + 1)]) {
|
||||
uni.$u.toast('请填写气体名称(' + this.form['GAS_NAME' + (i + 1)] + ')的合格标准')
|
||||
return
|
||||
}
|
||||
if (this.form['GAS_STANDARD' + (i + 1)] && !this.form['GAS_NAME' + (i + 1)]) {
|
||||
uni.$u.toast('请填写合格标准(' + this.form['GAS_STANDARD' + (i + 1)] + ')的气体名称')
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
await setConfinedSpaceGasInfoSave({
|
||||
wh: {...this.form},
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/confined_space/gas/list',
|
||||
params: {
|
||||
GAS_NAME1: this.form.GAS_NAME1,
|
||||
GAS_NAME2: this.form.GAS_NAME2,
|
||||
GAS_NAME3: this.form.GAS_NAME3,
|
||||
GAS_NAME4: this.form.GAS_NAME4,
|
||||
await setConfinedSpaceGasInfoSave({
|
||||
wh: {...this.form},
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
}
|
||||
})
|
||||
postMethod: 'application/json',
|
||||
})
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/confined_space/gas/list',
|
||||
params: {
|
||||
GAS_NAME1: this.form.GAS_NAME1,
|
||||
GAS_NAME2: this.form.GAS_NAME2,
|
||||
GAS_NAME3: this.form.GAS_NAME3,
|
||||
GAS_NAME4: this.form.GAS_NAME4,
|
||||
EW_RU_TASK_ID: this.EW_RU_TASK_ID,
|
||||
EW_RU_JOB_ID: this.EW_RU_JOB_ID,
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ export default {
|
|||
resData.PHOTO = this.$filePath + resData.PHOTO
|
||||
}
|
||||
await this.$store.dispatch('setUserInfo', resData);
|
||||
|
||||
uni.$u.route({
|
||||
url: '/pages/index/index',
|
||||
type: 'reLaunch'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import refreshToken from "../api/refreshToken";
|
||||
|
||||
// let requestPath = 'http://192.168.0.102:8059/xgf_gwj_2.0/'; // 后台请求地址
|
||||
let requestPath = 'http://192.168.0.101:8059/xgf_gwj_2.0/'; // 后台请求地址
|
||||
let requestPath = 'http://127.0.0.1:8059/xgf_gwj_2.0/'; // 后台请求地址
|
||||
// let requestPath = 'https://skqhdg.porthebei.com:9006/qa-prevention-xgf/'; // 后台请求地址
|
||||
// let requestPath = 'https://qgxgf.qhdsafety.com/qa-prevention-xgf/'; // 外网地址
|
||||
import store from '../store/index'
|
||||
|
@ -146,11 +146,3 @@ function uploads(url, data) {
|
|||
}
|
||||
|
||||
export {post, upload, uploads}
|
||||
|
||||
setInterval(async () => {
|
||||
if (uni.getStorageSync('tokenTime') == null) return;
|
||||
if (dayjs().diff(dayjs(uni.getStorageSync('tokenTime')), "minute") >= 0.5) {
|
||||
uni.setStorageSync('tokenTime', dayjs().format("YYYY-MM-DD HH:mm:ss"))
|
||||
await setRefreshToken();
|
||||
}
|
||||
}, 1000 * 60);
|
||||
|
|
Loading…
Reference in New Issue