bri-components 1.2.20 → 1.2.22
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/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +7 -7
- package/lib/styles/bri-components.css +1 -1
- package/package.json +1 -1
- package/src/abolish/DshFlatTable.vue +6 -6
- 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/controls/senior/selectDepartments.vue +2 -1
- package/src/components/controls/senior/selectUsers/selectUsers.vue +6 -2
- package/src/components/form/DshAdvSearchForm.vue +9 -7
- package/src/components/form/DshDefaultSearch.vue +2 -2
- package/src/components/form/DshForm.vue +14 -10
- package/src/components/form/searchMixin.js +16 -7
- package/src/components/list/BriFlatTable.vue +8 -4
- package/src/components/list/BriTable.vue +1 -0
- package/src/components/list/DshBox/DshCard.vue +2 -2
- package/src/components/list/DshBox/DshCrossTable.vue +4 -4
- package/src/components/list/DshBox/DshList.vue +3 -15
- package/src/components/list/DshBox/DshPanel.vue +2 -2
- package/src/components/list/DshCascaderTable.vue +4 -4
- package/src/components/other/BriIframe.vue +11 -4
- package/src/components/small/BriButton.vue +11 -5
- package/src/components/small/{DshTdRender.js → DshListRender.js} +1 -1
- package/src/components/unit/{DshFormItem.vue → DshFormUnit.vue} +13 -13
- package/src/components/unit/{DshUnit.vue → DshListUnit.vue} +14 -5
- package/src/components/unit/unitMixin.js +2 -5
- package/src/index.js +11 -9
- package/src/styles/components/form/DshAdvSearchForm.less +2 -2
- package/src/styles/components/form/DshDefaultSearch.less +4 -4
- package/src/styles/components/form/DshForm.less +3 -2
- package/src/styles/components/index.less +2 -2
- package/src/styles/components/small/DshModal.less +66 -60
- package/src/styles/components/unit/{DshFormItem.less → DshFormUnit.less} +4 -4
- package/src/styles/components/unit/DshListUnit.less +3 -0
- package/src/utils/table.js +1 -1
- package/src/styles/components/unit/DshUnit.less +0 -5
|
@@ -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>
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
<!-- 表格查看 -->
|
|
27
27
|
<div
|
|
28
28
|
v-else-if="isUnitShow"
|
|
29
|
-
class="
|
|
29
|
+
:class="{
|
|
30
|
+
...commonClass,
|
|
31
|
+
'selectUsers-unit': true
|
|
32
|
+
}"
|
|
30
33
|
>
|
|
31
34
|
<template v-if="!$isEmptyData(curValList)">
|
|
32
35
|
<img
|
|
@@ -411,7 +414,8 @@
|
|
|
411
414
|
search: {
|
|
412
415
|
realname: this.searchData.name
|
|
413
416
|
? {
|
|
414
|
-
|
|
417
|
+
$regex: `.*${this.$speciaWord(this.searchData.name)}.*`,
|
|
418
|
+
$options: "i"
|
|
415
419
|
}
|
|
416
420
|
: undefined
|
|
417
421
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
44
|
<!-- field 正常模式 -->
|
|
45
|
-
<dsh-
|
|
45
|
+
<dsh-form-unit
|
|
46
46
|
v-else-if="['field', undefined].includes(conditionItem.logic)"
|
|
47
47
|
:key="`${conditionItem._id}field`"
|
|
48
48
|
class="DshAdvSearchForm-conditions-item"
|
|
@@ -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>
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
:list="$getOperationList(['deleteContion'])"
|
|
133
133
|
@click="$dispatchEvent($event, conditionItem, conditionIndex, value.conditions)"
|
|
134
134
|
/>
|
|
135
|
-
</dsh-
|
|
135
|
+
</dsh-form-unit>
|
|
136
136
|
|
|
137
137
|
<!-- text 关键字的模式 -->
|
|
138
138
|
<div
|
|
@@ -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);
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
:key="conditionItem._id"
|
|
20
20
|
:span="conditionItem.formItem._span"
|
|
21
21
|
>
|
|
22
|
-
<dsh-
|
|
22
|
+
<dsh-form-unit
|
|
23
23
|
:key="conditionItem._id"
|
|
24
24
|
class="DshDefaultSearch-item"
|
|
25
25
|
:formData="conditionItem"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
>
|
|
36
36
|
{{ conditionItem.formItem._name }}
|
|
37
37
|
</span>
|
|
38
|
-
</dsh-
|
|
38
|
+
</dsh-form-unit>
|
|
39
39
|
</Col>
|
|
40
40
|
|
|
41
41
|
<!-- 换行 -->
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
:prop="formItem._key"
|
|
21
21
|
@click.native="clickControl(formItem)"
|
|
22
22
|
>
|
|
23
|
-
<dsh-
|
|
23
|
+
<dsh-form-unit
|
|
24
24
|
ref="dshFormItem"
|
|
25
25
|
:canEdit="canEdit"
|
|
26
26
|
:formData="formData"
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
:rowStyle="rowStyle"
|
|
32
32
|
:labelStyle="labelStyle"
|
|
33
33
|
:formControlClass="formControlClass"
|
|
34
|
-
@change="change(
|
|
35
|
-
@refChange="refChange(
|
|
34
|
+
@change="change(arguments)"
|
|
35
|
+
@refChange="refChange(arguments)"
|
|
36
36
|
@changeField="changeField"
|
|
37
37
|
>
|
|
38
38
|
<slot
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
:formData="formData"
|
|
69
69
|
:allFormList="allFormList"
|
|
70
70
|
></slot>
|
|
71
|
-
</dsh-
|
|
71
|
+
</dsh-form-unit>
|
|
72
72
|
</FormItem>
|
|
73
73
|
</i-col>
|
|
74
74
|
|
|
@@ -90,9 +90,13 @@
|
|
|
90
90
|
</template>
|
|
91
91
|
|
|
92
92
|
<script>
|
|
93
|
+
import DshFormUnit from "../unit/DshFormUnit.vue";
|
|
94
|
+
|
|
93
95
|
export default {
|
|
94
96
|
name: "DshForm",
|
|
95
|
-
components: {
|
|
97
|
+
components: {
|
|
98
|
+
DshFormUnit
|
|
99
|
+
},
|
|
96
100
|
props: {
|
|
97
101
|
canEdit: {
|
|
98
102
|
type: Boolean,
|
|
@@ -214,13 +218,13 @@
|
|
|
214
218
|
this.$emit("changeField", ...params);
|
|
215
219
|
},
|
|
216
220
|
// 发生改动
|
|
217
|
-
change (
|
|
218
|
-
this.forceFormValidate(
|
|
219
|
-
this.$emit("change",
|
|
221
|
+
change (params) {
|
|
222
|
+
this.forceFormValidate(...params);
|
|
223
|
+
this.$emit("change", ...params);
|
|
220
224
|
},
|
|
221
225
|
// 关联表相关的change
|
|
222
|
-
refChange (
|
|
223
|
-
this.$emit("refChange",
|
|
226
|
+
refChange (params) {
|
|
227
|
+
this.$emit("refChange", ...params);
|
|
224
228
|
},
|
|
225
229
|
|
|
226
230
|
/* -------- 工具类 -------- */
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import DshFormUnit from "../unit/DshFormUnit.vue";
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
|
-
components: {
|
|
4
|
+
components: {
|
|
5
|
+
DshFormUnit
|
|
6
|
+
},
|
|
3
7
|
props: {
|
|
4
8
|
formList: {
|
|
5
9
|
type: Array,
|
|
@@ -155,13 +159,18 @@ export default {
|
|
|
155
159
|
};
|
|
156
160
|
},
|
|
157
161
|
|
|
158
|
-
// operator
|
|
162
|
+
// 处理operator为子集subSearch\subTableSearch,1.subTableSearch为flatTable类型,使用_subForm;2.subSearch为reference类型,请求form
|
|
159
163
|
dealSubSearch (conditionItem) {
|
|
160
|
-
if (conditionItem.fieldOperator === "subSearch"
|
|
161
|
-
|
|
162
|
-
conditionItem.
|
|
163
|
-
|
|
164
|
-
|
|
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;
|
|
165
174
|
}
|
|
166
175
|
},
|
|
167
176
|
// 加载 reference数据
|
|
@@ -20,8 +20,13 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script>
|
|
23
|
+
import DshListUnit from "../unit/DshListUnit.vue";
|
|
24
|
+
|
|
23
25
|
export default {
|
|
24
26
|
name: "BriFlatTable",
|
|
27
|
+
components: {
|
|
28
|
+
DshListUnit
|
|
29
|
+
},
|
|
25
30
|
props: {
|
|
26
31
|
canEdit: {
|
|
27
32
|
type: Boolean,
|
|
@@ -199,7 +204,7 @@
|
|
|
199
204
|
placement: "top"
|
|
200
205
|
},
|
|
201
206
|
scopedSlots: {
|
|
202
|
-
default: props => h("dsh-unit", {
|
|
207
|
+
default: props => h("dsh-list-unit", {
|
|
203
208
|
props: {
|
|
204
209
|
canEdit: this.getUnitCanEdit(column, row),
|
|
205
210
|
formData: row,
|
|
@@ -214,7 +219,7 @@
|
|
|
214
219
|
})
|
|
215
220
|
}
|
|
216
221
|
})
|
|
217
|
-
: h("dsh-unit", {
|
|
222
|
+
: h("dsh-list-unit", {
|
|
218
223
|
props: {
|
|
219
224
|
canEdit: this.getUnitCanEdit(column, row),
|
|
220
225
|
formData: row,
|
|
@@ -337,8 +342,7 @@
|
|
|
337
342
|
: {};
|
|
338
343
|
}
|
|
339
344
|
},
|
|
340
|
-
created () {
|
|
341
|
-
},
|
|
345
|
+
created () {},
|
|
342
346
|
methods: {
|
|
343
347
|
// 共外部使用
|
|
344
348
|
validate () {
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
|
|
65
65
|
<!-- 右 val -->
|
|
66
66
|
<div class="unit-value dsh-ellipsis">
|
|
67
|
-
<dsh-
|
|
67
|
+
<dsh-list-render
|
|
68
68
|
v-if="colItem.renderBodyCell"
|
|
69
69
|
:row="dataItem"
|
|
70
70
|
:column="colItem"
|
|
71
71
|
:index="0"
|
|
72
72
|
:render="colItem.renderBodyCell"
|
|
73
|
-
></dsh-
|
|
73
|
+
></dsh-list-render>
|
|
74
74
|
|
|
75
75
|
<div
|
|
76
76
|
v-else-if="colItem.formatter"
|
|
@@ -276,11 +276,11 @@
|
|
|
276
276
|
v-if="colItem.renderBodyCell"
|
|
277
277
|
class="td-content"
|
|
278
278
|
>
|
|
279
|
-
<dsh-
|
|
279
|
+
<dsh-list-render
|
|
280
280
|
:row="dataItem"
|
|
281
281
|
:index="dataIndex"
|
|
282
282
|
:render="colItem.renderBodyCell"
|
|
283
|
-
></dsh-
|
|
283
|
+
></dsh-list-render>
|
|
284
284
|
</div>
|
|
285
285
|
|
|
286
286
|
<div
|
|
@@ -320,11 +320,11 @@
|
|
|
320
320
|
}"
|
|
321
321
|
>
|
|
322
322
|
<div class="td-content">
|
|
323
|
-
<dsh-
|
|
323
|
+
<dsh-list-render
|
|
324
324
|
:row="dataItem"
|
|
325
325
|
:index="dataIndex"
|
|
326
326
|
:render="operationCol.renderBodyCell"
|
|
327
|
-
></dsh-
|
|
327
|
+
></dsh-list-render>
|
|
328
328
|
</div>
|
|
329
329
|
</td>
|
|
330
330
|
</tr>
|
|
@@ -127,14 +127,14 @@
|
|
|
127
127
|
}"
|
|
128
128
|
>
|
|
129
129
|
<div class="row-item-inner dsh-ellipsis">
|
|
130
|
-
<dsh-
|
|
130
|
+
<dsh-list-render
|
|
131
131
|
v-if="col.renderBodyCell"
|
|
132
132
|
class="ms-ellipsis"
|
|
133
133
|
:row="row"
|
|
134
134
|
:column="col"
|
|
135
135
|
:index="index"
|
|
136
136
|
:render="col.renderBodyCell"
|
|
137
|
-
></dsh-
|
|
137
|
+
></dsh-list-render>
|
|
138
138
|
|
|
139
139
|
<template v-else-if="col.formatter">
|
|
140
140
|
<div v-html="col.formatter(row, index)"></div>
|
|
@@ -150,15 +150,6 @@
|
|
|
150
150
|
>
|
|
151
151
|
<div class="list-tooltip-box">{{ row[col._key] }}</div>
|
|
152
152
|
</Tooltip>
|
|
153
|
-
|
|
154
|
-
<!-- <dsh-unit
|
|
155
|
-
:key="col._key"
|
|
156
|
-
:canEdit="false"
|
|
157
|
-
:formData="row"
|
|
158
|
-
:formItem="col"
|
|
159
|
-
:rowIndex="index"
|
|
160
|
-
@change="change(row, col, arguments)"
|
|
161
|
-
></dsh-unit> -->
|
|
162
153
|
</div>
|
|
163
154
|
</div>
|
|
164
155
|
</div>
|
|
@@ -178,13 +169,10 @@
|
|
|
178
169
|
</template>
|
|
179
170
|
|
|
180
171
|
<script>
|
|
181
|
-
// import DshUnit from "../../unit/DshUnit.vue";
|
|
182
172
|
|
|
183
173
|
export default {
|
|
184
174
|
name: "DshList",
|
|
185
|
-
components: {
|
|
186
|
-
// DshUnit
|
|
187
|
-
},
|
|
175
|
+
components: {},
|
|
188
176
|
props: {
|
|
189
177
|
isLoading: {
|
|
190
178
|
type: Boolean,
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
|
|
103
103
|
<!-- 右 val -->
|
|
104
104
|
<div class="unit-value dsh-ellipsis">
|
|
105
|
-
<dsh-
|
|
105
|
+
<dsh-list-render
|
|
106
106
|
v-if="colItem.renderBodyCell"
|
|
107
107
|
:row="dataItem"
|
|
108
108
|
:column="colItem"
|
|
109
109
|
:index="0"
|
|
110
110
|
:render="colItem.renderBodyCell"
|
|
111
|
-
></dsh-
|
|
111
|
+
></dsh-list-render>
|
|
112
112
|
|
|
113
113
|
<div
|
|
114
114
|
v-else-if="colItem.formatter"
|
|
@@ -149,13 +149,13 @@
|
|
|
149
149
|
:key="col._key + ''"
|
|
150
150
|
:style="getTdStyle(col, row)"
|
|
151
151
|
>
|
|
152
|
-
<dsh-unit
|
|
152
|
+
<dsh-list-unit
|
|
153
153
|
:canEdit="canEdit"
|
|
154
154
|
:rowIndex="rowIndex"
|
|
155
155
|
:formData="row[col.nodeKey]"
|
|
156
156
|
:formItem="col"
|
|
157
157
|
@change="$dispatchEvent(operationMap.changeVal, col, row, arguments)"
|
|
158
|
-
></dsh-unit>
|
|
158
|
+
></dsh-list-unit>
|
|
159
159
|
</td>
|
|
160
160
|
</template>
|
|
161
161
|
</tr>
|
|
@@ -178,12 +178,12 @@
|
|
|
178
178
|
</template>
|
|
179
179
|
|
|
180
180
|
<script>
|
|
181
|
-
import
|
|
181
|
+
import DshListUnit from "../unit/DshListUnit.vue";
|
|
182
182
|
|
|
183
183
|
export default {
|
|
184
184
|
name: "DshCascaderTable",
|
|
185
185
|
components: {
|
|
186
|
-
|
|
186
|
+
DshListUnit
|
|
187
187
|
},
|
|
188
188
|
props: {
|
|
189
189
|
useCol: {
|
|
@@ -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: {} };
|
|
@@ -19,10 +19,8 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
|
-
import controlMixin from "../controls/controlMixin.js";
|
|
23
22
|
export default {
|
|
24
23
|
name: "BriButton",
|
|
25
|
-
mixins: [controlMixin],
|
|
26
24
|
props: {
|
|
27
25
|
type: {
|
|
28
26
|
type: String,
|
|
@@ -31,15 +29,22 @@
|
|
|
31
29
|
icon: String,
|
|
32
30
|
shape: String,
|
|
33
31
|
size: String,
|
|
34
|
-
customIcon: String
|
|
32
|
+
customIcon: String,
|
|
33
|
+
|
|
34
|
+
propsObj: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default () {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
35
40
|
},
|
|
36
41
|
data () {
|
|
37
42
|
return {};
|
|
38
43
|
},
|
|
39
44
|
computed: {
|
|
40
45
|
selfPropsObj () {
|
|
41
|
-
|
|
42
|
-
let setType =
|
|
46
|
+
const defaultType = this.propsObj.btnType || this.type;
|
|
47
|
+
let setType = defaultType;
|
|
43
48
|
if (["cancel"].includes(defaultType)) {
|
|
44
49
|
setType = "primary";
|
|
45
50
|
} else if (["errorLine", "primaryLine"].includes(defaultType)) {
|
|
@@ -47,6 +52,7 @@
|
|
|
47
52
|
} else if (["linkText", "primaryText", "errorText"].includes(defaultType)) {
|
|
48
53
|
setType = "text";
|
|
49
54
|
}
|
|
55
|
+
|
|
50
56
|
return {
|
|
51
57
|
class: ["cancel", "linkText", "primaryText", "errorLine", "errorText", "primaryLine"].includes(defaultType) ? `ivu-btn-${defaultType}` : "",
|
|
52
58
|
...this.propsObj,
|