Commit d8ed082ddf6d2e7c2ac4b99ffac56d63c093be5a
1 parent
7180000e
研判页面添加研判按钮校验和详情弹框
Showing
6 changed files
with
46 additions
and
25 deletions
src/views/DisposalSuggestions/Form.vue
| ... | ... | @@ -213,9 +213,7 @@ export default { |
| 213 | 213 | }, |
| 214 | 214 | watch: {}, |
| 215 | 215 | created() { |
| 216 | - this.getSourceOptions(); | |
| 217 | - this.initAreaTypeList(); | |
| 218 | - this.getjudgmentClassOptions(); | |
| 216 | + | |
| 219 | 217 | }, |
| 220 | 218 | mounted() {}, |
| 221 | 219 | methods: { |
| ... | ... | @@ -236,8 +234,8 @@ export default { |
| 236 | 234 | this.questionTypeOptions = res.data.list; |
| 237 | 235 | }); |
| 238 | 236 | }, |
| 239 | - getjudgmentClassOptions() { | |
| 240 | - request({ | |
| 237 | + async getjudgmentClassOptions() { | |
| 238 | + await request({ | |
| 241 | 239 | url: `/Extend/BaseInspectionReport/GetReviewTypeList`, |
| 242 | 240 | method: 'GET', |
| 243 | 241 | }).then(res => { |
| ... | ... | @@ -247,23 +245,28 @@ export default { |
| 247 | 245 | goBack() { |
| 248 | 246 | this.$emit("refresh"); |
| 249 | 247 | }, |
| 250 | - init(id, isDetail) { | |
| 248 | + async init(id, isDetail) { | |
| 251 | 249 | this.dataForm.id = id || 0; |
| 252 | 250 | this.visible = true; |
| 253 | 251 | this.showSuggsetion = false; |
| 254 | 252 | this.showarea = false; |
| 253 | + this.loading = true; | |
| 254 | + await this.getSourceOptions(); | |
| 255 | + await this.initAreaTypeList(); | |
| 256 | + await this.getjudgmentClassOptions(); | |
| 255 | 257 | this.$nextTick(async () => { |
| 256 | 258 | this.$refs["suggestionForm"].resetFields(); |
| 257 | 259 | if (this.dataForm.id) { |
| 258 | - this.loading = true; | |
| 259 | 260 | let res = await getDetail(this.dataForm.id); |
| 260 | 261 | this.dataForm = res.data; |
| 261 | 262 | this.dataForm.areaName = dynamicText(res.data.areaId, this.areaOptions); |
| 262 | 263 | this.suggestionFormAreaChange(res.data.areaId) |
| 263 | - this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName; | |
| 264 | + this.sourceOptions.length && this.dataForm.reportSource && (this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName); | |
| 264 | 265 | if (!this.dataForm.obtainEvidence) this.dataForm.obtainEvidence = []; |
| 265 | 266 | if (!this.dataForm.annex) this.dataForm.annex = []; |
| 266 | 267 | this.loading = false; |
| 268 | + } else { | |
| 269 | + this.loading = false; | |
| 267 | 270 | } |
| 268 | 271 | }); |
| 269 | 272 | }, | ... | ... |
src/views/DisposalSuggestions/HandleForm.vue
| ... | ... | @@ -220,7 +220,7 @@ |
| 220 | 220 | let res = await getDetail(this.dataForm.id); |
| 221 | 221 | this.dataForm = res.data; |
| 222 | 222 | this.loading = false; |
| 223 | - this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName; | |
| 223 | + this.sourceOptions.length && this.dataForm.reportSource && (this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName); | |
| 224 | 224 | this.dataForm.areaName = dynamicText(res.data.areaId, this.areaOptions); |
| 225 | 225 | this.suggestionForm.area = res.data.areaId |
| 226 | 226 | if (!this.dataForm.obtainEvidence) this.dataForm.obtainEvidence = []; | ... | ... |
src/views/DisposalSuggestions/index.vue
| ... | ... | @@ -59,8 +59,10 @@ |
| 59 | 59 | </el-table-column> --> |
| 60 | 60 | <el-table-column label="操作" fixed="right" width="100"> |
| 61 | 61 | <template slot-scope="scope"> |
| 62 | - <el-button type="text" v-if="isSHILevel" @click="addOrUpdateHandle(scope.row.id)" >研判</el-button> | |
| 62 | + <!-- 未研判 ‘577006621985604869’/未下发 ‘577006641364189019’可以研判 --> | |
| 63 | + <el-button type="text" v-if="isSHILevel" @click="addOrUpdateHandle(scope.row.id)" :disabled="scope.row.stage != '577006621985604869' && scope.row.stage !='577006641364189019'">{{ scope.row.stage == '577006621985604869' ? '研判' : '下发'}}</el-button> | |
| 63 | 64 | <el-button type="text" v-else @click="toHandle(scope.row.id)" >处理</el-button> |
| 65 | + <el-button type="text" @click="toDetail(scope.row.id)" >详情</el-button> | |
| 64 | 66 | </template> |
| 65 | 67 | </el-table-column> |
| 66 | 68 | </NCC-table> |
| ... | ... | @@ -69,6 +71,7 @@ |
| 69 | 71 | </div> |
| 70 | 72 | <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> |
| 71 | 73 | <HandleForm v-if="HandleFormVisible" ref="HandleForm" @refresh="refresh" /> |
| 74 | + <ReportForm v-if="ReportFormVisible" ref="ReportForm" @refresh="refresh" /> | |
| 72 | 75 | </div> |
| 73 | 76 | </div> |
| 74 | 77 | </div> |
| ... | ... | @@ -80,8 +83,9 @@ |
| 80 | 83 | import NCCForm from './Form' |
| 81 | 84 | import HandleForm from './HandleForm' |
| 82 | 85 | import { getListForJudge, previewDataInterface } from '@/api/systemData/dataInterface' |
| 86 | + import ReportForm from '@/views/baseInspectionReport/Form.vue' // 巡查处置 | |
| 83 | 87 | export default { |
| 84 | - components: { NCCForm, HandleForm }, | |
| 88 | + components: { NCCForm, HandleForm, ReportForm }, | |
| 85 | 89 | mixins: [infoMixin], |
| 86 | 90 | data() { |
| 87 | 91 | return { |
| ... | ... | @@ -122,7 +126,8 @@ |
| 122 | 126 | questionClassOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], |
| 123 | 127 | stageOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}], |
| 124 | 128 | |
| 125 | - HandleFormVisible: false | |
| 129 | + HandleFormVisible: false, | |
| 130 | + ReportFormVisible: false, | |
| 126 | 131 | } |
| 127 | 132 | }, |
| 128 | 133 | computed: { |
| ... | ... | @@ -173,9 +178,10 @@ |
| 173 | 178 | this.initData() |
| 174 | 179 | }, |
| 175 | 180 | refresh(isrRefresh) { |
| 176 | - this.formVisible = false | |
| 177 | - this.HandleFormVisible = false | |
| 178 | - if (isrRefresh) this.reset() | |
| 181 | + this.formVisible = false; | |
| 182 | + this.HandleFormVisible = false; | |
| 183 | + this.ReportFormVisible = false; | |
| 184 | + if (isrRefresh) this.reset(); | |
| 179 | 185 | }, |
| 180 | 186 | // 处理 |
| 181 | 187 | toHandle(id, isDetail) { |
| ... | ... | @@ -184,6 +190,15 @@ |
| 184 | 190 | this.$refs.HandleForm.init(id, isDetail) |
| 185 | 191 | }) |
| 186 | 192 | }, |
| 193 | + | |
| 194 | + // 详情 | |
| 195 | + toDetail(id) { | |
| 196 | + this.ReportFormVisible = true; | |
| 197 | + this.$nextTick(() => { | |
| 198 | + this.$refs.ReportForm.init(id, true); | |
| 199 | + }); | |
| 200 | + }, | |
| 201 | + | |
| 187 | 202 | reset() { |
| 188 | 203 | for (let key in this.query) { |
| 189 | 204 | this.query[key] = undefined | ... | ... |
src/views/baseInspectionReport/Form.vue
| ... | ... | @@ -8,8 +8,9 @@ |
| 8 | 8 | width="50%" |
| 9 | 9 | :modal="false" |
| 10 | 10 | > |
| 11 | - <el-row :gutter="15" class="NCC-dialog-content" v-if="!isDetail" v-loading="form_loading"> | |
| 12 | - <el-form | |
| 11 | + <el-row v-loading="form_loading"> | |
| 12 | + <el-row :gutter="15" class="NCC-dialog-content" v-if="!isDetail"> | |
| 13 | + <el-form | |
| 13 | 14 | ref="elForm" |
| 14 | 15 | :model="dataForm" |
| 15 | 16 | size="small" |
| ... | ... | @@ -129,12 +130,12 @@ |
| 129 | 130 | <NCC-UploadFz v-model="dataForm.annex" :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" /> |
| 130 | 131 | </el-form-item> |
| 131 | 132 | </el-col> |
| 132 | - </el-form> | |
| 133 | - </el-row> | |
| 134 | - <el-row v-else> | |
| 133 | + </el-form> | |
| 134 | + </el-row> | |
| 135 | + <el-row v-else> | |
| 135 | 136 | <el-col class="form-item"> |
| 136 | 137 | <div class="label w-120">问题来源:</div> |
| 137 | - <div class="text">{{ sourceOptions.find(v => v.Id == dataForm.reportSource).FullName || '--' }}</div> | |
| 138 | + <div class="text">{{ dataForm.reportSourceName || '--' }}</div> | |
| 138 | 139 | </el-col> |
| 139 | 140 | <el-col class="form-item"> |
| 140 | 141 | <div class="label w-120">应用名称:</div> |
| ... | ... | @@ -184,6 +185,7 @@ |
| 184 | 185 | <div class="label w-120">处理结果:</div> |
| 185 | 186 | <div class="text">{{ dataForm.disposalSuggestions || '--' }}</div> |
| 186 | 187 | </el-col> |
| 188 | + </el-row> | |
| 187 | 189 | </el-row> |
| 188 | 190 | <span slot="footer" class="dialog-footer"> |
| 189 | 191 | <el-button @click="visible = false">取 消</el-button> |
| ... | ... | @@ -226,6 +228,7 @@ export default { |
| 226 | 228 | otherQuestionType: undefined, |
| 227 | 229 | selfMediaPlatformTypeOther: undefined, |
| 228 | 230 | company: undefined, |
| 231 | + reportSourceName: undefined, | |
| 229 | 232 | }, |
| 230 | 233 | rules: { |
| 231 | 234 | platformName: [ |
| ... | ... | @@ -368,6 +371,7 @@ export default { |
| 368 | 371 | if(res.code != 200) return this.form_loading = false; |
| 369 | 372 | if(!res.data) return; |
| 370 | 373 | this.dataForm = res.data; |
| 374 | + this.sourceOptions.length && this.dataForm.reportSource && (this.dataForm.reportSourceName = this.sourceOptions.find(v => v.Id == this.dataForm.reportSource).FullName); | |
| 371 | 375 | if(this.questionTypeOptions.findIndex(v => v.fullName == this.dataForm.questionType) == -1) { |
| 372 | 376 | this.dataForm.otherQuestionType = res.data.questionType; |
| 373 | 377 | this.dataForm.questionType = '其他'; | ... | ... |
src/views/baseInspectionReport/index.vue
| ... | ... | @@ -68,7 +68,7 @@ |
| 68 | 68 | </el-table-column> --> |
| 69 | 69 | <el-table-column label="操作" fixed="right" width="100"> |
| 70 | 70 | <template slot-scope="scope"> |
| 71 | - <!-- 未研判/未下发可以修改 --> | |
| 71 | + <!-- 未研判 ‘577006621985604869’/未下发 ‘577006641364189019’可以修改 --> | |
| 72 | 72 | <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" :disabled="scope.row.stage != '577006621985604869' && scope.row.stage !='577006641364189019'">编辑</el-button> |
| 73 | 73 | <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> |
| 74 | 74 | </template> | ... | ... |
src/views/baseListHazardousSamples/index.vue
| ... | ... | @@ -96,6 +96,7 @@ |
| 96 | 96 | <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> |
| 97 | 97 | <!-- 案件处理 --> |
| 98 | 98 | <HandForm v-if="HandFormVisible" ref="HandForm" @refresh="(val) => {taskRefresh('HandFormVisible', val)}" /> |
| 99 | + <!-- 巡查处置 --> | |
| 99 | 100 | <ReportForm v-if="ReportFormVisible" ref="ReportForm" @refresh="(val) => {taskRefresh('ReportFormVisible', val)}" /> |
| 100 | 101 | </div> |
| 101 | 102 | </div> |
| ... | ... | @@ -108,7 +109,7 @@ import NCCForm from "./Form"; |
| 108 | 109 | import ExportBox from "./ExportBox"; |
| 109 | 110 | import { previewDataInterface } from "@/api/systemData/dataInterface"; |
| 110 | 111 | import HandForm from '@/views/baseCaseHandling/Form.vue' // 案件处理 |
| 111 | -import ReportForm from '@/views/baseInspectionReport/Form.vue' // 案件处理 | |
| 112 | +import ReportForm from '@/views/baseInspectionReport/Form.vue' // 巡查处置 | |
| 112 | 113 | export default { |
| 113 | 114 | components: { NCCForm, ExportBox, HandForm, ReportForm }, |
| 114 | 115 | data() { |
| ... | ... | @@ -245,8 +246,6 @@ export default { |
| 245 | 246 | .catch(() => {}); |
| 246 | 247 | }, |
| 247 | 248 | addOrUpdateHandle(row, isDetail) { |
| 248 | - console.log(row); | |
| 249 | - | |
| 250 | 249 | switch (row.source) { |
| 251 | 250 | case "核查处置": |
| 252 | 251 | this.ReportFormVisible = true; | ... | ... |