doway-coms 1.3.2 → 1.3.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -1,127 +1,131 @@
1
1
  <template>
2
- <div class="d-control-container">
3
- <div class="d-control-label">
4
- {{ label
5
- }}
6
- <span v-if="rules && rules['required']" class="d-control-label-required"
2
+ <div class="d-control-container">
3
+ <div class="d-control-label">
4
+ {{ label }}
5
+ <span v-if="rules && rules['required']" class="d-control-label-required"
7
6
  >*</span
8
- >
9
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
- </Tooltip>
12
- </div>
13
- <div class="d-control">
14
- <ValidationProvider
15
- :name="label"
16
- v-slot="v"
17
- :rules="rules"
18
- v-if="edit === true"
19
- >
20
- <WeekPicker
21
- :size="'small'"
22
- placeholder="选择周"
23
- v-model="currentValue"
24
- value-format="YYYY-MM-DD"
25
- style="width: 100%"
26
- :class="{ 'd-error-input': v.errors.length > 0 }"
27
- />
28
- <div class="d-error-msg">
29
- {{ v.errors[0] }}
30
- </div>
31
- </ValidationProvider>
32
- <span v-else>{{ moment(currentValue).format("YYYY-MM-DD") }}</span>
33
- </div>
7
+ >
8
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
9
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px" />
10
+ </Tooltip>
34
11
  </div>
35
- </template>
12
+ <div class="d-control">
13
+ <ValidationProvider
14
+ :name="label"
15
+ v-slot="v"
16
+ :rules="rules"
17
+ v-if="edit === true"
18
+ >
19
+ <WeekPicker
20
+ :size="'small'"
21
+ placeholder="选择周"
22
+ v-model="currentValue"
23
+ value-format="YYYY-MM-DD"
24
+ style="width: 100%"
25
+ :class="{ 'd-error-input': v.errors.length > 0 }"
26
+ @change="change"
27
+ />
28
+ <div class="d-error-msg">
29
+ {{ v.errors[0] }}
30
+ </div>
31
+ </ValidationProvider>
32
+ <span v-else>{{ moment(currentValue).format("YYYY-MM-DD") }}</span>
33
+ </div>
34
+ </div>
35
+ </template>
36
36
 
37
37
  <script>
38
- import moment from 'moment'
39
- import { DatePicker } from 'ant-design-vue'
40
- import { ValidationProvider } from 'vee-validate'
41
- import { Tooltip } from 'ant-design-vue'
42
- export default {
43
- name: 'BaseDateWeek',
44
- components:{
45
- WeekPicker:DatePicker.WeekPicker,
38
+ import moment from "moment";
39
+ import { DatePicker } from "ant-design-vue";
40
+ import { ValidationProvider } from "vee-validate";
41
+ import { Tooltip } from "ant-design-vue";
42
+ export default {
43
+ name: "BaseDateWeek",
44
+ components: {
45
+ WeekPicker: DatePicker.WeekPicker,
46
46
  ValidationProvider,
47
- Tooltip,
47
+ Tooltip,
48
+ },
49
+ data() {
50
+ return {
51
+ moment,
52
+ filterValue: "",
53
+ isInputChanged: false,
54
+ inputTimeout: null,
55
+ searchRows: [],
56
+ filterCols: [],
57
+ gridLoading: false,
58
+ gridPagerConfig: {
59
+ total: 0,
60
+ currentPage: 1,
61
+ pageSize: 10,
62
+ },
63
+ };
48
64
  },
49
- data() {
50
- return {
51
- moment,
52
- filterValue: '',
53
- isInputChanged: false,
54
- inputTimeout: null,
55
- searchRows: [],
56
- filterCols: [],
57
- gridLoading: false,
58
- gridPagerConfig: {
59
- total: 0,
60
- currentPage: 1,
61
- pageSize: 10
62
- }
63
- }
65
+ computed: {
66
+ currentValue: {
67
+ // 动态计算currentValue的值
68
+ get: function () {
69
+ return this.value; // 将props中的value赋值给currentValue
70
+ },
71
+ set: function (val) {
72
+ this.$emit("input", val); // 通过$emit触发父组件
73
+ },
64
74
  },
65
- computed: {
66
- currentValue: {
67
- // 动态计算currentValue的值
68
- get: function() {
69
- return this.value // 将props中的value赋值给currentValue
70
- },
71
- set: function(val) {
72
- this.$emit('input', val) // 通过$emit触发父组件
73
- }
74
- }
75
+ },
76
+ props: {
77
+ rules: {
78
+ type: Object,
79
+ default: function () {
80
+ return null;
81
+ },
75
82
  },
76
- props: {
77
- rules: {
78
- type: Object,
79
- default: function() {
80
- return null
81
- }
83
+ value: {
84
+ type: String,
85
+ default: function () {
86
+ return "";
82
87
  },
83
- value: {
84
- type: String,
85
- default: function() {
86
- return ''
87
- }
88
+ },
89
+ edit: {
90
+ type: Boolean,
91
+ default: function () {
92
+ return false;
88
93
  },
89
- edit: {
90
- type: Boolean,
91
- default: function() {
92
- return false
93
- }
94
+ },
95
+ name: {
96
+ type: String,
97
+ default: function () {
98
+ return "";
94
99
  },
95
- name: {
96
- type: String,
97
- default: function() {
98
- return ''
99
- }
100
+ },
101
+ label: {
102
+ type: String,
103
+ default: function () {
104
+ return "";
100
105
  },
101
- label: {
102
- type: String,
103
- default: function() {
104
- return ''
105
- }
106
+ },
107
+ placeholder: {
108
+ type: String,
109
+ default: function () {
110
+ return "";
106
111
  },
107
- placeholder: {
108
- type: String,
109
- default: function() {
110
- return ''
111
- }
112
+ },
113
+ tooltip: {
114
+ type: String,
115
+ default: function () {
116
+ return "";
112
117
  },
113
- tooltip: {
114
- type: String,
115
- default: function() {
116
- return ''
117
- }
118
- }
119
118
  },
120
- created() {},
121
- methods: {}
122
- }
123
- </script>
119
+ },
120
+ created() {},
121
+ methods: {
122
+ change() {
123
+ this.$emit("change");
124
+ },
125
+ },
126
+ };
127
+ </script>
124
128
 
125
129
  <style lang="less">
126
- @import '../../styles/default.less';
127
- </style>
130
+ @import "../../styles/default.less";
131
+ </style>
@@ -1,157 +1,159 @@
1
1
  <template>
2
- <div class="d-control-container">
3
- <div
4
- class="d-control-label"
5
- :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
6
- >
7
- {{ label
8
- }}
9
- <span v-if="rules && rules['required']" class="d-control-label-required"
2
+ <div class="d-control-container">
3
+ <div
4
+ class="d-control-label"
5
+ :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
6
+ >
7
+ {{ label }}
8
+ <span v-if="rules && rules['required']" class="d-control-label-required"
10
9
  >*</span
11
- >
12
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
14
- </Tooltip>
15
- </div>
16
- <div class="d-control">
17
- <ValidationProvider
18
- :name="label"
19
- v-slot="v"
20
- :rules="rules"
21
- v-if="edit === true"
22
- >
23
- <DatePicker
24
- :size="'small'"
25
- placeholder="选择日期时间"
26
- v-model="currentValue"
27
- format="YYYY-MM-DD HH:mm:ss"
28
- value-format="YYYY-MM-DD HH:mm:ss"
29
- :disabledDate="disabledDate"
30
- style="width: 100%"
31
- :showTime="true"
32
- :class="{ 'd-error-input': v.errors.length > 0 }"
33
- />
34
- <div class="d-error-msg">
35
- {{ v.errors[0] }}
36
- </div>
37
- </ValidationProvider>
38
- <span v-else>{{ currentValue }}</span>
39
- </div>
10
+ >
11
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
12
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px" />
13
+ </Tooltip>
40
14
  </div>
41
- </template>
15
+ <div class="d-control">
16
+ <ValidationProvider
17
+ :name="label"
18
+ v-slot="v"
19
+ :rules="rules"
20
+ v-if="edit === true"
21
+ >
22
+ <DatePicker
23
+ :size="'small'"
24
+ placeholder="选择日期时间"
25
+ v-model="currentValue"
26
+ format="YYYY-MM-DD HH:mm:ss"
27
+ value-format="YYYY-MM-DD HH:mm:ss"
28
+ :disabledDate="disabledDate"
29
+ style="width: 100%"
30
+ :showTime="true"
31
+ :class="{ 'd-error-input': v.errors.length > 0 }"
32
+ @change="change"
33
+ />
34
+ <div class="d-error-msg">
35
+ {{ v.errors[0] }}
36
+ </div>
37
+ </ValidationProvider>
38
+ <span v-else>{{ currentValue }}</span>
39
+ </div>
40
+ </div>
41
+ </template>
42
42
 
43
43
  <script>
44
- import { DatePicker } from 'ant-design-vue'
45
- import { ValidationProvider } from 'vee-validate'
46
- import moment from 'moment'
47
- import { Tooltip } from 'ant-design-vue'
44
+ import { DatePicker } from "ant-design-vue";
45
+ import { ValidationProvider } from "vee-validate";
46
+ import moment from "moment";
47
+ import { Tooltip } from "ant-design-vue";
48
48
 
49
- export default {
50
- name: "BaseDatetime",
51
- components:{
52
- DatePicker,
49
+ export default {
50
+ name: "BaseDatetime",
51
+ components: {
52
+ DatePicker,
53
53
  ValidationProvider,
54
- Tooltip,
55
-
54
+ Tooltip,
56
55
  },
57
- data() {
58
- return {
59
- moment,
60
- filterValue: "",
61
- isInputChanged: false,
62
- inputTimeout: null,
63
- searchRows: [],
64
- filterCols: [],
65
- gridLoading: false,
66
- gridPagerConfig: {
67
- total: 0,
68
- currentPage: 1,
69
- pageSize: 10
70
- }
71
- };
56
+ data() {
57
+ return {
58
+ moment,
59
+ filterValue: "",
60
+ isInputChanged: false,
61
+ inputTimeout: null,
62
+ searchRows: [],
63
+ filterCols: [],
64
+ gridLoading: false,
65
+ gridPagerConfig: {
66
+ total: 0,
67
+ currentPage: 1,
68
+ pageSize: 10,
69
+ },
70
+ };
71
+ },
72
+ computed: {
73
+ currentValue: {
74
+ // 动态计算currentValue的值
75
+ get: function () {
76
+ return this.value; // 将props中的value赋值给currentValue
77
+ },
78
+ set: function (val) {
79
+ this.$emit("input", val); // 通过$emit触发父组件
80
+ },
81
+ },
82
+ },
83
+ props: {
84
+ labelWidth: {
85
+ type: Number,
86
+ default: function () {
87
+ return 0;
88
+ },
89
+ },
90
+ rules: {
91
+ type: Object,
92
+ default: function () {
93
+ return null;
94
+ },
72
95
  },
73
- computed: {
74
- currentValue: {
75
- // 动态计算currentValue的值
76
- get: function () {
77
- return this.value; // 将props中的value赋值给currentValue
78
- },
79
- set: function (val) {
80
- this.$emit("input", val); // 通过$emit触发父组件
81
- }
82
- }
96
+ pastDate: {
97
+ type: Boolean,
98
+ default: function () {
99
+ return false;
100
+ },
83
101
  },
84
- props: {
85
- labelWidth: {
86
- type: Number,
87
- default: function () {
88
- return 0;
89
- }
90
- },
91
- rules: {
92
- type: Object,
93
- default: function () {
94
- return null;
95
- }
96
- },
97
- pastDate: {
98
- type: Boolean,
99
- default: function () {
100
- return false;
101
- }
102
- },
103
- value: {
104
- type: String,
105
- default: function () {
106
- return "";
107
- }
108
- },
109
- edit: {
110
- type: Boolean,
111
- default: function () {
112
- return false;
113
- }
114
- },
115
- name: {
116
- type: String,
117
- default: function () {
118
- return "";
119
- }
120
- },
121
- label: {
122
- type: String,
123
- default: function () {
124
- return "";
125
- }
126
- },
127
- placeholder: {
128
- type: String,
129
- default: function () {
130
- return "";
131
- }
132
- },
133
- tooltip: {
134
- type: String,
135
- default: function() {
136
- return ''
137
- }
102
+ value: {
103
+ type: String,
104
+ default: function () {
105
+ return "";
106
+ },
107
+ },
108
+ edit: {
109
+ type: Boolean,
110
+ default: function () {
111
+ return false;
112
+ },
113
+ },
114
+ name: {
115
+ type: String,
116
+ default: function () {
117
+ return "";
118
+ },
119
+ },
120
+ label: {
121
+ type: String,
122
+ default: function () {
123
+ return "";
124
+ },
125
+ },
126
+ placeholder: {
127
+ type: String,
128
+ default: function () {
129
+ return "";
130
+ },
131
+ },
132
+ tooltip: {
133
+ type: String,
134
+ default: function () {
135
+ return "";
136
+ },
137
+ },
138
+ },
139
+ created() {},
140
+ methods: {
141
+ disabledDate(current) {
142
+ if (this.pastDate === true) {
143
+ //如果允许过期时间
144
+ return false;
138
145
  }
146
+ return current && current.diff(moment(), "minutes") < 0;
147
+ // return current && current.isBefore(moment())
139
148
  },
140
- created() { },
141
- methods: {
142
- disabledDate(current) {
143
- if (this.pastDate === true) {
144
- //如果允许过期时间
145
- return false;
146
- }
147
- return current && current.diff(moment(), "minutes") < 0;
148
- // return current && current.isBefore(moment())
149
- }
150
- }
151
- }
152
- </script>
149
+ change() {
150
+ this.$emit("change");
151
+ },
152
+ },
153
+ };
154
+ </script>
153
155
 
154
156
  <style lang="less">
155
- @import '../../styles/default.less';
156
- </style>
157
+ @import "../../styles/default.less";
158
+ </style>
157
159
 
@@ -114,6 +114,11 @@
114
114
  :tooltip="col.tooltip"
115
115
  :pastDate="col.pastDate"
116
116
  :rules="col.rules"
117
+ @change="
118
+ () => {
119
+ inputChange(col);
120
+ }
121
+ "
117
122
  />
118
123
  <!-- 日期时间控件 -->
119
124
  <BaseDatetime
@@ -127,6 +132,11 @@
127
132
  :tooltip="col.tooltip"
128
133
  :edit="col.edit"
129
134
  :rules="col.rules"
135
+ @change="
136
+ () => {
137
+ inputChange(col);
138
+ }
139
+ "
130
140
  />
131
141
  <!-- 单选框 -->
132
142
  <BaseCheckbox
@@ -155,6 +165,11 @@
155
165
  :tooltip="col.tooltip"
156
166
  :edit="col.edit"
157
167
  :rules="col.rules"
168
+ @change="
169
+ () => {
170
+ inputChange(col);
171
+ }
172
+ "
158
173
  />
159
174
  <BaseDateWeek
160
175
  v-if="
@@ -166,6 +181,11 @@
166
181
  :edit="col.edit"
167
182
  :tooltip="col.tooltip"
168
183
  :rules="col.rules"
184
+ @change="
185
+ () => {
186
+ inputChange(col);
187
+ }
188
+ "
169
189
  />
170
190
  <BaseSelect
171
191
  v-if="
@@ -94,7 +94,7 @@
94
94
  :data="uploadData"
95
95
  v-if="edit === true"
96
96
  @change="handleAvatarSuccess"
97
- :show-file-list="false"
97
+ :showUploadList="false"
98
98
  :before-upload="beforeAvatarUpload"
99
99
  >
100
100
  <div
@@ -118,6 +118,8 @@
118
118
  show-zoom
119
119
  transfer
120
120
  resize
121
+ :height="550"
122
+ :width="800"
121
123
  destroy-on-close
122
124
  :fullscreen="isFullscreen || dialogViewType == 'application/pdf'"
123
125
  :z-index="999"
@@ -425,7 +427,7 @@ export default {
425
427
  this.internalServiceUrl +
426
428
  "/DownAttachFile/" +
427
429
  attachFile.id +
428
- `?accessToken=${this.$this.$store.getters.token}`
430
+ `?accessToken=${this.$store.getters.token}`
429
431
  );
430
432
  },
431
433
  /**
@@ -1,131 +1,134 @@
1
1
  <template>
2
- <div class="d-control-container">
3
- <div class="d-control-label">
4
- {{ label
5
- }}
6
- <span v-if="rules && rules['required']" class="d-control-label-required"
2
+ <div class="d-control-container">
3
+ <div class="d-control-label">
4
+ {{ label }}
5
+ <span v-if="rules && rules['required']" class="d-control-label-required"
7
6
  >*</span
8
- >
9
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
- </Tooltip>
12
- </div>
13
- <div class="d-control">
14
- <ValidationProvider
15
- :name="label"
16
- v-slot="v"
17
- :rules="rules"
18
- v-if="edit === true"
19
- >
20
- <TimePicker
21
- :size="'small'"
22
- placeholder="选择时间"
23
- v-model="currentValue"
24
- format="HH:mm:ss"
25
- value-format="HH:mm:ss"
26
- style="width: 100%"
27
- :class="{ 'd-error-input': v.errors.length > 0 }"
28
- />
29
- <div class="d-error-msg">
30
- {{ v.errors[0] }}
31
- </div>
32
- </ValidationProvider>
33
- <span v-else>{{ currentValue }}</span>
34
- </div>
7
+ >
8
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
9
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px" />
10
+ </Tooltip>
35
11
  </div>
36
- </template>
12
+ <div class="d-control">
13
+ <ValidationProvider
14
+ :name="label"
15
+ v-slot="v"
16
+ :rules="rules"
17
+ v-if="edit === true"
18
+ >
19
+ <TimePicker
20
+ :size="'small'"
21
+ placeholder="选择时间"
22
+ v-model="currentValue"
23
+ format="HH:mm:ss"
24
+ value-format="HH:mm:ss"
25
+ style="width: 100%"
26
+ :class="{ 'd-error-input': v.errors.length > 0 }"
27
+ @change="change"
28
+ />
29
+ <div class="d-error-msg">
30
+ {{ v.errors[0] }}
31
+ </div>
32
+ </ValidationProvider>
33
+ <span v-else>{{ currentValue }}</span>
34
+ </div>
35
+ </div>
36
+ </template>
37
37
 
38
38
  <script>
39
- import moment from 'moment'
40
- import { TimePicker } from 'ant-design-vue'
41
- import { ValidationProvider } from 'vee-validate'
42
- import { Tooltip } from 'ant-design-vue'
39
+ import moment from "moment";
40
+ import { TimePicker } from "ant-design-vue";
41
+ import { ValidationProvider } from "vee-validate";
42
+ import { Tooltip } from "ant-design-vue";
43
43
 
44
- export default {
45
- name: 'BaseTime',
46
- components:{
47
- TimePicker,
44
+ export default {
45
+ name: "BaseTime",
46
+ components: {
47
+ TimePicker,
48
48
  ValidationProvider,
49
- Tooltip,
50
-
49
+ Tooltip,
50
+ },
51
+ data() {
52
+ return {
53
+ moment,
54
+ filterValue: "",
55
+ isInputChanged: false,
56
+ inputTimeout: null,
57
+ searchRows: [],
58
+ filterCols: [],
59
+ gridLoading: false,
60
+ gridPagerConfig: {
61
+ total: 0,
62
+ currentPage: 1,
63
+ pageSize: 10,
64
+ },
65
+ };
51
66
  },
52
- data() {
53
- return {
54
- moment,
55
- filterValue: '',
56
- isInputChanged: false,
57
- inputTimeout: null,
58
- searchRows: [],
59
- filterCols: [],
60
- gridLoading: false,
61
- gridPagerConfig: {
62
- total: 0,
63
- currentPage: 1,
64
- pageSize: 10
65
- }
66
- }
67
+ computed: {
68
+ currentValue: {
69
+ // 动态计算currentValue的值
70
+ get: function () {
71
+ return this.value; // 将props中的value赋值给currentValue
72
+ },
73
+ set: function (val) {
74
+ this.$emit("input", val); // 通过$emit触发父组件
75
+ },
67
76
  },
68
- computed: {
69
- currentValue: {
70
- // 动态计算currentValue的值
71
- get: function() {
72
- return this.value // 将props中的value赋值给currentValue
73
- },
74
- set: function(val) {
75
- this.$emit('input', val) // 通过$emit触发父组件
76
- }
77
- }
77
+ },
78
+ props: {
79
+ rules: {
80
+ type: Object,
81
+ default: function () {
82
+ return null;
83
+ },
78
84
  },
79
- props: {
80
- rules: {
81
- type: Object,
82
- default: function() {
83
- return null
84
- }
85
+ value: {
86
+ type: String,
87
+ default: function () {
88
+ return "";
85
89
  },
86
- value: {
87
- type: String,
88
- default: function() {
89
- return ''
90
- }
90
+ },
91
+ edit: {
92
+ type: Boolean,
93
+ default: function () {
94
+ return false;
91
95
  },
92
- edit: {
93
- type: Boolean,
94
- default: function() {
95
- return false
96
- }
96
+ },
97
+ name: {
98
+ type: String,
99
+ default: function () {
100
+ return "";
97
101
  },
98
- name: {
99
- type: String,
100
- default: function() {
101
- return ''
102
- }
102
+ },
103
+ label: {
104
+ type: String,
105
+ default: function () {
106
+ return "";
103
107
  },
104
- label: {
105
- type: String,
106
- default: function() {
107
- return ''
108
- }
108
+ },
109
+ placeholder: {
110
+ type: String,
111
+ default: function () {
112
+ return "";
109
113
  },
110
- placeholder: {
111
- type: String,
112
- default: function() {
113
- return ''
114
- }
114
+ },
115
+ tooltip: {
116
+ type: String,
117
+ default: function () {
118
+ return "";
115
119
  },
116
- tooltip: {
117
- type: String,
118
- default: function() {
119
- return ''
120
- }
121
- }
122
120
  },
123
- created() {},
124
- methods: {}
125
- }
126
- </script>
121
+ },
122
+ created() {},
123
+ methods: {
124
+ change() {
125
+ this.$emit('change')
126
+ },
127
+ },
128
+ };
129
+ </script>
127
130
 
128
131
  <style lang="scss" scoped></style>
129
132
  <style lang="less">
130
- @import '../../styles/default.less';
133
+ @import "../../styles/default.less";
131
134
  </style>