widget.qw 0.0.1

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 (115) hide show
  1. package/README.md +73 -0
  2. package/build/favicon.ico +0 -0
  3. package/build/style.css +763 -0
  4. package/build/widget.qw.es.js +20653 -0
  5. package/build/widget.qw.umd.js +20660 -0
  6. package/index.html +17 -0
  7. package/package.json +47 -0
  8. package/public/favicon.ico +0 -0
  9. package/src/App.vue +26 -0
  10. package/src/api/index.js +126 -0
  11. package/src/assets/avatar.png +0 -0
  12. package/src/assets/banner_handle.png +0 -0
  13. package/src/assets/bg_blue.png +0 -0
  14. package/src/assets/bg_white.png +0 -0
  15. package/src/assets/down.png +0 -0
  16. package/src/assets/home.jpg +0 -0
  17. package/src/assets/icon_box.png +0 -0
  18. package/src/assets/icon_dot.png +0 -0
  19. package/src/assets/icon_draw.png +0 -0
  20. package/src/assets/icon_file.png +0 -0
  21. package/src/assets/icon_fold.png +0 -0
  22. package/src/assets/icon_shield.png +0 -0
  23. package/src/assets/logo.png +0 -0
  24. package/src/components/AuditBar.vue +341 -0
  25. package/src/components/BillCard.vue +156 -0
  26. package/src/components/CheckGroup.vue +114 -0
  27. package/src/components/DatetimePicker/DatetimePop.vue +343 -0
  28. package/src/components/DatetimePicker/index.vue +113 -0
  29. package/src/components/DayDropdown.vue +57 -0
  30. package/src/components/FilePicker.vue +114 -0
  31. package/src/components/Input.vue +72 -0
  32. package/src/components/MonthDropdown.vue +52 -0
  33. package/src/components/MultiPicker.vue +124 -0
  34. package/src/components/ProjectDropdown.vue +62 -0
  35. package/src/components/ProjectPicker.vue +111 -0
  36. package/src/components/SecretNotify.js +6 -0
  37. package/src/components/Sheet.vue +93 -0
  38. package/src/components/SinglePicker.vue +103 -0
  39. package/src/components/SingleUserSelector.vue +425 -0
  40. package/src/components/Switch.vue +65 -0
  41. package/src/components/TreePicker.vue +113 -0
  42. package/src/components/UserPicker.vue +107 -0
  43. package/src/components/UserProfile.vue +128 -0
  44. package/src/components/UsersPicker.vue +118 -0
  45. package/src/components/YearDropdown.vue +60 -0
  46. package/src/components/data_selector.vue +281 -0
  47. package/src/components/image_picker.vue +115 -0
  48. package/src/components/images_picker.vue +140 -0
  49. package/src/components/index.js +157 -0
  50. package/src/components/mult_list_selector.vue +156 -0
  51. package/src/components/product_selector.vue +186 -0
  52. package/src/components/subdepartment_selector.vue +481 -0
  53. package/src/components/user_selector.vue +639 -0
  54. package/src/components/widget/DataPop.vue +96 -0
  55. package/src/components/widget/TreePop.vue +89 -0
  56. package/src/components/widget/UserPop.vue +347 -0
  57. package/src/env.d.ts +8 -0
  58. package/src/main.js +111 -0
  59. package/src/router/index.ts +165 -0
  60. package/src/util/array_util.js +32 -0
  61. package/src/util/auth_util.js +73 -0
  62. package/src/util/bool_util.js +6 -0
  63. package/src/util/bus.js +2 -0
  64. package/src/util/cache_util.js +19 -0
  65. package/src/util/errer_code.js +7 -0
  66. package/src/util/eval_util.js +20 -0
  67. package/src/util/icon_util.js +37 -0
  68. package/src/util/image_util.js +28 -0
  69. package/src/util/index.js +56 -0
  70. package/src/util/num_util.js +71 -0
  71. package/src/util/obj_util.js +29 -0
  72. package/src/util/request.js +74 -0
  73. package/src/util/request_json.js +72 -0
  74. package/src/util/request_json_mute.js +66 -0
  75. package/src/util/request_upload.js +79 -0
  76. package/src/util/route_util.js +32 -0
  77. package/src/util/str_util.js +144 -0
  78. package/src/util/time_util.js +407 -0
  79. package/src/util/toast_util.js +25 -0
  80. package/src/util/tree_util.js +120 -0
  81. package/src/util/validate.js +183 -0
  82. package/src/util/vue_filter.js +223 -0
  83. package/src/views/auditbar/index.vue +66 -0
  84. package/src/views/billcard/index.vue +46 -0
  85. package/src/views/checkgroup/index.vue +36 -0
  86. package/src/views/dataSelector/index.vue +49 -0
  87. package/src/views/datetimepicker/index.vue +35 -0
  88. package/src/views/daydropdown/index.vue +31 -0
  89. package/src/views/filepicker/index.vue +32 -0
  90. package/src/views/home/index.vue +64 -0
  91. package/src/views/imagepicker/index.vue +32 -0
  92. package/src/views/imagespicker/index.vue +32 -0
  93. package/src/views/input/index.vue +35 -0
  94. package/src/views/monthdropdown/index.vue +31 -0
  95. package/src/views/multListSelector/index.vue +61 -0
  96. package/src/views/multipicker/index.vue +37 -0
  97. package/src/views/productSelector/index.vue +35 -0
  98. package/src/views/projectdropdown/index.vue +31 -0
  99. package/src/views/projectpicker/index.vue +42 -0
  100. package/src/views/secretnotify/index.vue +28 -0
  101. package/src/views/sheet/index.vue +46 -0
  102. package/src/views/singlepicker/index.vue +36 -0
  103. package/src/views/subdepartmentSelector/index.vue +41 -0
  104. package/src/views/switch/index.vue +35 -0
  105. package/src/views/treepicker/index.vue +42 -0
  106. package/src/views/userSelector/index.vue +54 -0
  107. package/src/views/userSelectorNew/index.vue +45 -0
  108. package/src/views/userpicker/index.vue +43 -0
  109. package/src/views/userprofile/index.vue +30 -0
  110. package/src/views/userspicker/index.vue +43 -0
  111. package/src/views/yeardropdown/index.vue +32 -0
  112. package/src/vm/index.js +6 -0
  113. package/tsconfig.json +19 -0
  114. package/tsconfig.node.json +8 -0
  115. package/vite.config.ts +73 -0
@@ -0,0 +1,183 @@
1
+ /**
2
+ * Created by PanJiaChen on 16/11/18.
3
+ */
4
+
5
+ /**
6
+ * @param {string} path
7
+ * @returns {Boolean}
8
+ */
9
+ export function isExternal(path) {
10
+ return /^(https?:|mailto:|tel:)/.test(path);
11
+ }
12
+
13
+ /**
14
+ * @param {string} str
15
+ * @returns {Boolean}
16
+ */
17
+ export function validUsername(str) {
18
+ const valid_map = ["admin", "editor"];
19
+ return valid_map.indexOf(str.trim()) >= 0;
20
+ }
21
+
22
+ /**
23
+ * @param {string} url
24
+ * @returns {Boolean}
25
+ */
26
+ export function isURL(url) {
27
+ const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
28
+ return reg.test(url);
29
+ }
30
+
31
+ /**
32
+ * @param {string} str
33
+ * @returns {Boolean}
34
+ */
35
+ export function validLowerCase(str) {
36
+ const reg = /^[a-z]+$/;
37
+ return reg.test(str);
38
+ }
39
+
40
+ /**
41
+ * @param {string} str
42
+ * @returns {Boolean}
43
+ */
44
+ export function validUpperCase(str) {
45
+ const reg = /^[A-Z]+$/;
46
+ return reg.test(str);
47
+ }
48
+
49
+ /**
50
+ * @param {string} str
51
+ * @returns {Boolean}
52
+ */
53
+ export function validateAlphabet(str) {
54
+ const reg = /^[A-Za-z]+$/;
55
+ return reg.test(str);
56
+ }
57
+
58
+ /**
59
+ * @param {string} email
60
+ * @returns {Boolean}
61
+ */
62
+ export function validateEmail(email) {
63
+ if (!email)
64
+ return false
65
+
66
+ const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
67
+ return reg.test(email);
68
+ }
69
+
70
+ export function validatePhone(phone) {
71
+ if (!phone)
72
+ return false
73
+
74
+ if (!(/^1[3456789]\d{9}$/.test(phone))) {
75
+ return false;
76
+ }
77
+ return true;
78
+ }
79
+
80
+ /**
81
+ * 6位数字验证码
82
+ * @param {string} str
83
+ * @returns {Boolean}
84
+ */
85
+ export function validateCode6(code) {
86
+ if (code.length != 6)
87
+ return false;
88
+
89
+ let reg = /^\d{6}$/;
90
+ return reg.test(code);
91
+ }
92
+
93
+ /**
94
+ * @param {string} str
95
+ * @returns {Boolean}
96
+ */
97
+ export function isString(str) {
98
+ if (typeof str === "string" || str instanceof String) {
99
+ return true;
100
+ }
101
+ return false;
102
+ }
103
+
104
+ /**
105
+ * @param {Array} arg
106
+ * @returns {Boolean}
107
+ */
108
+ export function isArray(arg) {
109
+ if (typeof Array.isArray === "undefined") {
110
+ return Object.prototype.toString.call(arg) === "[object Array]";
111
+ }
112
+ return Array.isArray(arg);
113
+ }
114
+
115
+ export function strIsEmpty(str) {
116
+ if (!str || typeof(str) == 'undefined' || str == '' || str == null)
117
+ return true
118
+ else
119
+ return false
120
+ };
121
+
122
+ export function objIsNull(obj) {
123
+ if (!obj || typeof(obj) == 'undefined' || obj == '' || obj == null)
124
+ return true
125
+ else
126
+ return false
127
+ };
128
+
129
+ export function numIsate(num) {
130
+ if (!num || typeof(num) == 'undefined' || num == null || num <= 0)
131
+ return false
132
+ else
133
+ return true
134
+ };
135
+
136
+ export function listIsEmpty(list) {
137
+ if (!list || typeof(list) == 'undefined' || list == null || list.length == 0)
138
+ return true
139
+ else
140
+ return false
141
+ };
142
+
143
+ export function boolIsTrue(flag) {
144
+ if (!flag || typeof(flag) == 'undefined' || flag == null)
145
+ return false
146
+ else
147
+ return true
148
+ };
149
+
150
+ /**
151
+ * 颜色
152
+ * 例如:
153
+ * 6位颜色值:#ffffff
154
+ * 3位颜色值:#aaa
155
+ * @param {string} str
156
+ * @returns {Boolean}
157
+ */
158
+ export function validColor(color) {
159
+ if (!color)
160
+ return false;
161
+
162
+
163
+ //3位或6位
164
+ // let reg=/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/;
165
+ let reg = /^#([0-9a-fA-F]{6})$/;
166
+ return reg.test(color);
167
+ }
168
+
169
+ /**
170
+ * 验证是否是字母和数字组合
171
+ * @param {*} str
172
+ * @returns
173
+ */
174
+ export function validateAlphabetNumber(str) {
175
+ // 判断字符串是否为数字和字母组合
176
+ var zg = /^[0-9a-zA-Z]*$/;
177
+
178
+ if (!zg.test(str)) {
179
+ return false;
180
+ } else {
181
+ return true;
182
+ }
183
+ }
@@ -0,0 +1,223 @@
1
+ // 加载Vue的过滤器
2
+ import Vue from 'vue'
3
+ import { date2Chinese, date2yyyyMMdd, date2yyyyMMddhhmm, time2hhmm, time2hhmmss } from './time_util.js'
4
+ import moment from "moment";
5
+ //使用中文日期
6
+ moment.locale('zh-cn');
7
+
8
+ /**
9
+ * 绝对时间格式化为相对时间
10
+ * @param value 调用过滤器时,调用的绝对时间字符串
11
+ */
12
+ Vue.filter('time2Lapse', function (date) {
13
+ let m2 = moment(); //当下时间
14
+ // let m2=moment('2019-12-18 10:10:00');
15
+ let m1 = moment(date);
16
+ let du = moment.duration(m2 - m1, 'ms'); //做差
17
+ let years = du.get('years');
18
+ let months = du.get('months');
19
+ let monthAbsolute = m1.format('MM');
20
+ let days = du.get('days');
21
+ let dayAbsolute = m1.format('Do');
22
+ let hours = du.get('hours');
23
+ let hourAbosolute = m1.format('a h');
24
+ let mins = du.get('minutes');
25
+ let minAbsolute = m1.format('mm');
26
+ let ss = du.get('seconds');
27
+ console.log(days, hours, mins, ss)
28
+ // 输出结果为 01天08时09分40秒
29
+
30
+ if(years>2){
31
+ return years + '年前';
32
+ }else if(years>1){
33
+ return '前年'+monthAbsolute+'月';
34
+ }else if(years>0){
35
+ return '去年'+monthAbsolute+'月';
36
+ }else if(months>1){
37
+ return months+'个月前';
38
+ }else if(months>0){
39
+ return '上个月'+dayAbsolute;
40
+ }else if(days>2){
41
+ return days + '天前';
42
+ }else if(days>1){
43
+ return '前天'+hourAbosolute+':'+minAbsolute;
44
+ }else if(days>0){
45
+ return '昨天'+hourAbosolute+':'+minAbsolute;
46
+ }else if (hours > 0) {
47
+ return hours + '小时之前';
48
+ }else if(mins > 0) {
49
+ return mins + '分钟之前';
50
+ }else {
51
+ return ss + '秒之前';
52
+ }
53
+ })
54
+
55
+ /**
56
+ * 字符串转数字
57
+ * @param value 调用过滤器时,调用的文本
58
+ */
59
+ Vue.filter('str2num', function (value) {
60
+ return Number(value);
61
+ })
62
+
63
+ /**
64
+ * 整数转字符串,正数前加+,负数前加-,0返回0
65
+ * @param value 调用过滤器时,调用的文本
66
+ */
67
+ Vue.filter('aliImage', function (value) {
68
+ return value + '?x-oss-process=image/resize,w_500';
69
+ })
70
+
71
+ /**
72
+ * 数字转千进制,保留小数点后一位
73
+ * 例如:输入:12300,输出:12.3k
74
+ * @param value 调用过滤器时,调用的文本
75
+ */
76
+ Vue.filter('num2kBy1', function (value) {
77
+ let num = 0;
78
+ if (typeof (value) === 'string')
79
+ num = parseInt(value);
80
+ else
81
+ num = value;
82
+
83
+ if (num >= 1000) {
84
+ num = num / 1000;
85
+ // 文本包含小数,保留小数点后1位
86
+ return num.toFixed(1) + 'k';
87
+ } else {
88
+ return num;
89
+ }
90
+ })
91
+
92
+ /**
93
+ * 整数转字符串,正数前加+,负数前加-,0返回0
94
+ * @param value 调用过滤器时,调用的文本
95
+ */
96
+ Vue.filter('numAddSign', function (value) {
97
+ let num = 0;
98
+ if (typeof (value) === 'string'){
99
+ num = parseInt(value);
100
+ if(Number.isNaN(num))
101
+ return value;
102
+ }
103
+ else
104
+ num = value;
105
+
106
+ if (num == 0)
107
+ return num + '';
108
+ else if (num > 0)
109
+ return '+' + num;
110
+ else
111
+ return num + '';
112
+ })
113
+
114
+ /**
115
+ * 金额数据处理
116
+ * 保留小数点后2位,输入单位:元
117
+ * @param value 调用过滤器时,调用的文本
118
+ */
119
+ Vue.filter('priceValue', function (value) {
120
+ // 如果文本不存在,返回空字符
121
+ // value === 0 ; !0 === true.
122
+ if (!value) {
123
+ return '0.00'
124
+ }
125
+
126
+ // 文本转化为 float
127
+ const result = parseFloat(value)
128
+
129
+ // 如果文本为 integer 类型的文本,表示当前文本没有小数
130
+ // if (Number.isInteger(result)) {
131
+ // return result
132
+ // }
133
+
134
+ // 文本包含小数,保留小数点后2位
135
+ return result.toFixed(2)
136
+ })
137
+
138
+ /**
139
+ * 分钱转元,保留小数点后2位
140
+ * @param value 调用过滤器时,调用的文本
141
+ */
142
+ Vue.filter('cent2yuan', function (value) {
143
+ // 如果文本不存在,返回空字符
144
+ // value === 0 ; !0 === true.
145
+ if (!value) {
146
+ return '0'
147
+ }
148
+
149
+ // 文本转化为 float
150
+ const result = parseInt(value) / 100;
151
+
152
+ // 如果文本为 integer 类型的文本,表示当前文本没有小数
153
+ // if (Number.isInteger(result)) {
154
+ // return result
155
+ // }
156
+
157
+ // 文本包含小数,保留小数点后0位
158
+ return result;
159
+ })
160
+
161
+ /**
162
+ * 分钱转元,保留小数点后2位
163
+ * @param value 调用过滤器时,调用的文本
164
+ */
165
+ Vue.filter('cent2yuanByDot', function (value) {
166
+ // 如果文本不存在,返回空字符
167
+ // value === 0 ; !0 === true.
168
+ if (!value) {
169
+ return '0.00'
170
+ }
171
+
172
+ // 文本转化为 float
173
+ const result = parseFloat(value) / 100;
174
+
175
+ // 如果文本为 integer 类型的文本,表示当前文本没有小数
176
+ // if (Number.isInteger(result)) {
177
+ // return result
178
+ // }
179
+
180
+ // 文本包含小数,保留小数点后2位
181
+ return result.toFixed(2);
182
+ })
183
+
184
+ /**
185
+ * 空数据转0
186
+ */
187
+ Vue.filter('null2Zero', function (value) {
188
+ // 如果文本不存在,返回空字符
189
+ // value === 0 ; !0 === true.
190
+ if (!value) {
191
+ return 0;
192
+ }
193
+
194
+ return value;
195
+ })
196
+
197
+ // xx月xx日
198
+ Vue.filter('chineseDay', function (date) {
199
+ return date2Chinese(date);
200
+ })
201
+
202
+ // xxxx年xx月xx日
203
+ Vue.filter('yyyyMMdd', function (date) {
204
+ return date2yyyyMMdd(date);
205
+ })
206
+
207
+
208
+ // xxxx年xx月xx日xx时xx分
209
+ Vue.filter('yyyyMMddhhmm', function (date) {
210
+ return date2yyyyMMddhhmm(date);
211
+ })
212
+
213
+ // xx时:xx分
214
+ Vue.filter('hhmm', function (time) {
215
+ return time2hhmm(time);
216
+ })
217
+
218
+ /**
219
+ * xx时:xx分:xx秒
220
+ */
221
+ Vue.filter('hhmmss', function (time) {
222
+ return time2hhmmss(time)
223
+ })
@@ -0,0 +1,66 @@
1
+ <template>
2
+ <div class="page">
3
+ <uiqw-audit-bar v-if="data.userId" :processId="data.processId" :mouldId="data.mouldId" :userId="data.userId" :form="data.form"
4
+ @apply="onApply" @pass="onPass" @refuse="onRefuse" @auth="onAuth" />
5
+ </div>
6
+ </template>
7
+
8
+ <script setup>
9
+ import { onMounted, reactive } from "vue";
10
+
11
+ const data = reactive({
12
+ processId: 962, // 流程ID
13
+ // processId: null, // 流程ID
14
+ mouldId: 4, // 模板ID
15
+ userId: '014391',
16
+ form:{
17
+ userId: 'houmu',
18
+ reason: '',
19
+ areas:['base']
20
+ }
21
+ })
22
+
23
+ const onApply = (e) => {
24
+ console.log('onApply',e)
25
+ // e: {
26
+ // memo:"审批意见"
27
+ // }
28
+ }
29
+
30
+ const onPass = (e) => {
31
+ console.log('onPass',e)
32
+ // e: {
33
+ // memo:"审批意见"
34
+ // }
35
+ }
36
+
37
+ const onRefuse = (e) => {
38
+ console.log('onRefuse',e)
39
+ // e: {
40
+ // action: {
41
+ // stepId: 1
42
+ // text: "隐患排查上报"
43
+ // }
44
+ // memo: "审批意见"
45
+ // }
46
+ }
47
+
48
+ const onAuth = (auth) => {
49
+ console.log('onAuth', auth)
50
+ }
51
+
52
+ </script>
53
+
54
+ <style lang="scss" scoped>
55
+ .page {
56
+ height: 100vh;
57
+ background: #fff;
58
+ text-align: center;
59
+ background-size: cover;
60
+ display: flex;
61
+ flex-direction: column;
62
+ justify-content: flex-start;
63
+ padding: 80px 15px 0 15px;
64
+ box-sizing: border-box;
65
+ }
66
+ </style>
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <div class="page">
3
+ <uiqw-bill-card
4
+ :category="data.category"
5
+ :no="data.no"
6
+ :userState="data.loginUserState"
7
+ :processState="data.processState"
8
+ :fields="data.fields" />
9
+ </div>
10
+ </template>
11
+
12
+ <script setup>
13
+ import { onMounted, reactive, watch } from "vue";
14
+
15
+ const data = reactive({
16
+ category:'作业单',
17
+ no: '123',
18
+ loginUserState:'pass',
19
+ processState: 'finish_pass',
20
+ fields:[{
21
+ title: '字段1',
22
+ value: '一号门与二号门之间前花园1',
23
+ },{
24
+ title: '字段2',
25
+ value: '一号门与二号门之间前花园2',
26
+ }]
27
+ })
28
+
29
+ watch(()=>data.codes,(newVal,oldVal)=>{
30
+ console.log(newVal,oldVal)
31
+ })
32
+ </script>
33
+
34
+ <style lang="scss" scoped>
35
+ .page {
36
+ height: 100vh;
37
+ background: #fff;
38
+ text-align: center;
39
+ background-size: cover;
40
+ display: flex;
41
+ flex-direction: column;
42
+ justify-content: flex-start;
43
+ padding: 80px 15px 0 15px;
44
+ box-sizing: border-box;
45
+ }
46
+ </style>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <div class="page">
3
+ <uiqw-check-group
4
+ v-model="data.codes"
5
+ id="fire_builder_checks"
6
+ label="船舶建造师确认内容"
7
+ :auth="data.auth" />
8
+ </div>
9
+ </template>
10
+
11
+ <script setup>
12
+ import { onMounted, reactive, watch } from "vue";
13
+
14
+ const data = reactive({
15
+ auth:'require',
16
+ codes:null
17
+ })
18
+
19
+ watch(()=>data.codes,(newVal,oldVal)=>{
20
+ console.log(newVal,oldVal)
21
+ })
22
+ </script>
23
+
24
+ <style lang="scss" scoped>
25
+ .page {
26
+ height: 100vh;
27
+ background: #fff;
28
+ text-align: center;
29
+ background-size: cover;
30
+ display: flex;
31
+ flex-direction: column;
32
+ justify-content: flex-start;
33
+ padding: 80px 15px 0 15px;
34
+ box-sizing: border-box;
35
+ }
36
+ </style>
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <div class="page">
3
+ <uiqw-data-selector :options="options" v-model="formData.singleSelect" mode="single" label="单选数据"
4
+ placeholder="单选数据" :auth="formData.auth" />
5
+ <uiqw-data-selector :options="options" v-model="formData.multSelect" mode="multiple" label="多选数据"
6
+ placeholder="多选数据" :required="true" :readonly="false" />
7
+ </div>
8
+ </template>
9
+
10
+ <script setup>
11
+ import QueryString from "qs";
12
+ import { ref, onMounted, reactive, watch } from "vue";
13
+
14
+ const formData = ref({
15
+ singleSelect: '',
16
+ multSelect: [],
17
+ apiSelect: '',
18
+ auth: 'option'
19
+ })
20
+
21
+ // 数据选项
22
+ const options = ref([
23
+ { text: '火灾', value: '火灾' },
24
+ { text: '灼烫', value: '灼烫' },
25
+ { text: '触电', value: '触电' },
26
+ { text: '中毒和窒息', value: '中毒和窒息' },
27
+ { text: '物体打击', value: '物体打击' },
28
+ { text: '高处坠落', value: '高处坠落' },
29
+ { text: '其他', value: '其他', },
30
+ { text: '一号门与二号门之间前花园', value: '一号门与二号门之间前花园' }
31
+ ])
32
+
33
+ onMounted(() => {
34
+ })
35
+ </script>
36
+
37
+ <style lang="scss" scoped>
38
+ .page {
39
+ height: 100vh;
40
+ background: #fff;
41
+ text-align: center;
42
+ background-size: cover;
43
+ display: flex;
44
+ flex-direction: column;
45
+ justify-content: flex-start;
46
+ padding: 80px 15px 0 15px;
47
+ box-sizing: border-box;
48
+ }
49
+ </style>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <div class="page">
3
+ <UiqwDatetimePicker
4
+ v-model="data.date"
5
+ label="时间"
6
+ :auth="data.auth" />
7
+ </div>
8
+ </template>
9
+
10
+ <script setup>
11
+ import { onMounted, reactive, watch } from "vue";
12
+
13
+ const data = reactive({
14
+ auth:'require',
15
+ date:'2025-01-01 01:02:03'
16
+ })
17
+
18
+ watch(()=>data.codes,(newVal,oldVal)=>{
19
+ console.log(newVal,oldVal)
20
+ })
21
+ </script>
22
+
23
+ <style lang="scss" scoped>
24
+ .page {
25
+ height: 100vh;
26
+ background: #fff;
27
+ text-align: center;
28
+ background-size: cover;
29
+ display: flex;
30
+ flex-direction: column;
31
+ justify-content: flex-start;
32
+ padding: 80px 15px 0 15px;
33
+ box-sizing: border-box;
34
+ }
35
+ </style>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div class="page">
3
+ <van-dropdown-menu>
4
+ <uiqw-day-dropdown v-model="formData.day" year="2025" month="2" />
5
+ </van-dropdown-menu>
6
+ </div>
7
+ </template>
8
+
9
+ <script setup>
10
+ import { reactive, onMounted } from "vue";
11
+ const formData = reactive({
12
+ day: 0
13
+ })
14
+
15
+ onMounted(() => {
16
+ })
17
+ </script>
18
+
19
+ <style lang="scss" scoped>
20
+ .page {
21
+ height: 100vh;
22
+ background: #fff;
23
+ text-align: center;
24
+ background-size: cover;
25
+ display: flex;
26
+ flex-direction: column;
27
+ justify-content: flex-start;
28
+ padding: 80px 15px 0 15px;
29
+ box-sizing: border-box;
30
+ }
31
+ </style>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div class="page">
3
+ <uiqw-file-picker label="文件" v-model="data.url" :auth="data.auth" accept=".xls,.xlsx" />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup>
8
+ import { onMounted, reactive, watch } from "vue";
9
+
10
+ const data = reactive({
11
+ auth:'readonly',
12
+ url: 'https://1.pdf'
13
+ })
14
+
15
+ watch(()=>data.url,(newVal,oldVal)=>{
16
+ console.log(newVal,oldVal)
17
+ })
18
+ </script>
19
+
20
+ <style lang="scss" scoped>
21
+ .page {
22
+ height: 100vh;
23
+ background: #fff;
24
+ text-align: center;
25
+ background-size: cover;
26
+ display: flex;
27
+ flex-direction: column;
28
+ justify-content: flex-start;
29
+ padding: 80px 15px 0 15px;
30
+ box-sizing: border-box;
31
+ }
32
+ </style>