widget.qw 1.0.81 → 1.0.82

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 (104) hide show
  1. package/.env.development +9 -9
  2. package/.env.production +8 -8
  3. package/README.md +75 -75
  4. package/build/style.css +471 -471
  5. package/build/widget.qw.es.js +55 -56
  6. package/build/widget.qw.umd.js +55 -56
  7. package/index.html +17 -17
  8. package/package.json +47 -47
  9. package/src/App.vue +26 -26
  10. package/src/api/index.js +165 -165
  11. package/src/components/AuditBar.vue +396 -396
  12. package/src/components/BillCard.vue +164 -164
  13. package/src/components/CascaderPicker.vue +132 -132
  14. package/src/components/CascaderPop.vue +371 -371
  15. package/src/components/CheckGroup.vue +113 -113
  16. package/src/components/DatetimePicker/DatetimePop.vue +342 -342
  17. package/src/components/DatetimePicker/index.vue +124 -124
  18. package/src/components/DayDropdown.vue +56 -56
  19. package/src/components/FilePicker.vue +169 -169
  20. package/src/components/Input.vue +80 -80
  21. package/src/components/MonthDropdown.vue +51 -51
  22. package/src/components/MultiPicker.vue +123 -123
  23. package/src/components/ObjsEditor.vue +334 -334
  24. package/src/components/SecretNotify.js +5 -5
  25. package/src/components/Sheet.vue +92 -92
  26. package/src/components/SingleApiPicker.vue +108 -108
  27. package/src/components/SinglePicker.vue +102 -102
  28. package/src/components/SingleUserSelector.vue +425 -425
  29. package/src/components/Switch.vue +64 -64
  30. package/src/components/TreePicker.vue +113 -113
  31. package/src/components/UserPicker.vue +106 -106
  32. package/src/components/UserProfile.vue +129 -129
  33. package/src/components/UsersPicker.vue +118 -118
  34. package/src/components/YearDropdown.vue +59 -59
  35. package/src/components/data_selector.vue +303 -303
  36. package/src/components/image_picker.vue +123 -123
  37. package/src/components/images_picker.vue +195 -195
  38. package/src/components/index.js +162 -162
  39. package/src/components/mult_list_selector.vue +155 -155
  40. package/src/components/subdepartment_selector.vue +481 -481
  41. package/src/components/user_selector.vue +639 -639
  42. package/src/components/widget/DataPop.vue +95 -95
  43. package/src/components/widget/TreePop.vue +88 -88
  44. package/src/components/widget/UserPop.vue +347 -347
  45. package/src/env.d.ts +8 -8
  46. package/src/main.js +117 -117
  47. package/src/router/index.ts +173 -173
  48. package/src/util/array_util.js +32 -32
  49. package/src/util/auth_util.js +72 -73
  50. package/src/util/bool_util.js +5 -5
  51. package/src/util/bus.js +1 -1
  52. package/src/util/cache_util.js +18 -18
  53. package/src/util/errer_code.js +6 -6
  54. package/src/util/eval_util.js +19 -19
  55. package/src/util/icon_util.js +36 -36
  56. package/src/util/image_util.js +27 -27
  57. package/src/util/index.js +57 -57
  58. package/src/util/num_util.js +70 -70
  59. package/src/util/obj_util.js +28 -28
  60. package/src/util/request.js +73 -73
  61. package/src/util/request_json.js +71 -71
  62. package/src/util/request_json_mute.js +65 -65
  63. package/src/util/request_upload.js +79 -79
  64. package/src/util/route_util.js +31 -31
  65. package/src/util/str_util.js +143 -143
  66. package/src/util/time_util.js +406 -406
  67. package/src/util/toast_util.js +24 -24
  68. package/src/util/tree_util.js +153 -153
  69. package/src/util/uuid_util.js +9 -9
  70. package/src/util/validate.js +182 -182
  71. package/src/util/vue_filter.js +223 -223
  72. package/src/views/auditbar/index.vue +78 -78
  73. package/src/views/billcard/index.vue +48 -48
  74. package/src/views/cascaderpop/index.vue +90 -90
  75. package/src/views/checkgroup/index.vue +35 -35
  76. package/src/views/dataSelector/index.vue +48 -48
  77. package/src/views/datetimepicker/index.vue +34 -34
  78. package/src/views/daydropdown/index.vue +31 -31
  79. package/src/views/filepicker/index.vue +32 -32
  80. package/src/views/imagepicker/index.vue +31 -31
  81. package/src/views/imagespicker/index.vue +37 -37
  82. package/src/views/input/index.vue +35 -35
  83. package/src/views/monthdropdown/index.vue +31 -31
  84. package/src/views/multListSelector/index.vue +61 -61
  85. package/src/views/multipicker/index.vue +36 -36
  86. package/src/views/objseditor/index.vue +277 -277
  87. package/src/views/productSelector/index.vue +35 -35
  88. package/src/views/projectpicker/index.vue +41 -41
  89. package/src/views/secretnotify/index.vue +27 -27
  90. package/src/views/sheet/index.vue +45 -45
  91. package/src/views/singlepicker/index.vue +35 -35
  92. package/src/views/subdepartmentSelector/index.vue +40 -40
  93. package/src/views/switch/index.vue +34 -34
  94. package/src/views/treepicker/index.vue +41 -41
  95. package/src/views/userSelector/index.vue +54 -54
  96. package/src/views/userSelectorNew/index.vue +45 -45
  97. package/src/views/userpicker/index.vue +43 -43
  98. package/src/views/userprofile/index.vue +30 -30
  99. package/src/views/userspicker/index.vue +43 -43
  100. package/src/views/yeardropdown/index.vue +32 -32
  101. package/src/vm/index.js +1 -1
  102. package/tsconfig.json +19 -19
  103. package/tsconfig.node.json +8 -8
  104. package/vite.config.ts +122 -122
@@ -1,114 +1,114 @@
1
- <template>
2
- <van-field v-if="!isGone" :label="props.label" :required="isRequired" :rules="props.rules">
3
- <template #input>
4
- <van-checkbox-group v-model="modelValue" direction="vertical" :disabled="isDisabled">
5
- <van-checkbox style="padding:5px 0;" v-for="(option, i) in totalOptions" :key="i" :name="option.code"
6
- shape="square">{{ option.title }}</van-checkbox>
7
- </van-checkbox-group>
8
- </template>
9
- </van-field>
10
- </template>
11
-
12
- <script setup>
13
- import { ref, computed, onMounted, defineProps, defineEmits, watch } from "vue"
14
- import util from "../util"
15
- import { useVModel } from '@vueuse/core'
16
-
17
- const props = defineProps({
18
- id: {
19
- type:String,
20
- default: ''
21
- },
22
- modelValue: {
23
- type: Array,
24
- default:[]
25
- },
26
- label: {
27
- type:String,
28
- default: ''
29
- },
30
- readonly: {
31
- type: Boolean,
32
- default: true
33
- },
34
- required: {
35
- type: Boolean,
36
- default: false
37
- },
38
- auth: {
39
- type: String,
40
- default: ''
41
- },
42
- rules: {
43
- type: Array,
44
- default: null
45
- }
46
- })
47
- const emit = defineEmits(['update:modelValue'])
48
- const modelValue = useVModel(props, 'modelValue', emit)
49
- const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props)
50
- const options = ref([])
51
- // 将初始化数据与配置项合并
52
- const totalOptions = computed(() => {
53
- let selects = modelValue.value
54
- if (!selects || selects.length<1)
55
- selects = []
56
-
57
- let codes = []
58
- let res = []
59
-
60
- if (options.value) {
61
- codes = options.value.map(item => item.code)
62
- res = JSON.parse(JSON.stringify(options.value))
63
- }
64
-
65
- if (!selects || selects.length<1)
66
- return res
67
-
68
- for(var i=0;i<selects.length;i++){
69
- if (codes && codes.length>0 && !codes.includes(selects[i])) {
70
- res.push({
71
- code: selects[i],
72
- title: selects[i]
73
- })
74
- }
75
- }
76
- return res
77
- })
78
- onMounted(async () => {
79
- await query()
80
- })
81
-
82
- const query = async () => {
83
- let params = {
84
- id: props.id,
85
- }
86
- const res = await util.dictionary_dict(params)
87
- console.log(res.data)
88
-
89
- if (!res.data.parseValue) {
90
- options.value = []
91
- return
92
- }
93
-
94
- options.value = res.data.parseValue
95
- }
96
-
97
- watch(()=>props.modelValue,(o,n)=>{
98
- if(!props.modelValue)
99
- modelValue.value = []
100
- },{immediate:true})
101
- </script>
102
-
103
- <style lang="scss" scoped>
104
- :deep(.label) {
105
- color: #000 !important;
106
- }
107
-
108
- :deep(.van-field__control:disabled) {
109
- color: #000 !important;
110
- cursor: not-allowed;
111
- opacity: 1;
112
- -webkit-text-fill-color: #000;
113
- }
1
+ <template>
2
+ <van-field v-if="!isGone" :label="props.label" :required="isRequired" :rules="props.rules">
3
+ <template #input>
4
+ <van-checkbox-group v-model="modelValue" direction="vertical" :disabled="isDisabled">
5
+ <van-checkbox style="padding:5px 0;" v-for="(option, i) in totalOptions" :key="i" :name="option.code"
6
+ shape="square">{{ option.title }}</van-checkbox>
7
+ </van-checkbox-group>
8
+ </template>
9
+ </van-field>
10
+ </template>
11
+
12
+ <script setup>
13
+ import { ref, computed, onMounted, defineProps, defineEmits, watch } from "vue"
14
+ import util from "../util"
15
+ import { useVModel } from '@vueuse/core'
16
+
17
+ const props = defineProps({
18
+ id: {
19
+ type:String,
20
+ default: ''
21
+ },
22
+ modelValue: {
23
+ type: Array,
24
+ default:[]
25
+ },
26
+ label: {
27
+ type:String,
28
+ default: ''
29
+ },
30
+ readonly: {
31
+ type: Boolean,
32
+ default: true
33
+ },
34
+ required: {
35
+ type: Boolean,
36
+ default: false
37
+ },
38
+ auth: {
39
+ type: String,
40
+ default: ''
41
+ },
42
+ rules: {
43
+ type: Array,
44
+ default: null
45
+ }
46
+ })
47
+ const emit = defineEmits(['update:modelValue'])
48
+ const modelValue = useVModel(props, 'modelValue', emit)
49
+ const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props)
50
+ const options = ref([])
51
+ // 将初始化数据与配置项合并
52
+ const totalOptions = computed(() => {
53
+ let selects = modelValue.value
54
+ if (!selects || selects.length<1)
55
+ selects = []
56
+
57
+ let codes = []
58
+ let res = []
59
+
60
+ if (options.value) {
61
+ codes = options.value.map(item => item.code)
62
+ res = JSON.parse(JSON.stringify(options.value))
63
+ }
64
+
65
+ if (!selects || selects.length<1)
66
+ return res
67
+
68
+ for(var i=0;i<selects.length;i++){
69
+ if (codes && codes.length>0 && !codes.includes(selects[i])) {
70
+ res.push({
71
+ code: selects[i],
72
+ title: selects[i]
73
+ })
74
+ }
75
+ }
76
+ return res
77
+ })
78
+ onMounted(async () => {
79
+ await query()
80
+ })
81
+
82
+ const query = async () => {
83
+ let params = {
84
+ id: props.id,
85
+ }
86
+ const res = await util.dictionary_dict(params)
87
+ console.log(res.data)
88
+
89
+ if (!res.data.parseValue) {
90
+ options.value = []
91
+ return
92
+ }
93
+
94
+ options.value = res.data.parseValue
95
+ }
96
+
97
+ watch(()=>props.modelValue,(o,n)=>{
98
+ if(!props.modelValue)
99
+ modelValue.value = []
100
+ },{immediate:true})
101
+ </script>
102
+
103
+ <style lang="scss" scoped>
104
+ :deep(.label) {
105
+ color: #000 !important;
106
+ }
107
+
108
+ :deep(.van-field__control:disabled) {
109
+ color: #000 !important;
110
+ cursor: not-allowed;
111
+ opacity: 1;
112
+ -webkit-text-fill-color: #000;
113
+ }
114
114
  </style>