widget.qw 1.0.21 → 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 (100) hide show
  1. package/.env.development +9 -9
  2. package/.env.production +8 -8
  3. package/README.md +73 -73
  4. package/build/style.css +482 -468
  5. package/build/widget.qw.es.js +2429 -1714
  6. package/build/widget.qw.umd.js +2347 -1632
  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 +141 -141
  11. package/src/components/AuditBar.vue +340 -340
  12. package/src/components/BillCard.vue +155 -155
  13. package/src/components/CascaderPicker.vue +87 -110
  14. package/src/components/CascaderPop.vue +330 -339
  15. package/src/components/CheckGroup.vue +113 -113
  16. package/src/components/DatetimePicker/DatetimePop.vue +342 -342
  17. package/src/components/DatetimePicker/index.vue +112 -112
  18. package/src/components/DayDropdown.vue +56 -56
  19. package/src/components/FilePicker.vue +113 -113
  20. package/src/components/Input.vue +71 -71
  21. package/src/components/MonthDropdown.vue +51 -51
  22. package/src/components/MultiPicker.vue +123 -123
  23. package/src/components/SecretNotify.js +5 -5
  24. package/src/components/Sheet.vue +92 -92
  25. package/src/components/SingleApiPicker.vue +112 -112
  26. package/src/components/SinglePicker.vue +102 -102
  27. package/src/components/SingleUserSelector.vue +425 -425
  28. package/src/components/Switch.vue +64 -64
  29. package/src/components/TreePicker.vue +113 -113
  30. package/src/components/UserPicker.vue +106 -106
  31. package/src/components/UserProfile.vue +131 -128
  32. package/src/components/UsersPicker.vue +118 -118
  33. package/src/components/YearDropdown.vue +59 -59
  34. package/src/components/data_selector.vue +280 -280
  35. package/src/components/image_picker.vue +114 -114
  36. package/src/components/images_picker.vue +139 -139
  37. package/src/components/index.js +157 -157
  38. package/src/components/mult_list_selector.vue +155 -155
  39. package/src/components/subdepartment_selector.vue +481 -481
  40. package/src/components/user_selector.vue +639 -639
  41. package/src/components/widget/DataPop.vue +95 -95
  42. package/src/components/widget/TreePop.vue +88 -88
  43. package/src/components/widget/UserPop.vue +347 -347
  44. package/src/main.js +117 -117
  45. package/src/router/index.ts +168 -168
  46. package/src/util/array_util.js +32 -32
  47. package/src/util/auth_util.js +72 -72
  48. package/src/util/bool_util.js +5 -5
  49. package/src/util/bus.js +1 -1
  50. package/src/util/cache_util.js +18 -18
  51. package/src/util/errer_code.js +6 -6
  52. package/src/util/eval_util.js +19 -19
  53. package/src/util/icon_util.js +36 -36
  54. package/src/util/image_util.js +27 -27
  55. package/src/util/index.js +55 -55
  56. package/src/util/num_util.js +70 -70
  57. package/src/util/obj_util.js +28 -28
  58. package/src/util/request.js +73 -73
  59. package/src/util/request_json.js +71 -71
  60. package/src/util/request_json_mute.js +65 -65
  61. package/src/util/request_upload.js +79 -79
  62. package/src/util/route_util.js +31 -31
  63. package/src/util/str_util.js +143 -143
  64. package/src/util/time_util.js +406 -406
  65. package/src/util/toast_util.js +24 -24
  66. package/src/util/tree_util.js +153 -153
  67. package/src/util/validate.js +182 -182
  68. package/src/util/vue_filter.js +223 -223
  69. package/src/views/auditbar/index.vue +65 -65
  70. package/src/views/billcard/index.vue +45 -45
  71. package/src/views/cascaderpicker/index.vue +0 -0
  72. package/src/views/cascaderpop/index.vue +90 -90
  73. package/src/views/checkgroup/index.vue +35 -35
  74. package/src/views/dataSelector/index.vue +48 -48
  75. package/src/views/datetimepicker/index.vue +34 -34
  76. package/src/views/daydropdown/index.vue +31 -31
  77. package/src/views/filepicker/index.vue +31 -31
  78. package/src/views/imagepicker/index.vue +31 -31
  79. package/src/views/imagespicker/index.vue +31 -31
  80. package/src/views/input/index.vue +34 -34
  81. package/src/views/monthdropdown/index.vue +31 -31
  82. package/src/views/multListSelector/index.vue +61 -61
  83. package/src/views/multipicker/index.vue +36 -36
  84. package/src/views/productSelector/index.vue +35 -35
  85. package/src/views/projectdropdown/index.vue +31 -31
  86. package/src/views/projectpicker/index.vue +41 -41
  87. package/src/views/secretnotify/index.vue +27 -27
  88. package/src/views/sheet/index.vue +45 -45
  89. package/src/views/singlepicker/index.vue +35 -35
  90. package/src/views/subdepartmentSelector/index.vue +40 -40
  91. package/src/views/switch/index.vue +34 -34
  92. package/src/views/treepicker/index.vue +41 -41
  93. package/src/views/userSelector/index.vue +54 -54
  94. package/src/views/userSelectorNew/index.vue +45 -45
  95. package/src/views/userpicker/index.vue +43 -43
  96. package/src/views/userprofile/index.vue +30 -30
  97. package/src/views/userspicker/index.vue +43 -43
  98. package/src/views/yeardropdown/index.vue +32 -32
  99. package/src/vm/index.js +1 -1
  100. package/vite.config.ts +122 -122
@@ -1,156 +1,156 @@
1
- <template>
2
- <div class="widget">
3
- <van-cell-group inset class="card-box">
4
- <div class="card-header">
5
- <div class="card-sum">
6
- <div class="card-type">{{ props.category }}</div>
7
- <div class="card-no">{{ props.no }}</div>
8
- </div>
9
- <van-tag class="user-state" size="large" :color="userState2color(props.userState)">{{
10
- userState2title(props.userState)
11
- }}</van-tag>
12
- <van-tag class="process-state" mark plain size="large" :color="processState2color(props.processState)">{{
13
- processState2title(props.processState)
14
- }}</van-tag>
15
- </div>
16
-
17
- <van-cell :title="item.title" :value="item.value" :border="false" v-for="(item,i) in props.fields" :key="i"/>
18
- </van-cell-group>
19
- </div>
20
- </template>
21
-
22
- <script setup>
23
- import { reactive, ref, onMounted, watch, computed } from "vue"
24
- import util from '@/util'
25
-
26
- const props = defineProps({
27
- // 单据类型
28
- category:{
29
- type:String,
30
- default:''
31
- },
32
- // 单号
33
- no:{
34
- type:String,
35
- default:''
36
- },
37
- // 流程状态
38
- processState:{
39
- type:String,
40
- default:''
41
- },
42
- // 用户状态
43
- userState:{
44
- type:String,
45
- default:''
46
- },
47
- // 摘要字段
48
- fields:{
49
- type:Array,
50
- default:[]
51
- }
52
- })
53
- const data = reactive({
54
- })
55
-
56
- onMounted(() => {
57
-
58
- })
59
-
60
- const processState2color = (state) => {
61
- if (state == 'finish_pass') {
62
- return '#ACACAC'
63
- } else if (state == 'finish_refuse') {
64
- return '#ACACAC'
65
- } else if (state == 'started') {
66
- return '#338CDE'
67
- } else {
68
- return '#ACACAC'
69
- }
70
- }
71
-
72
- const processState2title = (state) => {
73
- if (state == 'finish_pass') {
74
- return '已完成'
75
- } else if (state == 'finish_refuse') {
76
- return '已撤销'
77
- } else if (state == 'started') {
78
- return '进行中'
79
- } else {
80
- return '未知'
81
- }
82
- }
83
-
84
- const userState2color = (state) => {
85
- if (state == 'unstart') {
86
- return '#9A9A9A'
87
- } else if (state == 'started') {
88
- return '#EE0A25'
89
- } else if (state == 'pass') {
90
- return '#07C062'
91
- } else if (state == 'refuse') {
92
- return '#EE0A25'
93
- } else {
94
- return '#9A9A9A'
95
- }
96
- }
97
-
98
- const userState2title = (state)=>{
99
- if (state == 'unstart') {
100
- return '未启动'
101
- } else if (state == 'started') {
102
- return '待审核'
103
- } else if (state == 'pass') {
104
- return '已审核'
105
- } else if (state == 'refuse') {
106
- return '已驳回'
107
- } else {
108
- return '未知'
109
- }
110
- }
111
- </script>
112
-
113
- <style lang='scss' scoped>
114
- .widget {
115
- background-color: white;
116
- border-radius: 8px;
117
- box-shadow: var(--van-dropdown-menu-shadow);
118
- color: 14px;
119
-
120
- .card-box {
121
- padding-bottom: 8px;
122
- .card-header {
123
- display: flex;
124
- align-items: center;
125
- justify-content: space-between;
126
- padding: 15px 10px;
127
- border-bottom: 1px solid #eee;
128
- .card-sum{
129
- flex:1;
130
- font-size: 14px;
131
- text-align: left;
132
- }
133
- .user-state{
134
- margin-right: 1px;
135
- }
136
- }
137
- }
138
- }
139
-
140
- :deep(.van-cell__value){
141
- flex:2 !important;
142
- }
143
-
144
- :deep(.van-cell__title){
145
- font-size: 12px !important;
146
- color: #666 !important;
147
- text-align: left !important;
148
- }
149
- :deep(.van-cell__value){
150
- font-size: 12px !important;
151
- color: #888 !important;
152
- }
153
- :deep(.van-cell){
154
- padding: 2px 10px !important;
155
- }
1
+ <template>
2
+ <div class="widget">
3
+ <van-cell-group inset class="card-box">
4
+ <div class="card-header">
5
+ <div class="card-sum">
6
+ <div class="card-type">{{ props.category }}</div>
7
+ <div class="card-no">{{ props.no }}</div>
8
+ </div>
9
+ <van-tag class="user-state" size="large" :color="userState2color(props.userState)">{{
10
+ userState2title(props.userState)
11
+ }}</van-tag>
12
+ <van-tag class="process-state" mark plain size="large" :color="processState2color(props.processState)">{{
13
+ processState2title(props.processState)
14
+ }}</van-tag>
15
+ </div>
16
+
17
+ <van-cell :title="item.title" :value="item.value" :border="false" v-for="(item,i) in props.fields" :key="i"/>
18
+ </van-cell-group>
19
+ </div>
20
+ </template>
21
+
22
+ <script setup>
23
+ import { reactive, ref, onMounted, watch, computed } from "vue"
24
+ import util from '@/util'
25
+
26
+ const props = defineProps({
27
+ // 单据类型
28
+ category:{
29
+ type:String,
30
+ default:''
31
+ },
32
+ // 单号
33
+ no:{
34
+ type:String,
35
+ default:''
36
+ },
37
+ // 流程状态
38
+ processState:{
39
+ type:String,
40
+ default:''
41
+ },
42
+ // 用户状态
43
+ userState:{
44
+ type:String,
45
+ default:''
46
+ },
47
+ // 摘要字段
48
+ fields:{
49
+ type:Array,
50
+ default:[]
51
+ }
52
+ })
53
+ const data = reactive({
54
+ })
55
+
56
+ onMounted(() => {
57
+
58
+ })
59
+
60
+ const processState2color = (state) => {
61
+ if (state == 'finish_pass') {
62
+ return '#ACACAC'
63
+ } else if (state == 'finish_refuse') {
64
+ return '#ACACAC'
65
+ } else if (state == 'started') {
66
+ return '#338CDE'
67
+ } else {
68
+ return '#ACACAC'
69
+ }
70
+ }
71
+
72
+ const processState2title = (state) => {
73
+ if (state == 'finish_pass') {
74
+ return '已完成'
75
+ } else if (state == 'finish_refuse') {
76
+ return '已撤销'
77
+ } else if (state == 'started') {
78
+ return '进行中'
79
+ } else {
80
+ return '未知'
81
+ }
82
+ }
83
+
84
+ const userState2color = (state) => {
85
+ if (state == 'unstart') {
86
+ return '#9A9A9A'
87
+ } else if (state == 'started') {
88
+ return '#EE0A25'
89
+ } else if (state == 'pass') {
90
+ return '#07C062'
91
+ } else if (state == 'refuse') {
92
+ return '#EE0A25'
93
+ } else {
94
+ return '#9A9A9A'
95
+ }
96
+ }
97
+
98
+ const userState2title = (state)=>{
99
+ if (state == 'unstart') {
100
+ return '未启动'
101
+ } else if (state == 'started') {
102
+ return '待审核'
103
+ } else if (state == 'pass') {
104
+ return '已审核'
105
+ } else if (state == 'refuse') {
106
+ return '已驳回'
107
+ } else {
108
+ return '未知'
109
+ }
110
+ }
111
+ </script>
112
+
113
+ <style lang='scss' scoped>
114
+ .widget {
115
+ background-color: white;
116
+ border-radius: 8px;
117
+ box-shadow: var(--van-dropdown-menu-shadow);
118
+ color: 14px;
119
+
120
+ .card-box {
121
+ padding-bottom: 8px;
122
+ .card-header {
123
+ display: flex;
124
+ align-items: center;
125
+ justify-content: space-between;
126
+ padding: 15px 10px;
127
+ border-bottom: 1px solid #eee;
128
+ .card-sum{
129
+ flex:1;
130
+ font-size: 14px;
131
+ text-align: left;
132
+ }
133
+ .user-state{
134
+ margin-right: 1px;
135
+ }
136
+ }
137
+ }
138
+ }
139
+
140
+ :deep(.van-cell__value){
141
+ flex:2 !important;
142
+ }
143
+
144
+ :deep(.van-cell__title){
145
+ font-size: 12px !important;
146
+ color: #666 !important;
147
+ text-align: left !important;
148
+ }
149
+ :deep(.van-cell__value){
150
+ font-size: 12px !important;
151
+ color: #888 !important;
152
+ }
153
+ :deep(.van-cell){
154
+ padding: 2px 10px !important;
155
+ }
156
156
  </style>
@@ -1,111 +1,88 @@
1
- <template>
2
- <van-field v-if="!isGone" :label="props.label" readonly :required="isRequired" :rules="props.rules"
3
- :disabled="isDisabled" :placeholder="props.placeholder" :is-link="isReadonly ? false : true"
4
- @click="data.isShowPop = !isReadonly" label-class="label">
5
- <template #input v-if="modelValue">
6
- <van-tag class="selected-node" v-if="modelValue" :closeable="!isDisabled" color="#fff" text-color="#333"
7
- size="medium" @close.stop="onDelete">
8
- {{ data.selectedNode.formatLabel }}
9
- </van-tag>
10
- </template>
11
- </van-field>
12
-
13
- <CascaderPop v-model:show="data.isShowPop" v-model="modelValue" :placeholder="props.placeholder" @select="onSelect"
14
- :queryNodes="props.queryNodes" :queryNode="props.queryNode" :minLevel="props.minLevel"
15
- :maxLevel="props.maxLevel" />
16
-
17
- </template>
18
- <script setup>
19
- import { reactive, onMounted, watch } from "vue";
20
- import util from "@/util"
21
- import { useVModel } from '@vueuse/core'
22
- import CascaderPop from './CascaderPop.vue'
23
-
24
- const props = defineProps({
25
- modelValue: {
26
- type: String,
27
- default: '',
28
- },
29
- label: {
30
- type: String,
31
- default: "",
32
- },
33
- placeholder: {
34
- type: String,
35
- default: "",
36
- },
37
- required: {
38
- type: Boolean,
39
- default: false,
40
- },
41
- readonly: {
42
- type: Boolean,
43
- default: true,
44
- },
45
- rules: {
46
- type: Array,
47
- default: [],
48
- },
49
- auth: {
50
- type: String,
51
- default: "",
52
- },
53
- queryNodes: {
54
- type: Function,
55
- default: () => { }
56
- },
57
- queryNode: {
58
- type: Function,
59
- default: () => { }
60
- },
61
- minLevel: {
62
- type: Number,
63
- default: 1
64
- },
65
- maxLevel: {
66
- type: Number,
67
- default: 9999
68
- }
69
- });
70
-
71
- // 弹出层
72
- const data = reactive({
73
- isShowPop: false,
74
- selectedNode: {}
75
- })
76
-
77
- // 定义emit
78
- const emit = defineEmits(["update:modelValue", "select"]);
79
- const modelValue = useVModel(props, 'modelValue', emit)
80
- const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props);
81
-
82
- //首页加载
83
- onMounted(() => {
84
- })
85
-
86
- const onSelect = (node) => {
87
- data.selectedNode = node
88
- emit('select', data.selectedNode)
89
- }
90
-
91
- const onDelete = () => {
92
- data.selectedNode = {}
93
- modelValue.value = null
94
- }
95
-
96
- watch(() => modelValue.value, async (n, o) => {
97
- if (!n) {
98
- data.selectedNode = {}
99
- return
100
- }
101
-
102
- props.queryNode((node) => {
103
- data.selectedNode = node
104
- emit('select', data.selectedNode)
105
- })
106
- }, {
107
- immediate: true
108
- })
109
- </script>
110
-
1
+ <template>
2
+ <van-field v-if="!isGone" :label="props.label" readonly :required="isRequired" :rules="props.rules"
3
+ :disabled="isDisabled" :placeholder="props.placeholder" :is-link="isReadonly ? false : true"
4
+ @click="data.isShowPop = !isReadonly" label-class="label">
5
+ <template #input v-if="modelValue">
6
+ <van-tag class="selected-node" v-if="modelValue" :closeable="!isDisabled" color="#fff" text-color="#333"
7
+ size="medium" @close.stop="onDelete">
8
+ {{ data.selectedNode.path }}
9
+ </van-tag>
10
+ </template>
11
+ </van-field>
12
+
13
+ <CascaderPop v-model:show="data.isShowPop" v-model="modelValue" :placeholder="props.placeholder" @select="onSelect"
14
+ :keywordQueryNode="props.keywordQueryNode" :idQueryNode="props.idQueryNode" />
15
+ </template>
16
+
17
+ <script setup>
18
+ import { reactive, onMounted, watch } from "vue";
19
+ import util from "@/util"
20
+ import { useVModel } from '@vueuse/core'
21
+ import CascaderPop from './CascaderPop.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: true,
43
+ },
44
+ rules: {
45
+ type: Array,
46
+ default: [],
47
+ },
48
+ auth: {
49
+ type: String,
50
+ default: "",
51
+ },
52
+ keywordQueryNode: {
53
+ type: Function,
54
+ default: () => { }
55
+ },
56
+ idQueryNode: {
57
+ type: Function,
58
+ default: () => { }
59
+ },
60
+ });
61
+
62
+ // 弹出层
63
+ const data = reactive({
64
+ isShowPop: false,
65
+ selectedNode: {}
66
+ })
67
+
68
+ // 定义emit
69
+ const emit = defineEmits(["update:modelValue", "select"]);
70
+ const modelValue = useVModel(props, 'modelValue', emit)
71
+ const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props);
72
+
73
+ //首页加载
74
+ onMounted(() => {
75
+ })
76
+
77
+ const onSelect = (node) => {
78
+ data.selectedNode = node
79
+ emit('select', data.selectedNode)
80
+ }
81
+
82
+ const onDelete = () => {
83
+ data.selectedNode = {}
84
+ modelValue.value = null
85
+ }
86
+ </script>
87
+
111
88
  <style scoped></style>