diff --git a/src/views/DisposalSuggestions/Form.vue b/src/views/DisposalSuggestions/Form.vue index 5b9b7dd..52fe312 100644 --- a/src/views/DisposalSuggestions/Form.vue +++ b/src/views/DisposalSuggestions/Form.vue @@ -213,9 +213,7 @@ export default { }, watch: {}, created() { - this.getSourceOptions(); - this.initAreaTypeList(); - this.getjudgmentClassOptions(); + }, mounted() {}, methods: { @@ -236,8 +234,8 @@ export default { this.questionTypeOptions = res.data.list; }); }, - getjudgmentClassOptions() { - request({ + async getjudgmentClassOptions() { + await request({ url: `/Extend/BaseInspectionReport/GetReviewTypeList`, method: 'GET', }).then(res => { @@ -247,23 +245,28 @@ export default { goBack() { this.$emit("refresh"); }, - init(id, isDetail) { + async init(id, isDetail) { this.dataForm.id = id || 0; this.visible = true; this.showSuggsetion = false; this.showarea = false; + this.loading = true; + await this.getSourceOptions(); + await this.initAreaTypeList(); + await this.getjudgmentClassOptions(); this.$nextTick(async () => { this.$refs["suggestionForm"].resetFields(); if (this.dataForm.id) { - this.loading = true; let res = await getDetail(this.dataForm.id); this.dataForm = res.data; this.dataForm.areaName = dynamicText(res.data.areaId, this.areaOptions); this.suggestionFormAreaChange(res.data.areaId) - this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName; + this.sourceOptions.length && this.dataForm.reportSource && (this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName); if (!this.dataForm.obtainEvidence) this.dataForm.obtainEvidence = []; if (!this.dataForm.annex) this.dataForm.annex = []; this.loading = false; + } else { + this.loading = false; } }); }, diff --git a/src/views/DisposalSuggestions/HandleForm.vue b/src/views/DisposalSuggestions/HandleForm.vue index fb515df..a283c10 100644 --- a/src/views/DisposalSuggestions/HandleForm.vue +++ b/src/views/DisposalSuggestions/HandleForm.vue @@ -220,7 +220,7 @@ let res = await getDetail(this.dataForm.id); this.dataForm = res.data; this.loading = false; - this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName; + this.sourceOptions.length && this.dataForm.reportSource && (this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName); this.dataForm.areaName = dynamicText(res.data.areaId, this.areaOptions); this.suggestionForm.area = res.data.areaId if (!this.dataForm.obtainEvidence) this.dataForm.obtainEvidence = []; diff --git a/src/views/DisposalSuggestions/index.vue b/src/views/DisposalSuggestions/index.vue index d71eb0f..849dcc9 100644 --- a/src/views/DisposalSuggestions/index.vue +++ b/src/views/DisposalSuggestions/index.vue @@ -59,8 +59,10 @@ --> - 研判 + + {{ scope.row.stage == '577006621985604869' ? '研判' : '下发'}} 处理 + 详情 @@ -69,6 +71,7 @@ + @@ -80,8 +83,9 @@ import NCCForm from './Form' import HandleForm from './HandleForm' import { getListForJudge, previewDataInterface } from '@/api/systemData/dataInterface' + import ReportForm from '@/views/baseInspectionReport/Form.vue' // 巡查处置 export default { - components: { NCCForm, HandleForm }, + components: { NCCForm, HandleForm, ReportForm }, mixins: [infoMixin], data() { return { @@ -122,7 +126,8 @@ questionClassOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], stageOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], - HandleFormVisible: false + HandleFormVisible: false, + ReportFormVisible: false, } }, computed: { @@ -173,9 +178,10 @@ this.initData() }, refresh(isrRefresh) { - this.formVisible = false - this.HandleFormVisible = false - if (isrRefresh) this.reset() + this.formVisible = false; + this.HandleFormVisible = false; + this.ReportFormVisible = false; + if (isrRefresh) this.reset(); }, // 处理 toHandle(id, isDetail) { @@ -184,6 +190,15 @@ this.$refs.HandleForm.init(id, isDetail) }) }, + + // 详情 + toDetail(id) { + this.ReportFormVisible = true; + this.$nextTick(() => { + this.$refs.ReportForm.init(id, true); + }); + }, + reset() { for (let key in this.query) { this.query[key] = undefined diff --git a/src/views/baseInspectionReport/Form.vue b/src/views/baseInspectionReport/Form.vue index 9df43b4..78fa387 100644 --- a/src/views/baseInspectionReport/Form.vue +++ b/src/views/baseInspectionReport/Form.vue @@ -8,8 +8,9 @@ width="50%" :modal="false" > - - + + - - - + + + 问题来源: - {{ sourceOptions.find(v => v.Id == dataForm.reportSource).FullName || '--' }} + {{ dataForm.reportSourceName || '--' }} 应用名称: @@ -184,6 +185,7 @@ 处理结果: {{ dataForm.disposalSuggestions || '--' }} + 取 消 @@ -226,6 +228,7 @@ export default { otherQuestionType: undefined, selfMediaPlatformTypeOther: undefined, company: undefined, + reportSourceName: undefined, }, rules: { platformName: [ @@ -368,6 +371,7 @@ export default { if(res.code != 200) return this.form_loading = false; if(!res.data) return; this.dataForm = res.data; + this.sourceOptions.length && this.dataForm.reportSource && (this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName); if(this.questionTypeOptions.findIndex(v => v.fullName == this.dataForm.questionType) == -1) { this.dataForm.otherQuestionType = res.data.questionType; this.dataForm.questionType = '其他'; diff --git a/src/views/baseInspectionReport/index.vue b/src/views/baseInspectionReport/index.vue index 76101ec..3e892c1 100644 --- a/src/views/baseInspectionReport/index.vue +++ b/src/views/baseInspectionReport/index.vue @@ -68,7 +68,7 @@ --> - + 编辑 删除 diff --git a/src/views/baseListHazardousSamples/index.vue b/src/views/baseListHazardousSamples/index.vue index feceb36..80fabe7 100644 --- a/src/views/baseListHazardousSamples/index.vue +++ b/src/views/baseListHazardousSamples/index.vue @@ -96,6 +96,7 @@ {taskRefresh('HandFormVisible', val)}" /> + {taskRefresh('ReportFormVisible', val)}" /> @@ -108,7 +109,7 @@ import NCCForm from "./Form"; import ExportBox from "./ExportBox"; import { previewDataInterface } from "@/api/systemData/dataInterface"; import HandForm from '@/views/baseCaseHandling/Form.vue' // 案件处理 -import ReportForm from '@/views/baseInspectionReport/Form.vue' // 案件处理 +import ReportForm from '@/views/baseInspectionReport/Form.vue' // 巡查处置 export default { components: { NCCForm, ExportBox, HandForm, ReportForm }, data() { @@ -245,8 +246,6 @@ export default { .catch(() => {}); }, addOrUpdateHandle(row, isDetail) { - console.log(row); - switch (row.source) { case "核查处置": this.ReportFormVisible = true;