mooho-base-admin-plus 2.4.27 → 2.4.28

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.4.27",
4
+ "version": "2.4.28",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -142,6 +142,26 @@
142
142
  <Option v-for="item in getDataSource(data, column)" :key="item.id" :value="item.id">{{ item.name }}</Option>
143
143
  </Select>
144
144
  </template>
145
+
146
+ <template v-else-if="column.controlType === 'ComboSelect'">
147
+ <Select
148
+ :ref="'control_' + column.code"
149
+ :model-value="parseComboData(data, column)"
150
+ @update:model-value="$event => setData(data, column.code, $event)"
151
+ :disabled="readonly || column.isReadonly"
152
+ :clearable="true"
153
+ filterable
154
+ remote
155
+ :remote-method="search => loadOption(data, column, search)"
156
+ :style="{ width: column.controlWidth == null ? null : column.controlWidth + 'px' }"
157
+ :placeholder="column.description"
158
+ :transfer="true"
159
+ @on-change="selected => onSelectDataChange(column, selected)"
160
+ >
161
+ <Option v-for="item in getDataSource(data, column)" :key="item.id" :value="item.id">{{ item.name }}</Option>
162
+ </Select>
163
+ </template>
164
+
145
165
  <template v-else-if="column.controlType === 'MultiComboSelect'">
146
166
  <Select
147
167
  :ref="'control_' + column.code"
@@ -907,7 +927,7 @@
907
927
 
908
928
  if (column.controlType == 'ComboSelect') {
909
929
  // 添加筛选内容
910
- this.$refs['control_' + column.code][0].$data.query = label;
930
+ //this.$refs['control_' + column.code][0].$data.query = label;
911
931
  }
912
932
 
913
933
  let newValue = pendings.find(i => i.value == v);
@@ -1133,7 +1133,7 @@
1133
1133
 
1134
1134
  if (column.controlType == 'ComboSelect') {
1135
1135
  // 添加筛选内容
1136
- this.$refs['control_' + column.code][0].$data.query = label;
1136
+ //this.$refs['control_' + column.code][0].$data.query = label;
1137
1137
  }
1138
1138
 
1139
1139
  let newValue = pendings.find(i => i.value == v);
@@ -1632,6 +1632,7 @@
1632
1632
  // 根据表达式取值(可筛选选择框)
1633
1633
  parseComboData(model, column) {
1634
1634
  let value = this.parseData(model, column.code);
1635
+ console.log('parseComboData', column.code, value);
1635
1636
 
1636
1637
  this.loadComboDataLabel(model, column, value);
1637
1638
 
@@ -1656,9 +1657,13 @@
1656
1657
  return;
1657
1658
  }
1658
1659
 
1660
+ console.log('loadComboDataLabel', column.code, data);
1661
+
1659
1662
  if (this.$refs['control_' + column.code] && data) {
1660
1663
  let values = this.$refs['control_' + column.code][0].$data.values;
1661
1664
 
1665
+ console.log('values', values);
1666
+
1662
1667
  let pendings = [];
1663
1668
  if (column.controlType == 'MultiComboSelect') {
1664
1669
  data.forEach(value => {
@@ -1680,10 +1685,13 @@
1680
1685
 
1681
1686
  // 读取显示内容
1682
1687
  if (pendings.length > 0) {
1688
+ console.log('pendings', pendings);
1683
1689
  let param = this.getParam(model, column);
1684
1690
  param[column.sourceDataCode] = pendings.map(item => item.value).join(',');
1685
1691
  let res;
1686
1692
 
1693
+ console.log('param', param);
1694
+
1687
1695
  if (column.isSourceCustom) {
1688
1696
  res = await customModelApi.query(column.source, param);
1689
1697
  } else {
@@ -1695,8 +1703,9 @@
1695
1703
  let label = this.parseData(item, column.sourceDisplayCode);
1696
1704
 
1697
1705
  if (column.controlType == 'ComboSelect') {
1706
+ console.log('label', label);
1698
1707
  // 添加筛选内容
1699
- this.$refs['control_' + column.code][0].$data.query = label;
1708
+ //this.$refs['control_' + column.code][0].$data.query = label;
1700
1709
  }
1701
1710
 
1702
1711
  let newValue = pendings.find(i => i.value == v);
@@ -2726,7 +2726,7 @@
2726
2726
 
2727
2727
  if (column.controlType == 'ComboSelect') {
2728
2728
  // 添加筛选内容
2729
- this.$refs['control_' + column.code + '_' + index].$data.query = label;
2729
+ //this.$refs['control_' + column.code + '_' + index].$data.query = label;
2730
2730
  //this.$refs['control_' + column.code + '_' + index].setQuery(label);
2731
2731
  }
2732
2732
 
@@ -367,6 +367,8 @@ export default {
367
367
  },
368
368
  // 根据表达式赋值
369
369
  setData(model, expression, value) {
370
+ console.log('setData', expression, value);
371
+
370
372
  // if (expression == null) {
371
373
  // return;
372
374
  // }