centaline-data-driven 1.3.40 → 1.3.41
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 +1 -1
- package/src/Form.vue +4 -4
- package/src/centaline/dynamicComboBoxWithTextBox/src/dynamicComboBoxWithTextBox.vue +16 -14
- package/src/centaline/dynamicContact/src/dynamicContact.vue +4 -2
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +164 -9
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +5 -21
- package/src/centaline/dynamicForm/src/dynamicForm.vue +3 -2
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +1 -1
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +11 -9
- package/src/centaline/dynamicIti/src/dynamicIti.vue +4 -4
- package/src/centaline/dynamicL/src/dynamicL.vue +5 -2
- package/src/centaline/dynamicMo/src/dynamicMo.vue +8 -4
- package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchList.vue +2 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +4 -2
- package/src/centaline/dynamicSeg/src/dynamicSeg.vue +10 -0
- package/src/centaline/dynamicSo/src/dynamicSo.vue +8 -4
- package/src/centaline/dynamicSos/src/dynamicSos.vue +8 -4
- package/src/centaline/dynamicSosTt/src/dynamicSosTt.vue +8 -4
- package/src/centaline/dynamicT/src/dynamicT.vue +1 -0
- package/src/centaline/dynamicTags/src/dynamicTags.vue +8 -4
- package/src/centaline/loader/src/ctl/Form.js +43 -36
- package/src/main.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
package/src/Form.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
3
|
<!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
|
|
4
4
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
5
|
-
<ct-form :api="'/api/third-dept-tran/
|
|
5
|
+
<ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
|
|
6
6
|
<!-- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form> -->
|
|
7
7
|
<ct-dialog-list></ct-dialog-list>
|
|
8
8
|
</div>
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
data() {
|
|
15
15
|
return {
|
|
16
16
|
apiParam:{
|
|
17
|
-
actionType:
|
|
18
|
-
|
|
19
|
-
originalTraId: "1552533586416844802",
|
|
17
|
+
actionType: 3,
|
|
18
|
+
originalTraId: "1554357607799558146",
|
|
20
19
|
pageOnly: true,
|
|
21
20
|
pageStyle: 2,
|
|
21
|
+
pageTitle: "成交报告",
|
|
22
22
|
},
|
|
23
23
|
topHeight:10,
|
|
24
24
|
}
|
|
@@ -92,8 +92,10 @@
|
|
|
92
92
|
}
|
|
93
93
|
this.$watch('model.value', (n, o) => {
|
|
94
94
|
if (typeof this.model.child !== 'undefined') {
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
for (var item of this.model.child) {
|
|
96
|
+
item.value = item.defaultValue || '';
|
|
97
|
+
item.text = item.defaultText || '';
|
|
98
|
+
}
|
|
97
99
|
}
|
|
98
100
|
});
|
|
99
101
|
},
|
|
@@ -111,13 +113,11 @@
|
|
|
111
113
|
|
|
112
114
|
}
|
|
113
115
|
},
|
|
114
|
-
maxlength4()
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
return 99999
|
|
116
|
+
maxlength4() {
|
|
117
|
+
if (this.model.max4) {
|
|
118
|
+
return parseInt(this.model.max4)
|
|
119
|
+
}
|
|
120
|
+
return 99999
|
|
121
121
|
|
|
122
122
|
}
|
|
123
123
|
},
|
|
@@ -136,8 +136,10 @@
|
|
|
136
136
|
soChange: function () {
|
|
137
137
|
var self = this;
|
|
138
138
|
if (typeof this.model.child !== 'undefined') {
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
for (var item of this.model.child) {
|
|
140
|
+
item.value = item.defaultValue || '';
|
|
141
|
+
item.text = item.defaultText || '';
|
|
142
|
+
}
|
|
141
143
|
}
|
|
142
144
|
this.inputHandler(self.model.value);
|
|
143
145
|
this.changeHandler(self.model.value);
|
|
@@ -243,7 +245,7 @@
|
|
|
243
245
|
position: relative;
|
|
244
246
|
}
|
|
245
247
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
248
|
+
.ct-combobox-with-textbox .el-input.is-focus .el-input__inner {
|
|
249
|
+
border: 1px solid #409EFF !important;
|
|
250
|
+
}
|
|
249
251
|
</style>
|
|
@@ -132,8 +132,10 @@ export default {
|
|
|
132
132
|
soChange: function () {
|
|
133
133
|
var self = this;
|
|
134
134
|
if (typeof this.model.child !== 'undefined') {
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
for (var item of this.model.child) {
|
|
136
|
+
item.value = item.defaultValue || '';
|
|
137
|
+
item.text = item.defaultText || '';
|
|
138
|
+
}
|
|
137
139
|
}
|
|
138
140
|
var currentOption = this.model.options.find((value) => {
|
|
139
141
|
return self.model.value === value[self.model.optionAttrs.value];
|
|
@@ -212,16 +212,56 @@
|
|
|
212
212
|
</div>
|
|
213
213
|
<div class="tablist-info base-box">
|
|
214
214
|
<div class="details-tabs-box">
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
215
|
+
<!--计算占用宽度-->
|
|
216
|
+
<div style="position: relative">
|
|
217
|
+
<div ref="tabsbox" style="position: absolute; left: -10000px">
|
|
218
|
+
<el-tabs>
|
|
219
|
+
<el-tab-pane v-for="(col, index) in model.tags1" :key="col.appID" :index="index.toString()" :name="index.toString()">
|
|
220
|
+
<div slot="label" v-html="col.appName" :ref="'StatisticsItem' + index"></div>
|
|
221
|
+
</el-tab-pane>
|
|
222
|
+
</el-tabs>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
<!--展示-->
|
|
226
|
+
<div>
|
|
227
|
+
<div v-if="showData.length === 1">
|
|
228
|
+
<el-tabs :value="model.activeIndex1" @tab-click="handleSelect">
|
|
229
|
+
<el-tab-pane v-for="(col, index) in showData[0]" :key="col.appID" :index="index.toString()" :name="index.toString()">
|
|
230
|
+
<div slot="label" v-html="col.appName"></div>
|
|
231
|
+
</el-tab-pane>
|
|
232
|
+
</el-tabs>
|
|
233
|
+
</div>
|
|
234
|
+
<div v-if="showData.length > 1" style="position: relative">
|
|
235
|
+
<el-tabs :value="model.activeIndex1" @tab-click="handleSelect">
|
|
236
|
+
<el-tab-pane v-for="(col, index) in showData[0]" :key="col.appID" :index="index.toString()" :name="index.toString()">
|
|
237
|
+
<div slot="label" v-html="col.appName"></div>
|
|
238
|
+
</el-tab-pane>
|
|
239
|
+
</el-tabs>
|
|
240
|
+
<div class="more-dropdown">
|
|
241
|
+
<el-dropdown trigger="click" placement="bottom">
|
|
242
|
+
<span class="el-dropdown-link svgIcon">
|
|
243
|
+
<!-- <div class="my-icon-more"></div> -->
|
|
244
|
+
<img :src="iconSort" alt="" width="100%" />
|
|
245
|
+
</span>
|
|
246
|
+
<el-dropdown-menu slot="dropdown" class="tabsMore">
|
|
247
|
+
<el-dropdown-item v-for="(col, index) in showData[1]" :key="col.appID" :index="index.toString()"
|
|
248
|
+
:name="index.toString()" :class="{ 'is-active': showData[0].length + index == model.activeIndex1,}">
|
|
249
|
+
<div @click="handleDropDown(col, index)" :value="model.activeIndex1">
|
|
250
|
+
<div slot="label" v-html="col.appName"></div>
|
|
251
|
+
</div>
|
|
252
|
+
</el-dropdown-item>
|
|
253
|
+
</el-dropdown-menu>
|
|
254
|
+
</el-dropdown>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
<ct-searchlist v-if="model.searchConditionApiTags1" :key="'list' + listKey.toString() + refershKey"
|
|
258
|
+
style="min-height: 420px" :apiParam="model.paramDataTags1" :flagFocus="false"
|
|
259
|
+
:searchConditionApi="model.searchConditionApiTags1" :searchDataApi="model.searchDataApiTags1">
|
|
260
|
+
</ct-searchlist>
|
|
261
|
+
</div>
|
|
223
262
|
</div>
|
|
224
|
-
|
|
263
|
+
</div>
|
|
264
|
+
|
|
225
265
|
<div class="contribute-info base-box" v-if="model._commissionList !== null">
|
|
226
266
|
<div class="title-l">贡献人信息</div>
|
|
227
267
|
<div class="contribute-list">
|
|
@@ -523,6 +563,10 @@ export default {
|
|
|
523
563
|
listKey: 0,
|
|
524
564
|
flagDisabledPrev:false,
|
|
525
565
|
flagDisabledNext:false,
|
|
566
|
+
showData: [],
|
|
567
|
+
FlagStatistics: false,
|
|
568
|
+
dropDownSelected: false,
|
|
569
|
+
iconSort: require("../../../assets/sort.png"),
|
|
526
570
|
};
|
|
527
571
|
},
|
|
528
572
|
mounted() {
|
|
@@ -558,6 +602,44 @@ export default {
|
|
|
558
602
|
});
|
|
559
603
|
},
|
|
560
604
|
methods: {
|
|
605
|
+
showStats() {
|
|
606
|
+
var self = this;
|
|
607
|
+
this.$nextTick(function () {
|
|
608
|
+
if (self.model.tags1.length > 0) {
|
|
609
|
+
var showIndex = 0;
|
|
610
|
+
var sumWidth = 0;
|
|
611
|
+
for (var i = 0; i < self.model.tags1.length; i++) {
|
|
612
|
+
var moreWidth = 22;
|
|
613
|
+
|
|
614
|
+
sumWidth = sumWidth + self.$refs["StatisticsItem" + i][0].offsetParent.offsetWidth;
|
|
615
|
+
var nextWidth = 0;
|
|
616
|
+
if (i + 1 < self.model.tags1.length) {
|
|
617
|
+
try {
|
|
618
|
+
nextWidth = self.$refs["StatisticsItem" + (i + 1)][0].offsetParent.offsetWidth;
|
|
619
|
+
} catch (e) { }
|
|
620
|
+
} else {
|
|
621
|
+
moreWidth = 0;
|
|
622
|
+
}
|
|
623
|
+
if (self.model.midlWidth - 42 < sumWidth + moreWidth) {
|
|
624
|
+
showIndex = i;
|
|
625
|
+
break;
|
|
626
|
+
} else if (self.model.midlWidth - 42 < nextWidth + moreWidth) {
|
|
627
|
+
showIndex = i + 1;
|
|
628
|
+
break;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if (showIndex > 0) {
|
|
632
|
+
self.showData = [
|
|
633
|
+
self.model.tags1.slice(0, showIndex),
|
|
634
|
+
self.model.tags1.slice(showIndex),
|
|
635
|
+
];
|
|
636
|
+
} else {
|
|
637
|
+
self.showData = [self.model.tags1];
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
},
|
|
642
|
+
|
|
561
643
|
load(data) {
|
|
562
644
|
var self = this;
|
|
563
645
|
this.model = data;
|
|
@@ -666,6 +748,7 @@ export default {
|
|
|
666
748
|
var w1 = this.$refs.detail.clientWidth | 0;
|
|
667
749
|
var w2 = this.$refs.midr.clientWidth | 0;
|
|
668
750
|
this.model.midlWidth = w1 - w2 - 10;
|
|
751
|
+
this.showStats();
|
|
669
752
|
}
|
|
670
753
|
});
|
|
671
754
|
},
|
|
@@ -681,6 +764,19 @@ export default {
|
|
|
681
764
|
this.model.paramDataTags1 = this.model.tags1[i].paramData || "";
|
|
682
765
|
window.localStorage.setItem("detailtagkey", this.model.tags1[i].appID); //存储
|
|
683
766
|
}
|
|
767
|
+
},
|
|
768
|
+
handleDropDown(key, index) {
|
|
769
|
+
let i = index;
|
|
770
|
+
this.model.activeIndex1 = (this.showData[0].length + i).toString();
|
|
771
|
+
let dropDownData = this.showData[1];
|
|
772
|
+
this.dropDownSelected = true;
|
|
773
|
+
if (dropDownData && dropDownData[i]) {
|
|
774
|
+
this.listKey = this.listKey + 1;
|
|
775
|
+
this.model.searchConditionApiTags1 = dropDownData[i].searchConditionApiUrl || "";
|
|
776
|
+
this.model.searchDataApiTags1 = dropDownData[i].searchDataApiUrl || "";
|
|
777
|
+
this.model.paramDataTags1 = dropDownData[i].paramData || "";
|
|
778
|
+
window.localStorage.setItem("detailtagkey", dropDownData[i].appID); //存储
|
|
779
|
+
}
|
|
684
780
|
},
|
|
685
781
|
fieldClickHandler(field) {
|
|
686
782
|
var self = this;
|
|
@@ -1636,6 +1732,65 @@ export default {
|
|
|
1636
1732
|
.r {
|
|
1637
1733
|
float: right;
|
|
1638
1734
|
}
|
|
1735
|
+
.my-icon-more {
|
|
1736
|
+
width: 14px;
|
|
1737
|
+
height: 15px;
|
|
1738
|
+
border-top: 3px solid rgb(153, 153, 153);
|
|
1739
|
+
border-bottom: 3px solid rgb(153, 153, 153);
|
|
1740
|
+
background-color: rgb(153, 153, 153);
|
|
1741
|
+
padding: 3px 0;
|
|
1742
|
+
background-clip: content-box;
|
|
1743
|
+
cursor: pointer;
|
|
1744
|
+
}
|
|
1745
|
+
>>>.el-tabs__nav-prev {
|
|
1746
|
+
display: none;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
>>>.el-tabs__nav-next {
|
|
1750
|
+
display: none;
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
.more-dropdown {
|
|
1754
|
+
position: absolute;
|
|
1755
|
+
width: 16px;
|
|
1756
|
+
height: 20px;
|
|
1757
|
+
text-align: left;
|
|
1758
|
+
top: 13px;
|
|
1759
|
+
right: -1px;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
.el-dropdown-menu--mini .el-dropdown-menu__item {
|
|
1763
|
+
font-size: 14px;
|
|
1764
|
+
font-weight: 700;
|
|
1765
|
+
color: #303133;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
.el-dropdown-menu__item:focus,
|
|
1769
|
+
.el-dropdown-menu__item:not(.is-disabled):hover {
|
|
1770
|
+
background-color: #fff;
|
|
1771
|
+
color: #ff503f;
|
|
1772
|
+
border-bottom: 3px solid #ff503f;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
.tabsMore .is-active {
|
|
1776
|
+
cursor: pointer;
|
|
1777
|
+
background-color: #fff;
|
|
1778
|
+
color: #ff503f;
|
|
1779
|
+
border-bottom: 3px solid #ff503f;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
>>>.el-tabs--bottom .el-tabs__item.is-bottom:last-child,
|
|
1783
|
+
>>>.el-tabs--bottom .el-tabs__item.is-top:last-child,
|
|
1784
|
+
>>>.el-tabs--top .el-tabs__item.is-bottom:last-child,
|
|
1785
|
+
>>>.el-tabs--top .el-tabs__item.is-top:last-child {
|
|
1786
|
+
padding-right: 15px;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
.svgIcon {
|
|
1790
|
+
width: 16px;
|
|
1791
|
+
text-align: center;
|
|
1792
|
+
cursor: pointer;
|
|
1793
|
+
}
|
|
1639
1794
|
</style>
|
|
1640
1795
|
|
|
1641
1796
|
|
|
@@ -250,12 +250,10 @@
|
|
|
250
250
|
showData[0].length + index == model.activeIndex1,
|
|
251
251
|
}"
|
|
252
252
|
>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
></el-dropdown-item
|
|
258
|
-
>
|
|
253
|
+
<div @click="handleDropDown(col, index)" :value="model.activeIndex1">
|
|
254
|
+
<div slot="label" v-html="col.appName"></div>
|
|
255
|
+
</div>
|
|
256
|
+
</el-dropdown-item>
|
|
259
257
|
</el-dropdown-menu>
|
|
260
258
|
</el-dropdown>
|
|
261
259
|
</div>
|
|
@@ -1820,21 +1818,7 @@ export default {
|
|
|
1820
1818
|
background-clip: content-box;
|
|
1821
1819
|
cursor: pointer;
|
|
1822
1820
|
}
|
|
1823
|
-
|
|
1824
|
-
// display: inline-block;
|
|
1825
|
-
// }
|
|
1826
|
-
// .popoverbtnTab {
|
|
1827
|
-
// font-size: 14px !important;
|
|
1828
|
-
// font-weight: bold;
|
|
1829
|
-
// cursor: pointer;
|
|
1830
|
-
// float: left;
|
|
1831
|
-
// list-style-type: none;
|
|
1832
|
-
// padding: 0px 20px 0px 20px;
|
|
1833
|
-
// }
|
|
1834
|
-
// .popoverbtnTab:hover,
|
|
1835
|
-
// .popovertablf:hover {
|
|
1836
|
-
// color: #ee5d56;
|
|
1837
|
-
// }
|
|
1821
|
+
|
|
1838
1822
|
>>> .el-tabs__nav-prev {
|
|
1839
1823
|
display: none;
|
|
1840
1824
|
}
|
|
@@ -243,7 +243,8 @@
|
|
|
243
243
|
return v1.id === v.parentName;
|
|
244
244
|
});
|
|
245
245
|
if (parent) {
|
|
246
|
-
parent.child =
|
|
246
|
+
parent.child = parent.child ? parent.child : [];
|
|
247
|
+
parent.child.push(v);
|
|
247
248
|
v.parent = parent;
|
|
248
249
|
}
|
|
249
250
|
});
|
|
@@ -672,7 +673,7 @@
|
|
|
672
673
|
checkMsg = "请先录入" + self.model.fieldsDic[v].label;
|
|
673
674
|
}
|
|
674
675
|
else {
|
|
675
|
-
checkMsg = "
|
|
676
|
+
checkMsg = "未读取到表单项(" + v+")的值";
|
|
676
677
|
}
|
|
677
678
|
check = false;
|
|
678
679
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</el-table-column>
|
|
44
44
|
|
|
45
45
|
<!--操作列-->
|
|
46
|
-
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0"
|
|
46
|
+
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0">
|
|
47
47
|
<template slot-scope="scope">
|
|
48
48
|
<span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
|
|
49
49
|
{{scope.row.isSet?'保存':"修改"}}
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
{{model.label}}
|
|
9
9
|
</div>
|
|
10
10
|
<div style="padding-left:15px;flex:1" v-bind="model.attrs" class="el-date-editor ct-input__inner">
|
|
11
|
-
<input style="text-align:left;width:100%" class="el-range-input"
|
|
11
|
+
<input style="text-align:left;width:100%" class="el-range-input" :placeholder="model.attrs.placeholder1"
|
|
12
12
|
v-model="model.value" @change="onChangeHandler($event)" @input="onInputHandler($event);isShowClear()"
|
|
13
13
|
@blur="onBlurHandler($event)"
|
|
14
|
-
:class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" />
|
|
14
|
+
:class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" />{{model.rowKey}}
|
|
15
15
|
<!--<span v-if="!model.lock" class="cover-list-item-span">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<span
|
|
16
|
+
<i class="el-input__icon el-icon-circle-close" @click="clearClickHandle"></i>
|
|
17
|
+
</span>-->
|
|
18
|
+
<span class="el-input__suffix el-input--mini" v-if="showClear">
|
|
19
|
+
<span class="el-input__suffix-inner ct-close">
|
|
20
20
|
<i class="el-select__caret el-input__icon el-icon-circle-close is-show-close" @click="clearClickHandle($event)"></i>
|
|
21
21
|
</span>
|
|
22
|
-
|
|
22
|
+
</span>
|
|
23
23
|
|
|
24
24
|
<span v-if="model.unitName" class="ct-unitname el-input__suffix el-input__suffix-inner" :class="showClear?'unitName-20':'unitName-0'">{{model.unitName}}</span>
|
|
25
25
|
</div>
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
methods: {
|
|
66
66
|
load(data) {
|
|
67
67
|
this.model = data;
|
|
68
|
+
this.model.self=this;
|
|
68
69
|
},
|
|
69
70
|
clearClickHandle: function (event) {
|
|
70
71
|
this.model.value = '';
|
|
@@ -93,13 +94,14 @@
|
|
|
93
94
|
//不能共用的数据校验
|
|
94
95
|
selfValidExcute: function (eventName) {
|
|
95
96
|
if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
|
|
96
|
-
this.validMessage = "
|
|
97
|
+
this.validMessage = this.model.label +" 不能大于 " + this.model.max;
|
|
97
98
|
this.valid = false;
|
|
98
99
|
return false;
|
|
99
100
|
}
|
|
100
101
|
if (eventName === "valid") {
|
|
102
|
+
|
|
101
103
|
if (this.model.min !== "" && parseFloat(this.model.value) < parseFloat(this.model.min)) {
|
|
102
|
-
this.validMessage = "
|
|
104
|
+
this.validMessage = this.model.label+" 不能小于 " + this.model.min;
|
|
103
105
|
this.valid = false;
|
|
104
106
|
return false;
|
|
105
107
|
}
|
|
@@ -95,23 +95,23 @@
|
|
|
95
95
|
//不能共用的数据校验
|
|
96
96
|
selfValidExcute: function (eventName) {
|
|
97
97
|
if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
|
|
98
|
-
this.validMessage = "
|
|
98
|
+
this.validMessage = this.model.label +" 不能大于 " + this.model.max;
|
|
99
99
|
this.valid = false;
|
|
100
100
|
return false;
|
|
101
101
|
}
|
|
102
102
|
if (this.model.max1 !== "" && parseFloat(this.model.value1) > parseFloat(this.model.max1)) {
|
|
103
|
-
this.validMessage = "
|
|
103
|
+
this.validMessage = this.model.label +" 不能大于 " + this.model.max1;
|
|
104
104
|
this.valid = false;
|
|
105
105
|
return false;
|
|
106
106
|
}
|
|
107
107
|
if (eventName === "valid") {
|
|
108
108
|
if (this.model.min !== "" && parseFloat(this.model.value) < parseFloat(this.model.min)) {
|
|
109
|
-
this.validMessage = "
|
|
109
|
+
this.validMessage = this.model.label +" 不能小于 " + this.model.min;
|
|
110
110
|
this.valid = false;
|
|
111
111
|
return false;
|
|
112
112
|
}
|
|
113
113
|
if (this.model.min1 !== "" && parseFloat(this.model.value1) < parseFloat(this.model.min1)) {
|
|
114
|
-
this.validMessage = "
|
|
114
|
+
this.validMessage = this.model.label +" 不能小于 " + this.model.min1;
|
|
115
115
|
this.valid = false;
|
|
116
116
|
return false;
|
|
117
117
|
}
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
</span>
|
|
24
24
|
</span>
|
|
25
25
|
<label v-else class="ct-lable" :class="{ isWidth: model.labelValue.length > 30 }">
|
|
26
|
-
<el-tooltip :content="model.labelValue" placement="top" effect="light">
|
|
26
|
+
<el-tooltip :content="model.labelValue" placement="top" effect="light" v-if="model.labelValue.length > 30">
|
|
27
27
|
<span :class="{ isEllipsis: model.labelValue.length > 30 }"> {{ model.labelValue }}</span>
|
|
28
28
|
</el-tooltip>
|
|
29
|
+
<span v-else> {{ model.labelValue }}</span>
|
|
29
30
|
</label>
|
|
30
31
|
<span slot="suffix" v-if="model.unitName" class="ct-unitnameLable">{{model.unitName}}</span>
|
|
31
32
|
<span v-if="model.sufLabel" style="width:auto" class="spanMessage">{{model.sufLabel}}</span>
|
|
@@ -52,8 +53,10 @@
|
|
|
52
53
|
else {
|
|
53
54
|
this.model = this.vmodel;
|
|
54
55
|
}
|
|
56
|
+
this.model.self=this;
|
|
55
57
|
}
|
|
56
|
-
}
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
57
60
|
<style scoped>
|
|
58
61
|
.isWidth {
|
|
59
62
|
width: 60%;
|
|
@@ -86,8 +86,10 @@
|
|
|
86
86
|
}
|
|
87
87
|
this.$watch('model.value', (n, o) => {
|
|
88
88
|
if (typeof this.model.child !== 'undefined') {
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
for (var item of this.model.child) {
|
|
90
|
+
item.value = item.defaultValue || '';
|
|
91
|
+
item.text = item.defaultText || '';
|
|
92
|
+
}
|
|
91
93
|
}
|
|
92
94
|
});
|
|
93
95
|
this.inputHeight = this.inputLineHeight;
|
|
@@ -154,8 +156,10 @@
|
|
|
154
156
|
tagsChange: function () {
|
|
155
157
|
var self = this;
|
|
156
158
|
if (typeof this.model.child !== 'undefined') {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
for (var item of this.model.child) {
|
|
160
|
+
item.value = item.defaultValue || '';
|
|
161
|
+
item.text = item.defaultText || '';
|
|
162
|
+
}
|
|
159
163
|
}
|
|
160
164
|
var currentOptions = this.globalOptions.filter((value) => {
|
|
161
165
|
return self.model.value.indexOf(value[self.model.optionAttrs.value]) >= 0;
|
|
@@ -103,7 +103,8 @@
|
|
|
103
103
|
return v1.id === v.parentName;
|
|
104
104
|
});
|
|
105
105
|
if (parent) {
|
|
106
|
-
parent.child =
|
|
106
|
+
parent.child = parent.child ? parent.child : [];
|
|
107
|
+
parent.child.push(v);
|
|
107
108
|
v.parent = parent;
|
|
108
109
|
}
|
|
109
110
|
});
|
|
@@ -120,7 +121,8 @@
|
|
|
120
121
|
return v1.id === v.parentName;
|
|
121
122
|
});
|
|
122
123
|
if (parent) {
|
|
123
|
-
parent.child =
|
|
124
|
+
parent.child = parent.child ? parent.child : [];
|
|
125
|
+
parent.child.push(v);
|
|
124
126
|
v.parent = parent;
|
|
125
127
|
}
|
|
126
128
|
});
|
|
@@ -35,6 +35,16 @@
|
|
|
35
35
|
|
|
36
36
|
};
|
|
37
37
|
},
|
|
38
|
+
created() {
|
|
39
|
+
this.$watch('model.value', (n, o) => {
|
|
40
|
+
if (typeof this.model.child !== 'undefined') {
|
|
41
|
+
for (var item of this.model.child) {
|
|
42
|
+
item.value = item.defaultValue || '';
|
|
43
|
+
item.text = item.defaultText || '';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
},
|
|
38
48
|
mounted() {
|
|
39
49
|
var self = this;
|
|
40
50
|
this.$nextTick(function () {
|
|
@@ -76,8 +76,10 @@
|
|
|
76
76
|
}
|
|
77
77
|
this.$watch('model.value', (n, o) => {
|
|
78
78
|
if (typeof this.model.child !== 'undefined') {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
for (var item of this.model.child) {
|
|
80
|
+
item.value = item.defaultValue || '';
|
|
81
|
+
item.text = item.defaultText || '';
|
|
82
|
+
}
|
|
81
83
|
}
|
|
82
84
|
});
|
|
83
85
|
this.inputHeight = this.inputLineHeight;
|
|
@@ -139,8 +141,10 @@
|
|
|
139
141
|
soChange: function () {
|
|
140
142
|
var self = this;
|
|
141
143
|
if (typeof this.model.child !== 'undefined') {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
for (var item of this.model.child) {
|
|
145
|
+
item.value = item.defaultValue || '';
|
|
146
|
+
item.text = item.defaultText || '';
|
|
147
|
+
}
|
|
144
148
|
}
|
|
145
149
|
var currentOption = this.model.options.find((value) => {
|
|
146
150
|
return self.model.value === value[self.model.optionAttrs.value];
|
|
@@ -80,8 +80,10 @@
|
|
|
80
80
|
}
|
|
81
81
|
this.$watch('model.value', (n, o) => {
|
|
82
82
|
if (typeof this.model.child !== 'undefined') {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
for (var item of this.model.child) {
|
|
84
|
+
item.value = item.defaultValue || '';
|
|
85
|
+
item.text = item.defaultText || '';
|
|
86
|
+
}
|
|
85
87
|
}
|
|
86
88
|
});
|
|
87
89
|
this.inputHeight = this.inputLineHeight;
|
|
@@ -145,8 +147,10 @@
|
|
|
145
147
|
soChange: function () {
|
|
146
148
|
var self = this;
|
|
147
149
|
if (typeof this.model.child !== 'undefined') {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
for (var item of this.model.child) {
|
|
151
|
+
item.value = item.defaultValue || '';
|
|
152
|
+
item.text = item.defaultText || '';
|
|
153
|
+
}
|
|
150
154
|
}
|
|
151
155
|
var currentOption = this.model.options.find((value) => {
|
|
152
156
|
return self.model.value === value[self.model.optionAttrs.value];
|
|
@@ -92,8 +92,10 @@
|
|
|
92
92
|
}
|
|
93
93
|
this.$watch('model.value', (n, o) => {
|
|
94
94
|
if (typeof this.model.child !== 'undefined') {
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
for (var item of this.model.child) {
|
|
96
|
+
item.value = item.defaultValue || '';
|
|
97
|
+
item.text = item.defaultText || '';
|
|
98
|
+
}
|
|
97
99
|
}
|
|
98
100
|
});
|
|
99
101
|
this.inputHeight = this.inputLineHeight;
|
|
@@ -157,8 +159,10 @@
|
|
|
157
159
|
soChange: function () {
|
|
158
160
|
var self = this;
|
|
159
161
|
if (typeof this.model.child !== 'undefined') {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
+
for (var item of this.model.child) {
|
|
163
|
+
item.value = item.defaultValue || '';
|
|
164
|
+
item.text = item.defaultText || '';
|
|
165
|
+
}
|
|
162
166
|
}
|
|
163
167
|
var currentOption = this.model.options.find((value) => {
|
|
164
168
|
return self.model.value === value[self.model.optionAttrs.value];
|