doway-coms 2.2.20 → 2.2.21
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/.browserslistrc +2 -2
- package/README.md +28 -28
- package/package.json +53 -53
- package/packages/AuditsList/index.js +7 -7
- package/packages/AuditsList/src/index.vue +262 -262
- package/packages/BaseButton/index.js +7 -7
- package/packages/BaseButton/src/index.vue +241 -241
- package/packages/BaseCheckbox/index.js +7 -7
- package/packages/BaseCheckbox/src/index.vue +134 -134
- package/packages/BaseDate/index.js +7 -7
- package/packages/BaseDate/src/index.vue +197 -197
- package/packages/BaseDateWeek/index.js +7 -7
- package/packages/BaseDateWeek/src/index.vue +163 -163
- package/packages/BaseDatetime/index.js +7 -7
- package/packages/BaseDatetime/src/index.vue +196 -196
- package/packages/BaseForm/index.js +7 -7
- package/packages/BaseForm/src/index.vue +728 -728
- package/packages/BaseGantt/index.js +9 -9
- package/packages/BaseGantt/src/index.vue +608 -608
- package/packages/BaseGrid/index.js +9 -9
- package/packages/BaseGrid/src/SeqSetting.vue +278 -278
- package/packages/BaseGrid/src/index.vue +3580 -3580
- package/packages/BaseGridAdjust/index.js +9 -9
- package/packages/BaseGridAdjust/src/index.vue +482 -482
- package/packages/BaseInput/index.js +7 -7
- package/packages/BaseInput/src/index.vue +164 -164
- package/packages/BaseIntervalInput/index.js +7 -7
- package/packages/BaseIntervalInput/src/index.vue +310 -310
- package/packages/BaseKanbanEmpty/index.js +7 -7
- package/packages/BaseKanbanEmpty/src/index.vue +176 -176
- package/packages/BaseNumberInput/index.js +7 -7
- package/packages/BaseNumberInput/src/index.vue +293 -293
- package/packages/BasePagination/index.js +7 -7
- package/packages/BasePagination/src/index.vue +91 -91
- package/packages/BasePictureCard/index.js +7 -7
- package/packages/BasePictureCard/src/index.vue +580 -580
- package/packages/BasePrintPreview/index.js +7 -7
- package/packages/BasePrintPreview/src/index.vue +129 -129
- package/packages/BasePulldown/index.js +7 -7
- package/packages/BasePulldown/src/index.vue +1265 -1265
- package/packages/BaseSearch/index.js +7 -7
- package/packages/BaseSearch/src/index.vue +935 -935
- package/packages/BaseSelect/index.js +7 -7
- package/packages/BaseSelect/src/index.vue +155 -155
- package/packages/BaseSelectMulti/index.js +7 -7
- package/packages/BaseSelectMulti/src/index.vue +148 -148
- package/packages/BaseTextArea/index.js +7 -7
- package/packages/BaseTextArea/src/index.vue +178 -178
- package/packages/BaseTime/index.js +7 -7
- package/packages/BaseTime/src/index.vue +166 -166
- package/packages/BaseTool/index.js +7 -7
- package/packages/BaseTool/src/index.vue +349 -349
- package/packages/BaseToolStatus/index.js +7 -7
- package/packages/BaseToolStatus/src/index.vue +388 -388
- package/packages/BaseTreeSelect/index.js +8 -8
- package/packages/BaseTreeSelect/src/index.vue +437 -437
- package/packages/LeaveAMessage/index.js +7 -7
- package/packages/LeaveAMessage/src/index.vue +597 -597
- package/packages/index.js +191 -191
- package/packages/styles/default.css +78 -78
- package/packages/styles/default.less +84 -84
- package/packages/utils/api.js +107 -107
- package/packages/utils/auth.js +38 -38
- package/packages/utils/common.js +610 -610
- package/packages/utils/dom.js +181 -181
- package/packages/utils/enum.js +86 -86
- package/packages/utils/filters.js +472 -472
- package/packages/utils/gridFormat.js +66 -66
- package/packages/utils/msg.js +84 -84
- package/packages/utils/patchFiles.js +44 -44
- package/packages/utils/request.js +178 -178
- package/packages/utils/store.js +305 -303
- package/vue.config.js +59 -59
- package/dist/css/chunk-vendors.7f83d8f9.css +0 -8
- package/dist/css/index.7946d50b.css +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/js/chunk-vendors.28fda91d.js +0 -340
- package/dist/js/index.49bc6add.js +0 -2
- package/lib/doway-coms.common.js +0 -120397
- package/lib/doway-coms.css +0 -1
- package/lib/doway-coms.umd.js +0 -120407
- package/lib/doway-coms.umd.min.js +0 -328
|
@@ -1,197 +1,197 @@
|
|
|
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
|
-
<span v-if="rules && rules['required']" class="d-control-label-required"
|
|
9
|
-
>*</span
|
|
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>
|
|
14
|
-
</div>
|
|
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
|
-
<Tooltip placement="topLeft" v-else>
|
|
39
|
-
<template slot="title">
|
|
40
|
-
{{ currentValue }}
|
|
41
|
-
</template>
|
|
42
|
-
<span @contextmenu.prevent="(event) => onContextmenu(event, currentValue)">
|
|
43
|
-
{{ currentValue }}
|
|
44
|
-
</span>
|
|
45
|
-
</Tooltip>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
//VXETable插件
|
|
52
|
-
import VXETable from "vxe-table";
|
|
53
|
-
//轻量级剪贴板复制函数
|
|
54
|
-
import XEClipboard from "xe-clipboard";
|
|
55
|
-
import { DatePicker } from "ant-design-vue";
|
|
56
|
-
import { ValidationProvider } from "vee-validate";
|
|
57
|
-
import moment from "moment";
|
|
58
|
-
import { Tooltip } from "ant-design-vue";
|
|
59
|
-
|
|
60
|
-
export default {
|
|
61
|
-
name: "BaseDatetime",
|
|
62
|
-
components: {
|
|
63
|
-
DatePicker,
|
|
64
|
-
ValidationProvider,
|
|
65
|
-
Tooltip,
|
|
66
|
-
},
|
|
67
|
-
data() {
|
|
68
|
-
return {
|
|
69
|
-
moment,
|
|
70
|
-
filterValue: "",
|
|
71
|
-
isInputChanged: false,
|
|
72
|
-
inputTimeout: null,
|
|
73
|
-
searchRows: [],
|
|
74
|
-
filterCols: [],
|
|
75
|
-
gridLoading: false,
|
|
76
|
-
gridPagerConfig: {
|
|
77
|
-
total: 0,
|
|
78
|
-
currentPage: 1,
|
|
79
|
-
pageSize: 10,
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
computed: {
|
|
84
|
-
currentValue: {
|
|
85
|
-
// 动态计算currentValue的值
|
|
86
|
-
get: function () {
|
|
87
|
-
return this.value; // 将props中的value赋值给currentValue
|
|
88
|
-
},
|
|
89
|
-
set: function (val) {
|
|
90
|
-
this.$emit("input", val); // 通过$emit触发父组件
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
props: {
|
|
95
|
-
labelWidth: {
|
|
96
|
-
type: Number,
|
|
97
|
-
default: function () {
|
|
98
|
-
return 0;
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
rules: {
|
|
102
|
-
type: Object,
|
|
103
|
-
default: function () {
|
|
104
|
-
return null;
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
pastDate: {
|
|
108
|
-
type: Boolean,
|
|
109
|
-
default: function () {
|
|
110
|
-
return false;
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
value: {
|
|
114
|
-
type: String,
|
|
115
|
-
default: function () {
|
|
116
|
-
return "";
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
edit: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
default: function () {
|
|
122
|
-
return false;
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
name: {
|
|
126
|
-
type: String,
|
|
127
|
-
default: function () {
|
|
128
|
-
return "";
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
label: {
|
|
132
|
-
type: String,
|
|
133
|
-
default: function () {
|
|
134
|
-
return "";
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
placeholder: {
|
|
138
|
-
type: String,
|
|
139
|
-
default: function () {
|
|
140
|
-
return "";
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
tooltip: {
|
|
144
|
-
type: String,
|
|
145
|
-
default: function () {
|
|
146
|
-
return "";
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
disabledDateValue: {
|
|
150
|
-
type: Number,
|
|
151
|
-
default: function () {
|
|
152
|
-
return 0;
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
created() {},
|
|
157
|
-
methods: {
|
|
158
|
-
disabledDate(current) {
|
|
159
|
-
if (this.pastDate === true) {
|
|
160
|
-
//如果允许过期时间
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
return current && current.diff(moment().add(this.disabledDateValue, 'day'), "minutes") < 0;
|
|
164
|
-
},
|
|
165
|
-
change() {
|
|
166
|
-
this.$emit("change");
|
|
167
|
-
},
|
|
168
|
-
onContextmenu(event, currentValue) {
|
|
169
|
-
this.$contextmenu({
|
|
170
|
-
items: [
|
|
171
|
-
{
|
|
172
|
-
icon: 'ant-design:folder-open-filled',
|
|
173
|
-
label: "复制",
|
|
174
|
-
onClick: () => {
|
|
175
|
-
if (XEClipboard.copy(currentValue)) {
|
|
176
|
-
VXETable.modal.message({
|
|
177
|
-
content: "已复制到剪贴板!",
|
|
178
|
-
status: "success",
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
event,
|
|
185
|
-
zIndex: 1000,
|
|
186
|
-
minWidth: 150
|
|
187
|
-
});
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
};
|
|
192
|
-
</script>
|
|
193
|
-
|
|
194
|
-
<style lang="less">
|
|
195
|
-
@import "../../styles/default.less";
|
|
196
|
-
</style>
|
|
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
|
+
<span v-if="rules && rules['required']" class="d-control-label-required"
|
|
9
|
+
>*</span
|
|
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>
|
|
14
|
+
</div>
|
|
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
|
+
<Tooltip placement="topLeft" v-else>
|
|
39
|
+
<template slot="title">
|
|
40
|
+
{{ currentValue }}
|
|
41
|
+
</template>
|
|
42
|
+
<span @contextmenu.prevent="(event) => onContextmenu(event, currentValue)">
|
|
43
|
+
{{ currentValue }}
|
|
44
|
+
</span>
|
|
45
|
+
</Tooltip>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
//VXETable插件
|
|
52
|
+
import VXETable from "vxe-table";
|
|
53
|
+
//轻量级剪贴板复制函数
|
|
54
|
+
import XEClipboard from "xe-clipboard";
|
|
55
|
+
import { DatePicker } from "ant-design-vue";
|
|
56
|
+
import { ValidationProvider } from "vee-validate";
|
|
57
|
+
import moment from "moment";
|
|
58
|
+
import { Tooltip } from "ant-design-vue";
|
|
59
|
+
|
|
60
|
+
export default {
|
|
61
|
+
name: "BaseDatetime",
|
|
62
|
+
components: {
|
|
63
|
+
DatePicker,
|
|
64
|
+
ValidationProvider,
|
|
65
|
+
Tooltip,
|
|
66
|
+
},
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
moment,
|
|
70
|
+
filterValue: "",
|
|
71
|
+
isInputChanged: false,
|
|
72
|
+
inputTimeout: null,
|
|
73
|
+
searchRows: [],
|
|
74
|
+
filterCols: [],
|
|
75
|
+
gridLoading: false,
|
|
76
|
+
gridPagerConfig: {
|
|
77
|
+
total: 0,
|
|
78
|
+
currentPage: 1,
|
|
79
|
+
pageSize: 10,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
computed: {
|
|
84
|
+
currentValue: {
|
|
85
|
+
// 动态计算currentValue的值
|
|
86
|
+
get: function () {
|
|
87
|
+
return this.value; // 将props中的value赋值给currentValue
|
|
88
|
+
},
|
|
89
|
+
set: function (val) {
|
|
90
|
+
this.$emit("input", val); // 通过$emit触发父组件
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
props: {
|
|
95
|
+
labelWidth: {
|
|
96
|
+
type: Number,
|
|
97
|
+
default: function () {
|
|
98
|
+
return 0;
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
rules: {
|
|
102
|
+
type: Object,
|
|
103
|
+
default: function () {
|
|
104
|
+
return null;
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
pastDate: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: function () {
|
|
110
|
+
return false;
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
value: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: function () {
|
|
116
|
+
return "";
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
edit: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: function () {
|
|
122
|
+
return false;
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
name: {
|
|
126
|
+
type: String,
|
|
127
|
+
default: function () {
|
|
128
|
+
return "";
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
label: {
|
|
132
|
+
type: String,
|
|
133
|
+
default: function () {
|
|
134
|
+
return "";
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
placeholder: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: function () {
|
|
140
|
+
return "";
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
tooltip: {
|
|
144
|
+
type: String,
|
|
145
|
+
default: function () {
|
|
146
|
+
return "";
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
disabledDateValue: {
|
|
150
|
+
type: Number,
|
|
151
|
+
default: function () {
|
|
152
|
+
return 0;
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
created() {},
|
|
157
|
+
methods: {
|
|
158
|
+
disabledDate(current) {
|
|
159
|
+
if (this.pastDate === true) {
|
|
160
|
+
//如果允许过期时间
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
return current && current.diff(moment().add(this.disabledDateValue, 'day'), "minutes") < 0;
|
|
164
|
+
},
|
|
165
|
+
change() {
|
|
166
|
+
this.$emit("change");
|
|
167
|
+
},
|
|
168
|
+
onContextmenu(event, currentValue) {
|
|
169
|
+
this.$contextmenu({
|
|
170
|
+
items: [
|
|
171
|
+
{
|
|
172
|
+
icon: 'ant-design:folder-open-filled',
|
|
173
|
+
label: "复制",
|
|
174
|
+
onClick: () => {
|
|
175
|
+
if (XEClipboard.copy(currentValue)) {
|
|
176
|
+
VXETable.modal.message({
|
|
177
|
+
content: "已复制到剪贴板!",
|
|
178
|
+
status: "success",
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
event,
|
|
185
|
+
zIndex: 1000,
|
|
186
|
+
minWidth: 150
|
|
187
|
+
});
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
</script>
|
|
193
|
+
|
|
194
|
+
<style lang="less">
|
|
195
|
+
@import "../../styles/default.less";
|
|
196
|
+
</style>
|
|
197
197
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// 导入组件,组件必须声明 name
|
|
2
|
-
import BaseForm from './src/index.vue';
|
|
3
|
-
// 为组件提供 install 安装方法,供按需引入
|
|
4
|
-
BaseForm.install = function(Vue) {
|
|
5
|
-
Vue.component(BaseForm.name, BaseForm);
|
|
6
|
-
};
|
|
7
|
-
// 默认导出组件
|
|
1
|
+
// 导入组件,组件必须声明 name
|
|
2
|
+
import BaseForm from './src/index.vue';
|
|
3
|
+
// 为组件提供 install 安装方法,供按需引入
|
|
4
|
+
BaseForm.install = function(Vue) {
|
|
5
|
+
Vue.component(BaseForm.name, BaseForm);
|
|
6
|
+
};
|
|
7
|
+
// 默认导出组件
|
|
8
8
|
export default BaseForm;
|