Prechádzať zdrojové kódy

feat(issue): 装置问题滚动清单功能

- 新增装置问题滚动清单相关功能和接口- 修改问题清单和行动计划相关功能,改为装置问题滚动清单
- 优化数据结构和查询条件,增加年份筛选
- 修复导入模板和数据格式问题
jiangbiao 20 hodín pred
rodič
commit
f77ba070f0

+ 1 - 1
master/src/main/java/com/ruoyi/project/ehs/controller/TRcauditmenuController.java

@@ -235,7 +235,7 @@ public class TRcauditmenuController extends BaseController
         ) {
             failNum++;
             try {
-                tRcauditmenuService.insertTRcauditmenu(t);
+                add(t);
                 successNumber++;
             }catch (Exception e){
                 failNumber++;

+ 15 - 7
master/src/main/java/com/ruoyi/project/issue/controller/TPlantIssuelistController.java

@@ -14,6 +14,7 @@ import com.ruoyi.project.issue.service.ITPlantIssuelistService;
 import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.system.domain.SysDept;
 import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.system.service.ISysDeptService;
 import com.ruoyi.project.training.domain.*;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
@@ -46,6 +47,9 @@ public class TPlantIssuelistController extends BaseController {
     @Autowired
     private ITPlantIssuelistService tPlantIssuelistService;
 
+    @Autowired
+    private ISysDeptService iSysDeptService;
+
     /**
      * 查询装置问题滚动清单列表
      */
@@ -92,9 +96,7 @@ public class TPlantIssuelistController extends BaseController {
             CellStyle originalStyle1 = originalcell1.getCellStyle();
             if (!list.isEmpty()) {
                 Row line1 = sheet1.getRow(0);
-                line1.getCell(4).setCellValue(list.get(0).getPlant()+
-                        " Plant issue identified rolling list and action fowards plan\n"
-                        +list.get(0).getPlant()+"装置滚动问题清单和行动计划");
+                line1.getCell(0).setCellValue(list.get(0).getPlant()+"装置滚动问题清单和行动计划");
             }
 
             for (TPlantIssuelist t : list) {
@@ -107,8 +109,8 @@ public class TPlantIssuelistController extends BaseController {
                 row.createCell(4).setCellValue(t.getIssueIdentified());
                 row.createCell(5).setCellValue(t.getActionsTaken());
                 row.createCell(6).setCellValue(t.getIssueClass());
-                row.createCell(7).setCellValue(t.getResponsiblePerson());
-                row.createCell(8).setCellValue(t.getResponsibleUnit());
+                row.createCell(7).setCellValue(t.getResponsibleUnit());
+                row.createCell(8).setCellValue(t.getResponsiblePerson());
                 row.createCell(9).setCellValue(t.getCurrentStates());
                 row.createCell(10).setCellValue(DateUtils.dateTime(t.getExpectedDate()));
                 row.createCell(11).setCellValue(DateUtils.dateTime(t.getCompletionDate()));
@@ -188,6 +190,8 @@ public class TPlantIssuelistController extends BaseController {
         List<TPlantIssuelist> list = new ArrayList<>();
         int rowNum = sheet.getPhysicalNumberOfRows();
         int failNumber = 0;
+        //部门查询
+        List<SysDept> dept = iSysDeptService.selectAllDeptList(new SysDept());
         for (int i = 1; i < rowNum; i++) {
             try {
                 logger.info("读取行数:" + i);
@@ -216,9 +220,13 @@ public class TPlantIssuelistController extends BaseController {
                     } else if (j == 6) {
                         entity.setIssueClass(cellValue);
                     } else if (j == 7) {
-                        entity.setResponsiblePerson(cellValue);
+                        for (SysDept d : dept) {
+                            if (d.getDeptName().equals(cellValue)) {
+                                entity.setResponsibleUnit(String.valueOf(d.getDeptId()));//部门编号
+                            }
+                        }
                     } else if (j == 8) {
-                        entity.setResponsibleUnit(cellValue);
+                        entity.setResponsiblePerson(cellValue);
                     } else if (j == 9) {
                         entity.setCurrentStates(cellValue);
                     } else if (j == 10) {

+ 1 - 1
master/src/main/java/com/ruoyi/project/issue/controller/TPlantOperationlistController.java

@@ -89,7 +89,7 @@ public class TPlantOperationlistController extends BaseController {
                 Row row = sheet1.createRow(rowIndex1);
                 row.setHeight((short) 800);
                 row.createCell(0).setCellValue(num1);
-                row.createCell(1).setCellValue(t.getIdentifiedDate());
+                row.createCell(1).setCellValue(DateUtils.dateTime(t.getIdentifiedDate()));
                 row.createCell(2).setCellValue(t.getPlant());
                 row.createCell(3).setCellValue(t.getShiftClass());
                 row.createCell(4).setCellValue(t.getIncidentType());

+ 30 - 0
master/src/main/java/com/ruoyi/project/issue/domain/TPlantIssuelist.java

@@ -54,6 +54,7 @@ public class TPlantIssuelist extends BaseEntity
     @Excel(name = "负责人员")
     private String responsiblePerson;
     private String responsibleUnit;
+    private String responsibleUnitName;
 
     /** 当前状态 */
     @Excel(name = "当前状态")
@@ -102,6 +103,35 @@ public class TPlantIssuelist extends BaseEntity
     private String remarks;
     private String deptName;
 
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date startDate;
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date endDate;
+
+    public String getResponsibleUnitName() {
+        return responsibleUnitName;
+    }
+
+    public void setResponsibleUnitName(String responsibleUnitName) {
+        this.responsibleUnitName = responsibleUnitName;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
     public Date getExpectedDate() {
         return expectedDate;
     }

+ 22 - 0
master/src/main/java/com/ruoyi/project/issue/domain/TPlantOperationlist.java

@@ -21,6 +21,7 @@ public class TPlantOperationlist extends BaseEntity
     private Long id;
 
     /**时间*/
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
     private Date identifiedDate;
     private String identifiedDateStr;
 
@@ -78,6 +79,27 @@ public class TPlantOperationlist extends BaseEntity
     private String remarks;
     private String deptName;
 
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date startDate;
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date endDate;
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
     public String getIdentifiedDateStr() {
         return identifiedDateStr;
     }

+ 5 - 2
master/src/main/resources/mybatis/issue/TPlantIssuelistMapper.xml

@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="issueClass"    column="issue_class"    />
         <result property="responsiblePerson"    column="responsible_person"    />
         <result property="responsibleUnit"    column="responsible_unit"    />
+        <result property="responsibleUnitName"    column="responsible_unit_name"    />
         <result property="currentStates"    column="current_states"    />
         <result property="completionDate"    column="completion_date"    />
         <result property="expectedDate"    column="expected_date"    />
@@ -30,8 +31,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTPlantIssuelistVo">
-        select d.id, d.plant, d.area, d.identified_date, d.issue_source, d.issue_identified, d.actions_taken, d.issue_class, d.responsible_person,d.responsible_unit, d.current_states, d.completion_date, d.expected_date, d.additional_deadline, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_plant_issuelist d
+        select d.id, d.plant, d.area, d.identified_date, d.issue_source, d.issue_identified, d.actions_taken, d.issue_class, d.responsible_person,d.responsible_unit,s2.dept_name responsible_unit_name, d.current_states, d.completion_date, d.expected_date, d.additional_deadline, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_plant_issuelist d
       left join sys_dept s on s.dept_id = d.dept_id
+      left join sys_dept s2 on s2.dept_id = d.responsible_unit
     </sql>
 
     <select id="selectTPlantIssuelistList" parameterType="TPlantIssuelist" resultMap="TPlantIssuelistResult">
@@ -40,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="plant != null  and plant != ''"> and plant = #{plant}</if>
             <if test="area != null  and area != ''"> and area = #{area}</if>
             <if test="identifiedDate != null "> and identified_date = #{identifiedDate}</if>
+            <if test="startDate != null  and endDate != null"> and identified_date between #{startDate} and #{endDate}</if>
             <if test="identifiedDateStr != null "> and to_char(identified_date,'YYYY') = #{identifiedDateStr}</if>
             <if test="issueSource != null  and issueSource != ''"> and issue_source = #{issueSource}</if>
             <if test="issueIdentified != null  and issueIdentified != ''"> and issue_identified like concat('%',concat(#{issueIdentified},'%'))</if>
@@ -59,9 +62,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             and d.del_flag = 0
         </where>
-        order by createdate desc
         <!-- 数据范围过滤 -->
         ${params.dataScope}
+        order by current_states desc,expected_date asc
     </select>
     
     <select id="selectTPlantIssuelistById" parameterType="Long" resultMap="TPlantIssuelistResult">

+ 4 - 2
master/src/main/resources/mybatis/issue/TPlantOperationlistMapper.xml

@@ -31,10 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTPlantOperationlistList" parameterType="TPlantOperationlist" resultMap="TPlantOperationlistResult">
         <include refid="selectTPlantOperationlistVo"/>
         <where>  
-            <if test="identifiedDate != null  and identifiedDate != ''"> and identified_date = #{plant}</if>
+            <if test="identifiedDate != null "> and identified_date = #{plant}</if>
+            <if test="startDate != null  and endDate != null"> and identified_date between #{startDate} and #{endDate}</if>
             <if test="plant != null  and plant != ''"> and plant = #{plant}</if>
             <if test="shiftClass != null  and shiftClass != ''"> and shift_class = #{shiftClass}</if>
-            <if test="incidentDescription != null  and incidentDescription != ''"> and incident_description = #{incidentDescription}</if>
+            <if test="incidentDescription != null  and incidentDescription != ''"> and incident_description like concat('%',concat(#{incidentDescription},'%'))</if>
             <if test="incidentType != null  and incidentType != ''"> and incident_type = #{incidentType}</if>
             <if test="causeRes != null  and causeRes != ''"> and cause_res = #{causeRes}</if>
             <if test="coutermeasures != null  and coutermeasures != ''"> and coutermeasures = #{coutermeasures}</if>
@@ -48,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
+        order by identified_date desc
     </select>
     
     <select id="selectTPlantOperationlistById" parameterType="Long" resultMap="TPlantOperationlistResult">

BIN
master/src/main/resources/static/template/issue/OperationlistTmpl.xlsx


BIN
master/src/main/resources/static/template/issue/issuelistTmpl.xlsx


BIN
master/src/main/resources/static/word/issue/OperationlistTmpl.xlsx


BIN
master/src/main/resources/static/word/issue/issuelistTmpl.xlsx


+ 74 - 14
ui/src/views/issue/issuelist/bd.vue

@@ -11,13 +11,18 @@
           <el-option value="公用工程单元" laabel="公用工程单元"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="提出日期" prop="identifiedDateStr">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.identifiedDateStr"
-                        type="year"
-                        @change="handleQuery"
-                        value-format="yyyy"
-                        placeholder="选择提出日期">
+      <el-form-item label="提出日期" prop="queryDate">
+        <el-date-picker
+          v-model="queryDate"
+          type="daterange"
+          align="right"
+          value-format="yyyy-MM-dd"
+          @change="handleQuery"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
         </el-date-picker>
       </el-form-item>
       <el-form-item label="当前状态" prop="currentStates">
@@ -26,6 +31,15 @@
           <el-option value="未完成" laabel="未完成"></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="问题类别" prop="issueClass">
+        <el-select  v-model="queryParams.issueClass"  placeholder="请选择问题来源"  @change="handleQuery" clearable >
+          <el-option value="工艺" laabel="工艺"></el-option>
+          <el-option value="仪表" laabel="仪表"></el-option>
+          <el-option value="维修" laabel="维修"></el-option>
+          <el-option value="电气" laabel="电气"></el-option>
+          <el-option value="其他" laabel="其他"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item label="识别出的问题" prop="issueIdentified" label-width="120">
         <el-input
           v-model="queryParams.issueIdentified"
@@ -118,7 +132,7 @@
       <el-table-column label="要采取的措施" align="center" prop="actionsTaken" :show-overflow-tooltip="true"
                        width="150"/>
       <el-table-column label="问题类别" align="center" prop="issueClass" :show-overflow-tooltip="true" width="150"/>
-      <el-table-column label="负责部门" align="center" prop="responsibleUnit" :show-overflow-tooltip="true"
+      <el-table-column label="负责部门" align="center" prop="responsibleUnitName" :show-overflow-tooltip="true"
                        width="150"/>
       <el-table-column label="负责人员" align="center" prop="responsiblePerson" :show-overflow-tooltip="true"
                        width="150"/>
@@ -208,14 +222,15 @@
         </el-form-item>
         <el-form-item label="问题类别" prop="issueClass">
           <el-select  v-model="form.issueClass"  placeholder="请选择问题来源" clearable style="width: 100%">
-            <el-option value="设备" laabel="设备"></el-option>
-            <el-option value="电仪" laabel="电仪"></el-option>
-            <el-option value="安全措施" laabel="安全措施"></el-option>
+            <el-option value="工艺" laabel="工艺"></el-option>
+            <el-option value="仪表" laabel="仪表"></el-option>
+            <el-option value="维修" laabel="维修"></el-option>
+            <el-option value="电气" laabel="电气"></el-option>
             <el-option value="其他" laabel="其他"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="负责部门 " prop="responsibleUnit">
-          <el-input v-model="form.responsibleUnit" placeholder="请输入负责人员"/>
+          <treeselect v-model="form.responsibleUnit" :options="allDeptOptions" :show-count="true" placeholder="请选择负责部门" />
         </el-form-item>
         <el-form-item label="负责人员" prop="responsiblePerson">
           <el-input v-model="form.responsiblePerson" placeholder="请输入负责人员"/>
@@ -374,6 +389,7 @@ import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
+import {alltreeselect} from "../../../api/system/dept";
 
 export default {
   name: "IssuelistBD",
@@ -384,6 +400,34 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      queryDate:[],
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -398,6 +442,7 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
+      allDeptOptions: [],
       clientHeight: 300,
       // 是否显示弹出层
       open: false,
@@ -460,7 +505,9 @@ export default {
         plant: 'BD',
         area: null,
         identifiedDate: null,
-        identifiedDateStr: new Date().getFullYear().toString(),
+        startDate: null,
+        endDate: null,
+        identifiedDateStr: null,
         issueSource: null,
         issueIdentified: null,
         actionsTaken: null,
@@ -527,6 +574,7 @@ export default {
     })
     this.getList();
     this.getTreeselect();
+    this.getAllDeptList();
   },
   methods: {
     /** 查询装置问题滚动清单列表 */
@@ -544,6 +592,11 @@ export default {
         this.deptOptions = response.data;
       });
     },
+    getAllDeptList(){
+      alltreeselect().then(response => {
+        this.allDeptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -578,11 +631,18 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      if (this.queryDate.length>0){
+        this.queryParams.startDate = this.queryDate[0];
+        this.queryParams.endDate = this.queryDate[1];
+      }
       this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryDate=[];
+      this.queryParams.startDate = null;
+      this.queryParams.endDate = null;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -786,6 +846,6 @@ export default {
   background: #ffff00 ;
 }
 .el-table .danger-row {
-  background: #ff0000 ;
+  background: #ff7474;
 }
 </style>

+ 87 - 41
ui/src/views/issue/issuelist/ebsm.vue

@@ -2,29 +2,27 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="区域" prop="area">
-        <el-select  v-model="form.area" placeholder="请选择区域" clearable style="width: 100%">
-          <el-option value="装置主管廊区" laabel="装置主管廊区"></el-option>
-          <el-option value="构一" laabel="构一"></el-option>
-          <el-option value="构二" laabel="构二"></el-option>
-          <el-option value="构三" laabel="构三"></el-option>
-          <el-option value="构四" laabel="构四"></el-option>
-          <el-option value="构五" laabel="构五"></el-option>
-          <el-option value="构六" laabel="构六"></el-option>
-          <el-option value="构七" laabel="构七"></el-option>
-          <el-option value="构八" laabel="构八"></el-option>
-          <el-option value="8200#空调制冷区" laabel="8200#空调制冷区"></el-option>
-          <el-option value="8500#污水处理区" laabel="8500#污水处理区"></el-option>
-          <el-option value="8900#火炬区" laabel="8900#火炬区"></el-option>
-          <el-option value="9000#罐区" laabel="9000#罐区"></el-option>
+        <el-select  v-model="queryParams.area" @change="handleQuery" placeholder="请选择区域" clearable>
+          <el-option value="第一萃取精馏单元" laabel="第一萃取精馏单元"></el-option>
+          <el-option value="第二萃取精馏单元" laabel="第二萃取精馏单元"></el-option>
+          <el-option value="丁二烯精馏单元" laabel="丁二烯精馏单元"></el-option>
+          <el-option value="溶剂精制单元" laabel="溶剂精制单元"></el-option>
+          <el-option value="辅助单元" laabel="辅助单元"></el-option>
+          <el-option value="公用工程单元" laabel="公用工程单元"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="提出日期" prop="identifiedDateStr">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.identifiedDateStr"
-                        type="year"
-                        @change="handleQuery"
-                        value-format="yyyy"
-                        placeholder="选择提出日期">
+      <el-form-item label="提出日期" prop="queryDate">
+        <el-date-picker
+          v-model="queryDate"
+          type="daterange"
+          align="right"
+          value-format="yyyy-MM-dd"
+          @change="handleQuery"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
         </el-date-picker>
       </el-form-item>
       <el-form-item label="当前状态" prop="currentStates">
@@ -33,6 +31,15 @@
           <el-option value="未完成" laabel="未完成"></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="问题类别" prop="issueClass">
+        <el-select  v-model="queryParams.issueClass"  placeholder="请选择问题来源"  @change="handleQuery" clearable >
+          <el-option value="工艺" laabel="工艺"></el-option>
+          <el-option value="仪表" laabel="仪表"></el-option>
+          <el-option value="维修" laabel="维修"></el-option>
+          <el-option value="电气" laabel="电气"></el-option>
+          <el-option value="其他" laabel="其他"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item label="识别出的问题" prop="issueIdentified" label-width="120">
         <el-input
           v-model="queryParams.issueIdentified"
@@ -125,7 +132,7 @@
       <el-table-column label="要采取的措施" align="center" prop="actionsTaken" :show-overflow-tooltip="true"
                        width="150"/>
       <el-table-column label="问题类别" align="center" prop="issueClass" :show-overflow-tooltip="true" width="150"/>
-      <el-table-column label="负责部门" align="center" prop="responsibleUnit" :show-overflow-tooltip="true"
+      <el-table-column label="负责部门" align="center" prop="responsibleUnitName" :show-overflow-tooltip="true"
                        width="150"/>
       <el-table-column label="负责人员" align="center" prop="responsiblePerson" :show-overflow-tooltip="true"
                        width="150"/>
@@ -183,19 +190,12 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="180px">
         <el-form-item label="区域" prop="area">
           <el-select  v-model="form.area" placeholder="请选择区域" clearable style="width: 100%">
-            <el-option value="装置主管廊区" laabel="装置主管廊区"></el-option>
-            <el-option value="构一" laabel="构一"></el-option>
-            <el-option value="构二" laabel="构二"></el-option>
-            <el-option value="构三" laabel="构三"></el-option>
-            <el-option value="构四" laabel="构四"></el-option>
-            <el-option value="构五" laabel="构五"></el-option>
-            <el-option value="构六" laabel="构六"></el-option>
-            <el-option value="构七" laabel="构七"></el-option>
-            <el-option value="构八" laabel="构八"></el-option>
-            <el-option value="8200#空调制冷区" laabel="8200#空调制冷区"></el-option>
-            <el-option value="8500#污水处理区" laabel="8500#污水处理区"></el-option>
-            <el-option value="8900#火炬区" laabel="8900#火炬区"></el-option>
-            <el-option value="9000#罐区" laabel="9000#罐区"></el-option>
+            <el-option value="第一萃取精馏单元" laabel="第一萃取精馏单元"></el-option>
+            <el-option value="第二萃取精馏单元" laabel="第二萃取精馏单元"></el-option>
+            <el-option value="丁二烯精馏单元" laabel="丁二烯精馏单元"></el-option>
+            <el-option value="溶剂精制单元" laabel="溶剂精制单元"></el-option>
+            <el-option value="辅助单元" laabel="辅助单元"></el-option>
+            <el-option value="公用工程单元" laabel="公用工程单元"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="提出日期" prop="identifiedDate">
@@ -222,14 +222,15 @@
         </el-form-item>
         <el-form-item label="问题类别" prop="issueClass">
           <el-select  v-model="form.issueClass"  placeholder="请选择问题来源" clearable style="width: 100%">
-            <el-option value="设备" laabel="设备"></el-option>
-            <el-option value="电仪" laabel="电仪"></el-option>
-            <el-option value="安全措施" laabel="安全措施"></el-option>
+            <el-option value="工艺" laabel="工艺"></el-option>
+            <el-option value="仪表" laabel="仪表"></el-option>
+            <el-option value="维修" laabel="维修"></el-option>
+            <el-option value="电气" laabel="电气"></el-option>
             <el-option value="其他" laabel="其他"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="负责部门 " prop="responsibleUnit">
-          <el-input v-model="form.responsibleUnit" placeholder="请输入负责人员"/>
+          <treeselect v-model="form.responsibleUnit" :options="allDeptOptions" :show-count="true" placeholder="请选择负责部门" />
         </el-form-item>
         <el-form-item label="负责人员" prop="responsiblePerson">
           <el-input v-model="form.responsiblePerson" placeholder="请输入负责人员"/>
@@ -388,6 +389,7 @@ import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
+import {alltreeselect} from "../../../api/system/dept";
 
 export default {
   name: "IssuelistEBSM",
@@ -398,6 +400,34 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      queryDate:[],
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -412,6 +442,7 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
+      allDeptOptions: [],
       clientHeight: 300,
       // 是否显示弹出层
       open: false,
@@ -474,7 +505,9 @@ export default {
         plant: 'EBSM',
         area: null,
         identifiedDate: null,
-        identifiedDateStr: new Date().getFullYear().toString(),
+        startDate: null,
+        endDate: null,
+        identifiedDateStr: null,
         issueSource: null,
         issueIdentified: null,
         actionsTaken: null,
@@ -541,6 +574,7 @@ export default {
     })
     this.getList();
     this.getTreeselect();
+    this.getAllDeptList();
   },
   methods: {
     /** 查询装置问题滚动清单列表 */
@@ -558,6 +592,11 @@ export default {
         this.deptOptions = response.data;
       });
     },
+    getAllDeptList(){
+      alltreeselect().then(response => {
+        this.allDeptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -592,11 +631,18 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      if (this.queryDate.length>0){
+        this.queryParams.startDate = this.queryDate[0];
+        this.queryParams.endDate = this.queryDate[1];
+      }
       this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryDate=[];
+      this.queryParams.startDate = null;
+      this.queryParams.endDate = null;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -800,6 +846,6 @@ export default {
   background: #ffff00 ;
 }
 .el-table .danger-row {
-  background: #ff0000 ;
+  background: #ff7474;
 }
 </style>

+ 86 - 26
ui/src/views/issue/issuelist/ib.vue

@@ -3,21 +3,26 @@
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="区域" prop="area">
         <el-select  v-model="queryParams.area" @change="handleQuery" placeholder="请选择区域" clearable>
-          <el-option value="醚合成单元" laabel="醚合成单元"></el-option>
-          <el-option value="抽余液2分离单元" laabel="抽余液2分离单元"></el-option>
-          <el-option value="抽余液2净化单元" laabel="抽余液2净化单元"></el-option>
-          <el-option value="醚裂化单元" laabel="醚裂化单元"></el-option>
-          <el-option value="异丁烯分离单元" laabel="异丁烯分离单元"></el-option>
-          <el-option value="副产品分离单元" laabel="副产品分离单元"></el-option>
+          <el-option value="第一萃取精馏单元" laabel="第一萃取精馏单元"></el-option>
+          <el-option value="第二萃取精馏单元" laabel="第二萃取精馏单元"></el-option>
+          <el-option value="丁二烯精馏单元" laabel="丁二烯精馏单元"></el-option>
+          <el-option value="溶剂精制单元" laabel="溶剂精制单元"></el-option>
+          <el-option value="辅助单元" laabel="辅助单元"></el-option>
+          <el-option value="公用工程单元" laabel="公用工程单元"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="提出日期" prop="identifiedDateStr">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.identifiedDateStr"
-                        type="year"
-                        @change="handleQuery"
-                        value-format="yyyy"
-                        placeholder="选择提出日期">
+      <el-form-item label="提出日期" prop="queryDate">
+        <el-date-picker
+          v-model="queryDate"
+          type="daterange"
+          align="right"
+          value-format="yyyy-MM-dd"
+          @change="handleQuery"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
         </el-date-picker>
       </el-form-item>
       <el-form-item label="当前状态" prop="currentStates">
@@ -26,6 +31,15 @@
           <el-option value="未完成" laabel="未完成"></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="问题类别" prop="issueClass">
+        <el-select  v-model="queryParams.issueClass"  placeholder="请选择问题来源"  @change="handleQuery" clearable >
+          <el-option value="工艺" laabel="工艺"></el-option>
+          <el-option value="仪表" laabel="仪表"></el-option>
+          <el-option value="维修" laabel="维修"></el-option>
+          <el-option value="电气" laabel="电气"></el-option>
+          <el-option value="其他" laabel="其他"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item label="识别出的问题" prop="issueIdentified" label-width="120">
         <el-input
           v-model="queryParams.issueIdentified"
@@ -118,7 +132,7 @@
       <el-table-column label="要采取的措施" align="center" prop="actionsTaken" :show-overflow-tooltip="true"
                        width="150"/>
       <el-table-column label="问题类别" align="center" prop="issueClass" :show-overflow-tooltip="true" width="150"/>
-      <el-table-column label="负责部门" align="center" prop="responsibleUnit" :show-overflow-tooltip="true"
+      <el-table-column label="负责部门" align="center" prop="responsibleUnitName" :show-overflow-tooltip="true"
                        width="150"/>
       <el-table-column label="负责人员" align="center" prop="responsiblePerson" :show-overflow-tooltip="true"
                        width="150"/>
@@ -176,12 +190,12 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="180px">
         <el-form-item label="区域" prop="area">
           <el-select  v-model="form.area" placeholder="请选择区域" clearable style="width: 100%">
-            <el-option value="醚合成单元" laabel="醚合成单元"></el-option>
-            <el-option value="抽余液2分离单元" laabel="抽余液2分离单元"></el-option>
-            <el-option value="抽余液2净化单元" laabel="抽余液2净化单元"></el-option>
-            <el-option value="醚裂化单元" laabel="醚裂化单元"></el-option>
-            <el-option value="异丁烯分离单元" laabel="异丁烯分离单元"></el-option>
-            <el-option value="副产品分离单元" laabel="副产品分离单元"></el-option>
+            <el-option value="第一萃取精馏单元" laabel="第一萃取精馏单元"></el-option>
+            <el-option value="第二萃取精馏单元" laabel="第二萃取精馏单元"></el-option>
+            <el-option value="丁二烯精馏单元" laabel="丁二烯精馏单元"></el-option>
+            <el-option value="溶剂精制单元" laabel="溶剂精制单元"></el-option>
+            <el-option value="辅助单元" laabel="辅助单元"></el-option>
+            <el-option value="公用工程单元" laabel="公用工程单元"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="提出日期" prop="identifiedDate">
@@ -208,14 +222,15 @@
         </el-form-item>
         <el-form-item label="问题类别" prop="issueClass">
           <el-select  v-model="form.issueClass"  placeholder="请选择问题来源" clearable style="width: 100%">
-            <el-option value="设备" laabel="设备"></el-option>
-            <el-option value="电仪" laabel="电仪"></el-option>
-            <el-option value="安全措施" laabel="安全措施"></el-option>
+            <el-option value="工艺" laabel="工艺"></el-option>
+            <el-option value="仪表" laabel="仪表"></el-option>
+            <el-option value="维修" laabel="维修"></el-option>
+            <el-option value="电气" laabel="电气"></el-option>
             <el-option value="其他" laabel="其他"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="负责部门 " prop="responsibleUnit">
-          <el-input v-model="form.responsibleUnit" placeholder="请输入负责人员"/>
+          <treeselect v-model="form.responsibleUnit" :options="allDeptOptions" :show-count="true" placeholder="请选择负责部门" />
         </el-form-item>
         <el-form-item label="负责人员" prop="responsiblePerson">
           <el-input v-model="form.responsiblePerson" placeholder="请输入负责人员"/>
@@ -374,6 +389,7 @@ import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
+import {alltreeselect} from "../../../api/system/dept";
 
 export default {
   name: "IssuelistIB",
@@ -384,6 +400,34 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      queryDate:[],
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -398,6 +442,7 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
+      allDeptOptions: [],
       clientHeight: 300,
       // 是否显示弹出层
       open: false,
@@ -460,7 +505,9 @@ export default {
         plant: 'IB',
         area: null,
         identifiedDate: null,
-        identifiedDateStr: new Date().getFullYear().toString(),
+        startDate: null,
+        endDate: null,
+        identifiedDateStr: null,
         issueSource: null,
         issueIdentified: null,
         actionsTaken: null,
@@ -527,6 +574,7 @@ export default {
     })
     this.getList();
     this.getTreeselect();
+    this.getAllDeptList();
   },
   methods: {
     /** 查询装置问题滚动清单列表 */
@@ -544,6 +592,11 @@ export default {
         this.deptOptions = response.data;
       });
     },
+    getAllDeptList(){
+      alltreeselect().then(response => {
+        this.allDeptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -578,11 +631,18 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      if (this.queryDate.length>0){
+        this.queryParams.startDate = this.queryDate[0];
+        this.queryParams.endDate = this.queryDate[1];
+      }
       this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryDate=[];
+      this.queryParams.startDate = null;
+      this.queryParams.endDate = null;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -786,6 +846,6 @@ export default {
   background: #ffff00 ;
 }
 .el-table .danger-row {
-  background: #ff0000 ;
+  background: #ff7474;
 }
 </style>

+ 75 - 8
ui/src/views/issue/operationlist/bd.vue

@@ -1,15 +1,39 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="时间" prop="identifiedDateStr">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.identifiedDateStr"
-                        type="year"
-                        @change="handleQuery"
-                        value-format="yyyy"
-                        placeholder="选择提出日期">
+      <el-form-item label="时间" prop="queryDate">
+        <el-date-picker
+          v-model="queryDate"
+          type="daterange"
+          align="right"
+          value-format="yyyy-MM-dd"
+          unlink-panels
+          @change="handleQuery"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
         </el-date-picker>
       </el-form-item>
+      <el-form-item label="班组" prop="shiftClass">
+        <el-select v-model="queryParams.shiftClass" placeholder="请选择班组"
+                   @change="handleQuery" clearable style="width: 100%">
+          <el-option value="A" laabel="A"></el-option>
+          <el-option value="B" laabel="B"></el-option>
+          <el-option value="C" laabel="C"></el-option>
+          <el-option value="D" laabel="D"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="事件分类" prop="incidentType">
+        <el-select v-model="queryParams.incidentType"
+                   @change="handleQuery" placeholder="请选择事件分类" clearable style="width: 100%">
+          <el-option value="工艺" laabel="工艺"></el-option>
+          <el-option value="仪表" laabel="仪表"></el-option>
+          <el-option value="维修" laabel="维修"></el-option>
+          <el-option value="电气" laabel="电气"></el-option>
+          <el-option value="其他" laabel="其他"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item label="事件描述" prop="incidentDescription">
         <el-input
           v-model="queryParams.incidentDescription"
@@ -85,7 +109,11 @@
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column type="index" label="序号"  width="55" align="center" :index="indexMethod"/>
-      <el-table-column label="时间" align="center" prop="identifiedDate" :show-overflow-tooltip="true"/>
+      <el-table-column label="时间" align="center" prop="identifiedDate" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.identifiedDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="班组" align="center" prop="shiftClass" :show-overflow-tooltip="true"/>
       <el-table-column label="事件分类" align="center" prop="incidentType" :show-overflow-tooltip="true"/>
       <el-table-column label="事件描述" align="center" prop="incidentDescription" :show-overflow-tooltip="true"/>
@@ -153,6 +181,8 @@
           <el-select v-model="form.incidentType" placeholder="请选择事件分类" clearable style="width: 100%">
             <el-option value="工艺" laabel="工艺"></el-option>
             <el-option value="仪表" laabel="仪表"></el-option>
+            <el-option value="维修" laabel="维修"></el-option>
+            <el-option value="电气" laabel="电气"></el-option>
             <el-option value="其他" laabel="其他"></el-option>
           </el-select>
         </el-form-item>
@@ -306,6 +336,34 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      queryDate:[],
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -383,6 +441,8 @@ export default {
         shiftClass: null,
         incidentDescription: null,
         causeRes: null,
+        startDate: null,
+        endDate: null,
         identifiedDate: null,
         identifiedDateStr: null,
         incidentType: null,
@@ -477,11 +537,18 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      if (this.queryDate.length>0){
+        this.queryParams.startDate = this.queryDate[0];
+        this.queryParams.endDate = this.queryDate[1];
+      }
       this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryDate=[];
+      this.queryParams.startDate = null;
+      this.queryParams.endDate = null;
       this.resetForm("queryForm");
       this.handleQuery();
     },

+ 75 - 8
ui/src/views/issue/operationlist/ebsm.vue

@@ -1,15 +1,39 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="时间" prop="identifiedDateStr">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.identifiedDateStr"
-                        type="year"
-                        @change="handleQuery"
-                        value-format="yyyy"
-                        placeholder="选择提出日期">
+      <el-form-item label="时间" prop="queryDate">
+        <el-date-picker
+          v-model="queryDate"
+          type="daterange"
+          align="right"
+          value-format="yyyy-MM-dd"
+          @change="handleQuery"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
         </el-date-picker>
       </el-form-item>
+      <el-form-item label="班组" prop="shiftClass">
+        <el-select v-model="queryParams.shiftClass" placeholder="请选择班组"
+                   @change="handleQuery" clearable style="width: 100%">
+          <el-option value="A" laabel="A"></el-option>
+          <el-option value="B" laabel="B"></el-option>
+          <el-option value="C" laabel="C"></el-option>
+          <el-option value="D" laabel="D"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="事件分类" prop="incidentType">
+        <el-select v-model="queryParams.incidentType"
+                   @change="handleQuery" placeholder="请选择事件分类" clearable style="width: 100%">
+          <el-option value="工艺" laabel="工艺"></el-option>
+          <el-option value="仪表" laabel="仪表"></el-option>
+          <el-option value="维修" laabel="维修"></el-option>
+          <el-option value="电气" laabel="电气"></el-option>
+          <el-option value="其他" laabel="其他"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item label="事件描述" prop="incidentDescription">
         <el-input
           v-model="queryParams.incidentDescription"
@@ -85,7 +109,11 @@
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column type="index" label="序号"  width="55" align="center" :index="indexMethod"/>
-      <el-table-column label="时间" align="center" prop="identifiedDate" :show-overflow-tooltip="true"/>
+      <el-table-column label="时间" align="center" prop="identifiedDate" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.identifiedDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="班组" align="center" prop="shiftClass" :show-overflow-tooltip="true"/>
       <el-table-column label="事件分类" align="center" prop="incidentType" :show-overflow-tooltip="true"/>
       <el-table-column label="事件描述" align="center" prop="incidentDescription" :show-overflow-tooltip="true"/>
@@ -153,6 +181,8 @@
           <el-select v-model="form.incidentType" placeholder="请选择事件分类" clearable style="width: 100%">
             <el-option value="工艺" laabel="工艺"></el-option>
             <el-option value="仪表" laabel="仪表"></el-option>
+            <el-option value="维修" laabel="维修"></el-option>
+            <el-option value="电气" laabel="电气"></el-option>
             <el-option value="其他" laabel="其他"></el-option>
           </el-select>
         </el-form-item>
@@ -306,6 +336,34 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      queryDate:[],
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -383,6 +441,8 @@ export default {
         shiftClass: null,
         incidentDescription: null,
         causeRes: null,
+        startDate: null,
+        endDate: null,
         identifiedDate: null,
         identifiedDateStr: null,
         incidentType: null,
@@ -477,11 +537,18 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      if (this.queryDate.length>0){
+        this.queryParams.startDate = this.queryDate[0];
+        this.queryParams.endDate = this.queryDate[1];
+      }
       this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryDate=[];
+      this.queryParams.startDate = null;
+      this.queryParams.endDate = null;
       this.resetForm("queryForm");
       this.handleQuery();
     },

+ 76 - 9
ui/src/views/issue/operationlist/ib.vue

@@ -1,15 +1,39 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="时间" prop="identifiedDateStr">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.identifiedDateStr"
-                        type="year"
-                        @change="handleQuery"
-                        value-format="yyyy"
-                        placeholder="选择提出日期">
+      <el-form-item label="时间" prop="queryDate">
+        <el-date-picker
+          v-model="queryDate"
+          type="daterange"
+          align="right"
+          value-format="yyyy-MM-dd"
+          @change="handleQuery"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
         </el-date-picker>
       </el-form-item>
+      <el-form-item label="班组" prop="shiftClass">
+        <el-select v-model="queryParams.shiftClass" placeholder="请选择班组"
+                   @change="handleQuery" clearable style="width: 100%">
+          <el-option value="A" laabel="A"></el-option>
+          <el-option value="B" laabel="B"></el-option>
+          <el-option value="C" laabel="C"></el-option>
+          <el-option value="D" laabel="D"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="事件分类" prop="incidentType">
+        <el-select v-model="queryParams.incidentType"
+                   @change="handleQuery" placeholder="请选择事件分类" clearable style="width: 100%">
+          <el-option value="工艺" laabel="工艺"></el-option>
+          <el-option value="仪表" laabel="仪表"></el-option>
+          <el-option value="维修" laabel="维修"></el-option>
+          <el-option value="电气" laabel="电气"></el-option>
+          <el-option value="其他" laabel="其他"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item label="事件描述" prop="incidentDescription">
         <el-input
           v-model="queryParams.incidentDescription"
@@ -85,7 +109,11 @@
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column type="index" label="序号"  width="55" align="center" :index="indexMethod"/>
-      <el-table-column label="时间" align="center" prop="identifiedDate" :show-overflow-tooltip="true"/>
+      <el-table-column label="时间" align="center" prop="identifiedDate" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.identifiedDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="班组" align="center" prop="shiftClass" :show-overflow-tooltip="true"/>
       <el-table-column label="事件分类" align="center" prop="incidentType" :show-overflow-tooltip="true"/>
       <el-table-column label="事件描述" align="center" prop="incidentDescription" :show-overflow-tooltip="true"/>
@@ -153,6 +181,8 @@
           <el-select v-model="form.incidentType" placeholder="请选择事件分类" clearable style="width: 100%">
             <el-option value="工艺" laabel="工艺"></el-option>
             <el-option value="仪表" laabel="仪表"></el-option>
+            <el-option value="维修" laabel="维修"></el-option>
+            <el-option value="电气" laabel="电气"></el-option>
             <el-option value="其他" laabel="其他"></el-option>
           </el-select>
         </el-form-item>
@@ -306,6 +336,34 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      queryDate:[],
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -383,6 +441,8 @@ export default {
         shiftClass: null,
         incidentDescription: null,
         causeRes: null,
+        startDate: null,
+        endDate: null,
         identifiedDate: null,
         identifiedDateStr: null,
         incidentType: null,
@@ -447,7 +507,7 @@ export default {
     getTreeselect() {
       treeselect().then(response => {
         this.deptOptions = response.data;
-      });z
+      });
     },
     // 取消按钮
     cancel() {
@@ -477,11 +537,18 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      if (this.queryDate.length>0){
+        this.queryParams.startDate = this.queryDate[0];
+        this.queryParams.endDate = this.queryDate[1];
+      }
       this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryDate=[];
+      this.queryParams.startDate = null;
+      this.queryParams.endDate = null;
       this.resetForm("queryForm");
       this.handleQuery();
     },