centaline-data-driven-v3 0.0.55 → 0.0.57
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 +81 -81
- package/package.json +1 -1
- package/src/assets/commonWeb.css +1 -1
- package/src/components/Layout/Layout.vue +7 -2
- package/src/components/Layout/LayoutField.vue +1 -1
- package/src/components/app/ContainerControl.vue +4 -8
- package/src/components/app/SearchList/SearchTable.vue +18 -7
- package/src/components/app/TextBox.vue +3 -0
- package/src/components/web/Form.vue +40 -7
- package/src/components/web/FormList.vue +28 -8
- package/src/components/web/GroupList.vue +36 -0
- package/src/components/web/NumberWithPlusAndMinus.vue +110 -0
- package/src/components/web/PopupGroupList.vue +6 -0
- package/src/components/web/SearchList/SearchTable.vue +25 -15
- package/src/components/web/SearchList.vue +7 -2
- package/src/components/web/Steps.vue +3 -1
- package/src/loader/src/DatePicker.js +17 -4
- package/src/loader/src/Field.js +36 -17
- package/src/loader/src/Form.js +75 -0
- package/src/loader/src/FormList.js +30 -1
- package/src/loader/src/GroupList.js +14 -0
- package/src/loader/src/LibFunction.js +16 -6
- package/src/loader/src/NumberWithPlusAndMinus.js +35 -0
- package/src/loader/src/SearchScreen.js +1 -0
- package/src/loader/src/SearchTable.js +10 -4
- package/src/main.js +4 -4
- package/src/utils/Enum.js +14 -4
- package/src/utils/mixins.js +5 -3
- package/src/utils/validate.js +1 -0
- package/src/views/SearchList.vue +2 -2
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
@refreshParent="refreshParentHandler" @simpleRouterRefreshHandler="simpleRouterRefreshHandler"
|
|
21
21
|
@closeSideBar="closeSideBar" @popupClickHandler="popupClickHandler" :dragStartItem="dragStartItem"
|
|
22
22
|
:dragStartName="dragStartName"
|
|
23
|
-
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
|
|
23
|
+
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
|
|
24
|
+
@drag="drag"
|
|
25
|
+
>
|
|
24
26
|
</searchTable>
|
|
25
27
|
</div>
|
|
26
28
|
<div ref="refSidebar" v-if="flagSideBar && flagSideBarOfData"
|
|
@@ -43,7 +45,7 @@ import SearchCategory from './SearchList/SearchCategory.vue';
|
|
|
43
45
|
import SearchSideMenu from './SearchList/SearchSideMenu.vue';
|
|
44
46
|
import SearchSideRight from './SearchList/SearchSideRight.vue';
|
|
45
47
|
import { ref, nextTick, onMounted, watch, onActivated } from 'vue'
|
|
46
|
-
const emit = defineEmits(['loaded', 'failLoad', 'tableLoaded', 'scrollHandle', 'rowClickHandle', 'refreshParent', 'submit', 'flagNotificationParentAfterContentChanged'])
|
|
48
|
+
const emit = defineEmits(['loaded', 'failLoad', 'tableLoaded', 'scrollHandle', 'rowClickHandle', 'refreshParent', 'submit', 'flagNotificationParentAfterContentChanged','drag'])
|
|
47
49
|
const props = defineProps({
|
|
48
50
|
vmodel: Object,
|
|
49
51
|
parameterAction: String,
|
|
@@ -451,6 +453,9 @@ function popupClickHandler(tempListData) {
|
|
|
451
453
|
function flagNotificationParentAfterContentChanged() {
|
|
452
454
|
emit('flagNotificationParentAfterContentChanged');
|
|
453
455
|
}
|
|
456
|
+
function drag(row, column,type) {
|
|
457
|
+
emit('drag',row,column,type);
|
|
458
|
+
}
|
|
454
459
|
watch(() => props.pageHeight, (value) => {
|
|
455
460
|
if (props.pageHeight) {
|
|
456
461
|
pageHeightReal.value = props.pageHeight;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ct-field :vmodel="model">
|
|
3
3
|
<template #Control>
|
|
4
|
+
<div style="width: 100%;">
|
|
4
5
|
<el-steps :space="model.code2.space" :direction="model.code2.direction" :active="model.code2.active"
|
|
5
6
|
:simple="model.code2.simple" :process-status="model.code2.processStatus"
|
|
6
7
|
:finish-status="model.code2.finishStatus" :align-center="model.code2.alignCenter">
|
|
7
|
-
<el-step v-for="(step, index) in model.code1" :key="index" :title="step.title" :icon="step.icon">
|
|
8
|
+
<el-step v-for="(step, index) in model.code1" :key="index" :title="step.title" :icon="step.icon" :status="step.status">
|
|
8
9
|
<template #description>
|
|
9
10
|
<div v-html="step.description">
|
|
10
11
|
</div>
|
|
11
12
|
</template>
|
|
12
13
|
</el-step>
|
|
13
14
|
</el-steps>
|
|
15
|
+
</div>
|
|
14
16
|
</template>
|
|
15
17
|
</ct-field>
|
|
16
18
|
</template>
|
|
@@ -9,11 +9,19 @@ const DatePicker = function (source) {
|
|
|
9
9
|
if (source.controlType == Enum.ControlType.DateTime || source.controlType == Enum.ControlType.DateTimeRange || this.flagtime) {
|
|
10
10
|
return 'yyyy-MM-dd HH:mm:ss'
|
|
11
11
|
}
|
|
12
|
+
else if(source.controlType == Enum.ControlType.DateYearMonth
|
|
13
|
+
|| source.controlType == Enum.ControlType.MonthRange){
|
|
14
|
+
return 'yyyy-MM'
|
|
15
|
+
}
|
|
12
16
|
return 'yyyy-MM-dd'
|
|
13
17
|
},
|
|
14
18
|
//APP格式
|
|
15
19
|
get valueFormatAPP() {
|
|
16
|
-
|
|
20
|
+
if(source.controlType == Enum.ControlType.DateYearMonth
|
|
21
|
+
|| source.controlType == Enum.ControlType.MonthRange){
|
|
22
|
+
return ['year', 'month']
|
|
23
|
+
}
|
|
24
|
+
return ['year', 'month', 'day']
|
|
17
25
|
},
|
|
18
26
|
//是否时间
|
|
19
27
|
get flagtime() {
|
|
@@ -24,20 +32,25 @@ const DatePicker = function (source) {
|
|
|
24
32
|
},
|
|
25
33
|
//是否区间
|
|
26
34
|
get flagrange() {
|
|
27
|
-
if (source.controlType == Enum.ControlType.DateRange
|
|
35
|
+
if (source.controlType == Enum.ControlType.DateRange
|
|
36
|
+
|| source.controlType == Enum.ControlType.DateTimeRange
|
|
37
|
+
|| source.controlType == Enum.ControlType.MonthRange
|
|
38
|
+
|| source.controlType == Enum.ControlType.TimeRange) {
|
|
28
39
|
return true
|
|
29
40
|
}
|
|
30
41
|
return false
|
|
31
42
|
},
|
|
32
43
|
//控件类型
|
|
33
44
|
get dateType() {
|
|
34
|
-
if (source.controlType == Enum.ControlType.DateTime
|
|
45
|
+
if (source.controlType == Enum.ControlType.DateTime
|
|
46
|
+
|| source.controlType == Enum.ControlType.DateTimeRange) {
|
|
35
47
|
return 'datetime'
|
|
36
48
|
}
|
|
37
49
|
else if (this.flagtime) {
|
|
38
50
|
return 'time'
|
|
39
51
|
}
|
|
40
|
-
else if (source.controlType == Enum.ControlType.DateYearMonth
|
|
52
|
+
else if (source.controlType == Enum.ControlType.DateYearMonth
|
|
53
|
+
|| source.controlType == Enum.ControlType.MonthRange) {
|
|
41
54
|
return 'month'
|
|
42
55
|
}
|
|
43
56
|
return 'date'
|
package/src/loader/src/Field.js
CHANGED
|
@@ -26,8 +26,8 @@ const Base = function (source, moreActionRouter) {
|
|
|
26
26
|
if (source.labelDelimiter) {
|
|
27
27
|
l = l + source.labelDelimiter;
|
|
28
28
|
}
|
|
29
|
-
if(common.flagApp()){
|
|
30
|
-
l=l.trim();
|
|
29
|
+
if (common.flagApp()) {
|
|
30
|
+
l = l.trim();
|
|
31
31
|
}
|
|
32
32
|
return l;
|
|
33
33
|
},
|
|
@@ -235,7 +235,7 @@ const Base = function (source, moreActionRouter) {
|
|
|
235
235
|
},
|
|
236
236
|
//允许的文件类型(针对上传控件)
|
|
237
237
|
get fileAccept1() {
|
|
238
|
-
return source.fileAccept1||'';
|
|
238
|
+
return source.fileAccept1 || '';
|
|
239
239
|
},
|
|
240
240
|
set fileAccept1(v) {
|
|
241
241
|
source.fileAccept1 = v;
|
|
@@ -724,8 +724,8 @@ const Base = function (source, moreActionRouter) {
|
|
|
724
724
|
set lineFeed(v) {
|
|
725
725
|
source.lineFeed = v;
|
|
726
726
|
},
|
|
727
|
-
|
|
728
|
-
|
|
727
|
+
// 主要给 表单分组控件使用 控制分组里面的内容是否使用 懒加载
|
|
728
|
+
get lazyLoad() {
|
|
729
729
|
if (typeof source.lazyLoad !== "undefined") {
|
|
730
730
|
return source.lazyLoad;
|
|
731
731
|
}
|
|
@@ -831,28 +831,30 @@ const Base = function (source, moreActionRouter) {
|
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
}
|
|
834
|
-
this.code1 = this.defaultCode1;
|
|
835
|
-
this.code2 = this.defaultCode2;
|
|
836
|
-
this.name1 = this.defaultName1;
|
|
834
|
+
this.code1 = this.defaultCode1 || '';
|
|
835
|
+
this.code2 = this.defaultCode2 || '';
|
|
836
|
+
this.name1 = this.defaultName1 || '';
|
|
837
837
|
|
|
838
838
|
}
|
|
839
839
|
else {
|
|
840
|
-
if (this.controlType === Enum.ControlType.DateRange
|
|
840
|
+
if (this.controlType === Enum.ControlType.DateRange
|
|
841
|
+
|| this.controlType === Enum.ControlType.DateTimeRange
|
|
842
|
+
|| this.controlType === Enum.ControlType.MonthRange) {
|
|
841
843
|
this.code1 = '';
|
|
842
844
|
this.code2 = '';
|
|
843
845
|
}
|
|
844
846
|
else if (this.controlType === Enum.ControlType.CheckBoxList) {
|
|
845
847
|
this.value = [];
|
|
846
848
|
}
|
|
847
|
-
else if (this.controlType === Enum.ControlType.SearchListBox
|
|
848
|
-
|| this.controlType === Enum.ControlType.ComboBox
|
|
849
|
-
|| this.controlType === Enum.ControlType.MultiSelectNoSearch
|
|
850
|
-
|| this.controlType === Enum.ControlType.MultiSelectWithSearch
|
|
849
|
+
else if (this.controlType === Enum.ControlType.SearchListBox
|
|
850
|
+
|| this.controlType === Enum.ControlType.ComboBox
|
|
851
|
+
|| this.controlType === Enum.ControlType.MultiSelectNoSearch
|
|
852
|
+
|| this.controlType === Enum.ControlType.MultiSelectWithSearch
|
|
851
853
|
|| this.controlType === Enum.ControlType.PhoneNumberText) {
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
854
|
+
this.code1 = '';
|
|
855
|
+
this.code2 = '';
|
|
856
|
+
this.name1 = '';
|
|
857
|
+
this.value = '';
|
|
856
858
|
}
|
|
857
859
|
else {
|
|
858
860
|
this.code1 = '';
|
|
@@ -910,6 +912,23 @@ const Base = function (source, moreActionRouter) {
|
|
|
910
912
|
configurable: true
|
|
911
913
|
});
|
|
912
914
|
}
|
|
915
|
+
else if (source.controlType == Enum.ControlType.NumberWithPlusAndMinus) {
|
|
916
|
+
Object.defineProperty(rtnFormObj, source.fieldName1, {
|
|
917
|
+
get: function () {
|
|
918
|
+
if (source.code1) {
|
|
919
|
+
let val = source.code1
|
|
920
|
+
if (typeof source.code1 === 'string') {
|
|
921
|
+
val = JSON.parse(source.code1)
|
|
922
|
+
}
|
|
923
|
+
return val
|
|
924
|
+
}
|
|
925
|
+
return []
|
|
926
|
+
|
|
927
|
+
},
|
|
928
|
+
enumerable: true,
|
|
929
|
+
configurable: true
|
|
930
|
+
});
|
|
931
|
+
}
|
|
913
932
|
return rtnFormObj;
|
|
914
933
|
},
|
|
915
934
|
|
package/src/loader/src/Form.js
CHANGED
|
@@ -973,6 +973,80 @@ function popupSearchListHandler(singleSelectio, field, router, model, Fields, pr
|
|
|
973
973
|
}
|
|
974
974
|
common.openDialog(dialogOption);
|
|
975
975
|
}
|
|
976
|
+
//弹出分组搜索列表
|
|
977
|
+
function popupGroupListHandler(field, router, model, Fields, props, callBack) {
|
|
978
|
+
let submitData = {};
|
|
979
|
+
let verified = true;
|
|
980
|
+
let flagSearchlist = false;
|
|
981
|
+
let tempFormData = model.getFormObj();
|
|
982
|
+
|
|
983
|
+
let check = true;
|
|
984
|
+
let checkMsg;
|
|
985
|
+
router.submitFormField.forEach((v) => {
|
|
986
|
+
Fields.forEach((f) => {
|
|
987
|
+
if (f.model && f.model.fieldName1 === v) {
|
|
988
|
+
if (typeof f.model.validExcute !== 'undefined') {
|
|
989
|
+
if (!f.model.validExcute()) {
|
|
990
|
+
common.message(f.model.displayValidMessage)
|
|
991
|
+
verified = false;
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
if (!verified) {
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
submitData[v] = common.getDataOfUpperLower(tempFormData, v);
|
|
1001
|
+
if (!submitData[v]) {
|
|
1002
|
+
if (model.fieldsDic[v]) {
|
|
1003
|
+
if (model.fieldsDic[v].required) {
|
|
1004
|
+
checkMsg = "请先录入" + model.fieldsDic[v].controlLabel;
|
|
1005
|
+
check = false;
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
else {
|
|
1009
|
+
checkMsg = "未读取到表单项(" + v + ")的值";
|
|
1010
|
+
check = false;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
});
|
|
1014
|
+
|
|
1015
|
+
if (!verified) {
|
|
1016
|
+
return;
|
|
1017
|
+
}
|
|
1018
|
+
if (!check) {
|
|
1019
|
+
common.message(checkMsg, 'warning')
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
submitData = router.getActionPara(submitData).para;
|
|
1023
|
+
var dialogOption = {
|
|
1024
|
+
title: router.pageTitle,
|
|
1025
|
+
pane: common.getParentPane(),
|
|
1026
|
+
content: [{
|
|
1027
|
+
component: 'ct-popupgrouplist',
|
|
1028
|
+
width: router.pageWidth + 'px',
|
|
1029
|
+
height: (router.pageHeight || 500) + 'px',
|
|
1030
|
+
documentHeight: props.documentHeight,
|
|
1031
|
+
documentWidth: props.documentWidth,
|
|
1032
|
+
attrs: {
|
|
1033
|
+
searchConditionApi: router.actionForSearchLayout,
|
|
1034
|
+
searchFormApi: router.actionForSearchLayout,
|
|
1035
|
+
searchDataApi: router.actionForSearch,
|
|
1036
|
+
apiParam: submitData,
|
|
1037
|
+
flagPopupSearchlist: flagSearchlist,
|
|
1038
|
+
onSubmit: (option) => {
|
|
1039
|
+
if (typeof callBack === "function" && !router.callBackFunName) {
|
|
1040
|
+
callBack(option);
|
|
1041
|
+
}
|
|
1042
|
+
model.$vue.changeCallBackHandler(field, router.callBackFunName, option);
|
|
1043
|
+
common.closeDialog(dialogOption);
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
}]
|
|
1047
|
+
};
|
|
1048
|
+
common.openDialog(dialogOption);
|
|
1049
|
+
}
|
|
976
1050
|
function getFileData(field, model) {
|
|
977
1051
|
var submitData = {};
|
|
978
1052
|
var tempFormData = model.getFormObj();
|
|
@@ -1067,6 +1141,7 @@ const Form = {
|
|
|
1067
1141
|
clearRelatedHandle,
|
|
1068
1142
|
doAction,
|
|
1069
1143
|
popupSearchListHandler,
|
|
1144
|
+
popupGroupListHandler,
|
|
1070
1145
|
getFileData,
|
|
1071
1146
|
changeHandler,
|
|
1072
1147
|
getRouterAndSubmitData,
|
|
@@ -239,7 +239,7 @@ function FormListModel(source, master,actionRouters) {
|
|
|
239
239
|
row['delete'] = rows[i].delete
|
|
240
240
|
row['fontColor'] = rows[i].fontColor
|
|
241
241
|
this._tableData.push(row);
|
|
242
|
-
if (this.flagRepeat) {
|
|
242
|
+
if (this.flagRepeat||this.flagTemplate) {
|
|
243
243
|
allhiddenHandle(row, rows[i].$sourceIndex, rtn)
|
|
244
244
|
}
|
|
245
245
|
}
|
|
@@ -302,6 +302,29 @@ function FormListModel(source, master,actionRouters) {
|
|
|
302
302
|
});
|
|
303
303
|
return rtnObj;
|
|
304
304
|
},
|
|
305
|
+
get relationParentFormFields() {
|
|
306
|
+
return source.relationParentFormFields;
|
|
307
|
+
},
|
|
308
|
+
getRelationParentFormFields(){
|
|
309
|
+
let relfields=[];
|
|
310
|
+
if(this.relationParentFormFields){
|
|
311
|
+
if(this.form && this.form.fieldsDic){
|
|
312
|
+
let form=this.form;
|
|
313
|
+
(this.relationParentFormFields.split(',')).forEach(function(f){
|
|
314
|
+
if(form.fieldsDic[f]){
|
|
315
|
+
let newField={...form.fieldsDic[f]};
|
|
316
|
+
newField.is='ct-label';
|
|
317
|
+
newField.type=Enum.ControlType.Label;
|
|
318
|
+
newField.colspan=24;
|
|
319
|
+
newField.required=false;
|
|
320
|
+
newField.labelClass='';
|
|
321
|
+
relfields.push(newField);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return relfields;
|
|
327
|
+
}
|
|
305
328
|
};
|
|
306
329
|
return rtn;
|
|
307
330
|
}
|
|
@@ -464,6 +487,7 @@ function addRow(model) {
|
|
|
464
487
|
actionRouters: model.actionRouters,
|
|
465
488
|
},
|
|
466
489
|
parentModelForm: model.parentModel,
|
|
490
|
+
relationParentFormFields:model.getRelationParentFormFields(),
|
|
467
491
|
onSubmit: (ev) => {
|
|
468
492
|
var row = JSON.parse(JSON.stringify(model.source.rows[0]));
|
|
469
493
|
for (let findex = 0; findex < row.columns.length; findex++) {
|
|
@@ -471,6 +495,8 @@ function addRow(model) {
|
|
|
471
495
|
field.code1 = ev.formData.source.fields[findex].code1;
|
|
472
496
|
field.name1 = ev.formData.source.fields[findex].name1;
|
|
473
497
|
field.code2 = ev.formData.source.fields[findex].code2;
|
|
498
|
+
field.locked = ev.formData.source.fields[findex].locked;
|
|
499
|
+
field.required = ev.formData.source.fields[findex].required;
|
|
474
500
|
if(field.controlType==Enum.ControlType.Photo){
|
|
475
501
|
field.code1 =JSON.stringify(ev.formData.fields[findex].fileSource)
|
|
476
502
|
}
|
|
@@ -536,6 +562,7 @@ function editRow(sourceIndex, model) {
|
|
|
536
562
|
actionRouters: model.source.actionRouters,
|
|
537
563
|
},
|
|
538
564
|
parentModelForm: model.parentModel,
|
|
565
|
+
relationParentFormFields:model.getRelationParentFormFields(),
|
|
539
566
|
onSubmit: (ev) => {
|
|
540
567
|
model.rows[model.rows.findIndex(v => v.$sourceIndex === sourceIndex)].edited = true;
|
|
541
568
|
var row = model.source.rows[index].columns;
|
|
@@ -547,11 +574,13 @@ function editRow(sourceIndex, model) {
|
|
|
547
574
|
model.tableData[tableIndex][row[findex]['fieldName1']]['name1'] = ev.formData.source.fields[findex].name1
|
|
548
575
|
model.tableData[tableIndex][row[findex]['fieldName1']]['code2'] = ev.formData.source.fields[findex].code2
|
|
549
576
|
model.tableData[tableIndex][row[findex]['fieldName1']]['locked'] = ev.formData.source.fields[findex].locked
|
|
577
|
+
model.tableData[tableIndex][row[findex]['fieldName1']]['required'] = ev.formData.source.fields[findex].required
|
|
550
578
|
|
|
551
579
|
row[findex]['code1'] = ev.formData.source.fields[findex].code1
|
|
552
580
|
row[findex]['name1'] = ev.formData.source.fields[findex].name1
|
|
553
581
|
row[findex]['code2'] = ev.formData.source.fields[findex].code2
|
|
554
582
|
row[findex]['locked'] = ev.formData.source.fields[findex].locked
|
|
583
|
+
row[findex]['required'] = ev.formData.source.fields[findex].required
|
|
555
584
|
}
|
|
556
585
|
common.closeDialog(dialogOption);
|
|
557
586
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import base from '../index';
|
|
2
|
+
import valid from '../../utils/validate';
|
|
3
|
+
const GroupList = function (source) {
|
|
4
|
+
let rtn = {
|
|
5
|
+
get value() {
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
};
|
|
10
|
+
rtn = base.copy(source, rtn);
|
|
11
|
+
rtn = base.copy(rtn, valid.Init(rtn));
|
|
12
|
+
return rtn;
|
|
13
|
+
};
|
|
14
|
+
export default GroupList
|
|
@@ -10,6 +10,7 @@ import TextBox from './TextBox';
|
|
|
10
10
|
import DatePicker from './DatePicker';
|
|
11
11
|
import RadioButton from './RadioButton';
|
|
12
12
|
import CheckBoxList from './CheckBoxList';
|
|
13
|
+
import NumberWithPlusAndMinus from './NumberWithPlusAndMinus';
|
|
13
14
|
import NumericRange from './NumericRange';
|
|
14
15
|
import MultiComboBoxWithTextBox from './MultiComboBoxWithTextBox';
|
|
15
16
|
import FormList from './FormList';
|
|
@@ -34,7 +35,8 @@ const LibFunction = {
|
|
|
34
35
|
else if (field.controlType === Enum.ControlType.DateTime) {
|
|
35
36
|
field.width = field.width || 280;
|
|
36
37
|
}
|
|
37
|
-
else if (field.controlType === Enum.ControlType.DateRange
|
|
38
|
+
else if (field.controlType === Enum.ControlType.DateRange
|
|
39
|
+
|| field.controlType === Enum.ControlType.MonthRange) {
|
|
38
40
|
field.width = field.width || 300;
|
|
39
41
|
}
|
|
40
42
|
else if (field.controlType === Enum.ControlType.DateTimeRange) {
|
|
@@ -58,6 +60,9 @@ const LibFunction = {
|
|
|
58
60
|
else if (field.controlType === Enum.ControlType.CheckBox) {
|
|
59
61
|
showLabel = true;
|
|
60
62
|
}
|
|
63
|
+
else if (field.controlType === Enum.ControlType.DateYearMonth) {
|
|
64
|
+
field.width = field.width || 200;
|
|
65
|
+
}
|
|
61
66
|
else {
|
|
62
67
|
showLabel = false;
|
|
63
68
|
field.width = field.width || 200;
|
|
@@ -119,6 +124,7 @@ const LibFunction = {
|
|
|
119
124
|
case Enum.ControlType.DateTime:
|
|
120
125
|
case Enum.ControlType.Date:
|
|
121
126
|
case Enum.ControlType.Time:
|
|
127
|
+
case Enum.ControlType.MonthRange:
|
|
122
128
|
item = DatePicker(item)
|
|
123
129
|
item.is = 'ct-datepicker'
|
|
124
130
|
break;
|
|
@@ -147,7 +153,7 @@ const LibFunction = {
|
|
|
147
153
|
console.error("找不到对应的list:" + field.fieldName1);
|
|
148
154
|
}
|
|
149
155
|
listobj.scripts = source.scripts;
|
|
150
|
-
item = FormList.FormListModel(listobj, field,source.actionRouters);
|
|
156
|
+
item = FormList.FormListModel(listobj, field, source.actionRouters);
|
|
151
157
|
item.is = 'ct-formlist';
|
|
152
158
|
break;
|
|
153
159
|
case Enum.ControlType.RichText: //富文本框
|
|
@@ -191,8 +197,8 @@ const LibFunction = {
|
|
|
191
197
|
var files = [];
|
|
192
198
|
if (Array.isArray(field.code1)) {
|
|
193
199
|
files = field.code1;
|
|
194
|
-
} else {
|
|
195
|
-
files= field.code1 && field.code1 != "[]" ? JSON.parse(field.code1) : [];
|
|
200
|
+
} else {
|
|
201
|
+
files = field.code1 && field.code1 != "[]" ? JSON.parse(field.code1) : [];
|
|
196
202
|
}
|
|
197
203
|
item = Photo.loadFromModel(item, files, router, source.videoPlayIconUrl);
|
|
198
204
|
item.is = 'ct-photo';
|
|
@@ -234,8 +240,12 @@ const LibFunction = {
|
|
|
234
240
|
item.is = 'ct-steps';
|
|
235
241
|
break;
|
|
236
242
|
case Enum.ControlType.Tags:
|
|
237
|
-
|
|
238
|
-
|
|
243
|
+
item = Tags(item)
|
|
244
|
+
item.is = 'ct-tags'
|
|
245
|
+
break;
|
|
246
|
+
case Enum.ControlType.NumberWithPlusAndMinus:
|
|
247
|
+
item = NumberWithPlusAndMinus(item)
|
|
248
|
+
item.is = 'ct-numberwithplusandminus'
|
|
239
249
|
break;
|
|
240
250
|
default:
|
|
241
251
|
item = Label(item)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import base from '../../loader/index';
|
|
2
|
+
import valid from '../../utils//validate';
|
|
3
|
+
const NumberWithPlusAndMinus = function (source) {
|
|
4
|
+
let rtn = {
|
|
5
|
+
get value() {
|
|
6
|
+
this._value = [];
|
|
7
|
+
if (source.code1) {
|
|
8
|
+
let val = source.code1
|
|
9
|
+
if (typeof source.code1 === 'string') {
|
|
10
|
+
val = JSON.parse(source.code1)
|
|
11
|
+
}
|
|
12
|
+
this._value = val;
|
|
13
|
+
}
|
|
14
|
+
if (this._value && this._value.length == 0) {
|
|
15
|
+
const str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
16
|
+
for (let i = 0; i < 4; i++) {
|
|
17
|
+
var item = {};
|
|
18
|
+
item['code'] = str[i];
|
|
19
|
+
|
|
20
|
+
item['name'] = '';
|
|
21
|
+
item['flagDeleted'] = false
|
|
22
|
+
this._value.push(item)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
source.maxValue1 = this._value.length;
|
|
26
|
+
return this._value
|
|
27
|
+
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
};
|
|
31
|
+
rtn = base.copy(source, rtn);
|
|
32
|
+
rtn = base.copy(rtn, valid.Init(rtn));
|
|
33
|
+
return rtn;
|
|
34
|
+
};
|
|
35
|
+
export default NumberWithPlusAndMinus
|
|
@@ -57,6 +57,7 @@ function loadSearchScreenModel(source, prevParam) {
|
|
|
57
57
|
}
|
|
58
58
|
if ((source.fields[key].controlType === Enum.ControlType.DateRange
|
|
59
59
|
|| source.fields[key].controlType === Enum.ControlType.Location
|
|
60
|
+
|| source.fields[key].controlType === Enum.ControlType.MonthRange
|
|
60
61
|
|| source.fields[key].controlType === Enum.ControlType.DateTimeRange)
|
|
61
62
|
&& source.fields[key].code2 == undefined) {
|
|
62
63
|
source.fields[key].code2 = '';
|
|
@@ -205,8 +205,8 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
205
205
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
else{
|
|
209
|
-
data=data.replace("总耗时", "").replace("總耗時", "");
|
|
208
|
+
else {
|
|
209
|
+
data = data.replace("总耗时", "").replace("總耗時", "");
|
|
210
210
|
}
|
|
211
211
|
return data;
|
|
212
212
|
}
|
|
@@ -468,6 +468,9 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
468
468
|
styleObj["width"] = col.width + 'px'; //列宽
|
|
469
469
|
styleObj["min-width"] = col.width + 'px'; //列宽
|
|
470
470
|
}
|
|
471
|
+
if (col.paramName == 'drag') {
|
|
472
|
+
styleObj["cursor"] = 'move';
|
|
473
|
+
}
|
|
471
474
|
styleObj["text-align"] = col.align; //水平位置
|
|
472
475
|
|
|
473
476
|
return styleObj;
|
|
@@ -573,12 +576,15 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
573
576
|
//设置行样式
|
|
574
577
|
setStyleRow(rows) {
|
|
575
578
|
rows.forEach((row) => {
|
|
576
|
-
if (!row
|
|
577
|
-
row
|
|
579
|
+
if (!row.rowStyle) {
|
|
580
|
+
row.rowStyle = "";
|
|
578
581
|
}
|
|
579
582
|
if (rtn.rowColorColumn && row[rtn.rowColorColumn]) {
|
|
580
583
|
row.rowStyle = row.rowStyle + "color:" + row[rtn.rowColorColumn] + ";";
|
|
581
584
|
}
|
|
585
|
+
if (row.flagDrag && row.flagDrag=='1') {
|
|
586
|
+
row.rowStyle = row.rowStyle + "cursor:move;";
|
|
587
|
+
}
|
|
582
588
|
});
|
|
583
589
|
},
|
|
584
590
|
_lastRowspan: null,
|
package/src/main.js
CHANGED
|
@@ -21,8 +21,8 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
app.use(centaline, {
|
|
24
|
-
baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
|
|
25
|
-
|
|
24
|
+
//baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
|
|
25
|
+
baseUrl: "http://10.88.22.66:6060/onecard-api/",
|
|
26
26
|
//baseUrl: "http://10.1.245.50:38735/max-uplink-api/",
|
|
27
27
|
//baseUrl: "http://10.1.245.111:38028/",
|
|
28
28
|
flagRouterSelf: true,
|
|
@@ -63,8 +63,8 @@ app.use(centaline, {
|
|
|
63
63
|
return {
|
|
64
64
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
65
65
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
66
|
-
|
|
67
|
-
authObject: '{EmpID:"
|
|
66
|
+
authObject: '{token:"1-80c31492-53e1-45c8-82ce-67ca89b3e40c"}',
|
|
67
|
+
//authObject: '{EmpID:"Token_bf5a6050-abc4-4108-b208-2c808c1ef335",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_bf5a6050-abc4-4108-b208-2c808c1ef335",Platform:"IOS"}',
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
package/src/utils/Enum.js
CHANGED
|
@@ -291,6 +291,16 @@ const Enum = {
|
|
|
291
291
|
/// </summary>
|
|
292
292
|
Tags: 58,
|
|
293
293
|
|
|
294
|
+
/// <summary>
|
|
295
|
+
/// 月份区间
|
|
296
|
+
/// </summary>
|
|
297
|
+
MonthRange: 59,
|
|
298
|
+
|
|
299
|
+
/// <summary>
|
|
300
|
+
/// 数值输入框带+/-按钮
|
|
301
|
+
/// </summary>
|
|
302
|
+
NumberWithPlusAndMinus: 60,
|
|
303
|
+
|
|
294
304
|
},
|
|
295
305
|
|
|
296
306
|
//返回状态码
|
|
@@ -737,19 +747,19 @@ const Enum = {
|
|
|
737
747
|
/**
|
|
738
748
|
* 悬停 触发
|
|
739
749
|
*/
|
|
740
|
-
Hover:
|
|
750
|
+
Hover: 0,
|
|
741
751
|
/**
|
|
742
752
|
* 点击 触发
|
|
743
753
|
*/
|
|
744
|
-
Click:
|
|
754
|
+
Click: 1,
|
|
745
755
|
/**
|
|
746
756
|
* 聚焦 触发
|
|
747
757
|
*/
|
|
748
|
-
Focus:
|
|
758
|
+
Focus: 2,
|
|
749
759
|
/**
|
|
750
760
|
* 右键菜单 触发
|
|
751
761
|
*/
|
|
752
|
-
Contextmenu:
|
|
762
|
+
Contextmenu: 3
|
|
753
763
|
},
|
|
754
764
|
};
|
|
755
765
|
|
package/src/utils/mixins.js
CHANGED
|
@@ -761,7 +761,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
761
761
|
common.closeDialog(dialogOption);
|
|
762
762
|
|
|
763
763
|
},
|
|
764
|
-
|
|
764
|
+
isIframe: model.isIframe,
|
|
765
765
|
},
|
|
766
766
|
}]
|
|
767
767
|
};
|
|
@@ -782,8 +782,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
782
782
|
onSubmit: () => {
|
|
783
783
|
common.closeDialog(dialogOption.dialog);
|
|
784
784
|
},
|
|
785
|
-
|
|
786
|
-
|
|
785
|
+
isIframe: model.isIframe,
|
|
787
786
|
},
|
|
788
787
|
}]
|
|
789
788
|
};
|
|
@@ -872,6 +871,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
872
871
|
submitData = field.getActionPara(submitData).para;
|
|
873
872
|
let title = field.pageTitle == undefined ? field.label : field.pageTitle;
|
|
874
873
|
submitData.actionType = field.actionType;
|
|
874
|
+
if (model.isIframe) {
|
|
875
|
+
submitData.isIframe = model.isIframe;
|
|
876
|
+
}
|
|
875
877
|
var fun = common.getDataDrivenOpts().handler[action];
|
|
876
878
|
fun(submitData, title, model);
|
|
877
879
|
}
|
package/src/utils/validate.js
CHANGED
|
@@ -236,6 +236,7 @@ const valid = {
|
|
|
236
236
|
break;
|
|
237
237
|
case Enum.ControlType.NumericRange:
|
|
238
238
|
case Enum.ControlType.DateRange:
|
|
239
|
+
case Enum.ControlType.MonthRange:
|
|
239
240
|
case Enum.ControlType.DateTimeRange:
|
|
240
241
|
case Enum.ControlType.ComboBoxWithTextBox:
|
|
241
242
|
case Enum.ControlType.PhoneNumberText:
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/
|
|
4
|
-
:searchDataApi="'/
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/admin/schoolclass/SchoolStudentClassList/getLayoutOfSearch'"
|
|
4
|
+
:searchDataApi="'/admin/schoolclass/SchoolStudentClassList/getListOfSearchModel'"></ct-searchlist>
|
|
5
5
|
<ct-dialoglist ref="dialogList"></ct-dialoglist>
|
|
6
6
|
|
|
7
7
|
</div>
|