Commit dca40457180f256beb94bed51bd5b4711a952206

Authored by yiming
1 parent 7bc2cd27

库房检查修改

ruoyi-service/src/main/java/com/ruoyi/service/controller/SafetyController.java
... ... @@ -95,4 +95,14 @@ public class SafetyController extends BaseController
95 95 List<SafetyDetail> list = safetyService.selectDetailList(safetyDetail);
96 96 return getDataTable(list);
97 97 }
  98 +
  99 +
  100 + @PostMapping("/selectCount")
  101 + public AjaxResult selectCount(@Validated @RequestBody SafetyDetail safetyDetail)
  102 + {
  103 + AjaxResult ajaxResult=new AjaxResult();
  104 + ajaxResult.put("count",safetyService.selectCountByCheckType(safetyDetail));
  105 + return ajaxResult;
  106 + }
  107 +
98 108 }
... ...
ruoyi-service/src/main/java/com/ruoyi/service/domain/SafetyDetail.java
... ... @@ -25,11 +25,23 @@ public class SafetyDetail extends BaseEntity
25 25 /** 检查项 */
26 26 private int checkType;
27 27  
28   - /** 检查情况 */
29   - private int state;
  28 + /** 档号 */
  29 + private String archivalCode;
30 30  
31   - /** 措施 */
32   - private int measures;
  31 + /** 题名 */
  32 + private String title;
  33 +
  34 + /** 盒号 */
  35 + private String boxMark;
  36 +
  37 + /** 位置号 */
  38 + private String locationCode;
  39 +
  40 + /** 档案安全情况 */
  41 + private String archivesState;
  42 +
  43 + /** 补救措施 */
  44 + private String remedy;
33 45  
34 46 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
35 47 private Date createTime;
... ... @@ -61,20 +73,52 @@ public class SafetyDetail extends BaseEntity
61 73 this.checkType = checkType;
62 74 }
63 75  
64   - public int getState() {
65   - return state;
  76 + public String getArchivalCode() {
  77 + return archivalCode;
  78 + }
  79 +
  80 + public void setArchivalCode(String archivalCode) {
  81 + this.archivalCode = archivalCode;
  82 + }
  83 +
  84 + public String getTitle() {
  85 + return title;
  86 + }
  87 +
  88 + public void setTitle(String title) {
  89 + this.title = title;
  90 + }
  91 +
  92 + public String getBoxMark() {
  93 + return boxMark;
  94 + }
  95 +
  96 + public void setBoxMark(String boxMark) {
  97 + this.boxMark = boxMark;
  98 + }
  99 +
  100 + public String getLocationCode() {
  101 + return locationCode;
  102 + }
  103 +
  104 + public void setLocationCode(String locationCode) {
  105 + this.locationCode = locationCode;
  106 + }
  107 +
  108 + public String getArchivesState() {
  109 + return archivesState;
66 110 }
67 111  
68   - public void setState(int state) {
69   - this.state = state;
  112 + public void setArchivesState(String archivesState) {
  113 + this.archivesState = archivesState;
70 114 }
71 115  
72   - public int getMeasures() {
73   - return measures;
  116 + public String getRemedy() {
  117 + return remedy;
74 118 }
75 119  
76   - public void setMeasures(int measures) {
77   - this.measures = measures;
  120 + public void setRemedy(String remedy) {
  121 + this.remedy = remedy;
78 122 }
79 123  
80 124 @Override
... ...
ruoyi-service/src/main/java/com/ruoyi/service/mapper/SafetyDetailMapper.java
... ... @@ -3,6 +3,7 @@ package com.ruoyi.service.mapper;
3 3 import com.ruoyi.service.domain.SafetyDetail;
4 4  
5 5 import java.util.List;
  6 +import java.util.Map;
6 7  
7 8 /**
8 9 * 安全檢查 数据层
... ... @@ -13,4 +14,6 @@ public interface SafetyDetailMapper
13 14 {
14 15 int insert(SafetyDetail safetyDetail);
15 16 List<SafetyDetail> selectList(SafetyDetail safetyDetail);
  17 + List<Map<String,Object>> selectCountByCheckType(SafetyDetail safetyDetail);
  18 +
16 19 }
... ...
ruoyi-service/src/main/java/com/ruoyi/service/service/SafetyService.java
... ... @@ -7,6 +7,7 @@ import com.ruoyi.service.domain.SafetyDetail;
7 7 import com.ruoyi.service.domain.Tree;
8 8  
9 9 import java.util.List;
  10 +import java.util.Map;
10 11  
11 12 /**
12 13 * 安全检查 服务层
... ... @@ -22,4 +23,5 @@ public interface SafetyService
22 23 List<Safety> selectList(Safety safety);
23 24 int insertDetail(SafetyDetail safetyDetail);
24 25 List<SafetyDetail> selectDetailList(SafetyDetail safetyDetail);
  26 + List<Map<String,Object>> selectCountByCheckType(SafetyDetail safetyDetail);
25 27 }
... ...
ruoyi-service/src/main/java/com/ruoyi/service/service/impl/SafetyServiceImpl.java
... ... @@ -8,10 +8,7 @@ import com.ruoyi.service.service.SafetyService;
8 8 import org.springframework.stereotype.Service;
9 9  
10 10 import javax.annotation.Resource;
11   -import java.util.ArrayList;
12   -import java.util.HashSet;
13   -import java.util.List;
14   -import java.util.Set;
  11 +import java.util.*;
15 12  
16 13  
17 14 /**
... ... @@ -87,4 +84,8 @@ public class SafetyServiceImpl implements SafetyService
87 84 return safetyDetailMapper.selectList(safetyDetail);
88 85 }
89 86  
  87 + @Override
  88 + public List<Map<String,Object>> selectCountByCheckType(SafetyDetail safetyDetail){
  89 + return safetyDetailMapper.selectCountByCheckType(safetyDetail);
  90 + }
90 91 }
... ...
ruoyi-service/src/main/resources/mapper/sevice/SafetyDetailMapper.xml
... ... @@ -8,14 +8,22 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
8 8 insert into safety_detail(
9 9 <if test="safetyId != null and safetyId != ''">safetyId,</if>
10 10 <if test="checkType != null and checkType != ''">checkType,</if>
11   - <if test="state != null and state != ''">state,</if>
12   - <if test="measures != null and measures != ''">measures,</if>
  11 + <if test="archivalCode != null and archivalCode != ''">archivalCode,</if>
  12 + <if test="title != null and title != ''">title,</if>
  13 + <if test="boxMark != null and boxMark != ''">boxMark,</if>
  14 + <if test="locationCode != null and locationCode != ''">locationCode,</if>
  15 + <if test="archivesState != null and archivesState != ''">archivesState,</if>
  16 + <if test="remedy != null and remedy != ''">remedy,</if>
13 17 createTime
14 18 )values(
15 19 <if test="safetyId != null and safetyId != ''">#{safetyId},</if>
16 20 <if test="checkType != null and checkType != ''">#{checkType},</if>
17   - <if test="state != null and state != ''">#{state},</if>
18   - <if test="measures != null and measures != ''">#{measures},</if>
  21 + <if test="archivalCode != null and archivalCode != ''">#{archivalCode},</if>
  22 + <if test="title != null and title != ''">#{title},</if>
  23 + <if test="boxMark != null and boxMark != ''">#{boxMark},</if>
  24 + <if test="locationCode != null and locationCode != ''">#{locationCode},</if>
  25 + <if test="archivesState != null and archivesState != ''">#{archivesState},</if>
  26 + <if test="remedy != null and remedy != ''">#{remedy},</if>
19 27 sysdate()
20 28 )
21 29 </insert>
... ... @@ -26,7 +34,16 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
26 34 <if test="safetyId != null and safetyId != ''">
27 35 AND safetyId =#{safetyId}
28 36 </if>
  37 + <if test="checkType != null and checkType != ''">
  38 + AND checkType =#{checkType}
  39 + </if>
29 40 </where>
30 41 </select>
31 42  
  43 + <select id="selectCountByCheckType" resultType="map" parameterType="com.ruoyi.service.domain.SafetyDetail">
  44 + SELECT count(*) count,checkType FROM `safety_detail`
  45 + where safetyId =#{safetyId}
  46 + GROUP BY checkType
  47 + </select>
  48 +
32 49 </mapper>
33 50 \ No newline at end of file
... ...
ruoyi-ui/src/api/service/safety.js
... ... @@ -54,4 +54,13 @@ export function detailList(query) {
54 54 })
55 55 }
56 56  
  57 +export function selectCount(data) {
  58 + console.log(data);
  59 + return request({
  60 + url: '/service/safety/selectCount',
  61 + method: 'post',
  62 + data: data
  63 + })
  64 +}
  65 +
57 66  
... ...
ruoyi-ui/src/views/service/safety/index.vue
... ... @@ -54,7 +54,7 @@
54 54 <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
55 55 <template slot-scope="scope" >
56 56 <el-button size="mini" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']" >修改</el-button>
57   - <el-button size="mini" type="text" @click="handlecheck(scope.row)" v-hasPermi="['system:user:edit']" v-if="type==1">检查</el-button>
  57 + <el-button size="mini" type="text" @click="handleCheck(scope.row)" v-hasPermi="['system:user:edit']" v-if="type==1">检查</el-button>
58 58 <el-button size="mini" type="text" @click="handleDetail(scope.row)" v-hasPermi="['system:user:edit']" v-if="type==2">登记</el-button>
59 59 <el-button size="mini" type="text" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">删除</el-button>
60 60 </template>
... ... @@ -73,7 +73,7 @@
73 73 </el-row>
74 74  
75 75  
76   - <!-- 添加或修改对话框 -->
  76 + <!-- 库房和档案的新增 修改模态框 -->
77 77 <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
78 78 <el-form ref="form" :model="form" :rules="rules" label-width="100px">
79 79 <el-form-item label="档案库" >
... ... @@ -104,8 +104,8 @@
104 104 </div>
105 105 </el-dialog>
106 106  
107   - <!-- 库房检查 -->
108   - <el-dialog :title="title" :visible.sync="open2" width="1300px" append-to-body>
  107 + <!-- 库房检查登记的模态框 -->
  108 + <el-dialog title="库房登记" :visible.sync="open2" width="1300px" append-to-body>
109 109 <el-form ref="form" :model="form2" :rules="rules" >
110 110 <!-- 第一排-->
111 111 <el-col :span="2"><el-form-item label="防光" ></el-form-item></el-col>
... ... @@ -311,74 +311,61 @@
311 311 </div>
312 312 </el-dialog>
313 313  
314   - <!-- 档案检查新增 -->
315   - <el-dialog title="新增" :visible.sync="open3" width="500px" append-to-body>
316   - <el-form ref="form2" :model="form2" :rules="rules" label-width="100px">
317   - <el-form-item label="检查项" >
318   - <el-select v-model="form2.checkType" placeholder="检查项" >
319   - <el-option
320   - v-for="dict in dict.type.checkType"
321   - :key="dict.value"
322   - :label="dict.label"
323   - :value="dict.value"
324   - />
325   - </el-select>
  314 + <!--档案检查登记查看的模态框 -->
  315 + <el-dialog title="档案登记" :visible.sync="open3" width="1000px" append-to-body>
  316 + <el-table :data="tableData" >
  317 + <el-table-column label="检查项" align="center" key="checkType" prop="checkType" :formatter="checkTypeFormat" />
  318 + <el-table-column label="检查情况" align="center" key="state" prop="state" />
  319 + <el-table-column label="措施" align="center" key="measures" prop="measures" :formatter="measuresFormat"/>
  320 + <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
  321 + <template slot-scope="scope" >
  322 + <el-button size="mini" type="text" @click="handleAddDetail(scope.row)">新增</el-button>
  323 + <el-button size="mini" type="text" @click="getDetailList(scope.row)">明细</el-button>
  324 + </template>
  325 + </el-table-column>
  326 + </el-table>
  327 + </el-dialog>
  328 +
  329 + <!-- 档案检查登记的明细添加的模态框 -->
  330 + <el-dialog title="新增明细" :visible.sync="open4" width="500px" append-to-body>
  331 + <el-form ref="form4" :model="form4" :rules="rules" label-width="100px">
  332 + <el-form-item label="档号" prop="archivalCode">
  333 + <el-input v-model="form4.archivalCode" maxlength="30" />
326 334 </el-form-item>
327   - <el-form-item label="检查情况" >
328   - <el-input-number v-model="form2.state" controls-position="right" :min="0" />
  335 + <el-form-item label="题名" prop="title">
  336 + <el-input v-model="form4.title" maxlength="30" />
329 337 </el-form-item>
330   - <el-form-item label="措施" >
331   - <el-select v-model="form2.measures" placeholder="措施" >
332   - <el-option
333   - v-for="dict in dict.type.measures"
334   - :key="dict.value"
335   - :label="dict.label"
336   - :value="dict.value"
337   - />
338   - </el-select>
  338 + <el-form-item label="盒号" prop="boxMark">
  339 + <el-input v-model="form4.boxMark" maxlength="30" />
  340 + </el-form-item>
  341 + <el-form-item label="位置号" prop="locationCode">
  342 + <el-input v-model="form4.locationCode" maxlength="30" />
  343 + </el-form-item>
  344 + <el-form-item label="档案安全情况" prop="archivesState">
  345 + <el-input v-model="form4.archivesState" maxlength="30" />
  346 + </el-form-item>
  347 + <el-form-item label="补救措施" prop="remedy">
  348 + <el-input v-model="form4.remedy" maxlength="30" />
339 349 </el-form-item>
340 350 </el-form>
341 351 <div slot="footer" class="dialog-footer">
342   - <el-button type="primary" @click="submitForm2">确 定</el-button>
  352 + <el-button type="primary" @click="submitForm4">确 定</el-button>
343 353 <el-button @click="cancel2">取 消</el-button>
344 354 </div>
345 355 </el-dialog>
346 356  
347   - <!--档案检查登记的查看 -->
348   - <el-dialog title="登记" :visible.sync="open4" width="1000px" append-to-body>
349   - <el-row :gutter="10" class="mb8">
350   - <el-col :span="1.5">
351   - <el-button
352   - type="primary"
353   - plain
354   - icon="el-icon-plus"
355   - size="mini"
356   - @click="handleAddDetail()"
357   - v-hasPermi="['server:safety:add']"
358   - >新增</el-button>
359   - </el-col>
360   - </el-row>
  357 + <!-- 档案检查登记的明细显示的模态框 -->
  358 + <el-dialog title="明细查看" :visible.sync="open5" width="1000px" append-to-body>
361 359 <el-table v-loading="loading" :data="detailList" >
362   - <el-table-column label="检查项" align="center" key="checkType" prop="checkType" :formatter="checkTypeFormat" />
363   - <el-table-column label="检查情况" align="center" key="state" prop="state" />
364   - <el-table-column label="措施" align="center" key="measures" prop="measures" :formatter="measuresFormat"/>
365   - <el-table-column
366   - label="操作"
367   - align="center"
368   - width="160"
369   - class-name="small-padding fixed-width"
370   - >
371   - <template slot-scope="scope" >
372   - <el-button
373   - size="mini"
374   - type="text"
375   - >明细</el-button>
376   - </template>
377   - </el-table-column>
  360 + <el-table-column label="档号" align="center" prop="archivalCode" />
  361 + <el-table-column label="题名" align="center" prop="title" />
  362 + <el-table-column label="盒号" align="center" prop="boxMark" />
  363 + <el-table-column label="位置号" align="center" prop="locationCode" />
  364 + <el-table-column label="档案安全情况" align="center" prop="archivesState" />
  365 + <el-table-column label="补救措施" align="center" prop="remedy" />
378 366 </el-table>
379 367 </el-dialog>
380 368  
381   -
382 369 </div>
383 370 </template>
384 371 <style lang="scss">
... ... @@ -390,7 +377,7 @@
390 377 <script>
391 378  
392 379 import {getDepots} from "@/api/service/depot";
393   -import {treeselect, listPost, addPost, updatePost, delPost, detailList, addDetail} from "@/api/service/safety";
  380 +import {treeselect, listPost, addPost, updatePost, delPost, selectCount, detailList, addDetail} from "@/api/service/safety";
394 381 import Treeselect from "@riophae/vue-treeselect";
395 382 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
396 383  
... ... @@ -400,11 +387,37 @@ export default {
400 387 data() {
401 388 return {
402 389 postList: null,
  390 + tableData:[{
  391 + checkType: 1,
  392 + state: 0,
  393 + measures: 0
  394 + }, {
  395 + checkType: 2,
  396 + state: 0,
  397 + measures: 0
  398 + }, {
  399 + checkType: 3,
  400 + state: 0,
  401 + measures: 0
  402 + }, {
  403 + checkType: 4,
  404 + state: 0,
  405 + measures: 0
  406 + }, {
  407 + checkType: 5,
  408 + state: 0,
  409 + measures: 0
  410 + }, {
  411 + checkType: 6,
  412 + state: 0,
  413 + measures: 0
  414 + }],
403 415 detailList:null,
404 416 id:undefined,
405 417 edit:false,
406 418 form: {},
407 419 form2:{},
  420 + form4:{},
408 421 // 遮罩层
409 422 loading: true,
410 423 // 选中数组
... ... @@ -424,6 +437,7 @@ export default {
424 437 open2:false,
425 438 open3:false,
426 439 open4:false,
  440 + open5:false,
427 441 // 表单参数
428 442 defaultProps: {
429 443 children: "children",
... ... @@ -436,7 +450,12 @@ export default {
436 450 depotId:undefined
437 451 },
438 452 queryParams3: {
439   - safetyId:undefined
  453 + safetyId:undefined,
  454 + checkType:undefined
  455 + },
  456 + queryParams5: {
  457 + safetyId:undefined,
  458 + checkType:undefined
440 459 },
441 460 // 表单校验
442 461 rules: {
... ... @@ -481,15 +500,7 @@ export default {
481 500 this.getDepots();
482 501 },
483 502 methods: {
484   - getList() {
485   - this.queryParams.type=this.type;
486   - this.loading = true;
487   - listPost(this.queryParams).then(response => {
488   - this.postList = response.rows;
489   - this.total = response.total;
490   - this.loading = false;
491   - });
492   - },
  503 + /** 树形结构 */
493 504 getTreeselect() {
494 505 treeselect().then(response => {
495 506 this.options = response.data;
... ... @@ -507,6 +518,26 @@ export default {
507 518 this.queryParams.depotId=data.dbId;
508 519 }
509 520 this.handleQuery();
  521 + },/** 搜索按钮操作 */
  522 + handleQuery() {
  523 + this.queryParams.pageNum = 1;
  524 + this.getList();
  525 + },
  526 + // 多选框选中数据
  527 + handleSelectionChange(selection) {
  528 + this.ids = selection.map(item => item.id);
  529 + this.single = selection.length != 1;
  530 + this.multiple = !selection.length;
  531 + },
  532 + /** 分页 */
  533 + getList() {
  534 + this.queryParams.type=this.type;
  535 + this.loading = true;
  536 + listPost(this.queryParams).then(response => {
  537 + this.postList = response.rows;
  538 + this.total = response.total;
  539 + this.loading = false;
  540 + });
510 541 },
511 542 // 取消按钮
512 543 cancel() {
... ... @@ -514,7 +545,7 @@ export default {
514 545 this.reset();
515 546 },
516 547 cancel2() {
517   - this.open3 = false;
  548 + this.open4 = false;
518 549 },
519 550 // 表单重置
520 551 reset() {
... ... @@ -556,40 +587,46 @@ export default {
556 587 this.r23='1';
557 588 this.resetForm("form2");
558 589 },
559   - reset3() {
560   - this.form3 = {
  590 + reset3(row){
  591 + // 数据清空
  592 + let tb=this.tableData;
  593 + for(let i in tb){
  594 + tb[i].state=0;
  595 + tb[i].measures=0;
  596 + }
  597 + // 查询合计并赋值
  598 + this.queryParams3.safetyId=row.id;
  599 + selectCount(this.queryParams3).then(response => {
  600 + let arr=response.count;
  601 + for(let i in arr){
  602 + let index=arr[i].checkType-1;
  603 + let c=arr[i].count;
  604 + this.tableData[index].state=c;
  605 + }
  606 + });
  607 + },
  608 + reset4() {
  609 + this.form4 = {
561 610 safetyId: undefined,
562 611 checkType: undefined,
563   - state: undefined,
564   - measures: undefined
  612 + archivalCode: undefined,
  613 + title: undefined,
  614 + boxMark: undefined,
  615 + locationCode: undefined,
  616 + archivesState: undefined,
  617 + remedy: undefined
565 618 };
566   - this.resetForm("form3");
567   - },
568   - /** 搜索按钮操作 */
569   - handleQuery() {
570   - this.queryParams.pageNum = 1;
571   - this.getList();
  619 + this.resetForm("form4");
572 620 },
573   - /** 重置按钮操作 */
574   - resetQuery() {
575   - this.dateRange = [];
576   - this.resetForm("queryForm");
577   - this.handleQuery();
578   - },
579   - // 多选框选中数据
580   - handleSelectionChange(selection) {
581   - this.ids = selection.map(item => item.id);
582   - this.single = selection.length != 1;
583   - this.multiple = !selection.length;
584   - },
585   - /** 新增按钮操作 */
  621 + /*以下为库房和档案的新增 修改 删除--------------------------------------------------*/
  622 + /** 库房和档案的新增按钮 */
586 623 handleAdd() {
587 624 this.reset();
588 625 this.open = true;
589 626 this.edit = false;
590 627 this.title = "创建";
591 628 },
592   - /** 修改按钮操作 */
  629 + /** 库房和档案修改按钮 */
593 630 handleUpdate(row) {
594 631 this.reset();
595 632 this.form = row;
... ... @@ -597,8 +634,40 @@ export default {
597 634 this.edit = true;
598 635 this.title = "编辑";
599 636 },
600   - /** 库房检查按钮操作 */
601   - handlecheck(row) {
  637 + /** 库房和档案的提交按钮 */
  638 + submitForm: function() {
  639 + this.$refs["form"].validate(valid => {
  640 + if (valid) {
  641 + if (this.edit) {
  642 + updatePost(this.form).then(response => {
  643 + this.$modal.msgSuccess("修改成功");
  644 + this.open = false;
  645 + this.getList();
  646 + });
  647 + } else {
  648 + this.form.type=this.type;
  649 + addPost(this.form).then(response => {
  650 + this.$modal.msgSuccess("新增成功");
  651 + this.open = false;
  652 + this.getList();
  653 + });
  654 + }
  655 + }
  656 + });
  657 + },
  658 + /** 库房和档案的删除按钮 */
  659 + handleDelete(row) {
  660 + this.$modal.confirm('是否确认删除').then(function() {
  661 + return delPost(row.id);
  662 + }).then(() => {
  663 + this.getList();
  664 + this.$modal.msgSuccess("删除成功");
  665 + this.getTreeselect();
  666 + }).catch(() => {});
  667 + },
  668 + /*以下为库房检查登记--------------------------------------------------*/
  669 + /** 库房检查登记按钮 */
  670 + handleCheck(row) {
602 671 this.reset2();
603 672 this.form2.id=row.id;
604 673 let arr=row.radio.split(',');
... ... @@ -627,40 +696,6 @@ export default {
627 696 this.r22=arr[21];
628 697 this.r23=arr[22];
629 698 this.open2 = true;
630   - this.title = "检查登记";
631   - },
632   - /** 档案检查登记按钮操作 */
633   - handleDetail(row) {
634   - this.safetyId=row.id;
635   - this.getDetailList(row.id);
636   - this.open4 = true;
637   - },
638   - /** 档案检查新增按钮操作 */
639   - handleAddDetail() {
640   - this.reset3();
641   - this.form3.safetyId=this.safetyId;
642   - this.open3 = true;
643   - },
644   - /** 提交按钮 */
645   - submitForm: function() {
646   - this.$refs["form"].validate(valid => {
647   - if (valid) {
648   - if (this.edit) {
649   - updatePost(this.form).then(response => {
650   - this.$modal.msgSuccess("修改成功");
651   - this.open = false;
652   - this.getList();
653   - });
654   - } else {
655   - this.form.type=this.type;
656   - addPost(this.form).then(response => {
657   - this.$modal.msgSuccess("新增成功");
658   - this.open = false;
659   - this.getList();
660   - });
661   - }
662   - }
663   - });
664 699 },
665 700 /** 库房检查提交 */
666 701 submitForm2: function() {
... ... @@ -695,16 +730,44 @@ export default {
695 730 this.getList();
696 731 });
697 732 },
698   - /** 删除按钮操作 */
699   - handleDelete(row) {
700   - this.$modal.confirm('是否确认删除').then(function() {
701   - return delPost(row.id);
702   - }).then(() => {
703   - this.getList();
704   - this.$modal.msgSuccess("删除成功");
705   - this.getTreeselect();
706   - }).catch(() => {});
  733 + /*以下为档案检查登记--------------------------------------------------*/
  734 + /** 档案检查登记按钮*/
  735 + handleDetail(row) {
  736 + this.safetyId=row.id;
  737 + this.reset3(row);
  738 + this.open3 = true;
  739 + },
  740 + /** 档案检查新增明细的按钮 */
  741 + handleAddDetail(row) {
  742 + this.reset4();
  743 + this.form4.checkType=row.checkType;
  744 + this.form4.safetyId=this.safetyId;
  745 + this.open4 = true;
  746 + },
  747 + /**档案安检明细的提交 */
  748 + submitForm4: function() {
  749 + this.$refs["form4"].validate(valid => {
  750 + if (valid) {
  751 + addDetail(this.form4).then(response => {
  752 + this.$modal.msgSuccess("新增成功");
  753 + this.open4 = false;
  754 + this.open3 = false;
  755 + });
  756 + }
  757 + });
707 758 },
  759 + /** 档案检查登记的查询 */
  760 + getDetailList(row) {
  761 + this.open5=true;
  762 + this.queryParams5.safetyId=this.safetyId;
  763 + this.queryParams5.checkType=row.checkType;
  764 + this.loading = true;
  765 + detailList(this.queryParams5).then(response => {
  766 + this.detailList = response.rows;
  767 + this.loading = false;
  768 + });
  769 + },
  770 + /*以下为初始化数据及以下工具类--------------------------------------------------*/
708 771 /** 获取档案库列表 */
709 772 getDepots(){
710 773 getDepots().then(response=>{
... ... @@ -719,21 +782,13 @@ export default {
719 782 }
720 783 }
721 784 },
722   - /** 档案检查登记的查询 */
723   - getDetailList(safetyId) {
724   - this.queryParams3.safetyId=safetyId;
725   - this.loading = true;
726   - detailList(this.queryParams3).then(response => {
727   - this.detailList = response.rows;
728   - this.loading = false;
729   - });
730   - },
731 785 checkTypeFormat(row, column) {
732 786 return this.selectDictLabel(this.dict.type.checkType, row.checkType);
733 787 },
734 788 measuresFormat(row, column) {
735 789 return this.selectDictLabel(this.dict.type.measures, row.measures);
736 790 },
  791 + /** 简单Tab */
737 792 clickTab(tab, event) {
738 793 this.type=tab.name;
739 794 this.handleQuery();
... ...