mooho-base-admin-plus 0.4.13 → 0.4.14
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
|
@@ -1101,6 +1101,11 @@
|
|
|
1101
1101
|
// }
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
|
+
// 设置数据的可见性和只读属性
|
|
1105
|
+
this.data.forEach(item => {
|
|
1106
|
+
this.setShowStatus(item);
|
|
1107
|
+
});
|
|
1108
|
+
|
|
1104
1109
|
// 如果这行数据有子集,需要添加展开加载方法
|
|
1105
1110
|
if (this.treeEnable) {
|
|
1106
1111
|
this.data.forEach(item => {
|
|
@@ -1735,33 +1740,7 @@
|
|
|
1735
1740
|
},
|
|
1736
1741
|
// 数据变化事件
|
|
1737
1742
|
onDataChange(data, sender, selected) {
|
|
1738
|
-
|
|
1739
|
-
// 判断是否需要显示
|
|
1740
|
-
if (!!(column.showJson || '').trim()) {
|
|
1741
|
-
if (data._isShow == null) {
|
|
1742
|
-
data._isShow = {};
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
let setting = JSON.parse(column.showJson);
|
|
1746
|
-
|
|
1747
|
-
if (setting.type == 'Condition' || setting.type == 'Expression') {
|
|
1748
|
-
data._isShow[column.code] = this.judgeCondition(setting, data);
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
// 判断是否只读
|
|
1753
|
-
if (!!(column.readonlyJson || '').trim()) {
|
|
1754
|
-
if (data._isReadonly == null) {
|
|
1755
|
-
data._isReadonly = {};
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
let setting = JSON.parse(column.readonlyJson);
|
|
1759
|
-
|
|
1760
|
-
if (setting.type == 'Condition' || setting.type == 'Expression') {
|
|
1761
|
-
data._isReadonly[column.code] = this.judgeCondition(setting, data);
|
|
1762
|
-
}
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1743
|
+
this.setShowStatus(data);
|
|
1765
1744
|
|
|
1766
1745
|
//this.$forceUpdate();
|
|
1767
1746
|
|
|
@@ -2295,6 +2274,36 @@
|
|
|
2295
2274
|
|
|
2296
2275
|
return result;
|
|
2297
2276
|
},
|
|
2277
|
+
// 设置可见性和只读
|
|
2278
|
+
setShowStatus(data) {
|
|
2279
|
+
for (let column of this.columns) {
|
|
2280
|
+
// 判断是否需要显示
|
|
2281
|
+
if (!!(column.showJson || '').trim()) {
|
|
2282
|
+
if (data._isShow == null) {
|
|
2283
|
+
data._isShow = {};
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
let setting = JSON.parse(column.showJson);
|
|
2287
|
+
|
|
2288
|
+
if (setting.type == 'Condition' || setting.type == 'Expression') {
|
|
2289
|
+
data._isShow[column.code] = this.judgeCondition(setting, data);
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
// 判断是否只读
|
|
2294
|
+
if (!!(column.readonlyJson || '').trim()) {
|
|
2295
|
+
if (data._isReadonly == null) {
|
|
2296
|
+
data._isReadonly = {};
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
let setting = JSON.parse(column.readonlyJson);
|
|
2300
|
+
|
|
2301
|
+
if (setting.type == 'Condition' || setting.type == 'Expression') {
|
|
2302
|
+
data._isReadonly[column.code] = this.judgeCondition(setting, data);
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
},
|
|
2298
2307
|
// 获取多语言名称
|
|
2299
2308
|
getNameI18n(column) {
|
|
2300
2309
|
if (column) {
|
package/src/index.js
CHANGED
|
@@ -56,6 +56,7 @@ import NoticeList from './components/home/notice-list.vue';
|
|
|
56
56
|
|
|
57
57
|
// API
|
|
58
58
|
import modelApi from './api/model';
|
|
59
|
+
import customModelApi from './api/customModel';
|
|
59
60
|
import dataSourceApi from './api/dataSource';
|
|
60
61
|
import taskApi from './api/task';
|
|
61
62
|
import applicationApi from './api/application';
|
|
@@ -199,4 +200,23 @@ const routeChanged = to => {
|
|
|
199
200
|
|
|
200
201
|
export default API;
|
|
201
202
|
|
|
202
|
-
export {
|
|
203
|
+
export {
|
|
204
|
+
pages,
|
|
205
|
+
App,
|
|
206
|
+
store,
|
|
207
|
+
i18n,
|
|
208
|
+
setting,
|
|
209
|
+
basicLayout,
|
|
210
|
+
lodop,
|
|
211
|
+
request,
|
|
212
|
+
mixinPage,
|
|
213
|
+
modelApi,
|
|
214
|
+
customModelApi,
|
|
215
|
+
dataSourceApi,
|
|
216
|
+
taskApi,
|
|
217
|
+
applicationApi,
|
|
218
|
+
util,
|
|
219
|
+
createRouter,
|
|
220
|
+
created,
|
|
221
|
+
routeChanged
|
|
222
|
+
};
|