centaline-data-driven-v3 0.0.64 → 0.0.66
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 +82 -82
- package/package.json +2 -2
- package/src/assets/commonWeb.css +1 -45
- package/src/components/app/PhotoSelectList.vue +3 -1
- package/src/components/app/ViewerFile.vue +8 -7
- package/src/components/web/Button.vue +65 -8
- package/src/components/web/ComboBox.vue +2 -2
- package/src/components/web/Form.vue +157 -11
- package/src/components/web/FormList.vue +33 -2
- package/src/components/web/SearchList/SearchTable.vue +12 -3
- package/src/components/web/SearchScreen.vue +13 -4
- package/src/components/web/SensitiveEye.vue +3 -2
- package/src/components/web/TextBox.vue +11 -5
- package/src/loader/src/Button.js +6 -6
- package/src/loader/src/Field.js +1 -1
- package/src/loader/src/Form.js +4 -1
- package/src/loader/src/FormList.js +7 -1
- package/src/loader/src/SearchScreen.js +10 -10
- package/src/loader/src/SearchTable.js +5 -2
- package/src/main.js +5 -5
- package/src/utils/common.js +0 -1
- package/src/utils/mixins.js +11 -13
- package/src/views/SearchList.vue +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "centaline-data-driven-v3",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.66",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "centaline-data-driven-v3",
|
|
6
6
|
"main": "dist/centaline-data-driven-v3.umd.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"moment": "^2.30.1",
|
|
17
17
|
"photo-sphere-viewer": "^4.8.1",
|
|
18
18
|
"sortablejs": "^1.15.6",
|
|
19
|
-
"vant": "^4.8.0",
|
|
19
|
+
"vant": "^4.8.0",
|
|
20
20
|
"vite-plugin-css-injected-by-js": "^3.3.0",
|
|
21
21
|
"vue": "^3.3.4",
|
|
22
22
|
"vue-cropper": "^1.1.1",
|
package/src/assets/commonWeb.css
CHANGED
|
@@ -358,50 +358,6 @@ body {
|
|
|
358
358
|
color: var(--centalineBlack);
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
/* 查询搜索 */
|
|
362
|
-
.search-btn,
|
|
363
|
-
.more-btn {
|
|
364
|
-
height: 26px;
|
|
365
|
-
background: var(--chinaRed) !important;
|
|
366
|
-
border-color: var(--chinaRed) !important;
|
|
367
|
-
box-shadow: 0px 2px 4px 0px rgba(238, 107, 107, 0.25);
|
|
368
|
-
border-radius: 6px;
|
|
369
|
-
color: #fff !important;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
/* 重置按钮 更多按钮*/
|
|
373
|
-
.reset-btn {
|
|
374
|
-
height: 26px;
|
|
375
|
-
background: #FFFFFF !important;
|
|
376
|
-
border-color: var(--chinaRed) !important;
|
|
377
|
-
border-radius: 6px;
|
|
378
|
-
color: var(--chinaRed) !important;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/* 搜索按钮,重置按钮和更多按钮的hover */
|
|
382
|
-
.search-btn:hover,
|
|
383
|
-
.reset-btn:hover,
|
|
384
|
-
.more-btn:hover {
|
|
385
|
-
background-color: var(--btnHoverRed) !important;
|
|
386
|
-
border-color: var(--btnHoverRed) !important;
|
|
387
|
-
color: #fff !important;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.more-btn:hover .open,
|
|
391
|
-
.more-btn:hover .fold {
|
|
392
|
-
background-color: var(--btnHoverRed) !important;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.search-btn:active,
|
|
396
|
-
.search-btn:focus,
|
|
397
|
-
.reset-btn:active.reset-btn:focus,
|
|
398
|
-
.more-btn:active.more-btn:focus {
|
|
399
|
-
background-color: var(--btnFocusRed);
|
|
400
|
-
border-color: var(--btnFocusRed);
|
|
401
|
-
color: #fff !important;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
|
|
405
361
|
.subdiv_allinline {
|
|
406
362
|
margin: 0;
|
|
407
363
|
padding: 0;
|
|
@@ -1067,7 +1023,7 @@ body {
|
|
|
1067
1023
|
.el-tag--small {
|
|
1068
1024
|
height: auto;
|
|
1069
1025
|
line-height: 16px;
|
|
1070
|
-
padding: 3px
|
|
1026
|
+
padding: 3px 5px;
|
|
1071
1027
|
}
|
|
1072
1028
|
|
|
1073
1029
|
.el-checkbox.el-checkbox--small {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div style="display: flex;" v-for="(item, index) in imageList" :key="index">
|
|
12
12
|
<van-checkbox style="margin: 0 5px;" @change="choose(item, true)" v-model="item.ischeck"
|
|
13
13
|
shape="square" icon-size="14px"></van-checkbox>
|
|
14
|
-
<ct-layout :vmodel="item" :cellLayout="layout" :rowindex="index" :flagMediaSelect="true"
|
|
14
|
+
<ct-layout :vmodel="item" :cellLayout="layout" :key="itemKey" :rowindex="index" :flagMediaSelect="true"
|
|
15
15
|
@rolRouterclick="rolRouterCellClickHandler">
|
|
16
16
|
</ct-layout>
|
|
17
17
|
</div>
|
|
@@ -85,6 +85,7 @@ const allcheck = ref(false)
|
|
|
85
85
|
const formHeight = ref(0)
|
|
86
86
|
const paramName = ref('')
|
|
87
87
|
const showPicker = ref(false)
|
|
88
|
+
const itemKey = ref(0)
|
|
88
89
|
const mediaLabelID = ref('')
|
|
89
90
|
const mediaLabelName = ref('全部')
|
|
90
91
|
const options = ref([])
|
|
@@ -145,6 +146,7 @@ function load(data) {
|
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
148
|
formHeight.value = window.innerHeight - 110
|
|
149
|
+
itemKey.value = Math.random()
|
|
148
150
|
closeToast()
|
|
149
151
|
} catch (e) {
|
|
150
152
|
ElMessage({
|
|
@@ -14,25 +14,27 @@
|
|
|
14
14
|
<div class="cont" v-if="file.mediaUrl">
|
|
15
15
|
<div style="padding-right:10px;">
|
|
16
16
|
<div class="enlarge-picture " v-if="file.mediaLabelName">
|
|
17
|
-
<span class="" style="width:80px;">{{common.LocalizedString('附件类型','附件類型')}} : </span>
|
|
17
|
+
<span class="" style="width:80px;">{{ common.LocalizedString('附件类型', '附件類型') }} : </span>
|
|
18
18
|
<span style="font-weight: bold;flex: 1;">{{ file.mediaLabelName }}</span>
|
|
19
19
|
</div>
|
|
20
20
|
<div class="enlarge-picture" v-if="file.mediaDescCN">
|
|
21
|
-
<span style="width:80px;">{{common.LocalizedString('中文描述','中文描述')}} : </span>
|
|
21
|
+
<span style="width:80px;">{{ common.LocalizedString('中文描述', '中文描述') }} : </span>
|
|
22
22
|
<span style="font-weight: bold;flex: 1;">{{ file.mediaDescCN }}</span>
|
|
23
23
|
</div>
|
|
24
24
|
<div class="enlarge-picture" v-if="file.mediaDescEN">
|
|
25
|
-
<span style="width:80px;">{{common.LocalizedString('英文描述','英文描述')}} : </span>
|
|
25
|
+
<span style="width:80px;">{{ common.LocalizedString('英文描述', '英文描述') }} : </span>
|
|
26
26
|
<span style="font-weight: bold;flex: 1;">{{ file.mediaDescEN }}</span>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="enlarge-picture" v-if="file.mediaUploadEmployeeDesc">
|
|
29
|
-
<span style="width:80px;">{{common.LocalizedString('来源描述','來源描述')}} : </span>
|
|
29
|
+
<span style="width:80px;">{{ common.LocalizedString('来源描述', '來源描述') }} : </span>
|
|
30
30
|
<span style="font-weight: bold;flex: 1;">{{ file.mediaUploadEmployeeDesc }}</span>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
<template v-if="file.mediaTypeID == '1'">
|
|
35
|
-
<iframe :src="file.mediaUrl" height="100%" width="100%" style="border-width: 0px;"
|
|
35
|
+
<iframe :src="file.mediaUrl" height="100%" width="100%" style="border-width: 0px;"
|
|
36
|
+
allow="autoplay; fullscreen" allowfullscreen playsinline
|
|
37
|
+
sandbox="allow-scripts allow-same-origin">
|
|
36
38
|
</iframe>
|
|
37
39
|
</template>
|
|
38
40
|
<!--Photo-->
|
|
@@ -172,8 +174,6 @@ function onswipenext() {
|
|
|
172
174
|
width: 100%;
|
|
173
175
|
touch-action: none;
|
|
174
176
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
177
|
</style>
|
|
178
178
|
<style scoped>
|
|
179
179
|
.viewerContent {
|
|
@@ -184,6 +184,7 @@ function onswipenext() {
|
|
|
184
184
|
justify-content: center;
|
|
185
185
|
|
|
186
186
|
}
|
|
187
|
+
|
|
187
188
|
.cont {
|
|
188
189
|
position: absolute;
|
|
189
190
|
z-index: 100000000000000;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
17
17
|
@click="clickHandle">{{ model.controlLabel }}</el-link>
|
|
18
18
|
<el-upload v-else-if="model.isImport" :action="model.action" :data="uploadData" :headers="headers" :multiple="false"
|
|
19
|
-
:show-file-list="false" :on-success="handleAvatarSuccess" :on-error="handleAvatarError">
|
|
19
|
+
:show-file-list="false" :on-success="handleAvatarSuccess" :on-error="handleAvatarError" :before-upload="handleAvatarBeforeUpload">
|
|
20
20
|
<el-button type="primary" v-bind="model.attrs"
|
|
21
21
|
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
22
22
|
:disabled="model.disabled || model.locked">
|
|
@@ -80,13 +80,14 @@ const uploadData = computed(() => {
|
|
|
80
80
|
//因传输方式是FormData,故需要对Value是object的进行转化
|
|
81
81
|
let data = {};
|
|
82
82
|
for (var key in props.fileData) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
if (typeof props.fileData[key] === "object") {
|
|
84
|
+
data[key] = JSON.stringify(props.fileData[key]);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
data[key] = props.fileData[key];
|
|
88
|
+
}
|
|
89
89
|
}
|
|
90
|
+
data.flagHaveAlert=0;
|
|
90
91
|
return data;
|
|
91
92
|
})
|
|
92
93
|
const headers = computed(() => {
|
|
@@ -96,8 +97,21 @@ function clickHandle() {
|
|
|
96
97
|
emit('fieldClick', model.value);
|
|
97
98
|
}
|
|
98
99
|
|
|
100
|
+
function handleAvatarBeforeUpload(file) {
|
|
101
|
+
if(model.value.form && model.value.form.$vue){
|
|
102
|
+
let submitData = model.value.form.$vue.getFileData(model.value);
|
|
103
|
+
for (var key in submitData) {
|
|
104
|
+
if (typeof submitData[key] === "object") {
|
|
105
|
+
uploadData.value[key] = JSON.stringify(submitData[key]);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
uploadData.value[key] = submitData[key];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
99
113
|
function handleAvatarSuccess(res) {
|
|
100
|
-
|
|
114
|
+
emit('importComplete', res, model.value);
|
|
101
115
|
}
|
|
102
116
|
function handleAvatarError(info) {
|
|
103
117
|
ElMessage({
|
|
@@ -123,4 +137,47 @@ function commandClick(code) {
|
|
|
123
137
|
color: var(--chinaRed);
|
|
124
138
|
font-weight: 700;
|
|
125
139
|
}
|
|
140
|
+
/* 查询搜索 */
|
|
141
|
+
.search-btn,
|
|
142
|
+
.more-btn {
|
|
143
|
+
height: 26px;
|
|
144
|
+
background: var(--chinaRed);
|
|
145
|
+
border-color: var(--chinaRed);
|
|
146
|
+
box-shadow: 0px 2px 4px 0px rgba(238, 107, 107, 0.25);
|
|
147
|
+
border-radius: 6px;
|
|
148
|
+
color: #fff;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* 重置按钮 更多按钮*/
|
|
152
|
+
.reset-btn {
|
|
153
|
+
height: 26px;
|
|
154
|
+
background: #FFFFFF;
|
|
155
|
+
border-color: var(--chinaRed);
|
|
156
|
+
border-radius: 6px;
|
|
157
|
+
color: var(--chinaRed);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* 搜索按钮,重置按钮和更多按钮的hover */
|
|
161
|
+
.search-btn:hover,
|
|
162
|
+
.reset-btn:hover,
|
|
163
|
+
.more-btn:hover {
|
|
164
|
+
background-color: var(--btnHoverRed);
|
|
165
|
+
border-color: var(--btnHoverRed);
|
|
166
|
+
color: #fff;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.more-btn:hover .open,
|
|
170
|
+
.more-btn:hover .fold {
|
|
171
|
+
background-color: var(--btnHoverRed);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.search-btn:active,
|
|
175
|
+
.search-btn:focus,
|
|
176
|
+
.reset-btn:active.reset-btn:focus,
|
|
177
|
+
.more-btn:active.more-btn:focus {
|
|
178
|
+
background-color: var(--btnFocusRed);
|
|
179
|
+
border-color: var(--btnFocusRed);
|
|
180
|
+
color: #fff;
|
|
181
|
+
}
|
|
182
|
+
|
|
126
183
|
</style>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</el-tooltip>
|
|
14
14
|
</template>
|
|
15
15
|
<template #prefix
|
|
16
|
-
v-if="(model.isList && model.value && !model.multiple) || (model.multiple && model.isList && model.labelValue && model.labelValue.length > 0 && model.placeholder)">
|
|
16
|
+
v-if="((model.isList && model.value && !model.multiple) || (model.multiple && model.isList && model.labelValue && model.labelValue.length > 0 && model.placeholder)) && model.prefix">
|
|
17
17
|
<span>{{ model.prefix }}</span>
|
|
18
18
|
</template>
|
|
19
19
|
<template #tag>
|
|
@@ -181,7 +181,7 @@ function setminWidth() {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
|
|
185
185
|
let span = document.createElement('span');
|
|
186
186
|
span.innerText = text;
|
|
187
187
|
span.style.whiteSpace = 'nowrap';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div ref="refForm" v-loading="loading">
|
|
2
|
+
<div ref="refForm" v-loading="loading" :style="{'min-height': minHeight}">
|
|
3
3
|
<div v-if="model !== null && !loading" class="ct-form">
|
|
4
4
|
<el-affix target=".ct-form" v-if="model.tip" :offset="62">
|
|
5
5
|
<div class="ct-form-tip">
|
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
16
16
|
<el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
17
17
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
18
|
-
:parameterAction="model.parameterAction" v-bind="col.bindPara"
|
|
18
|
+
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
19
|
+
@change="changeHandler" @importComplete="importComplete"
|
|
19
20
|
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
|
|
20
|
-
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
21
|
+
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
21
22
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
22
23
|
</component>
|
|
23
24
|
</el-col>
|
|
@@ -30,7 +31,8 @@
|
|
|
30
31
|
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
31
32
|
<el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
32
33
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
33
|
-
:parameterAction="model.parameterAction" v-bind="col.bindPara"
|
|
34
|
+
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
35
|
+
@change="changeHandler" @importComplete="importComplete"
|
|
34
36
|
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
|
|
35
37
|
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
36
38
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
@@ -49,9 +51,9 @@
|
|
|
49
51
|
v-if="col.show !== false && col.lineFeed"></div>
|
|
50
52
|
<el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px">
|
|
51
53
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
52
|
-
:parameterAction="model.parameterAction" v-bind="col.bindPara"
|
|
54
|
+
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
53
55
|
@change="changeHandler" @fieldClick="fieldClickHandler"
|
|
54
|
-
@popupSearchList="popupSearchListHandler"
|
|
56
|
+
@popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
55
57
|
@popupGroupList="popupGroupListHandler" @tableButtonClick="clickHandler"
|
|
56
58
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
57
59
|
</component>
|
|
@@ -80,9 +82,9 @@
|
|
|
80
82
|
v-if="col.show !== false && col.lineFeed"></div>
|
|
81
83
|
<el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px">
|
|
82
84
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
83
|
-
:parameterAction="model.parameterAction" v-bind="col.bindPara"
|
|
85
|
+
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
84
86
|
@change="changeHandler" @fieldClick="fieldClickHandler"
|
|
85
|
-
@popupSearchList="popupSearchListHandler"
|
|
87
|
+
@popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
86
88
|
@popupGroupList="popupGroupListHandler" @tableButtonClick="clickHandler"
|
|
87
89
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
88
90
|
</component>
|
|
@@ -98,8 +100,8 @@
|
|
|
98
100
|
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
99
101
|
<el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
100
102
|
<component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="model.parameterAction"
|
|
101
|
-
v-bind="col.bindPara" @change="changeHandler" :key="itemKey"
|
|
102
|
-
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
|
|
103
|
+
v-bind="col.bindPara" @change="changeHandler" :key="itemKey" :fileData="getFileData(col)"
|
|
104
|
+
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
103
105
|
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
104
106
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
105
107
|
</component>
|
|
@@ -136,7 +138,7 @@
|
|
|
136
138
|
</div>
|
|
137
139
|
</template>
|
|
138
140
|
<script lang="ts" setup>
|
|
139
|
-
import { ref, nextTick, onUpdated } from 'vue'
|
|
141
|
+
import { ref, nextTick, onUpdated,onDeactivated , onMounted } from 'vue'
|
|
140
142
|
import { RouterClickHandler } from '../../utils/mixins';
|
|
141
143
|
import common from '../../utils/common'
|
|
142
144
|
import Form from '../../loader/src/Form'
|
|
@@ -203,11 +205,18 @@ const Fields = ref()
|
|
|
203
205
|
const refForm = ref()
|
|
204
206
|
const qrtimer = ref(null)
|
|
205
207
|
const downloadUrl = ref('')
|
|
208
|
+
const minHeight = ref('auto')
|
|
206
209
|
onUpdated(() => {
|
|
207
210
|
nextTick(() => {
|
|
208
211
|
qrtimer.value = setTimeout(getisScroll, 100);
|
|
209
212
|
});
|
|
210
213
|
})
|
|
214
|
+
onDeactivated(() => {
|
|
215
|
+
downloadUrl.value=''
|
|
216
|
+
})
|
|
217
|
+
onMounted(() => {
|
|
218
|
+
setCss();
|
|
219
|
+
})
|
|
211
220
|
init()
|
|
212
221
|
//初始化数据
|
|
213
222
|
function init() {
|
|
@@ -383,7 +392,139 @@ function changeCallBackHandler(field, callBackFunName, callBackPara) {
|
|
|
383
392
|
common.excuteFunStr.call(model.value.scripts, callBackFunName, callBackPara);
|
|
384
393
|
}
|
|
385
394
|
}
|
|
395
|
+
//导入
|
|
396
|
+
function importComplete(res, field) {
|
|
397
|
+
if (res && res.rtnCode && res.rtnCode === 201) {
|
|
398
|
+
if (res.rtnMsg) {
|
|
399
|
+
ElMessage({
|
|
400
|
+
message: res.rtnMsg,
|
|
401
|
+
type: 'warning',
|
|
402
|
+
showClose: true,
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
else if (res && res.rtnCode && res.rtnCode === 202 && res.rtnMsg) {
|
|
408
|
+
common.confirm(res.rtnMsg, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
386
409
|
|
|
410
|
+
})
|
|
411
|
+
.catch(() => {
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
if (field.flagAsync) {
|
|
415
|
+
if (res.rtnCode && res.rtnCode === 202 && res.rtnMsg) {
|
|
416
|
+
common.confirm(res.rtnMsg, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
417
|
+
if (res.content && res.content.action) {
|
|
418
|
+
var dialogOption = {
|
|
419
|
+
title: field.pageTitle || field.label,
|
|
420
|
+
content: [{
|
|
421
|
+
component: 'ct-progress',
|
|
422
|
+
width: '350px',
|
|
423
|
+
height: '165px',
|
|
424
|
+
attrs: {
|
|
425
|
+
progressAction: res.content.action,
|
|
426
|
+
progressKey: res.content.key,
|
|
427
|
+
progressType: 'import',
|
|
428
|
+
onFinished(data) {
|
|
429
|
+
common.closeDialog(dialogOption);
|
|
430
|
+
if (field.isExport) {
|
|
431
|
+
if (data.content.indexOf(".zip") > -1) {
|
|
432
|
+
window.location.href = encodeURI(data.content);
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
if (data.content.indexOf("?") > -1) {
|
|
436
|
+
downloadUrl.value = data.content + "&" + Math.random();
|
|
437
|
+
}
|
|
438
|
+
else {
|
|
439
|
+
downloadUrl.value = data.content + "?" + Math.random();
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
if (data.rtnMsg) {
|
|
444
|
+
ElMessage({
|
|
445
|
+
message: data.rtnMsg,
|
|
446
|
+
type: 'success',
|
|
447
|
+
showClose: true,
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
getPage(1, false);
|
|
451
|
+
},
|
|
452
|
+
onError(data) {
|
|
453
|
+
common.closeDialog(dialogOption);
|
|
454
|
+
ElMessage({
|
|
455
|
+
message: data.rtnMsg,
|
|
456
|
+
type: 'warning',
|
|
457
|
+
showClose: true,
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
}]
|
|
462
|
+
};
|
|
463
|
+
common.openDialog(dialogOption);
|
|
464
|
+
}
|
|
465
|
+
})
|
|
466
|
+
.catch(() => { });
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
if (res.content && res.content.action) {
|
|
470
|
+
var dialogOption = {
|
|
471
|
+
title: field.pageTitle || field.label,
|
|
472
|
+
content: [{
|
|
473
|
+
component: 'ct-progress',
|
|
474
|
+
width: '350px',
|
|
475
|
+
height: '165px',
|
|
476
|
+
attrs: {
|
|
477
|
+
progressAction: res.content.action,
|
|
478
|
+
progressKey: res.content.key,
|
|
479
|
+
progressType: 'import',
|
|
480
|
+
onFinished(data) {
|
|
481
|
+
common.closeDialog(dialogOption);
|
|
482
|
+
if (field.isExport) {
|
|
483
|
+
if (data.content.indexOf(".zip") > -1) {
|
|
484
|
+
window.location.href = encodeURI(data.content);
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
if (data.content.indexOf("?") > -1) {
|
|
488
|
+
downloadUrl.value = data.content + "&" + Math.random();
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
downloadUrl.value = data.content + "?" + Math.random();
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
if (data.rtnMsg) {
|
|
496
|
+
ElMessage({
|
|
497
|
+
message: data.rtnMsg,
|
|
498
|
+
type: 'success',
|
|
499
|
+
showClose: true,
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
getPage(1, false);
|
|
503
|
+
},
|
|
504
|
+
onError(data) {
|
|
505
|
+
common.closeDialog(dialogOption);
|
|
506
|
+
ElMessage({
|
|
507
|
+
message: data.rtnMsg,
|
|
508
|
+
type: 'warning',
|
|
509
|
+
showClose: true,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
}]
|
|
514
|
+
};
|
|
515
|
+
common.openDialog(dialogOption);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
if (field && field.callBackFunName) {
|
|
521
|
+
changeCallBackHandler(field, field.callBackFunName, res.content);
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
model.doAction(res)
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
387
528
|
//弹出选择列表
|
|
388
529
|
function popupSearchListHandler(singleSelectio, field, router, callBack) {
|
|
389
530
|
Form.popupSearchListHandler(singleSelectio, field, router, model.value, Fields.value, props, callBack)
|
|
@@ -398,4 +539,9 @@ function flagNotificationParentAfterContentChanged() {
|
|
|
398
539
|
function updateFields(data) {
|
|
399
540
|
Form.updateFields(data, model.value)
|
|
400
541
|
}
|
|
542
|
+
function setCss() {
|
|
543
|
+
if (props.topHeight > -1) {
|
|
544
|
+
minHeight.value = (document.documentElement.clientHeight - props.topHeight - 20) + 'px';
|
|
545
|
+
}
|
|
546
|
+
}
|
|
401
547
|
</script>
|
|
@@ -78,6 +78,35 @@
|
|
|
78
78
|
</div>
|
|
79
79
|
<el-table :data="model.tableData" border :show-summary="model.showSummary"
|
|
80
80
|
:summary-method="getSummaries" style="width: 100%" highlight-current-row>
|
|
81
|
+
<template v-if="model.rowActionRoutersAlign === 1">
|
|
82
|
+
<el-table-column label="操作"
|
|
83
|
+
v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :width="'100%'">
|
|
84
|
+
<template #header="{ column, $index }">
|
|
85
|
+
{{ setcolumnminWidth(column) }}
|
|
86
|
+
<span style="width:auto; white-space: nowrap;">{{ column.label }}</span>
|
|
87
|
+
</template>
|
|
88
|
+
<template #default="scope">
|
|
89
|
+
<el-tag :disable-transitions="true" v-if="scope.row.edit || scope.row.isSet" type="success"
|
|
90
|
+
@click="saveRow(scope.row, scope.$index, true)" style="cursor: pointer;">{{
|
|
91
|
+
scope.row.isSet
|
|
92
|
+
?
|
|
93
|
+
'保存' :
|
|
94
|
+
"修改" }}</el-tag>
|
|
95
|
+
<el-tag :disable-transitions="true" v-if="scope.row.delete && !scope.row.isSet"
|
|
96
|
+
style="cursor: pointer;" type="danger"
|
|
97
|
+
@click="deleteRow(scope.$index, scope.row.$sourceIndex)">删除</el-tag>
|
|
98
|
+
<el-tag :disable-transitions="true" v-else-if="scope.row.isSet"
|
|
99
|
+
@click="saveRow(scope.row, scope.$index, false)" style="cursor: pointer;">取消</el-tag>
|
|
100
|
+
<template v-for="(v, i) in model.buttons">
|
|
101
|
+
<el-tag
|
|
102
|
+
v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
|
|
103
|
+
style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }} 1</el-tag>
|
|
104
|
+
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
</template>
|
|
108
|
+
</el-table-column>
|
|
109
|
+
</template>
|
|
81
110
|
<template v-for="(v, i) in model.rows[0].field" :key="i">
|
|
82
111
|
<el-table-column :prop="v.fieldName1" :label="v.controlLabel" :width="v.width"
|
|
83
112
|
:fixed="model.frozenColumns.includes(v.fieldName1)"
|
|
@@ -107,7 +136,8 @@
|
|
|
107
136
|
</template>
|
|
108
137
|
</el-table-column>
|
|
109
138
|
</template>
|
|
110
|
-
<
|
|
139
|
+
<template v-if="model.rowActionRoutersAlign !== 1">
|
|
140
|
+
<el-table-column label="操作"
|
|
111
141
|
v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :width="'100%'">
|
|
112
142
|
<template #header="{ column, $index }">
|
|
113
143
|
{{ setcolumnminWidth(column) }}
|
|
@@ -133,7 +163,8 @@
|
|
|
133
163
|
</template>
|
|
134
164
|
|
|
135
165
|
</template>
|
|
136
|
-
|
|
166
|
+
</el-table-column>
|
|
167
|
+
</template>
|
|
137
168
|
<template #empty>
|
|
138
169
|
{{ common.LocalizedString('暂无数据', '暫無數據') }}
|
|
139
170
|
</template>
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
</div>
|
|
230
230
|
</template>
|
|
231
231
|
<script setup lang="ts">
|
|
232
|
-
import { ref, nextTick, onActivated } from 'vue'
|
|
232
|
+
import { ref, nextTick, onActivated, onDeactivated } from 'vue'
|
|
233
233
|
import common from '../../../utils/common'
|
|
234
234
|
import request from '../../../utils/request'
|
|
235
235
|
import SearchStats from './SearchStats.vue';
|
|
@@ -349,6 +349,9 @@ onActivated(() => {
|
|
|
349
349
|
setTableHeight();
|
|
350
350
|
})
|
|
351
351
|
})
|
|
352
|
+
onDeactivated(() => {
|
|
353
|
+
downloadUrl.value=''
|
|
354
|
+
})
|
|
352
355
|
|
|
353
356
|
//查询数据
|
|
354
357
|
function searchComplate(m, defaultSearch) {
|
|
@@ -585,13 +588,19 @@ function importComplete(res, field) {
|
|
|
585
588
|
}
|
|
586
589
|
else {
|
|
587
590
|
if (field && field.callBackFunName) {
|
|
588
|
-
|
|
591
|
+
changeCallBackHandler(field, field.callBackFunName, res.content);
|
|
589
592
|
}
|
|
590
593
|
else {
|
|
591
|
-
|
|
594
|
+
doAction(res)
|
|
592
595
|
}
|
|
593
596
|
}
|
|
594
597
|
}
|
|
598
|
+
function changeCallBackHandler(field, callBackFunName, callBackPara) {
|
|
599
|
+
if (callBackFunName) {
|
|
600
|
+
model.value.scripts.$fd = field.id;
|
|
601
|
+
common.excuteFunStr.call(model.value.scripts, callBackFunName, callBackPara);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
595
604
|
//计算数据合并行
|
|
596
605
|
function tdRowspan(column, row) {
|
|
597
606
|
if (!column.show) {
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
50
|
<iframe :src="downloadUrl"
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
style="height:0px;width:0px;border-width: 0px;position: absolute;bottom: 0px;display: none;">
|
|
52
|
+
</iframe>
|
|
53
53
|
</div>
|
|
54
54
|
</template>
|
|
55
55
|
<script setup lang="ts">
|
|
56
|
-
import { ref, nextTick } from 'vue'
|
|
56
|
+
import { ref, nextTick, onDeactivated } from 'vue'
|
|
57
57
|
import SearchScreen from '../../loader/src/SearchScreen'
|
|
58
58
|
import Form from '../../loader/src/Form'
|
|
59
59
|
import Enum from '../../utils/Enum'
|
|
@@ -86,6 +86,11 @@ const highScreen = ref(false)
|
|
|
86
86
|
const model = ref({ searchData: {} })
|
|
87
87
|
const Fields = ref()
|
|
88
88
|
const downloadUrl = ref('')
|
|
89
|
+
|
|
90
|
+
onDeactivated(() => {
|
|
91
|
+
downloadUrl.value = ''
|
|
92
|
+
})
|
|
93
|
+
|
|
89
94
|
searchComplate()
|
|
90
95
|
//初始化数据
|
|
91
96
|
function searchComplate(flagLoad) {
|
|
@@ -173,11 +178,15 @@ function searchHandler(field) {
|
|
|
173
178
|
//组件数据验证
|
|
174
179
|
function validExcute() {
|
|
175
180
|
var rtnBool = true;
|
|
181
|
+
var i = 0;
|
|
176
182
|
if (Fields.value) {
|
|
177
183
|
Fields.value.forEach((f) => {
|
|
178
184
|
if (f.model && typeof f.model.validExcute !== 'undefined') {
|
|
179
185
|
if (!f.model.validExcute()) {
|
|
180
|
-
|
|
186
|
+
if (i === 0) {
|
|
187
|
+
common.message(f.model.displayValidMessage)
|
|
188
|
+
}
|
|
189
|
+
i++
|
|
181
190
|
rtnBool = false;
|
|
182
191
|
}
|
|
183
192
|
}
|