licailing 5 лет назад
Родитель
Сommit
6e6277f2b8

+ 47 - 1
src/main/java/com/izouma/wenlvju/domain/Rate.java

@@ -1,5 +1,6 @@
 package com.izouma.wenlvju.domain;
 
+import com.izouma.wenlvju.converter.StringArrayConverter;
 import com.izouma.wenlvju.enums.RateStatus;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -8,17 +9,62 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import javax.persistence.Column;
+import javax.persistence.Convert;
 import javax.persistence.Entity;
+import java.util.List;
 
 @Data
 @AllArgsConstructor
 @NoArgsConstructor
 @Builder
-//@Entity
+@Entity
 @ApiModel(value = "评星定级")
 public class Rate extends BaseEntity {
+    @ApiModelProperty(value = "申请人")
+    private Long userId;
+
+    @ApiModelProperty(value = "承办单位名称")
+    private String organizer;
+
     @ApiModelProperty(value = "年度")
     private String year;
 
     private RateStatus status;
+
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = StringArrayConverter.class)
+    @ApiModelProperty(value = "法人资格")
+    private List<String> privacyPolicy;
+
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = StringArrayConverter.class)
+    @ApiModelProperty(value = "业务内容")
+    private List<String> business;
+
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = StringArrayConverter.class)
+    @ApiModelProperty(value = "社会信誉")
+    private List<String> credits;
+
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = StringArrayConverter.class)
+    @ApiModelProperty(value = "消防卫生")
+    private List<String> fire;
+
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = StringArrayConverter.class)
+    @ApiModelProperty(value = "财务报表")
+    private List<String> finance;
+
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = StringArrayConverter.class)
+    @ApiModelProperty(value = "房产证明")
+    private List<String> property;
+
+    @ApiModelProperty(value = "专家用户id")
+    private Long expertUserId;
+
+    @ApiModelProperty(value = "分数")
+    private int score;
 }

+ 4 - 1
src/main/java/com/izouma/wenlvju/enums/AuthorityName.java

@@ -4,7 +4,10 @@ public enum AuthorityName {
     ROLE_USER("普通用户"),
     ROLE_DEV("开发者"),
     ROLE_ADMIN("管理员"),
-    ROLE_SUPERVISOR("监管员");
+    ROLE_SUPERVISOR("监管员"),
+    ROLE_ORGANIZER("承办单位"),
+    ROLE_DISTRICT("区县单位"),
+    ROLE_EXPERT("市政专家");
     private final String description;
 
     AuthorityName(String description) {

+ 14 - 0
src/main/java/com/izouma/wenlvju/enums/RateStatus.java

@@ -1,4 +1,18 @@
 package com.izouma.wenlvju.enums;
 
 public enum RateStatus {
+    /*
+    初审中
+     */
+    FIRST_REVIEW_PENDING,
+    /*
+    初审通过
+     */
+    FIRST_REVIEW_PASS,
+    FIRST_REVIEW_DENY,
+    /*
+    专家通过
+     */
+    EXPERT_PASS,
+    EXPERT_DENY
 }

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

@@ -0,0 +1,16 @@
+package com.izouma.wenlvju.repo;
+
+import com.izouma.wenlvju.domain.Rate;
+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 RateRepo extends JpaRepository<Rate, Long>, JpaSpecificationExecutor<Rate> {
+    @Query("update Rate t set t.del = true where t.id = ?1")
+    @Modifying
+    @Transactional
+    void softDelete(Long id);
+}

+ 3 - 0
src/main/java/com/izouma/wenlvju/repo/RegulatoryRepo.java

@@ -7,10 +7,13 @@ import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 
 import javax.transaction.Transactional;
+import java.util.List;
 
 public interface RegulatoryRepo extends JpaRepository<Regulatory, Long>, JpaSpecificationExecutor<Regulatory> {
     @Query("update Regulatory t set t.del = true where t.id = ?1")
     @Modifying
     @Transactional
     void softDelete(Long id);
+
+    List<Regulatory> findAllByRecordId(Long recordId);
 }

+ 37 - 0
src/main/java/com/izouma/wenlvju/service/RateService.java

@@ -0,0 +1,37 @@
+package com.izouma.wenlvju.service;
+
+import com.izouma.wenlvju.domain.Rate;
+import com.izouma.wenlvju.dto.PageQuery;
+import com.izouma.wenlvju.enums.RateStatus;
+import com.izouma.wenlvju.exception.BusinessException;
+import com.izouma.wenlvju.repo.RateRepo;
+import com.izouma.wenlvju.utils.JpaUtils;
+import lombok.AllArgsConstructor;
+import org.springframework.data.domain.Page;
+import org.springframework.stereotype.Service;
+
+@Service
+@AllArgsConstructor
+public class RateService {
+
+    private RateRepo rateRepo;
+
+    public Page<Rate> all(PageQuery pageQuery) {
+        return rateRepo.findAll(JpaUtils.toSpecification(pageQuery, Rate.class), JpaUtils.toPageRequest(pageQuery));
+    }
+
+    public void audit(Long id, RateStatus status,int score) {
+        Rate rate = rateRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+        rate.setStatus(status);
+        if (RateStatus.EXPERT_PASS.equals(status)){
+            rate.setScore(score);
+        }
+        rateRepo.save(rate);
+    }
+
+    public void addExpert(Long id, Long userId) {
+        Rate rate = rateRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+        rate.setExpertUserId(userId);
+        rateRepo.save(rate);
+    }
+}

+ 74 - 0
src/main/java/com/izouma/wenlvju/web/RateController.java

@@ -0,0 +1,74 @@
+package com.izouma.wenlvju.web;
+
+import com.izouma.wenlvju.domain.Rate;
+import com.izouma.wenlvju.enums.RateStatus;
+import com.izouma.wenlvju.service.RateService;
+import com.izouma.wenlvju.dto.PageQuery;
+import com.izouma.wenlvju.exception.BusinessException;
+import com.izouma.wenlvju.repo.RateRepo;
+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.time.LocalDate;
+import java.util.List;
+
+@RestController
+@RequestMapping("/rate")
+@AllArgsConstructor
+public class RateController extends BaseController {
+    private RateService rateService;
+    private RateRepo    rateRepo;
+
+    //@PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/save")
+    public Rate save(@RequestBody Rate record) {
+        if (record.getId() != null) {
+            Rate orig = rateRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
+            ObjUtils.merge(orig, record);
+            return rateRepo.save(orig);
+        }
+        record.setYear(String.valueOf(LocalDate.now().getYear()));
+        return rateRepo.save(record);
+    }
+
+
+    //@PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/all")
+    public Page<Rate> all(@RequestBody PageQuery pageQuery) {
+        return rateService.all(pageQuery);
+    }
+
+    @GetMapping("/get/{id}")
+    public Rate get(@PathVariable Long id) {
+        return rateRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+    }
+
+    @PostMapping("/del/{id}")
+    public void del(@PathVariable Long id) {
+        rateRepo.softDelete(id);
+    }
+
+    @GetMapping("/excel")
+    @ResponseBody
+    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
+        List<Rate> data = all(pageQuery).getContent();
+        ExcelUtils.export(response, data);
+    }
+
+    @PostMapping("/audit")
+    public void audit(@RequestParam Long id, @RequestParam RateStatus status,int score) {
+        rateService.audit(id, status,score);
+    }
+
+    @PostMapping("/addExpert")
+    public void addExpert(@RequestParam Long id, @RequestParam Long userId) {
+        rateService.addExpert(id, userId);
+    }
+}
+

+ 6 - 0
src/main/java/com/izouma/wenlvju/web/RegulatoryController.java

@@ -67,5 +67,11 @@ public class RegulatoryController extends BaseController {
         List<Regulatory> data = all(pageQuery).getContent();
         ExcelUtils.export(response, data);
     }
+
+    @GetMapping("/byRecord")
+    @ApiOperation("按检查记录查询")
+    public List<Regulatory> byRecord(@RequestParam Long recordId) {
+        return regulatoryRepo.findAllByRecordId(recordId);
+    }
 }
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
src/main/resources/genjson/Rate.json


+ 6 - 1
src/main/vue/src/components/FileUpload.vue

@@ -112,7 +112,12 @@ export default {
                     this.fileList = [];
                 } else {
                     this.fileList = value.map(i => {
-                        return { name: i.name, url: i.url };
+                        if (this.format === 'json') {
+                            return { name: i.name, url: i.url };
+                        } else {
+                            return { name: i.split('/').pop(), url: i };
+                        }
+                        // return { name: i.name, url: i.url };
                     });
                 }
             }

+ 40 - 0
src/main/vue/src/router.js

@@ -119,6 +119,14 @@ const router = new Router({
                         title: '监管管理'
                     }
                 },
+                {
+                    path: '/recordDistrictList',
+                    name: 'RecordList',
+                    component: () => import(/* webpackChunkName: "recordList" */ '@/views/RecordDistrictList.vue'),
+                    meta: {
+                        title: '备案管理'
+                    }
+                },
                 {
                     path: '/recordList',
                     name: 'RecordList',
@@ -201,6 +209,38 @@ const router = new Router({
                     meta: {
                         title: '监管管理'
                     }
+                },
+                {
+                    path: '/rateEdit',
+                    name: 'RateEdit',
+                    component: () => import(/* webpackChunkName: "rateEdit" */ '@/views/RateEdit.vue'),
+                    meta: {
+                        title: '评星定级编辑'
+                    }
+                },
+                {
+                    path: '/rateOrganizerList',
+                    name: 'RateOrganizerList',
+                    component: () => import(/* webpackChunkName: "rateList" */ '@/views/RateOrganizerList.vue'),
+                    meta: {
+                        title: '评星定级'
+                    }
+                },
+                {
+                    path: '/rateExpertList',
+                    name: 'RateExpertList',
+                    component: () => import(/* webpackChunkName: "rateList" */ '@/views/RateExpertList.vue'),
+                    meta: {
+                        title: '评星定级'
+                    }
+                },
+                {
+                    path: '/rateList',
+                    name: 'RateList',
+                    component: () => import(/* webpackChunkName: "rateList" */ '@/views/RateList.vue'),
+                    meta: {
+                        title: '评星定级'
+                    }
                 }
                 /**INSERT_LOCATION**/
             ]

+ 79 - 0
src/main/vue/src/views/Dashboard copy.vue

@@ -0,0 +1,79 @@
+<template>
+    <div>
+        <grid-layout
+            style="margin: 0 -10px;"
+            :layout="layout"
+            :col-num="12"
+            :row-height="30"
+            :is-draggable="editable"
+            :is-resizable="editable"
+            :is-mirrored="false"
+            :vertical-compact="true"
+            :margin="[10, 10]"
+            :use-css-transforms="true"
+        >
+            <grid-item
+                v-for="item in layout"
+                class="widget-wrapper"
+                :x="item.x"
+                :y="item.y"
+                :w="item.w"
+                :h="item.h"
+                :i="item.i"
+                :key="item.i"
+            >
+                <component :is="item.name"></component>
+            </grid-item>
+        </grid-layout>
+        <el-button v-if="editable" @click="save">保存</el-button>
+        <el-button v-else @click="editable = true">编辑</el-button>
+    </div>
+</template>
+
+<script>
+import { GridLayout, GridItem } from 'vue-grid-layout';
+import UserWidget from '../widgets/UserWidget';
+import LineChartWidget from '../widgets/LineChartWidget';
+import BarChartWidget from '../widgets/BarChartWidget';
+import PieChartWidget from '../widgets/PieChartWidget';
+
+export default {
+    created() {},
+    data() {
+        return {
+            layout: [
+                { x: 0, y: 0, w: 6, h: 4, i: '0', name: 'UserWidget' },
+                { x: 6, y: 0, w: 6, h: 4, i: '1', name: 'UserWidget' },
+                { x: 0, y: 4, w: 6, h: 6, i: '2', name: 'BarChartWidget' },
+                { x: 0, y: 10, w: 6, h: 6, i: '3', name: 'LineChartWidget' },
+                { x: 6, y: 4, w: 6, h: 12, i: '4', name: 'PieChartWidget' }
+            ],
+            editable: false
+        };
+    },
+    methods: {
+        save() {
+            console.log(JSON.stringify(this.layout));
+            this.editable = false;
+        }
+    },
+    components: {
+        GridLayout,
+        GridItem,
+        UserWidget,
+        LineChartWidget,
+        BarChartWidget,
+        PieChartWidget
+    }
+};
+</script>
+
+<style lang="less">
+.widget-wrapper {
+    display: flex;
+    flex-direction: column;
+    .el-card {
+        flex-grow: 1;
+    }
+}
+</style>

+ 6 - 6
src/main/vue/src/views/Dashboard.vue

@@ -26,7 +26,7 @@
             </grid-item>
         </grid-layout>
         <el-button v-if="editable" @click="save">保存</el-button>
-        <el-button v-else @click="editable = true">编辑</el-button>
+        <!-- <el-button v-else @click="editable = true">编辑</el-button> -->
     </div>
 </template>
 
@@ -42,11 +42,11 @@ export default {
     data() {
         return {
             layout: [
-                { x: 0, y: 0, w: 6, h: 4, i: '0', name: 'UserWidget' },
-                { x: 6, y: 0, w: 6, h: 4, i: '1', name: 'UserWidget' },
-                { x: 0, y: 4, w: 6, h: 6, i: '2', name: 'BarChartWidget' },
-                { x: 0, y: 10, w: 6, h: 6, i: '3', name: 'LineChartWidget' },
-                { x: 6, y: 4, w: 6, h: 12, i: '4', name: 'PieChartWidget' }
+                // { x: 0, y: 0, w: 6, h: 4, i: '0', name: 'UserWidget' },
+                // { x: 6, y: 0, w: 6, h: 4, i: '1', name: 'UserWidget' },
+                // { x: 0, y: 4, w: 6, h: 6, i: '2', name: 'BarChartWidget' },
+                // { x: 0, y: 10, w: 6, h: 6, i: '3', name: 'LineChartWidget' },
+                // { x: 6, y: 4, w: 6, h: 12, i: '4', name: 'PieChartWidget' }
             ],
             editable: false
         };

+ 15 - 4
src/main/vue/src/views/PerformanceApplyList.vue

@@ -3,7 +3,9 @@
         <div class="filters-container">
             <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
             <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
-            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加报名 </el-button>
+            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item" v-if="canSign"
+                >添加报名
+            </el-button>
             <!-- <el-button
                 @click="download"
                 type="primary"
@@ -33,7 +35,7 @@
             <el-table-column prop="phone" label="联系电话"> </el-table-column>
             <el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
             <el-table-column prop="showTime" label="表演时间"> </el-table-column>
-            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+            <el-table-column label="操作" align="center" fixed="right" min-width="220">
                 <template slot-scope="{ row }">
                     <!-- <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
                     <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
@@ -133,9 +135,16 @@ export default {
                 value: ''
             },
             add: false,
-            dialogCode: false
+            dialogCode: false,
+            canSign: false,
+            applyId: ''
         };
     },
+    created() {
+        if (this.$route.query.perforStatus === 'APPLY') {
+            this.canSign = true;
+        }
+    },
     computed: {
         selection() {
             return this.$refs.table.selection.map(i => i.id);
@@ -229,6 +238,7 @@ export default {
         },
         showDialog(row) {
             this.dialogVisible = true;
+            this.applyId = row.id;
             this.form.performanceApplyId = row.id;
             this.getPerson(row.id);
         },
@@ -258,7 +268,8 @@ export default {
                                 phone: ''
                             };
                             this.add = false;
-                            this.getPerson(this.form.performanceApplyId);
+                            console.log(this.applyId);
+                            this.getPerson(this.applyId);
                             // this.$router.go(-1);
                         })
                         .catch(e => {

+ 20 - 5
src/main/vue/src/views/PerformanceList.vue

@@ -3,7 +3,9 @@
         <div class="filters-container">
             <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
             <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
-            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加 </el-button>
+            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item" v-if="display"
+                >添加
+            </el-button>
             <!-- <el-button
                 @click="download"
                 type="primary"
@@ -32,10 +34,10 @@
             <el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
             <el-table-column label="操作" align="center" fixed="right" min-width="150">
                 <template slot-scope="{ row }">
-                    <el-button @click="handleCommand(row)" type="primary" size="mini" plain
+                    <el-button @click="handleCommand(row)" type="primary" size="mini" plain v-if="!display"
                         ><span v-if="row.status === 'APPLY'">报名入口</span> <span v-else>查看节目</span></el-button
                     >
-                    <el-button @click="handleCommand1(row)" type="primary" size="mini" plain
+                    <el-button @click="handleCommand1(row)" type="primary" size="mini" plain v-else
                         ><span v-if="row.status === 'APPLY'">报名入口</span> <span v-else>查看节目</span></el-button
                     >
                     <!-- <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
@@ -82,13 +84,18 @@ export default {
             statusOptions: [
                 { label: '报名中', value: 'APPLY' },
                 { label: '已结束', value: 'END' }
-            ]
+            ],
+            display: false
         };
     },
+    created() {
+        this.getAdmin();
+    },
     computed: {
         selection() {
             return this.$refs.table.selection.map(i => i.id);
-        }
+        },
+        ...mapState(['userInfo'])
     },
     methods: {
         statusFormatter(row, column, cellValue, index) {
@@ -187,6 +194,14 @@ export default {
                     perforId: row.id
                 }
             });
+        },
+        getAdmin() {
+            let data = this.userInfo.authorities;
+            data.forEach(element => {
+                if (element.name === 'ROLE_ADMIN') {
+                    this.display = true;
+                }
+            });
         }
     }
 };

+ 136 - 0
src/main/vue/src/views/RateEdit.vue

@@ -0,0 +1,136 @@
+<template>
+    <div class="edit-view">
+        <el-form
+            :model="formData"
+            :rules="rules"
+            ref="form"
+            label-width="100px"
+            label-position="right"
+            size="small"
+            style="max-width: 500px;"
+        >
+            <!-- <el-form-item prop="organizer" label="承办单位">
+                <el-input v-model="formData.organizer"></el-input>
+            </el-form-item> -->
+            <!-- <el-form-item prop="year" label="年度">
+                <el-input v-model="formData.year"></el-input>
+            </el-form-item> -->
+            <!-- <el-form-item prop="status" label="状态">
+                <el-select v-model="formData.status" clearable filterable placeholder="请选择">
+                    <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                </el-select>
+            </el-form-item> -->
+            <el-form-item prop="privacyPolicy" label="法人资格">
+                <!-- <el-upload class="upload-demo" action="../upload/file" :on-change="handleChange" :file-list="fileList3">
+                    <el-button size="small" type="primary">
+                        点击上传
+                    </el-button>
+                </el-upload> -->
+                <file-upload v-model="formData.privacyPolicy"></file-upload>
+            </el-form-item>
+            <el-form-item prop="business" label="业务内容">
+                <file-upload v-model="formData.business"></file-upload>
+            </el-form-item>
+            <el-form-item prop="credits" label="社会信誉">
+                <file-upload v-model="formData.credits"></file-upload>
+            </el-form-item>
+            <el-form-item prop="fire" label="消防卫生">
+                <file-upload v-model="formData.fire"></file-upload>
+            </el-form-item>
+            <el-form-item prop="finance" label="财务报表">
+                <file-upload v-model="formData.finance"></file-upload>
+            </el-form-item>
+            <el-form-item prop="property" label="房产证明">
+                <file-upload v-model="formData.property"></file-upload>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="onSave" :loading="saving" type="primary">保存</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>
+        </el-form>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+export default {
+    name: 'RateEdit',
+    created() {
+        if (this.$route.query.id) {
+            this.$http
+                .get('rate/get/' + this.$route.query.id)
+                .then(res => {
+                    this.formData = res;
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$message.error(e.error);
+                });
+        }
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {},
+            statusOptions: [
+                { label: '初审中', value: 'FIRST_REVIEW_PENDING' },
+                { label: '初审通过', value: 'FIRST_REVIEW_PASS' },
+                { label: '专家通过', value: 'EXPERT_PASS' }
+            ]
+        };
+    },
+    computed: {
+        ...mapState(['userInfo'])
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            let data = { ...this.formData };
+            data.userId = this.userInfo.id;
+            data.organizer = this.userInfo.nickname;
+            data.status = 'FIRST_REVIEW_PENDING';
+
+            this.saving = true;
+            this.$http
+                .post('/rate/save', data, { body: 'json' })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/rate/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></style>

+ 251 - 0
src/main/vue/src/views/RateExpertList.vue

@@ -0,0 +1,251 @@
+<template>
+    <div class="list-view">
+        <div class="filters-container">
+            <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
+            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
+            <!-- <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">创建申请 </el-button> -->
+            <!-- <el-button
+                @click="download"
+                type="primary"
+                icon="el-icon-download"
+                :loading="downloading"
+                class="filter-item"
+                >导出EXCEL
+            </el-button> -->
+        </div>
+        <el-table
+            :data="tableData"
+            row-key="id"
+            ref="table"
+            header-row-class-name="table-header-row"
+            header-cell-class-name="table-header-cell"
+            row-class-name="table-row"
+            cell-class-name="table-cell"
+            :height="tableHeight"
+        >
+            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
+            <!-- <el-table-column prop="id" label="ID" width="100"> </el-table-column> -->
+            <el-table-column prop="organizer" label="承办单位"> </el-table-column>
+            <el-table-column prop="createdAt" label="申请时间"></el-table-column>
+            <el-table-column prop="year" label="年度"> </el-table-column>
+            <el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
+            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+                <template slot-scope="{ row }">
+                    <el-button
+                        v-if="row.status === 'FIRST_REVIEW_PASS'"
+                        :loading="row.loading"
+                        @click="open(row)"
+                        type="success"
+                        size="mini"
+                        plain
+                    >
+                        通过
+                    </el-button>
+                    <el-button
+                        v-if="row.status === 'FIRST_REVIEW_PASS'"
+                        :loading="row.loading"
+                        @click="audit(row, 'EXPERT_PASS')"
+                        type="warning"
+                        size="mini"
+                        plain
+                    >
+                        拒绝
+                    </el-button>
+                    <el-button @click="editRow(row)" type="primary" size="mini" plain>查看附件</el-button>
+                    <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <!-- <div class="multiple-mode-wrapper">
+                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button @click="operation1">批量操作1</el-button>
+                    <el-button @click="operation2">批量操作2</el-button>
+                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div> -->
+            <el-pagination
+                background
+                @size-change="onSizeChange"
+                @current-change="onCurrentChange"
+                :current-page="page"
+                :page-sizes="[10, 20, 30, 40, 50]"
+                :page-size="pageSize"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="totalElements"
+            >
+            </el-pagination>
+        </div>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import pageableTable from '@/mixins/pageableTable';
+
+export default {
+    name: 'RateList',
+    mixins: [pageableTable],
+    data() {
+        return {
+            multipleMode: false,
+            search: '',
+            url: '/rate/all',
+            downloading: false,
+            statusOptions: [
+                { label: '初审中', value: 'FIRST_REVIEW_PENDING' },
+                { label: '初审通过', value: 'FIRST_REVIEW_PASS' },
+                { label: '专家通过', value: 'EXPERT_PASS' }
+            ]
+        };
+    },
+    computed: {
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        },
+        ...mapState(['userInfo'])
+    },
+    methods: {
+        statusFormatter(row, column, cellValue, index) {
+            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        },
+        beforeGetData() {
+            return {
+                search: this.search,
+                query: {
+                    expertUserId: this.userInfo.id
+                }
+            };
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        addRow() {
+            this.$router.push({
+                path: '/rateEdit',
+                query: {
+                    ...this.$route.query
+                }
+            });
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/rateEdit',
+                query: {
+                    id: row.id
+                }
+            });
+        },
+        download() {
+            this.downloading = true;
+            this.$axios
+                .get('/rate/excel', {
+                    responseType: 'blob',
+                    params: { size: 10000 }
+                })
+                .then(res => {
+                    console.log(res);
+                    this.downloading = false;
+                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+                    const link = document.createElement('a');
+                    link.href = downloadUrl;
+                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
+                    document.body.appendChild(link);
+                    link.click();
+                    link.remove();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.downloading = false;
+                    this.$message.error(e.error);
+                });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/rate/del/${row.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        this.$message.error(e.error);
+                    }
+                });
+        },
+        audit(row, status) {
+            this.$set(row, 'loading', true);
+            this.$http
+                .post('/rate/audit', {
+                    id: row.id,
+                    status: status,
+                    score: 0
+                })
+                .then(res => {
+                    this.$set(row, 'loading', false);
+                    this.$message.success('OK');
+                    this.getData();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$set(row, 'loading', false);
+                    this.$message.error(e.error);
+                });
+        },
+        open(row) {
+            this.$set(row, 'loading', true);
+            this.$prompt('请输入分数', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消'
+            })
+                .then(({ value }) => {
+                    this.$message({
+                        type: 'success',
+                        message: '分数是: ' + value
+                    });
+                    this.$http
+                        .post('/rate/audit', {
+                            id: row.id,
+                            status: 'EXPERT_PASS',
+                            score: value
+                        })
+                        .then(res => {
+                            this.$set(row, 'loading', false);
+                            this.$message.success('OK');
+                            this.getData();
+                        })
+                        .catch(e => {
+                            console.log(e);
+                            this.$set(row, 'loading', false);
+                            this.$message.error(e.error);
+                        });
+                })
+                .catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '取消输入'
+                    });
+                });
+        }
+    }
+};
+</script>
+<style lang="less" scoped></style>

+ 291 - 0
src/main/vue/src/views/RateList.vue

@@ -0,0 +1,291 @@
+<template>
+    <div class="list-view">
+        <div class="filters-container">
+            <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
+            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
+            <!-- <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">创建申请 </el-button> -->
+            <!-- <el-button
+                @click="download"
+                type="primary"
+                icon="el-icon-download"
+                :loading="downloading"
+                class="filter-item"
+                >导出EXCEL
+            </el-button> -->
+        </div>
+        <el-table
+            :data="tableData"
+            row-key="id"
+            ref="table"
+            header-row-class-name="table-header-row"
+            header-cell-class-name="table-header-cell"
+            row-class-name="table-row"
+            cell-class-name="table-cell"
+            :height="tableHeight"
+        >
+            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
+            <!-- <el-table-column prop="id" label="ID" width="100"> </el-table-column> -->
+            <el-table-column prop="organizer" label="承办单位"> </el-table-column>
+            <el-table-column prop="createdAt" label="申请时间"></el-table-column>
+            <el-table-column prop="year" label="年度"> </el-table-column>
+            <el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
+            <!-- <el-table-column prop="privacyPolicy" label="法人资格"> </el-table-column>
+            <el-table-column prop="business" label="业务内容"> </el-table-column>
+            <el-table-column prop="credits" label="社会信誉"> </el-table-column>
+            <el-table-column prop="fire" label="消防卫生"> </el-table-column>
+            <el-table-column prop="finance" label="财务报表"> </el-table-column>
+            <el-table-column prop="property" label="房产证明"> </el-table-column> -->
+            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+                <template slot-scope="{ row }">
+                    <el-button
+                        v-if="row.status === 'FIRST_REVIEW_PENDING'"
+                        :loading="row.loading"
+                        @click="audit(row, 'FIRST_REVIEW_PASS')"
+                        type="success"
+                        size="mini"
+                        plain
+                    >
+                        通过
+                    </el-button>
+                    <el-button
+                        v-if="row.status === 'FIRST_REVIEW_PENDING'"
+                        :loading="row.loading"
+                        @click="audit(row, 'FIRST_REVIEW_DENY')"
+                        type="warning"
+                        size="mini"
+                        plain
+                    >
+                        拒绝
+                    </el-button>
+                    <el-button @click="editRow(row)" type="primary" size="mini" plain>查看附件</el-button>
+                    <el-button @click="sorce(row)" type="primary" size="mini" plain v-if="row.status === 'EXPERT_PASS'"
+                        >查看分数</el-button
+                    >
+                    <el-button
+                        @click="supervision(row.id)"
+                        type="primary"
+                        size="mini"
+                        plain
+                        v-if="row.status === 'FIRST_REVIEW_PASS'"
+                        >分配专家组</el-button
+                    >
+                    <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <!-- <div class="multiple-mode-wrapper">
+                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button @click="operation1">批量操作1</el-button>
+                    <el-button @click="operation2">批量操作2</el-button>
+                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div> -->
+            <el-pagination
+                background
+                @size-change="onSizeChange"
+                @current-change="onCurrentChange"
+                :current-page="page"
+                :page-sizes="[10, 20, 30, 40, 50]"
+                :page-size="pageSize"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="totalElements"
+            >
+            </el-pagination>
+        </div>
+
+        <el-dialog title="分配市政专家" :visible.sync="dialogVisible" width="500px" center>
+            <div>
+                <el-table :data="supervisor">
+                    <el-table-column prop="nickname" label="昵称"></el-table-column>
+                    <el-table-column prop="phone" label="手机号"></el-table-column>
+                    <el-table-column label="操作" align="center" fixed="right" min-width="80">
+                        <template slot-scope="{ row }">
+                            <el-button @click="addRegulatory(row.id)" type="success" size="mini" plain>确认</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import pageableTable from '@/mixins/pageableTable';
+
+export default {
+    name: 'RateList',
+    mixins: [pageableTable],
+    data() {
+        return {
+            multipleMode: false,
+            search: '',
+            url: '/rate/all',
+            downloading: false,
+            statusOptions: [
+                { label: '初审中', value: 'FIRST_REVIEW_PENDING' },
+                { label: '初审通过', value: 'FIRST_REVIEW_PASS' },
+                { label: '专家通过', value: 'EXPERT_PASS' }
+            ],
+            supervisor: [],
+            dialogVisible: false,
+            rateId: ''
+        };
+    },
+    computed: {
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        }
+    },
+    mounted() {
+        this.$http
+            .post('/user/authority', { authorityName: 'ROLE_EXPERT' })
+            .then(res => {
+                this.supervisor = res;
+                // if (res.length > 0) {
+                //     res.forEach(item => {
+                //         this.supervisor.push({
+                //             label: item.nickname,
+                //             value: item.id
+                //         });
+                //     });
+                // }
+            })
+            .catch(e => {
+                console.log(e);
+                this.$message.error(e.error);
+            });
+    },
+    methods: {
+        statusFormatter(row, column, cellValue, index) {
+            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        },
+        beforeGetData() {
+            return { search: this.search };
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        addRow() {
+            this.$router.push({
+                path: '/rateEdit',
+                query: {
+                    ...this.$route.query
+                }
+            });
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/rateEdit',
+                query: {
+                    id: row.id
+                }
+            });
+        },
+        download() {
+            this.downloading = true;
+            this.$axios
+                .get('/rate/excel', {
+                    responseType: 'blob',
+                    params: { size: 10000 }
+                })
+                .then(res => {
+                    console.log(res);
+                    this.downloading = false;
+                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+                    const link = document.createElement('a');
+                    link.href = downloadUrl;
+                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
+                    document.body.appendChild(link);
+                    link.click();
+                    link.remove();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.downloading = false;
+                    this.$message.error(e.error);
+                });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/rate/del/${row.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        this.$message.error(e.error);
+                    }
+                });
+        },
+        audit(row, status) {
+            this.$set(row, 'loading', true);
+            this.$http
+                .post('/rate/audit', {
+                    id: row.id,
+                    status: status,
+                    score: 0
+                })
+                .then(res => {
+                    this.$set(row, 'loading', false);
+                    this.$message.success('OK');
+                    this.getData();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$set(row, 'loading', false);
+                    this.$message.error(e.error);
+                });
+        },
+        supervision(id) {
+            this.dialogVisible = true;
+            this.rateId = id;
+        },
+        addRegulatory(id) {
+            this.$http
+                .post('/rate/addExpert', {
+                    id: this.rateId,
+                    userId: id
+                })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                    this.dialogVisible = false;
+                    this.recordId = '';
+                    this.getData();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
+        },
+        sorce(row) {
+            this.$alert('专家打出的分数为:' + row.score, '分数', {
+                confirmButtonText: '确定'
+            });
+        }
+    }
+};
+</script>
+<style lang="less" scoped></style>

+ 176 - 0
src/main/vue/src/views/RateOrganizerList.vue

@@ -0,0 +1,176 @@
+<template>
+    <div class="list-view">
+        <div class="filters-container">
+            <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
+            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
+            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">创建申请 </el-button>
+            <!-- <el-button
+                @click="download"
+                type="primary"
+                icon="el-icon-download"
+                :loading="downloading"
+                class="filter-item"
+                >导出EXCEL
+            </el-button> -->
+        </div>
+        <el-table
+            :data="tableData"
+            row-key="id"
+            ref="table"
+            header-row-class-name="table-header-row"
+            header-cell-class-name="table-header-cell"
+            row-class-name="table-row"
+            cell-class-name="table-cell"
+            :height="tableHeight"
+        >
+            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
+            <el-table-column prop="createdAt" label="申请时间"></el-table-column>
+            <el-table-column prop="year" label="年度"> </el-table-column>
+            <el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
+            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+                <template slot-scope="{ row }">
+                    <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑资料</el-button>
+                    <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <!-- <div class="multiple-mode-wrapper">
+                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button @click="operation1">批量操作1</el-button>
+                    <el-button @click="operation2">批量操作2</el-button>
+                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div> -->
+            <el-pagination
+                background
+                @size-change="onSizeChange"
+                @current-change="onCurrentChange"
+                :current-page="page"
+                :page-sizes="[10, 20, 30, 40, 50]"
+                :page-size="pageSize"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="totalElements"
+            >
+            </el-pagination>
+        </div>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import pageableTable from '@/mixins/pageableTable';
+
+export default {
+    name: 'RateList',
+    mixins: [pageableTable],
+    data() {
+        return {
+            multipleMode: false,
+            search: '',
+            url: '/rate/all',
+            downloading: false,
+            statusOptions: [
+                { label: '初审中', value: 'FIRST_REVIEW_PENDING' },
+                { label: '初审通过', value: 'FIRST_REVIEW_PASS' },
+                { label: '专家通过', value: 'EXPERT_PASS' }
+            ]
+        };
+    },
+    computed: {
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        },
+        ...mapState(['userInfo'])
+    },
+    methods: {
+        statusFormatter(row, column, cellValue, index) {
+            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        },
+        beforeGetData() {
+            return {
+                search: this.search,
+                sort: 'createdAt,desc',
+                query: {
+                    userId: this.userInfo.id
+                }
+            };
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        addRow() {
+            this.$router.push({
+                path: '/rateEdit',
+                query: {
+                    ...this.$route.query
+                }
+            });
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/rateEdit',
+                query: {
+                    id: row.id
+                }
+            });
+        },
+        download() {
+            this.downloading = true;
+            this.$axios
+                .get('/rate/excel', {
+                    responseType: 'blob',
+                    params: { size: 10000 }
+                })
+                .then(res => {
+                    console.log(res);
+                    this.downloading = false;
+                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+                    const link = document.createElement('a');
+                    link.href = downloadUrl;
+                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
+                    document.body.appendChild(link);
+                    link.click();
+                    link.remove();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.downloading = false;
+                    this.$message.error(e.error);
+                });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/rate/del/${row.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        this.$message.error(e.error);
+                    }
+                });
+        }
+    }
+};
+</script>
+<style lang="less" scoped></style>

+ 238 - 0
src/main/vue/src/views/RecordDistrictList.vue

@@ -0,0 +1,238 @@
+<template>
+    <div class="list-view">
+        <div class="filters-container">
+            <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
+            <!-- <el-select class="filter-item" v-model="districtId" clearable v-if="display">
+                <el-option v-for="item in district" :key="item.id" :value="item.name" :label="item.name"></el-option>
+            </el-select> -->
+            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">查询 </el-button>
+            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加 </el-button>
+            <el-button @click="update" type="primary" class="filter-item">一键更新 </el-button>
+            <!-- <el-button @click="distribute" type="primary" class="filter-item">一键分发 </el-button> -->
+            <!-- <el-button
+                @click="download"
+                type="primary"
+                icon="el-icon-download"
+                :loading="downloading"
+                class="filter-item"
+                >导出EXCEL
+            </el-button> -->
+        </div>
+        <el-table
+            :data="tableData"
+            row-key="id"
+            ref="table"
+            header-row-class-name="table-header-row"
+            header-cell-class-name="table-header-cell"
+            row-class-name="table-row"
+            cell-class-name="table-cell"
+            :height="tableHeight"
+        >
+            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
+            <!-- <el-table-column prop="id" label="ID" width="100"> </el-table-column> -->
+            <el-table-column prop="examinationName" label="考级活动名称"> </el-table-column>
+            <el-table-column prop="examinationStartTime" label="考级活动时间">
+                <template slot-scope="{ row }">
+                    <span>{{ row.examinationStartTime }} 至 {{ row.examinationEndTime }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column prop="examinationAgency" label="考级机构名称"> </el-table-column>
+            <el-table-column prop="organizer" label="承办单位名称"> </el-table-column>
+            <el-table-column prop="district" label="考级地点"> </el-table-column>
+            <el-table-column prop="recordTime" label="备案时间"> </el-table-column>
+            <el-table-column prop="status" label="状态" :formatter="statusFormatter" width="50"> </el-table-column>
+            <el-table-column label="操作" align="center" fixed="right" min-width="80">
+                <template slot-scope="{ row }">
+                    <el-button @click="editRow(row)" type="primary" size="mini" plain>查看</el-button>
+                    <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <!-- <div class="multiple-mode-wrapper">
+                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button @click="operation1">批量操作1</el-button>
+                    <el-button @click="operation2">批量操作2</el-button>
+                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div> -->
+            <el-pagination
+                background
+                @size-change="onSizeChange"
+                @current-change="onCurrentChange"
+                :current-page="page"
+                :page-sizes="[10, 20, 30, 40, 50]"
+                :page-size="pageSize"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="totalElements"
+            >
+            </el-pagination>
+        </div>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import pageableTable from '@/mixins/pageableTable';
+
+export default {
+    name: 'RecordList',
+    mixins: [pageableTable],
+    created() {
+        this.$http
+            .get('/district/NJ')
+            .then(res => {
+                this.district = res;
+            })
+            .catch(e => {
+                console.log(e);
+                this.$message.error(e.error);
+            });
+        this.getAdmin();
+    },
+    data() {
+        return {
+            multipleMode: false,
+            search: '',
+            url: '/record/all',
+            downloading: false,
+            categoryOptions: [{ label: '承办单位', value: 'ORGANIZER' }],
+            statusOptions: [{ label: '正常', value: 'NORMAL' }],
+            district: [],
+            districtId: '',
+            display: false
+        };
+    },
+    computed: {
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        },
+        ...mapState(['userInfo'])
+    },
+    methods: {
+        categoryFormatter(row, column, cellValue, index) {
+            let selectedOption = this.categoryOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        },
+        statusFormatter(row, column, cellValue, index) {
+            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        },
+        beforeGetData() {
+            return {
+                search: this.search,
+                query: {
+                    district: '玄武区',
+                    del: false
+                }
+            };
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        addRow() {
+            this.$router.push({
+                path: '/recordEdit',
+                query: {
+                    ...this.$route.query
+                }
+            });
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/recordEdit',
+                query: {
+                    id: row.id
+                }
+            });
+        },
+        download() {
+            this.downloading = true;
+            this.$axios
+                .get('/record/excel', {
+                    responseType: 'blob',
+                    params: { size: 10000 }
+                })
+                .then(res => {
+                    console.log(res);
+                    this.downloading = false;
+                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+                    const link = document.createElement('a');
+                    link.href = downloadUrl;
+                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
+                    document.body.appendChild(link);
+                    link.click();
+                    link.remove();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.downloading = false;
+                    this.$message.error(e.error);
+                });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/record/del/${row.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        this.$message.error(e.error);
+                    }
+                });
+        },
+        distribute() {
+            this.$alert('已分发到各区县!', '分发', {
+                confirmButtonText: '确定'
+            });
+        },
+        update() {
+            this.$http
+                .get('/record/update')
+                .then(res => {
+                    this.getData();
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$message.error(e.error);
+                });
+        },
+        getAdmin() {
+            let data = this.userInfo.authorities;
+            data.forEach(element => {
+                if (element.name === 'ROLE_ADMIN') {
+                    this.display = true;
+                }
+            });
+            if (!this.display) {
+                if (this.userInfo.username.indexOf('xuanwu') >= 0) {
+                    this.userDistrict = '玄武区';
+                }
+            }
+        }
+    }
+};
+</script>
+<style lang="less" scoped></style>

+ 0 - 1
src/main/vue/src/views/RecordList.vue

@@ -72,7 +72,6 @@
     </div>
 </template>
 <script>
-import { mapState } from 'vuex';
 import pageableTable from '@/mixins/pageableTable';
 
 export default {

+ 7 - 7
src/main/vue/src/views/RegulatoryList.vue

@@ -1,17 +1,17 @@
 <template>
     <div class="list-view">
         <div class="filters-container">
-            <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
-            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button>
-            <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加 </el-button>
-            <el-button
+            <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
+            <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </el-button> -->
+            <!-- <el-button @click="addRow" type="primary" icon="el-icon-plus" class="filter-item">添加 </el-button> -->
+            <!-- <el-button
                 @click="download"
                 type="primary"
                 icon="el-icon-download"
                 :loading="downloading"
                 class="filter-item"
                 >导出EXCEL
-            </el-button>
+            </el-button> -->
         </div>
         <el-table
             :data="tableData"
@@ -87,8 +87,8 @@
             <el-table-column prop="other" label="其他"> </el-table-column>
             <el-table-column label="操作" align="center" fixed="right" min-width="150">
                 <template slot-scope="{ row }">
-                    <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
-                    <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button>
+                    <el-button @click="editRow(row)" type="primary" size="mini" plain>详情</el-button>
+                    <!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
                 </template>
             </el-table-column>
         </el-table>

Некоторые файлы не были показаны из-за большого количества измененных файлов