|
|
@@ -36,7 +36,8 @@
|
|
|
|
|
|
<el-dropdown-item command="personalInfo">
|
|
|
<div class="icon-item">
|
|
|
- <i class="iconfont icon-user-info"></i>
|
|
|
+ <!-- <i class="iconfont icon-user-info"></i> -->
|
|
|
+ <i class="iconfont-5039297 icon-gerenxinxi"></i>
|
|
|
<span>个人信息</span>
|
|
|
</div>
|
|
|
</el-dropdown-item>
|
|
|
@@ -95,7 +96,9 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item v-if="templateList.length > 1 && this.$store.state.user.showCustomPage">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="templateList.length > 1 && $store.state.user.showCustomPage"
|
|
|
+ >
|
|
|
<el-dropdown placement="left-start" @command="handleTemplateChange">
|
|
|
<div class="icon-item switch-position">
|
|
|
<ht-icon class="iconfont" name="block" />
|
|
|
@@ -127,14 +130,16 @@
|
|
|
|
|
|
<el-dropdown-item command="modifyPassword">
|
|
|
<div class="icon-item">
|
|
|
- <i class="iconfont icon-user-pwd-modify"></i>
|
|
|
+ <!-- <i class="iconfont icon-user-pwd-modify"></i> -->
|
|
|
+ <i class="iconfont-5039297 icon-xiugaimima"></i>
|
|
|
<span>修改密码</span>
|
|
|
</div>
|
|
|
</el-dropdown-item>
|
|
|
|
|
|
<el-dropdown-item command="logout" divided>
|
|
|
<div class="user-logout icon-item">
|
|
|
- <i class="iconfont icon-user-logout"></i>
|
|
|
+ <!-- <i class="iconfont icon-user-logout"></i> -->
|
|
|
+ <i class="iconfont-5039297 icon-tuichuxitong"></i>
|
|
|
<span>退出登录</span>
|
|
|
</div>
|
|
|
</el-dropdown-item>
|
|
|
@@ -166,7 +171,13 @@
|
|
|
import req from '@/utils/request'
|
|
|
import { getFiles } from '@/api/base.js'
|
|
|
import { setCookie } from '@/api/newApi'
|
|
|
- import { getLayoutTemplates, getBpmDataTemplateInfo, getLayoutDetail,saveTemplate, delTemplateUser } from '@/api/portal.js'
|
|
|
+ import {
|
|
|
+ getLayoutTemplates,
|
|
|
+ getBpmDataTemplateInfo,
|
|
|
+ getLayoutDetail,
|
|
|
+ saveTemplate,
|
|
|
+ delTemplateUser,
|
|
|
+ } from '@/api/portal.js'
|
|
|
export default {
|
|
|
name: 'HtAvatar',
|
|
|
components: {
|
|
|
@@ -315,59 +326,68 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getBpmDataTemplateInfo(){
|
|
|
+ getBpmDataTemplateInfo() {
|
|
|
let param = {
|
|
|
- alias: 'mhmb'
|
|
|
+ alias: 'mhmb',
|
|
|
}
|
|
|
- getBpmDataTemplateInfo(param).then(res=>{
|
|
|
- if(res.code === 200){
|
|
|
+ getBpmDataTemplateInfo(param).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
this.modeltemplateId = res.value.id
|
|
|
this.getTemplates('init')
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
- getTemplates(type, item){
|
|
|
+ getTemplates(type, item) {
|
|
|
let param = {
|
|
|
templateId: this.modeltemplateId,
|
|
|
queryFilter: {
|
|
|
- pageBean:{},
|
|
|
- querys:[{property: "F_zzid", value: this.userDetail.curOrgId, group: "main", operation: "EQUAL", relation: "AND"}],
|
|
|
- sorter:[]
|
|
|
- }
|
|
|
+ pageBean: {},
|
|
|
+ querys: [
|
|
|
+ {
|
|
|
+ property: 'F_zzid',
|
|
|
+ value: this.userDetail.curOrgId,
|
|
|
+ group: 'main',
|
|
|
+ operation: 'EQUAL',
|
|
|
+ relation: 'AND',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ sorter: [],
|
|
|
+ },
|
|
|
}
|
|
|
- getLayoutTemplates(param).then(res=>{
|
|
|
- const _this = this
|
|
|
- if(res.rows.length){
|
|
|
- let arr = []
|
|
|
- res.rows.forEach(item=>{
|
|
|
- if(item.sfqy === '1'){
|
|
|
- arr.push(item)
|
|
|
- }
|
|
|
- })
|
|
|
- this.templateList = arr
|
|
|
- this.templateList.forEach(item=>{
|
|
|
- this.$set(item, 'selected', false)
|
|
|
- })
|
|
|
- if(type === 'init'){
|
|
|
- this.getCurrenTemplate('init')
|
|
|
- } else if(type === 'change'){
|
|
|
- if(this.compareTemplateList(item.mbmc) === -1){
|
|
|
- this.$message.error('该门户模板已禁用')
|
|
|
- } else {
|
|
|
- this.saveTemplate(item)
|
|
|
+ getLayoutTemplates(param)
|
|
|
+ .then((res) => {
|
|
|
+ const _this = this
|
|
|
+ if (res.rows.length) {
|
|
|
+ let arr = []
|
|
|
+ res.rows.forEach((item) => {
|
|
|
+ if (item.sfqy === '1') {
|
|
|
+ arr.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.templateList = arr
|
|
|
+ this.templateList.forEach((item) => {
|
|
|
+ this.$set(item, 'selected', false)
|
|
|
+ })
|
|
|
+ if (type === 'init') {
|
|
|
+ this.getCurrenTemplate('init')
|
|
|
+ } else if (type === 'change') {
|
|
|
+ if (this.compareTemplateList(item.mbmc) === -1) {
|
|
|
+ this.$message.error('该门户模板已禁用')
|
|
|
+ } else {
|
|
|
+ this.saveTemplate(item)
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.$store.state.user.templateLoading = false
|
|
|
}
|
|
|
- } else {
|
|
|
- this.$store.state.user.templateLoading = false
|
|
|
- }
|
|
|
- }).finally(()=>{
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
- compareTemplateList(name){
|
|
|
+ compareTemplateList(name) {
|
|
|
let templateNames = []
|
|
|
- this.templateList.forEach(item=>{
|
|
|
+ this.templateList.forEach((item) => {
|
|
|
templateNames.push(item.mbmc)
|
|
|
})
|
|
|
const result = templateNames.indexOf(name)
|
|
|
@@ -376,59 +396,59 @@
|
|
|
getCurrenTemplate(type) {
|
|
|
let param = {
|
|
|
userId: this.userDetail.user.userId,
|
|
|
- orgId: this.userDetail.curOrgId
|
|
|
+ orgId: this.userDetail.curOrgId,
|
|
|
}
|
|
|
- getLayoutDetail(param).then(res=>{
|
|
|
- if(res.code === 200){
|
|
|
- let selectTemplate = ''
|
|
|
- let result = ''
|
|
|
- if(res.value){
|
|
|
- result = res.value.templateName
|
|
|
- if (this.compareTemplateList(result) === -1){
|
|
|
- this.$store.state.user.nowTemplate = ''
|
|
|
- this.delTemplate()
|
|
|
- return
|
|
|
- }
|
|
|
- } else {
|
|
|
- if(this.$store.state.user.nowTemplate){
|
|
|
- result = this.$store.state.user.nowTemplate
|
|
|
+ getLayoutDetail(param)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ let selectTemplate = ''
|
|
|
+ let result = ''
|
|
|
+ if (res.value) {
|
|
|
+ result = res.value.templateName
|
|
|
+ if (this.compareTemplateList(result) === -1) {
|
|
|
+ this.$store.state.user.nowTemplate = ''
|
|
|
+ this.delTemplate()
|
|
|
+ return
|
|
|
+ }
|
|
|
} else {
|
|
|
- if(this.templateList.length){
|
|
|
- result = this.templateList[0].mbmc
|
|
|
+ if (this.$store.state.user.nowTemplate) {
|
|
|
+ result = this.$store.state.user.nowTemplate
|
|
|
} else {
|
|
|
- result = '模板A'
|
|
|
+ if (this.templateList.length) {
|
|
|
+ result = this.templateList[0].mbmc
|
|
|
+ } else {
|
|
|
+ result = '模板A'
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ this.templateList.forEach((item) => {
|
|
|
+ if (item.mbmc === result) {
|
|
|
+ this.$set(item, 'selected', true)
|
|
|
+ selectTemplate = item.mbmc
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$store.state.user.nowTemplate = result
|
|
|
}
|
|
|
- this.templateList.forEach(item=>{
|
|
|
- if(item.mbmc === result){
|
|
|
- this.$set(item, 'selected', true)
|
|
|
- selectTemplate = item.mbmc
|
|
|
- }
|
|
|
- })
|
|
|
- this.$store.state.user.nowTemplate = result
|
|
|
- }
|
|
|
- }).finally(()=>{
|
|
|
- if(type === 'init'){
|
|
|
- this.$store.state.user.templateLoading = false
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ if (type === 'init') {
|
|
|
+ this.$store.state.user.templateLoading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- delTemplate(){
|
|
|
+ delTemplate() {
|
|
|
let param = {
|
|
|
userId: this.userDetail.user.userId,
|
|
|
- orgId: this.userDetail.curOrgId
|
|
|
+ orgId: this.userDetail.curOrgId,
|
|
|
}
|
|
|
- delTemplateUser(param).then(res=>{
|
|
|
- if(res.code === 200){
|
|
|
+ delTemplateUser(param).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
this.getCurrenTemplate()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- handleTemplateChange(item){
|
|
|
- if(item.mbmc === this.$store.state.user.nowTemplate){
|
|
|
+ handleTemplateChange(item) {
|
|
|
+ if (item.mbmc === this.$store.state.user.nowTemplate) {
|
|
|
return
|
|
|
} else {
|
|
|
this.$confirm('是否切换门户模板?', '提示', {
|
|
|
@@ -441,28 +461,29 @@
|
|
|
this.getTemplates('change', item)
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
- saveTemplate(item){
|
|
|
+ saveTemplate(item) {
|
|
|
let param = {
|
|
|
userId: this.userDetail.user.userId,
|
|
|
orgId: this.userDetail.curOrgId,
|
|
|
- templateName: item.mbmc
|
|
|
+ templateName: item.mbmc,
|
|
|
}
|
|
|
- saveTemplate(param).then(res=>{
|
|
|
- if(res.code === 200){
|
|
|
- this.templateList.forEach(template=>{
|
|
|
- if (template.mbmc === item.mbmc){
|
|
|
- this.$set(template, 'selected', true)
|
|
|
- this.$store.state.user.nowTemplate = item.mbmc
|
|
|
- } else {
|
|
|
- this.$set(template, 'selected', false)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }).finally(()=>{
|
|
|
- this.$store.state.user.templateLoading = false
|
|
|
- })
|
|
|
+ saveTemplate(param)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.templateList.forEach((template) => {
|
|
|
+ if (template.mbmc === item.mbmc) {
|
|
|
+ this.$set(template, 'selected', true)
|
|
|
+ this.$store.state.user.nowTemplate = item.mbmc
|
|
|
+ } else {
|
|
|
+ this.$set(template, 'selected', false)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.$store.state.user.templateLoading = false
|
|
|
+ })
|
|
|
},
|
|
|
handleLangChange(lang) {
|
|
|
this.setDefaultLang(lang)
|