centaline-data-driven 1.2.36 → 1.2.39
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/build/centaline/centaline.path.js +1 -0
- package/package.json +1 -1
- package/src/Detail.vue +1 -1
- package/src/Form.vue +2 -2
- package/src/SearchList.vue +4 -4
- package/src/assets/ver.png +0 -0
- package/src/centaline/dynamicBtn/src/dynamicBtn.vue +19 -10
- package/src/centaline/dynamicCheckbox/src/dynamicCheckbox.vue +0 -1
- package/src/centaline/dynamicDetail/src/dynamicContactList.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +1 -1
- package/src/centaline/dynamicForm/src/dynamicForm.vue +3 -2
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +8 -6
- package/src/centaline/dynamicRepeat/index.js +14 -0
- package/src/centaline/dynamicRepeat/src/dynamicRepeat.vue +167 -0
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +13 -23
- package/src/centaline/dynamicSearchList/src/dynamicTableStats.vue +126 -51
- package/src/centaline/dynamicSeg/src/dynamicSeg.vue +1 -0
- package/src/centaline/dynamicT/src/dynamicT.vue +11 -8
- package/src/centaline/loader/src/ctl/Repeat.js +241 -0
- package/src/centaline/loader/src/ctl/Router.js +6 -0
- package/src/centaline/loader/src/ctl/SearchTable.js +4 -1
- package/src/centaline/loader/src/ctl/lib/Enum.js +5 -1
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +12 -0
- package/src/centaline/loader/src/ctl.js +1 -0
- package/src/main.js +2 -2
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -4,26 +4,47 @@
|
|
|
4
4
|
<!--计算占用宽度-->
|
|
5
5
|
<div style="position:relative" v-if="FlagStatistics">
|
|
6
6
|
<div style="position:absolute;left:-10000px" class="tab-list">
|
|
7
|
-
<label v-for="(item, index) in data" class="btnTab"
|
|
8
|
-
|
|
7
|
+
<label v-for="(item, index) in data" class="btnTab" :ref="'StatisticsItem'+index">
|
|
8
|
+
{{item.controlLabel}}
|
|
9
|
+
</label>
|
|
9
10
|
</div>
|
|
10
11
|
</div>
|
|
11
12
|
<!--展示-->
|
|
12
13
|
<div v-if="FlagStatistics" class="tab-list">
|
|
13
14
|
<template v-if="showData.length===1">
|
|
14
|
-
<
|
|
15
|
-
<
|
|
15
|
+
<div v-for="(item, index) in showData[0]" @click="handleClick($event,item)">
|
|
16
|
+
<ul class="btnTab">
|
|
17
|
+
<li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
|
|
18
|
+
<li class="tdcenter">
|
|
19
|
+
<span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
|
|
20
|
+
</li>
|
|
21
|
+
</ul>
|
|
22
|
+
</div>
|
|
16
23
|
</template>
|
|
17
24
|
<template v-else-if="showData.length>1">
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
<div v-for="(item, index) in showData[0]" @click="handleClick($event,item)">
|
|
26
|
+
<ul class="btnTab">
|
|
27
|
+
<li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
|
|
28
|
+
<li class="tdcenter">
|
|
29
|
+
<span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
|
|
30
|
+
</li>
|
|
31
|
+
</ul>
|
|
32
|
+
</div>
|
|
33
|
+
<el-popover :append-to-table="option.appendId?option.appendId:''" class="Stats-popover" popper-class="el-popover1"
|
|
21
34
|
:placement="option.placement?option.placement:'left'"
|
|
22
|
-
:trigger="option.trigger?option.trigger:''"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
:trigger="option.trigger?option.trigger:''">
|
|
36
|
+
<div v-if="FlagStatistics" class="tab-list" style="border-bottom:none">
|
|
37
|
+
<div class="popovertablf" v-for="(item, index) in showData[1]" @click="handleClick($event,item)">
|
|
38
|
+
<ul class="popoverbtnTab" style="padding:0px">
|
|
39
|
+
<li :class="[selectStats==item.code1+'*'+item.controlLabel?'activecolor':'']">{{item.controlLabel}}</li>
|
|
40
|
+
<li class="tdcenter">
|
|
41
|
+
<span :class="[selectStats==item.code1+'*'+item.controlLabel?'active':'']"></span>
|
|
42
|
+
</li>
|
|
43
|
+
</ul>
|
|
44
|
+
<br />
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<sapn slot="reference" class="icon-more">⋮</sapn>
|
|
27
48
|
|
|
28
49
|
</el-popover>
|
|
29
50
|
</template>
|
|
@@ -50,7 +71,7 @@
|
|
|
50
71
|
option: {
|
|
51
72
|
isHidden: true,//是否开启操作栏隐藏设置,默认开启
|
|
52
73
|
showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
|
|
53
|
-
appendId: '
|
|
74
|
+
appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
|
|
54
75
|
trigger: 'hover',//触发方式,传值可查看Popper UI组件trigger属性
|
|
55
76
|
placement: 'bottom-start'//方向,传值可查看Popper UI组件placement属性
|
|
56
77
|
},
|
|
@@ -71,8 +92,10 @@
|
|
|
71
92
|
self.data = data.source.content;
|
|
72
93
|
self.selectVa = "";
|
|
73
94
|
if (self.data.length > 0) {
|
|
74
|
-
|
|
75
|
-
|
|
95
|
+
let i = self.data.findIndex(v => self.selectStats === (v.code1 + "*" + v.controlLabel));
|
|
96
|
+
|
|
97
|
+
if (i == -1 || self.selectStats == []) {
|
|
98
|
+
self.selectStats = self.data[0].code1 + "*" + self.data[0].controlLabel;
|
|
76
99
|
}
|
|
77
100
|
self.FlagStatistics = true;
|
|
78
101
|
self.showStats();
|
|
@@ -115,12 +138,12 @@
|
|
|
115
138
|
|
|
116
139
|
}
|
|
117
140
|
|
|
118
|
-
|
|
141
|
+
self.$emit('setTableHeight');
|
|
119
142
|
});
|
|
120
143
|
},
|
|
121
144
|
handleClick(ev, obj) {
|
|
122
145
|
var self = this;
|
|
123
|
-
self.selectStats = obj.code1;
|
|
146
|
+
self.selectStats = obj.code1 + "*" + obj.controlLabel;
|
|
124
147
|
var fields = self.model.searchData(obj.fieldName1, obj.code1, obj.searchOperation, obj.searchDataType);
|
|
125
148
|
var model = {
|
|
126
149
|
"searchData": fields
|
|
@@ -152,51 +175,103 @@
|
|
|
152
175
|
<style>
|
|
153
176
|
</style>
|
|
154
177
|
|
|
155
|
-
<style>
|
|
178
|
+
<style>
|
|
156
179
|
.tab-list {
|
|
157
|
-
|
|
180
|
+
position: relative;
|
|
158
181
|
margin-bottom: 10px;
|
|
159
|
-
|
|
182
|
+
height: 30px;
|
|
160
183
|
}
|
|
161
184
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
185
|
+
.tab-list .btnTab {
|
|
186
|
+
font-size: 14px !important;
|
|
187
|
+
font-weight: bold;
|
|
188
|
+
padding: 0px 20px 0px 20px;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
float: left;
|
|
191
|
+
list-style-type: none;
|
|
192
|
+
}
|
|
167
193
|
|
|
168
|
-
|
|
194
|
+
.tab-list .btnTab:hover, .tab-list .tablf:hover {
|
|
195
|
+
color: #ee5d56;
|
|
196
|
+
}
|
|
169
197
|
|
|
170
|
-
|
|
198
|
+
.tab-list .popoverbtnTab:hover, .tab-list .popovertablf:hover {
|
|
171
199
|
color: #ee5d56;
|
|
172
200
|
}
|
|
173
|
-
|
|
201
|
+
|
|
202
|
+
.tab-list .tabl-el {
|
|
174
203
|
max-width: 150px;
|
|
175
204
|
box-shadow: 0 6px 12px rgb(0 0 0 / 18%);
|
|
176
205
|
}
|
|
177
|
-
.tab-list .tablf{
|
|
178
|
-
font-size: 14px !important;
|
|
179
|
-
font-weight: bold;
|
|
180
|
-
text-align: center;
|
|
181
|
-
padding: 5px 10px;
|
|
182
|
-
display: block;
|
|
183
|
-
}
|
|
184
|
-
.tab-list .active {
|
|
185
|
-
color: #ee5d56 !important;
|
|
186
|
-
border-bottom: solid 3px #ee5d56 !important;
|
|
187
|
-
background: none;
|
|
188
|
-
border-radius: 0 !important;
|
|
189
|
-
}
|
|
190
|
-
.tab-list .btnTab span{
|
|
191
|
-
|
|
192
|
-
}
|
|
193
206
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
207
|
+
.tab-list .tablf {
|
|
208
|
+
font-size: 14px !important;
|
|
209
|
+
font-weight: bold;
|
|
210
|
+
text-align: center;
|
|
211
|
+
padding: 15px 10px;
|
|
212
|
+
display: block;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.tab-list .popovertablf {
|
|
216
|
+
font-size: 14px !important;
|
|
217
|
+
font-weight: bold;
|
|
218
|
+
text-align: center;
|
|
219
|
+
display: block;
|
|
220
|
+
padding: 5px 8px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.tab-list .popoverbtnTab {
|
|
224
|
+
font-size: 14px !important;
|
|
225
|
+
font-weight: bold;
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
float: left;
|
|
228
|
+
list-style-type: none;
|
|
229
|
+
padding: 0px 20px 0px 20px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.tab-list .tdcenter {
|
|
233
|
+
line-height: 1px;
|
|
234
|
+
height: 1px;
|
|
235
|
+
text-align: center;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.tab-list .active {
|
|
239
|
+
color: #ee5d56 !important;
|
|
240
|
+
/* border-bottom-right-radius: 12px !important; */
|
|
241
|
+
/* border-top-right-radius: 11px; */
|
|
242
|
+
width: 20px;
|
|
243
|
+
border-bottom: #ee5d56 solid 3px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
.tab-list .activecolor {
|
|
249
|
+
color: #ee5d56 !important;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.tab-list .btnTab span, .tab-list .popovertablf span {
|
|
253
|
+
display: inline-block;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
.tab-list .icon-more {
|
|
259
|
+
color: #ee5d56;
|
|
260
|
+
font-size: 20px;
|
|
261
|
+
font-weight: 900;
|
|
262
|
+
display: inline-block;
|
|
263
|
+
vertical-align: 0.5em;
|
|
264
|
+
margin-top: -3px;
|
|
265
|
+
cursor: pointer;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.Stats-popover {
|
|
269
|
+
position: absolute;
|
|
270
|
+
right: 5px;
|
|
271
|
+
}
|
|
272
|
+
</style>
|
|
273
|
+
<style>
|
|
274
|
+
.el-popover1 {
|
|
275
|
+
min-width: inherit !important;
|
|
201
276
|
}
|
|
202
277
|
</style>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="field-top">
|
|
3
|
-
<div
|
|
4
|
-
|
|
3
|
+
<div style="width:100%;display:flex;">
|
|
4
|
+
<div v-if="model !== null" class="ct-text ct-flex-div max-flex-div" style="flex:1;"
|
|
5
|
+
:class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'',model.attrs.size?'ct-font-size-'+model.attrs.size:'']"
|
|
6
|
+
@mouseover="mouseOverHandle" @mouseout="mouseOutHandle">
|
|
5
7
|
<div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div max-input-group" :class="[model.labelClass]">
|
|
6
8
|
<span>{{model.label}}</span>
|
|
7
9
|
</div>
|
|
@@ -19,13 +21,14 @@
|
|
|
19
21
|
</el-input>
|
|
20
22
|
|
|
21
23
|
<span v-if="model.sufLabel" class="spanMessage ct-flex-div-span">{{model.sufLabel}}</span>
|
|
22
|
-
<transition name="el-fade-in" class="ct-flex-div-span">
|
|
23
|
-
<span v-show="!valid" class="errorMessage ">
|
|
24
|
-
{{validMessage}}
|
|
25
|
-
</span>
|
|
26
|
-
</transition>
|
|
27
24
|
<ctQuickInputSos v-if="!model.lock && model.paramName" class="ct-flex-div-span" :pn="model.paramName" :action="api" @click="model.value=$event"></ctQuickInputSos>
|
|
28
25
|
</div>
|
|
26
|
+
<transition name="el-fade-in" class="ct-flex-div-span">
|
|
27
|
+
<span v-show="!valid" class="errorMessage ">
|
|
28
|
+
{{validMessage}}
|
|
29
|
+
</span>
|
|
30
|
+
</transition>
|
|
31
|
+
</div>
|
|
29
32
|
</div>
|
|
30
33
|
</template>
|
|
31
34
|
<script>
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
export default {
|
|
35
38
|
name: 'ct-text',
|
|
36
39
|
mixins: [dynamicElement],
|
|
37
|
-
|
|
40
|
+
components: {
|
|
38
41
|
'ctQuickInputSos': ctQuickInputSos,
|
|
39
42
|
},
|
|
40
43
|
props: {
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import base from '../../index';
|
|
2
|
+
import LibFunction from './lib/LibFunction';
|
|
3
|
+
import common from '../../../common/index';
|
|
4
|
+
import Router from './Router';
|
|
5
|
+
import Enum from './lib/Enum';
|
|
6
|
+
import Vue from 'vue';
|
|
7
|
+
|
|
8
|
+
const Repeat = function (source, master, isFormList) {
|
|
9
|
+
var rtn = {
|
|
10
|
+
form: null,
|
|
11
|
+
refField: Object,
|
|
12
|
+
refFieldsLabel: Object,
|
|
13
|
+
get id() {
|
|
14
|
+
return source.name;
|
|
15
|
+
},
|
|
16
|
+
get type() {
|
|
17
|
+
return master.controlType;
|
|
18
|
+
},
|
|
19
|
+
get label() {
|
|
20
|
+
return master.dn || '';
|
|
21
|
+
},
|
|
22
|
+
get source() {
|
|
23
|
+
return source;
|
|
24
|
+
},
|
|
25
|
+
get master() {
|
|
26
|
+
return master;
|
|
27
|
+
},
|
|
28
|
+
get title() {
|
|
29
|
+
return master.controlLabel || '';
|
|
30
|
+
},
|
|
31
|
+
get show() {
|
|
32
|
+
if (typeof master.show !== "undefined") {
|
|
33
|
+
return master.show;
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
},
|
|
37
|
+
get create() {
|
|
38
|
+
return source.rightNew === true;
|
|
39
|
+
},
|
|
40
|
+
get required() {
|
|
41
|
+
return master.required;
|
|
42
|
+
},
|
|
43
|
+
set required(v) {
|
|
44
|
+
master.required = false;
|
|
45
|
+
},
|
|
46
|
+
get primaryKeys() {
|
|
47
|
+
return source.primaryKeys;
|
|
48
|
+
},
|
|
49
|
+
//get rowEdit() {
|
|
50
|
+
// return source.editMode !== true;
|
|
51
|
+
//},
|
|
52
|
+
get dialogEdit() {
|
|
53
|
+
return source.editMode === 1;
|
|
54
|
+
},
|
|
55
|
+
get showSummary() {
|
|
56
|
+
return source.totalCols.length > 0;
|
|
57
|
+
},
|
|
58
|
+
get totalColTitle() {
|
|
59
|
+
return source.totalColTitle;
|
|
60
|
+
},
|
|
61
|
+
get totalCols() {
|
|
62
|
+
return source.totalCols;
|
|
63
|
+
},
|
|
64
|
+
set tableDisabled(v) {
|
|
65
|
+
source.disabled = v;
|
|
66
|
+
},
|
|
67
|
+
get tableDisabled() {
|
|
68
|
+
return source.disabled || false;
|
|
69
|
+
},
|
|
70
|
+
getFormObj() {
|
|
71
|
+
let rtnFormArr = [];
|
|
72
|
+
for (let i = 0; i < rtn.tableData.length; i++) {
|
|
73
|
+
let rtnFormObj = {};
|
|
74
|
+
rtn.tableData[i].field.forEach((s) => {
|
|
75
|
+
Object.assign(rtnFormObj, s.getFormObj());
|
|
76
|
+
});
|
|
77
|
+
rtnFormObj.flagDeleted = rtn.tableData[i].deleted;
|
|
78
|
+
rtnFormObj.flagNew = rtn.tableData[i].isNewFlag;
|
|
79
|
+
rtnFormArr.push(rtnFormObj);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
let rtnObj = {};
|
|
83
|
+
Object.defineProperty(rtnObj, master.fieldName1, {
|
|
84
|
+
get: function () {
|
|
85
|
+
return rtnFormArr;
|
|
86
|
+
},
|
|
87
|
+
enumerable: true,
|
|
88
|
+
configurable: true
|
|
89
|
+
});
|
|
90
|
+
console.log(rtnObj);
|
|
91
|
+
return rtnObj;
|
|
92
|
+
},
|
|
93
|
+
_buttons: null,
|
|
94
|
+
get buttons() {
|
|
95
|
+
if (rtn._buttons !== null) {
|
|
96
|
+
return rtn._buttons;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
rtn._buttons = [];
|
|
100
|
+
if (source.actionRouters) {
|
|
101
|
+
source.actionRouters.forEach((v) => {
|
|
102
|
+
var button = Router(v);
|
|
103
|
+
button.is = "ct-btn";
|
|
104
|
+
rtn._buttons.push(button);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return rtn._buttons;
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
_rows: null,
|
|
111
|
+
get rows() {
|
|
112
|
+
|
|
113
|
+
if (this._rows) {
|
|
114
|
+
return this._rows;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this._rows = [];
|
|
118
|
+
//遍历每一行
|
|
119
|
+
source.rows.forEach((r) => {
|
|
120
|
+
var row = rtn.initRow(r);
|
|
121
|
+
this._rows.push(row);
|
|
122
|
+
});
|
|
123
|
+
return this._rows;
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
initRow(r) {
|
|
127
|
+
var row = {
|
|
128
|
+
field: [],
|
|
129
|
+
get delete() {//删除权限
|
|
130
|
+
return r.rightDelete === true;
|
|
131
|
+
},
|
|
132
|
+
get edit() {
|
|
133
|
+
return r.rightEdit === true;
|
|
134
|
+
},
|
|
135
|
+
get deleted() {//是否已删除
|
|
136
|
+
return r.flagDeleted === true;
|
|
137
|
+
},
|
|
138
|
+
set deleted(v) {
|
|
139
|
+
if (v) {
|
|
140
|
+
r.flagDeleted = true;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
r.flagDeleted = false;
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
get guid() {
|
|
147
|
+
return rtn.guid();
|
|
148
|
+
},
|
|
149
|
+
set guid(v) {
|
|
150
|
+
r.guid = v;
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
//遍历每一列
|
|
154
|
+
let rowIndex = 0;
|
|
155
|
+
//for (var key in source.fields) {
|
|
156
|
+
r.columns.forEach((value) => {
|
|
157
|
+
//let value = source.fields[key];
|
|
158
|
+
value.onChanged = value.onChange ? value.onChange : source.rows[0].columns[rowIndex].onChanged;//事件使用第一条的
|
|
159
|
+
value.onBlur = value.onBlur ? value.onBlur : source.rows[0].columns[rowIndex].onBlur;//事件使用第一条的
|
|
160
|
+
rowIndex++;
|
|
161
|
+
let showLabel = true;
|
|
162
|
+
if (isFormList) {
|
|
163
|
+
showLabel = false;
|
|
164
|
+
}
|
|
165
|
+
let item = LibFunction.GetControl(value, source, showLabel, false);
|
|
166
|
+
if (item instanceof Object) {
|
|
167
|
+
item.form = rtn.form;
|
|
168
|
+
row.field.push(item);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
//}
|
|
172
|
+
return row;
|
|
173
|
+
},
|
|
174
|
+
_tableData: undefined,
|
|
175
|
+
get tableData() {
|
|
176
|
+
if (this._tableData) {
|
|
177
|
+
return this._tableData;
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
this._tableData = [];
|
|
181
|
+
let rows = rtn.rows;
|
|
182
|
+
if (rows.length > 1) {
|
|
183
|
+
for (let i = 1; i < rows.length; i++) {//遍历每一行
|
|
184
|
+
this._tableData.push(rows[i]);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
let newRow = this.getCloneRowData(0)
|
|
189
|
+
this.tableData.push(newRow);
|
|
190
|
+
this.addSourceRow();
|
|
191
|
+
}
|
|
192
|
+
return this._tableData;
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
addSourceRow() {
|
|
196
|
+
let sourceRow = JSON.parse(JSON.stringify(source.rows[0]));
|
|
197
|
+
source.rows.push(sourceRow);
|
|
198
|
+
let iRow = this.initRow(sourceRow);
|
|
199
|
+
iRow.isNewFlag = true;
|
|
200
|
+
iRow.guid = this.guid();
|
|
201
|
+
rtn._rows.push(iRow);
|
|
202
|
+
},
|
|
203
|
+
getCloneRowData(index) {
|
|
204
|
+
let sourceRow = source.rows[index];
|
|
205
|
+
let rowData = rtn.initRow(JSON.parse(JSON.stringify(sourceRow)));
|
|
206
|
+
rowData.isNewFlag = true;
|
|
207
|
+
rowData.guid = this.guid();
|
|
208
|
+
return rowData;
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
get formListChange() {
|
|
212
|
+
return master.onChanged;
|
|
213
|
+
},
|
|
214
|
+
deleteRow(index, callback) {
|
|
215
|
+
Vue.prototype.$common.confirm("确定删除?", "提示", {
|
|
216
|
+
confirmButtonText: "确定",
|
|
217
|
+
cancelButtonText: "取消",
|
|
218
|
+
}).then(() => {
|
|
219
|
+
if (rtn.rows[index].isNewFlag) {
|
|
220
|
+
rtn.rows.splice(index, 1);
|
|
221
|
+
source.rows.splice(index, 1);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
rtn.rows[index].deleted = true;
|
|
225
|
+
}
|
|
226
|
+
callback();
|
|
227
|
+
}).catch(() => {
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
guid() {
|
|
231
|
+
return (rtn.S4() + rtn.S4() + '-' + rtn.S4() + '-' + rtn.S4() + '-' + rtn.S4() + '-' + rtn.S4() + rtn.S4() + rtn.S4()
|
|
232
|
+
);
|
|
233
|
+
},
|
|
234
|
+
S4() {
|
|
235
|
+
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
};
|
|
239
|
+
return rtn;
|
|
240
|
+
};
|
|
241
|
+
export default Repeat;
|
|
@@ -32,6 +32,7 @@ import PlaceHolder from '../PlaceHolder';
|
|
|
32
32
|
import SensitiveEye from '../SensitiveEye';
|
|
33
33
|
import Cb from '../Cb';
|
|
34
34
|
import PhotoSelect from '../PhotoSelect';
|
|
35
|
+
import Repeat from '../Repeat';
|
|
35
36
|
|
|
36
37
|
const LibFunction = {
|
|
37
38
|
install(Vue) {
|
|
@@ -206,6 +207,17 @@ const LibFunction = {
|
|
|
206
207
|
//item.is = 'ct-form-list';
|
|
207
208
|
item.is = 'ct-form-list-table';
|
|
208
209
|
break;
|
|
210
|
+
case Enum.ControlType.Repeat://重复
|
|
211
|
+
var listobj = source.list.find((v1) => {
|
|
212
|
+
return v1.name === field.fieldName1;
|
|
213
|
+
});
|
|
214
|
+
if (!listobj) {
|
|
215
|
+
console.error("找不到对应的list:" + field.fieldName1);
|
|
216
|
+
}
|
|
217
|
+
listobj.scripts = source.scripts;
|
|
218
|
+
item = Repeat(listobj, field);
|
|
219
|
+
item.is = 'ct-repeat';
|
|
220
|
+
break;
|
|
209
221
|
case Enum.ControlType.Hidden://隐藏控件
|
|
210
222
|
item = Hd(field);
|
|
211
223
|
break;
|
|
@@ -38,6 +38,7 @@ const loader = {
|
|
|
38
38
|
PhotoSelectList: require("./ctl/PhotoSelectList.js").default,
|
|
39
39
|
QuickInputSos: require("./ctl/QuickInputSos.js").default,
|
|
40
40
|
ContactList: require("./ctl/ContactList.js").default,
|
|
41
|
+
Repeat: require("./ctl/Repeat.js").default,
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
export default loader;
|
package/src/main.js
CHANGED
|
@@ -13,7 +13,7 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
15
|
baseUrl: "http://10.88.22.46:7070/v1/form/router",
|
|
16
|
-
// baseUrl: "http://
|
|
16
|
+
// baseUrl: "http://10.1.245.111:38028/v1/form/router",
|
|
17
17
|
// baseUrl: "http://10.88.22.46:7070/",
|
|
18
18
|
// flagRouterSelf: true,
|
|
19
19
|
zindex: 999,
|
|
@@ -36,7 +36,7 @@ Vue.use(centaline, {
|
|
|
36
36
|
// 获取请求头
|
|
37
37
|
getRequestHeaders: function () {
|
|
38
38
|
return {
|
|
39
|
-
oldToken: '
|
|
39
|
+
oldToken: '5e730b63-1439-4850-9e88-4a83c8609525',
|
|
40
40
|
estateId: '20210729104021C49F04B55C50F6AF58',
|
|
41
41
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
42
42
|
Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE0NmU5ZjEzLTVjMmYtNGVlMy1hM2U5LWIxM2QyZThjZTBhZSJ9.Gl8K5lbG7t5DyCqouu7Ux7Oh9xuAxqdOXr4JnoHCN-YwC3b2zPO-C2sHbYJUZHYQPa7kTNRmg1xJiwugpVo5Xw',
|