bri-components 1.2.21 → 1.2.23
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/1.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +4 -4
- package/package.json +1 -1
- package/src/components/controls/base/DshInput.vue +3 -8
- package/src/components/controls/controlMixin.js +4 -4
- package/src/components/controls/senior/flatTable.vue +58 -50
- package/src/components/form/DshAdvSearchForm.vue +7 -5
- package/src/components/form/searchMixin.js +11 -6
- package/src/components/list/DshBox/DshTable.vue +5 -2
- package/src/components/other/BriIframe.vue +11 -4
- package/src/styles/components/form/DshAdvSearchForm.less +1 -1
- package/src/styles/components/small/DshModal.less +0 -6
package/package.json
CHANGED
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
>
|
|
56
56
|
<div :class="{
|
|
57
57
|
...commonClass,
|
|
58
|
-
'dsh-ellipsis': unitWrap,
|
|
59
58
|
'DshInput-unit': isUnitShow,
|
|
60
59
|
'DshInput-show': !isUnitShow
|
|
61
60
|
}">
|
|
@@ -96,21 +95,20 @@
|
|
|
96
95
|
computed: {
|
|
97
96
|
selfPropsObj () {
|
|
98
97
|
return {
|
|
99
|
-
_textType: "default",
|
|
98
|
+
_textType: "default", // ["default", "url"]
|
|
100
99
|
_readonly: ["serialNumber"].includes(this.controlType),
|
|
101
100
|
_disabled: ["serialNumber"].includes(this.controlType),
|
|
102
101
|
_showWordLimit: this.propsObj._showWordLimit || (!!this.propsObj._maxlength || this.propsObj._maxlength === 0),
|
|
103
102
|
_autosize: {
|
|
104
103
|
minRows: 2
|
|
105
104
|
},
|
|
106
|
-
_wrap: true, // 单元格文字换行
|
|
107
105
|
|
|
108
106
|
...this.propsObj,
|
|
109
107
|
...this.commonDealPropsObj
|
|
110
108
|
};
|
|
111
109
|
},
|
|
112
110
|
inputType () {
|
|
113
|
-
return ["textarea", "
|
|
111
|
+
return ["textarea", "email", "password", "url", "number", "tel"].includes(this.controlType)
|
|
114
112
|
? this.controlType
|
|
115
113
|
: ["text"].includes(this.controlType) && ["url"].includes(this.subType)
|
|
116
114
|
? "url"
|
|
@@ -121,9 +119,6 @@
|
|
|
121
119
|
// 子类型,只在type="text"有效
|
|
122
120
|
subType () {
|
|
123
121
|
return this.selfPropsObj._textType;
|
|
124
|
-
},
|
|
125
|
-
unitWrap () {
|
|
126
|
-
return !(this.isUnitShow && !!this.selfPropsObj._wrap);
|
|
127
122
|
}
|
|
128
123
|
},
|
|
129
124
|
created () {},
|
|
@@ -163,7 +158,7 @@
|
|
|
163
158
|
// 超链接跳转
|
|
164
159
|
goHttpWindow (e) {
|
|
165
160
|
e.stopPropagation();
|
|
166
|
-
|
|
161
|
+
this.$postOpenLink(this.curVal);
|
|
167
162
|
}
|
|
168
163
|
}
|
|
169
164
|
};
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
return {
|
|
92
92
|
// TODO: 此处的请输入可能还有请选择之类的,待处理
|
|
93
93
|
_placeholder: this.canEdit && this.propsObj._enterType !== "calculate"
|
|
94
|
-
? (this.propsObj._placeholder || `请${selectControlTypes.includes(this.
|
|
94
|
+
? (this.propsObj._placeholder || `请${selectControlTypes.includes(this.controlType) ? "选择" : "输入"}${this.propsObj._name}`)
|
|
95
95
|
: undefined,
|
|
96
96
|
_clearable: this.finalCanEdit && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable)
|
|
97
97
|
};
|
|
@@ -100,10 +100,10 @@ export default {
|
|
|
100
100
|
return {
|
|
101
101
|
"bri-control-edit": this.canEdit && this.finalCanEdit,
|
|
102
102
|
"bri-control-disabled": this.canEdit && !this.finalCanEdit,
|
|
103
|
-
"bri-control-unit": !this.canEdit && this.
|
|
104
|
-
"bri-control-show": !this.canEdit && !this.
|
|
103
|
+
"bri-control-unit": !this.canEdit && this.isInTable,
|
|
104
|
+
"bri-control-show": !this.canEdit && !this.isInTable,
|
|
105
105
|
|
|
106
|
-
"dsh-ellipsis":
|
|
106
|
+
"dsh-ellipsis": !(this.isUnitShow && !!this.propsObj._unitWrap),
|
|
107
107
|
"bri-control-nodata": this.$isEmptyData(this.curVal)
|
|
108
108
|
};
|
|
109
109
|
},
|
|
@@ -1,61 +1,51 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flatTable">
|
|
3
|
-
<!--
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
8
|
-
<dsh-icons :list="[{
|
|
9
|
-
customIcon: 'bico-internaltable'
|
|
10
|
-
}]"></dsh-icons>
|
|
11
|
-
<span class="flatTable-unit-text">
|
|
12
|
-
{{ curVal.list.length }}行
|
|
13
|
-
</span>
|
|
14
|
-
</span>
|
|
3
|
+
<!-- 多选模式 -->
|
|
4
|
+
<template v-if="multipleMode">
|
|
5
|
+
<!-- 暂时不写内容 -->
|
|
6
|
+
</template>
|
|
15
7
|
|
|
8
|
+
<!-- 单选模式 -->
|
|
16
9
|
<template v-else>
|
|
17
|
-
<!--
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</dsh-btn-modal>
|
|
10
|
+
<!-- 查看 单元格内 -->
|
|
11
|
+
<template v-if="isUnitShow">
|
|
12
|
+
<span class="flatTable-unit">
|
|
13
|
+
<dsh-icons :list="[{
|
|
14
|
+
customIcon: 'bico-internaltable'
|
|
15
|
+
}]"></dsh-icons>
|
|
16
|
+
<span class="flatTable-unit-text">
|
|
17
|
+
{{ curVal.list.length }}行
|
|
18
|
+
</span>
|
|
19
|
+
</span>
|
|
20
|
+
</template>
|
|
29
21
|
|
|
30
|
-
<!--
|
|
22
|
+
<!-- 编辑、查看(查看页内) -->
|
|
31
23
|
<template v-else>
|
|
32
|
-
<!--
|
|
33
|
-
<dsh-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
<!-- 配置端 设置默认值用-->
|
|
25
|
+
<dsh-btn-modal v-if="propsObj._key === '_default'">
|
|
26
|
+
<bri-flat-table
|
|
27
|
+
:canEdit="finalCanEdit"
|
|
28
|
+
:columns="columns"
|
|
29
|
+
:data="curVal.list"
|
|
30
|
+
:rowDefault="curVal.rowDefault"
|
|
31
|
+
:outObj="value"
|
|
32
|
+
:propsObj="propsObj"
|
|
33
|
+
@change="change"
|
|
34
|
+
></bri-flat-table>
|
|
35
|
+
</dsh-btn-modal>
|
|
39
36
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
@change="change"
|
|
50
|
-
></bri-flat-table>
|
|
37
|
+
<!-- 正常使用 -->
|
|
38
|
+
<template v-else>
|
|
39
|
+
<!-- 操作按钮 -->
|
|
40
|
+
<dsh-buttons
|
|
41
|
+
class="flatTable-btns"
|
|
42
|
+
itemClass="flatTable-btns-item"
|
|
43
|
+
:list="$getOperationList(['canEnlarge'])"
|
|
44
|
+
@click="$dispatchEvent($event)"
|
|
45
|
+
></dsh-buttons>
|
|
51
46
|
|
|
52
|
-
<!-- 全屏查看 -->
|
|
53
|
-
<dsh-modal
|
|
54
|
-
v-model="isEnlarge"
|
|
55
|
-
mode="custom"
|
|
56
|
-
:propsObj="modalPropsObj"
|
|
57
|
-
>
|
|
58
47
|
<bri-flat-table
|
|
48
|
+
ref="dshFatTable"
|
|
59
49
|
:canEdit="finalCanEdit"
|
|
60
50
|
:columns="columns"
|
|
61
51
|
:data="curVal.list"
|
|
@@ -65,7 +55,25 @@
|
|
|
65
55
|
:propsObj="propsObj"
|
|
66
56
|
@change="change"
|
|
67
57
|
></bri-flat-table>
|
|
68
|
-
|
|
58
|
+
|
|
59
|
+
<!-- 全屏查看 -->
|
|
60
|
+
<dsh-modal
|
|
61
|
+
v-model="isEnlarge"
|
|
62
|
+
mode="custom"
|
|
63
|
+
:propsObj="modalPropsObj"
|
|
64
|
+
>
|
|
65
|
+
<bri-flat-table
|
|
66
|
+
:canEdit="finalCanEdit"
|
|
67
|
+
:columns="columns"
|
|
68
|
+
:data="curVal.list"
|
|
69
|
+
:oldData="curVal.oldList"
|
|
70
|
+
:rowDefault="curVal.rowDefault"
|
|
71
|
+
:outObj="value"
|
|
72
|
+
:propsObj="propsObj"
|
|
73
|
+
@change="change"
|
|
74
|
+
></bri-flat-table>
|
|
75
|
+
</dsh-modal>
|
|
76
|
+
</template>
|
|
69
77
|
</template>
|
|
70
78
|
</template>
|
|
71
79
|
</div>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
>
|
|
54
54
|
<template v-if="!conditionItem.__isDelete__">
|
|
55
55
|
<!-- 子表的筛选,出现是有条件的,递归 -->
|
|
56
|
-
<template v-if="conditionItem.fieldOperator
|
|
56
|
+
<template v-if="['subSearch', 'subTableSearch'].includes(conditionItem.fieldOperator)">
|
|
57
57
|
<dsh-advSearch-form
|
|
58
58
|
v-if="conditionItem.finished === true"
|
|
59
59
|
:isInner="true"
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
@change="change(conditionItem, arguments)"
|
|
85
85
|
></dsh-select>
|
|
86
86
|
|
|
87
|
-
<!--
|
|
87
|
+
<!-- 为空和不为空时 啥不显示 -->
|
|
88
88
|
<div
|
|
89
|
-
v-else-if="['
|
|
89
|
+
v-else-if="['isnull', 'notnull', 'nosize', 'size', 'nolist', 'list'].includes(conditionItem.fieldOperator)"
|
|
90
90
|
class="DshAdvSearchForm-conditions-item-blank"
|
|
91
91
|
>请选择右上角条件</div>
|
|
92
92
|
</template>
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
v-else
|
|
148
148
|
:key="`${conditionItem._id}other`"
|
|
149
149
|
>
|
|
150
|
-
{{ conditionItem.logic }}
|
|
150
|
+
{{ conditionItem.logic }}模式未开发
|
|
151
151
|
</div>
|
|
152
152
|
</template>
|
|
153
153
|
</div>
|
|
@@ -160,6 +160,7 @@
|
|
|
160
160
|
menuClass="DshAdvSearchForm-btns-field-list"
|
|
161
161
|
:list="searchFormList"
|
|
162
162
|
:useSearch="true"
|
|
163
|
+
trigger="click"
|
|
163
164
|
@click="$dispatchEvent(operationMap.createContion, false, $event)"
|
|
164
165
|
>
|
|
165
166
|
<dsh-buttons
|
|
@@ -318,12 +319,13 @@
|
|
|
318
319
|
},
|
|
319
320
|
// 选择某控件的筛选类型
|
|
320
321
|
selectOperator (operationItem, conditionItem, conditionIndex, list, opertorItem) {
|
|
322
|
+
// 重置这些数据
|
|
321
323
|
conditionItem.fieldOperator = opertorItem._key;
|
|
322
324
|
conditionItem.fieldOperatorName = opertorItem.name;
|
|
323
325
|
conditionItem.fieldSearch = {
|
|
324
326
|
logic: "and",
|
|
325
327
|
conditions: []
|
|
326
|
-
};
|
|
328
|
+
};
|
|
327
329
|
this.dealSubSearch(conditionItem);
|
|
328
330
|
|
|
329
331
|
this.change(conditionItem);
|
|
@@ -159,13 +159,18 @@ export default {
|
|
|
159
159
|
};
|
|
160
160
|
},
|
|
161
161
|
|
|
162
|
-
// operator
|
|
162
|
+
// 处理operator为子集subSearch\subTableSearch,1.subTableSearch为flatTable类型,使用_subForm;2.subSearch为reference类型,请求form
|
|
163
163
|
dealSubSearch (conditionItem) {
|
|
164
|
-
if (conditionItem.fieldOperator === "subSearch"
|
|
165
|
-
|
|
166
|
-
conditionItem.
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
if (conditionItem.fieldOperator === "subSearch") {
|
|
165
|
+
if (conditionItem.finished !== true) {
|
|
166
|
+
this.getModData(conditionItem.formItem, data => {
|
|
167
|
+
conditionItem.finished = true;
|
|
168
|
+
conditionItem.subFormList = data.screens[0].form;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
} else if (conditionItem.fieldOperator === "subTableSearch") {
|
|
172
|
+
conditionItem.finished = true;
|
|
173
|
+
conditionItem.subFormList = conditionItem.formItem._subForm;
|
|
169
174
|
}
|
|
170
175
|
},
|
|
171
176
|
// 加载 reference数据
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="DshTable">
|
|
3
3
|
<bri-table
|
|
4
4
|
:data="data"
|
|
5
|
-
:columns="
|
|
5
|
+
:columns="selfColumns2"
|
|
6
6
|
:propsObj="propsObj"
|
|
7
7
|
:isLoading="isLoading"
|
|
8
8
|
:noDataText="noDataText"
|
|
@@ -52,7 +52,9 @@
|
|
|
52
52
|
noDataText: String
|
|
53
53
|
},
|
|
54
54
|
data () {
|
|
55
|
-
return {
|
|
55
|
+
return {
|
|
56
|
+
selfColumns2: []
|
|
57
|
+
};
|
|
56
58
|
},
|
|
57
59
|
computed: {
|
|
58
60
|
multiple () {
|
|
@@ -173,6 +175,7 @@
|
|
|
173
175
|
}
|
|
174
176
|
},
|
|
175
177
|
created () {
|
|
178
|
+
this.selfColumns2 = this.selfColumns;
|
|
176
179
|
},
|
|
177
180
|
methods: {
|
|
178
181
|
// 点击某行
|
|
@@ -20,11 +20,10 @@
|
|
|
20
20
|
>
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
|
-
<
|
|
23
|
+
<bri-loading
|
|
24
24
|
v-if="loading"
|
|
25
|
-
size="large"
|
|
26
25
|
fix
|
|
27
|
-
|
|
26
|
+
/>
|
|
28
27
|
</div>
|
|
29
28
|
</template>
|
|
30
29
|
|
|
@@ -39,7 +38,8 @@
|
|
|
39
38
|
allow: {
|
|
40
39
|
type: String,
|
|
41
40
|
default: "fullscreen"
|
|
42
|
-
}
|
|
41
|
+
},
|
|
42
|
+
postInfo: Object
|
|
43
43
|
},
|
|
44
44
|
data () {
|
|
45
45
|
return {
|
|
@@ -65,15 +65,22 @@
|
|
|
65
65
|
iframe.attachEvent("onreadystatechange", () => {
|
|
66
66
|
if (iframe.readyState === "complete" || iframe.readyState == "loaded") {
|
|
67
67
|
this.loading = false;
|
|
68
|
+
this.$emit("onreadystatechange", iframe);
|
|
68
69
|
}
|
|
69
70
|
});
|
|
70
71
|
} else {
|
|
71
72
|
iframe.addEventListener("load", () => {
|
|
72
73
|
this.loading = false;
|
|
74
|
+
this.postInfo && this.postMessage(iframe);
|
|
75
|
+
this.$emit("load", iframe);
|
|
73
76
|
}, false);
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
},
|
|
80
|
+
// 向内部连接发送信息
|
|
81
|
+
postMessage (iframe) {
|
|
82
|
+
iframe.contentWindow && iframe.contentWindow.postMessage(this.postInfo, "*");
|
|
83
|
+
},
|
|
77
84
|
/**
|
|
78
85
|
* 在iframe页面使用举例:
|
|
79
86
|
* let info = { "status": "success", type: "jumpPage", routerName: "home", params: {}, query: {} };
|
|
@@ -60,8 +60,6 @@
|
|
|
60
60
|
|
|
61
61
|
&-default {
|
|
62
62
|
.ivu-modal-wrap {
|
|
63
|
-
margin: 24px;
|
|
64
|
-
|
|
65
63
|
.ivu-modal {
|
|
66
64
|
width: 750px !important;
|
|
67
65
|
height: 550px !important;
|
|
@@ -113,8 +111,6 @@
|
|
|
113
111
|
|
|
114
112
|
&-middle {
|
|
115
113
|
.ivu-modal-wrap {
|
|
116
|
-
margin: 24px;
|
|
117
|
-
|
|
118
114
|
.ivu-modal {
|
|
119
115
|
// width: 1000px !important;
|
|
120
116
|
// height: 800px !important;
|
|
@@ -140,8 +136,6 @@
|
|
|
140
136
|
|
|
141
137
|
&-large {
|
|
142
138
|
.ivu-modal-wrap {
|
|
143
|
-
margin: 20px;
|
|
144
|
-
|
|
145
139
|
.ivu-modal {
|
|
146
140
|
width: 80% !important;
|
|
147
141
|
height: 90% !important;
|