centaline-data-driven-v3 0.0.93 → 0.0.95
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/dist/centaline-data-driven-v3.umd.js +51 -51
- package/package.json +1 -1
- package/src/components/app/Form.vue +6 -9
- package/src/components/app/ViewerFile/ViewerP360.vue +4 -1
- package/src/components/web/CheckBoxList.vue +1 -1
- package/src/components/web/ViewerFile/ViewerP360.vue +4 -1
- package/src/loader/src/SearchScreen.js +392 -2
- package/src/loader/src/SearchTable.js +3 -1
- package/src/main.js +2 -2
- package/src/utils/Enum.js +5 -0
- package/src/views/SearchList.vue +4 -4
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<div class="safe-area-inset-bottom-height"></div>
|
|
83
83
|
</div>
|
|
84
84
|
<div class="button-absoluteAPP"
|
|
85
|
-
v-if="(common.flagMicroMessenger() || common.flagHK()) && model.buttons.findIndex((v) => { return v.show }) > -1">
|
|
85
|
+
v-if="(common.flagMicroMessenger() || common.flagHK()) && model.buttons.findIndex((v) => { return v.show }) > -1 && buttonShow">
|
|
86
86
|
<template v-for="(field, index) in model.buttons" :key="index">
|
|
87
87
|
<component v-if="field.show !== false" ref="Fields" :is="field.is" :vmodel="field"
|
|
88
88
|
:parameterAction="model.parameterAction" v-bind="field.bindPara" @fieldClick="clickHandler" />
|
|
@@ -150,6 +150,7 @@ const refForm = ref()
|
|
|
150
150
|
const buttons = ref([])
|
|
151
151
|
const actions = ref([])
|
|
152
152
|
const show = ref(false)
|
|
153
|
+
const buttonShow = ref(true)
|
|
153
154
|
init()
|
|
154
155
|
//初始化数据
|
|
155
156
|
function init() {
|
|
@@ -159,15 +160,11 @@ function init() {
|
|
|
159
160
|
if (isAndroid) {
|
|
160
161
|
// 动态检测键盘状态
|
|
161
162
|
let viewportHeight = window.innerHeight;
|
|
162
|
-
|
|
163
163
|
window.addEventListener('resize', () => {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
document.querySelector('.button-absoluteAPP').style.bottom = `${keyboardHeight}px`;
|
|
169
|
-
} else { // 键盘收起
|
|
170
|
-
document.querySelector('.button-absoluteAPP').style.bottom = '0';
|
|
164
|
+
if (window.innerHeight < viewportHeight) {
|
|
165
|
+
buttonShow.value = false
|
|
166
|
+
} else {
|
|
167
|
+
buttonShow.value = true
|
|
171
168
|
}
|
|
172
169
|
});
|
|
173
170
|
}
|
|
@@ -23,6 +23,9 @@ onMounted(() => {
|
|
|
23
23
|
function init() {
|
|
24
24
|
loading.value = true
|
|
25
25
|
if (panoramaContainer.value) {
|
|
26
|
+
if (PSV.value) {
|
|
27
|
+
PSV.value.destroy(); // 销毁旧实例
|
|
28
|
+
}
|
|
26
29
|
PSV.value = new PhotoSphereViewer({
|
|
27
30
|
container: panoramaContainer.value,
|
|
28
31
|
panorama: props.imgUrl, // 替换为你的全景图片路径
|
|
@@ -66,7 +69,7 @@ function enterFullscreen() {
|
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
|
|
69
|
-
watch(() => props.
|
|
72
|
+
watch(() => props.imgUrl, () => {
|
|
70
73
|
init();
|
|
71
74
|
//complete();
|
|
72
75
|
})
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<span v-html="item.name" style="line-height: 16px;"></span>
|
|
12
12
|
<el-icon :size="18" v-if="item.toolTip" style="margin-left: 5px;">
|
|
13
13
|
<el-tooltip raw-content :content="item.toolTip" placement="top" effect="light">
|
|
14
|
-
<
|
|
14
|
+
<InfoFilled />
|
|
15
15
|
</el-tooltip>
|
|
16
16
|
</el-icon>
|
|
17
17
|
</el-checkbox>
|
|
@@ -20,6 +20,9 @@ onMounted(() => {
|
|
|
20
20
|
|
|
21
21
|
function init() {
|
|
22
22
|
if (panoramaContainer.value) {
|
|
23
|
+
if (PSV.value) {
|
|
24
|
+
PSV.value.destroy(); // 销毁旧实例
|
|
25
|
+
}
|
|
23
26
|
PSV.value = new PhotoSphereViewer({
|
|
24
27
|
container: panoramaContainer.value,
|
|
25
28
|
panorama: props.imgUrl, // 替换为你的全景图片路径
|
|
@@ -74,7 +77,7 @@ const viewerHeight = computed(() => {
|
|
|
74
77
|
return props.height
|
|
75
78
|
}
|
|
76
79
|
})
|
|
77
|
-
watch(() => props.
|
|
80
|
+
watch(() => props.imgUrl, () => {
|
|
78
81
|
init();
|
|
79
82
|
//complete();
|
|
80
83
|
})
|
|
@@ -3,7 +3,6 @@ import LibFunction from './LibFunction';
|
|
|
3
3
|
import Enum from '../../utils/Enum';
|
|
4
4
|
import common from '../../utils/common';
|
|
5
5
|
import request from '../../utils/request';
|
|
6
|
-
import formData from '../../utils/formData';
|
|
7
6
|
|
|
8
7
|
function loadSearchScreenApi(action, callBack, screenPara, prevParam, failCallBack) {
|
|
9
8
|
if (action) {
|
|
@@ -28,7 +27,398 @@ function loadSearchScreenApi(action, callBack, screenPara, prevParam, failCallBa
|
|
|
28
27
|
}
|
|
29
28
|
function loadSearchScreenModel(source, prevParam) {
|
|
30
29
|
let rtn = {
|
|
31
|
-
formData:
|
|
30
|
+
formData:{
|
|
31
|
+
form: null,
|
|
32
|
+
formTable: null,
|
|
33
|
+
excuteData: null,//fields
|
|
34
|
+
fieldsDic: null,//fieldsDic
|
|
35
|
+
source:null,
|
|
36
|
+
_excuteListData: undefined,
|
|
37
|
+
enableRelationFields(FlagRelation) {
|
|
38
|
+
this.form.enableRelationFields = FlagRelation
|
|
39
|
+
},
|
|
40
|
+
//获取code1
|
|
41
|
+
getCode1ByField1(id) {
|
|
42
|
+
var rtn1 = this.fieldsDic[id];
|
|
43
|
+
if (rtn1) {
|
|
44
|
+
return rtn1.code1;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
//获取code2
|
|
49
|
+
getCode2ByField1(id) {
|
|
50
|
+
var rtn1 = this.fieldsDic[id];
|
|
51
|
+
if (rtn1) {
|
|
52
|
+
return rtn1.code2;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
setActionRouter(id, attrKey, attrValue) {
|
|
56
|
+
var router = this.form.actionRouters.find((v1) => {
|
|
57
|
+
return v1.key === id;
|
|
58
|
+
});
|
|
59
|
+
if (router) {
|
|
60
|
+
router[attrKey] = attrValue;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
//获取Field的属性attrKey的值
|
|
64
|
+
getValueByFieldName(id, attrKey) {
|
|
65
|
+
attrKey = common.initialsToLowerCase(attrKey);
|
|
66
|
+
var rtn1 = this.fieldsDic[id];
|
|
67
|
+
if (rtn1) {
|
|
68
|
+
return rtn1[attrKey];
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
getValueByFieldNameFromParent(id, attrKey) {
|
|
72
|
+
if (this.form && this.form.parentModelForm) {
|
|
73
|
+
return this.form.parentModelForm.getValueByFieldName(id, attrKey);
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
},
|
|
77
|
+
//设置Field的属性attrKey的值
|
|
78
|
+
setValueByFieldName(id, attrKey, attrValue) {
|
|
79
|
+
attrKey = common.initialsToLowerCase(attrKey);
|
|
80
|
+
var rtn1 = this.fieldsDic[id];
|
|
81
|
+
if (rtn1) {
|
|
82
|
+
if (attrKey == 'code1' && rtn1.controlType === Enum.ControlType.NumericTextBox
|
|
83
|
+
&& attrValue != undefined && attrValue != null && attrValue != '') {
|
|
84
|
+
if (rtn1.decimals1 != undefined && rtn1.decimals1 != null && rtn1.decimals1 > -1) {
|
|
85
|
+
attrValue = Number(attrValue).toFixed(rtn1.decimals1)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else if (attrKey == 'code1' && (rtn1.controlType === Enum.ControlType.File
|
|
89
|
+
|| rtn1.controlType === Enum.ControlType.SliceUpload || rtn1.controlType === Enum.ControlType.PhotoSelect)
|
|
90
|
+
&& attrValue != undefined && attrValue != null && attrValue != '') {
|
|
91
|
+
rtn1.jsSetFile(attrValue, rtn1);
|
|
92
|
+
}
|
|
93
|
+
rtn1[attrKey] = attrValue;
|
|
94
|
+
if (rtn1.controlType === Enum.ControlType.Tags) {
|
|
95
|
+
rtn1["value"] = JSON.parse(attrValue);
|
|
96
|
+
}
|
|
97
|
+
if (rtn1.controlType === Enum.ControlType.SearchListBox
|
|
98
|
+
|| rtn1.controlType === Enum.ControlType.ComboBox
|
|
99
|
+
|| rtn1.controlType === Enum.ControlType.MultiSelectWithSearch
|
|
100
|
+
|| rtn1.controlType === Enum.ControlType.MultiSelectNoSearch
|
|
101
|
+
) {
|
|
102
|
+
if (rtn1["options"].length == 0) {
|
|
103
|
+
rtn1["options"] = [{ value: '', label: '' }];
|
|
104
|
+
}
|
|
105
|
+
if (attrKey == 'code1') {
|
|
106
|
+
rtn1["value"] = attrValue;
|
|
107
|
+
rtn1["options"][0]["value"] = attrValue
|
|
108
|
+
}
|
|
109
|
+
if (attrKey == 'name1') {
|
|
110
|
+
rtn1["options"][0]["label"] = attrValue
|
|
111
|
+
}
|
|
112
|
+
if (rtn1.itemKey) rtn1.itemKey = Math.random()
|
|
113
|
+
}
|
|
114
|
+
if (rtn1.is == 'ct-button') {
|
|
115
|
+
if (common.flagApp() && this.form.$vue.loaded) {
|
|
116
|
+
this.form.$vue.loaded(this.form)
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
this.source.hiddenHandle(rtn1, this.form);
|
|
120
|
+
if(this.source.requiredHandle){
|
|
121
|
+
this.source.requiredHandle(rtn1, this.form);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
setValueByFieldNameFromParent(id, attrKey, attrValue) {
|
|
126
|
+
if (this.form && this.form.parentModelForm) {
|
|
127
|
+
return this.form.parentModelForm.setValueByFieldName(id, attrKey, attrValue);
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
},
|
|
131
|
+
//设置Field的v1、v2的值
|
|
132
|
+
setV1AndV2ByField1(id, code1, code2) {
|
|
133
|
+
var rtn1 = this.fieldsDic[id];
|
|
134
|
+
if (rtn1) {
|
|
135
|
+
if (typeof rtn1.code1 !== 'undefined') {
|
|
136
|
+
rtn1.code1 = code1;
|
|
137
|
+
this.source.hiddenHandle(rtn1);//隐藏关联的
|
|
138
|
+
}
|
|
139
|
+
if (typeof rtn1.code2 !== 'undefined') {
|
|
140
|
+
rtn1.code2 = code2;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
clearMedia(id) {
|
|
145
|
+
var rtn1 = this.fieldsDic[id];
|
|
146
|
+
for (let i = 0; i < rtn1.fileSourceList.length; i++) {
|
|
147
|
+
rtn1.fileSourceList[i].flagDeleted = true;
|
|
148
|
+
}
|
|
149
|
+
rtn1.fileList = [];
|
|
150
|
+
},
|
|
151
|
+
setTabsSelect(id) {
|
|
152
|
+
if (this.form && this.form.$vue) {
|
|
153
|
+
var f = this.fieldsDic[id];
|
|
154
|
+
if (this.form.isHorizontalLayout) {
|
|
155
|
+
this.form.$vue.activeName = f.collapseName.toString() === '-1' ? this.form.$vue.activeName : f.collapseName.toString();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
//路由提交
|
|
160
|
+
submit(fieldName1) {
|
|
161
|
+
if (this.form && this.form.$vue) {
|
|
162
|
+
this.form.$vue.fieldClickHandler({ fieldName1: fieldName1 });
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
//获取列表数据
|
|
167
|
+
get excuteListData() {
|
|
168
|
+
if (this._excuteListData) {
|
|
169
|
+
return this._excuteListData;
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
if (this.excuteData !== null) {
|
|
173
|
+
this._excuteListData = this.excuteData.filter((v) => {
|
|
174
|
+
return typeof v.is !== undefined && (v.is === 'ct-formlist' || v.is === 'ct-repeat');
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return this._excuteListData;
|
|
179
|
+
},
|
|
180
|
+
setExcuteListData(fields) {
|
|
181
|
+
this._excuteListData = null;
|
|
182
|
+
if (fields !== null) {
|
|
183
|
+
this.excuteData = fields;
|
|
184
|
+
this._excuteListData = fields.filter((v) => {
|
|
185
|
+
return typeof v.is !== undefined && (v.is === 'ct-formlist' || v.is === 'ct-repeat');
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
//获取列表的Field
|
|
190
|
+
getListField(tableName, rowNum, fiedlId) {
|
|
191
|
+
let listData = this.excuteListData.find((v) => {
|
|
192
|
+
return v.name === tableName;
|
|
193
|
+
});
|
|
194
|
+
if (listData) {
|
|
195
|
+
let field = null;
|
|
196
|
+
//正在编辑的Field
|
|
197
|
+
if (rowNum === null && (fiedlId === null || listData.currentEventField.fieldName1 === fiedlId)) {
|
|
198
|
+
field = listData.currentEventField;
|
|
199
|
+
}
|
|
200
|
+
//正在编辑的行
|
|
201
|
+
else if (rowNum === null && listData.currentRowIndex === 0) {
|
|
202
|
+
let fields = listData.currentRow.data;
|
|
203
|
+
field = fields[fiedlId];
|
|
204
|
+
}
|
|
205
|
+
//源数据
|
|
206
|
+
else {
|
|
207
|
+
if (rowNum === null && listData.currentRowIndex) {
|
|
208
|
+
rowNum = listData.currentRowIndex;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (rowNum === 0 || (rowNum && fiedlId)) {
|
|
212
|
+
try {
|
|
213
|
+
let fields = listData.rows[rowNum].field;
|
|
214
|
+
field = fields.find((v) => {
|
|
215
|
+
return v.fieldName1 === fiedlId;
|
|
216
|
+
});
|
|
217
|
+
} catch (e) {
|
|
218
|
+
if (listData.rows.length <= rowNum) {
|
|
219
|
+
common.message('获取列表行索引超出界限', 'error')
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return { listData: listData, field: field };
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
//获取列表的行数(注意 这里包括列头)
|
|
229
|
+
getListCount(tableName) {
|
|
230
|
+
tableName = tableName ? tableName : this.form.scripts.$fd;
|
|
231
|
+
let data = this.getListField(tableName, null, null);
|
|
232
|
+
if (data) {
|
|
233
|
+
return data.listData.rows.length;
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
//获取表格某行某列的值
|
|
237
|
+
getListFieldValue(tableName, rowNum, fiedlId, attrName, defaultValue) {
|
|
238
|
+
tableName = tableName ? tableName : this.form.scripts.$fd;
|
|
239
|
+
let data = this.getListField(tableName, rowNum, fiedlId);
|
|
240
|
+
|
|
241
|
+
attrName = common.initialsToLowerCase(attrName);
|
|
242
|
+
attrName = attrName ? attrName : 'code1';
|
|
243
|
+
|
|
244
|
+
if (!fiedlId) {
|
|
245
|
+
fiedlId = data.listData.currentEventField.fieldName1;
|
|
246
|
+
}
|
|
247
|
+
if (fiedlId && rowNum === null && fiedlId === data.listData.currentEventField.fieldName1) {
|
|
248
|
+
data.field = data.listData.currentEventField;
|
|
249
|
+
}
|
|
250
|
+
rowNum = rowNum !== null ? rowNum : data.listData.currentRowIndex;
|
|
251
|
+
|
|
252
|
+
//若该行正在编辑,则取编辑状态的。
|
|
253
|
+
if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
|
|
254
|
+
&& data.listData.currentRow.data.$sourceIndex === rowNum && data.listData.currentRow.isSet) {
|
|
255
|
+
return data.listData.currentRow.data[fiedlId][attrName];
|
|
256
|
+
}
|
|
257
|
+
else if (data && data.field) {
|
|
258
|
+
if (typeof defaultValue !== 'undefined' && data.listData.rows[rowNum].deleted) {//若该行被删除时,则直接返回默认值
|
|
259
|
+
return defaultValue;
|
|
260
|
+
}
|
|
261
|
+
return data.field[attrName];
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
//设置表格某行某列的值
|
|
265
|
+
setListFieldValue(value, tableName, rowNum, fiedlId, attrName, flagTemplate) {
|
|
266
|
+
value = value == undefined ? "" : value.toString();
|
|
267
|
+
tableName = tableName ? tableName : this.form.scripts.$fd;
|
|
268
|
+
let data = this.getListField(tableName, rowNum, fiedlId);
|
|
269
|
+
|
|
270
|
+
attrName = common.initialsToLowerCase(attrName);
|
|
271
|
+
attrName = attrName ? attrName : 'code1';
|
|
272
|
+
|
|
273
|
+
if (!fiedlId) {
|
|
274
|
+
fiedlId = data.listData.currentEventField.id;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
rowNum = rowNum ? rowNum : data.listData.currentRowIndex;
|
|
278
|
+
|
|
279
|
+
if (data) {
|
|
280
|
+
//正在编辑的行
|
|
281
|
+
if (data.listData.currentRow.data && data.listData.currentRow.data[fiedlId] && rowNum > -1
|
|
282
|
+
&& data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex) {
|
|
283
|
+
let currentField = data.listData.currentRow.data[fiedlId];
|
|
284
|
+
currentField[attrName] = value;
|
|
285
|
+
//校验自己
|
|
286
|
+
if (currentField.validExcute) {
|
|
287
|
+
currentField.validExcute();
|
|
288
|
+
}
|
|
289
|
+
if (data.field) {
|
|
290
|
+
data.field[attrName] = value;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
else if (data.field) {
|
|
294
|
+
if (data.field) {
|
|
295
|
+
data.field[attrName] = value;
|
|
296
|
+
}
|
|
297
|
+
if (data.field.source) {
|
|
298
|
+
data.field.source[attrName] = value;
|
|
299
|
+
}
|
|
300
|
+
if (flagTemplate) {
|
|
301
|
+
data.field[attrName] = value;
|
|
302
|
+
}
|
|
303
|
+
if (data.listData.flagTemplate && data.listData.$vue) {
|
|
304
|
+
data.listData.$vue.itemKey = Math.random()
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
//如果有汇总列,触发重新计算汇总
|
|
309
|
+
if (data.listData.showSummary) {
|
|
310
|
+
data.listData.tableData.push({});
|
|
311
|
+
data.listData.tableData.pop();
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
316
|
+
return false;
|
|
317
|
+
},
|
|
318
|
+
//设置表格选择路由
|
|
319
|
+
setListSelectRouter(tableId, attrKey, attrValue) {
|
|
320
|
+
let listData = this.excuteListData.find((v) => {
|
|
321
|
+
return v.fieldName1 === tableId;
|
|
322
|
+
});
|
|
323
|
+
if (listData) {
|
|
324
|
+
var router = listData.selectRouter;
|
|
325
|
+
if (router) {
|
|
326
|
+
router[attrKey] = attrValue;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
//设置表格属性值
|
|
331
|
+
setListAttr(tableId, attrName, attrValue) {
|
|
332
|
+
let listData = this.excuteListData.find((v) => {
|
|
333
|
+
return v.fieldName1 === tableId;
|
|
334
|
+
});
|
|
335
|
+
if (listData) {
|
|
336
|
+
listData[attrName] = attrValue
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
//新增表格数据
|
|
340
|
+
insertRow(tableId, rows) {
|
|
341
|
+
let listData = this.excuteListData.find((v) => {
|
|
342
|
+
return v.fieldName1 === tableId;
|
|
343
|
+
});
|
|
344
|
+
if (listData) {
|
|
345
|
+
listData.$vue.insertRow(rows);
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
//添加单选表格数据
|
|
349
|
+
insertSingleRow(tableId, row) {
|
|
350
|
+
let listData = this.excuteListData.find((v) => {
|
|
351
|
+
return v.fieldName1 === tableId;
|
|
352
|
+
});
|
|
353
|
+
if (listData) {
|
|
354
|
+
listData.$vue.insertSingleRow(row);
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
//新增或替换表格数据
|
|
358
|
+
insertOrUpdateRow(tableId, row) {
|
|
359
|
+
let listData = this.excuteListData.find((v) => {
|
|
360
|
+
return v.fieldName1 === tableId;
|
|
361
|
+
});
|
|
362
|
+
if (listData) {
|
|
363
|
+
listData.$vue.insertOrUpdateRow(row);
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
//删除表格数据
|
|
367
|
+
deleteRow(tableId, row) {
|
|
368
|
+
let listData = this.excuteListData.find((v) => {
|
|
369
|
+
return v.id === tableId;
|
|
370
|
+
});
|
|
371
|
+
if (listData) {
|
|
372
|
+
listData.$vue.delRow(row);
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
//清空表格数据
|
|
376
|
+
clear(tableId) {
|
|
377
|
+
let listData = this.excuteListData.find((v) => {
|
|
378
|
+
return v.fieldName1 === tableId;
|
|
379
|
+
});
|
|
380
|
+
if (listData) {
|
|
381
|
+
listData.$vue.deleteAll();
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
|
|
385
|
+
//获取后台数据,并返回脚本。
|
|
386
|
+
execServerScript(action, object, successCallback) {
|
|
387
|
+
let formData = this;//作用域保存
|
|
388
|
+
|
|
389
|
+
//是否是行内触发的
|
|
390
|
+
let data = this.getListField(this.form.scripts.$fd, null, null);
|
|
391
|
+
object.editMode = data ? 1 : 0;
|
|
392
|
+
|
|
393
|
+
request.postHandler(common.globalUri(), { action: action, para: object }).then(
|
|
394
|
+
function (response) {
|
|
395
|
+
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
396
|
+
var data = response.content;
|
|
397
|
+
if (response.clientActionType === Enum.ClientActionType.ExcuteScript && data) {
|
|
398
|
+
common.excute.call(formData.form.scripts, data);
|
|
399
|
+
}
|
|
400
|
+
else
|
|
401
|
+
if (response.clientActionType === Enum.ClientActionType.None && data && successCallback) {
|
|
402
|
+
//因为要传参,并直接执行方法,故successCallback回调里要使用formData的话,要加this
|
|
403
|
+
//若不能接受this,也可修改common.excute方法
|
|
404
|
+
//successCallback.call(formData.form.scripts, data);
|
|
405
|
+
|
|
406
|
+
//优化,不需要加this
|
|
407
|
+
common.excuteFun.call(formData.form.scripts, successCallback, data);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
},
|
|
413
|
+
execRouter(routerKey) {
|
|
414
|
+
let field = { fieldName1: routerKey };
|
|
415
|
+
this.form.$vue.fieldClickHandler(field);
|
|
416
|
+
},
|
|
417
|
+
//消息提示 type主题:success/warning/info/error。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。 showClose 是否显示关闭按钮。
|
|
418
|
+
message(message, type, center, duration, showClose, dangerouslyUseHTMLString) {
|
|
419
|
+
common.message(message, type, center, duration, showClose, dangerouslyUseHTMLString)
|
|
420
|
+
},
|
|
421
|
+
},
|
|
32
422
|
get title() {
|
|
33
423
|
return source.title;
|
|
34
424
|
},
|
|
@@ -208,6 +208,9 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
208
208
|
else if (rtn.sortString) {
|
|
209
209
|
return rtn.sortString;
|
|
210
210
|
}
|
|
211
|
+
else if (source.page.orderBy) {
|
|
212
|
+
return source.page.orderBy;
|
|
213
|
+
}
|
|
211
214
|
},
|
|
212
215
|
get pageIndex() {
|
|
213
216
|
return rtn.pageIndex;
|
|
@@ -742,7 +745,6 @@ function apiData(model, callback) {
|
|
|
742
745
|
}
|
|
743
746
|
model.isLoading = true;
|
|
744
747
|
var newSearchModel = model.getSearchData();
|
|
745
|
-
|
|
746
748
|
request.postHandler(common.globalUri(), {
|
|
747
749
|
action: model.searchAction,
|
|
748
750
|
para: {
|
package/src/main.js
CHANGED
|
@@ -30,7 +30,7 @@ app.use(centaline, {
|
|
|
30
30
|
//baseUrl: "http://10.1.245.111:38028/",
|
|
31
31
|
|
|
32
32
|
flagRouterSelf: true,
|
|
33
|
-
flagApp:
|
|
33
|
+
flagApp: false,//是否app端
|
|
34
34
|
zindex: 999,
|
|
35
35
|
showRequestSuccessMessage: true,
|
|
36
36
|
showRequestErrorMessage: false,
|
|
@@ -68,7 +68,7 @@ app.use(centaline, {
|
|
|
68
68
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
69
69
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
70
70
|
//authObject: '{token:"1-bce18a8d-21f0-4022-a6ca-450de105cafc"}',
|
|
71
|
-
authObject: '{EmpID:"
|
|
71
|
+
authObject: '{EmpID:"Token_cf665522-aa5a-478c-b33a-0eac9ea30cee",MachineCode:"ae184643-f8e2-453c-a752-ba82612b592f",SSO_Token:"SSOToken_cf665522-aa5a-478c-b33a-0eac9ea30cee",Platform:"WEB"}',
|
|
72
72
|
};
|
|
73
73
|
},
|
|
74
74
|
getToken() {
|
package/src/utils/Enum.js
CHANGED
package/src/views/SearchList.vue
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyPublishList/getLayoutOfSearch'"
|
|
4
4
|
:searchDataApi="'/propertyPublishList/getListOfSearchModel'"
|
|
5
|
-
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
|
|
5
|
+
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
|
|
6
6
|
|
|
7
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
|
|
8
|
-
:searchDataApi="'/propertyTenderList/getListOfSearchModel'"></ct-searchlist>
|
|
7
|
+
<!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
|
|
8
|
+
:searchDataApi="'/propertyTenderList/getListOfSearchModel'"></ct-searchlist> -->
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
<!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/AttendanceClassList/getLayoutOfSearch'"
|