centaline-data-driven 1.3.35 → 1.3.36
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 +3 -7
- package/src/centaline/common/index.js +15 -6
- package/src/centaline/dialogList/src/dialog.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +36 -10
- package/src/centaline/dynamicForm/src/dynamicForm.vue +28 -0
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +35 -18
- package/src/centaline/dynamicL/src/dynamicL.vue +15 -2
- package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchList.vue +14 -5
- package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchListTable.vue +1 -3
- package/src/centaline/dynamicT/src/dynamicT.vue +4 -3
- package/src/centaline/loader/src/ctl/Detail.js +39 -2
- package/src/centaline/loader/src/ctl/Form.js +5 -5
- package/src/centaline/loader/src/ctl/FormList.js +26 -20
- package/src/centaline/validate/index.js +4 -2
- package/src/main.js +4 -4
- 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="'/
|
|
5
|
+
<ct-form :api="'/commissionmanage/apply'" :apiParam="apiParam"></ct-form>
|
|
6
6
|
<!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
|
|
7
7
|
<ct-dialog-list></ct-dialog-list>
|
|
8
8
|
</div>
|
|
@@ -14,12 +14,8 @@
|
|
|
14
14
|
data() {
|
|
15
15
|
return {
|
|
16
16
|
apiParam:{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
pageOnly: "true",
|
|
20
|
-
pageStyle: "2",
|
|
21
|
-
stepId: "1550014106894327810"
|
|
22
|
-
}
|
|
17
|
+
|
|
18
|
+
}
|
|
23
19
|
}
|
|
24
20
|
},
|
|
25
21
|
activated(){
|
|
@@ -328,15 +328,23 @@ const common = {
|
|
|
328
328
|
if (parent) {
|
|
329
329
|
if (parent.$options.name === 'ElTabPane') {
|
|
330
330
|
return parent;
|
|
331
|
-
}
|
|
331
|
+
}
|
|
332
|
+
else if (evControl.$options.name === 'ctDialog') {
|
|
332
333
|
return evControl.vmodel.pane;
|
|
333
|
-
}
|
|
334
|
+
}
|
|
335
|
+
else if (parent.$options.name === 'DataDrivenSearch') {
|
|
334
336
|
return parent;
|
|
335
|
-
}
|
|
337
|
+
}
|
|
338
|
+
else if (parent.$options.name === 'DataDrivenForm') {
|
|
336
339
|
return parent;
|
|
337
|
-
}
|
|
340
|
+
}
|
|
341
|
+
else if (parent.$options.name === 'DataDrivendetail') {
|
|
338
342
|
return parent;
|
|
339
|
-
}
|
|
343
|
+
}
|
|
344
|
+
else if (parent.$options.name === 'App') {
|
|
345
|
+
return parent;
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
340
348
|
return this.getParentPane(parent);
|
|
341
349
|
}
|
|
342
350
|
}
|
|
@@ -364,7 +372,8 @@ const common = {
|
|
|
364
372
|
if (window.attachEvent && !window.opera) {
|
|
365
373
|
//ie
|
|
366
374
|
execScript(code);
|
|
367
|
-
}
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
368
377
|
//not ie
|
|
369
378
|
window.eval(code);
|
|
370
379
|
}
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
if(item.attrs.height){
|
|
152
152
|
ph=parseInt(item.attrs.height.replace('px',''));
|
|
153
153
|
}
|
|
154
|
-
if(self.vmodel.pane && self.vmodel.pane.$el.clientHeight<ph){
|
|
154
|
+
if(self.vmodel.pane && self.vmodel.pane.$el && self.vmodel.pane.$el.clientHeight<ph){
|
|
155
155
|
item.attrs.height=(self.vmodel.pane.$el.clientHeight-40)+'px';
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<span>{{ model.fields1Dic.EstateName.value }}</span>
|
|
11
11
|
<span> {{ model.fields1Dic.BuildingName.value }}</span>
|
|
12
12
|
<span>{{ model.fields1Dic.RoomNo.value }}</span>
|
|
13
|
-
<img :src="model.fields1Dic.FavoriteUrl.value" alt="" class="collection"/>
|
|
13
|
+
<img :src="model.fields1Dic.FavoriteUrl.value" alt="" @click="fieldClickHandler(model.actionRouterFavorite, $event)" class="collection" />
|
|
14
14
|
</div>
|
|
15
15
|
<div class="title-other">
|
|
16
16
|
<span>{{ model.fields1Dic.PropertyNo.label }}{{ model.fields1Dic.PropertyNo.value }}</span>
|
|
@@ -235,8 +235,9 @@
|
|
|
235
235
|
</el-tabs>
|
|
236
236
|
<div class="more-dropdown">
|
|
237
237
|
<el-dropdown trigger="click" placement="bottom">
|
|
238
|
-
<span class="el-dropdown-link">
|
|
239
|
-
<div class="my-icon-more"></div>
|
|
238
|
+
<span class="el-dropdown-link svgIcon">
|
|
239
|
+
<!-- <div class="my-icon-more"></div> -->
|
|
240
|
+
<img :src="iconSort" alt="" width="100%" />
|
|
240
241
|
</span>
|
|
241
242
|
<el-dropdown-menu slot="dropdown" class="tabsMore">
|
|
242
243
|
<el-dropdown-item
|
|
@@ -579,6 +580,7 @@ export default {
|
|
|
579
580
|
showData: [],
|
|
580
581
|
FlagStatistics: false,
|
|
581
582
|
dropDownSelected: false,
|
|
583
|
+
iconSort: require("../../../assets/sort.png"),
|
|
582
584
|
};
|
|
583
585
|
},
|
|
584
586
|
mounted() {
|
|
@@ -761,6 +763,9 @@ export default {
|
|
|
761
763
|
loadBaseInfo() {
|
|
762
764
|
this.model.loadBaseInfo();
|
|
763
765
|
},
|
|
766
|
+
loadFavorite() {
|
|
767
|
+
this.model.loadFavorite();
|
|
768
|
+
},
|
|
764
769
|
handleClick(tab, event) {
|
|
765
770
|
let i = tab.index;
|
|
766
771
|
if (this.model.tags2 && this.model.tags2[i]) {
|
|
@@ -828,31 +833,42 @@ export default {
|
|
|
828
833
|
});
|
|
829
834
|
callBack = "loadOperation";
|
|
830
835
|
}
|
|
836
|
+
if (router == undefined && this.model.actionRouterFavorite) {
|
|
837
|
+
if (field.id === this.model.actionRouterFavorite.id) {
|
|
838
|
+
router = this.model.actionRouterFavorite;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
831
841
|
|
|
832
842
|
if (router) {
|
|
833
843
|
if (field.isSubmitDataFromSelf) {
|
|
834
844
|
router.submitFormField.forEach((v) => {
|
|
835
845
|
submitData[v] = field.list[field.listIndex].code;
|
|
836
846
|
});
|
|
837
|
-
}
|
|
847
|
+
}
|
|
838
848
|
else {
|
|
839
849
|
router.submitFormField.forEach((v) => {
|
|
840
850
|
submitData[v] = self.model.fields1Dic[v].value;
|
|
841
851
|
});
|
|
842
852
|
}
|
|
843
|
-
if(router.id=="PropertyEdit"){
|
|
844
|
-
callBack="loadBaseInfo"
|
|
853
|
+
if (router.id == "PropertyEdit") {
|
|
854
|
+
callBack = "loadBaseInfo"
|
|
855
|
+
}
|
|
856
|
+
else if (router.id == "Favorite") {
|
|
857
|
+
callBack = "loadFavorite"
|
|
845
858
|
}
|
|
846
859
|
}
|
|
847
860
|
|
|
848
861
|
if (callBack) {
|
|
849
|
-
if(callBack=='loadOperation'){
|
|
862
|
+
if (callBack == 'loadOperation') {
|
|
850
863
|
this.routerClickHandler(router, submitData, self.loadOperation);
|
|
851
864
|
}
|
|
852
|
-
else if(callBack=='loadBaseInfo'){
|
|
865
|
+
else if (callBack == 'loadBaseInfo') {
|
|
853
866
|
this.routerClickHandler(router, submitData, self.loadBaseInfo);
|
|
854
867
|
}
|
|
855
|
-
|
|
868
|
+
else if (callBack == 'loadFavorite') {
|
|
869
|
+
this.routerClickHandler(router, submitData, self.loadFavorite);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
856
872
|
else {
|
|
857
873
|
this.routerClickHandler(router, submitData);
|
|
858
874
|
}
|
|
@@ -925,6 +941,11 @@ export default {
|
|
|
925
941
|
});
|
|
926
942
|
self.$common.closeDialog(dialogOption.dialog);
|
|
927
943
|
},
|
|
944
|
+
closeDialog(ev) {
|
|
945
|
+
if (field.id == "Favorite" && callBack) {
|
|
946
|
+
callBack();
|
|
947
|
+
}
|
|
948
|
+
}
|
|
928
949
|
},
|
|
929
950
|
},
|
|
930
951
|
],
|
|
@@ -1805,7 +1826,7 @@ export default {
|
|
|
1805
1826
|
height: 20px;
|
|
1806
1827
|
text-align: left;
|
|
1807
1828
|
top: 13px;
|
|
1808
|
-
right: -
|
|
1829
|
+
right: -1px;
|
|
1809
1830
|
}
|
|
1810
1831
|
.el-dropdown-menu--mini .el-dropdown-menu__item {
|
|
1811
1832
|
font-size: 14px;
|
|
@@ -1830,6 +1851,11 @@ export default {
|
|
|
1830
1851
|
>>> .el-tabs--top .el-tabs__item.is-top:last-child {
|
|
1831
1852
|
padding-right: 15px;
|
|
1832
1853
|
}
|
|
1854
|
+
.svgIcon {
|
|
1855
|
+
width: 16px;
|
|
1856
|
+
text-align: center;
|
|
1857
|
+
cursor: pointer;
|
|
1858
|
+
}
|
|
1833
1859
|
</style>
|
|
1834
1860
|
|
|
1835
1861
|
|
|
@@ -628,11 +628,36 @@
|
|
|
628
628
|
popupSearchListHandler(singleSelectio, field, router, callBack) {
|
|
629
629
|
var self = this;
|
|
630
630
|
var submitData = {};
|
|
631
|
+
var verified = true;
|
|
631
632
|
var tempFormData = self.model.getFormObj();
|
|
632
633
|
|
|
633
634
|
var check = true;
|
|
634
635
|
var checkMsg;
|
|
635
636
|
router.submitFormField.forEach((v) => {
|
|
637
|
+
self.$refs.Fields.forEach((f) => {
|
|
638
|
+
if(f.model && f.model.id===v){
|
|
639
|
+
if (typeof f.validExcute !== 'undefined'){
|
|
640
|
+
if (!f.validExcute()){
|
|
641
|
+
if(f.validMessage){
|
|
642
|
+
if(f.validMessage=='必填'){
|
|
643
|
+
self.$message.error('【'+f.model.label+'】'+f.validMessage);
|
|
644
|
+
}
|
|
645
|
+
else{
|
|
646
|
+
self.$message.error(f.validMessage);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
else{
|
|
650
|
+
self.$message.error('【'+f.model.label+'】不能为空!');
|
|
651
|
+
}
|
|
652
|
+
verified=false;
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
if(!verified){
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
636
661
|
submitData[v] = self.$common.getDataOfUpperLower(tempFormData,v);
|
|
637
662
|
if (typeof tempFormData[v] === "undefined") {
|
|
638
663
|
if (self.model.fieldsDic[v]) {
|
|
@@ -645,6 +670,9 @@
|
|
|
645
670
|
}
|
|
646
671
|
});
|
|
647
672
|
|
|
673
|
+
if(!verified){
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
648
676
|
if (!check) {
|
|
649
677
|
self.$message.warning(checkMsg);
|
|
650
678
|
return;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<h5>{{model.title}}</h5>
|
|
5
5
|
</div>
|
|
6
6
|
<div class="list-button">
|
|
7
|
+
<component v-if="model.selectRouter !== null" :is="model.selectRouter.is" :vmodel="model.selectRouter" @click="popupSearchListHandle" ></component>
|
|
7
8
|
<el-button v-if="model.create" type="success" class=" max-btn-add" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
|
|
8
9
|
新增
|
|
9
10
|
</el-button>
|
|
@@ -12,7 +13,8 @@
|
|
|
12
13
|
<div id="listTable">
|
|
13
14
|
<el-row>
|
|
14
15
|
<el-col :span="24">
|
|
15
|
-
<el-table size="mini" class="max-table--border" :data="model.tableData" :key="itemKey" border
|
|
16
|
+
<el-table size="mini" class="max-table--border" :data="model.tableData" :key="itemKey" border
|
|
17
|
+
style="width: 100%" highlight-current-row :show-summary="model.showSummary" :summary-method="getSummaries">
|
|
16
18
|
<!--数据列-->
|
|
17
19
|
<el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" v-if="v.show !== false">
|
|
18
20
|
<template slot="header" slot-scope="scope">
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
</el-table-column>
|
|
42
44
|
|
|
43
45
|
<!--操作列-->
|
|
44
|
-
<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" fixed="right">
|
|
45
47
|
<template slot-scope="scope">
|
|
46
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)">
|
|
47
49
|
{{scope.row.isSet?'保存':"修改"}}
|
|
@@ -104,8 +106,7 @@
|
|
|
104
106
|
itemKey: Math.random()
|
|
105
107
|
}
|
|
106
108
|
},
|
|
107
|
-
created() {
|
|
108
|
-
|
|
109
|
+
created() {
|
|
109
110
|
let self = this;
|
|
110
111
|
this.model = this.vmodel;
|
|
111
112
|
this.model.OptApi = this.api;
|
|
@@ -180,6 +181,7 @@
|
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
row.isSet = false;
|
|
184
|
+
app.model.rows[app.model.source.rows.findIndex(v => v.$sourceIndex === row.$sourceIndex)].edited=true;
|
|
183
185
|
app.model.currentRow.isSet = false;
|
|
184
186
|
app.itemKey = Math.random();
|
|
185
187
|
this.model.change = this.model.formListChange;
|
|
@@ -215,12 +217,12 @@
|
|
|
215
217
|
self.$emit('change');
|
|
216
218
|
});
|
|
217
219
|
},
|
|
218
|
-
editRow(
|
|
220
|
+
editRow(sourceIndex) {
|
|
219
221
|
var self = this;
|
|
220
|
-
this.model.editRow(
|
|
222
|
+
this.model.editRow(sourceIndex, () => {
|
|
221
223
|
self.$forceUpdate();
|
|
222
224
|
self.$refs.FieldsLabel.forEach((fd) => {
|
|
223
|
-
if (fd.rowNum ===
|
|
225
|
+
if (fd.rowNum === sourceIndex) {
|
|
224
226
|
fd.$forceUpdate();
|
|
225
227
|
}
|
|
226
228
|
});
|
|
@@ -259,7 +261,7 @@
|
|
|
259
261
|
changeHandler(field, index) {
|
|
260
262
|
var self = this;
|
|
261
263
|
this.model.change = field.change;
|
|
262
|
-
this.model.currentRowIndex = index;
|
|
264
|
+
this.model.currentRowIndex = this.model.source.rows.findIndex(v => v.$sourceIndex === index);
|
|
263
265
|
this.model.currentEventField = field;
|
|
264
266
|
self.$emit('change');
|
|
265
267
|
|
|
@@ -269,7 +271,7 @@
|
|
|
269
271
|
inputHandler(field, index) {
|
|
270
272
|
var self = this;
|
|
271
273
|
this.model.input = field.input;//当前小组件事件作为大组件事件
|
|
272
|
-
this.model.currentRowIndex = index;
|
|
274
|
+
this.model.currentRowIndex = this.model.source.rows.findIndex(v => v.$sourceIndex === index);
|
|
273
275
|
this.model.currentEventField = field;
|
|
274
276
|
|
|
275
277
|
self.$emit('input');
|
|
@@ -277,22 +279,31 @@
|
|
|
277
279
|
//如果有汇总列,触发重新计算汇总
|
|
278
280
|
this.recalculationSummary();
|
|
279
281
|
},
|
|
280
|
-
//如果有汇总列,触发重新计算汇总
|
|
281
|
-
recalculationSummary() {
|
|
282
|
-
if (this.model.showSummary) {
|
|
283
|
-
this.model.tableData.push({});
|
|
284
|
-
this.model.tableData.pop();
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
282
|
buttonClick(row, button) {
|
|
288
283
|
var submitData = {};
|
|
289
284
|
button.submitFormField.forEach((v) => {
|
|
290
285
|
submitData[v] = row[v].value;
|
|
291
286
|
});
|
|
292
|
-
this.model.currentRowIndex = row.$sourceIndex;
|
|
287
|
+
this.model.currentRowIndex = this.model.source.rows.findIndex(v => v.$sourceIndex === row.$sourceIndex);
|
|
293
288
|
|
|
294
289
|
this.$emit('tableButtonClick', button, submitData);
|
|
295
290
|
},
|
|
291
|
+
popupSearchListHandle(field) {
|
|
292
|
+
if(field.isSearchPageWithList){
|
|
293
|
+
var self = this;
|
|
294
|
+
self.$emit('popupSearchList', false, self.model, field, (data) => {
|
|
295
|
+
if (data && data.length>0) {
|
|
296
|
+
data.forEach((v) => {
|
|
297
|
+
if(v.code){
|
|
298
|
+
self.model.insertOrUpdateRow(JSON.parse(v.code),true);
|
|
299
|
+
// self.recalculationSummary();
|
|
300
|
+
// self.$emit('change');
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
},
|
|
296
307
|
rolRouterClickHandler(field, rowData,rowindex) {
|
|
297
308
|
if(this.$refs['popover'+rowindex]){
|
|
298
309
|
this.$refs['popover'+rowindex][0].doClose();
|
|
@@ -305,6 +316,13 @@
|
|
|
305
316
|
|
|
306
317
|
this.$emit('tableButtonClick', field, submitData);
|
|
307
318
|
},
|
|
319
|
+
//如果有汇总列,触发重新计算汇总
|
|
320
|
+
recalculationSummary() {
|
|
321
|
+
if (this.model.showSummary) {
|
|
322
|
+
this.model.tableData.push({});
|
|
323
|
+
this.model.tableData.pop();
|
|
324
|
+
}
|
|
325
|
+
},
|
|
308
326
|
//汇总行 计算
|
|
309
327
|
getSummaries(param) {
|
|
310
328
|
const self = this;
|
|
@@ -338,7 +356,6 @@
|
|
|
338
356
|
return Number(prev);
|
|
339
357
|
}
|
|
340
358
|
}, 0);
|
|
341
|
-
//sums[index] += ' 元';
|
|
342
359
|
if (data[0][column.property].decimals && data[0][column.property].decimals > 0) {
|
|
343
360
|
sums[index] = sums[index].toFixed(data[0][column.property].decimals);
|
|
344
361
|
}
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
<span class="el-select__tags-text">{{item}}</span>
|
|
23
23
|
</span>
|
|
24
24
|
</span>
|
|
25
|
-
<label v-else class="ct-lable">
|
|
26
|
-
|
|
25
|
+
<label v-else class="ct-lable" :class="{ isWidth: model.labelValue.length > 30 }">
|
|
26
|
+
<span :class="{ isEllipsis: model.labelValue.length > 30 }"> {{ model.labelValue }}</span>
|
|
27
27
|
</label>
|
|
28
28
|
<span slot="suffix" v-if="model.unitName" class="ct-unitnameLable">{{model.unitName}}</span>
|
|
29
29
|
<span v-if="model.sufLabel" style="width:auto" class="spanMessage">{{model.sufLabel}}</span>
|
|
@@ -52,3 +52,16 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}</script>
|
|
55
|
+
<style scoped>
|
|
56
|
+
.isWidth {
|
|
57
|
+
width: 60%;
|
|
58
|
+
display: flex;
|
|
59
|
+
}
|
|
60
|
+
.isEllipsis {
|
|
61
|
+
width: auto;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
text-overflow: ellipsis;
|
|
65
|
+
-o-text-overflow: ellipsis;
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
<div v-if="model !== null && !loading" class="ct-form">
|
|
4
4
|
<div class="ct-ptb5 max-flex">
|
|
5
5
|
<template v-for="(col, index) in model.fields" v-if="col.show !== false">
|
|
6
|
-
|
|
7
|
-
<
|
|
6
|
+
<!-- <br v-if="col.is === 'ct-linefeed'" /> -->
|
|
7
|
+
<div v-if="col.is === 'ct-linefeed'" style="width: 100%;">
|
|
8
|
+
<el-divider></el-divider>
|
|
9
|
+
</div>
|
|
10
|
+
<component v-else ref="Fields" :is="col.is" v-bind="col.listBind" :vmodel="col" :api="model.optionApi" @click="getClickHandler(col.action)"></component>
|
|
8
11
|
</template>
|
|
9
12
|
</div>
|
|
10
13
|
<ct-popupSearchListTable ref="table" :api="searchDataApi" :jumpBtnName="jumpBtnName" :filterBtnName="filterBtnName"
|
|
@@ -67,7 +70,6 @@
|
|
|
67
70
|
this.$refs.table.searchComplate(this.model,this.model.flagSearch);
|
|
68
71
|
});
|
|
69
72
|
this.loading = false;
|
|
70
|
-
|
|
71
73
|
//通知父组件加载完成
|
|
72
74
|
this.$emit('loaded');
|
|
73
75
|
},
|
|
@@ -146,12 +148,19 @@
|
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
150
|
</script>
|
|
149
|
-
<style>
|
|
151
|
+
<style scoped>
|
|
150
152
|
.max-flex{
|
|
151
153
|
display: flex;
|
|
152
|
-
|
|
154
|
+
flex-wrap: wrap;
|
|
153
155
|
}
|
|
154
156
|
.max-flex .field-top{
|
|
155
157
|
margin-right: 10px;
|
|
156
158
|
}
|
|
159
|
+
.el-divider {
|
|
160
|
+
background-color: #fff;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.el-divider--horizontal {
|
|
164
|
+
margin: 5px 0;
|
|
165
|
+
}
|
|
157
166
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="field-top">
|
|
3
|
-
<div style="width:100%;display:block
|
|
3
|
+
<div style="width:100%;" :style="{ display: (model.inputType === 'textarea' ? 'block' : 'flex') }">
|
|
4
4
|
<div v-if="model !== null" class="ct-text ct-flex-div max-flex-div" style="flex:1;"
|
|
5
5
|
:class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'',model.attrs.size?'ct-font-size-'+model.attrs.size:'']"
|
|
6
6
|
@mouseover="mouseOverHandle" @mouseout="mouseOutHandle">
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<ctQuickInputSos v-if="!model.lock && model.paramName" class="ct-flex-div-span" :pn="model.paramName" :action="api" :flagNew="true" @click="quickSelect"></ctQuickInputSos>
|
|
25
25
|
</div>
|
|
26
26
|
<transition name="el-fade-in" class="ct-flex-div-span">
|
|
27
|
-
|
|
27
|
+
<span v-show="!valid" class="errorMessage" :class="{ 'errorMessageMarginLeft': model.inputType === 'textarea' }">
|
|
28
28
|
{{validMessage}}
|
|
29
29
|
</span>
|
|
30
30
|
</transition>
|
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
this.search();
|
|
102
102
|
},
|
|
103
103
|
},
|
|
104
|
-
}
|
|
104
|
+
}
|
|
105
|
+
</script>
|
|
105
106
|
<style scoped>
|
|
106
107
|
.errorMessageMarginLeft {
|
|
107
108
|
margin-left: 108px;
|
|
@@ -19,6 +19,7 @@ const Detail = function (source, para, callBack) {
|
|
|
19
19
|
_actionRoutersSimple: null,//页面上的动作行为
|
|
20
20
|
_contactApiRouter: null,//查看联系人
|
|
21
21
|
_commissionApiRouter: null,//查看角色
|
|
22
|
+
_actionRouterFavorite: null,//收藏动作行为
|
|
22
23
|
detailHeight: 750,
|
|
23
24
|
midlWidth: 1200,
|
|
24
25
|
activeIndex1: '0',
|
|
@@ -226,14 +227,30 @@ const Detail = function (source, para, callBack) {
|
|
|
226
227
|
return rtn._actionRoutersShow;
|
|
227
228
|
},
|
|
228
229
|
get actionRouterPrice() {
|
|
229
|
-
let routerPrice=null;
|
|
230
|
+
let routerPrice = null;
|
|
230
231
|
if (rtn.actionRoutersAll) {
|
|
231
232
|
rtn.actionRoutersAll.forEach((v, i) => {
|
|
232
|
-
if(v.id=='PropertyPriceLog') routerPrice=v;
|
|
233
|
+
if (v.id == 'PropertyPriceLog') routerPrice = v;
|
|
233
234
|
});
|
|
234
235
|
}
|
|
235
236
|
return routerPrice;
|
|
236
237
|
},
|
|
238
|
+
get actionRouterFavorite() {
|
|
239
|
+
if (rtn._actionRouterFavorite !== null) {
|
|
240
|
+
return rtn._actionRouterFavorite;
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
if (data.favoriteApiRouter) {
|
|
244
|
+
if (data.favoriteApiRouter.length > 0) {
|
|
245
|
+
var router = Router(data.favoriteApiRouter[0]);
|
|
246
|
+
router.is = "ct-btn";
|
|
247
|
+
router.attrs = { size: "mini" }
|
|
248
|
+
rtn._actionRouterFavorite = router;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return rtn._actionRouterFavorite;
|
|
252
|
+
}
|
|
253
|
+
},
|
|
237
254
|
get actionRouters() {
|
|
238
255
|
if (rtn._actionRouters !== null) {
|
|
239
256
|
return rtn._actionRouters;
|
|
@@ -503,6 +520,26 @@ const Detail = function (source, para, callBack) {
|
|
|
503
520
|
}
|
|
504
521
|
);
|
|
505
522
|
},
|
|
523
|
+
loadFavorite() {
|
|
524
|
+
var action;
|
|
525
|
+
if (data.favoriteApiRouter.length > 1) {
|
|
526
|
+
var router = Router(data.favoriteApiRouter[1]);
|
|
527
|
+
if (router) {
|
|
528
|
+
action = router.action;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
Vue.prototype.$api.postHandler(common.globalUri(), { action: action, para: para }).then(
|
|
532
|
+
function (response) {
|
|
533
|
+
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
534
|
+
if (response.content) {
|
|
535
|
+
if (response.content.length > 0) {
|
|
536
|
+
rtn._actionRouterFavorite = Router(response.content[0]);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
);
|
|
542
|
+
},
|
|
506
543
|
};
|
|
507
544
|
return rtn;
|
|
508
545
|
}
|
|
@@ -301,7 +301,7 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
301
301
|
//源数据
|
|
302
302
|
else {
|
|
303
303
|
if (rowNum === null && listData.currentRowIndex) {
|
|
304
|
-
|
|
304
|
+
rowNum = listData.currentRowIndex;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
if (rowNum === 0 || (rowNum && fiedlId)) {
|
|
@@ -350,7 +350,7 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
350
350
|
|
|
351
351
|
//若该行正在编辑,则取编辑状态的。
|
|
352
352
|
if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
|
|
353
|
-
&& data.listData.currentRow.data.$sourceIndex ===
|
|
353
|
+
&& data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex && data.listData.currentRow.isSet) {
|
|
354
354
|
if(fiedlId=='deleted' || fiedlId=='flagDeleted'){
|
|
355
355
|
return data.listData.currentRow.data.deleted || false;
|
|
356
356
|
}
|
|
@@ -396,7 +396,8 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
//正在编辑的行
|
|
399
|
-
|
|
399
|
+
if (data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
|
|
400
|
+
&& data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex) {
|
|
400
401
|
let currentField = data.listData.currentRow.data[fiedlId];
|
|
401
402
|
currentField.source[attrName] = value;
|
|
402
403
|
//校验自己
|
|
@@ -577,10 +578,9 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
577
578
|
data.field = data.listData.currentEventField;
|
|
578
579
|
}
|
|
579
580
|
rowNum = rowNum !== null ? rowNum : data.listData.currentRowIndex;
|
|
580
|
-
|
|
581
581
|
//若该行正在编辑,则取编辑状态的。
|
|
582
582
|
if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
|
|
583
|
-
&& data.listData.currentRow.data.$sourceIndex === rowNum && data.listData.currentRow.isSet) {
|
|
583
|
+
&& data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex && data.listData.currentRow.isSet) {
|
|
584
584
|
return data.listData.currentRow.data[fiedlId].source[attrName];
|
|
585
585
|
}
|
|
586
586
|
else if (data && data.field) {
|