licailing 4 лет назад
Родитель
Сommit
7970acd5d0

+ 8 - 0
src/main/java/com/izouma/wenlvju/domain/performance/Performance.java

@@ -25,9 +25,15 @@ public class Performance extends BaseEntity {
     @ApiModelProperty(value = "名称")
     private String name;
 
+    @ApiModelProperty(value = "报名开始时间")
+    private LocalDate startDate;
+
     @ApiModelProperty(value = "报名截止时间")
     private LocalDate endDate;
 
+    @ApiModelProperty(value = "展演形式")
+    private boolean online;
+
     @Column(columnDefinition = "TEXT")
     @Convert(converter = PerformanceEnquiryListConverter.class)
     @ApiModelProperty(value = "咨询电话")
@@ -41,4 +47,6 @@ public class Performance extends BaseEntity {
      */
     @ApiModelProperty(value = "活动方案")
     private String programme;
+
+    private String codeImg;
 }

+ 31 - 0
src/main/java/com/izouma/wenlvju/domain/performance/PerformanceSchedule.java

@@ -0,0 +1,31 @@
+package com.izouma.wenlvju.domain.performance;
+
+import com.izouma.wenlvju.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Entity;
+import java.time.LocalDate;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@Where(clause = "del = 0")
+@ApiModel(value = "活动安排")
+public class PerformanceSchedule extends BaseEntity {
+    private Long performanceId;
+
+    @ApiModelProperty(value = "内容")
+    private String content;
+
+    private LocalDate date;
+
+    private String address;
+}

+ 2 - 1
src/main/java/com/izouma/wenlvju/domain/regulation/Complain.java

@@ -62,7 +62,7 @@ public class Complain extends BaseEntity {
     private UnitType unitType;
 
     @ApiModelProperty(value = "单位名称")
-    private String unitName;
+    private Long unitName;
 
     @Convert(converter = StringArrayConverter.class)
     @Column(columnDefinition = "TEXT")
@@ -89,4 +89,5 @@ public class Complain extends BaseEntity {
 
     @ApiModelProperty(value = "办结")
     private boolean finish;
+
 }

+ 16 - 12
src/main/java/com/izouma/wenlvju/dto/RecordDTO.java

@@ -7,6 +7,7 @@ import com.alibaba.excel.metadata.BaseRowModel;
 import com.izouma.wenlvju.domain.Record;
 import com.izouma.wenlvju.domain.RecordExpert;
 import com.izouma.wenlvju.domain.RecordSpecialty;
+import com.izouma.wenlvju.utils.excel.BooleanConverter;
 import com.izouma.wenlvju.utils.excel.LocalDateConverter;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -21,7 +22,7 @@ import java.time.LocalDate;
 @Builder
 @AllArgsConstructor
 @NoArgsConstructor
-@ApiModel(value = "备案管理")
+@ApiModel(value = "Record Management")
 public class RecordDTO extends BaseRowModel {
     @ExcelProperty(value = "备案序号", index = 0)
     private long no;
@@ -80,39 +81,41 @@ public class RecordDTO extends BaseRowModel {
     @ExcelProperty(value = "考试简章", index = 18)
     private String examinationGuide;
 
+    @ExcelProperty(value = "考级专业序号", index = 19)
     private Long sno;
 
-    @ExcelProperty(value = "考级专业名称", index = 19)
+    @ExcelProperty(value = "考级专业名称", index = 20)
     private String name;
 
-    @ExcelProperty(value = "考级专业代码", index = 20)
+    @ExcelProperty(value = "考级专业代码", index = 21)
     private String code;
 
-    @ExcelProperty(value = "考级专业总级数", index = 21)
+    @ExcelProperty(value = "考级专业总级数", index = 22)
     private String level;
 
-    @ExcelProperty(value = "考级专业考场数量", index = 22)
+    @ExcelProperty(value = "考级专业考场数量", index = 23)
     private int numOfExam;
 
-    @ExcelProperty(value = "考级专业考官人数", index = 23)
+    @ExcelProperty(value = "考级专业考官人数", index = 24)
     private int speExaQuantity;
 
 
-    @ExcelProperty(value = "考官姓名", index = 24)
+    @ExcelProperty(value = "考官姓名", index = 25)
     private String expertName;
 
+    @ExcelProperty(value = "考官性别", index = 26)
     private String sex;
 
-    @ApiModelProperty(value = "证件号码")
+    @ExcelProperty(value = "证件号码", index = 27)
     private String idNo;
 
-    @ApiModelProperty(value = "是否外聘")
-    private boolean external;
+    @ExcelProperty(value = "是否外聘", index = 28, converter = BooleanConverter.class)
+    private Boolean external;
 
-    @ApiModelProperty(value = "职称")
+    @ExcelProperty(value = "职称", index = 29)
     private String position;
 
-    public RecordDTO(Record record, RecordSpecialty specialty, RecordExpert expert, long no) {
+    public RecordDTO(Record record, RecordSpecialty specialty, RecordExpert expert, long no, Long sno) {
         BeanUtil.copyProperties(record, this);
         this.examinerQuantity = record.getExaminerQuantity();
 
@@ -126,5 +129,6 @@ public class RecordDTO extends BaseRowModel {
             this.expertName = expert.getName();
         }
         this.no = no;
+        this.sno = sno;
     }
 }

+ 16 - 0
src/main/java/com/izouma/wenlvju/repo/performance/PerformanceScheduleRepo.java

@@ -0,0 +1,16 @@
+package com.izouma.wenlvju.repo.performance;
+
+import com.izouma.wenlvju.domain.performance.PerformanceSchedule;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+
+import javax.transaction.Transactional;
+
+public interface PerformanceScheduleRepo extends JpaRepository<PerformanceSchedule, Long>, JpaSpecificationExecutor<PerformanceSchedule> {
+    @Query("update PerformanceSchedule t set t.del = true where t.id = ?1")
+    @Modifying
+    @Transactional
+    void softDelete(Long id);
+}

+ 22 - 10
src/main/java/com/izouma/wenlvju/service/RecordService.java

@@ -109,12 +109,17 @@ public class RecordService {
         for (Record record : data) {
             List<RecordSpecialty> specialtyList = listMap.get(record.getId());
             if (CollUtil.isEmpty(specialtyList)) {
-                dtos.add(new RecordDTO(record, null, null, no));
+                dtos.add(new RecordDTO(record, null, null, no, null));
             } else {
                 long finalNo = no;
+                long sno = no * 100;
                 specialtyList.forEach(specialty -> {
                     List<RecordExpert> experts = recordExpertRepo.findAllByRecordSpecialtyId(specialty.getId());
-                    experts.forEach(expert -> dtos.add(new RecordDTO(record, specialty, expert, finalNo)));
+                    if (CollUtil.isEmpty(experts)) {
+                        dtos.add(new RecordDTO(record, specialty, null, finalNo, null));
+                    } else {
+                        experts.forEach(expert -> dtos.add(new RecordDTO(record, specialty, expert, finalNo, sno + 1)));
+                    }
                 });
             }
             no = no + 1;
@@ -141,9 +146,11 @@ public class RecordService {
         List<RecordDTO> dtos =
                 ExcelUtils.readExcel(indicatorStream, RecordDTO.class, 1, 1);
 
-        List<RecordSpecialty> specialties = new ArrayList<>();
+        List<RecordExpert> experts = new ArrayList<>();
         long no = 0;
+        long sno = 0;
         Long recordId = null;
+        Long specialtyId = null;
         for (RecordDTO dto : dtos) {
             if (no != dto.getNo()) {
                 Record record = new Record();
@@ -153,18 +160,23 @@ public class RecordService {
                 no = dto.getNo();
             }
 
+            if (sno != dto.getSno()) {
+                RecordSpecialty specialty = new RecordSpecialty();
+                BeanUtil.copyProperties(dto, specialty);
+                specialty.setRecordId(recordId);
+                specialty.setExaminerQuantity(dto.getSpeExaQuantity());
+                specialty = recordSpecialtyRepo.save(specialty);
+                specialtyId = specialty.getId();
+            }
 
-            RecordSpecialty specialty = new RecordSpecialty();
-            BeanUtil.copyProperties(dto, specialty);
-            specialty.setRecordId(recordId);
-            specialty.setExaminerQuantity(dto.getSpeExaQuantity());
-            specialties.add(specialty);
 
             RecordExpert expert = new RecordExpert();
-            BeanUtil.copyProperties(dto,expert);
+            BeanUtil.copyProperties(dto, expert);
             expert.setName(dto.getExpertName());
+            expert.setRecordSpecialtyId(specialtyId);
+            experts.add(expert);
         }
-        recordSpecialtyRepo.saveAll(specialties);
+        recordExpertRepo.saveAll(experts);
 
     }
 

+ 20 - 0
src/main/java/com/izouma/wenlvju/service/performance/PerformanceScheduleService.java

@@ -0,0 +1,20 @@
+package com.izouma.wenlvju.service.performance;
+
+import com.izouma.wenlvju.domain.performance.PerformanceSchedule;
+import com.izouma.wenlvju.dto.PageQuery;
+import com.izouma.wenlvju.repo.performance.PerformanceScheduleRepo;
+import com.izouma.wenlvju.utils.JpaUtils;
+import lombok.AllArgsConstructor;
+import org.springframework.data.domain.Page;
+import org.springframework.stereotype.Service;
+
+@Service
+@AllArgsConstructor
+public class PerformanceScheduleService {
+
+    private PerformanceScheduleRepo performanceScheduleRepo;
+
+    public Page<PerformanceSchedule> all(PageQuery pageQuery) {
+        return performanceScheduleRepo.findAll(JpaUtils.toSpecification(pageQuery, PerformanceSchedule.class), JpaUtils.toPageRequest(pageQuery));
+    }
+}

+ 39 - 0
src/main/java/com/izouma/wenlvju/utils/excel/BooleanConverter.java

@@ -0,0 +1,39 @@
+package com.izouma.wenlvju.utils.excel;
+
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.CellData;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+
+public class BooleanConverter implements Converter<Boolean> {
+    @Override
+    public Class supportJavaTypeKey() {
+        return Boolean.class;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey() {
+        return CellDataTypeEnum.STRING;
+    }
+
+    @Override
+    public Boolean convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
+        String stringValue = cellData.getStringValue();
+        if ("是".equals(stringValue)) {
+            stringValue = "TRUE";
+        } else if ("否".equals(stringValue)) {
+            stringValue = "FALSE";
+        }
+        return Boolean.valueOf(stringValue);
+    }
+
+    @Override
+    public CellData convertToExcelData(Boolean booleanValue, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
+        String str = "";
+        if (booleanValue != null) {
+            str = booleanValue ? "是" : "否";
+        }
+        return new CellData(str);
+    }
+}

+ 6 - 5
src/main/java/com/izouma/wenlvju/utils/excel/ExcelUtils.java

@@ -21,13 +21,14 @@ public class ExcelUtils<T> {
         String fileName = "data.xlsx";
         if (data != null && !data.isEmpty()) {
             fileName = data.get(0).getClass().getSimpleName() + ".xlsx";
-        }
-        ApiModel apiModel = data.get(0).getClass().getAnnotation(ApiModel.class);
-        if (apiModel != null) {
-            if (StringUtils.isNotEmpty(apiModel.value())) {
-                fileName = apiModel.value() + ".xlsx";
+            ApiModel apiModel = data.get(0).getClass().getAnnotation(ApiModel.class);
+            if (apiModel != null) {
+                if (StringUtils.isNotEmpty(apiModel.value())) {
+                    fileName = apiModel.value() + ".xlsx";
+                }
             }
         }
+
         response.setContentType("application/vnd.ms-excel");
         response.setCharacterEncoding("utf-8");
         response.setHeader("Content-Disposition", "attachment;filename=" + fileName);

+ 63 - 0
src/main/java/com/izouma/wenlvju/web/performance/PerformanceScheduleController.java

@@ -0,0 +1,63 @@
+package com.izouma.wenlvju.web.performance;
+
+import com.izouma.wenlvju.web.BaseController;
+import com.izouma.wenlvju.domain.performance.PerformanceSchedule;
+import com.izouma.wenlvju.service.performance.PerformanceScheduleService;
+import com.izouma.wenlvju.dto.PageQuery;
+import com.izouma.wenlvju.exception.BusinessException;
+import com.izouma.wenlvju.repo.performance.PerformanceScheduleRepo;
+import com.izouma.wenlvju.utils.ObjUtils;
+import com.izouma.wenlvju.utils.excel.ExcelUtils;
+
+import lombok.AllArgsConstructor;
+import org.springframework.data.domain.Page;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+@RestController
+@RequestMapping("/performanceSchedule")
+@AllArgsConstructor
+public class PerformanceScheduleController extends BaseController {
+    private PerformanceScheduleService performanceScheduleService;
+    private PerformanceScheduleRepo performanceScheduleRepo;
+
+    //@PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/save")
+    public PerformanceSchedule save(@RequestBody PerformanceSchedule record) {
+        if (record.getId() != null) {
+            PerformanceSchedule orig = performanceScheduleRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
+            ObjUtils.merge(orig, record);
+            return performanceScheduleRepo.save(orig);
+        }
+        return performanceScheduleRepo.save(record);
+    }
+
+
+    //@PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/all")
+    public Page<PerformanceSchedule> all(@RequestBody PageQuery pageQuery) {
+        return performanceScheduleService.all(pageQuery);
+    }
+
+    @GetMapping("/get/{id}")
+    public PerformanceSchedule get(@PathVariable Long id) {
+        return performanceScheduleRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+    }
+
+    @PostMapping("/del/{id}")
+    public void del(@PathVariable Long id) {
+        performanceScheduleRepo.softDelete(id);
+    }
+
+    @GetMapping("/excel")
+    @ResponseBody
+    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
+        List<PerformanceSchedule> data = all(pageQuery).getContent();
+        ExcelUtils.export(response, data);
+    }
+}
+

+ 4 - 4
src/main/java/com/izouma/wenlvju/web/regulation/ComplainController.java

@@ -1,17 +1,16 @@
 package com.izouma.wenlvju.web.regulation;
 
-import com.izouma.wenlvju.web.BaseController;
 import com.izouma.wenlvju.domain.regulation.Complain;
-import com.izouma.wenlvju.service.regulation.ComplainService;
 import com.izouma.wenlvju.dto.PageQuery;
 import com.izouma.wenlvju.exception.BusinessException;
 import com.izouma.wenlvju.repo.regulation.ComplainRepo;
+import com.izouma.wenlvju.service.regulation.ComplainService;
 import com.izouma.wenlvju.utils.ObjUtils;
+import com.izouma.wenlvju.utils.SecurityUtils;
 import com.izouma.wenlvju.utils.excel.ExcelUtils;
-
+import com.izouma.wenlvju.web.BaseController;
 import lombok.AllArgsConstructor;
 import org.springframework.data.domain.Page;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
@@ -33,6 +32,7 @@ public class ComplainController extends BaseController {
             ObjUtils.merge(orig, record);
             return complainRepo.save(orig);
         }
+        record.setUserId(SecurityUtils.getAuthenticatedUser().getId());
         return complainRepo.save(record);
     }
 

+ 1 - 0
src/main/resources/genjson/PerformanceSchedule.json

@@ -0,0 +1 @@
+{"tableName":"PerformanceSchedule","className":"PerformanceSchedule","remark":"活动安排","genTable":true,"genClass":true,"genList":false,"genForm":false,"genRouter":false,"javaPath":"/Users/qiufangchao/Desktop/project/wenlvju/src/main/java/com/izouma/wenlvju","viewPath":"/Users/qiufangchao/Desktop/project/wenlvju/src/main/vue/src/views","routerPath":"/Users/qiufangchao/Desktop/project/wenlvju/src/main/vue/src","resourcesPath":"/Users/qiufangchao/Desktop/project/wenlvju/src/main/resources","dataBaseType":"Mysql","fields":[{"name":"performanceId","modelName":"performanceId","remark":"performanceId","showInList":true,"showInForm":true,"formType":"number"},{"name":"content","modelName":"content","remark":"内容","showInList":true,"showInForm":true,"formType":"singleLineText"},{"name":"date","modelName":"date","remark":"时间","showInList":true,"showInForm":true,"formType":"date"},{"name":"address","modelName":"address","remark":"地点","showInList":true,"showInForm":true,"formType":"singleLineText"}],"readTable":false,"dataSourceCode":"dataSource","genJson":"","subtables":[],"update":false,"basePackage":"com.izouma.wenlvju","tablePackage":"com.izouma.wenlvju.domain.performance.PerformanceSchedule","genPackage":"performance"}

+ 12 - 2
src/main/vue/src/router.js

@@ -260,7 +260,8 @@ const router = new Router({
                 {
                     path: '/performanceEdit',
                     name: 'PerformanceEdit',
-                    component: () => import(/* webpackChunkName: "performanceEdit" */ '@/views/PerformanceEdit.vue'),
+                    component: () =>
+                        import(/* webpackChunkName: "performanceEdit" */ '@/views/performance/PerformanceEdit.vue'),
                     meta: {
                         title: '展演管理编辑'
                     }
@@ -268,7 +269,8 @@ const router = new Router({
                 {
                     path: '/performanceList',
                     name: 'PerformanceList',
-                    component: () => import(/* webpackChunkName: "performanceList" */ '@/views/PerformanceList.vue'),
+                    component: () =>
+                        import(/* webpackChunkName: "performanceList" */ '@/views/performance/PerformanceList.vue'),
                     meta: {
                         title: '展演管理'
                     }
@@ -557,6 +559,14 @@ const router = new Router({
                         title: '咨询投诉编辑'
                     }
                 },
+                {
+                    path: '/complainShow',
+                    name: 'ComplainShow',
+                    component: () => import(/* webpackChunkName: "complainShow" */ '@/views/ComplainShow.vue'),
+                    meta: {
+                        title: '咨询投诉详情'
+                    }
+                },
                 {
                     path: '/complainList',
                     name: 'ComplainList',

+ 6 - 12
src/main/vue/src/views/ComplainEdit.vue

@@ -109,15 +109,9 @@
                 >
                 </el-date-picker>
             </el-form-item>
-            <!-- <el-form-item prop="finish" label="办结">
-                <el-radio-group v-model="formData.finish">
-                    <el-radio :label="true">是</el-radio>
-                    <el-radio :label="false">否</el-radio>
-                </el-radio-group>
-            </el-form-item> -->
             <el-form-item>
-                <el-button @click="onSave" :loading="saving" type="primary">提交</el-button>
-                <el-button @click="onSave" :loading="saving" type="success">保存</el-button>
+                <el-button @click="onSave(true)" :loading="saving" type="primary" v-if="formData.id">提交</el-button>
+                <el-button @click="onSave(false)" :loading="saving" type="success">保存</el-button>
                 <el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id">删除 </el-button>
                 <el-button @click="$router.go(-1)">取消</el-button>
             </el-form-item>
@@ -195,17 +189,17 @@ export default {
         };
     },
     methods: {
-        onSave() {
+        onSave(finish) {
             this.$refs.form.validate(valid => {
                 if (valid) {
-                    this.submit();
+                    this.submit(finish);
                 } else {
                     return false;
                 }
             });
         },
-        submit() {
-            let data = { ...this.formData };
+        submit(finish) {
+            let data = { ...this.formData, finish: finish };
 
             this.saving = true;
             this.$http

+ 15 - 10
src/main/vue/src/views/ComplainList.vue

@@ -46,20 +46,17 @@
             </el-table-column>
             <el-table-column prop="situationIsReal" label="办理情况">
                 <template slot-scope="{ row }">
-                    <span v-if="row.situationIsReal == ''">暂无</span>
-                    <span v-if="row.situationIsReal">属实</span>
+                    <span v-if="!row.situationIsReal">暂无</span>
+                    <span v-else-if="row.situationIsReal == true">属实</span>
                     <span v-else>不属实</span>
                 </template>
             </el-table-column>
-            <!-- <el-table-column prop="nature" label="问题性质"> </el-table-column> -->
-            <!-- <el-table-column prop="unitType" label="单位类型" :formatter="unitTypeFormatter"> </el-table-column> -->
-            <!-- <el-table-column prop="unitName" label="单位名称"> </el-table-column> -->
-            <!-- <el-table-column prop="file" label="附件"> </el-table-column> -->
-            <!-- <el-table-column prop="reviewAt" label="审查时间"> </el-table-column> -->
-            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+            <el-table-column label="操作" align="left" fixed="right" min-width="150">
                 <template slot-scope="{ row }">
-                    <el-button @click="editRow(row)" type="primary" size="mini" plain>查看</el-button>
-                    <el-button @click="editRow(row)" type="primary" size="mini" plain>处理</el-button>
+                    <el-button @click="showRow(row)" type="primary" size="mini" plain>查看</el-button>
+                    <el-button @click="editRow(row)" type="primary" size="mini" plain v-if="!row.finish"
+                        >处理</el-button
+                    >
                     <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
                 </template>
             </el-table-column>
@@ -153,6 +150,14 @@ export default {
                 }
             });
         },
+        showRow(row) {
+            this.$router.push({
+                path: '/complainShow',
+                query: {
+                    id: row.id
+                }
+            });
+        },
         download() {
             this.downloading = true;
             this.$axios

+ 265 - 0
src/main/vue/src/views/ComplainShow.vue

@@ -0,0 +1,265 @@
+<template>
+    <div class="edit-view">
+        <el-form
+            :model="formData"
+            :rules="rules"
+            ref="form"
+            label-width="100px"
+            label-position="right"
+            size="small"
+            style="max-width: 700px;"
+        >
+            <el-divider direction="horizontal" content-position="left">诉求人基本信息</el-divider>
+            <el-col :span="12">
+                <el-form-item prop="source" label="来源渠道">
+                    <el-input v-model="formData.source"></el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="12">
+                <el-form-item prop="complainAt" label="来电时间">
+                    <el-date-picker
+                        v-model="formData.complainAt"
+                        type="datetime"
+                        value-format="yyyy-MM-dd HH:mm:ss"
+                        placeholder="选择日期时间"
+                    >
+                    </el-date-picker>
+                </el-form-item>
+            </el-col>
+            <el-col :span="8">
+                <el-form-item prop="name" label="服务对象">
+                    <el-input v-model="formData.name"></el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="7">
+                <el-form-item prop="sex" label="性别">
+                    <el-select v-model="formData.sex">
+                        <el-option label="男" value="男"></el-option>
+                        <el-option label="女" value="女"></el-option>
+                    </el-select>
+                </el-form-item>
+            </el-col>
+            <el-col :span="8">
+                <el-form-item prop="phone" label="联系方式">
+                    <el-input v-model="formData.phone"></el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="24">
+                <el-divider direction="horizontal" content-position="left">诉求信息</el-divider>
+            </el-col>
+            <el-form-item prop="content" label="投诉内容">
+                <el-input type="textarea" :rows="5" v-model="formData.content" readonly></el-input>
+            </el-form-item>
+            <el-form-item prop="title" label="投诉目的">
+                <el-input type="textarea" :rows="3" v-model="formData.title" readonly></el-input>
+            </el-form-item>
+            <el-form-item prop="nature" label="问题性质" v-if="formData.finish">
+                <el-input v-model="formData.nature" readonly></el-input>
+            </el-form-item>
+            <el-form-item prop="unitType" label="涉及的单位" v-if="formData.finish">
+                <el-select v-model="formData.unitType" clearable filterable placeholder="请选择单位类型" disabled>
+                    <el-option
+                        v-for="item in unitTypeOptions"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+                <!-- <el-input v-model="formData.unitName" style="width: 68%"></el-input> -->
+                <el-select
+                    v-model="formData.unitName"
+                    clearable
+                    filterable
+                    placeholder="请选择"
+                    style="width: 68%"
+                    v-if="formData.unitType === 'ORGANIZATION'"
+                    disabled
+                >
+                    <el-option v-for="item in organizations" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                </el-select>
+                <el-select
+                    v-model="formData.unitName"
+                    clearable
+                    filterable
+                    placeholder="请选择"
+                    style="width: 68%"
+                    v-else-if="formData.unitType === 'GRADING_ORGANIZATION'"
+                    disabled
+                >
+                    <el-option
+                        v-for="item in gradingOrganizations"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </el-form-item>
+
+            <el-form-item prop="file" label="附件" v-if="formData.finish">
+                <file-upload v-model="formData.file" :readonly="true"></file-upload>
+            </el-form-item>
+            <el-divider direction="horizontal" content-position="left" v-if="formData.finish">审查情况</el-divider>
+            <el-form-item prop="processing" label="办理情况" v-if="formData.finish">
+                <el-input type="textarea" :rows="5" v-model="formData.processing" readonly></el-input>
+            </el-form-item>
+            <el-form-item prop="situationIsReal" label="情况属实" v-if="formData.finish">
+                <el-radio-group v-model="formData.situationIsReal">
+                    <el-radio :label="true" disabled>是</el-radio>
+                    <el-radio :label="false" disabled>否</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item prop="reviewFile" label="审查附件" v-if="formData.finish">
+                <file-upload v-model="formData.reviewFile" :readonly="true"></file-upload>
+            </el-form-item>
+            <el-form-item prop="reviewAt" label="审查时间" v-if="formData.finish">
+                <el-date-picker
+                    v-model="formData.reviewAt"
+                    type="datetime"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    placeholder="选择日期时间"
+                    readonly
+                >
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+export default {
+    name: 'ComplainShow',
+    created() {
+        if (this.$route.query.id) {
+            this.$http
+                .get('complain/get/' + this.$route.query.id)
+                .then(res => {
+                    this.formData = res;
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$message.error(e.error);
+                });
+        }
+        this.$http
+            .post('/gradingOrganization/all', { size: 1000 }, { body: 'json' })
+            .then(res => {
+                if (res.content.length > 0) {
+                    res.content.forEach(item => {
+                        this.gradingOrganizations.push({
+                            label: item.name,
+                            value: item.id
+                        });
+                    });
+                }
+            })
+            .catch(e => {
+                console.log(e);
+                this.$message.error(e.error);
+            });
+        this.$http
+            .post('/organization/all', { size: 1000 }, { body: 'json' })
+            .then(res => {
+                if (res.content.length > 0) {
+                    res.content.forEach(item => {
+                        this.organizations.push({
+                            label: item.name,
+                            value: item.id
+                        });
+                    });
+                }
+            })
+            .catch(e => {
+                console.log(e);
+                this.$message.error(e.error);
+            });
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {
+                phone: [
+                    {
+                        pattern: /^1[3-9]\d{9}$/,
+                        message: '请输入正确的手机号',
+                        trigger: 'blur'
+                    }
+                ]
+            },
+            unitTypeOptions: [
+                { label: '承办单位', value: 'ORGANIZATION' },
+                { label: '考级机构', value: 'GRADING_ORGANIZATION' },
+                { label: '考点', value: 'EXAMINATION' }
+            ],
+            gradingOrganizations: [],
+            organizations: []
+        };
+    },
+    methods: {
+        onSave(finish) {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.submit(finish);
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit(finish) {
+            let data = { ...this.formData, finish: finish };
+
+            this.saving = true;
+            this.$http
+                .post('/complain/save', data, { body: 'json' })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                    // this.$router.go(-1);
+                    this.$router.replace({
+                        query: {
+                            id: res.id
+                        }
+                    });
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/complain/del/${this.formData.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        console.log(e);
+                        this.$message.error((e || {}).error || '删除失败');
+                    }
+                });
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+/deep/.el-radio__input.is-checked + .el-radio__label {
+    color: #606266;
+}
+/deep/.el-radio__input.is-disabled + span.el-radio__label {
+    color: #606266;
+}
+/deep/ .el-input.is-disabled .el-input__inner {
+    background-color: #ffffff;
+    color: #606266;
+}
+</style>

+ 0 - 0
src/main/vue/src/views/PerformanceEdit.vue → src/main/vue/src/views/performance/PerformanceEdit.vue


+ 0 - 0
src/main/vue/src/views/PerformanceList.vue → src/main/vue/src/views/performance/PerformanceList.vue