widget.qw 1.0.83 → 1.0.85

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 (108) hide show
  1. package/.env.development +10 -10
  2. package/.env.production +8 -8
  3. package/README.md +75 -75
  4. package/build/style.css +521 -471
  5. package/build/widget.qw.es.js +253 -84
  6. package/build/widget.qw.umd.js +252 -83
  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 +173 -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 +375 -371
  15. package/src/components/CheckGroup.vue +113 -113
  16. package/src/components/DatetimeDropdown.vue +62 -0
  17. package/src/components/{DatetimePicker/index.vue → DatetimePicker.vue} +124 -124
  18. package/src/components/DayDropdown.vue +56 -56
  19. package/src/components/FilePicker.vue +169 -169
  20. package/src/components/HeadBar.vue +130 -0
  21. package/src/components/Input.vue +80 -80
  22. package/src/components/MonthDropdown.vue +51 -51
  23. package/src/components/MultiPicker.vue +123 -123
  24. package/src/components/ObjsEditor.vue +334 -334
  25. package/src/components/SecretNotify.js +5 -5
  26. package/src/components/Sheet.vue +92 -92
  27. package/src/components/SingleApiPicker.vue +108 -108
  28. package/src/components/SinglePicker.vue +102 -102
  29. package/src/components/SingleUserSelector.vue +425 -425
  30. package/src/components/Switch.vue +64 -64
  31. package/src/components/TreePicker.vue +113 -113
  32. package/src/components/UserPicker.vue +106 -106
  33. package/src/components/UserProfile.vue +129 -129
  34. package/src/components/UsersPicker.vue +118 -118
  35. package/src/components/YearDropdown.vue +59 -59
  36. package/src/components/data_selector.vue +303 -303
  37. package/src/components/image_picker.vue +123 -123
  38. package/src/components/images_picker.vue +195 -195
  39. package/src/components/index.js +172 -162
  40. package/src/components/mult_list_selector.vue +155 -155
  41. package/src/components/subdepartment_selector.vue +481 -481
  42. package/src/components/user_selector.vue +639 -639
  43. package/src/components/widget/DataPop.vue +95 -95
  44. package/src/components/{DatetimePicker → widget}/DatetimePop.vue +342 -342
  45. package/src/components/widget/TreePop.vue +88 -88
  46. package/src/components/widget/UserPop.vue +347 -347
  47. package/src/main.js +117 -117
  48. package/src/router/index.ts +183 -173
  49. package/src/util/array_util.js +32 -32
  50. package/src/util/auth_util.js +72 -72
  51. package/src/util/bool_util.js +5 -5
  52. package/src/util/bus.js +1 -1
  53. package/src/util/cache_util.js +18 -18
  54. package/src/util/errer_code.js +6 -6
  55. package/src/util/eval_util.js +19 -19
  56. package/src/util/icon_util.js +36 -36
  57. package/src/util/image_util.js +27 -27
  58. package/src/util/index.js +57 -57
  59. package/src/util/num_util.js +70 -70
  60. package/src/util/obj_util.js +28 -28
  61. package/src/util/request.js +73 -73
  62. package/src/util/request_json.js +71 -71
  63. package/src/util/request_json_mute.js +65 -65
  64. package/src/util/request_upload.js +79 -79
  65. package/src/util/route_util.js +31 -31
  66. package/src/util/str_util.js +143 -143
  67. package/src/util/time_util.js +406 -406
  68. package/src/util/toast_util.js +24 -24
  69. package/src/util/tree_util.js +153 -153
  70. package/src/util/uuid_util.js +9 -9
  71. package/src/util/validate.js +182 -182
  72. package/src/util/vue_filter.js +223 -223
  73. package/src/views/auditbar/index.vue +78 -78
  74. package/src/views/billcard/index.vue +48 -48
  75. package/src/views/cascaderpicker/index.vue +0 -0
  76. package/src/views/cascaderpicker/userpicker.vue +183 -0
  77. package/src/views/cascaderpop/index.vue +90 -90
  78. package/src/views/checkgroup/index.vue +35 -35
  79. package/src/views/dataSelector/index.vue +48 -48
  80. package/src/views/datetimedropdown/index.vue +34 -0
  81. package/src/views/datetimepicker/index.vue +34 -34
  82. package/src/views/daydropdown/index.vue +31 -31
  83. package/src/views/filepicker/index.vue +32 -32
  84. package/src/views/headbar/index.vue +28 -0
  85. package/src/views/home/index.vue +0 -0
  86. package/src/views/imagepicker/index.vue +31 -31
  87. package/src/views/imagespicker/index.vue +37 -37
  88. package/src/views/input/index.vue +35 -35
  89. package/src/views/monthdropdown/index.vue +31 -31
  90. package/src/views/multListSelector/index.vue +61 -61
  91. package/src/views/multipicker/index.vue +36 -36
  92. package/src/views/objseditor/index.vue +277 -277
  93. package/src/views/productSelector/index.vue +35 -35
  94. package/src/views/projectpicker/index.vue +41 -41
  95. package/src/views/secretnotify/index.vue +27 -27
  96. package/src/views/sheet/index.vue +45 -45
  97. package/src/views/singlepicker/index.vue +35 -35
  98. package/src/views/subdepartmentSelector/index.vue +40 -40
  99. package/src/views/switch/index.vue +34 -34
  100. package/src/views/treepicker/index.vue +41 -41
  101. package/src/views/userSelector/index.vue +54 -54
  102. package/src/views/userSelectorNew/index.vue +45 -45
  103. package/src/views/userpicker/index.vue +43 -43
  104. package/src/views/userprofile/index.vue +30 -30
  105. package/src/views/userspicker/index.vue +43 -43
  106. package/src/views/yeardropdown/index.vue +32 -32
  107. package/src/vm/index.js +1 -1
  108. package/vite.config.ts +122 -122
@@ -1,65 +1,65 @@
1
- <template>
2
- <van-field :label="props.label" v-if="!isGone" :disabled="isDisabled" :required="isRequired"
3
- :placeholder="props.placeholder">
4
- <template #input>
5
- <van-switch v-model="modelValue" :disabled="isDisabled" />
6
- </template>
7
- </van-field>
8
- </template>
9
-
10
- <script setup>
11
- import { ref, computed, onMounted, defineProps, defineEmits, watch } from "vue"
12
- import { useVModel } from '@vueuse/core'
13
- import util from '../util'
14
-
15
- const props = defineProps({
16
- modelValue: {
17
- type: Boolean,
18
- default: false
19
- },
20
- label: {
21
- type: String,
22
- default: ''
23
- },
24
- placeholder: {
25
- type: String,
26
- default: ''
27
- },
28
- readonly: {
29
- type: Boolean,
30
- default: true
31
- },
32
- required: {
33
- type: Boolean,
34
- default: false
35
- },
36
- auth: {
37
- type: String,
38
- default: ''
39
- }
40
- })
41
- const emit = defineEmits(['update:modelValue'])
42
- const modelValue = useVModel(props, 'modelValue', emit)
43
- const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props)
44
-
45
- onMounted(() => {
46
- })
47
-
48
- watch(()=>props.modelValue,(o,n)=>{
49
- if(!props.modelValue)
50
- modelValue.value = false
51
- },{immediate:true})
52
- </script>
53
-
54
- <style lang="scss" scoped>
55
- :deep(.label) {
56
- color: #000 !important;
57
- }
58
-
59
- :deep(.van-field__control:disabled) {
60
- color: #000 !important;
61
- cursor: not-allowed;
62
- opacity: 1;
63
- -webkit-text-fill-color: #000;
64
- }
1
+ <template>
2
+ <van-field :label="props.label" v-if="!isGone" :disabled="isDisabled" :required="isRequired"
3
+ :placeholder="props.placeholder">
4
+ <template #input>
5
+ <van-switch v-model="modelValue" :disabled="isDisabled" />
6
+ </template>
7
+ </van-field>
8
+ </template>
9
+
10
+ <script setup>
11
+ import { ref, computed, onMounted, defineProps, defineEmits, watch } from "vue"
12
+ import { useVModel } from '@vueuse/core'
13
+ import util from '../util'
14
+
15
+ const props = defineProps({
16
+ modelValue: {
17
+ type: Boolean,
18
+ default: false
19
+ },
20
+ label: {
21
+ type: String,
22
+ default: ''
23
+ },
24
+ placeholder: {
25
+ type: String,
26
+ default: ''
27
+ },
28
+ readonly: {
29
+ type: Boolean,
30
+ default: true
31
+ },
32
+ required: {
33
+ type: Boolean,
34
+ default: false
35
+ },
36
+ auth: {
37
+ type: String,
38
+ default: ''
39
+ }
40
+ })
41
+ const emit = defineEmits(['update:modelValue'])
42
+ const modelValue = useVModel(props, 'modelValue', emit)
43
+ const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props)
44
+
45
+ onMounted(() => {
46
+ })
47
+
48
+ watch(()=>props.modelValue,(o,n)=>{
49
+ if(!props.modelValue)
50
+ modelValue.value = false
51
+ },{immediate:true})
52
+ </script>
53
+
54
+ <style lang="scss" scoped>
55
+ :deep(.label) {
56
+ color: #000 !important;
57
+ }
58
+
59
+ :deep(.van-field__control:disabled) {
60
+ color: #000 !important;
61
+ cursor: not-allowed;
62
+ opacity: 1;
63
+ -webkit-text-fill-color: #000;
64
+ }
65
65
  </style>
@@ -1,113 +1,113 @@
1
- <template>
2
- <van-field v-if="!isGone"
3
- :label="props.label" :required="isRequired" :rules="props.rules" :disabled="isDisabled"
4
- :placeholder="props.placeholder" :is-link="isReadonly ? false : true" @click="data.isShowPop = !isReadonly"
5
- label-class="label">
6
- <template #input>
7
- <div class="select-list">
8
- <van-tag class="select-item" :closeable="!isDisabled" type="primary" plain v-for="(item, i) in selectOptions"
9
- :key="item" @close.stop="onDelete(item)">
10
- {{ item.text }}
11
- </van-tag>
12
- </div>
13
- </template>
14
- </van-field>
15
-
16
- <TreePop v-model:show="data.isShowPop"
17
- v-model="modelValue"
18
- :options="data.options" />
19
-
20
- </template>
21
- <script setup>
22
- import { reactive, onMounted, watch, computed } from "vue";
23
- import util from "../util"
24
- import { useVModel } from '@vueuse/core'
25
- import TreePop from './widget/TreePop.vue'
26
-
27
- const props = defineProps({
28
- modelValue: {
29
- type: Array,
30
- default: [],
31
- },
32
- label: {
33
- type: String,
34
- default: "",
35
- },
36
- placeholder: {
37
- type: String,
38
- default: "请选择",
39
- },
40
- id: {
41
- type: String,
42
- default: "",
43
- },
44
- required: {
45
- type: Boolean,
46
- default: false,
47
- },
48
- readonly: {
49
- type: Boolean,
50
- default: false,
51
- },
52
- rules: {
53
- type: Array,
54
- default: () => [],
55
- },
56
- auth: {
57
- type: String,
58
- default: "",
59
- },
60
- });
61
-
62
- // 弹出层
63
- const data = reactive({
64
- isShowPop: false,
65
- options: []
66
- })
67
-
68
- const selectOptions = computed(()=>{
69
- return util.ids2nodes(modelValue.value, data.options)
70
- })
71
-
72
- // 定义emit
73
- const emit = defineEmits(["update:modelValue","select"]);
74
- const modelValue = useVModel(props, 'modelValue', emit)
75
- const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props);
76
-
77
- onMounted(async () => {
78
- await query()
79
- })
80
-
81
- const query = async () => {
82
- let params = {
83
- id: props.id,
84
- }
85
- const res = await util.dictionary_dict(params)
86
- console.log(res.data)
87
-
88
- if (!res.data.parseValue) {
89
- data.options = []
90
- return
91
- }
92
-
93
- data.options = res.data.parseValue
94
- }
95
-
96
- const onDelete=(option)=>{
97
- modelValue.value = (modelValue.value || []).filter(item=>{
98
- return item != option.id
99
- })
100
- }
101
-
102
- watch(() => modelValue.value, async(n, o) => {
103
- emit('select', selectOptions.value)
104
- }, {
105
- immediate: true
106
- })
107
- </script>
108
-
109
- <style scoped>
110
- .select-item{
111
- margin:3px;
112
- }
113
- </style>
1
+ <template>
2
+ <van-field v-if="!isGone"
3
+ :label="props.label" :required="isRequired" :rules="props.rules" :disabled="isDisabled"
4
+ :placeholder="props.placeholder" :is-link="isReadonly ? false : true" @click="data.isShowPop = !isReadonly"
5
+ label-class="label">
6
+ <template #input>
7
+ <div class="select-list">
8
+ <van-tag class="select-item" :closeable="!isDisabled" type="primary" plain v-for="(item, i) in selectOptions"
9
+ :key="item" @close.stop="onDelete(item)">
10
+ {{ item.text }}
11
+ </van-tag>
12
+ </div>
13
+ </template>
14
+ </van-field>
15
+
16
+ <TreePop v-model:show="data.isShowPop"
17
+ v-model="modelValue"
18
+ :options="data.options" />
19
+
20
+ </template>
21
+ <script setup>
22
+ import { reactive, onMounted, watch, computed } from "vue";
23
+ import util from "../util"
24
+ import { useVModel } from '@vueuse/core'
25
+ import TreePop from './widget/TreePop.vue'
26
+
27
+ const props = defineProps({
28
+ modelValue: {
29
+ type: Array,
30
+ default: [],
31
+ },
32
+ label: {
33
+ type: String,
34
+ default: "",
35
+ },
36
+ placeholder: {
37
+ type: String,
38
+ default: "请选择",
39
+ },
40
+ id: {
41
+ type: String,
42
+ default: "",
43
+ },
44
+ required: {
45
+ type: Boolean,
46
+ default: false,
47
+ },
48
+ readonly: {
49
+ type: Boolean,
50
+ default: false,
51
+ },
52
+ rules: {
53
+ type: Array,
54
+ default: () => [],
55
+ },
56
+ auth: {
57
+ type: String,
58
+ default: "",
59
+ },
60
+ });
61
+
62
+ // 弹出层
63
+ const data = reactive({
64
+ isShowPop: false,
65
+ options: []
66
+ })
67
+
68
+ const selectOptions = computed(()=>{
69
+ return util.ids2nodes(modelValue.value, data.options)
70
+ })
71
+
72
+ // 定义emit
73
+ const emit = defineEmits(["update:modelValue","select"]);
74
+ const modelValue = useVModel(props, 'modelValue', emit)
75
+ const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props);
76
+
77
+ onMounted(async () => {
78
+ await query()
79
+ })
80
+
81
+ const query = async () => {
82
+ let params = {
83
+ id: props.id,
84
+ }
85
+ const res = await util.dictionary_dict(params)
86
+ console.log(res.data)
87
+
88
+ if (!res.data.parseValue) {
89
+ data.options = []
90
+ return
91
+ }
92
+
93
+ data.options = res.data.parseValue
94
+ }
95
+
96
+ const onDelete=(option)=>{
97
+ modelValue.value = (modelValue.value || []).filter(item=>{
98
+ return item != option.id
99
+ })
100
+ }
101
+
102
+ watch(() => modelValue.value, async(n, o) => {
103
+ emit('select', selectOptions.value)
104
+ }, {
105
+ immediate: true
106
+ })
107
+ </script>
108
+
109
+ <style scoped>
110
+ .select-item{
111
+ margin:3px;
112
+ }
113
+ </style>
@@ -1,107 +1,107 @@
1
- <template>
2
- <van-field v-if="!isGone" :label="props.label" :required="isRequired" :rules="props.rules" :disabled="isDisabled"
3
- :placeholder="props.placeholder" :is-link="isReadonly ? false : true" @click="data.isShowPop = !isReadonly"
4
- label-class="label">
5
- <template #input>
6
- <van-tag class="user" v-if="modelValue" :closeable="!isDisabled" type="primary" plain
7
- @close.stop="onDelete">
8
- {{ data.user.name }}
9
- </van-tag>
10
- </template>
11
- </van-field>
12
-
13
- <UserPop v-model:show="data.isShowPop" :rootDeptId="props.rootDeptId" :deptRangeId="props.deptRangeId"
14
- @select="onSelectUser" />
15
-
16
- </template>
17
- <script setup>
18
- import { reactive, onMounted, watch } from "vue";
19
- import util from "../util"
20
- import { useVModel } from '@vueuse/core'
21
- import UserPop from './widget/UserPop.vue'
22
-
23
- const props = defineProps({
24
- modelValue: {
25
- type: String,
26
- default: '',
27
- },
28
- label: {
29
- type: String,
30
- default: "选择人员",
31
- },
32
- placeholder: {
33
- type: String,
34
- default: "请选择人员",
35
- },
36
- required: {
37
- type: Boolean,
38
- default: false,
39
- },
40
- readonly: {
41
- type: Boolean,
42
- default: false,
43
- },
44
- rules: {
45
- type: Array,
46
- default: [],
47
- },
48
- // 默认查询所有组织机构
49
- rootDeptId: {
50
- type: String,
51
- default: "1", //组织机构id
52
- },
53
- // 二级部门取值范围字典id
54
- // 取dictionary库.dict的配置id
55
- deptRangeId: {
56
- type: String,
57
- default: ''
58
- },
59
- auth: {
60
- type: String,
61
- default: "",
62
- },
63
- });
64
-
65
- // 弹出层
66
- const data = reactive({
67
- isShowPop: false,
68
- user: {}
69
- })
70
-
71
- // 定义emit
72
- const emit = defineEmits(["update:modelValue", "select"]);
73
- const modelValue = useVModel(props, 'modelValue', emit)
74
- const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props);
75
-
76
- //首页加载
77
- onMounted(() => {
78
- })
79
-
80
- const onSelectUser = (userId) => {
81
- modelValue.value = userId
82
- }
83
-
84
- const onDelete=()=>{
85
- data.user={}
86
- modelValue.value = null
87
- }
88
-
89
- watch(() => modelValue.value, async (n, o) => {
90
- if (!n) {
91
- data.user = {}
92
- return
93
- }
94
-
95
- let res = await util.get_wxuser_by_id({ userId: n })
96
- data.user = res.data
97
- emit('select', data.user)
98
- }, {
99
- immediate: true
100
- })
101
- </script>
102
-
103
- <style scoped>
104
- .user{
105
- padding:4px 8px;
106
- }
1
+ <template>
2
+ <van-field v-if="!isGone" :label="props.label" :required="isRequired" :rules="props.rules" :disabled="isDisabled"
3
+ :placeholder="props.placeholder" :is-link="isReadonly ? false : true" @click="data.isShowPop = !isReadonly"
4
+ label-class="label">
5
+ <template #input>
6
+ <van-tag class="user" v-if="modelValue" :closeable="!isDisabled" type="primary" plain
7
+ @close.stop="onDelete">
8
+ {{ data.user.name }}
9
+ </van-tag>
10
+ </template>
11
+ </van-field>
12
+
13
+ <UserPop v-model:show="data.isShowPop" :rootDeptId="props.rootDeptId" :deptRangeId="props.deptRangeId"
14
+ @select="onSelectUser" />
15
+
16
+ </template>
17
+ <script setup>
18
+ import { reactive, onMounted, watch } from "vue";
19
+ import util from "../util"
20
+ import { useVModel } from '@vueuse/core'
21
+ import UserPop from './widget/UserPop.vue'
22
+
23
+ const props = defineProps({
24
+ modelValue: {
25
+ type: String,
26
+ default: '',
27
+ },
28
+ label: {
29
+ type: String,
30
+ default: "选择人员",
31
+ },
32
+ placeholder: {
33
+ type: String,
34
+ default: "请选择人员",
35
+ },
36
+ required: {
37
+ type: Boolean,
38
+ default: false,
39
+ },
40
+ readonly: {
41
+ type: Boolean,
42
+ default: false,
43
+ },
44
+ rules: {
45
+ type: Array,
46
+ default: [],
47
+ },
48
+ // 默认查询所有组织机构
49
+ rootDeptId: {
50
+ type: String,
51
+ default: "1", //组织机构id
52
+ },
53
+ // 二级部门取值范围字典id
54
+ // 取dictionary库.dict的配置id
55
+ deptRangeId: {
56
+ type: String,
57
+ default: ''
58
+ },
59
+ auth: {
60
+ type: String,
61
+ default: "",
62
+ },
63
+ });
64
+
65
+ // 弹出层
66
+ const data = reactive({
67
+ isShowPop: false,
68
+ user: {}
69
+ })
70
+
71
+ // 定义emit
72
+ const emit = defineEmits(["update:modelValue", "select"]);
73
+ const modelValue = useVModel(props, 'modelValue', emit)
74
+ const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props);
75
+
76
+ //首页加载
77
+ onMounted(() => {
78
+ })
79
+
80
+ const onSelectUser = (userId) => {
81
+ modelValue.value = userId
82
+ }
83
+
84
+ const onDelete=()=>{
85
+ data.user={}
86
+ modelValue.value = null
87
+ }
88
+
89
+ watch(() => modelValue.value, async (n, o) => {
90
+ if (!n) {
91
+ data.user = {}
92
+ return
93
+ }
94
+
95
+ let res = await util.get_wxuser_by_id({ userId: n })
96
+ data.user = res.data
97
+ emit('select', data.user)
98
+ }, {
99
+ immediate: true
100
+ })
101
+ </script>
102
+
103
+ <style scoped>
104
+ .user{
105
+ padding:4px 8px;
106
+ }
107
107
  </style>