bri-components 1.2.0 → 1.2.2
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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/2.bri-components.min.js +1 -1
- package/lib/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/7.bri-components.min.js +1 -1
- package/lib/8.bri-components.min.js +1 -1
- package/lib/9.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +6 -6
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/abolish/DshFlatTable.vue +1 -1
- package/src/components/.DS_Store +0 -0
- package/src/components/controls/.DS_Store +0 -0
- package/src/components/controls/base/BriUpload/BriUpload.vue +2 -1
- package/src/components/controls/base/BriUpload/BriUploadImage.vue +45 -32
- package/src/components/controls/base/BriUpload/uploadMixin.js +3 -2
- package/src/components/controls/base/DshCascader/DshCascader.vue +52 -53
- package/src/components/controls/base/DshCascader/InfoCascader.vue +3 -4
- package/src/components/controls/base/DshCheckbox.vue +133 -140
- package/src/components/controls/base/DshCoordinates.vue +121 -147
- package/src/components/controls/base/DshDaterange.vue +1 -1
- package/src/components/controls/base/DshEditor.vue +2 -1
- package/src/components/controls/base/DshSelect.vue +4 -14
- package/src/components/controls/base/DshSwitch.vue +13 -20
- package/src/components/controls/controlMap.js +4 -0
- package/src/components/controls/controlMixin.js +23 -12
- package/src/components/controls/senior/.DS_Store +0 -0
- package/src/components/controls/senior/BriLabels.vue +170 -158
- package/src/components/controls/senior/selectDepartments.vue +380 -0
- package/src/components/controls/senior/selectUsers/DepartmentMenu.vue +191 -0
- package/src/components/controls/senior/selectUsers/selectUsers.vue +482 -0
- package/src/components/list/BriCard.vue +52 -0
- package/src/components/list/BriTreeItem.vue +110 -0
- package/src/components/small/DshTags.vue +132 -9
- package/src/index.js +7 -3
- package/src/styles/.DS_Store +0 -0
- package/src/styles/common/control.less +61 -56
- package/src/styles/components/.DS_Store +0 -0
- package/src/styles/components/controls/.DS_Store +0 -0
- package/src/styles/components/controls/base/BriUpload/BriUpload.less +11 -3
- package/src/styles/components/controls/base/BriUpload/BriUploadImage.less +6 -0
- package/src/styles/components/controls/base/DshCascader/DshCascader.less +33 -81
- package/src/styles/components/controls/base/DshCheckbox.less +72 -103
- package/src/styles/components/controls/base/DshCoordinates.less +1 -35
- package/src/styles/components/controls/base/DshEditor.less +3 -2
- package/src/styles/components/controls/base/DshInput.less +4 -8
- package/src/styles/components/controls/base/DshNumber.less +2 -2
- package/src/styles/components/controls/base/DshSelect.less +19 -4
- package/src/styles/components/controls/base/DshSwitch.less +1 -31
- package/src/styles/components/controls/senior/.DS_Store +0 -0
- package/src/styles/components/controls/senior/BriLabels.less +32 -118
- package/src/styles/components/controls/senior/cascaderTable.less +1 -1
- package/src/styles/components/controls/senior/flatTable.less +1 -1
- package/src/styles/components/controls/senior/selectDepartments.less +106 -0
- package/src/styles/components/controls/senior/selectUsers/DepartmentMenu.less +37 -0
- package/src/styles/components/controls/senior/selectUsers/index.less +2 -0
- package/src/styles/components/controls/senior/selectUsers/selectUsers.less +167 -0
- package/src/styles/components/form/DshDefaultSearch.less +1 -2
- package/src/styles/components/index.less +7 -3
- package/src/styles/components/list/BriCard.less +50 -0
- package/src/styles/components/list/BriFlatTable.less +1 -1
- package/src/styles/components/list/BriTreeItem.less +50 -0
- package/src/styles/components/small/DshModal.less +20 -42
- package/src/styles/components/small/DshTags.less +32 -14
- package/src/styles/components/unit/DshFormItem.less +3 -26
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
<bri-tooltip
|
|
78
78
|
v-else
|
|
79
|
-
:content="
|
|
79
|
+
:content="showVal"
|
|
80
80
|
maxWidth="200"
|
|
81
81
|
placement="top"
|
|
82
82
|
:transfer="true"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
v-if="curSelectItem"
|
|
86
86
|
class="DshSelect-value-wrapper"
|
|
87
87
|
:style="{
|
|
88
|
-
justifyContent:
|
|
88
|
+
justifyContent: showAlign
|
|
89
89
|
}"
|
|
90
90
|
>
|
|
91
91
|
<span
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
</div>
|
|
99
99
|
<div
|
|
100
100
|
v-else
|
|
101
|
-
class="control-
|
|
101
|
+
class="bri-control-nodata dsh-ellipsis"
|
|
102
102
|
>
|
|
103
103
|
{{ emptyShowVal }}
|
|
104
104
|
</div>
|
|
@@ -169,20 +169,10 @@
|
|
|
169
169
|
curSelectItem () {
|
|
170
170
|
return this.listData.find(item => item._key === this.value[this.controlKey]);
|
|
171
171
|
},
|
|
172
|
-
|
|
172
|
+
showVal () {
|
|
173
173
|
return this.curSelectItem
|
|
174
174
|
? this.curSelectItem.name || this.curSelectItem._name
|
|
175
175
|
: "";
|
|
176
|
-
},
|
|
177
|
-
showVal () {
|
|
178
|
-
return this.valStr;
|
|
179
|
-
},
|
|
180
|
-
flatShowAlign () {
|
|
181
|
-
return !this.propsObj._align || this.propsObj._align === "left" || !this.isUnitShow
|
|
182
|
-
? "flex-start"
|
|
183
|
-
: this.propsObj._align === "right"
|
|
184
|
-
? "flex-end"
|
|
185
|
-
: "center";
|
|
186
176
|
}
|
|
187
177
|
},
|
|
188
178
|
created () {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
v-model="curVal"
|
|
8
8
|
:disabled="!finalCanEdit"
|
|
9
9
|
:size="propsObj._size"
|
|
10
|
+
false-color="#CCCCCC"
|
|
10
11
|
@on-change="change"
|
|
11
12
|
>
|
|
12
13
|
<span slot="open">
|
|
@@ -19,26 +20,18 @@
|
|
|
19
20
|
</template>
|
|
20
21
|
|
|
21
22
|
<!-- 查看 -->
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
color: curVal ? '#3D84EE' : '#F4A135'
|
|
35
|
-
}"
|
|
36
|
-
>
|
|
37
|
-
{{ showText }}
|
|
38
|
-
</span>
|
|
39
|
-
</div>
|
|
40
|
-
</bri-tooltip>
|
|
41
|
-
</template>
|
|
23
|
+
<span v-else
|
|
24
|
+
:class="{
|
|
25
|
+
'DshSwitch-show': true,
|
|
26
|
+
...commonClass
|
|
27
|
+
}"
|
|
28
|
+
:style="{
|
|
29
|
+
background: curVal ? '#d3f3dcff' : '#FDEDED',
|
|
30
|
+
color: curVal ? '#37C45E' : '#E83636'
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
{{ showText }}
|
|
34
|
+
</span>
|
|
42
35
|
</div>
|
|
43
36
|
</template>
|
|
44
37
|
|
|
@@ -34,6 +34,8 @@ const componentNameMap = {
|
|
|
34
34
|
editor: "DshEditor",
|
|
35
35
|
tag: "DshDivider",
|
|
36
36
|
|
|
37
|
+
users: "selectUsers",
|
|
38
|
+
departments: "selectDepartments",
|
|
37
39
|
labels: "BriLabels",
|
|
38
40
|
package: "DshPackage",
|
|
39
41
|
flatTable: "flatTable",
|
|
@@ -63,6 +65,8 @@ const pathMap = {
|
|
|
63
65
|
DshEditor: "./base/DshEditor.vue",
|
|
64
66
|
DshDivider: "./base/DshDivider.vue",
|
|
65
67
|
|
|
68
|
+
selectUsers: "./senior/selectUsers/selectUsers.vue",
|
|
69
|
+
selectDepartments: "./senior/selectDepartments.vue",
|
|
66
70
|
BriLabels: "./senior/BriLabels.vue",
|
|
67
71
|
DshPackage: "./senior/DshPackage.vue",
|
|
68
72
|
flatTable: "./senior/flatTable.vue",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
components: {},
|
|
3
2
|
props: {
|
|
4
3
|
canEdit: {
|
|
5
4
|
type: Boolean,
|
|
@@ -38,9 +37,6 @@ export default {
|
|
|
38
37
|
return {};
|
|
39
38
|
},
|
|
40
39
|
computed: {
|
|
41
|
-
controlKey () {
|
|
42
|
-
return this.propsObj._key;
|
|
43
|
-
},
|
|
44
40
|
// 值为不是[]类型用的
|
|
45
41
|
curVal: {
|
|
46
42
|
get () {
|
|
@@ -53,7 +49,7 @@ export default {
|
|
|
53
49
|
// 值为[]类型用的
|
|
54
50
|
curValList: {
|
|
55
51
|
get () {
|
|
56
|
-
return this.value[this.controlKey] || [];
|
|
52
|
+
return (this.value[this.controlKey] || []).filter(item => !!item);
|
|
57
53
|
},
|
|
58
54
|
set (val) {
|
|
59
55
|
this.value[this.controlKey] = val;
|
|
@@ -71,12 +67,18 @@ export default {
|
|
|
71
67
|
return this.$isEmptyData(this.curVal) ? this.emptyShowVal : this.curVal;
|
|
72
68
|
},
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
return
|
|
70
|
+
controlKey () {
|
|
71
|
+
return this.propsObj._key;
|
|
72
|
+
},
|
|
73
|
+
controlType () {
|
|
74
|
+
return this.propsObj._type;
|
|
76
75
|
},
|
|
77
76
|
finalCanEdit () {
|
|
78
77
|
return this.canEdit && (this.propsObj.canEdit == undefined ? true : this.propsObj.canEdit);
|
|
79
78
|
},
|
|
79
|
+
isUnitShow () {
|
|
80
|
+
return !this.canEdit && this.inTable;
|
|
81
|
+
},
|
|
80
82
|
commonDealPropsObj () {
|
|
81
83
|
const selectControlTypes = ["date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "coordinates", "users", "departments"];
|
|
82
84
|
return {
|
|
@@ -89,15 +91,24 @@ export default {
|
|
|
89
91
|
},
|
|
90
92
|
commonClass () {
|
|
91
93
|
return {
|
|
92
|
-
"control-edit": this.canEdit && this.finalCanEdit,
|
|
93
|
-
"control-disabled": this.canEdit && !this.finalCanEdit,
|
|
94
|
-
"control-unit": !this.canEdit && this.isUnitShow,
|
|
95
|
-
"control-show": !this.canEdit && !this.isUnitShow,
|
|
94
|
+
"bri-control-edit": this.canEdit && this.finalCanEdit,
|
|
95
|
+
"bri-control-disabled": this.canEdit && !this.finalCanEdit,
|
|
96
|
+
"bri-control-unit": !this.canEdit && this.isUnitShow,
|
|
97
|
+
"bri-control-show": !this.canEdit && !this.isUnitShow,
|
|
96
98
|
|
|
97
99
|
"dsh-ellipsis": true,
|
|
98
|
-
"control-
|
|
100
|
+
"bri-control-nodata": this.$isEmptyData(this.curVal)
|
|
99
101
|
};
|
|
100
102
|
},
|
|
103
|
+
showAlign () {
|
|
104
|
+
return !this.isUnitShow
|
|
105
|
+
? "flex-start"
|
|
106
|
+
: this.propsObj._align === "right"
|
|
107
|
+
? "flex-end"
|
|
108
|
+
: this.propsObj._align === "center"
|
|
109
|
+
? "center"
|
|
110
|
+
: "flex-start";
|
|
111
|
+
},
|
|
101
112
|
|
|
102
113
|
// 部分控件或部分条件下 才使用的属性
|
|
103
114
|
inTable () {
|
|
Binary file
|
|
@@ -2,131 +2,142 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div class="BriLabels">
|
|
4
4
|
<!-- 编辑页 -->
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
>
|
|
14
|
-
<!-- 可编辑 -->
|
|
15
|
-
<div
|
|
16
|
-
:class="{
|
|
17
|
-
'BriLabels-box': true,
|
|
18
|
-
...commonClass
|
|
19
|
-
}"
|
|
20
|
-
@click="clickInput"
|
|
5
|
+
<template v-if="canEdit">
|
|
6
|
+
<Dropdown
|
|
7
|
+
class="BriLabels-dropdown"
|
|
8
|
+
trigger="custom"
|
|
9
|
+
placement="bottom-start"
|
|
10
|
+
:visible="listVisible"
|
|
11
|
+
transfer
|
|
12
|
+
@on-clickoutside="clickInput"
|
|
21
13
|
>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
14
|
+
<!-- 可编辑 -->
|
|
15
|
+
<div
|
|
16
|
+
:class="{
|
|
17
|
+
...commonClass,
|
|
18
|
+
'BriLabels-edit': true
|
|
19
|
+
}"
|
|
20
|
+
@click="clickInput"
|
|
21
|
+
>
|
|
22
|
+
<template v-if="!$isEmptyData(val)">
|
|
23
|
+
<dsh-tags
|
|
24
|
+
class="overflow"
|
|
25
|
+
:list="val"
|
|
26
|
+
:propsObj="{
|
|
27
|
+
disabled: !finalCanEdit
|
|
28
|
+
}"
|
|
29
|
+
:autoEllipsis="true"
|
|
30
|
+
@delete="clickDeleteItem"
|
|
31
|
+
>
|
|
32
|
+
<span slot-scope="{ tagItem }">
|
|
33
|
+
{{ tagItem.name }}
|
|
34
|
+
</span>
|
|
35
|
+
</dsh-tags>
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
<Icon
|
|
38
|
+
class="icon-default"
|
|
39
|
+
:type="inputIcon"
|
|
40
|
+
/>
|
|
41
|
+
</template>
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
<template v-else>
|
|
44
|
+
{{ emptyShowVal }}
|
|
45
|
+
</template>
|
|
46
|
+
</div>
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
>
|
|
56
|
-
<div
|
|
57
|
-
class="BriLabels-dropdown-item-show"
|
|
58
|
-
v-if="!item.isEdit"
|
|
48
|
+
<template #list>
|
|
49
|
+
<DropdownMenu class="BriLabels-dropdown-menu">
|
|
50
|
+
<DropdownItem
|
|
51
|
+
v-for="item in listData"
|
|
52
|
+
:key="item._key"
|
|
53
|
+
:class="{
|
|
54
|
+
'item': true,
|
|
55
|
+
'item-active': !!val.find(i=>i._key == item._key)
|
|
56
|
+
}"
|
|
57
|
+
@click.native="clickItem(item)"
|
|
59
58
|
>
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
|
|
60
|
+
<div
|
|
61
|
+
v-if="item.isEdit"
|
|
62
|
+
class="item-edit"
|
|
63
|
+
>
|
|
64
|
+
<Input
|
|
65
|
+
v-model="item.name"
|
|
66
|
+
@click.native="clickEditInput($event)"
|
|
67
|
+
>
|
|
68
|
+
<template #suffix>
|
|
69
|
+
<Icon
|
|
70
|
+
color="#3DB8C5"
|
|
71
|
+
custom="bri bri-duigou"
|
|
72
|
+
@click.native.stop="clickConfirm(item)"
|
|
73
|
+
/>
|
|
74
|
+
</template>
|
|
75
|
+
</Input>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div
|
|
79
|
+
v-else
|
|
80
|
+
class="item-show"
|
|
81
|
+
>
|
|
82
|
+
{{ item.name }}
|
|
83
|
+
<span class="item-show-icons">
|
|
84
|
+
<Icon
|
|
85
|
+
v-if="!item.coreLabel"
|
|
86
|
+
class="item-show-icons-edit"
|
|
87
|
+
custom="bri bri-bianji"
|
|
88
|
+
@click.stop="clickEditIcon(item)"
|
|
89
|
+
/>
|
|
90
|
+
<!-- 暂时不需要删除 -->
|
|
91
|
+
<!-- <Icon
|
|
92
|
+
class="item-show-icons-del"
|
|
93
|
+
custom="bri bri-shanchu"
|
|
94
|
+
/> -->
|
|
95
|
+
</span>
|
|
96
|
+
</div>
|
|
97
|
+
</DropdownItem>
|
|
98
|
+
|
|
75
99
|
<div
|
|
76
|
-
|
|
77
|
-
|
|
100
|
+
v-if="!selfPropsObj._onlySelect"
|
|
101
|
+
class="btns"
|
|
78
102
|
>
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
@click.native.stop="confirmEdit(item)"
|
|
88
|
-
/>
|
|
89
|
-
</template>
|
|
90
|
-
</Input>
|
|
103
|
+
<bri-button
|
|
104
|
+
class="btns-add"
|
|
105
|
+
:propsObj="{
|
|
106
|
+
btnType: 'default',
|
|
107
|
+
icon:'md-add'
|
|
108
|
+
}"
|
|
109
|
+
@click.native.stop="clickAddItem"
|
|
110
|
+
>添加选项</bri-button>
|
|
91
111
|
</div>
|
|
92
|
-
</
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
>
|
|
97
|
-
<bri-button
|
|
98
|
-
class="BriLabels-dropdown-add"
|
|
99
|
-
:propsObj="{
|
|
100
|
-
btnType: 'default',
|
|
101
|
-
icon:'md-add'
|
|
102
|
-
}"
|
|
103
|
-
@click.native.stop="addLabel"
|
|
104
|
-
>
|
|
105
|
-
添加选项
|
|
106
|
-
</bri-button>
|
|
107
|
-
</div>
|
|
108
|
-
</DropdownMenu>
|
|
109
|
-
</template>
|
|
110
|
-
</Dropdown>
|
|
112
|
+
</DropdownMenu>
|
|
113
|
+
</template>
|
|
114
|
+
</Dropdown>
|
|
115
|
+
</template>
|
|
111
116
|
|
|
112
|
-
<!--
|
|
117
|
+
<!-- 查看 -->
|
|
113
118
|
<template v-else>
|
|
114
119
|
<bri-tooltip
|
|
115
120
|
:content="showValStr"
|
|
116
121
|
maxWidth="200"
|
|
117
122
|
:transfer="true"
|
|
118
123
|
>
|
|
119
|
-
<div :class="
|
|
124
|
+
<div :class="{
|
|
125
|
+
...commonClass,
|
|
126
|
+
'BriLabels-show': true
|
|
127
|
+
}">
|
|
120
128
|
<dsh-tags
|
|
121
129
|
v-if="!$isEmptyData(val)"
|
|
122
|
-
class="
|
|
130
|
+
class="text"
|
|
123
131
|
:list="val"
|
|
124
132
|
:propsObj="{
|
|
125
133
|
closable: false
|
|
126
134
|
}"
|
|
127
135
|
>
|
|
128
|
-
<span slot-scope="{ tagItem }">
|
|
136
|
+
<span slot-scope="{ tagItem }">
|
|
137
|
+
{{ tagItem.name }}
|
|
138
|
+
</span>
|
|
129
139
|
</dsh-tags>
|
|
140
|
+
|
|
130
141
|
<template v-else>
|
|
131
142
|
{{ emptyShowVal }}
|
|
132
143
|
</template>
|
|
@@ -141,7 +152,9 @@
|
|
|
141
152
|
|
|
142
153
|
export default {
|
|
143
154
|
name: "BriLabels",
|
|
144
|
-
mixins: [
|
|
155
|
+
mixins: [
|
|
156
|
+
controlMixin
|
|
157
|
+
],
|
|
145
158
|
data () {
|
|
146
159
|
return {
|
|
147
160
|
listData: [],
|
|
@@ -157,31 +170,28 @@
|
|
|
157
170
|
...this.commonDealPropsObj
|
|
158
171
|
};
|
|
159
172
|
},
|
|
160
|
-
modKey () {
|
|
161
|
-
return this.selfPropsObj.modKey;
|
|
162
|
-
},
|
|
163
173
|
val: {
|
|
164
174
|
get () {
|
|
165
|
-
return this.value[this.
|
|
175
|
+
return this.value[this.controlKey] || [];
|
|
166
176
|
},
|
|
167
177
|
set (val) {
|
|
168
|
-
this.value[this.
|
|
178
|
+
this.value[this.controlKey] = val;
|
|
169
179
|
}
|
|
170
180
|
},
|
|
181
|
+
|
|
182
|
+
isCore () {
|
|
183
|
+
return this.selfPropsObj.isCore;
|
|
184
|
+
},
|
|
171
185
|
showValStr () {
|
|
172
186
|
let valArr = this.val && this.val.map(item => item.name);
|
|
173
187
|
return valArr && valArr.join("、");
|
|
174
|
-
},
|
|
175
|
-
isCore () {
|
|
176
|
-
return this.propsObj.isCore;
|
|
177
188
|
}
|
|
178
189
|
},
|
|
179
|
-
created () {
|
|
180
|
-
},
|
|
190
|
+
created () {},
|
|
181
191
|
methods: {
|
|
182
192
|
init () {
|
|
183
193
|
if (this.isCore) {
|
|
184
|
-
this.listData = this.
|
|
194
|
+
this.listData = this.selfPropsObj._originLabels.map(item => {
|
|
185
195
|
return {
|
|
186
196
|
...item,
|
|
187
197
|
isEdit: false
|
|
@@ -191,34 +201,7 @@
|
|
|
191
201
|
this.getListData();
|
|
192
202
|
}
|
|
193
203
|
},
|
|
194
|
-
|
|
195
|
-
this.$https({
|
|
196
|
-
url: {
|
|
197
|
-
module: "sheet",
|
|
198
|
-
name: "memberAll"
|
|
199
|
-
},
|
|
200
|
-
params: {
|
|
201
|
-
search: {
|
|
202
|
-
entityKey: this.entityKey, // 当前工作表关联的数据表Key
|
|
203
|
-
fieldKey: this.selfPropsObj._key === "_default" ? this.value._key : (this.selfPropsObj.__realKey__ || this.selfPropsObj._key), // 当前字段Key
|
|
204
|
-
labelType: this.selfPropsObj._labelType,
|
|
205
|
-
modKey: this.modKey
|
|
206
|
-
},
|
|
207
|
-
pagination: {
|
|
208
|
-
page: 1,
|
|
209
|
-
pagesize: 999
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
callback: data => {
|
|
213
|
-
this.listData = data.list.map(item => {
|
|
214
|
-
return {
|
|
215
|
-
...item,
|
|
216
|
-
isEdit: false
|
|
217
|
-
};
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
},
|
|
204
|
+
|
|
222
205
|
clickInput () {
|
|
223
206
|
if (!this.finalCanEdit) return;
|
|
224
207
|
if (!this.renderList) {
|
|
@@ -232,31 +215,32 @@
|
|
|
232
215
|
this.inputIcon = "ios-arrow-down";
|
|
233
216
|
}
|
|
234
217
|
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
this.val = this.val.filter(i => i._key != item._key);
|
|
238
|
-
} else {
|
|
239
|
-
this.val.push(item);
|
|
240
|
-
}
|
|
241
|
-
this.change();
|
|
218
|
+
clickEditInput (e) {
|
|
219
|
+
e.stopPropagation();
|
|
242
220
|
},
|
|
243
|
-
|
|
221
|
+
clickEditIcon (item) {
|
|
244
222
|
item.isEdit = true;
|
|
245
223
|
this.$forceUpdate();
|
|
246
224
|
},
|
|
247
|
-
|
|
248
|
-
e.stopPropagation();
|
|
249
|
-
},
|
|
250
|
-
confirmEdit (item) {
|
|
225
|
+
clickConfirm (item) {
|
|
251
226
|
if (item.name == "") return;
|
|
252
227
|
item.isEdit = false;
|
|
253
228
|
this.$forceUpdate();
|
|
254
229
|
this.change();
|
|
255
230
|
},
|
|
256
|
-
|
|
231
|
+
|
|
232
|
+
clickItem (item) {
|
|
233
|
+
if (this.val.findIndex(i => i._key == item._key) > -1) {
|
|
234
|
+
this.val = this.val.filter(i => i._key != item._key);
|
|
235
|
+
} else {
|
|
236
|
+
this.val.push(item);
|
|
237
|
+
}
|
|
238
|
+
this.change();
|
|
239
|
+
},
|
|
240
|
+
clickDeleteItem (item) {
|
|
257
241
|
this.change();
|
|
258
242
|
},
|
|
259
|
-
|
|
243
|
+
clickAddItem () {
|
|
260
244
|
this.listData.push({
|
|
261
245
|
_key: this.$randomB36("Labels"),
|
|
262
246
|
isEdit: true,
|
|
@@ -264,9 +248,37 @@
|
|
|
264
248
|
labelType: this.selfPropsObj._labelType
|
|
265
249
|
});
|
|
266
250
|
this.change();
|
|
251
|
+
},
|
|
252
|
+
|
|
253
|
+
// 接口 -获取列表数据
|
|
254
|
+
getListData () {
|
|
255
|
+
this.$https({
|
|
256
|
+
url: {
|
|
257
|
+
module: "sheet",
|
|
258
|
+
name: "memberAll"
|
|
259
|
+
},
|
|
260
|
+
params: {
|
|
261
|
+
search: {
|
|
262
|
+
entityKey: this.entityKey, // 当前工作表关联的数据表Key
|
|
263
|
+
fieldKey: this.selfPropsObj._key === "_default" ? this.value._key : (this.selfPropsObj.__realKey__ || this.selfPropsObj._key), // 当前字段Key
|
|
264
|
+
labelType: this.selfPropsObj._labelType,
|
|
265
|
+
modKey: this.modKey
|
|
266
|
+
},
|
|
267
|
+
pagination: {
|
|
268
|
+
page: 1,
|
|
269
|
+
pagesize: 999
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
callback: data => {
|
|
273
|
+
this.listData = data.list.map(item => {
|
|
274
|
+
return {
|
|
275
|
+
...item,
|
|
276
|
+
isEdit: false
|
|
277
|
+
};
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
});
|
|
267
281
|
}
|
|
268
|
-
},
|
|
269
|
-
watch: {
|
|
270
282
|
}
|
|
271
283
|
};
|
|
272
284
|
</script>
|