123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <template>
- <div id="detail">
- <el-row>
- <el-col :span="24" class="main">
- <el-col :span="24" class="top">
- <el-button type="primary" size="mini" @click="back">返回</el-button>
- </el-col>
- <el-col :span="24" class="down">
- <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView"></data-table>
- </el-col>
- </el-col>
- </el-row>
- <el-dialog class="dialog" title="意见详情" width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
- <el-col :span="24" class="one">
- <el-col :span="24" class="info">
- {{ form.desc }}
- </el-col>
- </el-col>
- </el-dialog>
- </div>
- </template>
- <script>
- import dataTable from '@common/src/components/frame/filter-page-table.vue';
- import { mapState, createNamespacedHelpers } from 'vuex';
- const { mapActions: verifyRecord } = createNamespacedHelpers('verifyRecord');
- export default {
- name: 'detail',
- props: {},
- components: {
- dataTable,
- },
- data: function() {
- return {
- opera: [
- {
- label: '意见查看',
- method: 'view',
- },
- ],
- fields: [
- { label: '审核类型', prop: 'step', showTip: true },
- { label: '审核人', prop: 'verify', showTip: true },
- { label: '审核电话', prop: 'verify_phone', showTip: true },
- { label: '审核时间', prop: 'create_time', showTip: true },
- {
- label: '状态',
- prop: 'status',
- format: item => {
- return item === '1' ? '审核通过' : item === '-1' ? '审核未通过' : '未识别';
- },
- },
- ],
- list: [],
- total: 0,
- // 意见详情
- dialog: false,
- form: {},
- };
- },
- async created() {
- await this.search();
- },
- methods: {
- ...verifyRecord(['query']),
- // 查询列表
- async search({ skip = 0, limit = 10, ...info } = {}) {
- const res = await this.query({ skip, limit, apply_id: this.id, ...info });
- if (this.$checkRes(res)) {
- this.$set(this, 'list', res.data);
- this.$set(this, `total`, res.total);
- }
- },
- // 意见查看
- toView({ data }) {
- this.$set(this, `form`, data);
- this.dialog = true;
- },
- // 取消查看
- handleClose() {
- this.form = {};
- this.dialog = false;
- },
- // 返回
- back() {
- this.$router.push({ path: '/updateApply' });
- },
- },
- computed: {
- ...mapState(['user']),
- id() {
- return this.$route.query.id;
- },
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- .top {
- text-align: right;
- margin: 0 0 10px 0;
- }
- }
- .dialog {
- /deep/.el-dialog__body {
- min-height: 330px;
- padding: 0px 0px 10px 20px;
- }
- .one {
- .text {
- font-size: 18px;
- font-weight: bold;
- margin: 0 0 5px 0;
- }
- .info {
- font-size: 16px;
- height: 325px;
- overflow-y: auto;
- line-height: 30px;
- }
- }
- }
- </style>
|