Commit c8bd797d authored by renjintao's avatar renjintao

bug

parent 19655e94
......@@ -14,15 +14,15 @@
 
</div>
</div>
</template>
<script>
export default {
name: 'state',
data() {
return {
name: '',
isMore:false,
isMore: false,
item: {},
items: [],
data: []
......@@ -36,8 +36,8 @@ export default {
type: {
type: String,
default: 'text',
validator: function(value) {
return ['text', 'tag', 'dot','icon'].indexOf(value) != -1
validator: function (value) {
return ['text', 'tag', 'dot', 'icon'].indexOf(value) != -1
}
},
code: {
......@@ -66,7 +66,7 @@ export default {
},
methods: {
setName(v) {
if ((v+"").indexOf(',')==-1) {
if ((v + "").indexOf(',') == -1) {
var item
this.data.map((u) => {
if (u.code == v) {
......@@ -77,20 +77,26 @@ export default {
this.name = item.name
this.item = item
} else {
if (!this.value && typeof (this.value) != "undefined") {
this.name = this.value
} else {
this.name = ''
}
}
} else {
this.isMore=true;
var items=[];
var ul=(v+"").split(',')
this.isMore = true;
var items = [];
var ul = (v + "").split(',')
this.data.map((u) => {
if (ul.indexOf(u.code)>-1) {
u.tagcolor=u.color|'default'
u.style={color: u.color|'inherit'}
if (ul.indexOf(u.code) > -1) {
u.tagcolor = u.color | 'default'
u.style = {
color: u.color | 'inherit'
}
items.push(u)
}
})
this.items=items;
this.items = items;
}
}
},
......@@ -111,10 +117,8 @@ export default {
return {}
}
return {
color:
this.item && this.item.color != '' && this.item.color != null
? this.item.color
: 'inherit'
color: this.item && this.item.color != '' && this.item.color != null ?
this.item.color : 'inherit'
}
}
},
......@@ -123,8 +127,8 @@ export default {
this.setName(v)
// this.$forceUpdate()
},
data(v){
if(v.length>0){
data(v) {
if (v.length > 0) {
this.setName(this.value)
this.$forceUpdate()
}
......
<template>
<MainLayout />
<MainLayout />
</template>
<script>
import MainLayout from "./basic-layout";
// 配置
import Setting from "@/setting";
// 方法
import { getHeaderName, getMenuSider, getSiderSubmenu } from "@/libs/system";
import {
getHeaderName,
getMenuSider,
getSiderSubmenu
} from "@/libs/system";
// 菜单和路由
import menuHeader from "@/menu/header";
import menuSider from "@/menu/sider";
import { frameInRoutes } from "@/router/routes";
import {
frameInRoutes
} from "@/router/routes";
export default {
middleware: "auth",
components: { MainLayout },
components: {
MainLayout
},
data() {
return {
menus: []
......@@ -67,7 +76,9 @@ export default {
methods: {
getMenu() {
this.$http.sysUser.getusermenu({id:"portal"}).then(res => {
this.$http.sysUser.getusermenu({
id: "portal"
}).then(res => {
if (res.result) {
this.menus = res.result[0].children;
this.toMenu(this.menus);
......
......@@ -302,6 +302,7 @@ export default {
key: "licensedToWork",
title: this.l("licensedToWork"),
align: "left",
code: "User.base.workLicense",
},
{
key: "positionId",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment