centaline-data-driven-v3 0.1.53 → 0.1.55
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 +118 -118
- package/package.json +1 -1
- package/src/components/app/Form.vue +4 -0
- package/src/components/app/SearchList/SearchTable.vue +28 -20
- package/src/components/app/SearchList.vue +4 -0
- package/src/components/web/Button.vue +12 -7
- package/src/components/web/Form.vue +12 -7
- package/src/components/web/FormList.vue +10 -1
- package/src/components/web/SearchList/SearchSideRight.vue +13 -11
- package/src/components/web/SearchList/SearchTable.vue +7 -3
- package/src/components/web/SearchList.vue +21 -17
- package/src/components/web/SearchScreen.vue +6 -2
- package/src/components/web/TextBox.vue +8 -2
- package/src/components/web/Tree.vue +4 -0
- package/src/components/web/dialog.vue +1 -3
- package/src/loader/src/Button.js +9 -0
- package/src/loader/src/Form.js +30 -18
- package/src/loader/src/Router.js +8 -2
- package/src/loader/src/SearchScreen.js +8 -5
- package/src/loader/src/SearchTable.js +13 -7
- package/src/main.js +3 -3
- package/src/views/Form.vue +7 -9
- package/src/views/SearchList.vue +2 -2
package/package.json
CHANGED
|
@@ -10,16 +10,18 @@
|
|
|
10
10
|
<div ref="refTableParent" class="ct-tableParentAPP" :style="'height:' + model.tableHeight + 'px'"
|
|
11
11
|
@scroll="scrollHandle($event)">
|
|
12
12
|
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"
|
|
13
|
-
|
|
13
|
+
:loosing-text="common.LocalizedString('释放即可刷新...', '釋放即可刷新...')">
|
|
14
14
|
<van-list v-if="!tableError" v-model:loading="tableLoading"
|
|
15
15
|
:error-text="common.LocalizedString('没有查到数据,点我刷新', '沒有查到數據,點我刷新')" :finished="finished"
|
|
16
|
-
:loading-text="common.LocalizedString('加载中...', '加載中...')"
|
|
17
|
-
|
|
16
|
+
:loading-text="common.LocalizedString('加载中...', '加載中...')" @load="onLoad" :immediate-check="false"
|
|
17
|
+
:style="'min-height:' + model.tableHeight + 'px'">
|
|
18
18
|
<template v-if="flagPopupSearchlist && singleSelectio">
|
|
19
19
|
<van-radio-group v-model="checkeds" ref="refCheckboxGroup">
|
|
20
|
-
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex"
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex"
|
|
21
|
+
@click="selectRow(row, rowindex, false)">
|
|
22
|
+
<van-radio @click.stop="selectRow(row, rowindex, true)" icon-size="16px"
|
|
23
|
+
checked-color="#EE6B6B" :name="rowindex" :checked="row.$select"
|
|
24
|
+
:disabled="!flagSelect(row)"> </van-radio>
|
|
23
25
|
<ct-layout :vmodel="row" :cellLayout="model.cellLayout" :rowindex="rowindex"
|
|
24
26
|
:key="itemKey" @rolRouterclick="rolRouterCellClickHandler"
|
|
25
27
|
:actionRouter="model.actionRouter"
|
|
@@ -30,11 +32,13 @@
|
|
|
30
32
|
</template>
|
|
31
33
|
<template v-else>
|
|
32
34
|
<van-checkbox-group v-model="checkeds" ref="refCheckboxGroup">
|
|
33
|
-
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex"
|
|
35
|
+
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex"
|
|
36
|
+
@click="selectRow(row, rowindex, false)">
|
|
34
37
|
<template v-if="isoperate || flagPopupSearchlist">
|
|
35
38
|
<van-checkbox v-if="flagSelect(row)" shape="square" checked-color="#EE6B6B"
|
|
36
|
-
icon-size="14px" :name="rowindex"
|
|
37
|
-
|
|
39
|
+
icon-size="14px" :name="rowindex"
|
|
40
|
+
@click.stop="selectRow(row, rowindex, true)"></van-checkbox>
|
|
41
|
+
<div class="van-checkbox" v-else>{{ row.$select }}</div>
|
|
38
42
|
</template>
|
|
39
43
|
<ct-layout :vmodel="row" :cellLayout="model.cellLayout" :rowindex="rowindex"
|
|
40
44
|
:key="itemKey" @rolRouterclick="rolRouterCellClickHandler"
|
|
@@ -61,8 +65,8 @@
|
|
|
61
65
|
</div>
|
|
62
66
|
<div class="ct-checkboxtips" v-if="isoperate || flagPopupSearchlist">
|
|
63
67
|
<van-checkbox v-if="!singleSelectio" v-model="model.selectAll" shape="square" checked-color="#EE6B6B"
|
|
64
|
-
icon-size="14px" :indeterminate="model.isIndeterminate"
|
|
65
|
-
|
|
68
|
+
icon-size="14px" :indeterminate="model.isIndeterminate" @click="selectAll()">{{
|
|
69
|
+
common.LocalizedString('本页全选(已选', '本頁全選(已選') }}{{ selectCount }})
|
|
66
70
|
</van-checkbox>
|
|
67
71
|
<div style="display: flex;flex: 1; justify-content: right;">
|
|
68
72
|
<template v-if="!flagPopupSearchlist">
|
|
@@ -96,6 +100,10 @@ const props = defineProps({
|
|
|
96
100
|
api: String,
|
|
97
101
|
searchStatsApi: String,
|
|
98
102
|
flagAppMode: Boolean,
|
|
103
|
+
appRootUrl: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: ''
|
|
106
|
+
},
|
|
99
107
|
apiParam: {
|
|
100
108
|
type: Object,
|
|
101
109
|
default: () => { }
|
|
@@ -185,7 +193,7 @@ function load(data) {
|
|
|
185
193
|
tableLoading.value = false
|
|
186
194
|
model.value.scripts.formData = model.value.formData;
|
|
187
195
|
model.value.scripts.formData.formTable = model.value;
|
|
188
|
-
model.value.$vue = { loadStats, updateCurrentRow, doAction, itemKey,toolbarClickHandler, emit, tableError, refreshTableColumns, getPage, setTableHeight };
|
|
196
|
+
model.value.$vue = { loadStats, updateCurrentRow, doAction, itemKey, toolbarClickHandler, emit, tableError, refreshTableColumns, getPage, setTableHeight };
|
|
189
197
|
emit("loaded");
|
|
190
198
|
if (model.value.rowCount == model.value.$total) {
|
|
191
199
|
finished.value = true;
|
|
@@ -391,8 +399,8 @@ function modeClickHandler() {
|
|
|
391
399
|
selectCount.value = getSelectRowLength();
|
|
392
400
|
}
|
|
393
401
|
//选择行
|
|
394
|
-
function selectRow(row,rowIndex,flagCheckboxOrRadio) {
|
|
395
|
-
if(flagSelect(row)&&(isoperate.value || props.flagPopupSearchlist)){
|
|
402
|
+
function selectRow(row, rowIndex, flagCheckboxOrRadio) {
|
|
403
|
+
if (flagSelect(row) && (isoperate.value || props.flagPopupSearchlist)) {
|
|
396
404
|
if (props.singleSelectio) {
|
|
397
405
|
model.value.listData.forEach((ro) => {
|
|
398
406
|
if (
|
|
@@ -404,14 +412,14 @@ function selectRow(row,rowIndex,flagCheckboxOrRadio) {
|
|
|
404
412
|
});
|
|
405
413
|
}
|
|
406
414
|
row.$select = !row.$select
|
|
407
|
-
if(!flagCheckboxOrRadio){
|
|
408
|
-
if(row.$select){
|
|
409
|
-
if(checkeds.value.indexOf(rowIndex) == -1){
|
|
415
|
+
if (!flagCheckboxOrRadio) {
|
|
416
|
+
if (row.$select) {
|
|
417
|
+
if (checkeds.value.indexOf(rowIndex) == -1) {
|
|
410
418
|
checkeds.value.push(rowIndex);
|
|
411
419
|
}
|
|
412
|
-
}else{
|
|
413
|
-
if(checkeds.value.indexOf(rowIndex) > -1){
|
|
414
|
-
checkeds.value.splice(checkeds.value.indexOf(rowIndex),1);
|
|
420
|
+
} else {
|
|
421
|
+
if (checkeds.value.indexOf(rowIndex) > -1) {
|
|
422
|
+
checkeds.value.splice(checkeds.value.indexOf(rowIndex), 1);
|
|
415
423
|
}
|
|
416
424
|
}
|
|
417
425
|
}
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
{{ model.controlLabel }}
|
|
33
33
|
</el-checkbox>
|
|
34
34
|
|
|
35
|
-
<el-dropdown split-button trigger="click" ref="refsearchwhere" class="search-btn-dropdown"
|
|
36
|
-
:type="model.isHyperLink ? 'text' : 'primary'" v-bind="model.attrs"
|
|
37
|
-
v-else-if="model.isSearchRouterKey && fieldSearchWhere" :hide-on-click="false"
|
|
35
|
+
<el-dropdown split-button trigger="click" ref="refsearchwhere" class="search-btn-dropdown"
|
|
36
|
+
popper-class="earch-btn-dropdown-popper" :type="model.isHyperLink ? 'text' : 'primary'" v-bind="model.attrs"
|
|
37
|
+
@click="clickHandle" v-else-if="model.isSearchRouterKey && fieldSearchWhere" :hide-on-click="false"
|
|
38
38
|
@visible-change="clickHandleDropdown"
|
|
39
39
|
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
40
40
|
:icon="model.icon" :disabled="model.disabled || model.locked" placement="bottom">
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
</template>
|
|
91
91
|
|
|
92
92
|
<el-button v-else type="primary" :loading="model.loading" v-bind="model.attrs" @click="clickHandle"
|
|
93
|
-
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null,'margin-bottom': model.labelPlacement=='1'? '1px':null }"
|
|
93
|
+
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null, 'margin-bottom': model.labelPlacement == '1' ? '1px' : null }"
|
|
94
94
|
:disabled="model.disabled || model.locked">
|
|
95
95
|
<template #icon v-if="model.icon">
|
|
96
96
|
<i :class="model.icon"></i>
|
|
@@ -112,7 +112,7 @@ import Button from '../../loader/src/Button';
|
|
|
112
112
|
import Enum from '../../utils/Enum'
|
|
113
113
|
import common from '../../utils/common'
|
|
114
114
|
import { ElMessage, UploadFile } from 'element-plus'
|
|
115
|
-
const emit = defineEmits(['input', 'fieldClick', 'importComplete', 'SearchWhereManage', 'SaveSearchWhere','clickSearchWhere'])
|
|
115
|
+
const emit = defineEmits(['input', 'fieldClick', 'importComplete', 'SearchWhereManage', 'SaveSearchWhere', 'clickSearchWhere'])
|
|
116
116
|
const props = defineProps({
|
|
117
117
|
parameterAction: String,
|
|
118
118
|
fileData: Object,
|
|
@@ -148,6 +148,11 @@ if (model.value.controlType == Enum.ControlType.ButtonAdvancedSearch) {
|
|
|
148
148
|
if (model.value.isDropdown) {
|
|
149
149
|
dropClick()
|
|
150
150
|
}
|
|
151
|
+
if (model.value.isCheckbox) {
|
|
152
|
+
if (model.value.subText == "1") {
|
|
153
|
+
model.value.code1 = true
|
|
154
|
+
}
|
|
155
|
+
}
|
|
151
156
|
const uploadData = computed(() => {
|
|
152
157
|
//因传输方式是FormData,故需要对Value是object的进行转化
|
|
153
158
|
let data = {};
|
|
@@ -389,8 +394,8 @@ function generateUUID() {
|
|
|
389
394
|
|
|
390
395
|
.earch-btn-dropdown-popper .el-dropdown-menu li:hover,
|
|
391
396
|
.earch-btn-dropdown-popper .el-dropdown-menu li:focus {
|
|
392
|
-
|
|
393
|
-
|
|
397
|
+
background: #ffffff;
|
|
398
|
+
color: #606266;
|
|
394
399
|
}
|
|
395
400
|
|
|
396
401
|
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--primary.is-disabled,
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
<div style="height: 34px;"> </div>
|
|
95
95
|
</template>
|
|
96
96
|
<!--分组-->
|
|
97
|
-
<el-collapse v-else-if="model.collapse.length>0" v-model="model.collapseActiveNames"
|
|
97
|
+
<el-collapse v-else-if="model.collapse.length > 0" v-model="model.collapseActiveNames"
|
|
98
98
|
:class="model.flagHideSaveLine ? 'el-collapse-saveLine' : ''">
|
|
99
99
|
<template v-for="(item, index) in model.collapse" :key="index">
|
|
100
100
|
<el-collapse-item v-if="item.show !== false" :title="item.controlLabel" :name="index"
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<template #title>
|
|
103
103
|
<i class="sign"></i>
|
|
104
104
|
<span :class="[item.required ? 'requiredLabel' : '']">{{ item.controlLabel
|
|
105
|
-
|
|
105
|
+
}}</span>
|
|
106
106
|
<span v-html="item.sufLabel1"></span>
|
|
107
107
|
</template>
|
|
108
108
|
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
</div>
|
|
212
212
|
</template>
|
|
213
213
|
<script lang="ts" setup>
|
|
214
|
-
import { ref, nextTick, onUpdated, onDeactivated, onMounted, onBeforeUnmount } from 'vue'
|
|
214
|
+
import { ref, nextTick, onUpdated, onDeactivated, onMounted, onBeforeUnmount,provide } from 'vue'
|
|
215
215
|
import { RouterClickHandler } from '../../utils/mixins';
|
|
216
216
|
import common from '../../utils/common'
|
|
217
217
|
import Form from '../../loader/src/Form'
|
|
@@ -229,6 +229,10 @@ const props = defineProps({
|
|
|
229
229
|
parentModel: Object,
|
|
230
230
|
parentModelForm: Object,
|
|
231
231
|
pageWidth: Number,
|
|
232
|
+
appRootUrl: {
|
|
233
|
+
type: String,
|
|
234
|
+
default: ''
|
|
235
|
+
},
|
|
232
236
|
topHeight: {
|
|
233
237
|
type: Number,
|
|
234
238
|
default: -1
|
|
@@ -301,6 +305,7 @@ const translateX = ref(0)
|
|
|
301
305
|
|
|
302
306
|
const qrtimer1 = ref(null)
|
|
303
307
|
const qrtimer2 = ref(null)
|
|
308
|
+
provide('appRootUrl', props.appRootUrl)
|
|
304
309
|
onBeforeUnmount(() => {
|
|
305
310
|
if (model.value && typeof model.value.scripts !== 'undefined') {
|
|
306
311
|
model.value.scripts.formData.form = null;
|
|
@@ -361,11 +366,11 @@ function init() {
|
|
|
361
366
|
}
|
|
362
367
|
if (typeof props.api !== 'undefined') {
|
|
363
368
|
//根据接口获取数据
|
|
364
|
-
Form.loadFormApi(props.api, load, props.apiParam, failLoad, false);
|
|
369
|
+
Form.loadFormApi(props.api, load, props.apiParam, failLoad, false,props.appRootUrl);
|
|
365
370
|
}
|
|
366
371
|
else if (typeof props.source !== 'undefined') {
|
|
367
372
|
//根据modelFrom获取数据
|
|
368
|
-
load(Form.loadFromModel(props.source));
|
|
373
|
+
load(Form.loadFromModel(props.source,false,props.appRootUrl));
|
|
369
374
|
}
|
|
370
375
|
else if (props.vmodel) {
|
|
371
376
|
load(props.vmodel);
|
|
@@ -379,7 +384,7 @@ function load(data) {
|
|
|
379
384
|
model.value.$vue = { fieldClickHandler, clickHandler, validExcute, emit, getFormObj, changeCallBackHandler, getFileData, Form, load, init, updateFields, itemKey, downloadUrl, doAction };
|
|
380
385
|
model.value.$vue.openType = props.openType
|
|
381
386
|
model.value.isIframe = props.isIframe
|
|
382
|
-
model.value.appendToBody=props.appendToBody
|
|
387
|
+
model.value.appendToBody = props.appendToBody
|
|
383
388
|
if (model.value.scripts) {
|
|
384
389
|
model.value.scripts.formData = model.value.formData;
|
|
385
390
|
model.value.scripts.formData.form = model.value;
|
|
@@ -782,7 +787,7 @@ function buttonsWidth() {
|
|
|
782
787
|
// 点击后让激活 Tab 居中
|
|
783
788
|
async function tabClick(pane: TabsPaneContext) {
|
|
784
789
|
if (props.openType == 'detail') {
|
|
785
|
-
window.localStorage.setItem(tabActiveNameKey.value, model.value.collapse[
|
|
790
|
+
window.localStorage.setItem(tabActiveNameKey.value, model.value.collapse[pane.index].fieldName1);//存储
|
|
786
791
|
}
|
|
787
792
|
await nextTick() // 等 DOM 更新完再取节点
|
|
788
793
|
const navWrapScroll = document.querySelector('.el-tabs__nav-scroll') as HTMLElement
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
</el-table-column>
|
|
132
132
|
</template>
|
|
133
133
|
<template v-for="(v, i) in model.rows[0].field" :key="i">
|
|
134
|
-
<el-table-column :prop="v.fieldName1" :label="v.controlLabel" :width="v.width"
|
|
134
|
+
<el-table-column :prop="v.fieldName1" :label="v.controlLabel" :width="v.width" :sortable="v.autoSearch" :sort-method="(a, b) => columnSort(a, b, v.fieldName1)"
|
|
135
135
|
:fixed="model.frozenColumns.includes(v.fieldName1)"
|
|
136
136
|
v-if="v.show !== false && v.controlType !== Enum.ControlType.Group">
|
|
137
137
|
<template #header="{ column, $index }">
|
|
@@ -636,6 +636,15 @@ function onMoveEnd(event) {
|
|
|
636
636
|
model.value._rows = [...pushNewArr, ...deleteItem];
|
|
637
637
|
|
|
638
638
|
}
|
|
639
|
+
// 动态列排序方法
|
|
640
|
+
const columnSort = (a, b, prop) => {
|
|
641
|
+
// 取当前列的值
|
|
642
|
+
let valueA = (a[prop].code1 || '').trim().toUpperCase()
|
|
643
|
+
let valueB = (b[prop].code1 || '').trim().toUpperCase()
|
|
644
|
+
|
|
645
|
+
// 英文 A-Z 排序
|
|
646
|
+
return valueA.localeCompare(valueB)
|
|
647
|
+
}
|
|
639
648
|
defineExpose({
|
|
640
649
|
model
|
|
641
650
|
})
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :style="{ position: pageType == 'Form' ? 'relative' : '' }">
|
|
3
|
-
<ct-searchlist ref="detailSearchlist" v-if="pageType == 'SearchList'"
|
|
4
|
-
:
|
|
5
|
-
:
|
|
3
|
+
<ct-searchlist ref="detailSearchlist" v-if="pageType == 'SearchList'"
|
|
4
|
+
:searchConditionApi="rowSelectRouter.actionForSearchLayout"
|
|
5
|
+
:searchStatsApi="rowSelectRouter.actionForSearchStats" :searchDataApi="rowSelectRouter.actionForSearch"
|
|
6
|
+
:apiParam="apiParam" :appRootUrl="appRootUrl" :pageHeight="listHeight + 'px'">
|
|
6
7
|
</ct-searchlist>
|
|
7
8
|
|
|
8
9
|
<div ref="detailForm" v-if="pageType == 'Form'" style="overflow: auto;"
|
|
9
10
|
:style="{ height: (listHeight - 5) + 'px' }">
|
|
10
|
-
<ct-form :api="rowSelectRouter.action" :
|
|
11
|
-
:
|
|
11
|
+
<ct-form :api="rowSelectRouter.action" :appRootUrl="appRootUrl" :pageStyle="rowSelectRouter.pageStyle"
|
|
12
|
+
:apiParam="apiParam" @submit="submit" :flagScroll="'true'" :drowerClose="drowerClose"
|
|
13
|
+
:openType="'detail'" :listHeight="listHeight">
|
|
12
14
|
</ct-form>
|
|
13
15
|
</div>
|
|
14
16
|
|
|
@@ -20,7 +22,7 @@ import { ref } from 'vue'
|
|
|
20
22
|
const emit = defineEmits(['submit'])
|
|
21
23
|
const props = defineProps({
|
|
22
24
|
vmodel: Object,
|
|
23
|
-
rowSelectRouter:Object,
|
|
25
|
+
rowSelectRouter: Object,
|
|
24
26
|
apiParam: Object,
|
|
25
27
|
parentModel: Object,
|
|
26
28
|
pageType: String,
|
|
@@ -29,8 +31,12 @@ const props = defineProps({
|
|
|
29
31
|
top: Number,
|
|
30
32
|
drowerClose: String,
|
|
31
33
|
listHeight: Number,
|
|
34
|
+
appRootUrl: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ''
|
|
37
|
+
},
|
|
32
38
|
})
|
|
33
|
-
const detailSearchlist=ref()
|
|
39
|
+
const detailSearchlist = ref()
|
|
34
40
|
|
|
35
41
|
|
|
36
42
|
function submit(modelForm, responseData) {
|
|
@@ -40,7 +46,3 @@ defineExpose({
|
|
|
40
46
|
detailSearchlist
|
|
41
47
|
})
|
|
42
48
|
</script>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
@@ -260,6 +260,10 @@ const props = defineProps({
|
|
|
260
260
|
api: String,
|
|
261
261
|
searchStatsApi: String,
|
|
262
262
|
flagAppMode: Boolean,
|
|
263
|
+
appRootUrl: {
|
|
264
|
+
type: String,
|
|
265
|
+
default: ''
|
|
266
|
+
},
|
|
263
267
|
apiParam: {
|
|
264
268
|
type: Object,
|
|
265
269
|
default: () => { }
|
|
@@ -394,7 +398,7 @@ function searchComplate(m, defaultSearch) {
|
|
|
394
398
|
searchEnd.value = Date.now();
|
|
395
399
|
isLoading.value = false;
|
|
396
400
|
tableLoading.value = false;
|
|
397
|
-
});
|
|
401
|
+
},null,props.appRootUrl);
|
|
398
402
|
}
|
|
399
403
|
if (typeof props.source !== "undefined") {
|
|
400
404
|
load(SearchTable.loadSearchTableModel(props.source));
|
|
@@ -1299,7 +1303,7 @@ function refreshTableColumns(data) {
|
|
|
1299
1303
|
searchStats = refTableStats.value.getsearchStats();
|
|
1300
1304
|
}
|
|
1301
1305
|
if (data) {
|
|
1302
|
-
load(SearchTable.loadSearchTableModel(data, model.value.searchModel, false, props.api));
|
|
1306
|
+
load(SearchTable.loadSearchTableModel(data, model.value.searchModel, false, props.api,null,props.appRootUrl));
|
|
1303
1307
|
}
|
|
1304
1308
|
else {
|
|
1305
1309
|
if (refTableStats.value) {
|
|
@@ -1307,7 +1311,7 @@ function refreshTableColumns(data) {
|
|
|
1307
1311
|
getPage(1, true);
|
|
1308
1312
|
}
|
|
1309
1313
|
else {
|
|
1310
|
-
SearchTable.loadSearchTableApi(props.api, load, searchModel, true);
|
|
1314
|
+
SearchTable.loadSearchTableApi(props.api, load, searchModel, true,null,null,null,props.appRootUrl);
|
|
1311
1315
|
}
|
|
1312
1316
|
}
|
|
1313
1317
|
model.value.searchStats = searchStats;
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
<div slot="header" class="clearfix" v-if="typeof title !== 'undefined' && showTitle">
|
|
6
6
|
<span style="font-weight:bold">{{ title }}</span>
|
|
7
7
|
</div>
|
|
8
|
-
<SearchCategory v-if="searchCategoryApi" ref="refcategory" :api="searchCategoryApi"
|
|
8
|
+
<SearchCategory v-if="searchCategoryApi" ref="refcategory" :api="searchCategoryApi" :appRootUrl="appRootUrl"
|
|
9
9
|
@loadedCategory="categoryLoaded" @loadedCategoryError="categoryLoadedError"
|
|
10
10
|
@changeCategory="categorychange"></SearchCategory>
|
|
11
|
-
<ct-searchscreen ref="refScreen" :api="searchConditionApi" :
|
|
12
|
-
@loaded="screenLoaded" @failLoad="screenfailLoad" :screenPara="screenPara"
|
|
13
|
-
:categoryLoaded="loaded.categoryLoaded" @search="search()"
|
|
14
|
-
@showTitle="showTitleScreenHandler"></ct-searchscreen>
|
|
15
|
-
<searchTable ref="refTable" :api="searchDataApi" :
|
|
16
|
-
:from="from" :isIframe="isIframe" :documentHeight="documentHeight"
|
|
17
|
-
:
|
|
18
|
-
:apiParam="apiParam" @searchComplate="searchComplate" @loaded="tableLoaded"
|
|
11
|
+
<ct-searchscreen ref="refScreen" :api="searchConditionApi" :appRootUrl="appRootUrl" :key="reloadKey"
|
|
12
|
+
v-if="flagShow" @loaded="screenLoaded" @failLoad="screenfailLoad" :screenPara="screenPara"
|
|
13
|
+
@resetSearch="resetSearch()" :categoryLoaded="loaded.categoryLoaded" @search="search()"
|
|
14
|
+
@saveShortcut="saveShortcut" @showTitle="showTitleScreenHandler"></ct-searchscreen>
|
|
15
|
+
<searchTable ref="refTable" :api="searchDataApi" :appRootUrl="appRootUrl" :key="reloadKey"
|
|
16
|
+
:searchStatsApi="searchStatsApi" :from="from" :isIframe="isIframe" :documentHeight="documentHeight"
|
|
17
|
+
:documentWidth="documentWidth" :flagPopupSearchlist="flagPopupSearchlist" :screenTop="screenTop"
|
|
18
|
+
:flagAppMode="flagAppMode" :apiParam="apiParam" @searchComplate="searchComplate" @loaded="tableLoaded"
|
|
19
19
|
@rowClickHandle="rowClickHandle" @refreshRowHandle="refreshRowHandle" @scrollHandle="scrollHandle"
|
|
20
20
|
@refreshParent="refreshParentHandler" @simpleRouterRefreshHandler="simpleRouterRefreshHandler"
|
|
21
21
|
@closeSideBar="closeSideBar" @popupClickHandler="popupClickHandler" :dragStartItem="dragStartItem"
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
<div ref="refSidebar" v-if="flagSideBar && flagSideBarOfData"
|
|
27
27
|
:style="{ 'height': pageHeight ? pageHeight : '100%', 'width': sideBarWidth + 'px', right: sideBarRight + 'px' }"
|
|
28
28
|
class="sidebar">
|
|
29
|
-
<SearchSideRight :style="{ 'display': sideBarWidth && sideBarWidth > 0 ? 'block' : 'none' }"
|
|
30
|
-
:apiParam="sideBarApiParam" :
|
|
31
|
-
:
|
|
32
|
-
:drowerClose="drowerClose" @clickNextHandler="clickNextHandler"
|
|
33
|
-
@
|
|
34
|
-
@submit="submitHandler"></SearchSideRight>
|
|
29
|
+
<SearchSideRight :style="{ 'display': sideBarWidth && sideBarWidth > 0 ? 'block' : 'none' }"
|
|
30
|
+
ref="RefSideRight" :apiParam="sideBarApiParam" :appRootUrl="appRootUrl" :pageType="sideBarPageType"
|
|
31
|
+
:rowSelectRouter="rowSelectRouter" :listHeight="listHeight" :selectIndex="selectIndex"
|
|
32
|
+
:rowCount="rowCount" :key="detailKey" :drowerClose="drowerClose" @clickNextHandler="clickNextHandler"
|
|
33
|
+
@clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
|
|
34
|
+
@closeSideHandler="closeSideHandler" @submit="submitHandler"></SearchSideRight>
|
|
35
35
|
<SearchSideMenu ref="refSideMenu" :sideBarMenuRight="sideBarMenuRight" :sideBarStatus="sideBarStatus"
|
|
36
36
|
@sideMenuClickHandler="sideMenuClickHandler"></SearchSideMenu>
|
|
37
37
|
</div>
|
|
@@ -55,6 +55,10 @@ const props = defineProps({
|
|
|
55
55
|
pageHeight: String,
|
|
56
56
|
flagAppMode: Boolean,
|
|
57
57
|
appID: String,
|
|
58
|
+
appRootUrl: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ''
|
|
61
|
+
},
|
|
58
62
|
apiParam: {
|
|
59
63
|
type: Object,
|
|
60
64
|
default: () => { }
|
|
@@ -400,8 +404,8 @@ function rowClickHandle() {
|
|
|
400
404
|
if (refTable.value.model.columnGroupId) {
|
|
401
405
|
sideBarApiParam.value.columnGroupId = refTable.value.model.columnGroupId;
|
|
402
406
|
}
|
|
403
|
-
|
|
404
|
-
|
|
407
|
+
if (refTable.value.model.rowSelectRouter.flagAttachSearchCondition) {
|
|
408
|
+
sideBarApiParam.value["searchFields"] = refTable.value.model.getSearchData();
|
|
405
409
|
}
|
|
406
410
|
sideBarApiParam.value.actionType = refTable.value.model.rowSelectRouter.actionType;
|
|
407
411
|
detailKey.value = detailKey.value + 1;
|
|
@@ -64,6 +64,10 @@ const props = defineProps({
|
|
|
64
64
|
api: String,
|
|
65
65
|
source: Object,
|
|
66
66
|
vmodel: Object,
|
|
67
|
+
appRootUrl: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: ''
|
|
70
|
+
},
|
|
67
71
|
categoryLoaded: {
|
|
68
72
|
type: Boolean,
|
|
69
73
|
default: true
|
|
@@ -99,11 +103,11 @@ function searchComplate(flagLoad) {
|
|
|
99
103
|
nextTick(function () {
|
|
100
104
|
if (typeof props.api !== 'undefined') {
|
|
101
105
|
//根据接口获取数据
|
|
102
|
-
SearchScreen.loadSearchScreenApi(props.api, load, props.screenPara, props.prevParam, failLoad);
|
|
106
|
+
SearchScreen.loadSearchScreenApi(props.api, load, props.screenPara, props.prevParam, failLoad,props.appRootUrl);
|
|
103
107
|
}
|
|
104
108
|
else if (typeof props.source !== 'undefined') {
|
|
105
109
|
//根据modelFrom获取数据
|
|
106
|
-
load(SearchScreen.loadSearchScreenModel(props.source, props.prevParam));
|
|
110
|
+
load(SearchScreen.loadSearchScreenModel(props.source, props.prevParam,props.appRootUrl));
|
|
107
111
|
}
|
|
108
112
|
else if (props.vmodel) {
|
|
109
113
|
load(props.vmodel);
|
|
@@ -84,11 +84,17 @@ function input() {
|
|
|
84
84
|
if (model.value.controlType === Enum.ControlType.MultiLineText || model.value.controlType === Enum.ControlType.TextBox) {
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
87
|
-
|
|
87
|
+
changeHandler(model.value, emit);
|
|
88
|
+
if (isEnterPressed.value) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (props.from == 'tree') { emit('search'); }
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
function change() {
|
|
91
|
-
|
|
95
|
+
if (!model.value.controlType === Enum.ControlType.NumericTextBox) {
|
|
96
|
+
changeHandler(model.value, emit);
|
|
97
|
+
}
|
|
92
98
|
if (isEnterPressed.value) {
|
|
93
99
|
return;
|
|
94
100
|
}
|
|
@@ -18,9 +18,7 @@ const modelSelf = ref(null)
|
|
|
18
18
|
const submitCancelData = ref(null)
|
|
19
19
|
const vzindex = ref(999);
|
|
20
20
|
vzindex.value = props.vmodel.appendToBody ? props.zindex + 1000 : props.zindex
|
|
21
|
-
|
|
22
|
-
// vzindex.value = vzindex.value + 2000;
|
|
23
|
-
// }
|
|
21
|
+
|
|
24
22
|
onBeforeUnmount(() => {
|
|
25
23
|
modelSelf.value = null
|
|
26
24
|
})
|
package/src/loader/src/Button.js
CHANGED
|
@@ -6,6 +6,15 @@ import Enum from '../../utils/Enum';
|
|
|
6
6
|
const Button = function (source) {
|
|
7
7
|
let rtn = {
|
|
8
8
|
icon: '',
|
|
9
|
+
get code1() {
|
|
10
|
+
if (source.isCheckbox) {
|
|
11
|
+
if (source.subText == "1") {
|
|
12
|
+
return true
|
|
13
|
+
}
|
|
14
|
+
return false
|
|
15
|
+
}
|
|
16
|
+
return false
|
|
17
|
+
},
|
|
9
18
|
get bgColor() {
|
|
10
19
|
// if (source.controlType == Enum.ControlType.ButtonReset) {
|
|
11
20
|
// return '#519DA6'
|