|
|
@@ -0,0 +1,486 @@
|
|
|
+<template>
|
|
|
+ <div class="list-view">
|
|
|
+ <div class="filters-container">
|
|
|
+ <!-- <el-input placeholder="输入关键字" v-model="search" clearable class="filter-item"></el-input>
|
|
|
+ <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-input
|
|
|
+ placeholder="输入承办单位名称"
|
|
|
+ v-model="search"
|
|
|
+ clearable
|
|
|
+ class="filter-item"
|
|
|
+ @change="getData"
|
|
|
+ ></el-input>
|
|
|
+ <el-select
|
|
|
+ style="width: 220px"
|
|
|
+ v-model="status"
|
|
|
+ placeholder="请选择的状态"
|
|
|
+ class="filter-item"
|
|
|
+ multiple
|
|
|
+ clearable
|
|
|
+ @change="getData"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in statusOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ style="width: 220px"
|
|
|
+ v-model="grade"
|
|
|
+ placeholder="请选择的等级"
|
|
|
+ class="filter-item"
|
|
|
+ clearable
|
|
|
+ multiple
|
|
|
+ @change="getData"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in gradeOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-button @click="getData" type="primary" icon="el-icon-search" class="filter-item">搜索 </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="name" label="承办单位"> </el-table-column>
|
|
|
+ <el-table-column prop="createdAt" label="申请时间" min-width="100"></el-table-column>
|
|
|
+ <el-table-column prop="year" label="年度" min-width="60"> </el-table-column>
|
|
|
+ <el-table-column prop="gradingOrganization" label="考级机构" min-width="100"> </el-table-column>
|
|
|
+ <el-table-column prop="status1" label="状态" min-width="100"> </el-table-column>
|
|
|
+ <el-table-column prop="score" label="分数">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span v-if="row.score">{{ row.score }}</span>
|
|
|
+ <span v-else>暂无</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="grade" label="等级">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span v-if="row.grade == '优秀'"><el-link :underline="false" type="success">优秀</el-link></span>
|
|
|
+ <span v-else-if="row.grade == '合格'"
|
|
|
+ ><el-link :underline="false" type="warning">合格</el-link></span
|
|
|
+ >
|
|
|
+ <span v-else-if="row.grade == '不合格'"
|
|
|
+ ><el-link :underline="false" type="danger">不合格</el-link></span
|
|
|
+ >
|
|
|
+ <span v-else><el-link type="info" :underline="false">暂无</el-link></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="right" fixed="right" min-width="200">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-button
|
|
|
+ v-if="row.status === 'FIRST_REVIEW_PENDING'"
|
|
|
+ :loading="row.loading"
|
|
|
+ @click="audit(row, 'ASSIGN_EXPERT', '区县管理员已审核上报')"
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ >
|
|
|
+ 同意上报
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="row.status === 'FIRST_REVIEW_PENDING'"
|
|
|
+ :loading="row.loading"
|
|
|
+ @click="dismiss(row)"
|
|
|
+ type="warning"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ >
|
|
|
+ 退回
|
|
|
+ </el-button>
|
|
|
+ <!-- <el-button v-if="row.status === 'SUBMIT_GRADE'" @click="openScore(row)" type="warning" plain
|
|
|
+ >填写分数</el-button
|
|
|
+ > -->
|
|
|
+ <el-button
|
|
|
+ @click="supervision(row.id)"
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ v-if="(row.status === 'ASSIGN_EXPERT') & display"
|
|
|
+ >分配专家组</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="row.status === 'SUBMIT_PAPER_MATERIALS'"
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ size="mini"
|
|
|
+ @click="saveComplete(row)"
|
|
|
+ :loading="loading"
|
|
|
+ >收取纸质材料</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="editRow(row)" type="primary" size="mini" plain>
|
|
|
+ <span v-if="row.status == 'FIRST_REVIEW_PENDING' || row.status == 'FIRST_REVIEW_PENDING'"
|
|
|
+ >审核材料</span
|
|
|
+ >
|
|
|
+ <span v-else>查看详情</span>
|
|
|
+ </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>
|
|
|
+ <el-dialog title="退回缘由" :visible.sync="dialogDismiss" width="500px" center>
|
|
|
+ <div style="height: 150px;width:330px;margin:2px auto">
|
|
|
+ <label style="margin-right: 10px">退回缘由</label>
|
|
|
+ <el-select
|
|
|
+ v-model="reason"
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择缘由"
|
|
|
+ style="width: 70%"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in dismissReason" :key="item" :label="item" :value="item"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ <div style="margin: 45px 0 0 240px">
|
|
|
+ <el-button type="primary" @click="saveDismiss">确认</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { mapState } from 'vuex';
|
|
|
+import pageableTable from '@/mixins/pageableTable';
|
|
|
+import rateStatus from '@/mixins/rateStatus';
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'RateDistrictList',
|
|
|
+ mixins: [pageableTable, rateStatus],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ multipleMode: false,
|
|
|
+ search: '',
|
|
|
+ url: '/rate/all2',
|
|
|
+ downloading: false,
|
|
|
+ supervisor: [],
|
|
|
+ dialogVisible: false,
|
|
|
+ rateId: '',
|
|
|
+ display: false,
|
|
|
+ gradeOptions: [
|
|
|
+ { label: '优秀', value: 'EXCELLENT' },
|
|
|
+ { label: '合格', value: 'ELIGIBLE' },
|
|
|
+ { label: '不合格', value: 'NOT_ELIGIBLE' }
|
|
|
+ ],
|
|
|
+ dialogDismiss: false,
|
|
|
+ reason: '',
|
|
|
+ dismissReason: ['资料不全', '缺少附件', '无资格'],
|
|
|
+ form: {},
|
|
|
+ grade: '',
|
|
|
+ status: [],
|
|
|
+ loading: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ selection() {
|
|
|
+ return this.$refs.table.selection.map(i => i.id);
|
|
|
+ },
|
|
|
+ ...mapState(['userInfo'])
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$http
|
|
|
+ .post('/user/authority', { authorityName: 'ROLE_EXPERT' })
|
|
|
+ .then(res => {
|
|
|
+ this.supervisor = res;
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ gradeFormatter(row, column, cellValue, index) {
|
|
|
+ let selectedOption = this.gradeOptions.find(i => i.value === cellValue);
|
|
|
+ if (selectedOption) {
|
|
|
+ return selectedOption.label;
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ },
|
|
|
+ beforeGetData() {
|
|
|
+ // return {
|
|
|
+ // search: this.search,
|
|
|
+ // sort: 'createdAt,desc',
|
|
|
+ // query: {
|
|
|
+ // submit: true
|
|
|
+ // }
|
|
|
+ // };
|
|
|
+ let data = { query: { submit: true, district: this.userInfo.district } };
|
|
|
+ if (this.search) {
|
|
|
+ data.search = this.search;
|
|
|
+ }
|
|
|
+ if (this.status) {
|
|
|
+ data.query.status = this.status;
|
|
|
+ }
|
|
|
+ if (this.grade) {
|
|
|
+ data.query.grade = this.grade;
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ 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: '/rateAudit',
|
|
|
+ path: '/organization',
|
|
|
+ query: {
|
|
|
+ // organId: row.organizationId,
|
|
|
+ // rateId: row.id
|
|
|
+ id: row.id,
|
|
|
+ status: row.status
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ download() {
|
|
|
+ this.downloading = true;
|
|
|
+ let data = { size: 1000, query: { submit: true, district: this.userInfo.district } };
|
|
|
+ this.$axios
|
|
|
+ .get('/rate/excel', {
|
|
|
+ responseType: 'blob',
|
|
|
+ params: data
|
|
|
+ })
|
|
|
+ .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, remark) {
|
|
|
+ this.$set(row, 'loading', true);
|
|
|
+
|
|
|
+ this.$confirm('确认此承办单位同意上报?', '提示', {
|
|
|
+ confirmButtonText: '同意上报',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$http
|
|
|
+ .post('/rate/audit', {
|
|
|
+ id: row.id,
|
|
|
+ status: status,
|
|
|
+ score: 0,
|
|
|
+ remark: remark
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.$set(row, 'loading', false);
|
|
|
+ this.$message.success('上报成功');
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$set(row, 'loading', false);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ this.$set(row, 'loading', false);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ dismiss(row) {
|
|
|
+ // this.$prompt('请输入驳回缘由', '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消'
|
|
|
+ // })
|
|
|
+ // .then(({ value }) => {
|
|
|
+ // this.audit(row, 'FIRST_REVIEW_DENY', value);
|
|
|
+ // })
|
|
|
+ // .catch(() => {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'info',
|
|
|
+ // message: '取消输入'
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ this.dialogDismiss = true;
|
|
|
+ this.form = row;
|
|
|
+ },
|
|
|
+ saveDismiss() {
|
|
|
+ this.audit(this.form, 'FIRST_REVIEW_DENY', this.reason);
|
|
|
+ this.form = '';
|
|
|
+ this.reason = '';
|
|
|
+ this.dialogDismiss = false;
|
|
|
+ },
|
|
|
+ supervision(id) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/assignExpert',
|
|
|
+ query: {
|
|
|
+ id: 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);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getAdmin() {
|
|
|
+ let data = this.userInfo.authorities;
|
|
|
+ let display = false;
|
|
|
+ data.forEach(element => {
|
|
|
+ if (element.name === 'ROLE_ADMIN') {
|
|
|
+ display = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.display = display;
|
|
|
+ return display;
|
|
|
+ },
|
|
|
+ saveComplete(row) {
|
|
|
+ this.$set(row, 'loading', true);
|
|
|
+ this.$confirm('确认已收到承办单位提交的纸质材料?', '提示', {
|
|
|
+ confirmButtonText: '已收到',
|
|
|
+ cancelButtonText: '暂未收到',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$http
|
|
|
+ .post('/rate/paperMaterial', {
|
|
|
+ id: row.id,
|
|
|
+ status: 'COLLECT_PAPER_MATERIALS',
|
|
|
+ remark: '区县管理员已确认收到承办单位提交的纸质材料'
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.$message.success('确认成功');
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ this.$set(row, 'loading', false);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.el-link {
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
+</style>
|