centaline-data-driven-v3 0.0.68 → 0.0.70
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 +71 -71
- package/package.json +1 -1
- package/src/components/Layout/Layout.vue +7 -2
- package/src/components/app/ComboBox.vue +16 -7
- package/src/components/app/PhotoSelect.vue +16 -11
- package/src/components/app/SearchList/SearchTable.vue +3 -1
- package/src/components/app/searchScreen.vue +1 -1
- package/src/components/web/ComboBox.vue +1 -1
- package/src/components/web/File.vue +0 -7
- package/src/components/web/Form.vue +4 -2
- package/src/components/web/FormList.vue +12 -7
- package/src/components/web/RadioButton.vue +5 -1
- package/src/components/web/SearchList/SearchTable.vue +21 -12
- package/src/components/web/SearchList.vue +1 -0
- package/src/loader/src/ComboBox.js +18 -7
- package/src/loader/src/File.js +2 -0
- package/src/loader/src/Form.js +21 -17
- package/src/loader/src/FormList.js +2 -1
- package/src/loader/src/SearchScreen.js +0 -2
- package/src/main.js +1 -1
- package/src/utils/mixins.js +7 -2
- package/src/utils/request.js +4 -4
- package/src/views/Form.vue +2 -2
- package/src/views/SearchList.vue +2 -3
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="ct-Layout" v-if="Layout !== null && !loading">
|
|
2
|
+
<div class="ct-Layout" v-if="Layout !== null && !loading" @click="rowClickHandle" :style="{ 'background-color': selectIndex === rowindex?selectedRowBackColor:'' }">
|
|
3
3
|
<ct-layoutchildren :rowindex="rowindex" :actionRouter="actionRouter" :rowdata="vmodel" :vmodel="LayoutList"
|
|
4
4
|
:flagflex="true" :fields="fields" :parameterAction="parameterAction"
|
|
5
5
|
:rowMenuDisplayCountForAPP="rowMenuDisplayCountForAPP" @click="clickHandler"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
10
|
import { ref, nextTick } from 'vue'
|
|
11
11
|
import common from '../../utils/common'
|
|
12
|
-
const emit = defineEmits(['rolRouterclick', 'changeHandler'])
|
|
12
|
+
const emit = defineEmits(['rolRouterclick', 'changeHandler','rowclick'])
|
|
13
13
|
const props = defineProps({
|
|
14
14
|
action: String,
|
|
15
15
|
cellLayout: String,
|
|
@@ -20,6 +20,8 @@ const props = defineProps({
|
|
|
20
20
|
apiParam: Object,
|
|
21
21
|
parameterAction: String,
|
|
22
22
|
fields: Array,
|
|
23
|
+
selectIndex:Number,
|
|
24
|
+
selectedRowBackColor:String,
|
|
23
25
|
formListactionRouter: {
|
|
24
26
|
type: Array,
|
|
25
27
|
default: [],
|
|
@@ -315,6 +317,9 @@ function changeHandler(field) {
|
|
|
315
317
|
emit("changeHandler", field, props.vmodel.$sourceIndex);
|
|
316
318
|
}
|
|
317
319
|
}
|
|
320
|
+
function rowClickHandle(){
|
|
321
|
+
emit("rowclick", props.rowindex);
|
|
322
|
+
}
|
|
318
323
|
</script>
|
|
319
324
|
<style scoped>
|
|
320
325
|
.ct-Layout {
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
</template>
|
|
99
99
|
<script lang="ts" setup>
|
|
100
100
|
import { ref } from 'vue'
|
|
101
|
+
import Axios from 'axios';
|
|
101
102
|
import { initData, changeHandler } from '../../utils/mixins';
|
|
102
103
|
import ComboBox from '../../loader/src/ComboBox';
|
|
103
104
|
const emit = defineEmits(['click', 'input', 'change', 'popupSearchList'])
|
|
@@ -110,19 +111,29 @@ const model = initData(props, ComboBox)
|
|
|
110
111
|
const showPicker = ref(false)
|
|
111
112
|
const searchText = ref('')
|
|
112
113
|
const checkboxRefs = ref([])
|
|
114
|
+
let cancelTokenSource = null; // 用于存储取消令牌
|
|
113
115
|
function visibleChange() {
|
|
114
|
-
if(model.value.locked){
|
|
116
|
+
if (model.value.locked) {
|
|
115
117
|
return;
|
|
116
118
|
}
|
|
117
|
-
|
|
119
|
+
getOptions();
|
|
120
|
+
}
|
|
121
|
+
function getOptions() {
|
|
122
|
+
if (cancelTokenSource) {
|
|
123
|
+
// 取消上一次未完成的请求
|
|
124
|
+
cancelTokenSource.cancel('取消上一次请求');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 创建新的取消令牌
|
|
128
|
+
cancelTokenSource = Axios.CancelToken.source();
|
|
129
|
+
model.value.getOptions(props.parameterAction, searchText.value, cancelTokenSource, function (data) {
|
|
118
130
|
model.value.options = data
|
|
119
131
|
showPicker.value = true
|
|
120
132
|
})
|
|
121
133
|
}
|
|
122
|
-
|
|
123
134
|
function change(item) {
|
|
124
135
|
showPicker.value = false;
|
|
125
|
-
|
|
136
|
+
|
|
126
137
|
model.value.value = item.code;
|
|
127
138
|
model.value.setcode(item.code)
|
|
128
139
|
if (model.value.isList) {
|
|
@@ -145,9 +156,7 @@ function onConfirm() {
|
|
|
145
156
|
changeHandler(model.value, emit)
|
|
146
157
|
}
|
|
147
158
|
function searchInputHandle() {
|
|
148
|
-
|
|
149
|
-
model.value.options = data;
|
|
150
|
-
})
|
|
159
|
+
getOptions();
|
|
151
160
|
}
|
|
152
161
|
function itemOnClick(index, item) {
|
|
153
162
|
if (model.value.locked || item.locked) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="van-uploader" style="margin:10px 10px 0 10px; " v-if="model">
|
|
3
3
|
<div class="van-uploader__wrapper">
|
|
4
4
|
<div ref="uploadImgItem">
|
|
5
|
-
<template v-for="(element, index) in
|
|
5
|
+
<template v-for="(element, index) in model.fileList" :key="element.mediaCode">
|
|
6
6
|
<div class="van-uploader__preview" style="display:inline-block;"
|
|
7
7
|
@click="viewerfile(model.fileList, index)">
|
|
8
8
|
<div class="van-image van-uploader__preview-image">
|
|
@@ -117,7 +117,7 @@ function handleOpen() {
|
|
|
117
117
|
chooseList.push(n);
|
|
118
118
|
});
|
|
119
119
|
var dialogOption = {
|
|
120
|
-
title: common.LocalizedString('选择','選擇') + model.value.controlLabel || common.LocalizedString('选择图片','選擇圖片'),
|
|
120
|
+
title: common.LocalizedString('选择', '選擇') + model.value.controlLabel || common.LocalizedString('选择图片', '選擇圖片'),
|
|
121
121
|
pane: common.getParentPane(),
|
|
122
122
|
content: [{
|
|
123
123
|
component: "ct-photoselectlist",
|
|
@@ -166,16 +166,21 @@ function selfValidExcute(eventName) {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
function viewerfile(list, index) {
|
|
169
|
+
var file = list[index];
|
|
170
|
+
if (file && file.mediaTypeID == 4 && !common.isVideoFile(file.mediaUrl) && common.getDataDrivenOpts().handler.openUrlInBrowse) {
|
|
171
|
+
common.getDataDrivenOpts().handler.openUrlInBrowse(file.mediaUrl)
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
var MediaAlbum = [{ albumName: model.value.controlLabel || "媒体", medias: [] as any }];
|
|
169
175
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
MediaAlbum
|
|
177
|
-
}
|
|
178
|
-
common.viewerfile((model.value.controlLabel || "预览媒体"), MediaAlbum, 0, index, model.value.mediaViewPageType);
|
|
176
|
+
let fileList = list.filter((item) => {
|
|
177
|
+
return item.flagDeleted !== true;
|
|
178
|
+
});
|
|
179
|
+
fileList.forEach((v) => {
|
|
180
|
+
MediaAlbum[0].medias.push(v);
|
|
181
|
+
});
|
|
182
|
+
common.viewerfile((model.value.controlLabel || "预览媒体"), MediaAlbum, 0, index, model.value.mediaViewPageType);
|
|
183
|
+
}
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
|
|
@@ -181,7 +181,9 @@ function load(data) {
|
|
|
181
181
|
model.value.flagApp = true
|
|
182
182
|
tableError.value = false
|
|
183
183
|
tableLoading.value = false
|
|
184
|
-
model.value
|
|
184
|
+
model.value.scripts.formData = model.value.formData;
|
|
185
|
+
model.value.scripts.formData.formTable = model.value;
|
|
186
|
+
model.value.$vue = { loadStats, updateCurrentRow, doAction, itemKey,toolbarClickHandler, emit, tableError, refreshTableColumns, getPage, setTableHeight };
|
|
185
187
|
emit("loaded");
|
|
186
188
|
if (model.value.rowCount == model.value.$total) {
|
|
187
189
|
finished.value = true;
|
|
@@ -220,7 +220,7 @@ function open(field) {
|
|
|
220
220
|
field.showLabel = false;
|
|
221
221
|
field.isList = true;
|
|
222
222
|
if (field.is == 'ct-combobox') {
|
|
223
|
-
field.getOptions(model.value.parameterAction, '', function (data) {
|
|
223
|
+
field.getOptions(model.value.parameterAction, '',null, function (data) {
|
|
224
224
|
field.options = data
|
|
225
225
|
})
|
|
226
226
|
}
|
|
@@ -167,7 +167,7 @@ function handleCompositionEnd() {
|
|
|
167
167
|
}
|
|
168
168
|
//弹出选择列表
|
|
169
169
|
function popupSearchListHandle() {
|
|
170
|
-
emit('popupSearchList',
|
|
170
|
+
emit('popupSearchList', !model.value.multiple, model, model.value.moreActionRouter, (optionArr) => {
|
|
171
171
|
selectOptionArr(optionArr);
|
|
172
172
|
});
|
|
173
173
|
}
|
|
@@ -74,9 +74,6 @@
|
|
|
74
74
|
</el-dropdown>
|
|
75
75
|
</span>
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
77
|
<template #file="{ file }">
|
|
81
78
|
<div :title="file.fileName">
|
|
82
79
|
<div class="cover-list-item">
|
|
@@ -536,7 +533,6 @@ function CheckQRCodeStatus() {
|
|
|
536
533
|
}
|
|
537
534
|
}
|
|
538
535
|
function GetQRCodeUploadPhoto() {
|
|
539
|
-
|
|
540
536
|
clearInterval(model.value.qrtimer);
|
|
541
537
|
File.getQRCode(model.value, function (data) {
|
|
542
538
|
model.value.qrCodeImg = data.qrCode;
|
|
@@ -624,13 +620,10 @@ function addClass(el, className) {
|
|
|
624
620
|
|
|
625
621
|
|
|
626
622
|
//预览文件
|
|
627
|
-
|
|
628
623
|
function viewerfile(file) {
|
|
629
624
|
File.viewerfile(file, model.value)
|
|
630
625
|
}
|
|
631
626
|
|
|
632
|
-
|
|
633
|
-
|
|
634
627
|
function PasteUpload(event) {
|
|
635
628
|
if (!model.value.locked && !model.value.disableUpload) {
|
|
636
629
|
// 获取粘贴板中的图片
|
|
@@ -242,7 +242,7 @@ function init() {
|
|
|
242
242
|
function load(data) {
|
|
243
243
|
model.value = data
|
|
244
244
|
model.value.parentModelForm = props.parentModelForm
|
|
245
|
-
model.value.$vue = { fieldClickHandler, clickHandler, validExcute, emit, getFormObj, changeCallBackHandler, getFileData, Form, load, init, updateFields, itemKey,downloadUrl };
|
|
245
|
+
model.value.$vue = { fieldClickHandler, clickHandler, validExcute, emit, getFormObj, changeCallBackHandler, getFileData, Form, load, init, updateFields, itemKey,downloadUrl,doAction };
|
|
246
246
|
model.value.$vue.openType = props.openType
|
|
247
247
|
model.value.isIframe = props.isIframe
|
|
248
248
|
if (model.value.scripts) {
|
|
@@ -269,7 +269,9 @@ function failLoad() {
|
|
|
269
269
|
function getFileData(field) {
|
|
270
270
|
return Form.getFileData(field, model.value);
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
function doAction(data) {
|
|
273
|
+
Form.doAction(data)
|
|
274
|
+
}
|
|
273
275
|
//判断是否有滚动条
|
|
274
276
|
function getisScroll() {
|
|
275
277
|
if (Fields.value) {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
</el-col>
|
|
58
58
|
</template>
|
|
59
59
|
</el-row>
|
|
60
|
-
<div class="list-
|
|
60
|
+
<div class="list-delbutton" v-if="i > 0">
|
|
61
61
|
<el-button v-if="v.delete" type="success" size="small" class="btn-del" :icon="Delete"
|
|
62
62
|
@click="deleteRow(i, v.$sourceIndex)">
|
|
63
63
|
删除
|
|
@@ -136,7 +136,8 @@
|
|
|
136
136
|
</span>
|
|
137
137
|
<!--可点击的列-->
|
|
138
138
|
<span v-else-if="v.router" :class="'cell'" style="display: flex;">
|
|
139
|
-
|
|
139
|
+
<Tablecurrency :router="v.router" :colValue="scope.row[v.fieldName1].code1" :rowData="scope.row" @click="rolRouterClickHandler">
|
|
140
|
+
</Tablecurrency>
|
|
140
141
|
</span>
|
|
141
142
|
<ct-span v-else-if="scope.row[v.fieldName1]" :vmodel="scope.row[v.fieldName1]"
|
|
142
143
|
:rowNum="scope.row.$sourceIndex" :rowData="scope.row"></ct-span>
|
|
@@ -191,6 +192,7 @@ import { ElMessage } from 'element-plus'
|
|
|
191
192
|
import Enum from '../../utils/Enum'
|
|
192
193
|
import common from '../../utils/common'
|
|
193
194
|
import FormList from '../../loader/src/FormList'
|
|
195
|
+
import Tablecurrency from './SearchList/Tablecurrency.vue';
|
|
194
196
|
import { initData } from '../../utils/mixins';
|
|
195
197
|
import draggable from "vuedraggable";
|
|
196
198
|
const emit = defineEmits(['click', 'input', 'change', 'popupSearchList', 'tableButtonClick'])
|
|
@@ -275,6 +277,7 @@ function addRow() {
|
|
|
275
277
|
model.value.currentRow.isNew = true;
|
|
276
278
|
model.value.currentRow.index = model.value.tableData.length - 1;
|
|
277
279
|
if (model.value.flagRepeat) {
|
|
280
|
+
model.value.addSourceRow(newRow);
|
|
278
281
|
FormList.allhiddenHandle(newRow, newRow.$sourceIndex, model.value)
|
|
279
282
|
}
|
|
280
283
|
}
|
|
@@ -491,12 +494,15 @@ function setcolumnminWidth(column) {
|
|
|
491
494
|
function buttonClick(row, button) {
|
|
492
495
|
var submitData = {};
|
|
493
496
|
button.submitFormField.forEach((v) => {
|
|
494
|
-
submitData[v] = row[
|
|
497
|
+
submitData[v] = row[v].code1;
|
|
495
498
|
});
|
|
496
499
|
model.value.currentRowIndex = model.value.source.rows.findIndex(v => v.$sourceIndex === row.$sourceIndex);
|
|
497
500
|
|
|
498
501
|
emit('tableButtonClick', button, submitData);
|
|
499
502
|
}
|
|
503
|
+
function rolRouterClickHandler(field, rowData,rowindex) {
|
|
504
|
+
buttonClick(rowData, field);
|
|
505
|
+
}
|
|
500
506
|
function insertOrUpdateRow(row) {
|
|
501
507
|
FormList.insertOrUpdateRow(row, true, model.value);
|
|
502
508
|
}
|
|
@@ -616,11 +622,10 @@ defineExpose({
|
|
|
616
622
|
width: 45%;
|
|
617
623
|
}
|
|
618
624
|
|
|
619
|
-
.ct-form-repeat .list-
|
|
625
|
+
.ct-form-repeat .list-delbutton {
|
|
620
626
|
padding-bottom: 5px;
|
|
621
|
-
|
|
622
|
-
display:
|
|
623
|
-
float: right;
|
|
627
|
+
justify-content: right;
|
|
628
|
+
display: flex;
|
|
624
629
|
}
|
|
625
630
|
|
|
626
631
|
.ct-form-repeat .ct-form-repeat-el-col {
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
<ct-field :vmodel="model" v-if="model">
|
|
4
4
|
<template #Control>
|
|
5
|
-
<div class="ct-Radio">
|
|
5
|
+
<div class="ct-Radio" :class="[model.code1 !== '' && !model.locked ? 'hasValue' : '']">
|
|
6
6
|
<el-radio-group v-model="model.code1" @change="change">
|
|
7
7
|
<el-radio v-bind="model.attrs" v-for="(item, index) in model.selectItems1" :key="index"
|
|
8
8
|
:label="item.code" :disabled="model.locked">
|
|
9
9
|
{{ item.name }}
|
|
10
10
|
</el-radio>
|
|
11
|
+
<el-icon @click="clearClickHandle" class="el-range__close-icon" style="margin-left: 10px;" v-if="!common.flagHK()">
|
|
12
|
+
<CircleClose />
|
|
13
|
+
</el-icon>
|
|
11
14
|
</el-radio-group>
|
|
12
15
|
</div>
|
|
13
16
|
</template>
|
|
@@ -16,6 +19,7 @@
|
|
|
16
19
|
<script lang="ts" setup>
|
|
17
20
|
import { initData, changeHandler } from '../../utils/mixins';
|
|
18
21
|
import RadioButton from '../../loader/src/RadioButton';
|
|
22
|
+
import common from '../../utils/common'
|
|
19
23
|
const emit = defineEmits(['click', 'change','search'])
|
|
20
24
|
const props = defineProps({
|
|
21
25
|
parameterAction: String,
|
|
@@ -206,7 +206,8 @@
|
|
|
206
206
|
<div v-else>
|
|
207
207
|
<div v-for="(row, rowindex) in model.listData" :key="rowindex">
|
|
208
208
|
<ct-layout :vmodel="row" :cellLayout="model.cellLayout" :rowindex="rowindex" :key="itemKey"
|
|
209
|
-
@rolRouterclick="rolRouterCellClickHandler" :actionRouter="model.actionRouter"
|
|
209
|
+
@rolRouterclick="rolRouterCellClickHandler" :actionRouter="model.actionRouter"
|
|
210
|
+
:selectIndex="model.selectIndex" :selectedRowBackColor="model.selectedRowBackColor" @rowclick="rowLayoutClickHandle">
|
|
210
211
|
</ct-layout>
|
|
211
212
|
</div>
|
|
212
213
|
</div>
|
|
@@ -215,7 +216,7 @@
|
|
|
215
216
|
v-if="!isLoading && model && !model.isLayout"></Tabletip>
|
|
216
217
|
<Tabletip ref="refFooter" class="ct-search-table-footer" style="width: 100%;"
|
|
217
218
|
:tip="model.footer + model.companyName" v-if="!isLoading && model && !model.isLayout"></Tabletip>
|
|
218
|
-
<div ref="
|
|
219
|
+
<div ref="refPopupButton" v-if="flagPopupSearchlist"
|
|
219
220
|
style="margin-top: 10px;width: 100%;display: inline-block;height: 30px;margin-bottom: 10px;">
|
|
220
221
|
<el-button size="mini" @click="popupClickHandler()" class="max-search-btn" style="float:right;"
|
|
221
222
|
type="primary">
|
|
@@ -323,6 +324,7 @@ const refListHeader = ref()
|
|
|
323
324
|
const refListFooter = ref()
|
|
324
325
|
const refTableStats = ref()
|
|
325
326
|
const refTableParent = ref()
|
|
327
|
+
const refPopupButton = ref()
|
|
326
328
|
const refRows = ref<HTMLElement[]>([]);
|
|
327
329
|
const getRowsRef = (el, index) => {
|
|
328
330
|
if (el) {
|
|
@@ -350,7 +352,7 @@ onActivated(() => {
|
|
|
350
352
|
})
|
|
351
353
|
})
|
|
352
354
|
onDeactivated(() => {
|
|
353
|
-
|
|
355
|
+
downloadUrl.value = ''
|
|
354
356
|
})
|
|
355
357
|
|
|
356
358
|
//查询数据
|
|
@@ -376,7 +378,7 @@ function searchComplate(m, defaultSearch) {
|
|
|
376
378
|
//初始化数据
|
|
377
379
|
function load(data) {
|
|
378
380
|
model.value = data;
|
|
379
|
-
model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage,toolbarClickHandler };
|
|
381
|
+
model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage, toolbarClickHandler };
|
|
380
382
|
model.value.isIframe = props.isIframe
|
|
381
383
|
//自动查询 调用合并列
|
|
382
384
|
if (model.value.listData.length > 0) {
|
|
@@ -588,18 +590,18 @@ function importComplete(res, field) {
|
|
|
588
590
|
}
|
|
589
591
|
else {
|
|
590
592
|
if (field && field.callBackFunName) {
|
|
591
|
-
|
|
593
|
+
changeCallBackHandler(field, field.callBackFunName, res.content);
|
|
592
594
|
}
|
|
593
595
|
else {
|
|
594
|
-
|
|
596
|
+
doAction(res)
|
|
595
597
|
}
|
|
596
598
|
}
|
|
597
599
|
}
|
|
598
600
|
function changeCallBackHandler(field, callBackFunName, callBackPara) {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
if (callBackFunName) {
|
|
602
|
+
model.value.scripts.$fd = field.id;
|
|
603
|
+
common.excuteFunStr.call(model.value.scripts, callBackFunName, callBackPara);
|
|
604
|
+
}
|
|
603
605
|
}
|
|
604
606
|
//计算数据合并行
|
|
605
607
|
function tdRowspan(column, row) {
|
|
@@ -678,6 +680,9 @@ function rowClickHandle(ev, index) {
|
|
|
678
680
|
ev.cancelBubble = true;
|
|
679
681
|
ev.stopPropagation();
|
|
680
682
|
}
|
|
683
|
+
function rowLayoutClickHandle(index) {
|
|
684
|
+
model.value.selectIndex = index;
|
|
685
|
+
}
|
|
681
686
|
|
|
682
687
|
//表单列表操作
|
|
683
688
|
function rolRouterClickHandler(field, rowData, rowindex, visible, columnName) {
|
|
@@ -805,14 +810,18 @@ function setTableHeight() {
|
|
|
805
810
|
if (refTableStats.value && refTableStats.value.tableStatistics) {
|
|
806
811
|
h7 = refTableStats.value.tableStatistics.offsetHeight + 10 | 0;
|
|
807
812
|
}
|
|
808
|
-
|
|
813
|
+
var h8 = 0;
|
|
814
|
+
if (refPopupButton.value) {
|
|
815
|
+
h8 = refPopupButton.value.offsetHeight + 21 | 0;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - h8 - 16;
|
|
809
819
|
model.value.tableHeight = tableHeight < 40 ? 350 : tableHeight;
|
|
810
820
|
nextTick(() => {
|
|
811
821
|
getScrollAttr();
|
|
812
822
|
});
|
|
813
823
|
}
|
|
814
824
|
})
|
|
815
|
-
|
|
816
825
|
}
|
|
817
826
|
//表头拖动开始
|
|
818
827
|
function thMouseMoveHandle(ev) {
|
|
@@ -160,7 +160,7 @@ const ComboBox = function (source) {
|
|
|
160
160
|
}
|
|
161
161
|
return source.code1 === '' ? [] : [{ value: source.code1, label: source.name1 }]
|
|
162
162
|
},
|
|
163
|
-
getOptions(paramsAction, searchText, cancelTokenSource,CallBack) {
|
|
163
|
+
getOptions(paramsAction, searchText, cancelTokenSource, CallBack) {
|
|
164
164
|
var apiAddrs = paramsAction;
|
|
165
165
|
var params = {
|
|
166
166
|
action: apiAddrs,
|
|
@@ -171,13 +171,24 @@ const ComboBox = function (source) {
|
|
|
171
171
|
key: searchText
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (
|
|
177
|
-
CallBack
|
|
174
|
+
if (cancelTokenSource) {
|
|
175
|
+
request.postTokenHandler(common.globalUri(), params, cancelTokenSource).then((response) => {
|
|
176
|
+
if (response.rtnCode === 200) {
|
|
177
|
+
if (CallBack) {
|
|
178
|
+
CallBack(response.content)
|
|
179
|
+
}
|
|
178
180
|
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
else{
|
|
184
|
+
request.postHandler(common.globalUri(), params).then((response) => {
|
|
185
|
+
if (response.rtnCode === 200) {
|
|
186
|
+
if (CallBack) {
|
|
187
|
+
CallBack(response.content)
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
181
192
|
},
|
|
182
193
|
};
|
|
183
194
|
rtn = base.copy(source, rtn);
|
package/src/loader/src/File.js
CHANGED
|
@@ -376,6 +376,8 @@ function setPublicClassify(classify, model) {
|
|
|
376
376
|
function setClassify(classify, model) {
|
|
377
377
|
classify.file.mediaLabelName = classify.option[model.optionModel.optionAttrs.label];
|
|
378
378
|
classify.file.mediaLabelID = classify.option[model.optionModel.optionAttrs.value];
|
|
379
|
+
classify.file.source.mediaLabelName = classify.option[model.optionModel.optionAttrs.label];
|
|
380
|
+
classify.file.source.mediaLabelID = classify.option[model.optionModel.optionAttrs.value];
|
|
379
381
|
}
|
|
380
382
|
//上传成功
|
|
381
383
|
function handleAvatarSuccess(res, file, fileList, model) {
|
package/src/loader/src/Form.js
CHANGED
|
@@ -71,7 +71,7 @@ function loadFromModel(source, isFormList) {
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
getValueByFieldNameFromParent(id, attrKey) {
|
|
74
|
-
if(this.form && this.form.parentModelForm){
|
|
74
|
+
if (this.form && this.form.parentModelForm) {
|
|
75
75
|
return this.form.parentModelForm.getValueByFieldName(id, attrKey);
|
|
76
76
|
}
|
|
77
77
|
return null;
|
|
@@ -111,14 +111,14 @@ function loadFromModel(source, isFormList) {
|
|
|
111
111
|
if (attrKey == 'name1') {
|
|
112
112
|
rtn1["options"][0]["label"] = attrValue
|
|
113
113
|
}
|
|
114
|
-
if(rtn1.itemKey)rtn1.itemKey=Math.random()
|
|
114
|
+
if (rtn1.itemKey) rtn1.itemKey = Math.random()
|
|
115
115
|
}
|
|
116
116
|
hiddenHandle(rtn1, this.form);
|
|
117
117
|
requiredHandle(rtn1, this.form);
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
setValueByFieldNameFromParent(id, attrKey, attrValue) {
|
|
121
|
-
if(this.form && this.form.parentModelForm){
|
|
121
|
+
if (this.form && this.form.parentModelForm) {
|
|
122
122
|
return this.form.parentModelForm.setValueByFieldName(id, attrKey, attrValue);
|
|
123
123
|
}
|
|
124
124
|
return null;
|
|
@@ -411,24 +411,24 @@ function loadFromModel(source, isFormList) {
|
|
|
411
411
|
common.message(message, type, center, duration, showClose, dangerouslyUseHTMLString)
|
|
412
412
|
},
|
|
413
413
|
|
|
414
|
-
},
|
|
414
|
+
},
|
|
415
415
|
getValueByFieldName(id, attrKey) {
|
|
416
416
|
attrKey = common.initialsToLowerCase(attrKey);
|
|
417
417
|
var rtn1 = this.fieldsDic[id];
|
|
418
418
|
if (rtn1) {
|
|
419
|
-
|
|
419
|
+
return rtn1[attrKey];
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
setValueByFieldName(id, attrKey, attrValue) {
|
|
423
423
|
attrKey = common.initialsToLowerCase(attrKey);
|
|
424
424
|
var rtn1 = this.fieldsDic[id];
|
|
425
425
|
if (rtn1) {
|
|
426
|
-
if(attrKey=='code1' && rtn1.controlType===4
|
|
427
|
-
&& attrValue!=undefined && attrValue!=null && attrValue!=''){
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
426
|
+
if (attrKey == 'code1' && rtn1.controlType === 4
|
|
427
|
+
&& attrValue != undefined && attrValue != null && attrValue != '') {
|
|
428
|
+
if (rtn1.decimals1 != undefined && rtn1.decimals1 != null && rtn1.decimals1 > -1) {
|
|
429
|
+
attrValue = Number(attrValue).toFixed(rtn1.decimals1)
|
|
431
430
|
}
|
|
431
|
+
}
|
|
432
432
|
rtn1[attrKey] = attrValue;
|
|
433
433
|
// this.self.hatchHandle(id, attrKey, attrValue, rtn1);
|
|
434
434
|
|
|
@@ -727,7 +727,7 @@ function loadFromModel(source, isFormList) {
|
|
|
727
727
|
Object.assign(rtnFormObj, customizeColumnsObj);
|
|
728
728
|
}
|
|
729
729
|
else {
|
|
730
|
-
if(f.hasOwnProperty('getFormObj') && typeof f.getFormObj === "function"){
|
|
730
|
+
if (f.hasOwnProperty('getFormObj') && typeof f.getFormObj === "function") {
|
|
731
731
|
Object.assign(rtnFormObj, f.getFormObj());
|
|
732
732
|
}
|
|
733
733
|
}
|
|
@@ -758,7 +758,7 @@ function loadFromModel(source, isFormList) {
|
|
|
758
758
|
return submitData;
|
|
759
759
|
},
|
|
760
760
|
//获取父级关联数据
|
|
761
|
-
getParentFieldPara(parentFieldNameArr,model) {
|
|
761
|
+
getParentFieldPara(parentFieldNameArr, model) {
|
|
762
762
|
let submitData = {};
|
|
763
763
|
var tempFormData = rtn.getFormObj();
|
|
764
764
|
parentFieldNameArr.forEach((v) => {
|
|
@@ -886,7 +886,7 @@ function requiredHandle(item, model) {
|
|
|
886
886
|
//清除关联当前组件的组件值
|
|
887
887
|
function clearRelatedHandle(field, fields) {
|
|
888
888
|
var f = fields.filter((v) => {
|
|
889
|
-
return v.parentField && field.fieldName1 && (','+v.parentField+',').indexOf(','+field.fieldName1+',') > -1;
|
|
889
|
+
return v.parentField && field.fieldName1 && (',' + v.parentField + ',').indexOf(',' + field.fieldName1 + ',') > -1;
|
|
890
890
|
});
|
|
891
891
|
f.forEach((v) => {
|
|
892
892
|
if (v.reset) {
|
|
@@ -931,12 +931,16 @@ function popupSearchListHandler(singleSelectio, field, router, model, Fields, pr
|
|
|
931
931
|
|
|
932
932
|
let check = true;
|
|
933
933
|
let checkMsg;
|
|
934
|
+
var i = 0;
|
|
934
935
|
router.submitFormField.forEach((v) => {
|
|
935
936
|
Fields.forEach((f) => {
|
|
936
937
|
if (f.model && f.model.fieldName1 === v) {
|
|
937
938
|
if (typeof f.model.validExcute !== 'undefined') {
|
|
938
939
|
if (!f.model.validExcute()) {
|
|
939
|
-
|
|
940
|
+
if (i == 0) {
|
|
941
|
+
common.message(f.model.displayValidMessage)
|
|
942
|
+
}
|
|
943
|
+
i++;
|
|
940
944
|
verified = false;
|
|
941
945
|
return;
|
|
942
946
|
}
|
|
@@ -1018,9 +1022,9 @@ function popupSearchListHandler(singleSelectio, field, router, model, Fields, pr
|
|
|
1018
1022
|
callBack(option);
|
|
1019
1023
|
}
|
|
1020
1024
|
if (typeof option === 'object' && option !== null && option.flagAlert) {
|
|
1021
|
-
common.confirm(option.content, option.caption? option.caption : "提示", {
|
|
1022
|
-
confirmButtonText: option.confirmButtonText? option.confirmButtonText : "确定",
|
|
1023
|
-
cancelButtonText: option.cancelButtonText? option.cancelButtonText : "取消",
|
|
1025
|
+
common.confirm(option.content, option.caption ? option.caption : "提示", {
|
|
1026
|
+
confirmButtonText: option.confirmButtonText ? option.confirmButtonText : "确定",
|
|
1027
|
+
cancelButtonText: option.cancelButtonText ? option.cancelButtonText : "取消",
|
|
1024
1028
|
center: Enum.HalignType.Center
|
|
1025
1029
|
}).then(() => {
|
|
1026
1030
|
model.$vue.changeCallBackHandler(field, router.callBackFunName, option);
|
|
@@ -314,10 +314,11 @@ function FormListModel(source, master,actionRouters) {
|
|
|
314
314
|
if(form.fieldsDic[f]){
|
|
315
315
|
let newField={...form.fieldsDic[f]};
|
|
316
316
|
newField.is='ct-label';
|
|
317
|
-
newField.
|
|
317
|
+
newField.controlType=Enum.ControlType.Label;
|
|
318
318
|
newField.colspan=24;
|
|
319
319
|
newField.required=false;
|
|
320
320
|
newField.labelClass='';
|
|
321
|
+
newField.value=newField.code1;
|
|
321
322
|
relfields.push(newField);
|
|
322
323
|
}
|
|
323
324
|
});
|
|
@@ -320,8 +320,6 @@ function isHandle(type) {
|
|
|
320
320
|
let result = false;
|
|
321
321
|
switch (type) {
|
|
322
322
|
case Enum.ControlType.CheckBoxList://复选列表
|
|
323
|
-
case Enum.ControlType.MultiSelectNoSearch:
|
|
324
|
-
case Enum.ControlType.MultiSelectWithSearch:
|
|
325
323
|
result = true;
|
|
326
324
|
break;
|
|
327
325
|
default:
|
package/src/main.js
CHANGED
|
@@ -64,7 +64,7 @@ app.use(centaline, {
|
|
|
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
66
|
//authObject: '{token:"1-a7289bb2-9f1e-4a04-9016-1e555bf39188"}',
|
|
67
|
-
authObject: '{EmpID:"
|
|
67
|
+
authObject: '{EmpID:"Token_15dc3fe3-b962-4bd2-85e2-2ce843676353",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_15dc3fe3-b962-4bd2-85e2-2ce843676353",Platform:"IOS"}',
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
// 请求完成事件,可判断是否登录过期执行响应操作
|