feat: 添加部分修改回显逻辑
parent
986bc90dc3
commit
26b5ef1301
|
@ -81,6 +81,7 @@
|
|||
import {getConfinedSpaceSelectList} from '@/api'
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
import { getTaskInfo } from '@/api';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -177,8 +178,19 @@ export default {
|
|||
this.form.CORP_ID = options.CORPINFO_ID
|
||||
this.form.CORP_NAME = options.CORP_NAME
|
||||
this.type = options.type
|
||||
if (options.taskId) {
|
||||
this.fnGetData(options.taskId)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async fnGetData(taskId) {
|
||||
let resData = await getTaskInfo({EW_RU_TASK_ID: taskId});
|
||||
if (resData.list.form && resData.list.form.length > 0) {
|
||||
resData.list.form.forEach((sos, index) => {
|
||||
this.form[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
||||
})
|
||||
}
|
||||
},
|
||||
async fnGetConfinedSpaceSelectList() {
|
||||
const resData = await getConfinedSpaceSelectList({TYPE: 2, CORP_ID: this.form.CORP_ID})
|
||||
this.picker.columns = [resData.varList]
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
import { getTaskInfo } from '@/api';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -191,8 +192,19 @@ export default {
|
|||
this.form.CORP_ID = options.CORPINFO_ID
|
||||
this.form.CORP_NAME = options.CORP_NAME
|
||||
this.type = options.type
|
||||
if (options.taskId) {
|
||||
this.fnGetData(options.taskId)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async fnGetData(taskId) {
|
||||
let resData = await getTaskInfo({EW_RU_TASK_ID: taskId});
|
||||
if (resData.list.form && resData.list.form.length > 0) {
|
||||
resData.list.form.forEach((sos, index) => {
|
||||
this.form[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
||||
})
|
||||
}
|
||||
},
|
||||
fnSingleChoiceClick(event) {
|
||||
this.picker.type = event
|
||||
if (event === 'WORK_LEVEL_NAME') this.picker.columns = [[
|
||||
|
@ -239,20 +251,6 @@ export default {
|
|||
async fnSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
for (let i = 0; i < this.form.boardList.length; i++) {
|
||||
if (!this.form.boardList[i].BOARD_MATERIAL) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道材质`)
|
||||
return
|
||||
}
|
||||
if (!this.form.boardList[i].BOARD_SPECIFICATION) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道规格`)
|
||||
return
|
||||
}
|
||||
if (!this.form.boardList[i].BOARD_NO) {
|
||||
uni.$u.toast(`盲板抽堵参数第${i + 1}项中,请输入管道编号`)
|
||||
return
|
||||
}
|
||||
}
|
||||
try {
|
||||
await setSubmitForm({
|
||||
form: this.form,
|
||||
|
@ -262,7 +260,7 @@ export default {
|
|||
})
|
||||
} catch {
|
||||
}
|
||||
} catch {
|
||||
} catch (err) {
|
||||
uni.$u.toast('请补全必填项')
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,7 +165,9 @@ export default {
|
|||
this.form.CORP_ID = options.CORPINFO_ID
|
||||
this.form.CORP_NAME = options.CORP_NAME
|
||||
this.type = options.type
|
||||
this.fnGetData(options.taskId)
|
||||
if (options.taskId) {
|
||||
this.fnGetData(options.taskId)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async fnGetData(taskId) {
|
||||
|
|
|
@ -20,10 +20,7 @@
|
|||
<view class="flex-between mt-10 subtitle">
|
||||
<view></view>
|
||||
<view class="flex-between">
|
||||
<u-button type="primary" text="修改" size="mini" class="bth-mini" @click="$u.route({
|
||||
url: '/pages/eight_assignments/hot_work/apply',
|
||||
params: { taskId: item.taskId }
|
||||
})" />
|
||||
<u-button type="primary" text="修改" size="mini" class="bth-mini" @click="handleEditTask(item)" />
|
||||
<u-button type="primary" text="流程" size="mini" class="bth-mini ml-10"
|
||||
@click="$u.route({
|
||||
url: '/pages/eight_assignments/technological_process',
|
||||
|
@ -87,6 +84,13 @@ export default {
|
|||
this.currentPage++;
|
||||
if (this.totalPage >= this.currentPage) this.getData();
|
||||
},
|
||||
handleEditTask(value) {
|
||||
let tempUrlStr = this.type.replace(/([a-z])([A-Z])/g, '\$1_\$2').toLowerCase()
|
||||
uni.$u.route({
|
||||
url: `/pages/eight_assignments/${tempUrlStr}/apply`,
|
||||
params: { taskId: value.taskId }
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -211,9 +211,9 @@ export const resolveNextOperation = async (
|
|||
return
|
||||
}
|
||||
// 有限空间作业气体分析
|
||||
if (info.otherFlag.DeYxQfFlag === '1') {
|
||||
if (info.otherFlag.redirectFlag === '1') {
|
||||
uni.$u.route({
|
||||
url: '/pages/eight_assignments/confined_space/gas/name',
|
||||
url: info.otherFlag.url,
|
||||
params: {taskId: EW_RU_TASK_ID, EW_RU_JOB_ID, TYPE}
|
||||
})
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue