@ctzy-web-client/plugin-component-vue 1.0.23 → 1.0.24

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.
Files changed (131) hide show
  1. package/es/advance-select/advance-operation.mjs +51 -37
  2. package/es/advance-select/advance-option.mjs +167 -97
  3. package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +7 -0
  4. package/es/advance-select/advance-select.mjs +368 -310
  5. package/es/advance-select/index.mjs +5 -5
  6. package/es/application-slot/breadcrumb-item.mjs +20 -17
  7. package/es/application-slot/header-tools-item.mjs +20 -17
  8. package/es/breadcrumb-select/breadcrumb-select.mjs +134 -112
  9. package/es/contextmenu/contextmenu-item.mjs +19 -15
  10. package/es/contextmenu/contextmenu.mjs +72 -56
  11. package/es/data-form/data-form-item.mjs +48 -30
  12. package/es/data-form/data-form.mjs +213 -166
  13. package/es/data-form/form-components/bwa-date-picker.mjs +51 -39
  14. package/es/data-form/form-components/bwa-date-time-picker.mjs +56 -44
  15. package/es/data-form/form-components/bwa-input-float.mjs +48 -37
  16. package/es/data-form/form-components/bwa-input-integer.mjs +68 -50
  17. package/es/data-form/form-components/bwa-input.mjs +43 -32
  18. package/es/data-form/form-components/bwa-multi-select.mjs +40 -29
  19. package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +554 -218
  20. package/es/data-form/form-components/bwa-rich-text.mjs +404 -316
  21. package/es/data-form/form-components/bwa-select.mjs +84 -70
  22. package/es/data-form/form-components/bwa-textarea.mjs +38 -27
  23. package/es/data-form/form-components/bwa-upload.mjs +172 -148
  24. package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -24
  25. package/es/data-form/form-components/bwa-user-select.mjs +86 -61
  26. package/es/data-table/data-column-view.mjs +146 -115
  27. package/es/data-table/data-table-card.mjs +48 -40
  28. package/es/data-table/data-table-column.mjs +58 -45
  29. package/es/data-table/data-table.mjs +402 -316
  30. package/es/datatable-settings/datatable-settings.mjs +329 -254
  31. package/es/date-range/date-picker.mjs +130 -116
  32. package/es/date-range/date-range.mjs +215 -161
  33. package/es/drag-list/drag-item.mjs +56 -42
  34. package/es/drag-list/drag-list.mjs +60 -47
  35. package/es/dragable/dragable-item.mjs +23 -18
  36. package/es/dragable/dragable-operation.mjs +32 -24
  37. package/es/dragable/dragable.mjs +32 -23
  38. package/es/filter-panel/conditions/date-range-condition.mjs +50 -40
  39. package/es/filter-panel/conditions/department-condition/department-condition.mjs +99 -72
  40. package/es/filter-panel/conditions/department-condition/department-node.mjs +73 -59
  41. package/es/filter-panel/conditions/input-condition.mjs +90 -76
  42. package/es/filter-panel/conditions/multi-user-condition.mjs +67 -57
  43. package/es/filter-panel/conditions/multiple-menu-condition.mjs +54 -35
  44. package/es/filter-panel/conditions/single-menu-condition.mjs +65 -60
  45. package/es/filter-panel/conditions/single-user-condition.mjs +67 -57
  46. package/es/filter-panel/filter-panel-item.mjs +54 -39
  47. package/es/filter-panel/filter-panel.mjs +153 -135
  48. package/es/layout/layout.mjs +85 -78
  49. package/es/menu/menu-item.mjs +67 -52
  50. package/es/menu/menu.mjs +70 -53
  51. package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
  52. package/es/panel/panel.mjs +53 -40
  53. package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +74 -63
  54. package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +76 -67
  55. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +406 -178
  56. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +153 -138
  57. package/es/pct-filter-panel/pct-filter-panel-item.mjs +55 -40
  58. package/es/pct-filter-panel/pct-filter-panel.mjs +247 -227
  59. package/es/progress/progress-item.mjs +81 -61
  60. package/es/progress/progress.mjs +78 -64
  61. package/es/where-filter-panel/where-filter-panel.mjs +15 -12
  62. package/lib/advance-select/advance-operation.js +50 -36
  63. package/lib/advance-select/advance-option.js +166 -96
  64. package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +12 -0
  65. package/lib/advance-select/advance-select.js +366 -308
  66. package/lib/application-slot/breadcrumb-item.js +19 -16
  67. package/lib/application-slot/header-tools-item.js +19 -16
  68. package/lib/breadcrumb-select/breadcrumb-select.js +133 -111
  69. package/lib/contextmenu/contextmenu-item.js +18 -14
  70. package/lib/contextmenu/contextmenu.js +71 -55
  71. package/lib/data-form/data-form-item.js +47 -29
  72. package/lib/data-form/data-form.js +212 -165
  73. package/lib/data-form/form-components/bwa-date-picker.js +50 -38
  74. package/lib/data-form/form-components/bwa-date-time-picker.js +55 -43
  75. package/lib/data-form/form-components/bwa-input-float.js +47 -36
  76. package/lib/data-form/form-components/bwa-input-integer.js +67 -49
  77. package/lib/data-form/form-components/bwa-input.js +42 -31
  78. package/lib/data-form/form-components/bwa-multi-select.js +39 -28
  79. package/lib/data-form/form-components/bwa-rich-text-tinymce.js +553 -217
  80. package/lib/data-form/form-components/bwa-rich-text.js +403 -315
  81. package/lib/data-form/form-components/bwa-select.js +83 -69
  82. package/lib/data-form/form-components/bwa-textarea.js +37 -26
  83. package/lib/data-form/form-components/bwa-upload.js +171 -147
  84. package/lib/data-form/form-components/bwa-user-multi-select.js +34 -23
  85. package/lib/data-form/form-components/bwa-user-select.js +85 -60
  86. package/lib/data-table/data-column-view.js +146 -115
  87. package/lib/data-table/data-table-card.js +48 -40
  88. package/lib/data-table/data-table-column.js +57 -44
  89. package/lib/data-table/data-table.js +401 -315
  90. package/lib/datatable-settings/datatable-settings.js +328 -253
  91. package/lib/date-range/date-picker.js +129 -115
  92. package/lib/date-range/date-range.js +214 -160
  93. package/lib/drag-list/drag-item.js +55 -41
  94. package/lib/drag-list/drag-list.js +59 -46
  95. package/lib/dragable/dragable-item.js +22 -17
  96. package/lib/dragable/dragable-operation.js +31 -23
  97. package/lib/dragable/dragable.js +31 -22
  98. package/lib/filter-panel/conditions/date-range-condition.js +49 -39
  99. package/lib/filter-panel/conditions/department-condition/department-condition.js +98 -71
  100. package/lib/filter-panel/conditions/department-condition/department-node.js +72 -58
  101. package/lib/filter-panel/conditions/input-condition.js +89 -75
  102. package/lib/filter-panel/conditions/multi-user-condition.js +66 -56
  103. package/lib/filter-panel/conditions/multiple-menu-condition.js +53 -34
  104. package/lib/filter-panel/conditions/single-menu-condition.js +64 -59
  105. package/lib/filter-panel/conditions/single-user-condition.js +66 -56
  106. package/lib/filter-panel/filter-panel-item.js +53 -38
  107. package/lib/filter-panel/filter-panel.js +152 -134
  108. package/lib/layout/layout.js +84 -77
  109. package/lib/menu/menu-item.js +66 -51
  110. package/lib/menu/menu.js +69 -52
  111. package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
  112. package/lib/panel/panel.js +52 -39
  113. package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +73 -62
  114. package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +75 -66
  115. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +405 -177
  116. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +152 -137
  117. package/lib/pct-filter-panel/pct-filter-panel-item.js +54 -39
  118. package/lib/pct-filter-panel/pct-filter-panel.js +246 -226
  119. package/lib/progress/progress-item.js +80 -60
  120. package/lib/progress/progress.js +77 -63
  121. package/lib/where-filter-panel/where-filter-panel.js +14 -11
  122. package/package.json +2 -1
  123. package/src/advance-select/advance-option.vue +64 -13
  124. package/src/data-form/form-components/bwa-rich-text-tinymce.vue +1 -1
  125. package/src/datatable-settings/datatable-settings.vue +33 -3
  126. package/src/date-range/date-picker.vue +1 -1
  127. package/src/filter-panel/filter-panel.vue +2 -2
  128. package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +64 -64
  129. package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +61 -61
  130. package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +302 -178
  131. package/src/pct-filter-panel/pct-filter-panel.vue +4 -4
@@ -8,71 +8,85 @@ var webBaseClientVue = require('@ctzy-web-client/web-base-client-vue');
8
8
  var useProgress = require('./use-progress.js');
9
9
  var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
10
10
 
11
- const __default__ = vue.defineComponent({ name: "BwaProgress" });
12
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
13
- props: {
14
- max: { type: Number, default: 0 },
15
- showLabel: { type: Boolean, default: true },
16
- labelWidth: { type: String, default: "auto" }
17
- },
11
+ const _sfc_main = {
12
+ __name: 'progress',
13
+ props: {
14
+ max: { type: Number, default: 0 },
15
+ showLabel: { type: Boolean, default: true },
16
+ labelWidth: { type: String, default: 'auto' },
17
+ },
18
18
  setup(__props) {
19
- const props = __props;
20
- const { max } = vue.toRefs(props);
21
- const ns = webBaseClientVue.useNamespace("progress");
22
- const states = useProgress.useProgressState(props);
23
- const { percent, handleProgressItemCreate, handleProgressItemDestroy, nextID } = useProgress.useProgress(props, states);
24
- vue.provide(
25
- webBaseClientVue.progressKey,
26
- vue.reactive({ max, handleProgressItemCreate, handleProgressItemDestroy, nextID })
27
- );
28
- return (_ctx, _cache) => {
29
- return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElTooltip), {
30
- placement: "bottom-start",
31
- effect: "light",
32
- "append-to": ".bwa-application"
33
- }, {
34
- content: vue.withCtx(() => [
35
- vue.createElementVNode("div", {
36
- class: vue.normalizeClass(vue.unref(ns).be("info", "wrapper"))
37
- }, [
38
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(states).progressItemList, (item) => {
39
- return vue.openBlock(), vue.createElementBlock("div", {
40
- key: item.id,
41
- class: vue.normalizeClass(vue.unref(ns).be("item", "info")),
42
- style: vue.normalizeStyle({ "--bwa-progress-item-dot-color": item.color })
43
- }, [
44
- vue.createElementVNode("span", {
45
- class: vue.normalizeClass(vue.unref(ns).be("item", "label"))
46
- }, vue.toDisplayString(item.label), 3),
47
- vue.createElementVNode("span", {
48
- class: vue.normalizeClass(vue.unref(ns).be("item", "value"))
49
- }, vue.toDisplayString(item.width), 3)
50
- ], 6);
51
- }), 128))
52
- ], 2)
53
- ]),
54
- default: vue.withCtx(() => [
55
- vue.createElementVNode("div", {
56
- class: vue.normalizeClass(vue.unref(ns).b())
19
+
20
+ const props = __props;
21
+
22
+ defineOptions({ name: 'BwaProgress' });
23
+
24
+
25
+
26
+ const { max } = vue.toRefs(props);
27
+
28
+ const ns = webBaseClientVue.useNamespace('progress');
29
+
30
+ const states = useProgress.useProgressState(props);
31
+ const { percent, handleProgressItemCreate, handleProgressItemDestroy, nextID } =
32
+ useProgress.useProgress(props, states);
33
+
34
+ vue.provide(
35
+ webBaseClientVue.progressKey,
36
+ vue.reactive({ max, handleProgressItemCreate, handleProgressItemDestroy, nextID })
37
+ );
38
+
39
+ return (_ctx, _cache) => {
40
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElTooltip), {
41
+ placement: "bottom-start",
42
+ effect: "light",
43
+ "append-to": ".bwa-application"
44
+ }, {
45
+ content: vue.withCtx(() => [
46
+ vue.createElementVNode("div", {
47
+ class: vue.normalizeClass(vue.unref(ns).be('info', 'wrapper'))
48
+ }, [
49
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(states).progressItemList, (item) => {
50
+ return (vue.openBlock(), vue.createElementBlock("div", {
51
+ key: item.id,
52
+ class: vue.normalizeClass(vue.unref(ns).be('item', 'info')),
53
+ style: vue.normalizeStyle({ '--bwa-progress-item-dot-color': item.color })
57
54
  }, [
58
- vue.createElementVNode("div", {
59
- class: vue.normalizeClass(vue.unref(ns).e("inner")),
60
- style: vue.normalizeStyle({ "--bwa-progress-width": vue.unref(max) })
61
- }, [
62
- vue.renderSlot(_ctx.$slots, "default")
63
- ], 6),
64
- __props.showLabel ? (vue.openBlock(), vue.createElementBlock("div", {
55
+ vue.createElementVNode("span", {
56
+ class: vue.normalizeClass(vue.unref(ns).be('item', 'label'))
57
+ }, vue.toDisplayString(item.label), 3 /* TEXT, CLASS */),
58
+ vue.createElementVNode("span", {
59
+ class: vue.normalizeClass(vue.unref(ns).be('item', 'value'))
60
+ }, vue.toDisplayString(item.width), 3 /* TEXT, CLASS */)
61
+ ], 6 /* CLASS, STYLE */))
62
+ }), 128 /* KEYED_FRAGMENT */))
63
+ ], 2 /* CLASS */)
64
+ ]),
65
+ default: vue.withCtx(() => [
66
+ vue.createElementVNode("div", {
67
+ class: vue.normalizeClass(vue.unref(ns).b())
68
+ }, [
69
+ vue.createElementVNode("div", {
70
+ class: vue.normalizeClass(vue.unref(ns).e('inner')),
71
+ style: vue.normalizeStyle({ '--bwa-progress-width': vue.unref(max) })
72
+ }, [
73
+ vue.renderSlot(_ctx.$slots, "default")
74
+ ], 6 /* CLASS, STYLE */),
75
+ (__props.showLabel)
76
+ ? (vue.openBlock(), vue.createElementBlock("div", {
65
77
  key: 0,
66
- class: vue.normalizeClass(vue.unref(ns).e("percent")),
67
- style: vue.normalizeStyle({ "--bwa-progress-label-width": __props.labelWidth })
68
- }, vue.toDisplayString(vue.unref(percent)) + "% ", 7)) : vue.createCommentVNode("v-if", true)
69
- ], 2)
70
- ]),
71
- _: 3
72
- });
73
- };
74
- }
75
- });
76
- var Progress = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["__file", "progress.vue"]]);
78
+ class: vue.normalizeClass(vue.unref(ns).e('percent')),
79
+ style: vue.normalizeStyle({ '--bwa-progress-label-width': __props.labelWidth })
80
+ }, vue.toDisplayString(vue.unref(percent)) + "% ", 7 /* TEXT, CLASS, STYLE */))
81
+ : vue.createCommentVNode("v-if", true)
82
+ ], 2 /* CLASS */)
83
+ ]),
84
+ _: 3 /* FORWARDED */
85
+ }))
86
+ }
87
+ }
88
+
89
+ };
90
+ var Progress = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"progress.vue"]]);
77
91
 
78
92
  exports["default"] = Progress;
@@ -5,17 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
7
7
 
8
- const __default__ = vue.defineComponent({
9
- name: "BwaWhereFilterPanel"
10
- });
11
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
8
+ const _sfc_main = {
9
+ __name: 'where-filter-panel',
12
10
  setup(__props) {
13
- ;
14
- return (_ctx, _cache) => {
15
- return vue.openBlock(), vue.createElementBlock("div");
16
- };
17
- }
18
- });
19
- var whereFilterPanel = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["__file", "where-filter-panel.vue"]]);
11
+
12
+ defineOptions({
13
+ name: 'BwaWhereFilterPanel',
14
+ });
15
+
16
+ return (_ctx, _cache) => {
17
+ return (vue.openBlock(), vue.createElementBlock("div"))
18
+ }
19
+ }
20
+
21
+ };
22
+ var whereFilterPanel = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"where-filter-panel.vue"]]);
20
23
 
21
24
  exports["default"] = whereFilterPanel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzy-web-client/plugin-component-vue",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "exports": {
@@ -33,6 +33,7 @@
33
33
  "quill": "^1.3.7",
34
34
  "rxjs": "^7.6.0",
35
35
  "tinymce": "^6.4.2",
36
+ "pinyin-pro": "^3.28.0",
36
37
  "@ctzy-web-client/web-base-client-vue": "^1.0.0"
37
38
  },
38
39
  "devDependencies": {
@@ -5,16 +5,14 @@
5
5
  <slot>
6
6
  <ElTooltip placement="top" append-to=".bwa-application" :disabled="currentLabel.length < 16">
7
7
  <div :class="ns.be('option', 'content-label')" ref="contentText">
8
- <ElCheckbox
9
- v-if="source === 'pct' && !showSelectIcon"
10
- @click.prevent
11
- :class="ns.be('filter', 'checkbox')"
12
- :modelValue="itemSelected"
13
- style="height: 26px"
14
- >
15
- <div :class="ns.be('option', 'content-label')" style="width: 178px">{{ currentLabel }}</div>
16
- </ElCheckbox>
17
- <div v-else :class="[ns.be('option', 'content-label'), ns.is('selected',source === 'pct' && itemSelected && showSelectIcon)]">{{ currentLabel }}</div>
8
+
9
+ <div v-if="!showUserName" :class="ns.be('option', 'content-label')" style="width: 178px">{{ currentLabel }}</div>
10
+ <div v-if="showUserName" :class="ns.be('option', 'content-label')" style="width: 178px;display: flex;align-items: center;" >
11
+ <div class="letter-circle" :style="{ backgroundColor: (processLabel(currentLabel).color) }">
12
+ {{ processLabel(currentLabel).firstLetter }}
13
+ </div>
14
+ <div style="overflow: hidden;text-overflow: ellipsis;flex: 3;">{{ currentLabel }}</div>
15
+ </div>
18
16
  </div>
19
17
  <template #content>
20
18
  {{ currentLabel }}
@@ -23,7 +21,7 @@
23
21
  </slot>
24
22
  </div>
25
23
  <ElIcon
26
- v-if="itemSelected && showSelectIcon"
24
+ v-if="itemSelected "
27
25
  :class="ns.be('option', 'selected')"
28
26
  >
29
27
  <Select />
@@ -37,7 +35,7 @@ import { getCurrentInstance, toRefs, ref, nextTick, onMounted, onUnmounted } fro
37
35
  import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
38
36
  import { useEvent } from './events-helpers';
39
37
  import { useAdvanceOption } from './use-advance-option';
40
-
38
+ import { pinyin } from 'pinyin-pro';
41
39
  export default {
42
40
  name: 'BwaAdvanceOption',
43
41
  props: {
@@ -61,6 +59,7 @@ export default {
61
59
 
62
60
  const show = ref(true)
63
61
  const clickFlag = ref(true)
62
+ const showUserName = ref(true)
64
63
 
65
64
  const contentText = ref()
66
65
 
@@ -83,7 +82,43 @@ export default {
83
82
  }
84
83
  }
85
84
  }
85
+ const COLOR_POOL = ['#2DC86D', '#19BBFF', '#FFA901'];
86
+ /**
87
+ * 接收完整label,提取姓名首字母(大写)并匹配颜色
88
+ * @param {string} label - 完整label(如:石玉涵(dw_shiyuhan))
89
+ * @returns {object} { firstLetter: 大写首字母, color: 圆点颜色, valid: 是否符合规则 }
90
+ */
91
+ function processLabel(label) {
92
+ // 1. 第一步:拆分label,提取姓名(核心修复点)
93
+ const labelMatch = label.match(/^(.*)\((.*)\)$/);
94
+ if (!labelMatch) {
95
+ return { valid: false, firstLetter: '#', color: COLOR_POOL[0] };
96
+ }
97
+ const [, name] = labelMatch; // 提取纯姓名:如"石玉涵"
98
+ const firstChar = name.charAt(0); // 取姓名第一个字
99
+
100
+ // 2. 第二步:获取首字母(强制大写,彻底解决小写问题)
101
+ let firstLetter = '#';
102
+ if (/^[\u4e00-\u9fa5]$/.test(firstChar)) {
103
+ // 拼音库取首字母 + 手动toUpperCase(无视库版本差异)
104
+ firstLetter = pinyin(firstChar, { pattern: 'first' }).toUpperCase();
105
+ } else if (/^[a-zA-Z]$/.test(firstChar)) {
106
+ firstLetter = firstChar.toUpperCase();
107
+ }
86
108
 
109
+ // 3. 第三步:计算颜色(按你指定的规则)
110
+ let color = COLOR_POOL[0];
111
+ if (/^[A-Z]$/.test(firstLetter)) {
112
+ const letterCode = firstLetter.charCodeAt(0) - 'A'.charCodeAt(0);
113
+ color = COLOR_POOL[letterCode % 3];
114
+ }
115
+
116
+ return {
117
+
118
+ firstLetter: firstLetter, // 确保是大写
119
+ color: color
120
+ };
121
+ }
87
122
  const listenerClickFunction = () => {
88
123
  setTimeout(() => {
89
124
  isShow();
@@ -104,13 +139,29 @@ export default {
104
139
  show,
105
140
  ns,
106
141
  currentLabel,
142
+ showUserName,
107
143
  itemSelected,
108
144
  showSelectIcon,
109
145
  filterOptionClick,
110
146
  handleOptionMouseEnter,
111
- source
147
+ source,
148
+ processLabel
112
149
  };
113
150
  },
114
151
  };
115
152
  </script>
153
+ <style scoped>
154
+ .letter-circle {
155
+
156
+ width: 24px;
157
+ height: 24px;
158
+ border-radius: 50%;
159
+ color: #fff;
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ font-size: 14px;
164
+ margin-right: 8px;
165
+ }
166
+ </style>
116
167
 
@@ -535,7 +535,7 @@ onMounted(async () => {
535
535
 
536
536
  // var range = editor.getSelection();
537
537
  // if (range && fileData) {
538
- // // 在当前光标位置插入图�?
538
+ // // 在当前光标位置插入图�?
539
539
  // editor.insertEmbed(range.index, 'image', fileData.path);
540
540
  // editor.formatText(range.index, 1, {
541
541
  // alt: fileData.id,
@@ -33,7 +33,7 @@
33
33
 
34
34
  <span
35
35
  :class="[ns.e('tools-item'), ns.e('close')]"
36
- @click="value = false"
36
+ @click="handleClose"
37
37
  >
38
38
  <ElTooltip content="关闭" append-to=".bwa-application">
39
39
  <ElIcon>
@@ -71,9 +71,10 @@
71
71
  </span>
72
72
  <ElSwitch
73
73
  v-model="item.visible"
74
- size="small"
74
+
75
75
  :disabled="item.settings.disabled"
76
76
  @mousedown.stop
77
+ @change="(val) => handleColumnVisibleChange(item, val)"
77
78
  />
78
79
  </div>
79
80
  </div>
@@ -101,8 +102,9 @@
101
102
  </span>
102
103
  <ElSwitch
103
104
  v-model="column.visible"
104
- size="small"
105
+
105
106
  :disabled="column.settings.disabled"
107
+ @change="(val) => handleColumnVisibleChange(column, val)"
106
108
  />
107
109
  </div>
108
110
  </div>
@@ -136,6 +138,7 @@ import {
136
138
  ref,
137
139
  unref,
138
140
  useAttrs,
141
+ watch,
139
142
  withCtx,
140
143
  } from 'vue';
141
144
  import BwaDraglist from '../drag-list';
@@ -151,12 +154,35 @@ const props = defineProps({
151
154
  },
152
155
  });
153
156
 
157
+ const emit = defineEmits([
158
+ 'reset-columns',
159
+ 'sort-change',
160
+ 'close',
161
+ 'visible-change',
162
+ 'column-visible-change'
163
+ ]);
164
+
154
165
  const attrs = useAttrs();
155
166
 
156
167
  const ns = useNamespace('datatable-settings');
157
168
 
158
169
  const value = ref(false);
159
170
 
171
+ const handleClose = () => {
172
+ value.value = false;
173
+ emit('close');
174
+ };
175
+
176
+ const handleColumnVisibleChange = (column, visible) => {
177
+ const tableColumns = [...displaySearchedColumns.value,...hiddenSearchedColumns.value ]
178
+ emit('column-visible-change', tableColumns);
179
+ };
180
+
181
+ // 监听value变化,emit visible-change事件
182
+ watch(value, (newValue) => {
183
+ emit('visible-change', newValue);
184
+ });
185
+
160
186
  const appName = useValue('AppName');
161
187
  const userService = useService('UserService');
162
188
 
@@ -244,6 +270,7 @@ const resetColumns = () => {
244
270
  const _dataTable = props.dataTable;
245
271
 
246
272
  _dataTable.resetColumnSort();
273
+ emit('reset-columns');
247
274
  };
248
275
 
249
276
  const allSearchedColumns = computed(() => {
@@ -273,6 +300,9 @@ const handleSortChange = (sort) => {
273
300
  .filter(Boolean);
274
301
 
275
302
  props.dataTable.setDisplayColumns(displayColumns);
303
+ const tableColumns = [...displaySearchedColumns.value,...hiddenSearchedColumns.value ]
304
+ emit('column-visible-change', tableColumns);
305
+ emit('sort-change', sort, displayColumns);
276
306
  };
277
307
 
278
308
  const scope = getCurrentScope();
@@ -23,7 +23,7 @@
23
23
  <ElPanelDatePicker type="date" :parsed-value="parsedValue" @pick="onPick" :teleported="false">
24
24
  <template #sidebar>
25
25
  <div :class="ns.e('sidebar')">
26
- <ElButton size="small" @click="onClear">清空</ElButton>
26
+ <ElButton @click="onClear">清空</ElButton>
27
27
  </div>
28
28
  </template>
29
29
  </ElPanelDatePicker>
@@ -55,7 +55,7 @@
55
55
  <ElInput
56
56
  v-if="showSearch"
57
57
  prefix-icon="Search"
58
- size="small"
58
+
59
59
  clearable
60
60
  v-model="searchValue"
61
61
  :placeholder="searchPlaceholder"
@@ -64,7 +64,7 @@
64
64
 
65
65
  <ElButton
66
66
  v-if="isChange"
67
- size="small"
67
+
68
68
  :class="ns.e('reset')"
69
69
  @click="handleReset"
70
70
  >
@@ -1,64 +1,64 @@
1
- <template>
2
- <div :class="ns.e('inputCon')">
3
- <span v-if="showTitle" :class="ns.e('title')">{{column.title}}</span>
4
- <el-input
5
- :prefix-icon="showIcon ? prefixIcon : ''"
6
- size="small"
7
- clearable
8
- :class="ns.e('search')"
9
- :placeholder="placeholderStr"
10
- v-model="modelValue"
11
- />
12
- </div>
13
- </template>
14
-
15
- <script setup>
16
- import { useNamespace, filterPanelItemKey } from '@ctzy-web-client/web-base-client-vue';
17
- import {computed, defineEmits, inject, useAttrs} from 'vue';
18
- import {dataProps} from "../../hooks/use-data";
19
- const ns = useNamespace('pct-input');
20
- const emit = defineEmits(['update:modelValue']);
21
- defineOptions({
22
- name: 'BwaPctInputCondition',
23
- __conditionTitle__: '输入框',
24
- __conditionDefault__: () => [],
25
- });
26
-
27
- const props = defineProps({
28
- ...dataProps,
29
- modelValue: {
30
- type: null,
31
- },
32
- placeholder: {
33
- type: String,
34
- default: '请输入',
35
- },
36
- prefixIcon: {
37
- type: String,
38
- default: 'Search',
39
- },
40
- showIcon: {
41
- type: Boolean,
42
- default: false,
43
- }
44
- })
45
-
46
- const filterPanelItem = inject(filterPanelItemKey, null);
47
- const column = computed(() => filterPanelItem?.column ?? null);
48
-
49
- const placeholderStr = computed(() => showTitle.value ? props.placeholder : column.value.title)
50
-
51
- const attrs = useAttrs();
52
- const showTitle = computed(() => attrs.showTitle)
53
-
54
-
55
- const modelValue = computed({
56
- get: () => props.modelValue,
57
- set: (v) => emit('update:modelValue', v),
58
- });
59
- </script>
60
-
61
- <style scoped>
62
-
63
- </style>
64
-
1
+ <template>
2
+ <div :class="ns.e('inputCon')">
3
+ <span v-if="showTitle" :class="ns.e('title')">{{column.title}}</span>
4
+ <el-input
5
+ :prefix-icon="showIcon ? prefixIcon : ''"
6
+
7
+ clearable
8
+ :class="ns.e('search')"
9
+ :placeholder="placeholderStr"
10
+ v-model="modelValue"
11
+ />
12
+ </div>
13
+ </template>
14
+
15
+ <script setup>
16
+ import { useNamespace, filterPanelItemKey } from '@ctzy-web-client/web-base-client-vue';
17
+ import {computed, defineEmits, inject, useAttrs} from 'vue';
18
+ import {dataProps} from "../../hooks/use-data";
19
+ const ns = useNamespace('pct-input');
20
+ const emit = defineEmits(['update:modelValue']);
21
+ defineOptions({
22
+ name: 'BwaPctInputCondition',
23
+ __conditionTitle__: '输入框',
24
+ __conditionDefault__: () => [],
25
+ });
26
+
27
+ const props = defineProps({
28
+ ...dataProps,
29
+ modelValue: {
30
+ type: null,
31
+ },
32
+ placeholder: {
33
+ type: String,
34
+ default: '请输入',
35
+ },
36
+ prefixIcon: {
37
+ type: String,
38
+ default: 'Search',
39
+ },
40
+ showIcon: {
41
+ type: Boolean,
42
+ default: false,
43
+ }
44
+ })
45
+
46
+ const filterPanelItem = inject(filterPanelItemKey, null);
47
+ const column = computed(() => filterPanelItem?.column ?? null);
48
+
49
+ const placeholderStr = computed(() => showTitle.value ? props.placeholder : column.value.title)
50
+
51
+ const attrs = useAttrs();
52
+ const showTitle = computed(() => attrs.showTitle)
53
+
54
+
55
+ const modelValue = computed({
56
+ get: () => props.modelValue,
57
+ set: (v) => emit('update:modelValue', v),
58
+ });
59
+ </script>
60
+
61
+ <style scoped>
62
+
63
+ </style>
64
+