widget.qw 1.0.24 → 1.0.25

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 (101) 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 +468 -482
  5. package/build/widget.qw.es.js +1628 -2374
  6. package/build/widget.qw.umd.js +1540 -2286
  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 +149 -141
  11. package/src/components/AuditBar.vue +340 -340
  12. package/src/components/BillCard.vue +155 -155
  13. package/src/components/CascaderPicker.vue +87 -87
  14. package/src/components/CascaderPop.vue +319 -330
  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 -131
  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 copy.vue +0 -0
  72. package/src/views/cascaderpicker/index.vue +0 -0
  73. package/src/views/cascaderpop/index.vue +90 -90
  74. package/src/views/checkgroup/index.vue +35 -35
  75. package/src/views/dataSelector/index.vue +48 -48
  76. package/src/views/datetimepicker/index.vue +34 -34
  77. package/src/views/daydropdown/index.vue +31 -31
  78. package/src/views/filepicker/index.vue +31 -31
  79. package/src/views/imagepicker/index.vue +31 -31
  80. package/src/views/imagespicker/index.vue +31 -31
  81. package/src/views/input/index.vue +34 -34
  82. package/src/views/monthdropdown/index.vue +31 -31
  83. package/src/views/multListSelector/index.vue +61 -61
  84. package/src/views/multipicker/index.vue +36 -36
  85. package/src/views/productSelector/index.vue +35 -35
  86. package/src/views/projectdropdown/index.vue +31 -31
  87. package/src/views/projectpicker/index.vue +41 -41
  88. package/src/views/secretnotify/index.vue +27 -27
  89. package/src/views/sheet/index.vue +45 -45
  90. package/src/views/singlepicker/index.vue +35 -35
  91. package/src/views/subdepartmentSelector/index.vue +40 -40
  92. package/src/views/switch/index.vue +34 -34
  93. package/src/views/treepicker/index.vue +41 -41
  94. package/src/views/userSelector/index.vue +54 -54
  95. package/src/views/userSelectorNew/index.vue +45 -45
  96. package/src/views/userpicker/index.vue +43 -43
  97. package/src/views/userprofile/index.vue +30 -30
  98. package/src/views/userspicker/index.vue +43 -43
  99. package/src/views/yeardropdown/index.vue +32 -32
  100. package/src/vm/index.js +1 -1
  101. package/vite.config.ts +122 -122
@@ -1,223 +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
- })
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
+ })
@@ -1,66 +1,66 @@
1
- <template>
2
- <div class="page">
3
- <widget-qw-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
- }
1
+ <template>
2
+ <div class="page">
3
+ <widget-qw-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
66
  </style>
@@ -1,46 +1,46 @@
1
- <template>
2
- <div class="page">
3
- <widget-qw-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
- }
1
+ <template>
2
+ <div class="page">
3
+ <widget-qw-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
46
  </style>
Binary file