bri-components 1.2.49 → 1.2.51
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 +2 -2
- package/src/components/controls/BriControlInput.vue +13 -9
- package/src/components/controls/base/DshCascader/DshCascader.vue +40 -23
- package/src/components/controls/base/DshCascader/InfoCascader.vue +7 -15
- package/src/components/controls/base/DshDate/DshDate.vue +146 -0
- package/src/components/controls/base/{DshDaterange.vue → DshDate/DshDaterange.vue} +74 -64
- package/src/components/controls/base/DshEditor.vue +1 -1
- package/src/components/controls/base/{BriInputs.vue → DshInput/BriInputs.vue} +1 -1
- package/src/components/controls/base/{DshInput.vue → DshInput/DshInput.vue} +21 -4
- package/src/components/controls/base/DshNumber/DshNumber.vue +33 -2
- package/src/components/controls/base/{DshNumberange.vue → DshNumber/DshNumberange.vue} +37 -2
- package/src/components/controls/base/DshSelect/DshCheckbox.vue +280 -0
- package/src/components/controls/base/DshSelect/DshSelect.vue +319 -0
- package/src/components/controls/base/DshSelect/selectMixin.js +239 -0
- package/src/components/controls/base/DshSwitch/DshSwitch.vue +79 -0
- package/src/components/controls/base/DshSwitch/switchMixin.js +73 -0
- package/src/components/controls/controlMap.js +8 -11
- package/src/components/controls/controlMixin.js +38 -6
- package/src/components/controls/senior/BriLabels.vue +1 -1
- package/src/components/controls/senior/selectDepartments.vue +9 -13
- package/src/components/controls/senior/selectUsers/selectUsers.vue +23 -21
- package/src/components/controls/special/DshBack.vue +1 -1
- package/src/components/controls/special/DshUndeveloped.vue +1 -1
- package/src/components/form/DshAdvSearch.vue +155 -3
- package/src/components/form/DshDefaultSearch.vue +84 -40
- package/src/components/form/DshForm.vue +24 -0
- package/src/components/form/searchMixin.js +5 -18
- package/src/components/other/BriGantt.vue +2 -2
- package/src/components/unit/DshFormUnit.vue +111 -2
- package/src/components/unit/DshListUnit.vue +6 -0
- package/src/index.js +10 -10
- package/src/styles/components/controls/base/DshInput.less +0 -16
- package/src/styles/components/index.less +0 -14
- package/src/styles/components/other/BriGantt.less +1 -12
- package/src/styles/index.less +5 -3
- package/src/styles/reset-iview-controls.less +104 -0
- package/src/abolish/BriTransfer.less +0 -65
- package/src/abolish/BriTransfer.vue +0 -71
- package/src/abolish/BriTree.less +0 -57
- package/src/abolish/DshCascaders.less +0 -11
- package/src/abolish/DshCascaders.vue +0 -151
- package/src/abolish/DshCrumbs.less +0 -0
- package/src/abolish/DshCrumbs.vue +0 -62
- package/src/abolish/DshCrumbsItem.vue +0 -109
- package/src/abolish/DshEditPanel.less +0 -70
- package/src/abolish/DshEditPanel.vue +0 -152
- package/src/abolish/DshFileShow.less +0 -61
- package/src/abolish/DshFileShow.vue +0 -0
- package/src/abolish/DshFlatTable.less +0 -93
- package/src/abolish/DshFlatTable.vue +0 -605
- package/src/abolish/DshMenu.less +0 -37
- package/src/abolish/DshMenu.vue +0 -133
- package/src/abolish/DshTexts.less +0 -13
- package/src/abolish/DshTexts.vue +0 -89
- package/src/components/controls/base/DshCheckbox.vue +0 -213
- package/src/components/controls/base/DshDate.vue +0 -122
- package/src/components/controls/base/DshSelect.vue +0 -242
- package/src/components/controls/base/DshSwitch.vue +0 -70
- package/src/components/controls/base/selectMixin.js +0 -110
- package/src/styles/components/controls/base/DshCheckbox.less +0 -115
- package/src/styles/components/controls/base/DshDate.less +0 -15
- package/src/styles/components/controls/base/DshDaterange.less +0 -49
- package/src/styles/components/controls/base/DshNumber.less +0 -55
- package/src/styles/components/controls/base/DshNumberange.less +0 -29
- package/src/styles/components/controls/base/DshSelect.less +0 -190
- package/src/styles/components/form/DshAdvSearch.less +0 -149
- package/src/styles/components/form/DshDefaultSearch.less +0 -82
- package/src/styles/components/form/DshForm.less +0 -18
- package/src/styles/components/unit/DshFormUnit.less +0 -105
- package/src/styles/components/unit/DshListUnit.less +0 -3
- /package/src/{abolish/DshCrumbItem.less → styles/reset-iview-other.less} +0 -0
- /package/src/styles/{reset-iview.less → reset-iview-variables.less} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bri-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.51",
|
|
4
4
|
"author": "dengshanghui",
|
|
5
5
|
"description": "a component lib for vue project",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ali-oss": "^6.13.1",
|
|
34
34
|
"axios": "^0.23.0",
|
|
35
|
-
"bri-datas": "^1.0.
|
|
35
|
+
"bri-datas": "^1.0.42",
|
|
36
36
|
"jshint": "^2.12.0",
|
|
37
37
|
"jsonlint": "^1.6.3",
|
|
38
38
|
"minio": "7.1.0",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
class="overflow"
|
|
14
14
|
:list="value"
|
|
15
15
|
:propsObj="{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
disabled: !canEdit,
|
|
17
|
+
closable: true
|
|
18
|
+
}"
|
|
19
19
|
@delete="clickDeleteItem"
|
|
20
20
|
></dsh-tags>
|
|
21
21
|
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
{{ value }}
|
|
36
36
|
</div>
|
|
37
37
|
</template>
|
|
38
|
+
|
|
38
39
|
<!-- 无值 -->
|
|
39
40
|
<template v-else>
|
|
40
41
|
<div class="placeholder">
|
|
@@ -114,12 +115,7 @@
|
|
|
114
115
|
.placeholder {
|
|
115
116
|
flex: 1;
|
|
116
117
|
min-width: 0px;
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.ivu-icon {
|
|
121
|
-
padding: 5px;
|
|
122
|
-
color: @placeholder-disabled-color;
|
|
118
|
+
.dsh-ellipsis();
|
|
123
119
|
}
|
|
124
120
|
|
|
125
121
|
.icon {
|
|
@@ -132,3 +128,11 @@
|
|
|
132
128
|
}
|
|
133
129
|
}
|
|
134
130
|
</style>
|
|
131
|
+
<style lang="less">
|
|
132
|
+
.BriControlInput {
|
|
133
|
+
.ivu-icon {
|
|
134
|
+
padding: 5px;
|
|
135
|
+
color: @placeholder-disabled-color;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
</style>
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
:load-data="loadData"
|
|
84
84
|
@on-visible-change="visibleChange"
|
|
85
85
|
@on-change="changeVal"
|
|
86
|
-
@click
|
|
86
|
+
@click="clickCascader"
|
|
87
87
|
></Cascader>
|
|
88
88
|
</template>
|
|
89
89
|
</template>
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
<!-- 多选 -->
|
|
95
95
|
<template v-if="multipleMode">
|
|
96
96
|
<bri-tooltip
|
|
97
|
-
:content="
|
|
97
|
+
:content="showMulVal"
|
|
98
98
|
placement="top"
|
|
99
99
|
maxWidth="200"
|
|
100
100
|
:transfer="true"
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
}">
|
|
107
107
|
<!-- 有值 -->
|
|
108
108
|
<dsh-tags
|
|
109
|
-
v-if="!$isEmptyData(
|
|
109
|
+
v-if="!$isEmptyData(curValList)"
|
|
110
110
|
class="text"
|
|
111
111
|
:list="curValNameList"
|
|
112
112
|
></dsh-tags>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
</template>
|
|
141
141
|
|
|
142
142
|
<script>
|
|
143
|
-
import { regionData } from "bri-datas";
|
|
143
|
+
import { regionData, userIndustryData } from "bri-datas";
|
|
144
144
|
import controlMixin from "../../controlMixin.js";
|
|
145
145
|
import InfoCascader from "./InfoCascader.vue";
|
|
146
146
|
|
|
@@ -190,22 +190,37 @@
|
|
|
190
190
|
};
|
|
191
191
|
},
|
|
192
192
|
computed: {
|
|
193
|
+
// 级联拼接符
|
|
194
|
+
joinSymbol () {
|
|
195
|
+
return this.propsObj._joinSymbol || "/";
|
|
196
|
+
},
|
|
197
|
+
nameKey () {
|
|
198
|
+
return this.propsObj._nameKey || "name";
|
|
199
|
+
},
|
|
200
|
+
|
|
193
201
|
selfPropsObj () {
|
|
194
202
|
return {
|
|
195
203
|
_showMode: false,
|
|
196
|
-
_changeOnSelect: false, // 每级菜单都可取值
|
|
197
204
|
_filterable: true,
|
|
198
|
-
|
|
205
|
+
_changeOnSelect: false,
|
|
206
|
+
_renderFormat: (label) => label.join(this.joinSymbol),
|
|
199
207
|
_transfer: true,
|
|
208
|
+
|
|
200
209
|
...this.propsObj,
|
|
201
210
|
...this.commonDealPropsObj
|
|
202
211
|
};
|
|
203
212
|
},
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
return
|
|
213
|
+
// 每级菜单都可取值
|
|
214
|
+
changeOnSelect () {
|
|
215
|
+
return this.isOnSearch ? true : this.selfPropsObj._changeOnSelect;
|
|
207
216
|
},
|
|
208
|
-
|
|
217
|
+
cascaderLevel () {
|
|
218
|
+
return this.selfPropsObj._cascaderLevel;
|
|
219
|
+
},
|
|
220
|
+
cascaderFilterVals () {
|
|
221
|
+
return this.selfPropsObj._cascaderFilterVals;
|
|
222
|
+
},
|
|
223
|
+
// 只有单选模式有效
|
|
209
224
|
showMode () {
|
|
210
225
|
return this.selfPropsObj._showMode;
|
|
211
226
|
},
|
|
@@ -213,14 +228,16 @@
|
|
|
213
228
|
return this.isVisible ? "ios-arrow-up" : "ios-arrow-down";
|
|
214
229
|
},
|
|
215
230
|
|
|
231
|
+
originData () {
|
|
232
|
+
return ["region", "regions"].includes(this.controlType)
|
|
233
|
+
? regionData
|
|
234
|
+
: ["userIndustry"].includes(this.controlType)
|
|
235
|
+
? userIndustryData
|
|
236
|
+
: this.selfPropsObj._data;
|
|
237
|
+
},
|
|
216
238
|
cascaderData: {
|
|
217
239
|
get () {
|
|
218
|
-
return loop(
|
|
219
|
-
["region", "regions"].includes(this.propsObj._type) ? regionData : this.selfPropsObj._data,
|
|
220
|
-
this.selfPropsObj._cascaderLevel,
|
|
221
|
-
undefined,
|
|
222
|
-
this.selfPropsObj._cascaderFilterVals
|
|
223
|
-
);
|
|
240
|
+
return loop(this.originData, this.cascaderLevel, undefined, this.cascaderFilterVals);
|
|
224
241
|
},
|
|
225
242
|
set () {}
|
|
226
243
|
},
|
|
@@ -235,20 +252,20 @@
|
|
|
235
252
|
: this.cascaderData;
|
|
236
253
|
},
|
|
237
254
|
curValName () {
|
|
238
|
-
return this.$getTreeLinealDatas(this.curValList, this.cascaderData,
|
|
255
|
+
return this.$getTreeLinealDatas(this.curValList, this.cascaderData, this.nameKey).join(this.joinSymbol);
|
|
239
256
|
},
|
|
240
257
|
showVal () {
|
|
241
258
|
return this.$isEmptyData(this.curValList)
|
|
242
259
|
? this.emptyShowVal
|
|
243
260
|
: this.curValName;
|
|
244
261
|
},
|
|
245
|
-
// 多选用
|
|
262
|
+
// 多选用
|
|
246
263
|
curValNameList () {
|
|
247
264
|
return this.curValList.map(item =>
|
|
248
|
-
this.$getTreeLinealDatas(item, this.cascaderData,
|
|
265
|
+
this.$getTreeLinealDatas(item, this.cascaderData, this.nameKey).join(this.joinSymbol)
|
|
249
266
|
);
|
|
250
267
|
},
|
|
251
|
-
|
|
268
|
+
showMulVal () {
|
|
252
269
|
return this.$isEmptyData(this.curValList)
|
|
253
270
|
? this.emptyShowVal
|
|
254
271
|
: this.curValNameList.join("、");
|
|
@@ -280,9 +297,9 @@
|
|
|
280
297
|
|
|
281
298
|
if (bool === false) {
|
|
282
299
|
if (this.selectVal.length) {
|
|
283
|
-
if (this.curValList.some(item => JSON.stringify(item)
|
|
300
|
+
if (this.curValList.some(item => JSON.stringify(item) === JSON.stringify(this.selectVal))) {
|
|
284
301
|
this.$Message.error({
|
|
285
|
-
content: `"${this.$getTreeLinealDatas(this.selectVal, this.cascaderData,
|
|
302
|
+
content: `"${this.$getTreeLinealDatas(this.selectVal, this.cascaderData, this.nameKey).join(this.joinSymbol)}"已选择,请勿重复选择!`,
|
|
286
303
|
duration: 5
|
|
287
304
|
});
|
|
288
305
|
} else {
|
|
@@ -353,7 +370,7 @@
|
|
|
353
370
|
}
|
|
354
371
|
},
|
|
355
372
|
watch: {
|
|
356
|
-
"
|
|
373
|
+
"cascaderLevel" () {
|
|
357
374
|
this.value[this.controlKey] = [];
|
|
358
375
|
}
|
|
359
376
|
}
|
|
@@ -175,22 +175,14 @@
|
|
|
175
175
|
},
|
|
176
176
|
methods: {
|
|
177
177
|
change (node) {
|
|
178
|
-
|
|
179
|
-
if (node.
|
|
180
|
-
this.curName = node.name;
|
|
181
|
-
this.getDescription(node.codeArr);
|
|
182
|
-
if (node.codeArr.length && this.curSelect.codeArr && this.curSelect.codeArr.length === node.codeArr.length && node.codeArr.every((code, idx) => code === this.curSelect.codeArr[idx])) {
|
|
183
|
-
this.curSelect = {};
|
|
184
|
-
this.description = "";
|
|
185
|
-
} else {
|
|
186
|
-
if (!this.propsObj._cascaderLevel || node.level == this.propsObj._cascaderLevel || !node.children.length) {
|
|
187
|
-
this.curSelect = node;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
} else {
|
|
191
|
-
this.curName = "";
|
|
192
|
-
this.description = "";
|
|
178
|
+
this.curName = node.name;
|
|
179
|
+
if (node.codeArr.length && this.curSelect.codeArr && this.curSelect.codeArr.length === node.codeArr.length && node.codeArr.every((code, idx) => code === this.curSelect.codeArr[idx])) {
|
|
193
180
|
this.curSelect = {};
|
|
181
|
+
} else {
|
|
182
|
+
if (!this.propsObj._cascaderLevel || node.level == this.propsObj._cascaderLevel || !node.children.length) {
|
|
183
|
+
this.curSelect = node;
|
|
184
|
+
this.getDescription(node.codeArr);
|
|
185
|
+
}
|
|
194
186
|
}
|
|
195
187
|
},
|
|
196
188
|
getDescription (nodeKeys) {
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 单选模式 -->
|
|
3
|
+
<div
|
|
4
|
+
v-if="!multipleMode"
|
|
5
|
+
class="DshDate"
|
|
6
|
+
>
|
|
7
|
+
<template v-if="show">
|
|
8
|
+
<!-- 编辑 -->
|
|
9
|
+
<template v-if="canEdit">
|
|
10
|
+
<!-- 时间子类型 -->
|
|
11
|
+
<template v-if="['time'].includes(subType)">
|
|
12
|
+
<TimePicker
|
|
13
|
+
class="DshDate-edit"
|
|
14
|
+
v-model="curValDate"
|
|
15
|
+
:type="subType"
|
|
16
|
+
:placeholder="selfPropsObj._placeholder"
|
|
17
|
+
:disabled="!finalCanEdit"
|
|
18
|
+
:clearable="selfPropsObj._clearable"
|
|
19
|
+
:transfer="selfPropsObj._transfer"
|
|
20
|
+
@on-change="change"
|
|
21
|
+
></TimePicker>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<!-- 日期、日期时间、年、月 -->
|
|
25
|
+
<template v-else>
|
|
26
|
+
<DatePicker
|
|
27
|
+
class="DshDate-edit"
|
|
28
|
+
v-model="curValDate"
|
|
29
|
+
:type="subType"
|
|
30
|
+
:placeholder="selfPropsObj._placeholder"
|
|
31
|
+
:disabled="!finalCanEdit"
|
|
32
|
+
:clearable="selfPropsObj._clearable"
|
|
33
|
+
:options="options"
|
|
34
|
+
:transfer="selfPropsObj._transfer"
|
|
35
|
+
@on-change="change"
|
|
36
|
+
></DatePicker>
|
|
37
|
+
</template>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<!-- 查看 -->
|
|
41
|
+
<template v-else>
|
|
42
|
+
<bri-tooltip
|
|
43
|
+
:content="showVal"
|
|
44
|
+
maxWidth="200"
|
|
45
|
+
:transfer="true"
|
|
46
|
+
>
|
|
47
|
+
<div :class="{
|
|
48
|
+
...commonClass
|
|
49
|
+
}">
|
|
50
|
+
{{ showVal }}
|
|
51
|
+
</div>
|
|
52
|
+
</bri-tooltip>
|
|
53
|
+
</template>
|
|
54
|
+
</template>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!-- 多选模式 -->
|
|
58
|
+
<dsh-daterange
|
|
59
|
+
v-else
|
|
60
|
+
:canEdit="canEdit"
|
|
61
|
+
:value="value"
|
|
62
|
+
:propsObj="propsObj"
|
|
63
|
+
@change="change"
|
|
64
|
+
></dsh-daterange>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script>
|
|
68
|
+
import controlMixin from "../../controlMixin.js";
|
|
69
|
+
import DshDaterange from "./DshDaterange.vue";
|
|
70
|
+
|
|
71
|
+
export default {
|
|
72
|
+
name: "DshDate",
|
|
73
|
+
mixins: [
|
|
74
|
+
controlMixin
|
|
75
|
+
],
|
|
76
|
+
components: {
|
|
77
|
+
DshDaterange
|
|
78
|
+
},
|
|
79
|
+
props: {},
|
|
80
|
+
data () {
|
|
81
|
+
return {
|
|
82
|
+
show: true
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
computed: {
|
|
86
|
+
selfPropsObj () {
|
|
87
|
+
return {
|
|
88
|
+
_transfer: true,
|
|
89
|
+
|
|
90
|
+
...this.propsObj,
|
|
91
|
+
...this.commonDealPropsObj
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
curValDate: {
|
|
96
|
+
get () {
|
|
97
|
+
const val = this.value[this.controlKey];
|
|
98
|
+
return this.$transformDateCompatible(val, this.subType);
|
|
99
|
+
},
|
|
100
|
+
set (val) {
|
|
101
|
+
this.value[this.controlKey] = this.$transformDate(val, "-", this.subType);
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
subType () {
|
|
105
|
+
return this.selfPropsObj._dateType;
|
|
106
|
+
},
|
|
107
|
+
options () {
|
|
108
|
+
return {
|
|
109
|
+
shortcuts: [],
|
|
110
|
+
disabledDate: (date) => {
|
|
111
|
+
const resultObj = this.$validateComparedRule(
|
|
112
|
+
[this.selfPropsObj],
|
|
113
|
+
{
|
|
114
|
+
...this.value,
|
|
115
|
+
[this.controlKey]: this.$transformDate(date, "/", this.subType)
|
|
116
|
+
},
|
|
117
|
+
this.allFormList
|
|
118
|
+
);
|
|
119
|
+
return !resultObj.bool;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
created () {},
|
|
125
|
+
methods: {},
|
|
126
|
+
watch: {
|
|
127
|
+
"subType" () {
|
|
128
|
+
this.show = false;
|
|
129
|
+
this.$nextTick(() => {
|
|
130
|
+
this.value[this.controlKey] = this.selfPropsObj._default;
|
|
131
|
+
this.show = true;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
</script>
|
|
137
|
+
|
|
138
|
+
<style lang="less">
|
|
139
|
+
.DshDate {
|
|
140
|
+
width: 100%;
|
|
141
|
+
|
|
142
|
+
&-edit {
|
|
143
|
+
width: 100%;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
</style>
|
|
@@ -29,26 +29,19 @@
|
|
|
29
29
|
@on-change="changeVal($event, 0)"
|
|
30
30
|
@on-open-change="changeOpen($event, 0)"
|
|
31
31
|
>
|
|
32
|
-
<
|
|
33
|
-
class="
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/>
|
|
46
|
-
<Icon
|
|
47
|
-
v-show="!val0"
|
|
48
|
-
type="ios-calendar-outline"
|
|
49
|
-
/>
|
|
50
|
-
</span>
|
|
51
|
-
</div>
|
|
32
|
+
<bri-control-input
|
|
33
|
+
:class="{
|
|
34
|
+
...commonClass,
|
|
35
|
+
'bri-control-nodata': this.$isEmptyData(this.showVal0),
|
|
36
|
+
'DshDaterange-item': true
|
|
37
|
+
}"
|
|
38
|
+
:canEdit="finalCanEdit"
|
|
39
|
+
:value="showVal0"
|
|
40
|
+
inputIcon="ios-calendar-outline"
|
|
41
|
+
:propsObj="selfPropsObj"
|
|
42
|
+
@clear="clickClear('', 0)"
|
|
43
|
+
@click.native="changeOpen(true, 0)"
|
|
44
|
+
></bri-control-input>
|
|
52
45
|
</DatePicker>
|
|
53
46
|
|
|
54
47
|
<span class="DshDaterange-center"> — </span>
|
|
@@ -66,33 +59,26 @@
|
|
|
66
59
|
@on-change="changeVal($event, 1)"
|
|
67
60
|
@on-open-change="changeOpen($event, 1)"
|
|
68
61
|
>
|
|
69
|
-
<
|
|
70
|
-
class="
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/>
|
|
83
|
-
<Icon
|
|
84
|
-
v-show="!val1"
|
|
85
|
-
type="ios-calendar-outline"
|
|
86
|
-
/>
|
|
87
|
-
</span>
|
|
88
|
-
</div>
|
|
62
|
+
<bri-control-input
|
|
63
|
+
:class="{
|
|
64
|
+
...commonClass,
|
|
65
|
+
'bri-control-nodata': this.$isEmptyData(this.showVal1),
|
|
66
|
+
'DshDaterange-item': true
|
|
67
|
+
}"
|
|
68
|
+
:canEdit="finalCanEdit"
|
|
69
|
+
:value="showVal1"
|
|
70
|
+
inputIcon="ios-calendar-outline"
|
|
71
|
+
:propsObj="selfPropsObj"
|
|
72
|
+
@clear="clickClear('', 1)"
|
|
73
|
+
@click.native="changeOpen(true, 1)"
|
|
74
|
+
></bri-control-input>
|
|
89
75
|
</DatePicker>
|
|
90
76
|
</template>
|
|
91
77
|
</div>
|
|
92
78
|
</template>
|
|
93
79
|
|
|
94
80
|
<script>
|
|
95
|
-
import controlMixin from "
|
|
81
|
+
import controlMixin from "../../controlMixin.js";
|
|
96
82
|
|
|
97
83
|
export default {
|
|
98
84
|
name: "DshDaterange",
|
|
@@ -224,28 +210,13 @@
|
|
|
224
210
|
};
|
|
225
211
|
},
|
|
226
212
|
computed: {
|
|
227
|
-
val0: {
|
|
228
|
-
get () {
|
|
229
|
-
return this.getVal(0);
|
|
230
|
-
},
|
|
231
|
-
set (val) {
|
|
232
|
-
this.setVal(val, 0);
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
val1: {
|
|
236
|
-
get () {
|
|
237
|
-
return this.getVal(1);
|
|
238
|
-
},
|
|
239
|
-
set (val) {
|
|
240
|
-
this.setVal(val, 1);
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
|
|
244
213
|
selfPropsObj () {
|
|
245
214
|
return {
|
|
246
215
|
_useShortcuts: true,
|
|
216
|
+
|
|
247
217
|
...this.propsObj,
|
|
248
218
|
...this.commonDealPropsObj,
|
|
219
|
+
|
|
249
220
|
_type: "date"
|
|
250
221
|
};
|
|
251
222
|
},
|
|
@@ -255,18 +226,34 @@
|
|
|
255
226
|
useShortcuts () {
|
|
256
227
|
return this.selfPropsObj._useShortcuts;
|
|
257
228
|
},
|
|
258
|
-
|
|
259
229
|
options0 () {
|
|
260
230
|
return this.getOptions(0);
|
|
261
231
|
},
|
|
262
232
|
options1 () {
|
|
263
233
|
return this.getOptions(1);
|
|
264
234
|
},
|
|
235
|
+
|
|
236
|
+
val0: {
|
|
237
|
+
get () {
|
|
238
|
+
return this.getVal(0);
|
|
239
|
+
},
|
|
240
|
+
set (val) {
|
|
241
|
+
this.setVal(val, 0);
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
val1: {
|
|
245
|
+
get () {
|
|
246
|
+
return this.getVal(1);
|
|
247
|
+
},
|
|
248
|
+
set (val) {
|
|
249
|
+
this.setVal(val, 1);
|
|
250
|
+
}
|
|
251
|
+
},
|
|
265
252
|
showVal0 () {
|
|
266
|
-
return this.getShowVal(
|
|
253
|
+
return this.getShowVal(this.val0);
|
|
267
254
|
},
|
|
268
255
|
showVal1 () {
|
|
269
|
-
return this.getShowVal(
|
|
256
|
+
return this.getShowVal(this.val1);
|
|
270
257
|
}
|
|
271
258
|
},
|
|
272
259
|
created () {},
|
|
@@ -328,9 +315,7 @@
|
|
|
328
315
|
}
|
|
329
316
|
};
|
|
330
317
|
},
|
|
331
|
-
getShowVal (
|
|
332
|
-
const val = this[`val${index}`];
|
|
333
|
-
|
|
318
|
+
getShowVal (val) {
|
|
334
319
|
return this.isDynDateKey(val)
|
|
335
320
|
? (this.dynDate.find(dynItem => dynItem._key === val) || { name: `"${val}"dnDate不存在` }).name
|
|
336
321
|
: this.$transformDate(val, "-", this.subType);
|
|
@@ -341,3 +326,28 @@
|
|
|
341
326
|
}
|
|
342
327
|
};
|
|
343
328
|
</script>
|
|
329
|
+
|
|
330
|
+
<style lang="less">
|
|
331
|
+
.DshDaterange {
|
|
332
|
+
width: 100%;
|
|
333
|
+
display: flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
|
|
336
|
+
&-left,
|
|
337
|
+
&-right {
|
|
338
|
+
flex: 7;
|
|
339
|
+
min-width: 0px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&-center {
|
|
343
|
+
flex: 1;
|
|
344
|
+
min-width: 10px;
|
|
345
|
+
text-align: center;
|
|
346
|
+
color: @textColor;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&-item {
|
|
350
|
+
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
</style>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<!-- 单选模式 -->
|
|
3
|
+
<div
|
|
4
|
+
v-if="!multipleMode"
|
|
5
|
+
class="DshInput"
|
|
6
|
+
>
|
|
3
7
|
<!-- 编辑 -->
|
|
4
8
|
<template v-if="canEdit">
|
|
5
9
|
<Input
|
|
@@ -8,7 +12,7 @@
|
|
|
8
12
|
:type="inputType"
|
|
9
13
|
:placeholder="selfPropsObj._placeholder"
|
|
10
14
|
:readonly="selfPropsObj._readonly"
|
|
11
|
-
:disabled="
|
|
15
|
+
:disabled="selfPropsObj._disabled"
|
|
12
16
|
:clearable="selfPropsObj._clearable"
|
|
13
17
|
:size="selfPropsObj._size"
|
|
14
18
|
:rows="selfPropsObj._rows"
|
|
@@ -76,16 +80,29 @@
|
|
|
76
80
|
</template>
|
|
77
81
|
</template>
|
|
78
82
|
</div>
|
|
83
|
+
|
|
84
|
+
<!-- 多选模式 -->
|
|
85
|
+
<dsh-inputs
|
|
86
|
+
v-else
|
|
87
|
+
:canEdit="canEdit"
|
|
88
|
+
:value="value"
|
|
89
|
+
:propsObj="propsObj"
|
|
90
|
+
@change="change"
|
|
91
|
+
></dsh-inputs>
|
|
79
92
|
</template>
|
|
80
93
|
|
|
81
94
|
<script>
|
|
82
|
-
import controlMixin from "
|
|
95
|
+
import controlMixin from "../../controlMixin.js";
|
|
96
|
+
import DshInputs from "./BriInputs.vue";
|
|
83
97
|
|
|
84
98
|
export default {
|
|
85
99
|
name: "DshInput",
|
|
86
100
|
mixins: [
|
|
87
101
|
controlMixin
|
|
88
102
|
],
|
|
103
|
+
components: {
|
|
104
|
+
DshInputs
|
|
105
|
+
},
|
|
89
106
|
props: {},
|
|
90
107
|
data () {
|
|
91
108
|
return {
|
|
@@ -95,9 +112,9 @@
|
|
|
95
112
|
computed: {
|
|
96
113
|
selfPropsObj () {
|
|
97
114
|
return {
|
|
115
|
+
_search: false,
|
|
98
116
|
_textType: "default", // ["default", "url"]
|
|
99
117
|
_readonly: ["serialNumber"].includes(this.controlType),
|
|
100
|
-
_disabled: ["serialNumber"].includes(this.controlType),
|
|
101
118
|
_showWordLimit: this.propsObj._showWordLimit || (!!this.propsObj._maxlength || this.propsObj._maxlength === 0),
|
|
102
119
|
_autosize: {
|
|
103
120
|
minRows: 2
|