Commit c8bd797d authored by renjintao's avatar renjintao

bug

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