mooho-base-admin-plus 2.10.82 → 2.10.84
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/history.md +2 -0
- package/package/mooho-base-admin-plus.min.esm.js +5225 -5215
- package/package/mooho-base-admin-plus.min.js +91 -92
- package/package/style.css +1 -1
- package/package.json +1 -1
- package/src/components/input/dialog-select.vue +40 -19
- package/src/components/view/view-table.vue +6 -1
- package/src/i18n/locale/en-US.js +1 -1
- package/src/i18n/locale/lang.js +1 -1
- package/src/i18n/locale/zh-CN.js +1 -1
- package/token.txt +1 -1
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* 字段代码
|
|
54
54
|
*/
|
|
55
55
|
columnCode: {
|
|
56
|
-
type:
|
|
56
|
+
type: String
|
|
57
57
|
},
|
|
58
58
|
/**
|
|
59
59
|
* 数据源
|
|
@@ -125,25 +125,33 @@
|
|
|
125
125
|
...mapActions('admin/dataView', { loadDataView: 'load' }),
|
|
126
126
|
// 显示选择项
|
|
127
127
|
showSelected() {
|
|
128
|
+
// 处理空值情况
|
|
128
129
|
if (this.modelValue == null) {
|
|
129
130
|
this.selected = null;
|
|
130
131
|
this.selectedData = null;
|
|
131
132
|
return;
|
|
132
|
-
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// 多选模式处理
|
|
136
|
+
if (this.multi) {
|
|
137
|
+
// 验证是否为有效JSON格式
|
|
133
138
|
if (!this.isJSON(this.modelValue)) {
|
|
134
139
|
this.selected = null;
|
|
135
140
|
this.selectedData = null;
|
|
136
141
|
return;
|
|
137
142
|
}
|
|
138
143
|
|
|
144
|
+
// 构建查询过滤器
|
|
139
145
|
let filter = {
|
|
140
146
|
page: 1,
|
|
141
147
|
per: 999
|
|
142
148
|
};
|
|
143
149
|
filter[this.sourceDataCode] = JSON.parse(this.modelValue).join(',');
|
|
144
150
|
|
|
151
|
+
// 加载数据视图并查询
|
|
145
152
|
this.loadDataView(this.source).then(async view => {
|
|
146
153
|
if (view.dataView.isCustom) {
|
|
154
|
+
// 自定义模型查询
|
|
147
155
|
let res = await customModelApi.query(view.dataView.model, filter, [this.sourceDataCode, this.sourceDisplayCode]);
|
|
148
156
|
if (res.data.length > 0) {
|
|
149
157
|
this.selected = res.data
|
|
@@ -153,10 +161,9 @@
|
|
|
153
161
|
.join(',');
|
|
154
162
|
|
|
155
163
|
this.selectedData = res.data;
|
|
156
|
-
|
|
157
|
-
//this.$forceUpdate();
|
|
158
164
|
}
|
|
159
165
|
} else if (view.dataView.isDataSource) {
|
|
166
|
+
// 数据源查询
|
|
160
167
|
let res = await dataSourceApi.query(view.dataView.dataSource, filter);
|
|
161
168
|
if (res.table.length > 0) {
|
|
162
169
|
this.selected = res.table
|
|
@@ -165,10 +172,9 @@
|
|
|
165
172
|
})
|
|
166
173
|
.join(',');
|
|
167
174
|
this.selectedData = res.table;
|
|
168
|
-
|
|
169
|
-
//this.$forceUpdate();
|
|
170
175
|
}
|
|
171
176
|
} else {
|
|
177
|
+
// 普通模型查询
|
|
172
178
|
let res = await modelApi.query(view.dataView.model, filter, [this.sourceDataCode, this.sourceDisplayCode]);
|
|
173
179
|
if (res.data.length > 0) {
|
|
174
180
|
this.selected = res.data
|
|
@@ -178,53 +184,68 @@
|
|
|
178
184
|
.join(',');
|
|
179
185
|
|
|
180
186
|
this.selectedData = res.data;
|
|
181
|
-
|
|
182
|
-
//this.$forceUpdate();
|
|
183
187
|
}
|
|
184
188
|
}
|
|
185
189
|
});
|
|
186
190
|
} else {
|
|
191
|
+
// 单选模式处理
|
|
187
192
|
if (this.rawData && this.columnCode.endsWith('ID')) {
|
|
188
|
-
|
|
193
|
+
// 从原始数据中获取模型信息
|
|
194
|
+
let model = this.parseData(this.rawData, this.columnCode.substring(0, this.columnCode.length - 2));
|
|
195
|
+
|
|
196
|
+
if (model != null) {
|
|
197
|
+
let code;
|
|
189
198
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
this.
|
|
199
|
+
if (this.sourceDataCode == 'id') {
|
|
200
|
+
code = this.sourceDisplayCode;
|
|
201
|
+
} else if (this.sourceDataCode.endsWith('ID')) {
|
|
202
|
+
let pre = this.sourceDataCode.substring(0, this.sourceDataCode.length - 2) + '.';
|
|
193
203
|
|
|
194
|
-
|
|
204
|
+
if (this.sourceDisplayCode.startsWith(pre)) {
|
|
205
|
+
code = this.sourceDisplayCode.substring(pre.length);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if (code) {
|
|
210
|
+
let selected = this.parseData(model, code);
|
|
211
|
+
|
|
212
|
+
if (selected) {
|
|
213
|
+
this.selected = selected;
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
195
217
|
}
|
|
196
218
|
}
|
|
197
219
|
|
|
220
|
+
// 构建单选查询过滤器
|
|
198
221
|
let filter = {
|
|
199
222
|
page: 1,
|
|
200
223
|
per: 1
|
|
201
224
|
};
|
|
202
225
|
filter[this.sourceDataCode] = this.modelValue;
|
|
203
226
|
|
|
227
|
+
// 加载数据视图并查询
|
|
204
228
|
this.loadDataView(this.source).then(async view => {
|
|
205
229
|
if (view.dataView.isCustom) {
|
|
230
|
+
// 自定义模型查询
|
|
206
231
|
let res = await customModelApi.query(view.dataView.model, filter);
|
|
207
232
|
if (res.data.length > 0) {
|
|
208
233
|
this.selected = this.parseData(res.data[0], this.sourceDisplayCode);
|
|
209
234
|
this.selectedData = res.data[0];
|
|
210
|
-
|
|
211
|
-
//this.$forceUpdate();
|
|
212
235
|
}
|
|
213
236
|
} else if (view.dataView.isDataSource) {
|
|
237
|
+
// 数据源查询
|
|
214
238
|
let res = await dataSourceApi.query(view.dataView.dataSource, filter);
|
|
215
239
|
if (res.table.length > 0) {
|
|
216
240
|
this.selected = this.parseData(res.table[0], this.sourceDisplayCode);
|
|
217
241
|
this.selectedData = res.table[0];
|
|
218
|
-
|
|
219
|
-
//this.$forceUpdate();
|
|
220
242
|
}
|
|
221
243
|
} else {
|
|
244
|
+
// 普通模型查询
|
|
222
245
|
let res = await modelApi.query(view.dataView.model, filter);
|
|
223
246
|
if (res.data.length > 0) {
|
|
224
247
|
this.selected = this.parseData(res.data[0], this.sourceDisplayCode);
|
|
225
248
|
this.selectedData = res.data[0];
|
|
226
|
-
|
|
227
|
-
//this.$forceUpdate();
|
|
228
249
|
}
|
|
229
250
|
}
|
|
230
251
|
});
|
|
@@ -2142,7 +2142,12 @@
|
|
|
2142
2142
|
}
|
|
2143
2143
|
|
|
2144
2144
|
if (code) {
|
|
2145
|
-
|
|
2145
|
+
let objModel = model;
|
|
2146
|
+
if (sender.sourceDataCode.endsWith('ID')) {
|
|
2147
|
+
objModel = this.parseData(model, sender.sourceDataCode.substr(0, sender.sourceDataCode.length - 2));
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
this.setData(data, code, objModel);
|
|
2146
2151
|
}
|
|
2147
2152
|
|
|
2148
2153
|
this.onDataChange(data, sender, model);
|
package/src/i18n/locale/en-US.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./lang.js";const t={i:{locale:"en-US",select:{placeholder:"Select",noMatch:"No matching data",loading:"Loading"},table:{noDataText:"No Data",noFilteredDataText:"No filter data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},datepicker:{selectDate:"Select date",selectTime:"Select time",startTime:"Start Time",endTime:"End Time",clear:"Clear",ok:"OK",datePanelLabel:"[mmmm] [yyyy]",month:"Month",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",year:"Year",weekStartDay:"0",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Source",target:"Target"},filterPlaceholder:"Search here",notFoundText:"Not Found"},modal:{okText:"OK",cancelText:"Cancel"},poptip:{okText:"OK",cancelText:"Cancel"},page:{prev:"Previous Page",next:"Next Page",total:"Total",item:"item",items:"items",prev5:"Previous 5 Pages",next5:"Next 5 Pages",page:"/page",goto:"Goto",p:""},rate:{star:"Star",stars:"Stars"},time:{before:" ago",after:" after",just:"just now",seconds:" seconds",minutes:" minutes",hours:" hours",days:" days"},tree:{emptyText:"No Data"}}};e(t);export{t as default};
|
|
1
|
+
import{s as e}from"./lang.js";const t={i:{locale:"en-US",select:{placeholder:"Select",noMatch:"No matching data",loading:"Loading"},table:{noDataText:"No Data",noFilteredDataText:"No filter data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},datepicker:{selectDate:"Select date",selectTime:"Select time",startTime:"Start Time",endTime:"End Time",clear:"Clear",ok:"OK",datePanelLabel:"[mmmm] [yyyy]",month:"Month",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",year:"Year",weekStartDay:"0",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Source",target:"Target"},filterPlaceholder:"Search here",notFoundText:"Not Found"},modal:{okText:"OK",cancelText:"Cancel"},poptip:{okText:"OK",cancelText:"Cancel"},page:{prev:"Previous Page",next:"Next Page",total:"Total",item:"item",items:"items",prev5:"Previous 5 Pages",next5:"Next 5 Pages",page:"/page",goto:"Goto",p:""},rate:{star:"Star",stars:"Stars"},time:{before:" ago",after:" after",just:"just now",seconds:" seconds",minutes:" minutes",hours:" hours",days:" days"},tree:{emptyText:"No Data"}}};e(t);export{t as default};
|
package/src/i18n/locale/lang.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=typeof window!="undefined";function n(i){e&&typeof window.viewuiplus!="undefined"&&("langs"in viewuiplus||(viewuiplus.langs={}),viewuiplus.langs[i.i.locale]=i)}export{n as s};
|
|
1
|
+
const e=typeof window!="undefined";function n(i){e&&typeof window.viewuiplus!="undefined"&&("langs"in viewuiplus||(viewuiplus.langs={}),viewuiplus.langs[i.i.locale]=i)}export{n as s};
|
package/src/i18n/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./lang.js";const t={i:{locale:"zh-CN",select:{placeholder:"\u8BF7\u9009\u62E9",noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D"},table:{noDataText:"\u6682\u65E0\u6570\u636E",noFilteredDataText:"\u6682\u65E0\u7B5B\u9009\u7ED3\u679C",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},datepicker:{selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",clear:"\u6E05\u7A7A",ok:"\u786E\u5B9A",datePanelLabel:"[yyyy\u5E74] [m\u6708]",month:"\u6708",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",year:"\u5E74",weekStartDay:"0",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{m1:"1\u6708",m2:"2\u6708",m3:"3\u6708",m4:"4\u6708",m5:"5\u6708",m6:"6\u6708",m7:"7\u6708",m8:"8\u6708",m9:"9\u6708",m10:"10\u6708",m11:"11\u6708",m12:"12\u6708"}},transfer:{titles:{source:"\u6E90\u5217\u8868",target:"\u76EE\u7684\u5217\u8868"},filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",notFoundText:"\u5217\u8868\u4E3A\u7A7A"},modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},poptip:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},page:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",total:"\u5171",item:"\u6761",items:"\u6761",prev5:"\u5411\u524D 5 \u9875",next5:"\u5411\u540E 5 \u9875",page:"\u6761/\u9875",goto:"\u8DF3\u81F3",p:"\u9875"},rate:{star:"\u661F",stars:"\u661F"},time:{before:"\u524D",after:"\u540E",just:"\u521A\u521A",seconds:"\u79D2",minutes:"\u5206\u949F",hours:"\u5C0F\u65F6",days:"\u5929"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"}}};e(t);export{t as default};
|
|
1
|
+
import{s as e}from"./lang.js";const t={i:{locale:"zh-CN",select:{placeholder:"\u8BF7\u9009\u62E9",noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D"},table:{noDataText:"\u6682\u65E0\u6570\u636E",noFilteredDataText:"\u6682\u65E0\u7B5B\u9009\u7ED3\u679C",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},datepicker:{selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",clear:"\u6E05\u7A7A",ok:"\u786E\u5B9A",datePanelLabel:"[yyyy\u5E74] [m\u6708]",month:"\u6708",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",year:"\u5E74",weekStartDay:"0",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{m1:"1\u6708",m2:"2\u6708",m3:"3\u6708",m4:"4\u6708",m5:"5\u6708",m6:"6\u6708",m7:"7\u6708",m8:"8\u6708",m9:"9\u6708",m10:"10\u6708",m11:"11\u6708",m12:"12\u6708"}},transfer:{titles:{source:"\u6E90\u5217\u8868",target:"\u76EE\u7684\u5217\u8868"},filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",notFoundText:"\u5217\u8868\u4E3A\u7A7A"},modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},poptip:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},page:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",total:"\u5171",item:"\u6761",items:"\u6761",prev5:"\u5411\u524D 5 \u9875",next5:"\u5411\u540E 5 \u9875",page:"\u6761/\u9875",goto:"\u8DF3\u81F3",p:"\u9875"},rate:{star:"\u661F",stars:"\u661F"},time:{before:"\u524D",after:"\u540E",just:"\u521A\u521A",seconds:"\u79D2",minutes:"\u5206\u949F",hours:"\u5C0F\u65F6",days:"\u5929"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"}}};e(t);export{t as default};
|
package/token.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
echo "//registry.npmjs.org/:_authToken=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" >> .npmrc
|
|
2
|
-
npm config set //registry.npmjs.org/:_authToken=
|
|
2
|
+
npm config set //registry.npmjs.org/:_authToken=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
|