Blame view

src/views/baseSystemInfo/InspectForm.vue 16.8 KB
006cc67a   monkeyhouyi   巡查上报
1
2
  <template>
    <el-dialog
6cd34f81   monkeyhouyi   对接接口优化
3
      title="新建"
006cc67a   monkeyhouyi   巡查上报
4
5
6
7
      :close-on-click-modal="false"
      :visible.sync="visible"
      class="NCC-dialog NCC-dialog_center"
      lock-scroll
61009cfc   monkeyhouyi   2024/8/8
8
      width="60%"
6cd34f81   monkeyhouyi   对接接口优化
9
10
      v-loading="loading"
      :modal="false"
006cc67a   monkeyhouyi   巡查上报
11
    >
6cd34f81   monkeyhouyi   对接接口优化
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
      <el-row :gutter="15" class="NCC-dialog-content" v-show="!isDetail">
        <el-form
          ref="elForm"
          :model="dataForm"
          size="small"
          label-width="180px"
          label-position="right"
          :disabled="!!isDetail"
          :rules="rules"
        >
          <el-col :span="24" v-if="false">
            <el-form-item label="主键" prop="id">
              <el-input v-model="dataForm.id" placeholder="请输入" clearable />
            </el-form-item>
          </el-col>
7180000e   monkeyhouyi   优化
27
          <el-col :span="24">
6cd34f81   monkeyhouyi   对接接口优化
28
29
            <el-form-item label="来源登记" prop="sourceRegistration">
              <el-input v-model="dataForm.sourceRegistration" placeholder="请输入来源登记" clearable :disabled="formType != 0"/>
9913f656   monkeyhouyi   巡查上报
30
31
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
32
33
34
          <el-col :span="24">
            <el-form-item label="运营主体" prop="registeredEntity">
              <el-input v-model="dataForm.registeredEntityStr" placeholder="" clearable disabled/>
7180000e   monkeyhouyi   优化
35
36
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
37
38
39
          <el-col :span="24">
            <el-form-item label="案件名称" prop="systemName">
              <el-input v-model="dataForm.systemNameStr" placeholder="" clearable disabled/>
006cc67a   monkeyhouyi   巡查上报
40
41
42
            </el-form-item>
          </el-col>
          <el-col :span="24">
6cd34f81   monkeyhouyi   对接接口优化
43
44
45
            <el-form-item label="应用类别" prop="category">
              <el-radio-group v-model="dataForm.category" disabled>
                <el-radio v-for="(item, index) in platformTypeOptions" :key="index" :label="item.Id">{{ item.FullName }}</el-radio>
9913f656   monkeyhouyi   巡查上报
46
              </el-radio-group>
006cc67a   monkeyhouyi   巡查上报
47
48
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
49
50
51
          <el-col :span="24">
            <el-form-item label="备案号" prop="recordNumber">
              <el-input v-model="dataForm.recordNumber" placeholder="请输入备案号" clearable :disabled="formType == 2"/>
006cc67a   monkeyhouyi   巡查上报
52
53
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
          <el-col :span="24" v-if="isSHILevel">
            <el-form-item label="所属区县" prop="districtCounty">
                <el-radio-group
                  v-model="dataForm.districtCounty"
                  placeholder="请选择所属区县"
                  style="line-height: 22px"
                  :disabled="formType == 2"
                >
                  <el-radio v-for="v in areaOptions" :key="v.id" :label="v.id">{{
                    v.fullName
                  }}</el-radio>
                </el-radio-group>
              </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="违法原因" prop="illegalReasons">
              <el-input type="textarea" v-model="dataForm.illegalReasons" placeholder="请输入违法原因" clearable maxlength="200" :disabled="formType == 2"/>
7180000e   monkeyhouyi   优化
71
72
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
          <el-col :span="24">
            <el-form-item label="处罚要求" prop="punishmentRequirements">
              <el-input type="textarea" v-model="dataForm.punishmentRequirements" placeholder="请输入处罚要求" clearable maxlength="200" :disabled="formType == 2"/>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="处罚内容" prop="punishmentContent">
              <el-input type="textarea" v-model="dataForm.punishmentContent" placeholder="请输入处罚内容" clearable maxlength="200" :disabled="formType == 2"/>
            </el-form-item>
          </el-col>
          <el-col :span="24" v-if="isSHILevel">
            <el-form-item label="执法方式" prop="enforceType">
              <el-radio-group v-model="dataForm.enforceType">
                <el-radio label="柔性执法">柔性执法</el-radio>
                <el-radio label="行政执法">行政执法</el-radio>
7180000e   monkeyhouyi   优化
88
89
90
              </el-radio-group>
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
91
92
93
94
95
96
97
98
99
100
101
102
103
          <el-col :span="24" v-if="!isSHILevel && formType == 2">
            <el-form-item label="执法说明" prop="enforcecontent">
              <el-input type="textarea" v-model="dataForm.enforcecontent" placeholder="请输入执法说明" clearable maxlength="200"/>
            </el-form-item>
          </el-col>
          <!-- 立案审批、调查(询问)笔录、案件处理意见、执法约谈、行政处罚意见告知、行政处罚决定、行政处罚结案报告、其他(每个流程都为填空+上传附件,非必填) -->
          <el-col :span="24">
            <el-form-item label="立案审批" prop="registerApproval">
              <el-input type="textarea" v-model="dataForm.registerApproval" placeholder="请输入立案审批" clearable maxlength="200"/>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="立案审批附件" prop="registerApprovalFileModel">
f3684888   monkeyhouyi   附件大小限制10MB
104
              <NCC-UploadFz v-model="dataForm.registerApprovalFileModel" :fileSize="10" sizeUnit="MB" :limit="9" buttonText="点击上传" />
6cd34f81   monkeyhouyi   对接接口优化
105
106
107
108
109
110
111
112
113
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="调查(询问)笔录" prop="record">
              <el-input type="textarea" v-model="dataForm.record" placeholder="请输入调查(询问)笔录" clearable maxlength="200"/>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="调查(询问)笔录附件" prop="recordFileModel">
f3684888   monkeyhouyi   附件大小限制10MB
114
              <NCC-UploadFz v-model="dataForm.recordFileModel" :fileSize="10" sizeUnit="MB" :limit="9" buttonText="点击上传" />
6cd34f81   monkeyhouyi   对接接口优化
115
116
117
118
119
120
121
122
123
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="案件处理意见" prop="caseHandlingOpinions">
              <el-input type="textarea" v-model="dataForm.caseHandlingOpinions" placeholder="请输入案件处理意见示例" clearable maxlength="200"/>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="案件处理意见附件" prop="caseHandlingOpinionsFileModel">
f3684888   monkeyhouyi   附件大小限制10MB
124
              <NCC-UploadFz v-model="dataForm.caseHandlingOpinionsFileModel" :fileSize="10" sizeUnit="MB" :limit="9" buttonText="点击上传" />
6cd34f81   monkeyhouyi   对接接口优化
125
126
127
128
129
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="执法约谈" prop="enforcementRecords">
              <el-input type="textarea" v-model="dataForm.enforcementRecords" placeholder="请输入执法约谈" clearable maxlength="200"/>
7180000e   monkeyhouyi   优化
130
131
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
132
133
          <el-col :span="24">
            <el-form-item label="执法约谈附件" prop="enforcementRecordsFileModel">
f3684888   monkeyhouyi   附件大小限制10MB
134
              <NCC-UploadFz v-model="dataForm.enforcementRecordsFileModel" :fileSize="10" sizeUnit="MB" :limit="9" buttonText="点击上传" />
7180000e   monkeyhouyi   优化
135
136
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
137
138
139
          <el-col :span="24">
            <el-form-item label="行政处罚意见告知" prop="noticeLetter">
              <el-input type="textarea" v-model="dataForm.noticeLetter" placeholder="请输入行政处罚意见告知" clearable maxlength="200"/>
006cc67a   monkeyhouyi   巡查上报
140
141
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
142
143
          <el-col :span="24">
            <el-form-item label="行政处罚意见告知附件" prop="noticeLetterFileModel">
f3684888   monkeyhouyi   附件大小限制10MB
144
              <NCC-UploadFz v-model="dataForm.noticeLetterFileModel" :fileSize="10" sizeUnit="MB" :limit="9" buttonText="点击上传" />
006cc67a   monkeyhouyi   巡查上报
145
146
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
147
148
149
          <el-col :span="24">
            <el-form-item label="行政处罚决定" prop="punishmentDecision">
              <el-input type="textarea" v-model="dataForm.punishmentDecision" placeholder="请输入行政处罚决定" clearable maxlength="200"/>
61009cfc   monkeyhouyi   2024/8/8
150
151
            </el-form-item>
          </el-col>
6cd34f81   monkeyhouyi   对接接口优化
152
153
          <el-col :span="24">
            <el-form-item label="行政处罚决定附件" prop="punishmentDecisionFileModel">
f3684888   monkeyhouyi   附件大小限制10MB
154
              <NCC-UploadFz v-model="dataForm.punishmentDecisionFileModel" :fileSize="10" sizeUnit="MB" :limit="9" buttonText="点击上传" />
6cd34f81   monkeyhouyi   对接接口优化
155
156
157
158
159
160
161
162
163
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="行政处罚结案报告" prop="closingReport">
              <el-input type="textarea" v-model="dataForm.closingReport" placeholder="请输入行政处罚结案报告" clearable maxlength="200"/>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="行政处罚结案报告附件" prop="closingReportFileModel">
f3684888   monkeyhouyi   附件大小限制10MB
164
              <NCC-UploadFz v-model="dataForm.closingReportFileModel" :fileSize="10" sizeUnit="MB" :limit="9" buttonText="点击上传" />
6cd34f81   monkeyhouyi   对接接口优化
165
166
167
168
169
170
171
172
173
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="其他" prop="other">
              <el-input type="textarea" v-model="dataForm.other" placeholder="请输入其他" clearable maxlength="200"/>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="其他附件" prop="otherFileModel">
f3684888   monkeyhouyi   附件大小限制10MB
174
              <NCC-UploadFz v-model="dataForm.otherFileModel" :fileSize="10" sizeUnit="MB" :limit="9" buttonText="点击上传" />
006cc67a   monkeyhouyi   巡查上报
175
176
177
178
179
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
      <span slot="footer" class="dialog-footer">
6cd34f81   monkeyhouyi   对接接口优化
180
181
182
183
184
        <template>
          <el-button @click="visible = false">取 消</el-button>
          <el-button type="primary" v-if="!isDetail && formType != '2'" @click="submit(1)" :loading="btnLoading">{{isSHILevel ? '下 发' : '上 报'}}</el-button>
          <el-button type="info" v-if="!isDetail && formType != '2'" @click="submit(0)" :loading="btnLoading">保 存</el-button>
        </template>
006cc67a   monkeyhouyi   巡查上报
185
186
187
188
      </span>
    </el-dialog>
  </template>
  <script>
6cd34f81   monkeyhouyi   对接接口优化
189
  import infoMixin from "@/mixins/info";
006cc67a   monkeyhouyi   巡查上报
190
  import request from "@/utils/request";
6cd34f81   monkeyhouyi   对接接口优化
191
192
193
194
  import { getSystemDetail } from "@/api/baseData/info";
  import { getCompanyInfoList, getCompanyInfoById } from "@/api/baseData/company";
  import { dynamicTextUP } from "@/filters/index";
  
006cc67a   monkeyhouyi   巡查上报
195
  export default {
6cd34f81   monkeyhouyi   对接接口优化
196
    mixins: [infoMixin],
006cc67a   monkeyhouyi   巡查上报
197
198
    data() {
      return {
006cc67a   monkeyhouyi   巡查上报
199
        visible: false,
6cd34f81   monkeyhouyi   对接接口优化
200
        loading: false,
006cc67a   monkeyhouyi   巡查上报
201
        isDetail: false,
6cd34f81   monkeyhouyi   对接接口优化
202
        formType: false, //  0 新增 1 编辑 2 处理
006cc67a   monkeyhouyi   巡查上报
203
        dataForm: {
6cd34f81   monkeyhouyi   对接接口优化
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
  		    id: undefined,
          sourceRegistration: undefined,
  		    registrationTime: undefined,
  		    systemName: undefined,
  		    registeredEntity: undefined,
  		    category: undefined,
  		    recordNumber: undefined,
          registeredEntityStr: undefined,
  		    districtCounty: undefined,
          systemNameStr: undefined,
  		    illegalReasons: undefined,
  		    punishmentRequirements: undefined,
  		    punishmentContent: undefined,
  		    state: undefined,
          enforceType: undefined,
          enforcecontent: undefined,
          isHaveSystem: undefined,
          registerApproval: undefined,
          registerApprovalFileModel: [],
          record: undefined,
          recordFileModel: [],
          caseHandlingOpinions: undefined,
          caseHandlingOpinionsFileModel: [],
          enforcementRecords: undefined,
          enforcementRecordsFileModel: [],
          noticeLetter: undefined,
          noticeLetterFileModel: [],
          punishmentDecision: undefined,
          punishmentDecisionFileModel: [],
          closingReport: undefined,
          closingReportFileModel: [],
          other: undefined,
          otherFileModel: [],
  	    },
9913f656   monkeyhouyi   巡查上报
238
        rules: {
6cd34f81   monkeyhouyi   对接接口优化
239
240
241
242
243
244
245
246
          sourceRegistration: [
            { required: true, message: "请输入来源登记", trigger: "bulr" }
          ],
          systemName: [
            { required: true, message: "请选择应用名称", trigger: "bulr" }
          ],
          registeredEntity: [
            { required: true, message: "请选择运营主体", trigger: "bulr" }
7180000e   monkeyhouyi   优化
247
          ],
6cd34f81   monkeyhouyi   对接接口优化
248
249
          districtCounty: [
            { required: true, message: "请选择所属区域", trigger: "change" }
7180000e   monkeyhouyi   优化
250
          ],
6cd34f81   monkeyhouyi   对接接口优化
251
252
          enforceType: [
            { required: true, message: "请选择执法方式", trigger: "bulr" }
9913f656   monkeyhouyi   巡查上报
253
          ],
6cd34f81   monkeyhouyi   对接接口优化
254
255
          enforcecontent: [
            { required: true, message: "请填写执法说明", trigger: "bulr" }
9913f656   monkeyhouyi   巡查上报
256
          ],
9913f656   monkeyhouyi   巡查上报
257
        },
6cd34f81   monkeyhouyi   对接接口优化
258
259
260
        systemOption: [],
        system_loading: false,
        areaOptions: [],
7180000e   monkeyhouyi   优化
261
        btnLoading: false,
6cd34f81   monkeyhouyi   对接接口优化
262
263
        companyOptions: [],
        platformTypeOptions: [],
006cc67a   monkeyhouyi   巡查上报
264
265
      };
    },
6cd34f81   monkeyhouyi   对接接口优化
266
267
268
269
270
271
    computed: {
      isSHILevel() {
        // 判断角色是否为‘市级办公室’
        return this.$store.state.user.islader;
      },
    },
006cc67a   monkeyhouyi   巡查上报
272
    watch: {},
6cd34f81   monkeyhouyi   对接接口优化
273
274
275
276
277
278
    created() {
      this.getplatformTypeOptions();
      this.initSystemTypeList();
      this.initAreaTypeList();
      // this.initCompanyList();
    },
006cc67a   monkeyhouyi   巡查上报
279
280
    mounted() {},
    methods: {
6cd34f81   monkeyhouyi   对接接口优化
281
      async getplatformTypeOptions() {
7180000e   monkeyhouyi   优化
282
283
284
        let list = this.$store.state.meta.system;
        !list && (list = await this.$store.dispatch("getTypeListByCode", "system"));
        this.platformTypeOptions = list;
7180000e   monkeyhouyi   优化
285
      },
6cd34f81   monkeyhouyi   对接接口优化
286
        // 请求公司列表
218a9837   monkeyhouyi   运营主体优化
287
288
289
290
291
292
293
294
      // async initCompanyList() {
      //   request({
      //     url: `/Extend/basecomapnyinfo/GetNoPagingList`,
      //     method: "GET",
      //   }).then(({data}) => {
      //     this.companyOptions = data;
      //   })
      // },
6cd34f81   monkeyhouyi   对接接口优化
295
296
297
298
299
300
301
302
303
304
305
306
      // 获取系统列表
      getSystemSelect(companyId) {
        this.system_loading = true;
        request({
          url: "/Extend/basesysteminfo/GetNoPagingList",
          method: "get",
          params: { companyId }
        }).then(({data}) => {
          this.systemOption = data;
          this.system_loading = false;
        })
      },
7180000e   monkeyhouyi   优化
307
308
309
      selectBlur(e) {
        let value = e.target.value;
        if(!value) return;
6cd34f81   monkeyhouyi   对接接口优化
310
        this.dataForm.systemName = e.target.value;
7180000e   monkeyhouyi   优化
311
312
313
        this.platformNameChange(value, 'blur');
      },
      platformNameChange(val, type) {
6cd34f81   monkeyhouyi   对接接口优化
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
        let obj = this.systemOption.find(v => type == 'blur' ? val == v.fullName : val == v.id);
        console.log(obj);
        this.dataForm.isHaveSystem = obj ? true : false;
        this.dataForm.systemName = obj ? obj.id : val;
        this.dataForm.category = obj ? this.platformTypeOptions.find(v => v.Id == obj.systemType || v.FullName == obj.systemType).Id : '';
        // this.dataForm.recordNumber = obj ? obj.platform : '';
      },
      // 系统名称改变
      systemChange(val) {
        getSystemDetail(val).then(({data}) => {
          this.dataForm.registeredEntity = data.companyId;
          this.dataForm.category = dynamicTextUP(data.systemType, this.systemTypeOptions);
          this.dataForm.recordNumber = data.specialRecordNumber || '--';
          this.dataForm.districtCounty = data.areaId;
        })
7180000e   monkeyhouyi   优化
329
330
331
332
333
334
      },
      visibleNameChange(val) {
        if (val) return
        let input = this.$refs.select.$children[0].$refs.input;
        input.blur();
      },
6cd34f81   monkeyhouyi   对接接口优化
335
336
337
338
339
      companyChange(val, type) {
        let obj = this.companyOptions.find(v => val == v.id);
        obj ? this.getSystemSelect(val) : (this.systemOption == []);
        this.dataForm.systemName = '';
        this.dataForm.category = '';
57235647   monkeyhouyi   应用上报
340
      },
6cd34f81   monkeyhouyi   对接接口优化
341
342
343
344
345
      // 运营主体改变
      selectCompanyBlur(e) {
        let value = e.target.value;
        if(!value) return;
        this.dataForm.registeredEntity = e.target.value;
006cc67a   monkeyhouyi   巡查上报
346
      },
6cd34f81   monkeyhouyi   对接接口优化
347
348
349
350
      visibleNameCompanyChange(val) {
        if (val) return
        let input = this.$refs.companySelect.$children[0].$refs.input;
        input.blur();
57235647   monkeyhouyi   应用上报
351
      },
006cc67a   monkeyhouyi   巡查上报
352
353
354
      goBack() {
        this.$emit("refresh");
      },
6cd34f81   monkeyhouyi   对接接口优化
355
356
357
358
      init(row, isDetail, type) {
        // type 0 上报/下派 1 处理
        this.formType = type || '0';
        this.isDetail = isDetail || false;
006cc67a   monkeyhouyi   巡查上报
359
        this.visible = true;
6cd34f81   monkeyhouyi   对接接口优化
360
        this.$nextTick(() => {
006cc67a   monkeyhouyi   巡查上报
361
          this.$refs["elForm"].resetFields();
6cd34f81   monkeyhouyi   对接接口优化
362
363
364
365
366
          this.dataForm.registeredEntity = row.companyId;
          this.dataForm.registeredEntityStr = row.companyName;
          this.dataForm.systemName = row.id;
          this.dataForm.systemNameStr = row.systemName;
          this.dataForm.category = row.systemType;
006cc67a   monkeyhouyi   巡查上报
367
368
        });
      },
6cd34f81   monkeyhouyi   对接接口优化
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
      // 上报/下派
      submit(type) {
        // type: 1 上报 0 保存
         // status 状态 0保存/1办结
        let obj = {
          ...this.dataForm,
          isReport: type,
        }
  			this.$refs['elForm'].validate((valid) => {
          if(valid) {
            !this.dataForm.id ? this.toRequest('/Extend/BaseCaseHandling', 'POST', obj) : this.toRequest(`/Extend/BaseCaseHandling/${this.dataForm.id}`, 'PUT', obj);
          }
        })
      },
      // 处理
      handle(status) {
        this.$refs['elForm'].validate((valid) => {
          if(valid) {
7180000e   monkeyhouyi   优化
387
            this.btnLoading = true;
6cd34f81   monkeyhouyi   对接接口优化
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
            this.dataForm.status = status;
            request({
              url: `/Extend/basecasehandling/HandlingCase/${this.dataForm.id}`,
              method: "POST",
              data: this.dataForm,
            }).then((res) => {
              this.visible = false;
              this.$emit("refresh", true);
              this.$message({
                type: "success",
                message: res.msg,
              })
            }).catch(() => {
              this.btnLoading = false;
            })
006cc67a   monkeyhouyi   巡查上报
403
          }
6cd34f81   monkeyhouyi   对接接口优化
404
        })
006cc67a   monkeyhouyi   巡查上报
405
      },
6cd34f81   monkeyhouyi   对接接口优化
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
      toRequest(url, method, data) {
        this.btnLoading = true;
        request({
          url,
          method,
          data,
        }).then((res) => {
          this.$message({
            type: "success",
            message: res.msg,
            onClose: () => {
              this.visible = false;
              this.$emit("refresh", true);
            },
          });
        }).catch(() => {
          this.btnLoading = false;
        });
      }
006cc67a   monkeyhouyi   巡查上报
425
426
427
    },
  };
  </script>