centaline-data-driven-v3 0.1.52 → 0.1.54
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/Layout/LayoutChildren.vue +2 -2
- 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/Comfirm.vue +1 -1
- package/src/components/web/Form.vue +16 -6
- package/src/components/web/FormList.vue +10 -1
- package/src/components/web/SearchList/SearchSideRight.vue +13 -11
- package/src/components/web/SearchList/SearchTable.vue +12 -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 +7 -1
- package/src/loader/src/Button.js +9 -0
- package/src/loader/src/CellLayout.js +3 -0
- package/src/loader/src/Form.js +20 -5
- package/src/loader/src/LibFunction.js +2 -0
- 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 +4 -4
- package/src/utils/common.js +11 -1
- package/src/utils/mixins.js +15 -6
- package/src/views/Form.vue +2 -1
- package/src/views/SearchList.vue +2 -2
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<template v-if="model.routerKey && model.visibility != '0'">
|
|
3
|
-
<div style="display: flex;
|
|
3
|
+
<div style="display: flex;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
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
|
-
<div style="display: flex;
|
|
10
|
+
<div style="display: flex;" :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
13
|
:is="item.is" :vmodel="item" :rowindex="rowindex" :fields="fields" :forname="forname" :forrowindex="forrowindex" :parameterAction="parameterAction"
|
|
@@ -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,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
style="margin-top: 15px;margin-bottom: 15px;min-width: 150px;text-align: center; display: flex; justify-content: center;padding-left: 28px;padding-right: 16px;">
|
|
4
|
-
<div style="text-align: left;"
|
|
4
|
+
<div style="text-align: left;" v-html="text"></div>
|
|
5
5
|
</div>
|
|
6
6
|
<div style="text-align:center;width:100%;margin-bottom: 15px;">
|
|
7
7
|
<el-button @click="clickHandler($event, true)" type="danger" size="small">{{ options.confirmButtonText || '确定'
|
|
@@ -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
|
|
@@ -265,6 +269,10 @@ const props = defineProps({
|
|
|
265
269
|
Boolean,
|
|
266
270
|
default: false,
|
|
267
271
|
},
|
|
272
|
+
appendToBody: {
|
|
273
|
+
Boolean,
|
|
274
|
+
default: false,
|
|
275
|
+
},
|
|
268
276
|
relationParentFormFields: {
|
|
269
277
|
Array,
|
|
270
278
|
default: function () {
|
|
@@ -297,6 +305,7 @@ const translateX = ref(0)
|
|
|
297
305
|
|
|
298
306
|
const qrtimer1 = ref(null)
|
|
299
307
|
const qrtimer2 = ref(null)
|
|
308
|
+
provide('appRootUrl', props.appRootUrl)
|
|
300
309
|
onBeforeUnmount(() => {
|
|
301
310
|
if (model.value && typeof model.value.scripts !== 'undefined') {
|
|
302
311
|
model.value.scripts.formData.form = null;
|
|
@@ -357,11 +366,11 @@ function init() {
|
|
|
357
366
|
}
|
|
358
367
|
if (typeof props.api !== 'undefined') {
|
|
359
368
|
//根据接口获取数据
|
|
360
|
-
Form.loadFormApi(props.api, load, props.apiParam, failLoad, false);
|
|
369
|
+
Form.loadFormApi(props.api, load, props.apiParam, failLoad, false,props.appRootUrl);
|
|
361
370
|
}
|
|
362
371
|
else if (typeof props.source !== 'undefined') {
|
|
363
372
|
//根据modelFrom获取数据
|
|
364
|
-
load(Form.loadFromModel(props.source));
|
|
373
|
+
load(Form.loadFromModel(props.source,false,props.appRootUrl));
|
|
365
374
|
}
|
|
366
375
|
else if (props.vmodel) {
|
|
367
376
|
load(props.vmodel);
|
|
@@ -375,6 +384,7 @@ function load(data) {
|
|
|
375
384
|
model.value.$vue = { fieldClickHandler, clickHandler, validExcute, emit, getFormObj, changeCallBackHandler, getFileData, Form, load, init, updateFields, itemKey, downloadUrl, doAction };
|
|
376
385
|
model.value.$vue.openType = props.openType
|
|
377
386
|
model.value.isIframe = props.isIframe
|
|
387
|
+
model.value.appendToBody = props.appendToBody
|
|
378
388
|
if (model.value.scripts) {
|
|
379
389
|
model.value.scripts.formData = model.value.formData;
|
|
380
390
|
model.value.scripts.formData.form = model.value;
|
|
@@ -777,7 +787,7 @@ function buttonsWidth() {
|
|
|
777
787
|
// 点击后让激活 Tab 居中
|
|
778
788
|
async function tabClick(pane: TabsPaneContext) {
|
|
779
789
|
if (props.openType == 'detail') {
|
|
780
|
-
window.localStorage.setItem(tabActiveNameKey.value, model.value.collapse[
|
|
790
|
+
window.localStorage.setItem(tabActiveNameKey.value, model.value.collapse[pane.index].fieldName1);//存储
|
|
781
791
|
}
|
|
782
792
|
await nextTick() // 等 DOM 更新完再取节点
|
|
783
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: () => { }
|
|
@@ -300,6 +304,10 @@ const props = defineProps({
|
|
|
300
304
|
String,
|
|
301
305
|
default: '',
|
|
302
306
|
},
|
|
307
|
+
appendToBody: {
|
|
308
|
+
Boolean,
|
|
309
|
+
default: false,
|
|
310
|
+
},
|
|
303
311
|
})
|
|
304
312
|
const isLoading = ref(true)
|
|
305
313
|
const operationLoading = ref(false) //操作等待
|
|
@@ -390,7 +398,7 @@ function searchComplate(m, defaultSearch) {
|
|
|
390
398
|
searchEnd.value = Date.now();
|
|
391
399
|
isLoading.value = false;
|
|
392
400
|
tableLoading.value = false;
|
|
393
|
-
});
|
|
401
|
+
},null,props.appRootUrl);
|
|
394
402
|
}
|
|
395
403
|
if (typeof props.source !== "undefined") {
|
|
396
404
|
load(SearchTable.loadSearchTableModel(props.source));
|
|
@@ -406,6 +414,7 @@ function load(data) {
|
|
|
406
414
|
model.value = data;
|
|
407
415
|
model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage, toolbarClickHandler,closeTabThen };
|
|
408
416
|
model.value.isIframe = props.isIframe
|
|
417
|
+
model.value.appendToBody=props.appendToBody
|
|
409
418
|
model.value.isPageInSideBar = false
|
|
410
419
|
model.value.columnName = null
|
|
411
420
|
model.value.columnGroupId = null
|
|
@@ -1294,7 +1303,7 @@ function refreshTableColumns(data) {
|
|
|
1294
1303
|
searchStats = refTableStats.value.getsearchStats();
|
|
1295
1304
|
}
|
|
1296
1305
|
if (data) {
|
|
1297
|
-
load(SearchTable.loadSearchTableModel(data, model.value.searchModel, false, props.api));
|
|
1306
|
+
load(SearchTable.loadSearchTableModel(data, model.value.searchModel, false, props.api,null,props.appRootUrl));
|
|
1298
1307
|
}
|
|
1299
1308
|
else {
|
|
1300
1309
|
if (refTableStats.value) {
|
|
@@ -1302,7 +1311,7 @@ function refreshTableColumns(data) {
|
|
|
1302
1311
|
getPage(1, true);
|
|
1303
1312
|
}
|
|
1304
1313
|
else {
|
|
1305
|
-
SearchTable.loadSearchTableApi(props.api, load, searchModel, true);
|
|
1314
|
+
SearchTable.loadSearchTableApi(props.api, load, searchModel, true,null,null,null,props.appRootUrl);
|
|
1306
1315
|
}
|
|
1307
1316
|
}
|
|
1308
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
|
}
|
|
@@ -16,6 +16,9 @@ const content = ref()
|
|
|
16
16
|
const captionBarButtons = ref([])
|
|
17
17
|
const modelSelf = ref(null)
|
|
18
18
|
const submitCancelData = ref(null)
|
|
19
|
+
const vzindex = ref(999);
|
|
20
|
+
vzindex.value = props.vmodel.appendToBody ? props.zindex + 1000 : props.zindex
|
|
21
|
+
|
|
19
22
|
onBeforeUnmount(() => {
|
|
20
23
|
modelSelf.value = null
|
|
21
24
|
})
|
|
@@ -52,7 +55,7 @@ const render = () => {
|
|
|
52
55
|
'ct-dialog_wrapper'
|
|
53
56
|
],
|
|
54
57
|
style: {
|
|
55
|
-
'z-index':
|
|
58
|
+
'z-index': vzindex.value,
|
|
56
59
|
'height': '100%',
|
|
57
60
|
'width': '100%',
|
|
58
61
|
}
|
|
@@ -216,6 +219,9 @@ const render = () => {
|
|
|
216
219
|
}
|
|
217
220
|
item.attrs.dialoWidth = parseInt((item.width || 0).replace('px', ''));
|
|
218
221
|
item.attrs.dialogHeight = parseInt((item.height || 0).replace('px', ''));
|
|
222
|
+
if (props.vmodel.appendToBody) {
|
|
223
|
+
item.attrs.appendToBody = props.vmodel.appendToBody;
|
|
224
|
+
}
|
|
219
225
|
return h('div', {
|
|
220
226
|
style: {
|
|
221
227
|
width: item.width,
|
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'
|
|
@@ -264,6 +264,9 @@ const CellLayout = function (source, actionRouter, rowdata, forname, forrowindex
|
|
|
264
264
|
self._styleObject.WebkitBoxOrient = "vertical";
|
|
265
265
|
self._styleObject.display = "-webkit-box";
|
|
266
266
|
self._styleObject.overflow = "hidden";
|
|
267
|
+
}
|
|
268
|
+
if (typeof source.whiteSpace !== 'undefined') {
|
|
269
|
+
self._styleObject.whiteSpace = source.whiteSpace;
|
|
267
270
|
}
|
|
268
271
|
return self._styleObject;
|
|
269
272
|
}
|