From b7143b51f3a50b6fac9c139d291c1fad017daee6 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期五, 08 十二月 2023 15:50:50 +0800 Subject: [PATCH] 使用tinymce富文本 --- src/views/safetyReview/userManage/institutionUsers/index.vue | 40 +++++++++++++++++++++++++--------------- 1 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/views/safetyReview/userManage/institutionUsers/index.vue b/src/views/safetyReview/userManage/institutionUsers/index.vue index 8e72347..3e73bb5 100644 --- a/src/views/safetyReview/userManage/institutionUsers/index.vue +++ b/src/views/safetyReview/userManage/institutionUsers/index.vue @@ -15,17 +15,17 @@ <el-table-column label="信用代码" prop="agency.creditCode" align="center"/> <el-table-column label="用户名" prop="username" align="center" /> <el-table-column label="注册手机号" prop="phone" align="center"/> - <el-table-column label="注册审批" prop="approve" align="center"> + <el-table-column label="注册审批" prop="state" align="center"> <template #default="scope"> - <el-tag :type="scope.row.approve == 0?'success':scope.row.approve == 1?'':'danger'"> - {{scope.row.approve == 0?'审批通过':scope.row.approve == 1?'待审批':'未通过'}} + <el-tag :type=" scope.row.state == 0 ? 'info' : scope.row.state == 1 ? '' : scope.row.state == 2 ?'success': scope.row.state == 3 || scope.row.state == 4 ?'danger':''"> + {{scope.row.state == 0?'暂存':scope.row.state == 1 ? '审核中':scope.row.state == 2 ? '审批通过':scope.row.state == 3? '审批驳回':'已作废' }} </el-tag> </template> </el-table-column> <el-table-column label="状态" prop="status" align="center"> <template #default="scope"> <el-switch - v-if="scope.row.approve == 0" + v-if="scope.row.state == 2" v-model="scope.row.status" :active-value="0" :inactive-value="1" @@ -42,7 +42,7 @@ <el-button link type="primary" @click="openDialog('view',scope.row)">查看</el-button> <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> - <el-button link type="primary" v-if="isSuper && scope.row.approve !==0 " @click="openApprove(scope.row)">审批</el-button> + <el-button link type="primary" v-if="isSuper && scope.row.state ==1 " @click="openApprove(scope.row)">审批</el-button> <el-button link type="primary" @click="openPwd('pwd',scope.row)">修改密码</el-button> </template> </el-table-column> @@ -56,11 +56,12 @@ @pagination="getList" /> <supervise-dialog ref="superRef" @getList=getList></supervise-dialog> - <register ref="regRef"/> + <register ref="regRef" @getList=getList /> + <review-dialog ref="reviewRef" @getList=getList></review-dialog> <el-dialog v-model="appDialog" title="审批用户" width="30%" center align-center> - <el-radio-group v-model="appoveForm.approve" style="width: 100%"> - <el-radio :label="0" size="large" border>通过</el-radio> - <el-radio :label="2" size="large" border>驳回</el-radio> + <el-radio-group v-model="appoveForm.state" style="width: 100%"> + <el-radio :label="2" size="large" border>通过</el-radio> + <el-radio :label="3" size="large" border>驳回</el-radio> </el-radio-group> <template #footer> <span class="dialog-footer"> @@ -73,17 +74,19 @@ </template> <script setup> -import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; +import {getCurrentInstance, nextTick, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; import {ElMessage, ElMessageBox} from "element-plus"; import superviseDialog from "../superviseUsers/components/superviseDialog.vue" import { Register } from "@/layout/components"; import {delMonitor, getAgencyList, changeApprove, changeStatus} from "../../../../api/sysUsers" import Cookies from "js-cookie"; +import reviewDialog from "../../institution/components/viewInstitution.vue" const { proxy } = getCurrentInstance(); const loading = ref(false); const superRef = ref(); const regRef = ref(null) +const reviewRef = ref(); const data = reactive({ queryParams: { pageNum: 1, @@ -95,16 +98,19 @@ appDialog: false, appoveForm: { id: null, - approve: null + state: null } }); const { queryParams, total, dataList, isSuper, appDialog, appoveForm } = toRefs(data); onMounted(()=>{ + const userInfo = JSON.parse(Cookies.get('userInfo')) if(userInfo.identity == 0){data.isSuper = true} - getList() + nextTick(() => { + getList() + }) }) onUnmounted(()=>{ @@ -128,20 +134,24 @@ } const openDialog = (type, value)=>{ - regRef.value.openDialog(type, value); + if(type === 'view') { + reviewRef.value.openDialog(value,type) + }else { + regRef.value.openDialog(type, value); + } } const openApprove =(val)=>{ data.appoveForm = { id: null, - approve: null + state: null } data.appoveForm.id = val.id data.appDialog = true } const confirmApproval = async () =>{ - if(data.appoveForm.approve !== null){ + if(data.appoveForm.state !== null){ const res = await changeApprove(data.appoveForm) if(res.code == 200){ ElMessage.success('审批成功') -- Gitblit v1.9.2