wui-components-v2 1.1.69 → 1.1.70

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 (45) hide show
  1. package/api/core/index.ts +74 -74
  2. package/api/menu.ts +45 -45
  3. package/api/page.ts +114 -114
  4. package/api/sys.ts +12 -12
  5. package/components/add-address-page/add-address-page.vue +77 -77
  6. package/components/custom-date-picker/custom-date-picker.vue +106 -106
  7. package/components/custom-select-picker/custom-select-picker.vue +95 -95
  8. package/components/demo-block/demo-block.vue +63 -63
  9. package/components/detail-popup/detail-popup.vue +99 -99
  10. package/components/evaluation-page/evaluation-page.vue +196 -196
  11. package/components/fold-card/fold-card.vue +171 -171
  12. package/components/form-control/form-control.vue +661 -661
  13. package/components/global-message/global-message.vue +68 -68
  14. package/components/label-value/label-value.vue +144 -144
  15. package/components/list-top-buttons/list-top-buttons.vue +19 -19
  16. package/components/login-form/login-form.vue +126 -126
  17. package/components/mulselect-picker/mulselect-picker.vue +86 -86
  18. package/components/product-card/product-card.vue +201 -201
  19. package/components/search/search.vue +128 -128
  20. package/components/user-choose/user-choose.vue +1 -1
  21. package/components/wui-enume-select-control/wui-enume-select-control.vue +92 -92
  22. package/components/wui-list/wui-list.vue +235 -235
  23. package/components/wui-menus/wui-menus.vue +247 -247
  24. package/components/wui-menus1/components/navbar.vue +43 -43
  25. package/components/wui-menus1/wui-menus.vue +564 -564
  26. package/components/wui-notify-info/wui-notify-info.vue +280 -280
  27. package/components/wui-search-history-babbar/wui-search-history-babbar.vue +204 -204
  28. package/components/wui-select-list/wui-select-list.vue +310 -310
  29. package/components/wui-select-popup/wui-select-popup.vue +612 -612
  30. package/components/wui-system-settings/wui-system-settings.vue +144 -144
  31. package/components/wui-tabbar/wui-tabbar.vue +106 -106
  32. package/components/wui-tree-page/components/tree-item.vue +238 -238
  33. package/components/wui-user/wui-user.vue +202 -202
  34. package/composables/useCompanyFieldFilter.ts +91 -91
  35. package/composables/useEnumes.ts +2 -2
  36. package/composables/useMenus.ts +193 -193
  37. package/index.ts +83 -83
  38. package/package.json +1 -1
  39. package/static/iconfont/iconfont.css +63 -63
  40. package/store/language.ts +151 -151
  41. package/styles/dark-mode.css +523 -523
  42. package/styles/dark-mode.min.css +1 -1
  43. package/type.ts +2 -2
  44. package/utils/control-tree.ts +2 -2
  45. package/utils/control-type-supportor.ts +148 -148
@@ -1,128 +1,128 @@
1
- <script setup lang="ts">
2
- import { defineEmits, defineOptions, defineProps, ref } from 'vue'
3
- import type { Enums, Fields, Split2TabCriterias } from '../../type'
4
- import formControl from '../form-control/form-control.vue'
5
-
6
- defineOptions({ name: 'Search' })
7
- const props = defineProps<{
8
- criterias: Fields[]
9
- primaryCriteria: Fields | null
10
- enumColumn?: Enums
11
- mainCode?: string
12
- split2TabCriterias?: Split2TabCriterias[]
13
- }>()
14
- const emits = defineEmits(['submit'])
15
- const show = ref(false)
16
- const search = ref('')
17
- const formControlRef = ref()
18
- const entity = ref({})
19
- const filterCriterias = computed(() => {
20
- const criteriaSourceIds = props.split2TabCriterias?.map(item => item.sourceId) || []
21
- const primarySourceId = props.primaryCriteria?.sourceId
22
- if (!primarySourceId)
23
- return props.criterias
24
- return props.criterias.filter(item => ![primarySourceId, ...criteriaSourceIds].includes(item.sourceId))
25
- })
26
- function handleClose() {
27
- show.value = false
28
- }
29
- function handleSubmit() {
30
- if (!formControlRef.value) {
31
- if (!props.primaryCriteria?.sourceId)
32
- return
33
- const data = `c_${props.primaryCriteria.sourceId}=${search.value}`
34
- emits('submit', data)
35
- handleClose()
36
- return
37
- }
38
- formControlRef.value.submit().then((fdata: any) => {
39
- entity.value = {
40
- ...fdata,
41
- ...(props.primaryCriteria?.sourceId ? { [props.primaryCriteria.sourceId]: search.value } : {}),
42
- }
43
- let data = ''
44
-
45
- if (props.primaryCriteria?.sourceId) {
46
- data = `c_${props.primaryCriteria.sourceId}=${search.value}`
47
- }
48
-
49
- filterCriterias.value.forEach((item) => {
50
- for (const key in fdata) {
51
- if (Object.prototype.hasOwnProperty.call(fdata, key)) {
52
- const element = fdata[key]
53
- if (item.sourceId === key) {
54
- if (item.extControlType === 'relselectvalue') {
55
- data = `${data}&c_${item.sourceId}=${element.map((item: string) => {
56
- return item.split('@R@')[1]
57
- }).join('@,@')}`
58
- }
59
- else if (item.extControlType === 'multiselect') {
60
- element.forEach((subitem: string) => {
61
- data = `${data}&c_${item.sourceId}=${subitem}`
62
- })
63
- }
64
- else {
65
- data = `${data}&c_${item.sourceId}=${element}`
66
- }
67
- }
68
- }
69
- }
70
- })
71
-
72
- console.log('查询条件', data)
73
-
74
- emits('submit', data)
75
- handleClose()
76
- })
77
- }
78
- </script>
79
-
80
- <template>
81
- <view v-if="primaryCriteria?.controlType === 'text'" class="w-full">
82
- <wd-search v-model="search" cancel-txt="搜索" :placeholder="`请输入${primaryCriteria?.title || ''}搜索`" @clear="handleSubmit" @cancel="handleSubmit">
83
- <template v-if="filterCriterias.length" #prefix>
84
- <view class="search-type">
85
- <wd-icon name="filter" size="17px" class="text-gray-500" @click="show = true" />
86
- </view>
87
- </template>
88
- </wd-search>
89
- </view>
90
- <wd-popup v-model="show" position="bottom" custom-class="h-80vh" closable @close="handleClose">
91
- <view class="relative box-border h-full p-1 bg-white dark:bg-[var(--wot-dark-background)]">
92
- <view class="h-34px flex items-center justify-center">
93
- 筛选
94
- </view>
95
- <formControl ref="formControlRef" :field-group="{ fields: filterCriterias, readOnly: false, displayConfig: [], id: '', buttons: [], title: '', type: '', pointSourceId: '', mstrucId: '', relationNames: [] }" :entity="entity" :enum-column="enumColumn" />
96
- <view class="h-12" />
97
- <view class="fixed bottom-0 left-0 right-0 box-border w-100% flex p-2 bg-white dark:bg-[var(--wot-dark-background)]">
98
- <wd-button block custom-class="flex-1" @click="handleSubmit">
99
- 确定
100
- </wd-button>
101
- </view>
102
- </view>
103
- </wd-popup>
104
- </template>
105
-
106
- <style scoped>
107
- .search-type {
108
- position: relative;
109
- height: 30px;
110
- line-height: 30px;
111
- padding: 0 8px 0 16px;
112
- }
113
- .search-type::after {
114
- position: absolute;
115
- content: '';
116
- width: 1px;
117
- right: 0;
118
- top: 5px;
119
- bottom: 5px;
120
- }
121
- ::deep(.icon-arrow) {
122
- display: inline-block;
123
- font-size: 20px;
124
- vertical-align: middle;
125
- }
126
-
127
-
128
- </style>
1
+ <script setup lang="ts">
2
+ import { computed, defineEmits, defineOptions, defineProps, ref } from 'vue'
3
+ import type { Enums, Fields, Split2TabCriterias } from '../../type'
4
+ import formControl from '../form-control/form-control.vue'
5
+
6
+ defineOptions({ name: 'Search' })
7
+ const props = defineProps<{
8
+ criteria: Fields[]
9
+ primaryCriterion: Fields | null
10
+ enumColumn?: Enums
11
+ mainCode?: string
12
+ split2TabCriterias?: Split2TabCriterias[]
13
+ }>()
14
+ const emits = defineEmits(['submit'])
15
+ const show = ref(false)
16
+ const search = ref('')
17
+ const formControlRef = ref()
18
+ const entity = ref({})
19
+ const filterCriteria = computed(() => {
20
+ const criteriaSourceIds = props.split2TabCriterias?.map(item => item.sourceId) || []
21
+ const primarySourceId = props.primaryCriterion?.sourceId
22
+ if (!primarySourceId)
23
+ return props.criteria
24
+ return props.criteria.filter(item => ![primarySourceId, ...criteriaSourceIds].includes(item.sourceId))
25
+ })
26
+ function handleClose() {
27
+ show.value = false
28
+ }
29
+ function handleSubmit() {
30
+ if (!formControlRef.value) {
31
+ if (!props.primaryCriterion?.sourceId)
32
+ return
33
+ const data = `c_${props.primaryCriterion.sourceId}=${search.value}`
34
+ emits('submit', data)
35
+ handleClose()
36
+ return
37
+ }
38
+ formControlRef.value.submit().then((fdata: any) => {
39
+ entity.value = {
40
+ ...fdata,
41
+ ...(props.primaryCriterion?.sourceId ? { [props.primaryCriterion.sourceId]: search.value } : {}),
42
+ }
43
+ let data = ''
44
+
45
+ if (props.primaryCriterion?.sourceId) {
46
+ data = `c_${props.primaryCriterion.sourceId}=${search.value}`
47
+ }
48
+
49
+ filterCriteria.value.forEach((item) => {
50
+ for (const key in fdata) {
51
+ if (Object.prototype.hasOwnProperty.call(fdata, key)) {
52
+ const element = fdata[key]
53
+ if (item.sourceId === key) {
54
+ if (item.extControlType === 'relselectvalue') {
55
+ data = `${data}&c_${item.sourceId}=${element.map((item: string) => {
56
+ return item.split('@R@')[1]
57
+ }).join('@,@')}`
58
+ }
59
+ else if (item.extControlType === 'multiselect') {
60
+ element.forEach((subitem: string) => {
61
+ data = `${data}&c_${item.sourceId}=${subitem}`
62
+ })
63
+ }
64
+ else {
65
+ data = `${data}&c_${item.sourceId}=${element}`
66
+ }
67
+ }
68
+ }
69
+ }
70
+ })
71
+
72
+ console.log('查询条件', data)
73
+
74
+ emits('submit', data)
75
+ handleClose()
76
+ })
77
+ }
78
+ </script>
79
+
80
+ <template>
81
+ <view v-if="primaryCriterion?.controlType === 'text'" class="w-full">
82
+ <wd-search v-model="search" cancel-txt="搜索" :placeholder="`请输入${primaryCriterion?.title || ''}搜索`" @clear="handleSubmit" @cancel="handleSubmit">
83
+ <template v-if="filterCriteria.length" #prefix>
84
+ <view class="search-type">
85
+ <wd-icon name="filter" size="17px" class="text-gray-500" @click="show = true" />
86
+ </view>
87
+ </template>
88
+ </wd-search>
89
+ </view>
90
+ <wd-popup v-model="show" position="bottom" custom-class="h-80vh" closable @close="handleClose">
91
+ <view class="relative box-border h-full p-1 bg-white dark:bg-[var(--wot-dark-background)]">
92
+ <view class="h-34px flex items-center justify-center">
93
+ 筛选
94
+ </view>
95
+ <formControl ref="formControlRef" :field-group="{ fields: filterCriteria, readOnly: false, displayConfig: [], id: '', buttons: [], title: '', type: '', pointSourceId: '', mstrucId: '', relationNames: [] }" :entity="entity" :enum-column="enumColumn" />
96
+ <view class="h-12" />
97
+ <view class="fixed bottom-0 left-0 right-0 box-border w-100% flex p-2 bg-white dark:bg-[var(--wot-dark-background)]">
98
+ <wd-button block custom-class="flex-1" @click="handleSubmit">
99
+ 确定
100
+ </wd-button>
101
+ </view>
102
+ </view>
103
+ </wd-popup>
104
+ </template>
105
+
106
+ <style scoped>
107
+ .search-type {
108
+ position: relative;
109
+ height: 30px;
110
+ line-height: 30px;
111
+ padding: 0 8px 0 16px;
112
+ }
113
+ .search-type::after {
114
+ position: absolute;
115
+ content: '';
116
+ width: 1px;
117
+ right: 0;
118
+ top: 5px;
119
+ bottom: 5px;
120
+ }
121
+ ::deep(.icon-arrow) {
122
+ display: inline-block;
123
+ font-size: 20px;
124
+ vertical-align: middle;
125
+ }
126
+
127
+
128
+ </style>
@@ -70,7 +70,7 @@ const fetchDataById = async (id: string) => {
70
70
  const config = await pageConfig(props.sourceId)
71
71
  const newConfig=config.ltmplConfig
72
72
  const onlyCode=newConfig.extDisplayConfig?.cardShowCols?.[0]?.sourceId //获取回显字段对应参数名
73
- const query=`c_${newConfig.secondCriteria?.sourceId}=${requestId}` //构建查询参数
73
+ const query=`c_${newConfig.secondCriterion?.sourceId}=${requestId}` //构建查询参数
74
74
  const res = await pageKey(props.sourceId, '', query)
75
75
  const data = await listData(res.key, 1, 10)
76
76
  const item = data.entities.find((e: any) => e.code === requestId)as any
@@ -1,92 +1,92 @@
1
- <script lang="ts" setup>
2
- import { computed, defineEmits, defineProps, onMounted, ref } from 'vue'
3
- import { useEnums } from '../../composables/useEnumes'
4
- import type { Config } from '../../type'
5
- import { pageConfig } from '../../api/page'
6
-
7
- defineOptions({
8
- name: 'WuiEnumeSelectControl',
9
- })
10
-
11
- const props = defineProps<{
12
- sourceId: string
13
- id: string
14
- label?: string
15
- title?: string
16
- modelValue: string
17
- placeholder?: string
18
- disabled?: boolean
19
- required?: boolean
20
- rules?: any
21
- zIndex?: number
22
- type: 'checkbox' | 'radio'
23
- labelWidth?: string
24
- }>()
25
- const emits = defineEmits(['update:modelValue'])
26
-
27
- const config = ref<Config>()
28
- const { enumColumn, getEnums } = useEnums({ config })
29
- async function getPageConfig() {
30
- try {
31
- const res = await pageConfig(props.sourceId)
32
-
33
- if (res.ltmplConfig) {
34
- config.value = res.ltmplConfig
35
- getEnums()
36
- }
37
- } catch (error) {
38
- console.log(error)
39
- }
40
- }
41
-
42
- const comEnums = computed(() => {
43
- const mstrucId = config.value?.criterias?.find(item => item.sourceId === props.id)?.mstrucId
44
-
45
- if (mstrucId) {
46
- return enumColumn.value[mstrucId]?.map(item => {
47
- return {
48
- id: item.id,
49
- label: item.title,
50
- value: `${item.id}-R-${item.value}`,
51
- }
52
- })
53
- }
54
-
55
- return []
56
- })
57
-
58
- onMounted(() => {
59
- getPageConfig()
60
- })
61
-
62
- function confirm(event: any) {
63
- emits('update:modelValue', event.value)
64
- }
65
- </script>
66
-
67
- <script lang="ts">
68
- export default {
69
- options: {
70
- virtualHost: true,
71
- addGlobalClass: true,
72
- styleIsolation: 'shared',
73
- },
74
- }
75
- </script>
76
-
77
- <template>
78
- <wd-select-picker
79
- :label-width="props.labelWidth"
80
- :title="props.title"
81
- :placeholder="props.placeholder"
82
- :disabled="props.disabled"
83
- :required="props.required"
84
- :rules="props.rules"
85
- :z-index="props.zIndex"
86
- :type="$props.type"
87
- :model-value="modelValue"
88
- :label="props.label"
89
- :columns="comEnums"
90
- @confirm="confirm"
91
- />
92
- </template>
1
+ <script lang="ts" setup>
2
+ import { computed, defineEmits, defineProps, onMounted, ref } from 'vue'
3
+ import { useEnums } from '../../composables/useEnumes'
4
+ import type { Config } from '../../type'
5
+ import { pageConfig } from '../../api/page'
6
+
7
+ defineOptions({
8
+ name: 'WuiEnumeSelectControl',
9
+ })
10
+
11
+ const props = defineProps<{
12
+ sourceId: string
13
+ id: string
14
+ label?: string
15
+ title?: string
16
+ modelValue: string
17
+ placeholder?: string
18
+ disabled?: boolean
19
+ required?: boolean
20
+ rules?: any
21
+ zIndex?: number
22
+ type: 'checkbox' | 'radio'
23
+ labelWidth?: string
24
+ }>()
25
+ const emits = defineEmits(['update:modelValue'])
26
+
27
+ const config = ref<Config>()
28
+ const { enumColumn, getEnums } = useEnums({ config })
29
+ async function getPageConfig() {
30
+ try {
31
+ const res = await pageConfig(props.sourceId)
32
+
33
+ if (res.ltmplConfig) {
34
+ config.value = res.ltmplConfig
35
+ getEnums()
36
+ }
37
+ } catch (error) {
38
+ console.log(error)
39
+ }
40
+ }
41
+
42
+ const comEnums = computed(() => {
43
+ const mstrucId = config.value?.criteria?.find(item => item.sourceId === props.id)?.mstrucId
44
+
45
+ if (mstrucId) {
46
+ return enumColumn.value[mstrucId]?.map(item => {
47
+ return {
48
+ id: item.id,
49
+ label: item.title,
50
+ value: `${item.id}-R-${item.value}`,
51
+ }
52
+ })
53
+ }
54
+
55
+ return []
56
+ })
57
+
58
+ onMounted(() => {
59
+ getPageConfig()
60
+ })
61
+
62
+ function confirm(event: any) {
63
+ emits('update:modelValue', event.value)
64
+ }
65
+ </script>
66
+
67
+ <script lang="ts">
68
+ export default {
69
+ options: {
70
+ virtualHost: true,
71
+ addGlobalClass: true,
72
+ styleIsolation: 'shared',
73
+ },
74
+ }
75
+ </script>
76
+
77
+ <template>
78
+ <wd-select-picker
79
+ :label-width="props.labelWidth"
80
+ :title="props.title"
81
+ :placeholder="props.placeholder"
82
+ :disabled="props.disabled"
83
+ :required="props.required"
84
+ :rules="props.rules"
85
+ :z-index="props.zIndex"
86
+ :type="$props.type"
87
+ :model-value="modelValue"
88
+ :label="props.label"
89
+ :columns="comEnums"
90
+ @confirm="confirm"
91
+ />
92
+ </template>