| | |
| | | </div> |
| | | </div> |
| | | <review-dialog ref="reviewRef" ></review-dialog> |
| | | <register ref="regRef" @getList="getList" /> |
| | | <supervise-dialog ref="superRef"></supervise-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ElMessageBox } from 'element-plus' |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | import Breadcrumb from '@/components/Breadcrumb' |
| | | import TopNav from '@/components/TopNav' |
| | | import Hamburger from '@/components/Hamburger' |
| | |
| | | import Cookies from "js-cookie"; |
| | | import reviewDialog from "@/views/safetyReview/institution/components/viewInstitution.vue" |
| | | import superviseDialog from "@/views/safetyReview/userManage/superviseUsers/components/superviseDialog.vue" |
| | | import {Register} from "@/layout/components"; |
| | | import {getUserById} from "@/api/sysUsers"; |
| | | import menu from "@/layout/components/Sidebar/menu"; |
| | | |
| | | const appStore = useAppStore() |
| | | const userStore = useUserStore() |
| | | const settingsStore = useSettingsStore() |
| | | |
| | | const reviewRef = ref(); |
| | | const regRef = ref(null) |
| | | const superRef = ref(); |
| | | const userInfo = ref(); |
| | | onMounted(()=>{ |
| | | if(getToken()){ |
| | | userInfo.value = JSON.parse(Cookies.get('userInfo')) |
| | | console.log("userInfo",userInfo.value ) |
| | | |
| | | } |
| | | getState(); |
| | | }) |
| | | const getState = async () => { |
| | | console.log('navbar') |
| | | const param = { |
| | | userId: userInfo.value.id |
| | | } |
| | | const res = await getUserById(param) |
| | | if(res.code == 200){ |
| | | userInfo.value.state = res.data.state; |
| | | // if(userInfo.value.state===2){ |
| | | // sidebarRouters.value = menu.agencyMenu |
| | | // Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | // location.href = '/project'; |
| | | // } |
| | | // else { |
| | | // location.href = '/noMenu'; |
| | | // } |
| | | |
| | | |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | } |
| | | function toggleSideBar() { |
| | | appStore.toggleSideBar() |
| | | } |
| | |
| | | } |
| | | |
| | | function getInfo() { |
| | | console.log("getInfo") |
| | | console.log("getInfo",userInfo.value) |
| | | //机构用户 |
| | | if(userInfo.value.identity === 1){ |
| | | const obj = { |
| | | agencyId: userInfo.value.agentId |
| | | //审核驳回(可修改) |
| | | if(userInfo.value.state === 3){ |
| | | const obj = { |
| | | id: userInfo.value.id, |
| | | username: userInfo.value.username, |
| | | agencyId: userInfo.value.agentId |
| | | } |
| | | regRef.value.openDialog('reject', obj); |
| | | }else{ |
| | | //审核通过、未审核状态(不可修改) |
| | | const obj = { |
| | | agencyId: userInfo.value.agentId |
| | | } |
| | | reviewRef.value.openDialog(obj,'view') |
| | | } |
| | | reviewRef.value.openDialog(obj,'view') |
| | | } |
| | | //监管用户 |
| | | else if (userInfo.value.identity === 0) { |
| | |
| | | function editPsd() { |
| | | superRef.value.openDialog('pwd', userInfo.value); |
| | | } |
| | | const sidebarRouters = ref([]) |
| | | |
| | | const getList = () => { |
| | | // getState() |
| | | location.href = '/noMenu'; |
| | | // if(userInfo.value.state===2){ |
| | | // sidebarRouters.value = menu.agencyMenu |
| | | // Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | // location.href = '/project'; |
| | | // }else { |
| | | // location.href = '/noMenu'; |
| | | // } |
| | | } |
| | | |
| | | function logout() { |
| | | ElMessageBox.confirm('确定注销并退出系统吗?', '提示', { |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="agency.reportPath" label="加盖公章的《机构信息上报表》"> |
| | | <el-col :span="24"> |
| | | <el-form-item prop="agency.reportPath" label="加盖公章的《机构信息上报表》(请上传加盖公章的营业执照)"> |
| | | <!-- <el-upload--> |
| | | <!-- v-model:file-list="state.fileList"--> |
| | | <!-- class="upload-demo"--> |
| | |
| | | import { Base64 } from 'js-base64' |
| | | import {getAgencyById} from "../../../api/sysUsers"; |
| | | import Cookies from "js-cookie"; |
| | | import {getInstitutionDetail} from "@/api/backManage/insitution"; |
| | | const emit = defineEmits(["getList"]); |
| | | |
| | | const props = { |
| | |
| | | // }); |
| | | }) |
| | | const isAbleEdit = ref(false); |
| | | const isReject = ref(false); |
| | | const openDialog=(type, value)=>{ |
| | | state.title = type === 'add' ? '新增/注册' : type ==='edit' ? '编辑' : '查看' ; |
| | | getArea() |
| | | if(type === 'edit' || type == 'view') { |
| | | state.title = type === 'add' ? '新增/注册' : (type ==='edit' || type ==='reject') ? '编辑' : '查看' ; |
| | | getArea() |
| | | if(type === 'edit' || type == 'view' || type ==='reject') { |
| | | state.registerForm.id = value.id |
| | | state.registerForm.username = value.username |
| | | state.registerForm.phone = value.phone |
| | |
| | | } |
| | | } |
| | | getArea() |
| | | |
| | | state.registerForm.phone = info.user.phone |
| | | startPhone.value = info.user.phone |
| | | state.registerForm.agency.business = info.business.split(',').map(Number) |
| | | if(state.registerForm.agency.attribute === 0){ |
| | | state.registerForm.agency.area = [info.city,info.district].filter(item => { return item && item.trim() }) |
| | |
| | | state.certList = imgUrl ? imgUrl.split(',').map(url => {return {url} }) : [] |
| | | } |
| | | |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | if(type == 'view'){ |
| | | state.isView = true |
| | | } |
| | | if(type === 'reject'){ |
| | | isReject.value = true; |
| | | } |
| | | } |
| | | dialogVisible.value = true |
| | | console.log('state.registerForm',state.registerForm) |
| | | } |
| | | |
| | | const validKey=(key,obj)=>{ |
| | |
| | | }else { |
| | | const {confirmPassword, ...data} = JSON.parse(JSON.stringify(state.registerForm)) |
| | | data.password = Base64.encode(data.password) |
| | | console.log('data',data) |
| | | data.agency.business = data.agency.business.join(',') |
| | | if(isReject.value) { |
| | | data.state = 1; |
| | | } |
| | | // delete data.agency.area |
| | | console.log('data',data) |
| | | editAgency(data).then(res => { |
| | |
| | | type: 'success', |
| | | message: '编辑成功' |
| | | }) |
| | | emit("getList") |
| | | |
| | | dialogVisible.value = false |
| | | state.registerForm.agency.attribute = 0 |
| | | proxy.$refs.registerRef.resetFields() |
| | |
| | | state.fileList = [] |
| | | state.certList = [] |
| | | loading.value = false |
| | | |
| | | emit("getList") |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | } , |
| | | ] |
| | | }, |
| | | ], |
| | | noMenu: [ |
| | | { |
| | | path: '/noMenu', |
| | | name: 'noMenu', |
| | | meta: { title: '提示',icon: 'form',affix: true } |
| | | }, |
| | | ] |
| | | |
| | | } |
| | |
| | | // ] |
| | | // }, |
| | | { |
| | | path: '/noMenu', |
| | | component: Layout, |
| | | redirect: '/noMenu', |
| | | children: [ |
| | | { |
| | | path: '/noMenu', |
| | | component: () => import('@/views/error/noMenu.vue'), |
| | | name: 'noMenu', |
| | | meta: { title: '提示',icon: 'form', affix: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '', |
| | | component: Layout, |
| | | redirect: '/institution', |
| | |
| | | import { getToken, setToken, removeToken } from '@/utils/auth' |
| | | import defAva from '@/assets/images/profile.jpg' |
| | | import Cookies from "js-cookie"; |
| | | import {getUserById} from "@/api/sysUsers"; |
| | | const useUserStore = defineStore( |
| | | 'user', |
| | | { |
| | |
| | | const code = userInfo.code |
| | | const uuid = userInfo.uuid |
| | | const identity = userInfo.identity |
| | | return new Promise((resolve, reject) => { |
| | | login(username, password, code, uuid, identity).then(res => { |
| | | return new Promise( (resolve, reject) => { |
| | | login(username, password, code, uuid, identity).then( async res => { |
| | | setToken(res.data.token) |
| | | Cookies.set('userInfo',JSON.stringify(res.data)) |
| | | await getUserById({userId:res.data.id}).then(res => { |
| | | Cookies.set('userState',JSON.stringify(res.data.state)) |
| | | }) |
| | | this.token = res.data.token |
| | | resolve() |
| | | }).catch(error => { |
| | |
| | | const s_url = sessionObj.url; // 请求地址 |
| | | const s_data = sessionObj.data; // 请求数据 |
| | | const s_time = sessionObj.time; // 请求时间 |
| | | const interval = 1; // 间隔时间(ms),小于此时间视为重复提交 |
| | | const interval = 0; // 间隔时间(ms),小于此时间视为重复提交 |
| | | if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url && s_url!=='/system/common/uploadFile') { |
| | | const message = '数据正在处理,请勿重复提交'; |
| | | console.warn(`[${s_url}]: ` + message) |
| | |
| | | const redirect = ref(undefined); |
| | | |
| | | onMounted(()=>{ |
| | | |
| | | Cookies.remove("userState"); |
| | | }) |
| | | |
| | | const openRegist = ()=>{ |
| | |
| | | // }, {}); |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | if(userInfo.identity === 0 ) { |
| | | //监管用户 |
| | | sidebarRouters.value = menu.adminMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | }else if(userInfo.identity === 1) { |
| | | sidebarRouters.value = menu.agencyMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | const userState = JSON.parse(Cookies.get('userState')) |
| | | console.log("userState",userState) |
| | | //机构用户 |
| | | //未审核状态不显示菜单 |
| | | if(userState !==2 ){ |
| | | sidebarRouters.value = menu.noMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | }else { |
| | | sidebarRouters.value = menu.agencyMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | } |
| | | } |
| | | let path = "" |
| | | if(sidebarRouters.value[0].children && sidebarRouters.value[0].children.length > 0){ |
对比新文件 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="display: flex;align-items: center"> |
| | | <span style="font-size: 18px">当前帐号状态:</span> |
| | | <el-tag :type=" data.state == 0 ? 'info' : data.state == 1 ? '' : data.state == 2 ?'success': data.state == 3 || data.state == 4 ?'danger':''"> |
| | | {{data.stateMsg}} |
| | | </el-tag> |
| | | </div> |
| | | <span style="font-size: 25px;font-weight: 600;margin-top: 20px">请<span v-if="data.state ===3">整改提交后</span>联系监管部门审核</span> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, onMounted, reactive, ref, toRefs, watch} from "vue"; |
| | | import Cookies from "js-cookie"; |
| | | import {getUserById} from "@/api/sysUsers"; |
| | | import {ElMessage} from "element-plus"; |
| | | import menu from "@/layout/components/Sidebar/menu"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const data = reactive({ |
| | | state: null, |
| | | stateMsg: '' |
| | | }); |
| | | |
| | | const userInfo = ref(); |
| | | //页面加载 |
| | | onMounted( () => { |
| | | userInfo.value = JSON.parse(Cookies.get('userInfo')) |
| | | getState(); |
| | | }); |
| | | const sidebarRouters = ref([]) |
| | | const getState = async () => { |
| | | console.log('menu') |
| | | const param = { |
| | | userId: userInfo.value.id |
| | | } |
| | | const res = await getUserById(param) |
| | | if(res.code == 200){ |
| | | data.state = res.data.state; |
| | | data.stateMsg = res.data.state === 0?'暂存':res.data.state === 1 ? '审核中':res.data.state === 2 ? '审批通过':res.data.state === 3? '审批驳回':'已作废'; |
| | | if(res.data.state === 2) { |
| | | sidebarRouters.value = menu.agencyMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | location.href = '/project'; |
| | | } |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .app-container{ |
| | | margin-top: 10%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | } |
| | | </style> |
| | |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="onSubmit" size="default" v-preReClick>确认</el-button> |
| | | </span> |
| | | </template> |
| | | <!-- <template #footer>--> |
| | | <!-- <span class="dialog-footer">--> |
| | | <!-- <el-button @click="dialogVisible = false" size="default">取 消</el-button>--> |
| | | <!-- <el-button type="primary" @click="onSubmit" size="default" v-preReClick>确认</el-button>--> |
| | | <!-- </span>--> |
| | | <!-- </template>--> |
| | | </el-dialog> |
| | | <project-dialog ref="projectRef" @getList="getList"></project-dialog> |
| | | </div> |
| | |
| | | |
| | | const handleSelectionChange = (val) => { |
| | | data.selected = val |
| | | if(data.selected.length>0){ |
| | | emit('getName',data.title,data.selected[data.selected.length - 1]) |
| | | data.dialogVisible = false |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | const search = ()=>{ |