|
|
@@ -3,73 +3,153 @@
|
|
|
<div class="content">
|
|
|
<div class="title"></div>
|
|
|
<div class="logout_bg">
|
|
|
- <el-image style="width:40px;height:40px;margin-right: 40px" :src="manager" fit="cover" @click="toProfile" v-if="roles.includes('super_admin') || roles.includes('sys_admin')"/>
|
|
|
- <el-image style="width:40px;height:40px;margin-right: 20px" :src="logouticon" fit="cover" @click="loginOut"/>
|
|
|
+ <el-tooltip content="重置密码" placement="bottom" effect="light" @click.stop.prevent>
|
|
|
+ <el-image style="width:40px;height:40px;margin-right: 40px" :src="password" fit="cover" @click="resetPassword" v-if="!roles.includes('lj_org_admin') && !roles.includes('super_admin') && !roles.includes('sys_admin')"/>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip content="管理界面" placement="bottom" effect="light" @click.stop.prevent>
|
|
|
+ <el-image style="width:40px;height:40px;margin-right: 40px" :src="manager" fit="cover" @click="toProfile" v-if="roles.includes('lj_org_admin') || roles.includes('super_admin') || roles.includes('sys_admin')"/>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip content="退出系统" placement="bottom" effect="light" @click.stop.prevent>
|
|
|
+ <el-image style="width:40px;height:40px;margin-right: 20px" :src="logouticon" fit="cover" @click="loginOut"/>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
<div class="col">
|
|
|
<div class="row2" style="background-color: #30CA79;">
|
|
|
- <img class="image2" :src="img1" alt />
|
|
|
- <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(44)">社区居家养老管理系统</el-link></div>
|
|
|
+ <img class="image2" :src="img1" alt/>
|
|
|
+ <div class="text2">
|
|
|
+ <el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(44)">社区居家养老管理系统
|
|
|
+ </el-link>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="row2" style="background-color: #32B19E;">
|
|
|
- <img class="image2" :src="img2" alt />
|
|
|
- <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(43)">智慧养老IOT物联网平台</el-link></div>
|
|
|
-<!-- <div class="text2"><a class="aaa" href="http://web.poteviohealth.com/boss/" target="_blank">智慧养老IOT物联网平台</a></div>-->
|
|
|
+ <img class="image2" :src="img2" alt/>
|
|
|
+ <div class="text2">
|
|
|
+ <el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(43)">智慧养老IOT物联网平台
|
|
|
+ </el-link>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="text2"><a class="aaa" href="http://web.poteviohealth.com/boss/" target="_blank">智慧养老IOT物联网平台</a></div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col col3" style="background-color: #00734D;">
|
|
|
- <div class="text0"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(45)">康养大数据平台</el-link></div>
|
|
|
+ <div class="text0">
|
|
|
+ <el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(45)">康养大数据平台</el-link>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="col">
|
|
|
<div class="row2" style="background-color: #4C4B6B;">
|
|
|
- <img class="image2" :src="img5" alt />
|
|
|
- <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(50)">机构养老运营管理系统</el-link></div>
|
|
|
+ <img class="image2" :src="img5" alt/>
|
|
|
+ <div class="text2">
|
|
|
+ <el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(50)">机构养老运营管理系统
|
|
|
+ </el-link>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="row2" style="background-color: #4A8EE2;">
|
|
|
- <img class="image2" :src="img6" alt />
|
|
|
- <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(49)">旅居养老运营管理系统</el-link></div>
|
|
|
+ <img class="image2" :src="img6" alt/>
|
|
|
+ <div class="text2">
|
|
|
+ <el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(49)">旅居养老运营管理系统
|
|
|
+ </el-link>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col">
|
|
|
<div class="row2" style="background-color: #F3B144;">
|
|
|
<img class="image2" :src="img7" alt/>
|
|
|
- <div class="text2"><el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(46)">运营数据分析平台</el-link></div>
|
|
|
+ <div class="text2">
|
|
|
+ <el-link style="font-size: 30px;color: #fff; font-weight: 500" @click="handlerLink(46)">运营数据分析平台</el-link>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="row2" style="background-color: #AACC05;">
|
|
|
- <img class="image2" :src="img8" alt />
|
|
|
+ <img class="image2" :src="img8" alt/>
|
|
|
<div class="text2">建设中</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog v-model="dialogFormVisible" title="重置密码" width="400" draggable @close="reset(formRef)">
|
|
|
+ <el-form ref="formRef" :model="passwordModel" :rules="rules" :label-width="100">
|
|
|
+ <el-form-item :label="t('profile.password.oldPassword')" prop="oldPassword">
|
|
|
+ <InputPassword v-model="passwordModel.oldPassword"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="t('profile.password.newPassword')" prop="newPassword">
|
|
|
+ <InputPassword v-model="passwordModel.newPassword" strength/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="t('profile.password.confirmPassword')" prop="confirmPassword">
|
|
|
+ <InputPassword v-model="passwordModel.confirmPassword" strength/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <XButton :title="t('common.save')" type="primary" @click="submit(formRef)"/>
|
|
|
+ <XButton :title="t('common.reset')" type="danger" @click="reset(formRef)"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
+
|
|
|
</template>
|
|
|
-<script setup>
|
|
|
- import { ElMessageBox } from 'element-plus'
|
|
|
- import { useUserStore } from '@/store/modules/user'
|
|
|
- import { useTagsViewStore } from '@/store/modules/tagsView'
|
|
|
- import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
|
|
+<script lang="ts" setup>
|
|
|
+ import {FormInstance, FormRules} from 'element-plus'
|
|
|
+ import {ElMessageBox} from 'element-plus'
|
|
|
+ import {useUserStore} from '@/store/modules/user'
|
|
|
+ import {useTagsViewStore} from '@/store/modules/tagsView'
|
|
|
+ import {CACHE_KEY, useCache} from '@/hooks/web/useCache'
|
|
|
import * as UserApi from '@/api/system/user'
|
|
|
- import img1 from '@/assets/imgs/main/icon1.png';
|
|
|
- import img2 from '@/assets/imgs/main/icon2.png';
|
|
|
- import img3 from '@/assets/imgs/main/icon3.png';
|
|
|
- import img5 from '@/assets/imgs/main/icon5.png';
|
|
|
- import img6 from '@/assets/imgs/main/icon6.png';
|
|
|
- import img7 from '@/assets/imgs/main/icon7.png';
|
|
|
- import img8 from '@/assets/imgs/main/icon8.png';
|
|
|
- import logouticon from '@/assets/imgs/main/logout.png'
|
|
|
- import manager from '@/assets/imgs/main/manager.png'
|
|
|
-
|
|
|
+ import img1 from '@/assets/imgs/main/icon1.png';
|
|
|
+ import img2 from '@/assets/imgs/main/icon2.png';
|
|
|
+ import img3 from '@/assets/imgs/main/icon3.png';
|
|
|
+ import img5 from '@/assets/imgs/main/icon5.png';
|
|
|
+ import img6 from '@/assets/imgs/main/icon6.png';
|
|
|
+ import img7 from '@/assets/imgs/main/icon7.png';
|
|
|
+ import img8 from '@/assets/imgs/main/icon8.png';
|
|
|
+ import logouticon from '@/assets/imgs/main/logout.png'
|
|
|
+ import manager from '@/assets/imgs/main/manager.png'
|
|
|
+ import password from '@/assets/imgs/main/password.png'
|
|
|
import * as authUtil from '@/utils/auth'
|
|
|
+ import {InputPassword} from '@/components/InputPassword'
|
|
|
+ import {updateUserPassword} from '@/api/system/user/profile'
|
|
|
+
|
|
|
+ const message = useMessage()
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
const tagsViewStore = useTagsViewStore()
|
|
|
- const { t } = useI18n()
|
|
|
+ const {t} = useI18n()
|
|
|
//
|
|
|
- const { push, replace } = useRouter()
|
|
|
+ const {push, replace} = useRouter()
|
|
|
+
|
|
|
+ const {wsCache} = useCache()
|
|
|
+
|
|
|
+ const formLabelWidth = '140px'
|
|
|
+ const dialogFormVisible = ref(false)
|
|
|
+ const formRef = ref<FormInstance>()
|
|
|
+ const passwordModel = reactive({
|
|
|
+ oldPassword: '',
|
|
|
+ newPassword: '',
|
|
|
+ confirmPassword: ''
|
|
|
+ })
|
|
|
+
|
|
|
+ // 表单校验
|
|
|
+ const equalToPassword = (_rule, value, callback) => {
|
|
|
+ if (passwordModel.newPassword !== value) {
|
|
|
+ callback(new Error(t('profile.password.diffPwd')))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const rules = reactive<FormRules>({
|
|
|
+ oldPassword: [
|
|
|
+ {required: true, message: t('profile.password.oldPwdMsg'), trigger: 'blur'},
|
|
|
+ {min: 6, max: 20, message: t('profile.password.pwdRules'), trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ newPassword: [
|
|
|
+ {required: true, message: t('profile.password.newPwdMsg'), trigger: 'blur'},
|
|
|
+ {min: 6, max: 20, message: t('profile.password.pwdRules'), trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ confirmPassword: [
|
|
|
+ {required: true, message: t('profile.password.cfPwdMsg'), trigger: 'blur'},
|
|
|
+ {required: true, validator: equalToPassword, trigger: 'blur'}
|
|
|
+ ]
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
- const { wsCache } = useCache()
|
|
|
const loginOut = async () => {
|
|
|
try {
|
|
|
await ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {
|
|
|
@@ -79,26 +159,34 @@
|
|
|
})
|
|
|
await userStore.loginOut()
|
|
|
tagsViewStore.delAllViews()
|
|
|
+
|
|
|
replace('/login?redirect=/Navicate')
|
|
|
- } catch {}
|
|
|
+ } catch {
|
|
|
+ }
|
|
|
}
|
|
|
const toProfile = async () => {
|
|
|
push('/system/user')
|
|
|
}
|
|
|
|
|
|
- const handlerLink = async (id) =>{
|
|
|
- try {
|
|
|
- const linkUrl = await UserApi.getLinkInfo(id, authUtil.getAccessToken())
|
|
|
- console.log(linkUrl)
|
|
|
- if (linkUrl != "") {
|
|
|
- window.open(linkUrl);
|
|
|
- }
|
|
|
- }catch (error) {
|
|
|
- console.log(error);
|
|
|
- }
|
|
|
+ const resetPassword = async () => {
|
|
|
+ dialogFormVisible.value = true
|
|
|
+ }
|
|
|
+
|
|
|
+ const handlerLink = async (id) => {
|
|
|
+ if (id==50){
|
|
|
+ window.open("http://106.37.165.111:9080/pc/PCLGO001Action_001.action");
|
|
|
+ }else{
|
|
|
+ try {
|
|
|
+ const linkUrl = await UserApi.getLinkInfo(id, authUtil.getAccessToken())
|
|
|
+ if (linkUrl != "") {
|
|
|
+ window.open(linkUrl);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
const roles = wsCache.get(CACHE_KEY.USER).roles
|
|
|
- console.log("######################",roles)
|
|
|
// const checkRoles = (value)=>{
|
|
|
// const permissionRoles = value
|
|
|
// const roles = wsCache.get(CACHE_KEY.USER).roles
|
|
|
@@ -107,6 +195,22 @@
|
|
|
// })
|
|
|
// return hasRole;
|
|
|
// }
|
|
|
+ const submit = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return
|
|
|
+ formEl.validate(async (valid) => {
|
|
|
+ if (valid) {
|
|
|
+ await updateUserPassword(passwordModel.oldPassword, passwordModel.newPassword)
|
|
|
+ message.success(t('common.updateSuccess'))
|
|
|
+ formEl.resetFields()
|
|
|
+ dialogFormVisible.value=false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const reset = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return
|
|
|
+ formEl.resetFields()
|
|
|
+ }
|
|
|
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -124,11 +228,12 @@
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
|
|
|
- .content{
|
|
|
+ .content {
|
|
|
width: 1660px;
|
|
|
height: 777px;
|
|
|
}
|
|
|
- .title{
|
|
|
+
|
|
|
+ .title {
|
|
|
width: 655px;
|
|
|
height: 62px;
|
|
|
// position: absolute;
|
|
|
@@ -139,7 +244,7 @@
|
|
|
background-repeat: no-repeat;
|
|
|
}
|
|
|
|
|
|
- .main{
|
|
|
+ .main {
|
|
|
width: 1680px;
|
|
|
height: 600px;
|
|
|
margin-top: 115px;
|
|
|
@@ -152,47 +257,54 @@
|
|
|
font-size: 32px;
|
|
|
}
|
|
|
|
|
|
- .col{
|
|
|
+ .col {
|
|
|
width: 400px;
|
|
|
height: 600px;
|
|
|
margin-right: 10px;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
- .col3{
|
|
|
+ .col3 {
|
|
|
background-image: url("/src/assets/imgs/main/icon0.png");
|
|
|
}
|
|
|
|
|
|
|
|
|
- .row3{
|
|
|
+ .row3 {
|
|
|
width: 400px;
|
|
|
height: 190px;
|
|
|
margin-bottom: 15px;
|
|
|
display: flex;
|
|
|
}
|
|
|
- .image3{
|
|
|
+
|
|
|
+ .image3 {
|
|
|
margin: 61px 24px 61px 40px;
|
|
|
}
|
|
|
- .text3{
|
|
|
+
|
|
|
+ .text3 {
|
|
|
margin-top: 51px;
|
|
|
}
|
|
|
- .row2{
|
|
|
+
|
|
|
+ .row2 {
|
|
|
width: 400px;
|
|
|
height: 290px;
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
- .text0{
|
|
|
+
|
|
|
+ .text0 {
|
|
|
text-align: center;
|
|
|
margin-top: 110px;
|
|
|
}
|
|
|
- .image2{
|
|
|
+
|
|
|
+ .image2 {
|
|
|
margin: 69px 160px 20px 160px;
|
|
|
}
|
|
|
- .text2{
|
|
|
+
|
|
|
+ .text2 {
|
|
|
text-align: center;
|
|
|
width: 100%;
|
|
|
}
|
|
|
- .aaa{
|
|
|
+
|
|
|
+ .aaa {
|
|
|
color: #fff;
|
|
|
}
|
|
|
|
|
|
@@ -200,7 +312,7 @@
|
|
|
position: absolute;
|
|
|
top: 80px;
|
|
|
right: 60px;
|
|
|
- width: 200px;
|
|
|
+ width: 260px;
|
|
|
height: 50px;
|
|
|
cursor: pointer;
|
|
|
}
|