feat: 动土作业申请的回显修补
parent
743a7408e8
commit
0dcfee9404
|
@ -91,6 +91,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getTaskInfo } from "@/api";
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import {setSubmitForm} from "@/utils/submitHomeworkProcess";
|
||||
|
@ -190,8 +191,33 @@ 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) {
|
||||
let newFormData = { ...this.form };
|
||||
|
||||
resData.list.form.forEach((sos, index) => {
|
||||
newFormData[sos.ITEM_NAME] = sos.ITEM_VALUE;
|
||||
if (sos.FK_NAME) {
|
||||
newFormData[sos.FK_NAME] = sos.FK_VALUE;
|
||||
}
|
||||
// 回显作业内容、范围、方式简图的图片
|
||||
if (sos.ITEM_NAME === "CONTENT_IMG_PATH") {
|
||||
newFormData.CONTENT_IMG_PATH = [{ url: `${this.$filePath}${sos.ITEM_VALUE}` }]
|
||||
}
|
||||
// 回显申请人签字的图片
|
||||
if (sos.ITEM_NAME === "SIGN") {
|
||||
newFormData.SIGN = `${this.$filePath}${sos.ITEM_VALUE}`
|
||||
}
|
||||
});
|
||||
this.form = newFormData;
|
||||
}
|
||||
},
|
||||
fnDateTimePickerClick(event) {
|
||||
this.dateTimePicker.type = event
|
||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||
|
|
Loading…
Reference in New Issue