mooho-base-admin-plus 2.10.74 → 2.10.76
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/README.md +0 -2
- package/history.md +2 -0
- package/package/mooho-base-admin-plus.min.esm.js +1414 -1325
- package/package/mooho-base-admin-plus.min.js +40 -40
- package/package/style.css +1 -1
- package/package.json +1 -1
- package/src/components/input/dialog-select.vue +17 -2
- package/src/components/view/filter-edit.vue +1 -1
- package/src/components/view/table-filter.vue +13 -4
- package/src/components/view/view-table-excel.vue +5 -1
- package/src/components/view/view-table.vue +2 -2
- package/src/pages/system/role.vue +53 -3
- package/src/pages/system/user.vue +69 -3
- package/token.txt +2 -0
package/package.json
CHANGED
|
@@ -14,7 +14,15 @@
|
|
|
14
14
|
<Button :size="size" custom-icon="fa fa-search" @click="dialogSelectOpen()"></Button>
|
|
15
15
|
</template>
|
|
16
16
|
</Input>
|
|
17
|
-
<modal-table
|
|
17
|
+
<modal-table
|
|
18
|
+
ref="dialogTable"
|
|
19
|
+
:view-code="source"
|
|
20
|
+
:autoLoad="false"
|
|
21
|
+
:select-enable="multi"
|
|
22
|
+
:check-cross-page="true"
|
|
23
|
+
:footer-enable="multi"
|
|
24
|
+
@on-row-dblclick="dialogTableRowDblclick"
|
|
25
|
+
>
|
|
18
26
|
<template #command="{ row }">
|
|
19
27
|
<Button size="small" v-if="!multi" type="primary" custom-icon="fa fa-check" @click="dialogCheck(row)">{{ $t('Front_Btn_Select') }}</Button>
|
|
20
28
|
</template>
|
|
@@ -311,13 +319,20 @@
|
|
|
311
319
|
* 选中项变化事件
|
|
312
320
|
* @property {object} row 选中行 }
|
|
313
321
|
*/
|
|
314
|
-
this.$emit('on-change', data);
|
|
322
|
+
this.$emit('on-change', data, displayData);
|
|
315
323
|
|
|
316
324
|
this.$refs.dialogTable.close();
|
|
317
325
|
},
|
|
318
326
|
// 关闭
|
|
319
327
|
close() {
|
|
320
328
|
this.$refs.dialogTable.close();
|
|
329
|
+
},
|
|
330
|
+
// 双击行选中
|
|
331
|
+
|
|
332
|
+
dialogTableRowDblclick(row) {
|
|
333
|
+
if (!this.multi) {
|
|
334
|
+
this.dialogCheck(row);
|
|
335
|
+
}
|
|
321
336
|
}
|
|
322
337
|
}
|
|
323
338
|
};
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
</Col>
|
|
323
323
|
<Col v-bind="grid8" v-if="paramData.keyType == '变量'">
|
|
324
324
|
<FormItem label="值" key="val2" prop="val">
|
|
325
|
-
<Input type="text" v-model="paramData.val"
|
|
325
|
+
<Input type="text" v-model="paramData.val">
|
|
326
326
|
<template #prepend>
|
|
327
327
|
<Button custom-icon="fa fa-search" @click="openValueSelect"></Button>
|
|
328
328
|
</template>
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
:source="column.source"
|
|
164
164
|
:source-data-code="column.sourceDataCode"
|
|
165
165
|
:source-display-code="column.sourceDisplayCode"
|
|
166
|
-
:param="getParam(data, column)"
|
|
166
|
+
:param="getParam(data, column, parentData)"
|
|
167
167
|
:controlWidth="column.controlWidth"
|
|
168
168
|
@on-change="selected => onSelectDataChange(column, selected)"
|
|
169
169
|
></dialog-select>
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
:source="column.source"
|
|
178
178
|
:source-data-code="column.sourceDataCode"
|
|
179
179
|
:source-display-code="column.sourceDisplayCode"
|
|
180
|
-
:param="getParam(data, column)"
|
|
180
|
+
:param="getParam(data, column, parentData)"
|
|
181
181
|
:controlWidth="column.controlWidth"
|
|
182
182
|
@on-change="selected => onSelectDataChange(column, selected)"
|
|
183
183
|
></dialog-select>
|
|
@@ -310,6 +310,15 @@
|
|
|
310
310
|
// 字段
|
|
311
311
|
columns: {
|
|
312
312
|
type: Array
|
|
313
|
+
},
|
|
314
|
+
/**
|
|
315
|
+
* 内嵌表格的父对象
|
|
316
|
+
*/
|
|
317
|
+
parentData: {
|
|
318
|
+
type: Object,
|
|
319
|
+
default() {
|
|
320
|
+
return {};
|
|
321
|
+
}
|
|
313
322
|
}
|
|
314
323
|
},
|
|
315
324
|
watch: {
|
|
@@ -625,7 +634,7 @@
|
|
|
625
634
|
break;
|
|
626
635
|
}
|
|
627
636
|
|
|
628
|
-
let param = this.getParam(this.data, column);
|
|
637
|
+
let param = this.getParam(this.data, column, this.parentData);
|
|
629
638
|
|
|
630
639
|
if (
|
|
631
640
|
column.controlType === 'Select' ||
|
|
@@ -801,7 +810,7 @@
|
|
|
801
810
|
return;
|
|
802
811
|
}
|
|
803
812
|
|
|
804
|
-
let param = this.getParam(data, column);
|
|
813
|
+
let param = this.getParam(data, column, this.parentData);
|
|
805
814
|
|
|
806
815
|
if (param != null) {
|
|
807
816
|
param[column.sourceDisplayCode + '_c'] = keyword;
|
|
@@ -874,7 +874,7 @@
|
|
|
874
874
|
let isReadonly = column.isReadonly;
|
|
875
875
|
|
|
876
876
|
// 判断是否只读
|
|
877
|
-
if (column.controlType == 'Label') {
|
|
877
|
+
if (column.controlType == 'Label' || this.readonly) {
|
|
878
878
|
isReadonly = true;
|
|
879
879
|
} else if (!!(column.readonlyJson || '').trim()) {
|
|
880
880
|
let setting = JSON.parse(column.readonlyJson);
|
|
@@ -882,6 +882,8 @@
|
|
|
882
882
|
if (setting.type == 'Condition' || setting.type == 'Expression') {
|
|
883
883
|
isReadonly = this.judgeCondition(setting, this.staticData[row]);
|
|
884
884
|
}
|
|
885
|
+
} else {
|
|
886
|
+
isReadonly = column.isReadonly;
|
|
885
887
|
}
|
|
886
888
|
|
|
887
889
|
// 判断是否显示
|
|
@@ -891,6 +893,8 @@
|
|
|
891
893
|
if (setting.type == 'Condition' || setting.type == 'Expression') {
|
|
892
894
|
isShow = this.judgeCondition(setting, this.staticData[row]);
|
|
893
895
|
}
|
|
896
|
+
} else {
|
|
897
|
+
isShow = column.isShow;
|
|
894
898
|
}
|
|
895
899
|
|
|
896
900
|
if (!isShow) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
@slot 自定义筛选栏
|
|
29
29
|
-->
|
|
30
30
|
<slot name="customFilter"></slot>
|
|
31
|
-
<table-filter ref="tableFilter" :columns="filterColumns" :table-view="tableView" @on-keyup="onKeyup">
|
|
31
|
+
<table-filter ref="tableFilter" :columns="filterColumns" :table-view="tableView" :parent-data="parentData" @on-keyup="onKeyup">
|
|
32
32
|
<template #column="{ column }">
|
|
33
33
|
<!--
|
|
34
34
|
@slot 筛选栏自定义列
|
|
@@ -2882,7 +2882,7 @@
|
|
|
2882
2882
|
return;
|
|
2883
2883
|
}
|
|
2884
2884
|
|
|
2885
|
-
let param = this.getParam(data, column);
|
|
2885
|
+
let param = this.getParam(data, column, this.parentData);
|
|
2886
2886
|
|
|
2887
2887
|
if (param != null) {
|
|
2888
2888
|
param[column.sourceDisplayCode + '_c'] = keyword;
|
|
@@ -39,13 +39,32 @@
|
|
|
39
39
|
<view-table ref="userRoleDataTable" view-code="UserRoleDataEdit" :static="true">
|
|
40
40
|
<template #column="{ row, code }">
|
|
41
41
|
<template v-if="row.controlType === 'TextInput'">
|
|
42
|
-
<Input
|
|
42
|
+
<Input
|
|
43
|
+
type="text"
|
|
44
|
+
size="small"
|
|
45
|
+
v-model="row.propertyValue"
|
|
46
|
+
@on-change="
|
|
47
|
+
() => {
|
|
48
|
+
row.propertyDisplayValue = row.propertyValue;
|
|
49
|
+
}
|
|
50
|
+
"
|
|
51
|
+
/>
|
|
43
52
|
</template>
|
|
44
53
|
<template v-else-if="row.controlType === 'NumberInput'">
|
|
45
|
-
<Input
|
|
54
|
+
<Input
|
|
55
|
+
type="number"
|
|
56
|
+
size="small"
|
|
57
|
+
number
|
|
58
|
+
v-model="row.propertyValue"
|
|
59
|
+
@on-change="
|
|
60
|
+
() => {
|
|
61
|
+
row.propertyDisplayValue = row.propertyValue;
|
|
62
|
+
}
|
|
63
|
+
"
|
|
64
|
+
/>
|
|
46
65
|
</template>
|
|
47
66
|
<template v-else-if="row.controlType === 'Select'">
|
|
48
|
-
<Select size="small" v-model="row.propertyValue" :clearable="true" :transfer="true">
|
|
67
|
+
<Select size="small" v-model="row.propertyValue" :clearable="true" :transfer="true" @on-change="selected => selectChange(selected, row)">
|
|
49
68
|
<Option v-for="item in row._dataSource" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
50
69
|
</Select>
|
|
51
70
|
</template>
|
|
@@ -61,6 +80,7 @@
|
|
|
61
80
|
:multiple="true"
|
|
62
81
|
clearable
|
|
63
82
|
:transfer="true"
|
|
83
|
+
@on-change="selected => multiSelectChange(selected, row)"
|
|
64
84
|
>
|
|
65
85
|
<Option v-for="item in row._dataSource" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
66
86
|
</Select>
|
|
@@ -73,6 +93,7 @@
|
|
|
73
93
|
:source-data-code="row.sourceDataCode"
|
|
74
94
|
:source-display-code="row.sourceDisplayCode"
|
|
75
95
|
:param="getParam(row)"
|
|
96
|
+
@on-change="selected => dialogSelectChange(selected, row)"
|
|
76
97
|
></dialog-select>
|
|
77
98
|
</template>
|
|
78
99
|
<template v-else-if="row.controlType === 'MultiDialogSelect'">
|
|
@@ -84,6 +105,7 @@
|
|
|
84
105
|
:source-data-code="row.sourceDataCode"
|
|
85
106
|
:source-display-code="row.sourceDisplayCode"
|
|
86
107
|
:param="getParam(row)"
|
|
108
|
+
@on-change="(selected, displaySelected) => multiDialogSelectChange(selected, displaySelected, row)"
|
|
87
109
|
></dialog-select>
|
|
88
110
|
</template>
|
|
89
111
|
<template v-else-if="row.controlType === 'Check'">
|
|
@@ -394,6 +416,34 @@
|
|
|
394
416
|
});
|
|
395
417
|
});
|
|
396
418
|
}
|
|
419
|
+
},
|
|
420
|
+
selectChange(selected, row) {
|
|
421
|
+
console.log('selectChange', selected, row);
|
|
422
|
+
|
|
423
|
+
if (selected) {
|
|
424
|
+
row.propertyDisplayValue = row._dataSource.find(item => item.id == selected).name;
|
|
425
|
+
} else {
|
|
426
|
+
row.propertyDisplayValue = null;
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
multiSelectChange(selected, row) {
|
|
430
|
+
let displayValue = [];
|
|
431
|
+
|
|
432
|
+
selected.forEach(item => {
|
|
433
|
+
displayValue.push(row._dataSource.find(i => i.id == item).name);
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
row.propertyDisplayValue = displayValue.join(',');
|
|
437
|
+
},
|
|
438
|
+
dialogSelectChange(selected, row) {
|
|
439
|
+
if (selected) {
|
|
440
|
+
row.propertyDisplayValue = selected.name;
|
|
441
|
+
} else {
|
|
442
|
+
row.propertyDisplayValue = null;
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
multiDialogSelectChange(selected, displaySelected, row) {
|
|
446
|
+
row.propertyDisplayValue = displaySelected;
|
|
397
447
|
}
|
|
398
448
|
}
|
|
399
449
|
};
|
|
@@ -50,13 +50,49 @@
|
|
|
50
50
|
<view-table ref="userRoleDataTable" view-code="UserRoleDataEdit" :static="true">
|
|
51
51
|
<template #column="{ row, code }">
|
|
52
52
|
<template v-if="row.controlType === 'TextInput'">
|
|
53
|
-
<Input
|
|
53
|
+
<Input
|
|
54
|
+
type="text"
|
|
55
|
+
size="small"
|
|
56
|
+
v-model="row.propertyValue"
|
|
57
|
+
@on-change="
|
|
58
|
+
() => {
|
|
59
|
+
row.propertyDisplayValue = row.propertyValue;
|
|
60
|
+
}
|
|
61
|
+
"
|
|
62
|
+
/>
|
|
54
63
|
</template>
|
|
55
64
|
<template v-else-if="row.controlType === 'NumberInput'">
|
|
56
|
-
<Input
|
|
65
|
+
<Input
|
|
66
|
+
type="number"
|
|
67
|
+
size="small"
|
|
68
|
+
number
|
|
69
|
+
v-model="row.propertyValue"
|
|
70
|
+
@on-change="
|
|
71
|
+
() => {
|
|
72
|
+
row.propertyDisplayValue = row.propertyValue;
|
|
73
|
+
}
|
|
74
|
+
"
|
|
75
|
+
/>
|
|
57
76
|
</template>
|
|
58
77
|
<template v-else-if="row.controlType === 'Select'">
|
|
59
|
-
<Select size="small" v-model="row.propertyValue" :clearable="true" :transfer="true">
|
|
78
|
+
<Select size="small" v-model="row.propertyValue" :clearable="true" :transfer="true" @on-change="selected => selectChange(selected, row)">
|
|
79
|
+
<Option v-for="item in row._dataSource" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
80
|
+
</Select>
|
|
81
|
+
</template>
|
|
82
|
+
<template v-else-if="row.controlType === 'MultiSelect'">
|
|
83
|
+
<Select
|
|
84
|
+
size="small"
|
|
85
|
+
:model-value="row.propertyValue == null ? null : JSON.parse(row.propertyValue)"
|
|
86
|
+
@update:model-value="
|
|
87
|
+
$event => {
|
|
88
|
+
row.propertyValue = $event.length == 0 ? null : JSON.stringify($event);
|
|
89
|
+
}
|
|
90
|
+
"
|
|
91
|
+
:multiple="true"
|
|
92
|
+
clearable
|
|
93
|
+
:transfer="true"
|
|
94
|
+
@on-change="selected => multiSelectChange(selected, row)"
|
|
95
|
+
>
|
|
60
96
|
<Option v-for="item in row._dataSource" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
61
97
|
</Select>
|
|
62
98
|
</template>
|
|
@@ -68,6 +104,7 @@
|
|
|
68
104
|
:source-data-code="row.sourceDataCode"
|
|
69
105
|
:source-display-code="row.sourceDisplayCode"
|
|
70
106
|
:param="getParam(row)"
|
|
107
|
+
@on-change="selected => dialogSelectChange(selected, row)"
|
|
71
108
|
></dialog-select>
|
|
72
109
|
</template>
|
|
73
110
|
<template v-else-if="row.controlType === 'MultiDialogSelect'">
|
|
@@ -79,6 +116,7 @@
|
|
|
79
116
|
:source-data-code="row.sourceDataCode"
|
|
80
117
|
:source-display-code="row.sourceDisplayCode"
|
|
81
118
|
:param="getParam(row)"
|
|
119
|
+
@on-change="(selected, displaySelected) => multiDialogSelectChange(selected, displaySelected, row)"
|
|
82
120
|
></dialog-select>
|
|
83
121
|
</template>
|
|
84
122
|
<template v-else-if="row.controlType === 'Check'">
|
|
@@ -299,6 +337,34 @@
|
|
|
299
337
|
this.success('Front_Msg_Success');
|
|
300
338
|
this.$refs.dataPermissionForm.close();
|
|
301
339
|
});
|
|
340
|
+
},
|
|
341
|
+
selectChange(selected, row) {
|
|
342
|
+
console.log('selectChange', selected, row);
|
|
343
|
+
|
|
344
|
+
if (selected) {
|
|
345
|
+
row.propertyDisplayValue = row._dataSource.find(item => item.id == selected).name;
|
|
346
|
+
} else {
|
|
347
|
+
row.propertyDisplayValue = null;
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
multiSelectChange(selected, row) {
|
|
351
|
+
let displayValue = [];
|
|
352
|
+
|
|
353
|
+
selected.forEach(item => {
|
|
354
|
+
displayValue.push(row._dataSource.find(i => i.id == item).name);
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
row.propertyDisplayValue = displayValue.join(',');
|
|
358
|
+
},
|
|
359
|
+
dialogSelectChange(selected, row) {
|
|
360
|
+
if (selected) {
|
|
361
|
+
row.propertyDisplayValue = selected.name;
|
|
362
|
+
} else {
|
|
363
|
+
row.propertyDisplayValue = null;
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
multiDialogSelectChange(selected, displaySelected, row) {
|
|
367
|
+
row.propertyDisplayValue = displaySelected;
|
|
302
368
|
}
|
|
303
369
|
}
|
|
304
370
|
};
|
package/token.txt
ADDED