centaline-data-driven 1.6.22 → 1.6.23
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/release-log.md +7 -0
- package/src/centaline/dialogList/src/dialog.vue +6 -0
- package/src/centaline/dynamicComboBoxWithTextBox/src/dynamicComboBoxWithTextBox.vue +6 -1
- package/src/centaline/dynamicDetail/src/dynamicCustomerSimpleDetail.vue +3 -0
- package/src/centaline/dynamicDetail/src/dynamicEstateBuildingDetail.vue +3 -0
- package/src/centaline/dynamicDetail/src/dynamicEstateSimpleDetail.vue +3 -0
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +3 -0
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +5 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +3 -0
- package/src/centaline/dynamicDrop/src/dynamicDrop.vue +4 -1
- package/src/centaline/dynamicForm/src/dynamicForm.vue +19 -0
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +4 -0
- package/src/centaline/dynamicL/src/dynamicL.vue +28 -31
- package/src/centaline/dynamicMo/src/dynamicMo.vue +8 -2
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +4 -3
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +12 -0
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +18 -5
- package/src/centaline/dynamicSeg/src/dynamicSeg.vue +6 -1
- package/src/centaline/dynamicSo/src/dynamicSo.vue +8 -2
- package/src/centaline/dynamicSos/src/dynamicSos.vue +14 -4
- package/src/centaline/dynamicSosTt/src/dynamicSosTt.vue +12 -3
- package/src/centaline/dynamicSteps/src/dynamicSteps.vue +4 -0
- package/src/centaline/dynamicT/src/dynamicT.vue +9 -1
- package/src/centaline/dynamicTags/src/dynamicTags.vue +12 -3
- package/src/centaline/dynamicTree/src/dynamicSearchTree.vue +4 -1
- package/src/centaline/formData/index.js +4 -4
- package/src/centaline/loader/src/ctl/SearchScreen.js +377 -2
- package/src/centaline/loader/src/ctl/SearchTable.js +378 -2
- package/src/centaline/mixins/dynamicElement.js +13 -3
- package/src/centaline/quickInput/src/quickInput.vue +4 -1
- package/src/centaline/quickInputSos/src/quickInput.vue +9 -1
- package/src/centaline/selectOption/src/selectOptionVertical.vue +3 -0
- package/src/main.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +2690 -1767
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -2,8 +2,8 @@ import template from '../../../templates/index';
|
|
|
2
2
|
import common from '../../../common';
|
|
3
3
|
import Router from './Router';
|
|
4
4
|
import Vue from 'vue';
|
|
5
|
+
import Axios from 'axios';
|
|
5
6
|
import Enum from './lib/Enum';
|
|
6
|
-
import formData from '../../../formData';
|
|
7
7
|
const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSearchData, postThenHandler,action) {
|
|
8
8
|
var init = function (source) {
|
|
9
9
|
var rtn = {
|
|
@@ -1031,7 +1031,383 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
1033
|
},
|
|
1034
|
-
formData: formData,
|
|
1034
|
+
// formData: formData,
|
|
1035
|
+
formData:{
|
|
1036
|
+
common: common,
|
|
1037
|
+
Axios: Axios,
|
|
1038
|
+
form: null,
|
|
1039
|
+
formTable:null,
|
|
1040
|
+
excuteData: null,//fields
|
|
1041
|
+
fieldsDic: null,//fieldsDic
|
|
1042
|
+
_excuteListData: undefined,
|
|
1043
|
+
|
|
1044
|
+
//获取code1
|
|
1045
|
+
getCode1ByField1(id) {
|
|
1046
|
+
var rtn1 = this.fieldsDic[id];
|
|
1047
|
+
if (rtn1) {
|
|
1048
|
+
return rtn1.value;
|
|
1049
|
+
}
|
|
1050
|
+
},
|
|
1051
|
+
//获取code2
|
|
1052
|
+
getCode2ByField1(id) {
|
|
1053
|
+
var rtn1 = this.fieldsDic[id];
|
|
1054
|
+
if (rtn1) {
|
|
1055
|
+
return rtn1.value1;
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
//获取Field的属性attrKey的值
|
|
1059
|
+
getValueByFieldName(id, attrKey) {
|
|
1060
|
+
attrKey = this.common.initialsToLowerCase(attrKey);
|
|
1061
|
+
var rtn1 = this.fieldsDic[id];
|
|
1062
|
+
if (rtn1) {
|
|
1063
|
+
if(rtn1.is && rtn1.is=='ct-btn'){
|
|
1064
|
+
return rtn1[attrKey];
|
|
1065
|
+
}
|
|
1066
|
+
return rtn1.source[attrKey];
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
getValueByFieldNameFromParent(id, attrKey) {
|
|
1070
|
+
if(this.form && this.form.self && this.form.self.$parent){
|
|
1071
|
+
return this.form.self.$parent.vmodel.content[0].on.getValueByFieldName(id, attrKey);
|
|
1072
|
+
}
|
|
1073
|
+
return null;
|
|
1074
|
+
},
|
|
1075
|
+
//设置Field的属性attrKey的值
|
|
1076
|
+
setValueByFieldName(id, attrKey, attrValue) {
|
|
1077
|
+
attrKey = this.common.initialsToLowerCase(attrKey);
|
|
1078
|
+
var rtn1 = this.fieldsDic[id];
|
|
1079
|
+
if (rtn1) {
|
|
1080
|
+
if (attrKey == 'code1' && rtn1.source.controlType === 4
|
|
1081
|
+
&& attrValue != undefined && attrValue != null && attrValue != '') {
|
|
1082
|
+
if (rtn1.source.decimals1 != undefined && rtn1.source.decimals1 != null && rtn1.source.decimals1 > -1) {
|
|
1083
|
+
attrValue = Number(attrValue).toFixed(rtn1.source.decimals1)
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
else if (attrKey == 'code1' && (rtn1.source.controlType === 25 || rtn1.source.controlType === 51)
|
|
1087
|
+
&& attrValue != undefined && attrValue != null && attrValue != '') {
|
|
1088
|
+
rtn1.jsSetFile(attrValue);
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
rtn1.source[attrKey] = attrValue;
|
|
1092
|
+
this.form.hatchHandle(id, attrKey, attrValue, rtn1);
|
|
1093
|
+
|
|
1094
|
+
//用于处理源数据改动,强制更新视图数据 todo
|
|
1095
|
+
if (rtn1.self.$forceUpdate) {
|
|
1096
|
+
rtn1.self.$forceUpdate();
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
setValueByFieldNameFromParent(id, attrKey, attrValue) {
|
|
1101
|
+
if(this.form && this.form.self && this.form.self.$parent){
|
|
1102
|
+
return this.form.self.$parent.vmodel.content[0].on.setValueByFieldName(id, attrKey, attrValue);
|
|
1103
|
+
}
|
|
1104
|
+
return null;
|
|
1105
|
+
},
|
|
1106
|
+
//设置Field的v1、v2的值
|
|
1107
|
+
setV1AndV2ByField1(id, code1, code2) {
|
|
1108
|
+
var rtn1 = this.fieldsDic[id];
|
|
1109
|
+
if (rtn1) {
|
|
1110
|
+
if (typeof rtn1.value !== 'undefined') {
|
|
1111
|
+
rtn1.value = code1;
|
|
1112
|
+
|
|
1113
|
+
this.form.validMrf(rtn1);//验证必填关联组件
|
|
1114
|
+
this.form.hiddenHandle(rtn1, true);//隐藏关联的
|
|
1115
|
+
}
|
|
1116
|
+
if (typeof rtn1.value1 !== 'undefined') {
|
|
1117
|
+
rtn1.value1 = code2;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
if (rtn1.self.$forceUpdate) {
|
|
1121
|
+
rtn1.self.$forceUpdate();
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
setTabsSelect(id){
|
|
1126
|
+
if(this.form && this.form.self){
|
|
1127
|
+
var f = this.fieldsDic[id];
|
|
1128
|
+
if(this.form.isHorizontalLayout){
|
|
1129
|
+
this.form.self.activeName = f.collapseName.toString() === '-1' ? this.form.self.activeName : f.collapseName.toString();
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
submit(id){
|
|
1134
|
+
if(this.form && this.form.self){
|
|
1135
|
+
this.form.self.fieldClickHandler({id:id});
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1138
|
+
|
|
1139
|
+
//获取列表数据
|
|
1140
|
+
get excuteListData() {
|
|
1141
|
+
if (this._excuteListData) {
|
|
1142
|
+
return this._excuteListData;
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
if (this.excuteData !== null) {
|
|
1146
|
+
this._excuteListData = this.excuteData.filter((v) => {
|
|
1147
|
+
return typeof v.is !== undefined && (v.is === 'ct-form-list-table'||v.is === 'ct-repeat');
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
return this._excuteListData;
|
|
1152
|
+
},
|
|
1153
|
+
setExcuteListData(fields) {
|
|
1154
|
+
this._excuteListData=null;
|
|
1155
|
+
if (fields !== null) {
|
|
1156
|
+
this.excuteData=fields;
|
|
1157
|
+
this._excuteListData = fields.filter((v) => {
|
|
1158
|
+
return typeof v.is !== undefined && (v.is === 'ct-form-list-table'||v.is === 'ct-repeat');
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
//获取列表的Field
|
|
1163
|
+
getListField(tableName, rowNum, fiedlId) {
|
|
1164
|
+
let listData = this.excuteListData.find((v) => {
|
|
1165
|
+
return v.id === tableName;
|
|
1166
|
+
});
|
|
1167
|
+
if (listData) {
|
|
1168
|
+
let field = null;
|
|
1169
|
+
//正在编辑的Field
|
|
1170
|
+
if (rowNum === null && (fiedlId === null || listData.currentEventField.id === fiedlId)) {
|
|
1171
|
+
field = listData.currentEventField;
|
|
1172
|
+
}
|
|
1173
|
+
//正在编辑的行
|
|
1174
|
+
else if (rowNum === null && listData.currentRowIndex === 0) {
|
|
1175
|
+
let fields = listData.currentRow.data;
|
|
1176
|
+
field = fields[fiedlId];
|
|
1177
|
+
}
|
|
1178
|
+
//源数据
|
|
1179
|
+
else {
|
|
1180
|
+
if (rowNum === null && listData.currentRowIndex) {
|
|
1181
|
+
rowNum = listData.currentRowIndex;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
if (rowNum === 0 || (rowNum && fiedlId)) {
|
|
1185
|
+
try {
|
|
1186
|
+
let fields = listData.rows[rowNum].field;
|
|
1187
|
+
field = fields.find((v) => {
|
|
1188
|
+
return v.id === fiedlId;
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
catch (e) {
|
|
1192
|
+
if (listData.rows.length <= rowNum) {
|
|
1193
|
+
var checkMsg = "获取列表行索引超出界限";
|
|
1194
|
+
this.message(checkMsg);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
return { listData: listData, field: field };
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
//获取列表的行数(注意 这里包括列头)
|
|
1204
|
+
getListCount(tableName) {
|
|
1205
|
+
tableName = tableName ? tableName : this.form.scripts.$fd;
|
|
1206
|
+
let data = this.getListField(tableName, null, null);
|
|
1207
|
+
if (data) {
|
|
1208
|
+
return data.listData.rows.length;
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
//获取表格某行某列的值
|
|
1212
|
+
getListFieldValue(tableName, rowNum, fiedlId, attrName, defaultValue) {
|
|
1213
|
+
tableName = tableName ? tableName : this.form.scripts.$fd;
|
|
1214
|
+
|
|
1215
|
+
let data = this.getListField(tableName, rowNum, fiedlId);
|
|
1216
|
+
|
|
1217
|
+
attrName = this.common.initialsToLowerCase(attrName);
|
|
1218
|
+
attrName = attrName ? attrName : 'code1';
|
|
1219
|
+
|
|
1220
|
+
if (!fiedlId) {
|
|
1221
|
+
fiedlId = data.listData.currentEventField.id;
|
|
1222
|
+
}
|
|
1223
|
+
if (fiedlId && rowNum === null && fiedlId === data.listData.currentEventField.id) {
|
|
1224
|
+
data.field = data.listData.currentEventField;
|
|
1225
|
+
}
|
|
1226
|
+
rowNum = rowNum !== null ? rowNum : data.listData.currentRowIndex;
|
|
1227
|
+
|
|
1228
|
+
//若该行正在编辑,则取编辑状态的。
|
|
1229
|
+
if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId] && rowNum>-1
|
|
1230
|
+
&& data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex && data.listData.currentRow.isSet) {
|
|
1231
|
+
if(fiedlId=='deleted' || fiedlId=='flagDeleted'){
|
|
1232
|
+
return data.listData.currentRow.data.deleted || false;
|
|
1233
|
+
}
|
|
1234
|
+
return data.listData.currentRow.data[fiedlId].source[attrName];
|
|
1235
|
+
}
|
|
1236
|
+
else if (data && data.field) {
|
|
1237
|
+
if (typeof defaultValue !== 'undefined' && data.listData.rows[rowNum].deleted) {//若该行被删除时,则直接返回默认值
|
|
1238
|
+
return defaultValue;
|
|
1239
|
+
}
|
|
1240
|
+
return data.field.source[attrName];
|
|
1241
|
+
}
|
|
1242
|
+
else if (data && (fiedlId=='deleted' || fiedlId=='flagDeleted')) {
|
|
1243
|
+
return data.listData.rows[rowNum].deleted || false;
|
|
1244
|
+
}
|
|
1245
|
+
},
|
|
1246
|
+
getListFieldValueFromParent(tableName, rowNum, fiedlId, attrName, defaultValue) {
|
|
1247
|
+
if(this.form && this.form.self && this.form.self.$parent){
|
|
1248
|
+
return this.form.self.$parent.vmodel.content[0].on.getListFieldValue(tableName, rowNum, fiedlId, attrName, defaultValue);
|
|
1249
|
+
}
|
|
1250
|
+
return null;
|
|
1251
|
+
},
|
|
1252
|
+
//设置表格某行某列的值
|
|
1253
|
+
setListFieldValue(value, tableName, rowNum, fiedlId, attrName) {
|
|
1254
|
+
value = value==undefined?"":value.toString();
|
|
1255
|
+
tableName = tableName ? tableName : this.form.scripts.$fd;
|
|
1256
|
+
let data = this.getListField(tableName, rowNum, fiedlId);
|
|
1257
|
+
|
|
1258
|
+
attrName = this.common.initialsToLowerCase(attrName);
|
|
1259
|
+
attrName = attrName ? attrName : 'code1';
|
|
1260
|
+
|
|
1261
|
+
if (!fiedlId) {
|
|
1262
|
+
fiedlId = data.listData.currentEventField.id;
|
|
1263
|
+
}
|
|
1264
|
+
if (fiedlId && !rowNum && fiedlId === data.listData.currentEventField.id) {
|
|
1265
|
+
//data.field = data.listData.currentEventField;
|
|
1266
|
+
}
|
|
1267
|
+
rowNum = rowNum !== undefined && rowNum !== null && rowNum !== '' ? rowNum : data.listData.currentRowIndex;
|
|
1268
|
+
|
|
1269
|
+
if (data) {
|
|
1270
|
+
//正在编辑的行
|
|
1271
|
+
if (data.listData.currentRow.data && data.listData.currentRow.data[fiedlId] && rowNum>-1
|
|
1272
|
+
&& data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex) {
|
|
1273
|
+
let currentField = data.listData.currentRow.data[fiedlId];
|
|
1274
|
+
currentField.source[attrName] = value;
|
|
1275
|
+
currentField.rowKey=Math.random();
|
|
1276
|
+
//校验自己
|
|
1277
|
+
if (currentField.self && currentField.self.validExcute) {
|
|
1278
|
+
currentField.self.validExcute();
|
|
1279
|
+
}
|
|
1280
|
+
if (typeof currentField.self.$forceUpdate === "function") {
|
|
1281
|
+
currentField.self.$forceUpdate();
|
|
1282
|
+
}
|
|
1283
|
+
if (data.field) {
|
|
1284
|
+
data.field.source[attrName] = value;
|
|
1285
|
+
if(data.listData.$self && data.listData.$self.$refs){
|
|
1286
|
+
data.listData.updateListField(data.listData.$self.$refs.FieldsLabel, data.listData.source.rows[rowNum].$sourceIndex, fiedlId);
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
else if (data.field) {
|
|
1291
|
+
data.field.source[attrName] = value;
|
|
1292
|
+
if(data.listData.$self && data.listData.$self.$refs){
|
|
1293
|
+
data.listData.updateListField(data.listData.$self.$refs.FieldsLabel, data.listData.source.rows[rowNum].$sourceIndex, fiedlId);
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
//如果有汇总列,触发重新计算汇总
|
|
1298
|
+
if (data.listData.showSummary) {
|
|
1299
|
+
data.listData.tableData.push({});
|
|
1300
|
+
data.listData.tableData.pop();
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
return true;
|
|
1304
|
+
}
|
|
1305
|
+
return false;
|
|
1306
|
+
},
|
|
1307
|
+
//设置表格属性值
|
|
1308
|
+
setListAttr(tableId, attrName, attrValue) {
|
|
1309
|
+
let listData = this.excuteListData.find((v) => {
|
|
1310
|
+
return v.id === tableId;
|
|
1311
|
+
});
|
|
1312
|
+
if(listData){
|
|
1313
|
+
listData[attrName] = attrValue
|
|
1314
|
+
}
|
|
1315
|
+
},
|
|
1316
|
+
//新增表格数据
|
|
1317
|
+
insertRow(tableId,rows) {
|
|
1318
|
+
let listData = this.excuteListData.find((v) => {
|
|
1319
|
+
return v.id === tableId;
|
|
1320
|
+
});
|
|
1321
|
+
if(listData){
|
|
1322
|
+
listData.insertRow(rows);
|
|
1323
|
+
if(this.form && this.form.self){
|
|
1324
|
+
this.form.self.computeScroll();
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
//新增或替换表格数据
|
|
1329
|
+
insertOrUpdateRow(tableId,row) {
|
|
1330
|
+
let listData = this.excuteListData.find((v) => {
|
|
1331
|
+
return v.id === tableId;
|
|
1332
|
+
});
|
|
1333
|
+
if(listData){
|
|
1334
|
+
listData.insertOrUpdateRow(row);
|
|
1335
|
+
}
|
|
1336
|
+
},
|
|
1337
|
+
//删除表格数据
|
|
1338
|
+
deleteRow(tableId,row) {
|
|
1339
|
+
let listData = this.excuteListData.find((v) => {
|
|
1340
|
+
return v.id === tableId;
|
|
1341
|
+
});
|
|
1342
|
+
if(listData){
|
|
1343
|
+
listData.delRow(row);
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
//清空表格数据
|
|
1347
|
+
clear(tableId) {
|
|
1348
|
+
let listData = this.excuteListData.find((v) => {
|
|
1349
|
+
return v.id === tableId;
|
|
1350
|
+
});
|
|
1351
|
+
if(listData){
|
|
1352
|
+
listData.deleteAll();
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
|
|
1356
|
+
//获取后台数据,并返回脚本。
|
|
1357
|
+
execServerScript(action, object, successCallback) {
|
|
1358
|
+
let formData = this;//作用域保存
|
|
1359
|
+
|
|
1360
|
+
//是否是行内触发的
|
|
1361
|
+
let data = this.getListField(this.form.scripts.$fd, null, null);
|
|
1362
|
+
object.editMode = data ? 1 : 0;
|
|
1363
|
+
|
|
1364
|
+
Vue.prototype.$api.postHandler(this.common.globalUri(), { action: action, para: object }).then(
|
|
1365
|
+
function (response) {
|
|
1366
|
+
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
1367
|
+
var data = response.content;
|
|
1368
|
+
if (response.clientActionType === Enum.ClientActionType.ExcuteScript && data) {
|
|
1369
|
+
formData.common.excute.call(formData.form.scripts, data);
|
|
1370
|
+
}
|
|
1371
|
+
else
|
|
1372
|
+
if (response.clientActionType === Enum.ClientActionType.None && data && successCallback) {
|
|
1373
|
+
//因为要传参,并直接执行方法,故successCallback回调里要使用formData的话,要加this
|
|
1374
|
+
//若不能接受this,也可修改common.excute方法
|
|
1375
|
+
//successCallback.call(formData.form.scripts, data);
|
|
1376
|
+
|
|
1377
|
+
//优化,不需要加this
|
|
1378
|
+
formData.common.excuteFun.call(formData.form.scripts, successCallback, data);
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
);
|
|
1383
|
+
},
|
|
1384
|
+
execRouter(routerKey) {
|
|
1385
|
+
let field={id:routerKey};
|
|
1386
|
+
this.form.self.fieldClickHandler(field);
|
|
1387
|
+
},
|
|
1388
|
+
//消息提示 type主题:success/warning/info/error。 center是否居中true/flase。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。
|
|
1389
|
+
//showClose 是否显示关闭按钮。dangerouslyUseHtmlString 属性设置为 true ,message 就会被当做 HTML 片段处理。
|
|
1390
|
+
message(message, type, center, duration, showClose, dangerouslyUseHTMLString) {
|
|
1391
|
+
if (typeof center === 'undefined') {
|
|
1392
|
+
center = true;
|
|
1393
|
+
}
|
|
1394
|
+
if (typeof duration === 'undefined') {
|
|
1395
|
+
duration = 1500;
|
|
1396
|
+
}
|
|
1397
|
+
if (typeof showClose === 'undefined') {
|
|
1398
|
+
showClose = false;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
Vue.prototype.$message({
|
|
1402
|
+
message: message,//消息文字
|
|
1403
|
+
dangerouslyUseHTMLString: dangerouslyUseHTMLString || false,
|
|
1404
|
+
type: type || 'error',//主题:success/warning/info/error
|
|
1405
|
+
center: center,//是否居中
|
|
1406
|
+
duration: duration, //显示时间, 毫秒。设为 0 则不会自动关闭
|
|
1407
|
+
showClose: showClose,//是否显示关闭按钮
|
|
1408
|
+
});
|
|
1409
|
+
},
|
|
1410
|
+
},
|
|
1035
1411
|
get tdClass() {
|
|
1036
1412
|
let c = '';
|
|
1037
1413
|
if (source.content.lineType !== undefined && source.content.lineType !== null) {
|
|
@@ -18,12 +18,22 @@ export default {
|
|
|
18
18
|
changeOld: '',
|
|
19
19
|
inputOld1: '',
|
|
20
20
|
changeOld1: '',
|
|
21
|
-
inputTime: null
|
|
21
|
+
inputTime: null,
|
|
22
|
+
timeoutInput: null,
|
|
23
|
+
timeoutChange: null,
|
|
22
24
|
};
|
|
23
25
|
},
|
|
24
26
|
created() {
|
|
25
27
|
this.loaderObj = this.$loader.create(this.loader);
|
|
26
28
|
},
|
|
29
|
+
destroyed (){
|
|
30
|
+
if(this.timeoutInput){
|
|
31
|
+
clearTimeout(this.timeoutInput)
|
|
32
|
+
}
|
|
33
|
+
if(this.timeoutChange){
|
|
34
|
+
clearTimeout(this.timeoutChange)
|
|
35
|
+
}
|
|
36
|
+
},
|
|
27
37
|
mounted() {
|
|
28
38
|
let self = this;
|
|
29
39
|
this.$nextTick(() => {
|
|
@@ -51,7 +61,7 @@ export default {
|
|
|
51
61
|
*/
|
|
52
62
|
inputHandler(e) {
|
|
53
63
|
var self = this;
|
|
54
|
-
setTimeout(() => {
|
|
64
|
+
this.timeoutInput=setTimeout(() => {
|
|
55
65
|
self.valid = true;
|
|
56
66
|
self.inputTime = (new Date()).getTime();
|
|
57
67
|
self.validMessage="";
|
|
@@ -100,7 +110,7 @@ export default {
|
|
|
100
110
|
*/
|
|
101
111
|
changeHandler(e) {
|
|
102
112
|
var self = this;
|
|
103
|
-
setTimeout(() => {
|
|
113
|
+
this.timeoutChange=setTimeout(() => {
|
|
104
114
|
//通用校验
|
|
105
115
|
var time = (new Date()).getTime();
|
|
106
116
|
if (time > (self.inputTime + 500) || self.valid) {
|
|
@@ -41,12 +41,15 @@
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
+
destroyed (){
|
|
45
|
+
if(this.unwatch)this.unwatch();
|
|
46
|
+
},
|
|
44
47
|
mounted() {
|
|
45
48
|
var self = this;
|
|
46
49
|
this.$nextTick(function () {
|
|
47
50
|
var dropdown = self.$refs["dropdown"];
|
|
48
51
|
dropdown.createPopper();
|
|
49
|
-
self.$watch('options', function (newVal, oldVal) {
|
|
52
|
+
this.unwatch=self.$watch('options', function (newVal, oldVal) {
|
|
50
53
|
self.$nextTick(() => {
|
|
51
54
|
dropdown.updatePopper();
|
|
52
55
|
dropdown.updatePopper();
|
|
@@ -59,6 +59,13 @@ export default {
|
|
|
59
59
|
this.model.$self=this;
|
|
60
60
|
this.getOptions()
|
|
61
61
|
},
|
|
62
|
+
destroyed (){
|
|
63
|
+
this.model = null;
|
|
64
|
+
this.$el = null;
|
|
65
|
+
if(this.timeoutHandle){
|
|
66
|
+
clearTimeout(this.timeoutHandle)
|
|
67
|
+
}
|
|
68
|
+
},
|
|
62
69
|
updated(){
|
|
63
70
|
this.model.value=this.textValue;
|
|
64
71
|
},
|
|
@@ -67,6 +74,7 @@ export default {
|
|
|
67
74
|
options: [],
|
|
68
75
|
searchText: "",
|
|
69
76
|
showDrop: false,
|
|
77
|
+
timeoutHandle: null,
|
|
70
78
|
};
|
|
71
79
|
},
|
|
72
80
|
methods: {
|
|
@@ -83,7 +91,7 @@ export default {
|
|
|
83
91
|
},
|
|
84
92
|
searchTickControl: function (search) {
|
|
85
93
|
var self = this;
|
|
86
|
-
setTimeout(function () {
|
|
94
|
+
this.timeoutHandle=setTimeout(function () {
|
|
87
95
|
if (search === self.searchText) {
|
|
88
96
|
self.getOptions(self.searchText);
|
|
89
97
|
}
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
+
destroyed (){
|
|
25
|
+
this.$el = null;
|
|
26
|
+
},
|
|
24
27
|
computed: {
|
|
25
28
|
optionRowCount: function () {
|
|
26
29
|
return parseInt(this.model.options.length % this.model.optionColCount > 0 ? (this.model.options.length / this.model.optionColCount) + 1 : this.model.options.length / this.model.optionColCount);
|
package/src/main.js
CHANGED
|
@@ -73,7 +73,7 @@ Vue.use(centaline, {
|
|
|
73
73
|
estateId: '',
|
|
74
74
|
|
|
75
75
|
authObject: '{"currentEstate":{},"platform":1,"osVersion":"","clientVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"YSLnFY","time":1726133598476,"sign":"e08cc3c4257654dcc6b8063e3cb9b1b3","systemSource":"CCESU","empNo":"24988","empId":"202110201430497BB5FE89123A054CCA"}',
|
|
76
|
-
AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.
|
|
76
|
+
AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImZmNzQwNjBjLTk2OTktNDlkNy05MWY4LTg4NTFmNmM4NmIxYyJ9.UWOtxKd_HB9OY4Hy5js0r4RtQoHA53dMtQhhxIVG4DuQC4P6mUQgs4fa_dM00a2Cik3SCmDabMcLILFogWUmYw',
|
|
77
77
|
};
|
|
78
78
|
},
|
|
79
79
|
// 请求完成事件,可判断是否登录过期执行响应操作
|