|
@@ -0,0 +1,235 @@
|
|
|
+<template>
|
|
|
+ <div id="index">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="one">
|
|
|
+ <data-table
|
|
|
+ :fields="fields"
|
|
|
+ :opera="opera"
|
|
|
+ :total="total"
|
|
|
+ :data="list"
|
|
|
+ @query="search"
|
|
|
+ @check="toCheck"
|
|
|
+ >
|
|
|
+ <template #options="{ item }">
|
|
|
+ <template v-if="item.prop === 'status'">
|
|
|
+ <el-option
|
|
|
+ v-for="(i, index) in statusList"
|
|
|
+ :key="index"
|
|
|
+ :label="i.label"
|
|
|
+ :value="i.value"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </data-table>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-dialog
|
|
|
+ :title="dialog.title"
|
|
|
+ :visible.sync="dialog.show"
|
|
|
+ width="40%"
|
|
|
+ :before-close="toClose"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ custom-class="dialog"
|
|
|
+ >
|
|
|
+ <div class="info">
|
|
|
+ <el-col :span="24" class="info_1">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="用户名称" prop="user_name">
|
|
|
+ <el-input v-model="form.user_name" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="审核状态" prop="status">
|
|
|
+ <el-radio-group v-model="form.status">
|
|
|
+ <el-radio label="3">审核通过</el-radio>
|
|
|
+ <el-radio label="4">审核拒绝</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="修改内容" prop="update_content">
|
|
|
+ <el-input
|
|
|
+ v-model="form.update_content"
|
|
|
+ type="textarea"
|
|
|
+ disabled
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="审核意见" prop="desc">
|
|
|
+ <el-input
|
|
|
+ v-model="form.desc"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入审核意见"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="btn">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="onSubmit('form')"
|
|
|
+ >保存</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import dataTable from '@/components/free/filter-page-table.vue'
|
|
|
+import { mapState, mapGetters, createNamespacedHelpers } from 'vuex'
|
|
|
+const { mapActions: updateapply } = createNamespacedHelpers('updateapply')
|
|
|
+const moment = require('moment')
|
|
|
+export default {
|
|
|
+ name: 'Index',
|
|
|
+ components: { dataTable },
|
|
|
+ props: {},
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ fields: [
|
|
|
+ { label: '用户名称', prop: 'user_name', filter: true },
|
|
|
+ { label: '修改内容', prop: 'update_content' },
|
|
|
+ {
|
|
|
+ label: '审核状态',
|
|
|
+ prop: 'status',
|
|
|
+ format: (i) =>
|
|
|
+ i == '0'
|
|
|
+ ? '待审中'
|
|
|
+ : i == '1'
|
|
|
+ ? '机构审核通过,基础处待审中'
|
|
|
+ : i == '2'
|
|
|
+ ? '机构审核拒绝'
|
|
|
+ : i == '3'
|
|
|
+ ? '基础处待审通过'
|
|
|
+ : i == '4'
|
|
|
+ ? '基础处待审拒绝'
|
|
|
+ : '',
|
|
|
+ filter: 'select'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ opera: [
|
|
|
+ {
|
|
|
+ label: '审核',
|
|
|
+ method: 'check',
|
|
|
+ display: (i) => i.status == '1'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 审核状态
|
|
|
+ statusList: [
|
|
|
+ { label: '待审中', value: '0' },
|
|
|
+ { label: '机构审核通过,基础处待审中', value: '1' },
|
|
|
+ { label: '机构审核拒绝', value: '2' },
|
|
|
+ { label: '基础处待审通过', value: '3' },
|
|
|
+ { label: '基础处待审拒绝', value: '4' }
|
|
|
+ ],
|
|
|
+ dialog: { title: '修改申请审核', show: false },
|
|
|
+ form: {},
|
|
|
+ info: {},
|
|
|
+ rules: {
|
|
|
+ desc: [{ required: true, message: '请输入审核意见', trigger: 'blur' }],
|
|
|
+ status: [
|
|
|
+ { required: true, message: '请选择审核状态', trigger: 'change' }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ await this.search()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...updateapply(['query', 'update']),
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ const res = await this.query({ skip, limit, ...info })
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data)
|
|
|
+ this.$set(this, `total`, res.total)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 查看结果
|
|
|
+ toCheck({ data }) {
|
|
|
+ this.$set(this, `info`, data)
|
|
|
+ this.$set(this, `form`, {
|
|
|
+ user_name: data.user_name,
|
|
|
+ update_content: data.update_content
|
|
|
+ })
|
|
|
+ this.dialog = { title: '修改申请审核', show: true }
|
|
|
+ },
|
|
|
+ // 保存
|
|
|
+ async onSubmit(formName) {
|
|
|
+ this.$refs[formName].validate(async(valid) => {
|
|
|
+ if (valid) {
|
|
|
+ const arr = { id: this.info._id, status: this.form.status }
|
|
|
+ const data = {
|
|
|
+ examine_user: this.name,
|
|
|
+ examine_date: moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
+ desc: this.form.desc,
|
|
|
+ status: this.form.status
|
|
|
+ }
|
|
|
+ const record = [...this.info.record, data]
|
|
|
+ arr.record = record
|
|
|
+ const res = await this.update(arr)
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message({ type: `success`, message: res.msg })
|
|
|
+ this.toClose()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: `error`,
|
|
|
+ message: res.msg || res.errmsg + ':' + res.details
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 关闭
|
|
|
+ toClose() {
|
|
|
+ this.search()
|
|
|
+ this.dialog = { title: '修改申请审核', show: false }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['user_id', 'name'])
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ test: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {}
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main {
|
|
|
+ padding: 25px 30px 30px;
|
|
|
+}
|
|
|
+.dialog {
|
|
|
+ .info {
|
|
|
+ min-height: 150px;
|
|
|
+ max-height: 430px;
|
|
|
+ overflow-y: auto;
|
|
|
+ .info_1 {
|
|
|
+ .btn {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+/deep/.el-dialog__body {
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+</style>
|