feat: 断路作业的回显修补
parent
835df9f697
commit
863253fb77
|
@ -91,6 +91,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getTaskInfo } from "@/api";
|
||||||
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";
|
||||||
|
@ -190,8 +191,36 @@ 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) {
|
||||||
|
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.FK_NAME === "WORK_TYPE") {
|
||||||
|
this.jobTypeNameArr = [Number(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) {
|
fnDateTimePickerClick(event) {
|
||||||
this.dateTimePicker.type = event
|
this.dateTimePicker.type = event
|
||||||
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
this.dateTimePicker.value = Number(new Date(this.form[event])) || Number(new Date())
|
||||||
|
|
Loading…
Reference in New Issue