centaline-data-driven-v3 0.0.59 → 0.0.61
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 +61 -60
- package/package.json +1 -1
- package/src/assets/commonWeb.css +0 -1
- package/src/components/app/PhotoSelect.vue +11 -13
- package/src/components/web/Field.vue +3 -1
- package/src/components/web/FormList.vue +14 -4
- package/src/components/web/PhotoSelectList.vue +25 -7
- package/src/components/web/Progress.vue +7 -5
- package/src/components/web/SearchList/SearchTable.vue +3 -2
- package/src/components/web/SearchScreen.vue +4 -0
- package/src/components/web/TextBox.vue +12 -0
- package/src/loader/src/Form.js +47 -34
- package/src/loader/src/SearchTable.js +36 -6
- package/src/main.js +1 -1
- package/src/utils/mixins.js +3 -1
- package/src/components/web/PopupGroupList.vue +0 -6
package/package.json
CHANGED
package/src/assets/commonWeb.css
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="van-uploader" style="margin:10px 10px 0 10px; ">
|
|
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
|
-
@click="viewerfile(
|
|
7
|
+
@click="viewerfile(model.fileList, index)">
|
|
8
8
|
<div class="van-image van-uploader__preview-image">
|
|
9
9
|
<img :src="element.thumbnailUrl" class="van-image__img" style="object-fit: cover;">
|
|
10
10
|
<div class="van-uploader__preview-cover">
|
|
11
11
|
<div class="preview-cover van-ellipsis">{{ element.mediaLabelName }}</div>
|
|
12
12
|
</div>
|
|
13
|
-
<div class="swiper-i" @click="viewerfile(
|
|
13
|
+
<div class="swiper-i" @click="viewerfile(model.fileList, index)"
|
|
14
14
|
v-if="element.mediaTypeID == '7'">
|
|
15
15
|
<img :src="util.getAssetsImage('p3602x.png')" class="hous-icon" />
|
|
16
16
|
</div>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</template>
|
|
26
26
|
</div>
|
|
27
|
-
<div class="van-uploader__upload" v-if="!model.locked &&
|
|
27
|
+
<div class="van-uploader__upload" v-if="!model.locked && model.fileList.length < max" @click="handleOpen()">
|
|
28
28
|
<i class="van-badge__wrapper van-icon van-icon-plus van-uploader__upload-icon"></i>
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
@@ -43,7 +43,6 @@ const props = defineProps({
|
|
|
43
43
|
api: String,
|
|
44
44
|
})
|
|
45
45
|
const max = ref(99999)
|
|
46
|
-
const photoList = ref([])
|
|
47
46
|
const uploadImgItem = ref()
|
|
48
47
|
|
|
49
48
|
onMounted(() => {
|
|
@@ -74,10 +73,10 @@ const initDragSort = () => {
|
|
|
74
73
|
// 获取旧的索引和新索引
|
|
75
74
|
const { oldIndex, newIndex } = evt
|
|
76
75
|
// 交换位置
|
|
77
|
-
const movedItem =
|
|
78
|
-
|
|
76
|
+
const movedItem = model.value.fileList.splice(oldIndex, 1)[0]
|
|
77
|
+
model.value.fileList.splice(newIndex, 0, movedItem)
|
|
79
78
|
|
|
80
|
-
PhotoSelect.setfileSourceList(
|
|
79
|
+
PhotoSelect.setfileSourceList(model.value.fileList, model.value);
|
|
81
80
|
}
|
|
82
81
|
})
|
|
83
82
|
}
|
|
@@ -89,14 +88,13 @@ function load(data) {
|
|
|
89
88
|
model.value.validExcute = () => {
|
|
90
89
|
return selfValidExcute("valid");
|
|
91
90
|
}
|
|
92
|
-
photoList.value = data.fileList;
|
|
93
91
|
|
|
94
92
|
max.value = data.max ? data.max : 99999;
|
|
95
93
|
selfValidExcute("valid");
|
|
96
94
|
}
|
|
97
95
|
function handleRemove(item, index) {
|
|
98
96
|
PhotoSelect.deletePhoto(item, model.value);
|
|
99
|
-
|
|
97
|
+
model.value.fileList.splice(index, 1);
|
|
100
98
|
selfValidExcute("valid");
|
|
101
99
|
}
|
|
102
100
|
|
|
@@ -115,7 +113,7 @@ function handleOpen() {
|
|
|
115
113
|
parentValue: model.value.getFormParentFieldPara(),
|
|
116
114
|
extraData: model.value.getFormRefFieldPara(),
|
|
117
115
|
};
|
|
118
|
-
|
|
116
|
+
model.value.fileList.forEach((n) => {
|
|
119
117
|
chooseList.push(n);
|
|
120
118
|
});
|
|
121
119
|
var dialogOption = {
|
|
@@ -148,7 +146,7 @@ function handleOpen() {
|
|
|
148
146
|
}
|
|
149
147
|
}
|
|
150
148
|
PhotoSelect.setSelectfileSourceList(List, model.value);
|
|
151
|
-
|
|
149
|
+
model.value.fileList = List;
|
|
152
150
|
// selfValidExcute("valid");
|
|
153
151
|
common.closeDialog(dialogOption);
|
|
154
152
|
});
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
|
|
22
22
|
</slot>
|
|
23
23
|
<!-- 插槽--控件后面的内容 -->
|
|
24
|
-
<slot name="SufLabel" v-if="model.controlType != Enum.ControlType.CheckBox
|
|
24
|
+
<slot name="SufLabel" v-if="model.controlType != Enum.ControlType.CheckBox
|
|
25
|
+
&&model.controlType != Enum.ControlType.MultiLineText
|
|
26
|
+
&&model.controlType != Enum.ControlType.Switch">
|
|
25
27
|
<span v-if="model.sufLabel1" class="sufLabel" v-html="model.sufLabel1"></span>
|
|
26
28
|
</slot>
|
|
27
29
|
<!-- 插槽--验证提示的内容 -->
|
|
@@ -178,9 +178,6 @@ model.value.parameterAction = props.parameterAction
|
|
|
178
178
|
model.value.$vue = { insertOrUpdateRow, insertRow, delRow, deleteAll, insertSingleRow, itemKey };
|
|
179
179
|
model.value.validExcute = () => {
|
|
180
180
|
var rtn = fieldsValidExcute();
|
|
181
|
-
if (!rtn) {
|
|
182
|
-
model.value.displayValidMessage = common.LocalizedString('请填写', '請填寫') + '[' + model.value.controlLabel + ']'
|
|
183
|
-
}
|
|
184
181
|
return fieldsValidExcute();
|
|
185
182
|
}
|
|
186
183
|
const Fields = ref()
|
|
@@ -276,7 +273,8 @@ function saveRow(row, index, isCancel) {
|
|
|
276
273
|
if (k !== '$sourceIndex') {
|
|
277
274
|
row[k].code1 = data[k].code1;
|
|
278
275
|
row[k].code2 = data[k].code2;
|
|
279
|
-
row[k].
|
|
276
|
+
row[k].name1 = data[k].name1;
|
|
277
|
+
row[k].name2 = data[k].name2;
|
|
280
278
|
}
|
|
281
279
|
};
|
|
282
280
|
if (model.value.currentRow.isNew) {
|
|
@@ -379,8 +377,10 @@ function getSummaries(param) {
|
|
|
379
377
|
//验证
|
|
380
378
|
function fieldsValidExcute() {
|
|
381
379
|
var rtnBool = true;
|
|
380
|
+
var i = 0;
|
|
382
381
|
if (model.value.required) {
|
|
383
382
|
if (model.value.tableData.length == 0) {
|
|
383
|
+
model.value.displayValidMessage = common.LocalizedString('请填写', '請填寫') + '[' + model.value.controlLabel + ']'
|
|
384
384
|
return false;
|
|
385
385
|
}
|
|
386
386
|
}
|
|
@@ -391,6 +391,12 @@ function fieldsValidExcute() {
|
|
|
391
391
|
var f = r[c["fieldName1"]]
|
|
392
392
|
if (f.validExcute) {
|
|
393
393
|
if (!f.validExcute()) {
|
|
394
|
+
if (i === 0) {
|
|
395
|
+
if (f.displayValidMessage) {
|
|
396
|
+
model.value.displayValidMessage = f.displayValidMessage;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
i++;
|
|
394
400
|
rtnBool = false;
|
|
395
401
|
}
|
|
396
402
|
}
|
|
@@ -404,6 +410,10 @@ function fieldsValidExcute() {
|
|
|
404
410
|
Fields.value.forEach((f) => {
|
|
405
411
|
if (f.model.validExcute) {
|
|
406
412
|
if (!f.model.validExcute()) {
|
|
413
|
+
if (i === 0) {
|
|
414
|
+
model.value.displayValidMessage = "【" + model.value.controlLabel + "-" + f.model.controlLabel + "】不能为空!";
|
|
415
|
+
}
|
|
416
|
+
i++;
|
|
407
417
|
rtnBool = false;
|
|
408
418
|
}
|
|
409
419
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
<div v-loading="loading" style="width: 100%;height: 100%;">
|
|
3
3
|
<div style="width: 100%;height: 100%;position: relative;" class="ct-photoSelectList" v-if="FlagPhoto">
|
|
4
4
|
<div style="padding: 10px 0 0 20px" v-if="paramName">
|
|
5
|
-
<el-select-v2 v-model="mediaLabelID" :props="optionAttrs" :options="options"
|
|
6
|
-
style="width: 150px;" @change="change"
|
|
5
|
+
<el-select-v2 v-model="mediaLabelID" :props="optionAttrs" :options="options"
|
|
6
|
+
:placeholder="common.LocalizedString('类别', '類別')" style="width: 150px;" @change="change"
|
|
7
|
+
clearable />
|
|
7
8
|
</div>
|
|
8
9
|
<el-main :style="paramName ? 'top: 40px' : 'top: 10px'"
|
|
9
10
|
style="position: absolute; bottom: 50PX;left: 10px;right: 0;padding:0px">
|
|
@@ -11,7 +12,9 @@
|
|
|
11
12
|
<template v-if="imageList.length > 0">
|
|
12
13
|
<template v-if="layout">
|
|
13
14
|
<div style="display: flex;" v-for="(item, index) in imageList" :key="index">
|
|
14
|
-
<el-
|
|
15
|
+
<el-radio v-if="selectedMode == 1" style="margin: 0 5px;height: auto;"
|
|
16
|
+
@change="chooseRadio(item)" v-model="item.ischeck" :label="true"> </el-radio>
|
|
17
|
+
<el-checkbox v-else style="margin: 0 5px;" @change="choose(item, true)"
|
|
15
18
|
v-model="item.ischeck"></el-checkbox>
|
|
16
19
|
<ct-layout :vmodel="item" :cellLayout="layout" :rowindex="index" :flagMediaSelect="true"
|
|
17
20
|
@rolRouterclick="rolRouterCellClickHandler">
|
|
@@ -53,14 +56,15 @@
|
|
|
53
56
|
</template>
|
|
54
57
|
</template>
|
|
55
58
|
<template v-else>
|
|
56
|
-
<el-empty :description="common.LocalizedString('没有数据','沒有數據')" />
|
|
59
|
+
<el-empty :description="common.LocalizedString('没有数据', '沒有數據')" />
|
|
57
60
|
</template>
|
|
58
61
|
</el-main>
|
|
59
62
|
|
|
60
63
|
<div style="width:100%;text-align:center">
|
|
61
|
-
<el-checkbox style="position:absolute;bottom:10px;left: 15px;"
|
|
62
|
-
v-model="allcheck">{{common.LocalizedString('全选','全選')}}</el-checkbox>
|
|
63
|
-
<el-button type="primary" style="position:absolute;bottom:10px;" @click="handleClick()">{{
|
|
64
|
+
<el-checkbox v-if="selectedMode != 1" style="position:absolute;bottom:10px;left: 15px;"
|
|
65
|
+
@change="allchoose" v-model="allcheck">{{ common.LocalizedString('全选', '全選') }}</el-checkbox>
|
|
66
|
+
<el-button type="primary" style="position:absolute;bottom:10px;" @click="handleClick()">{{
|
|
67
|
+
common.LocalizedString('确定', '確認') }}</el-button>
|
|
64
68
|
</div>
|
|
65
69
|
</div>
|
|
66
70
|
</div>
|
|
@@ -91,6 +95,7 @@ const allcheck = ref(false)
|
|
|
91
95
|
const options = ref([])
|
|
92
96
|
const mediaLabelID = ref('')
|
|
93
97
|
const loading = ref(true)
|
|
98
|
+
const selectedMode = ref(2)
|
|
94
99
|
const optionAttrs = {
|
|
95
100
|
label: 'name',
|
|
96
101
|
value: 'code',
|
|
@@ -121,6 +126,9 @@ function load(data) {
|
|
|
121
126
|
layout.value = data.source.content.layout;
|
|
122
127
|
paramName.value = data.source.content.paramName;
|
|
123
128
|
sourceRows = common.deepClone(data.source.content.mediaList);
|
|
129
|
+
if (data.source.content.selectedMode) {
|
|
130
|
+
selectedMode.value = data.source.content.selectedMode
|
|
131
|
+
}
|
|
124
132
|
}
|
|
125
133
|
else {
|
|
126
134
|
sourceRows = common.deepClone(data.source.content);
|
|
@@ -192,6 +200,16 @@ function choose(item, flagCheckbox) {
|
|
|
192
200
|
item.ischeck = false;
|
|
193
201
|
}
|
|
194
202
|
|
|
203
|
+
}
|
|
204
|
+
function chooseRadio(item) {
|
|
205
|
+
let chooseItem = common.deepClone(item);
|
|
206
|
+
chooseList.value = [];
|
|
207
|
+
imageList.value.forEach((v) => {
|
|
208
|
+
v.ischeck = false;
|
|
209
|
+
});
|
|
210
|
+
item.ischeck = true;
|
|
211
|
+
chooseList.value.push(chooseItem);
|
|
212
|
+
|
|
195
213
|
}
|
|
196
214
|
function allchoose() {
|
|
197
215
|
chooseList.value = [];
|
|
@@ -68,7 +68,7 @@ function getApiData() {
|
|
|
68
68
|
progressFlag.value = true;
|
|
69
69
|
percentage.value = data.percentage;
|
|
70
70
|
if (data.flagFinished) {
|
|
71
|
-
if (props.progressType == 'export' && data.content) {
|
|
71
|
+
if (props.progressType == 'export' && data.content && props.flagNotification=='1') {
|
|
72
72
|
if (data.content.indexOf(".zip") > -1) {
|
|
73
73
|
window.location.href = encodeURI(data.content);
|
|
74
74
|
}
|
|
@@ -80,11 +80,13 @@ function getApiData() {
|
|
|
80
80
|
downloadUrl.value = data.content + "?" + Math.random();
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
emit('finished', data);
|
|
85
|
+
}, 800);
|
|
86
|
+
}
|
|
87
|
+
else{
|
|
88
|
+
emit('finished', data);
|
|
84
89
|
}
|
|
85
|
-
setTimeout(() => {
|
|
86
|
-
emit('finished', data);
|
|
87
|
-
}, 800);
|
|
88
90
|
}
|
|
89
91
|
else {
|
|
90
92
|
setTimeout(() => {
|
|
@@ -359,7 +359,6 @@ function searchComplate(m, defaultSearch) {
|
|
|
359
359
|
searchEnd.value = Date.now();
|
|
360
360
|
isLoading.value = false;
|
|
361
361
|
tableLoading.value = false;
|
|
362
|
-
emit("loadedError");
|
|
363
362
|
});
|
|
364
363
|
}
|
|
365
364
|
if (typeof props.source !== "undefined") {
|
|
@@ -374,7 +373,7 @@ function searchComplate(m, defaultSearch) {
|
|
|
374
373
|
//初始化数据
|
|
375
374
|
function load(data) {
|
|
376
375
|
model.value = data;
|
|
377
|
-
model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage };
|
|
376
|
+
model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage,toolbarClickHandler };
|
|
378
377
|
model.value.isIframe = props.isIframe
|
|
379
378
|
//自动查询 调用合并列
|
|
380
379
|
if (model.value.listData.length > 0) {
|
|
@@ -385,6 +384,8 @@ function load(data) {
|
|
|
385
384
|
model.value.setStyleRow(model.value.listData);
|
|
386
385
|
}
|
|
387
386
|
}
|
|
387
|
+
model.value.scripts.formData = model.value.formData;
|
|
388
|
+
model.value.scripts.formData.formTable = model.value;
|
|
388
389
|
isLoading.value = false
|
|
389
390
|
emit("loaded");
|
|
390
391
|
setTableHeight()
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
|
+
<iframe :src="downloadUrl"
|
|
51
|
+
style="height:0px;width:0px;border-width: 0px;position: absolute;bottom: 0px;display: none;">
|
|
52
|
+
</iframe>
|
|
50
53
|
</div>
|
|
51
54
|
</template>
|
|
52
55
|
<script setup lang="ts">
|
|
@@ -82,6 +85,7 @@ const showScreen = ref(true)
|
|
|
82
85
|
const highScreen = ref(false)
|
|
83
86
|
const model = ref({ searchData: {} })
|
|
84
87
|
const Fields = ref()
|
|
88
|
+
const downloadUrl = ref('')
|
|
85
89
|
searchComplate()
|
|
86
90
|
//初始化数据
|
|
87
91
|
function searchComplate(flagLoad) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ct-field :vmodel="model">
|
|
3
3
|
<template #Control>
|
|
4
|
+
<div v-if="model.controlType === Enum.ControlType.MultiLineText" style="width: 100%;">
|
|
4
5
|
<el-input :type="model.inputType" v-model="model.code1" v-bind="model.attrs" @input="change()"
|
|
5
6
|
:disabled="model.locked" :rows="model.rows" :readonly="model.readonly"
|
|
6
7
|
:show-password="model.inputType == 'password'" autocomplete="on" :maxlength="model.maxValue1"
|
|
@@ -9,6 +10,16 @@
|
|
|
9
10
|
<span v-if="model.unitName1">{{ model.unitName1 }}</span>
|
|
10
11
|
</template>
|
|
11
12
|
</el-input>
|
|
13
|
+
<span v-if="model.sufLabel1" class="sufLabel" v-html="model.sufLabel1"></span>
|
|
14
|
+
</div>
|
|
15
|
+
<el-input v-else :type="model.inputType" v-model="model.code1" v-bind="model.attrs" @input="change()"
|
|
16
|
+
:disabled="model.locked" :rows="model.rows" :readonly="model.readonly"
|
|
17
|
+
:show-password="model.inputType == 'password'" autocomplete="on" :maxlength="model.maxValue1"
|
|
18
|
+
:show-word-limit="model.showWordLimit" clearable @keyup.enter.native="search()" class="fieldControl">
|
|
19
|
+
<template #suffix>
|
|
20
|
+
<span v-if="model.unitName1">{{ model.unitName1 }}</span>
|
|
21
|
+
</template>
|
|
22
|
+
</el-input>
|
|
12
23
|
</template>
|
|
13
24
|
<template #Sufbutton v-if="model.moreActionRouter">
|
|
14
25
|
<div style="margin-left: 5px;">
|
|
@@ -23,6 +34,7 @@
|
|
|
23
34
|
<script lang="ts" setup>
|
|
24
35
|
import { initData, changeHandler } from '../../utils/mixins';
|
|
25
36
|
import TextBox from '../../loader/src/TextBox';
|
|
37
|
+
import Enum from '../../utils/Enum'
|
|
26
38
|
const emit = defineEmits(['input', 'change', 'click','search','popupSearchList'])
|
|
27
39
|
const props = defineProps({
|
|
28
40
|
parameterAction: String,
|
package/src/loader/src/Form.js
CHANGED
|
@@ -81,10 +81,10 @@ function loadFromModel(source, isFormList) {
|
|
|
81
81
|
attrValue = Number(attrValue).toFixed(rtn1.decimals1)
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
else if (attrKey == 'code1' && (rtn1.controlType === Enum.ControlType.File
|
|
85
|
-
|| rtn1.controlType === Enum.ControlType.SliceUpload|| rtn1.controlType === Enum.ControlType.PhotoSelect)
|
|
84
|
+
else if (attrKey == 'code1' && (rtn1.controlType === Enum.ControlType.File
|
|
85
|
+
|| rtn1.controlType === Enum.ControlType.SliceUpload || rtn1.controlType === Enum.ControlType.PhotoSelect)
|
|
86
86
|
&& attrValue != undefined && attrValue != null && attrValue != '') {
|
|
87
|
-
rtn1.jsSetFile(attrValue,rtn1);
|
|
87
|
+
rtn1.jsSetFile(attrValue, rtn1);
|
|
88
88
|
}
|
|
89
89
|
rtn1[attrKey] = attrValue;
|
|
90
90
|
if (rtn1.controlType === Enum.ControlType.Tags) {
|
|
@@ -838,7 +838,7 @@ function requiredHandle(item, model) {
|
|
|
838
838
|
//清除关联当前组件的组件值
|
|
839
839
|
function clearRelatedHandle(field, fields) {
|
|
840
840
|
var f = fields.filter((v) => {
|
|
841
|
-
return v.parentField && v.parentField.indexOf(field.fieldName1) > -1;
|
|
841
|
+
return v.parentField && field.fieldName1 && (','+v.parentField+',').indexOf(','+field.fieldName1+',') > -1;
|
|
842
842
|
});
|
|
843
843
|
f.forEach((v) => {
|
|
844
844
|
if (v.reset) {
|
|
@@ -969,8 +969,21 @@ function popupSearchListHandler(singleSelectio, field, router, model, Fields, pr
|
|
|
969
969
|
if (typeof callBack === "function" && !router.callBackFunName) {
|
|
970
970
|
callBack(option);
|
|
971
971
|
}
|
|
972
|
-
|
|
973
|
-
|
|
972
|
+
if (typeof option === 'object' && option !== null && option.flagAlert) {
|
|
973
|
+
common.confirm(option.content, option.caption? option.caption : "提示", {
|
|
974
|
+
confirmButtonText: option.confirmButtonText? option.confirmButtonText : "确定",
|
|
975
|
+
cancelButtonText: option.cancelButtonText? option.cancelButtonText : "取消",
|
|
976
|
+
center: Enum.HalignType.Center
|
|
977
|
+
}).then(() => {
|
|
978
|
+
model.$vue.changeCallBackHandler(field, router.callBackFunName, option);
|
|
979
|
+
common.closeDialog(dialogOption);
|
|
980
|
+
}).catch(() => {
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
else {
|
|
984
|
+
model.$vue.changeCallBackHandler(field, router.callBackFunName, option);
|
|
985
|
+
common.closeDialog(dialogOption);
|
|
986
|
+
}
|
|
974
987
|
}
|
|
975
988
|
},
|
|
976
989
|
}]
|
|
@@ -1025,31 +1038,31 @@ function popupGroupListHandler(field, router, model, Fields, props, callBack) {
|
|
|
1025
1038
|
return;
|
|
1026
1039
|
}
|
|
1027
1040
|
submitData = router.getActionPara(submitData).para;
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
}
|
|
1047
|
-
model.$vue.changeCallBackHandler(field, router.callBackFunName, option);
|
|
1048
|
-
common.closeDialog(dialogOption);
|
|
1041
|
+
var dialogOption = {
|
|
1042
|
+
title: router.pageTitle,
|
|
1043
|
+
pane: common.getParentPane(),
|
|
1044
|
+
content: [{
|
|
1045
|
+
component: 'ct-popupgrouplist',
|
|
1046
|
+
width: router.pageWidth + 'px',
|
|
1047
|
+
height: (router.pageHeight || 500) + 'px',
|
|
1048
|
+
documentHeight: props.documentHeight,
|
|
1049
|
+
documentWidth: props.documentWidth,
|
|
1050
|
+
attrs: {
|
|
1051
|
+
searchConditionApi: router.actionForSearchLayout,
|
|
1052
|
+
searchFormApi: router.actionForSearchLayout,
|
|
1053
|
+
searchDataApi: router.actionForSearch,
|
|
1054
|
+
apiParam: submitData,
|
|
1055
|
+
flagPopupSearchlist: flagSearchlist,
|
|
1056
|
+
onSubmit: (option) => {
|
|
1057
|
+
if (typeof callBack === "function" && !router.callBackFunName) {
|
|
1058
|
+
callBack(option);
|
|
1049
1059
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1060
|
+
model.$vue.changeCallBackHandler(field, router.callBackFunName, option);
|
|
1061
|
+
common.closeDialog(dialogOption);
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
}]
|
|
1065
|
+
};
|
|
1053
1066
|
common.openDialog(dialogOption);
|
|
1054
1067
|
}
|
|
1055
1068
|
function getFileData(field, model) {
|
|
@@ -1085,12 +1098,12 @@ function changeHandler(field, model) {
|
|
|
1085
1098
|
}
|
|
1086
1099
|
if (field.onAfterChanged && field.controlType !== Enum.ControlType.NumericTextBox) {
|
|
1087
1100
|
var router = model.actionRouters.find((v) => {
|
|
1088
|
-
return v.
|
|
1101
|
+
return v.key === field.onAfterChanged;
|
|
1089
1102
|
});
|
|
1090
|
-
if(router){
|
|
1091
|
-
clickHandler(router);
|
|
1103
|
+
if (router) {
|
|
1104
|
+
model.$vue.clickHandler(router);
|
|
1092
1105
|
}
|
|
1093
|
-
else{
|
|
1106
|
+
else {
|
|
1094
1107
|
if (model.scripts) {
|
|
1095
1108
|
model.scripts.formData.setExcuteListData(model.fields);
|
|
1096
1109
|
}
|
|
@@ -32,6 +32,22 @@ function loadSearchTableApi(action, callBack, searchModel, flagSearch, defaultSe
|
|
|
32
32
|
}
|
|
33
33
|
function loadSearchTableModel(source, searchModel, defaultSearchData, action, searchAction) {
|
|
34
34
|
var rtn = {
|
|
35
|
+
formData: {
|
|
36
|
+
formTable: null,
|
|
37
|
+
execRouter(routerKey) {
|
|
38
|
+
var router = this.formTable.buttons.find((v) => {
|
|
39
|
+
return v.key === routerKey;
|
|
40
|
+
});
|
|
41
|
+
if(router){
|
|
42
|
+
this.formTable.$vue.toolbarClickHandler(router);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
//消息提示 type主题:success/warning/info/error。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。 showClose 是否显示关闭按钮。
|
|
46
|
+
message(message, type, center, duration, showClose, dangerouslyUseHTMLString) {
|
|
47
|
+
common.message(message, type, center, duration, showClose, dangerouslyUseHTMLString)
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
},
|
|
35
51
|
selectAll: false,//全选是否选中
|
|
36
52
|
selectIndex: 0,//选中行的索引
|
|
37
53
|
pageIndex: 1,//当前显示页数
|
|
@@ -46,6 +62,20 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
46
62
|
rightShadow: -1, //右阴影个数
|
|
47
63
|
toolbarKey: 0,
|
|
48
64
|
downloadUrl: '',
|
|
65
|
+
_scripts: null,
|
|
66
|
+
get scripts() {
|
|
67
|
+
if (rtn._scripts !== null) {
|
|
68
|
+
return rtn._scripts;
|
|
69
|
+
} else {
|
|
70
|
+
if (typeof source.scripts !== 'undefined') {
|
|
71
|
+
rtn._scripts = base.common.eval(source.scripts);
|
|
72
|
+
return rtn._scripts;
|
|
73
|
+
} else {
|
|
74
|
+
rtn._scripts = {};
|
|
75
|
+
return rtn._scripts;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
49
79
|
//列表标题
|
|
50
80
|
get title() {
|
|
51
81
|
return source.content.title;
|
|
@@ -576,13 +606,13 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
576
606
|
//设置行样式
|
|
577
607
|
setStyleRow(rows) {
|
|
578
608
|
rows.forEach((row) => {
|
|
579
|
-
if (!row.rowStyle) {
|
|
609
|
+
if (!row.rowStyle) {
|
|
580
610
|
row.rowStyle = "";
|
|
581
611
|
}
|
|
582
612
|
if (rtn.rowColorColumn && row[rtn.rowColorColumn]) {
|
|
583
613
|
row.rowStyle = row.rowStyle + "color:" + row[rtn.rowColorColumn] + ";";
|
|
584
614
|
}
|
|
585
|
-
|
|
615
|
+
if (row.flagDrag && row.flagDrag == '1') {
|
|
586
616
|
row.rowStyle = row.rowStyle + "cursor:move;";
|
|
587
617
|
}
|
|
588
618
|
});
|
|
@@ -1076,7 +1106,7 @@ function doAction(response, model) {
|
|
|
1076
1106
|
model.dataDictionary = response.content;
|
|
1077
1107
|
|
|
1078
1108
|
model.source.page.rows = model.source.page.rows + response.content.length;
|
|
1079
|
-
model.setRow(
|
|
1109
|
+
model.setRow(model.listData);
|
|
1080
1110
|
if (!common.flagApp()) {
|
|
1081
1111
|
model.$vue.calculatingRowHeight();
|
|
1082
1112
|
model.$vue.emit("searchComplate");
|
|
@@ -1095,10 +1125,10 @@ function doAction(response, model) {
|
|
|
1095
1125
|
if (response.content && Array.isArray(response.content)) {
|
|
1096
1126
|
response.content.forEach((row) => {
|
|
1097
1127
|
for (var vkey in row) {
|
|
1098
|
-
model.dataDictionary[row[model.
|
|
1128
|
+
model.dataDictionary[row[model.primaryFieldName]][vkey] = row[vkey];
|
|
1099
1129
|
}
|
|
1100
1130
|
});
|
|
1101
|
-
model.setRow(
|
|
1131
|
+
model.setRow(model.listData);
|
|
1102
1132
|
}
|
|
1103
1133
|
else {
|
|
1104
1134
|
model.$vue.updateCurrentRow({ flagFreshCurrentRow: true }, { responseData: response });
|
|
@@ -1124,7 +1154,7 @@ function doAction(response, model) {
|
|
|
1124
1154
|
|
|
1125
1155
|
case Enum.ActionType.Replace: //替换
|
|
1126
1156
|
if (response.content && Array.isArray(response.content)) {
|
|
1127
|
-
delete model.dataDictionary[
|
|
1157
|
+
delete model.dataDictionary[model.listData[model.selectIndex][model.primaryFieldName]];
|
|
1128
1158
|
response.content.forEach((row) => {
|
|
1129
1159
|
model.listData.splice(model.selectIndex, 1, row);
|
|
1130
1160
|
});
|
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-7acf3f06-c2ea-471c-a5fa-07e1c2a81728"}',
|
|
67
|
-
authObject: '{EmpID:"
|
|
67
|
+
authObject: '{EmpID:"Token_0f977713-7a8d-420b-9536-967f8c8183c7",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_0f977713-7a8d-420b-9536-967f8c8183c7",Platform:"WEB"}',
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
package/src/utils/mixins.js
CHANGED
|
@@ -125,6 +125,7 @@ function validExcuteMessage(validtemp, model) {
|
|
|
125
125
|
|
|
126
126
|
//路由操作事件
|
|
127
127
|
export function RouterClickHandler(field, submitData, action, model, source, callBack) {
|
|
128
|
+
debugger
|
|
128
129
|
if (source == 'form') {
|
|
129
130
|
model.scripts.$fd = field.id;
|
|
130
131
|
model.scripts.$result = [];
|
|
@@ -876,7 +877,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
876
877
|
}
|
|
877
878
|
model.$vue.updateCurrentRow(field, res);
|
|
878
879
|
}
|
|
879
|
-
});
|
|
880
|
+
}, model.scripts);
|
|
880
881
|
}).catch(() => {
|
|
881
882
|
});
|
|
882
883
|
}
|
|
@@ -1599,6 +1600,7 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
|
|
|
1599
1600
|
cancelButtonText: '取消',
|
|
1600
1601
|
type: 'warning'
|
|
1601
1602
|
}).then(() => {
|
|
1603
|
+
|
|
1602
1604
|
submitData.flagHaveAlert = '1';
|
|
1603
1605
|
field.doAction(submitData, (res) => {
|
|
1604
1606
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|