feat: 添加部分修改回显逻辑
parent
986bc90dc3
commit
26b5ef1301
|
@ -81,6 +81,7 @@
|
||||||
import {getConfinedSpaceSelectList} from '@/api'
|
import {getConfinedSpaceSelectList} from '@/api'
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
|
import { getTaskInfo } from '@/api';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -177,8 +178,19 @@ export default {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
|
if (options.taskId) {
|
||||||
|
this.fnGetData(options.taskId)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
async fnGetConfinedSpaceSelectList() {
|
||||||
const resData = await getConfinedSpaceSelectList({TYPE: 2, CORP_ID: this.form.CORP_ID})
|
const resData = await getConfinedSpaceSelectList({TYPE: 2, CORP_ID: this.form.CORP_ID})
|
||||||
this.picker.columns = [resData.varList]
|
this.picker.columns = [resData.varList]
|
||||||
|
|
|
@ -90,6 +90,7 @@
|
||||||
import OtherSelect from '@/components/other-select/index.vue';
|
import OtherSelect from '@/components/other-select/index.vue';
|
||||||
import Sign from '@/components/sign/sign.vue'
|
import Sign from '@/components/sign/sign.vue'
|
||||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||||
|
import { getTaskInfo } from '@/api';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -191,8 +192,19 @@ export default {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
|
if (options.taskId) {
|
||||||
|
this.fnGetData(options.taskId)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
fnSingleChoiceClick(event) {
|
||||||
this.picker.type = event
|
this.picker.type = event
|
||||||
if (event === 'WORK_LEVEL_NAME') this.picker.columns = [[
|
if (event === 'WORK_LEVEL_NAME') this.picker.columns = [[
|
||||||
|
@ -239,20 +251,6 @@ export default {
|
||||||
async fnSubmit() {
|
async fnSubmit() {
|
||||||
try {
|
try {
|
||||||
await this.$refs.formRef.validate()
|
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 {
|
try {
|
||||||
await setSubmitForm({
|
await setSubmitForm({
|
||||||
form: this.form,
|
form: this.form,
|
||||||
|
@ -262,7 +260,7 @@ export default {
|
||||||
})
|
})
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (err) {
|
||||||
uni.$u.toast('请补全必填项')
|
uni.$u.toast('请补全必填项')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,9 @@ export default {
|
||||||
this.form.CORP_ID = options.CORPINFO_ID
|
this.form.CORP_ID = options.CORPINFO_ID
|
||||||
this.form.CORP_NAME = options.CORP_NAME
|
this.form.CORP_NAME = options.CORP_NAME
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
|
if (options.taskId) {
|
||||||
this.fnGetData(options.taskId)
|
this.fnGetData(options.taskId)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fnGetData(taskId) {
|
async fnGetData(taskId) {
|
||||||
|
|
|
@ -20,10 +20,7 @@
|
||||||
<view class="flex-between mt-10 subtitle">
|
<view class="flex-between mt-10 subtitle">
|
||||||
<view></view>
|
<view></view>
|
||||||
<view class="flex-between">
|
<view class="flex-between">
|
||||||
<u-button type="primary" text="修改" size="mini" class="bth-mini" @click="$u.route({
|
<u-button type="primary" text="修改" size="mini" class="bth-mini" @click="handleEditTask(item)" />
|
||||||
url: '/pages/eight_assignments/hot_work/apply',
|
|
||||||
params: { taskId: item.taskId }
|
|
||||||
})" />
|
|
||||||
<u-button type="primary" text="流程" size="mini" class="bth-mini ml-10"
|
<u-button type="primary" text="流程" size="mini" class="bth-mini ml-10"
|
||||||
@click="$u.route({
|
@click="$u.route({
|
||||||
url: '/pages/eight_assignments/technological_process',
|
url: '/pages/eight_assignments/technological_process',
|
||||||
|
@ -87,6 +84,13 @@ export default {
|
||||||
this.currentPage++;
|
this.currentPage++;
|
||||||
if (this.totalPage >= this.currentPage) this.getData();
|
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>
|
</script>
|
||||||
|
|
|
@ -211,9 +211,9 @@ export const resolveNextOperation = async (
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 有限空间作业气体分析
|
// 有限空间作业气体分析
|
||||||
if (info.otherFlag.DeYxQfFlag === '1') {
|
if (info.otherFlag.redirectFlag === '1') {
|
||||||
uni.$u.route({
|
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}
|
params: {taskId: EW_RU_TASK_ID, EW_RU_JOB_ID, TYPE}
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue