centaline-data-driven-v3 0.0.61 → 0.0.62
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 +49 -49
- package/package.json +1 -1
- package/src/components/Layout/Layout.vue +16 -5
- package/src/components/Layout/LayoutChildren.vue +3 -2
- package/src/components/Layout/LayoutChildren1.vue +3 -2
- package/src/components/Layout/LayoutField.vue +14 -1
- package/src/components/app/Field.vue +5 -0
- package/src/components/web/ContainerControl.vue +18 -11
- package/src/components/web/File.vue +2 -24
- package/src/components/web/Image.vue +23 -0
- package/src/components/web/PhotoSelectList.vue +3 -1
- package/src/components/web/SearchList/SearchTable.vue +2 -2
- package/src/components/web/photo.vue +1 -21
- package/src/loader/src/Field.js +7 -0
- package/src/loader/src/File.js +3 -1
- package/src/loader/src/Form.js +41 -1
- package/src/loader/src/LibFunction.js +5 -2
- package/src/loader/src/SearchScreen.js +1 -2
- package/src/main.js +4 -4
- package/src/utils/mixins.js +4 -5
- package/src/views/SearchList.vue +3 -3
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ct-Layout" v-if="Layout !== null && !loading">
|
|
3
3
|
<ct-layoutchildren :rowindex="rowindex" :actionRouter="actionRouter" :rowdata="vmodel" :vmodel="LayoutList"
|
|
4
|
-
:flagflex="true" :
|
|
5
|
-
|
|
4
|
+
:flagflex="true" :fields="fields" :parameterAction="parameterAction"
|
|
5
|
+
:rowMenuDisplayCountForAPP="rowMenuDisplayCountForAPP" @click="clickHandler"
|
|
6
|
+
@changeHandler="changeHandler"></ct-layoutchildren>
|
|
6
7
|
</div>
|
|
7
8
|
</template>
|
|
8
9
|
<script setup lang="ts">
|
|
@@ -18,6 +19,7 @@ const props = defineProps({
|
|
|
18
19
|
listData: Array,
|
|
19
20
|
apiParam: Object,
|
|
20
21
|
parameterAction: String,
|
|
22
|
+
fields: Array,
|
|
21
23
|
formListactionRouter: {
|
|
22
24
|
type: Array,
|
|
23
25
|
default: [],
|
|
@@ -46,6 +48,9 @@ function init() {
|
|
|
46
48
|
if (typeof props.vmodel !== "undefined") {
|
|
47
49
|
load(props.vmodel, props.cellLayout);
|
|
48
50
|
}
|
|
51
|
+
else if (props.fields) {
|
|
52
|
+
load(null, props.cellLayout);
|
|
53
|
+
}
|
|
49
54
|
});
|
|
50
55
|
}
|
|
51
56
|
function load(data, cellLayout) {
|
|
@@ -106,6 +111,7 @@ function load(data, cellLayout) {
|
|
|
106
111
|
}
|
|
107
112
|
loading.value = false;
|
|
108
113
|
}
|
|
114
|
+
|
|
109
115
|
function getValue(data, val) {
|
|
110
116
|
return val.split(".").reduce((data, currentVal) => {
|
|
111
117
|
var rtn = data[common.initialsToLowerCase(currentVal)];
|
|
@@ -218,10 +224,10 @@ function xmlToJson(xml) {
|
|
|
218
224
|
}
|
|
219
225
|
else if (props.vmodel.delete && attribute.nodeValue == 'delete') {
|
|
220
226
|
obj["rightRouter"] = true
|
|
221
|
-
}
|
|
227
|
+
}
|
|
222
228
|
else if (props.vmodel.delete && attribute.nodeValue == 'moveup') {
|
|
223
229
|
obj["rightRouter"] = true
|
|
224
|
-
}
|
|
230
|
+
}
|
|
225
231
|
else if (props.vmodel.delete && attribute.nodeValue == 'movedown') {
|
|
226
232
|
obj["rightRouter"] = true
|
|
227
233
|
} else {
|
|
@@ -302,7 +308,12 @@ function clickHandler(routerKey, rowindex, forname, forrowindex, flagHaveAlert)
|
|
|
302
308
|
}
|
|
303
309
|
}
|
|
304
310
|
function changeHandler(field) {
|
|
305
|
-
|
|
311
|
+
if (props.fields) {
|
|
312
|
+
emit("changeHandler", field);
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
emit("changeHandler", field, props.vmodel.$sourceIndex);
|
|
316
|
+
}
|
|
306
317
|
}
|
|
307
318
|
</script>
|
|
308
319
|
<style scoped>
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<div style="display: flex;height: max-content;cursor: pointer;" :class="[flagflex == true ? 'flagflex' : '',model.className]"
|
|
4
4
|
v-if="model.rightRouter && model.value != ''" :style="model.styleObject" @click="clickHandlerLayout()">
|
|
5
5
|
<component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index"
|
|
6
|
-
:is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex" :parameterAction="parameterAction"
|
|
6
|
+
:is="item.is" :vmodel="item" :rowindex="rowindex" :fields="fields" :forname="forname" :forrowindex="forrowindex" :parameterAction="parameterAction"
|
|
7
7
|
:rowMenuDisplayCountForAPP="rowMenuDisplayCountForAPP" @click="clickHandler" @changeHandler="changeHandler"></component>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
<div style="display: flex;height: max-content;" :class="[flagflex == true ? 'flagflex' : '',model.className]"
|
|
11
11
|
v-else-if="model.value != '' && model.visibility != '0'" :style="model.styleObject">
|
|
12
12
|
<component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index"
|
|
13
|
-
:is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex" :parameterAction="parameterAction"
|
|
13
|
+
:is="item.is" :vmodel="item" :rowindex="rowindex" :fields="fields" :forname="forname" :forrowindex="forrowindex" :parameterAction="parameterAction"
|
|
14
14
|
:rowMenuDisplayCountForAPP="rowMenuDisplayCountForAPP" @click="clickHandler" @changeHandler="changeHandler"></component>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
@@ -26,6 +26,7 @@ const props = defineProps({
|
|
|
26
26
|
forname: String,
|
|
27
27
|
forrowindex: String,
|
|
28
28
|
parameterAction: String,
|
|
29
|
+
fields:Array,
|
|
29
30
|
flagflex: {
|
|
30
31
|
type: Boolean,
|
|
31
32
|
default: false,
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<div style="display: flex;height: max-content;cursor: pointer;" v-if="model.rightRouter && model.value != ''"
|
|
4
4
|
:style="model.styleObject" :class="model.className" @click="clickHandlerLayout($event)">
|
|
5
5
|
<component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index"
|
|
6
|
-
:is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex"
|
|
6
|
+
:is="item.is" :vmodel="item" :rowindex="rowindex" :fields="fields" :forname="forname" :forrowindex="forrowindex"
|
|
7
7
|
:rowMenuDisplayCountForAPP="rowMenuDisplayCountForAPP" @click="clickHandler"></component>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
<div style="display: flex;height: max-content;" v-else-if="model.value != '' && model.visibility != '0'"
|
|
11
11
|
:style="model.styleObject" :class="model.className">
|
|
12
12
|
<component v-for="(item, index) in model.fields" :actionRouter="actionRouter" :rowdata="rowdata" :key="index"
|
|
13
|
-
:is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex"
|
|
13
|
+
:is="item.is" :vmodel="item" :rowindex="rowindex" :fields="fields" :forname="forname" :forrowindex="forrowindex"
|
|
14
14
|
:rowMenuDisplayCountForAPP="rowMenuDisplayCountForAPP" @click="clickHandler"></component>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
@@ -26,6 +26,7 @@ const props = defineProps({
|
|
|
26
26
|
forname: String,
|
|
27
27
|
forrowindex: String,
|
|
28
28
|
parameterAction: String,
|
|
29
|
+
fields:Array,
|
|
29
30
|
rowMenuDisplayCountForAPP:{
|
|
30
31
|
type: Number,
|
|
31
32
|
default: 4,
|
|
@@ -17,10 +17,23 @@ const props = defineProps({
|
|
|
17
17
|
forname: String,
|
|
18
18
|
forrowindex: String,
|
|
19
19
|
parameterAction: String,
|
|
20
|
+
fields: Array,
|
|
20
21
|
})
|
|
21
22
|
const model = ref(null)
|
|
22
23
|
model.value = CellLayout(props.vmodel);
|
|
23
|
-
const field =
|
|
24
|
+
const field = ref({})
|
|
25
|
+
init()
|
|
26
|
+
function init() {
|
|
27
|
+
if (props.fields) {
|
|
28
|
+
field.value= props.fields.find((v) => {
|
|
29
|
+
return v.fieldName1 === model.value.fieldName;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
field.value = props.rowdata[model.value.fieldName]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
24
37
|
function changeHandler(field) {
|
|
25
38
|
emit('changeHandler', field);
|
|
26
39
|
}
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
</slot>
|
|
12
12
|
</template>
|
|
13
|
+
<template #left-icon>
|
|
14
|
+
<slot name="PreLabel">
|
|
15
|
+
<template v-if="model.preLabel1"><span style="display: flex;height: 28px;align-items: center;" v-html="model.preLabel1"></span></template>
|
|
16
|
+
</slot>
|
|
17
|
+
</template>
|
|
13
18
|
<template #input>
|
|
14
19
|
<slot name="Control">
|
|
15
20
|
|
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
<el-container v-if="model.fields.length > 0"
|
|
3
3
|
:class="model.controlType != Enum.ControlType.Compound ? 'ct-container' : ''">
|
|
4
4
|
<template v-if="model.controlType == Enum.ControlType.Compound">
|
|
5
|
-
<template v-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
<template v-if="model.layoutTemplate">
|
|
6
|
+
<ct-layout :fields="model.fields" :cellLayout="model.layoutTemplate" :parameterAction="parameterAction"
|
|
7
|
+
:key="itemKey" @changeHandler="change">
|
|
8
|
+
</ct-layout>
|
|
9
|
+
</template>
|
|
10
|
+
<template v-else>
|
|
11
|
+
<template v-for="(col, index) in model.fields" :key="index">
|
|
12
|
+
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
13
|
+
<div v-if="col.show !== false"
|
|
14
|
+
:class="index > 0 && (col.controlLabel == '' || col.is == 'ct-button') ? 'complex-left-10' : ''"
|
|
15
|
+
:style="{ 'width': (col.width != '0' ? col.width + 'px' : '100%'), 'flex': (col.width != '0' ? '0 0 ' + col.width + 'px' : '100%') }">
|
|
16
|
+
<component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="parameterAction"
|
|
17
|
+
v-bind="col.bindPara" @fieldClick="fieldClickHandler(col)" @change="change(col)"
|
|
18
|
+
@popupSearchList="popupSearchListHandler"></component>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
14
21
|
</template>
|
|
15
22
|
</template>
|
|
16
23
|
<template v-else>
|
|
@@ -46,14 +53,14 @@ const props = defineProps({
|
|
|
46
53
|
})
|
|
47
54
|
const model = initData(props, ContainerControl)
|
|
48
55
|
const Fields = ref()
|
|
49
|
-
|
|
56
|
+
const itemKey = ref(0)
|
|
50
57
|
model.value.selfValidExcute = () => {
|
|
51
58
|
let rtnBool = true;
|
|
52
59
|
if (typeof Fields.value !== 'undefined') {
|
|
53
60
|
Fields.value.forEach((f) => {
|
|
54
61
|
if (f.model && typeof f.model.validExcute !== 'undefined') {
|
|
55
62
|
if (!f.model.validExcute(f.model)) {
|
|
56
|
-
model.value.displayValidMessage=f.model.displayValidMessage
|
|
63
|
+
model.value.displayValidMessage = f.model.displayValidMessage
|
|
57
64
|
rtnBool = false;
|
|
58
65
|
}
|
|
59
66
|
}
|
|
@@ -662,33 +662,11 @@ function PasteUpload(event) {
|
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
|
|
665
|
-
function ListenerPaste(event) {
|
|
666
|
-
var target = event.target;
|
|
665
|
+
function ListenerPaste(event) {
|
|
667
666
|
const uploads = document.querySelectorAll('[uploadStatus="upload"]');
|
|
668
|
-
|
|
669
|
-
if (!window.uploads) {
|
|
670
|
-
window.uploads = { count: 0, length: uploads.length };
|
|
671
|
-
}
|
|
672
|
-
if (uploads.length > 1) {
|
|
673
|
-
window.uploads.count = window.uploads.count + 1;
|
|
674
|
-
window.uploads.length = uploads.length;
|
|
675
|
-
|
|
676
|
-
if (window.uploads.count == window.uploads.length) {
|
|
677
|
-
window.uploads = null;
|
|
678
|
-
ElMessage({
|
|
679
|
-
message: "存在多个上传组件,请点击粘贴上传!",
|
|
680
|
-
type: 'info',
|
|
681
|
-
showClose: true,
|
|
682
|
-
});
|
|
683
|
-
return false;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
else if (uploads.length == 1) {
|
|
687
|
-
window.uploads = null;
|
|
667
|
+
if (uploads.length == 1) {
|
|
688
668
|
PasteUpload(event);
|
|
689
669
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
670
|
}
|
|
693
671
|
|
|
694
672
|
// 添加粘贴事件监听器
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ct-field :vmodel="model">
|
|
3
|
+
<template #Control v-if="model.code1">
|
|
4
|
+
<div class="ct-image" style="width:100%;text-align: center">
|
|
5
|
+
<el-image :src="model.code1"
|
|
6
|
+
:style="{ 'width': model.minValue1 ? model.minValue1 + 'px' : null, 'height': model.maxValue1 ? model.maxValue1 + 'px' : null, 'border-radius': (model.width1 || 0) + 'px' }">
|
|
7
|
+
</el-image>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
</ct-field>
|
|
11
|
+
</template>
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
parameterAction: String,
|
|
15
|
+
vmodel: Object,
|
|
16
|
+
source: Object,
|
|
17
|
+
})
|
|
18
|
+
const model = props.vmodel
|
|
19
|
+
defineExpose({
|
|
20
|
+
model
|
|
21
|
+
})
|
|
22
|
+
</script>
|
|
23
|
+
<style scoped></style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
@change="chooseRadio(item)" v-model="item.ischeck" :label="true"> </el-radio>
|
|
17
17
|
<el-checkbox v-else style="margin: 0 5px;" @change="choose(item, true)"
|
|
18
18
|
v-model="item.ischeck"></el-checkbox>
|
|
19
|
-
<ct-layout :vmodel="item" :cellLayout="layout" :rowindex="index" :flagMediaSelect="true"
|
|
19
|
+
<ct-layout :vmodel="item" :cellLayout="layout" :key="itemKey" :rowindex="index" :flagMediaSelect="true"
|
|
20
20
|
@rolRouterclick="rolRouterCellClickHandler">
|
|
21
21
|
</ct-layout>
|
|
22
22
|
</div>
|
|
@@ -96,6 +96,7 @@ const options = ref([])
|
|
|
96
96
|
const mediaLabelID = ref('')
|
|
97
97
|
const loading = ref(true)
|
|
98
98
|
const selectedMode = ref(2)
|
|
99
|
+
const itemKey = ref(0)
|
|
99
100
|
const optionAttrs = {
|
|
100
101
|
label: 'name',
|
|
101
102
|
value: 'code',
|
|
@@ -159,6 +160,7 @@ function load(data) {
|
|
|
159
160
|
options.value = data
|
|
160
161
|
});
|
|
161
162
|
}
|
|
163
|
+
itemKey.value = Math.random()
|
|
162
164
|
} catch (e) {
|
|
163
165
|
ElMessage({
|
|
164
166
|
message: e,
|
|
@@ -584,8 +584,8 @@ function importComplete(res, field) {
|
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
else {
|
|
587
|
-
if (field && field.
|
|
588
|
-
this.changeCallBackHandler(field, field.
|
|
587
|
+
if (field && field.callBackFunName) {
|
|
588
|
+
this.changeCallBackHandler(field, field.callBackFunName, res.content);
|
|
589
589
|
}
|
|
590
590
|
else {
|
|
591
591
|
doAction(res)
|
|
@@ -511,28 +511,8 @@ function PasteUpload(event) {
|
|
|
511
511
|
|
|
512
512
|
function ListenerPaste(event) {
|
|
513
513
|
|
|
514
|
-
var target = event.target;
|
|
515
514
|
const uploads = document.querySelectorAll('[uploadStatus="upload"]');
|
|
516
|
-
|
|
517
|
-
if (!window.uploads) {
|
|
518
|
-
window.uploads = { count: 0, length: uploads.length };
|
|
519
|
-
}
|
|
520
|
-
if (uploads.length > 1) {
|
|
521
|
-
window.uploads.count = window.uploads.count + 1;
|
|
522
|
-
window.uploads.length = uploads.length;
|
|
523
|
-
|
|
524
|
-
if (window.uploads.count == window.uploads.length) {
|
|
525
|
-
window.uploads = null;
|
|
526
|
-
ElMessage({
|
|
527
|
-
message: "存在多个上传组件,请点击上传!",
|
|
528
|
-
type: 'info',
|
|
529
|
-
showClose: true,
|
|
530
|
-
});
|
|
531
|
-
return false;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
else if (uploads.length == 1) {
|
|
535
|
-
window.uploads = null;
|
|
515
|
+
if (uploads.length == 1) {
|
|
536
516
|
PasteUpload(event);
|
|
537
517
|
}
|
|
538
518
|
|
package/src/loader/src/Field.js
CHANGED
|
@@ -741,6 +741,13 @@ const Base = function (source, moreActionRouter) {
|
|
|
741
741
|
set vueComponentName(v) {
|
|
742
742
|
source.vueComponentName = v;
|
|
743
743
|
},
|
|
744
|
+
// 控件类型为 VueCustomizedComponent 时 对应的 前端vue的组件名称
|
|
745
|
+
get layoutTemplate() {
|
|
746
|
+
return source.layoutTemplate;
|
|
747
|
+
},
|
|
748
|
+
set layoutTemplate(v) {
|
|
749
|
+
source.layoutTemplate = v;
|
|
750
|
+
},
|
|
744
751
|
//Field结束
|
|
745
752
|
|
|
746
753
|
collapseName: -1,//所属分组
|
package/src/loader/src/File.js
CHANGED
|
@@ -393,8 +393,10 @@ function handleAvatarSuccess(res, file, fileList, model) {
|
|
|
393
393
|
model.fileList.push(res.content[0]);
|
|
394
394
|
i = model.fileList.findIndex(v => v.uid === file.uid);
|
|
395
395
|
}
|
|
396
|
+
data.uid = file.uid;
|
|
396
397
|
|
|
397
|
-
model.fileList[i] =
|
|
398
|
+
model.fileList[i] = data;
|
|
399
|
+
//model.fileList[i] = { ...model.fileList[i], data }
|
|
398
400
|
// rtn.fileList = fileList;//无数据会监听不到
|
|
399
401
|
}
|
|
400
402
|
else {
|
package/src/loader/src/Form.js
CHANGED
|
@@ -70,6 +70,12 @@ function loadFromModel(source, isFormList) {
|
|
|
70
70
|
return rtn1[attrKey];
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
+
getValueByFieldNameFromParent(id, attrKey) {
|
|
74
|
+
if(this.form && this.form.parentModelForm){
|
|
75
|
+
return this.form.parentModelForm.getValueByFieldName(id, attrKey);
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
},
|
|
73
79
|
//设置Field的属性attrKey的值
|
|
74
80
|
setValueByFieldName(id, attrKey, attrValue) {
|
|
75
81
|
attrKey = common.initialsToLowerCase(attrKey);
|
|
@@ -110,6 +116,12 @@ function loadFromModel(source, isFormList) {
|
|
|
110
116
|
requiredHandle(rtn1, this.form);
|
|
111
117
|
}
|
|
112
118
|
},
|
|
119
|
+
setValueByFieldNameFromParent(id, attrKey, attrValue) {
|
|
120
|
+
if(this.form && this.form.parentModelForm){
|
|
121
|
+
return this.form.parentModelForm.setValueByFieldName(id, attrKey, attrValue);
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
},
|
|
113
125
|
//设置Field的v1、v2的值
|
|
114
126
|
setV1AndV2ByField1(id, code1, code2) {
|
|
115
127
|
var rtn1 = this.fieldsDic[id];
|
|
@@ -395,6 +407,32 @@ function loadFromModel(source, isFormList) {
|
|
|
395
407
|
common.message(message, type, center, duration, showClose, dangerouslyUseHTMLString)
|
|
396
408
|
},
|
|
397
409
|
|
|
410
|
+
},
|
|
411
|
+
getValueByFieldName(id, attrKey) {
|
|
412
|
+
attrKey = common.initialsToLowerCase(attrKey);
|
|
413
|
+
var rtn1 = this.fieldsDic[id];
|
|
414
|
+
if (rtn1) {
|
|
415
|
+
return rtn1[attrKey];
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
setValueByFieldName(id, attrKey, attrValue) {
|
|
419
|
+
attrKey = common.initialsToLowerCase(attrKey);
|
|
420
|
+
var rtn1 = this.fieldsDic[id];
|
|
421
|
+
if (rtn1) {
|
|
422
|
+
if(attrKey=='code1' && rtn1.controlType===4
|
|
423
|
+
&& attrValue!=undefined && attrValue!=null && attrValue!=''){
|
|
424
|
+
if(rtn1.decimals1 != undefined && rtn1.decimals1 != null && rtn1.decimals1>-1){
|
|
425
|
+
attrValue = Number(attrValue).toFixed(rtn1.decimals1)
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
rtn1[attrKey] = attrValue;
|
|
429
|
+
// this.self.hatchHandle(id, attrKey, attrValue, rtn1);
|
|
430
|
+
|
|
431
|
+
//用于处理源数据改动,强制更新视图数据 todo
|
|
432
|
+
// if (rtn1.self.$forceUpdate) {
|
|
433
|
+
// rtn1.self.$forceUpdate();
|
|
434
|
+
// }
|
|
435
|
+
}
|
|
398
436
|
},
|
|
399
437
|
get source() {
|
|
400
438
|
return source;
|
|
@@ -470,7 +508,9 @@ function loadFromModel(source, isFormList) {
|
|
|
470
508
|
item.fields = []
|
|
471
509
|
if (item.compoundFields) {
|
|
472
510
|
item.compoundFields.forEach((v) => {
|
|
473
|
-
|
|
511
|
+
let itemCompound = LibFunction.GetControl(v, source, showLabel, isList);
|
|
512
|
+
itemCompound.form = rtn;
|
|
513
|
+
item.fields.push(itemCompound)
|
|
474
514
|
});
|
|
475
515
|
}
|
|
476
516
|
}
|
|
@@ -247,8 +247,11 @@ const LibFunction = {
|
|
|
247
247
|
item = NumberWithPlusAndMinus(item)
|
|
248
248
|
item.is = 'ct-numberwithplusandminus'
|
|
249
249
|
break;
|
|
250
|
-
case Enum.ControlType.VueCustomizedComponent:
|
|
251
|
-
item.is = 'ct-'+item.vueComponentName.toLowerCase();
|
|
250
|
+
case Enum.ControlType.VueCustomizedComponent:
|
|
251
|
+
item.is = 'ct-' + item.vueComponentName.toLowerCase();
|
|
252
|
+
break;
|
|
253
|
+
case Enum.ControlType.Image:
|
|
254
|
+
item.is = 'ct-image'
|
|
252
255
|
break;
|
|
253
256
|
default:
|
|
254
257
|
item = Label(item)
|
|
@@ -77,8 +77,7 @@ function loadSearchScreenModel(source, prevParam) {
|
|
|
77
77
|
return v.controlType === Enum.ControlType.ButtonSearch;
|
|
78
78
|
});
|
|
79
79
|
var screens = rtn.sourceFieldsArr.filter((v, i) => {
|
|
80
|
-
return (advIndex === -1 || i < advIndex) && v.controlType !== Enum.ControlType.From
|
|
81
|
-
|| v.controlType == Enum.ControlType.Hidden;
|
|
80
|
+
return (advIndex === -1 || i < advIndex) && v.controlType !== Enum.ControlType.From;
|
|
82
81
|
});
|
|
83
82
|
|
|
84
83
|
rtnscreens = this.initScreen(screens);
|
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/xian/",
|
|
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-62bcf715-79c4-4a23-9780-269ea2f31478"}',
|
|
67
|
+
//authObject: '{EmpID:"Token_1f937895-684b-4db0-83e5-6a18ce16763b",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_1f937895-684b-4db0-83e5-6a18ce16763b",Platform:"WEB"}',
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
package/src/utils/mixins.js
CHANGED
|
@@ -125,7 +125,6 @@ function validExcuteMessage(validtemp, model) {
|
|
|
125
125
|
|
|
126
126
|
//路由操作事件
|
|
127
127
|
export function RouterClickHandler(field, submitData, action, model, source, callBack) {
|
|
128
|
-
debugger
|
|
129
128
|
if (source == 'form') {
|
|
130
129
|
model.scripts.$fd = field.id;
|
|
131
130
|
model.scripts.$result = [];
|
|
@@ -889,8 +888,8 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
889
888
|
if (callBack) {
|
|
890
889
|
callBack(data);
|
|
891
890
|
}
|
|
892
|
-
if (field && field.
|
|
893
|
-
model.$vue.changeCallBackHandler(field, field.
|
|
891
|
+
if (field && field.callBackFunName) {
|
|
892
|
+
model.$vue.changeCallBackHandler(field, field.callBackFunName, data.content);
|
|
894
893
|
}
|
|
895
894
|
else if (field.isRefersh) {
|
|
896
895
|
model.$vue.load(model.$vue.Form.loadFromModel(data.content));
|
|
@@ -1623,8 +1622,8 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
|
|
|
1623
1622
|
if (callBack) {
|
|
1624
1623
|
callBack(data);
|
|
1625
1624
|
}
|
|
1626
|
-
if (field && field.
|
|
1627
|
-
model.$vue.changeCallBackHandler(field, field.
|
|
1625
|
+
if (field && field.callBackFunName) {
|
|
1626
|
+
model.$vue.changeCallBackHandler(field, field.callBackFunName, data.content);
|
|
1628
1627
|
}
|
|
1629
1628
|
else if (field.isRefersh) {
|
|
1630
1629
|
model.$vue.load(model.$vue.Form.loadFromModel(data.content));
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/
|
|
4
|
-
:searchDataApi="'/
|
|
5
|
-
:searchStatsApi="'/
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/admin/SchoolTeachingPlanList/getLayoutOfSearch'"
|
|
4
|
+
:searchDataApi="'/admin/SchoolTeachingPlanList/getListOfSearchModel'"
|
|
5
|
+
:searchStatsApi="'/admin/SchoolTeachingPlanList/getListStats'"></ct-searchlist>
|
|
6
6
|
<ct-dialoglist ref="dialogList"></ct-dialoglist>
|
|
7
7
|
|
|
8
8
|
</div>
|