vue2-client 1.15.53 → 1.15.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -878,7 +878,7 @@ export default {
|
|
878
878
|
}
|
879
879
|
},
|
880
880
|
computed: {
|
881
|
-
...mapState('account', { currUser: 'user' }),
|
881
|
+
...mapState('account', { currUser: 'user', curRoles: 'roles', curPermissions: 'permissions' }),
|
882
882
|
queryParamsName () {
|
883
883
|
if (this.attr.keyName.startsWith('function')) {
|
884
884
|
// 调用异步函数获取内容
|
@@ -1087,7 +1087,7 @@ export default {
|
|
1087
1087
|
},
|
1088
1088
|
async showFormItemFunc () {
|
1089
1089
|
if (this.attr.showFormItemFunc) {
|
1090
|
-
const obj = executeStrFunctionByContext(this, this.attr.showFormItemFunc, [this.form, this.setForm, this.attr, util, this.mode, this.
|
1090
|
+
const obj = executeStrFunctionByContext(this, this.attr.showFormItemFunc, [this.form, this.setForm, this.attr, util, this.mode, this.curPermissions, this.curRoles])
|
1091
1091
|
// 判断是 bool 还是 obj 兼容
|
1092
1092
|
if (typeof obj === 'boolean') {
|
1093
1093
|
this.show = obj
|
@@ -1102,7 +1102,7 @@ export default {
|
|
1102
1102
|
},
|
1103
1103
|
async showQueryFormItemFunc () {
|
1104
1104
|
if (this.attr.showQueryFormItemFunc) {
|
1105
|
-
const obj = executeStrFunctionByContext(this, this.attr.showQueryFormItemFunc, [this.form, this.setForm, this.attr, util, this.mode, this.
|
1105
|
+
const obj = executeStrFunctionByContext(this, this.attr.showQueryFormItemFunc, [this.form, this.setForm, this.attr, util, this.mode, this.curPermissions, this.curRoles])
|
1106
1106
|
// 判断是 bool 还是 obj 兼容
|
1107
1107
|
if (typeof obj === 'boolean') {
|
1108
1108
|
this.show = obj
|
@@ -198,9 +198,10 @@ export default {
|
|
198
198
|
address: '西安市',
|
199
199
|
position: positions[0]
|
200
200
|
}, result)
|
201
|
+
console.warn(JSON.stringify(user))
|
201
202
|
this.setUser(user)
|
202
203
|
this.setPermissions(Vue.$login.r || [])
|
203
|
-
this.setRoles(result.
|
204
|
+
this.setRoles(result.rolestr.split(',') || [])
|
204
205
|
let func
|
205
206
|
switch (this.compatible) {
|
206
207
|
case 'OA' :
|