centaline-data-driven-v3 0.0.49 → 0.0.51
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 +88 -83
- package/package.json +2 -1
- package/src/components/app/PhotoSelect.vue +41 -34
- package/src/components/app/SearchList/SearchTable.vue +5 -3
- package/src/components/web/ComboBox.vue +1 -0
- package/src/components/web/File.vue +1 -1
- package/src/components/web/TreeList.vue +6 -11
- package/src/components/web/ViewerFile/ViewerPDFjs.vue +24 -4
- package/src/main.js +1 -1
- package/src/views/SearchList.vue +2 -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.51",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "centaline-data-driven-v3",
|
|
6
6
|
"main": "dist/centaline-data-driven-v3.umd.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"element-plus": "^2.5.5",
|
|
16
16
|
"moment": "^2.30.1",
|
|
17
17
|
"photo-sphere-viewer": "^4.8.1",
|
|
18
|
+
"sortablejs": "^1.15.6",
|
|
18
19
|
"vant": "^4.8.0",
|
|
19
20
|
"vite-plugin-css-injected-by-js": "^3.3.0",
|
|
20
21
|
"vue": "^3.3.4",
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="van-uploader" style="margin:10px 10px 0 10px; ">
|
|
3
3
|
<div class="van-uploader__wrapper">
|
|
4
|
-
<
|
|
5
|
-
<template
|
|
6
|
-
<div class="van-uploader__preview" style="display:inline-block;"
|
|
4
|
+
<div ref="uploadImgItem">
|
|
5
|
+
<template v-for="(element, index) in photoList" :key="element.mediaCode">
|
|
6
|
+
<div class="van-uploader__preview" style="display:inline-block;"
|
|
7
|
+
@click="viewerfile(photoList, index)">
|
|
7
8
|
<div class="van-image van-uploader__preview-image">
|
|
8
9
|
<img :src="element.thumbnailUrl" class="van-image__img" style="object-fit: cover;">
|
|
9
10
|
<div class="van-uploader__preview-cover">
|
|
10
11
|
<div class="preview-cover van-ellipsis">{{ element.mediaLabelName }}</div>
|
|
11
12
|
</div>
|
|
12
|
-
<div class="swiper-i" @click="viewerfile(photoList, index)"
|
|
13
|
+
<div class="swiper-i" @click="viewerfile(photoList, index)"
|
|
14
|
+
v-if="element.mediaTypeID == '7'">
|
|
13
15
|
<img :src="util.getAssetsImage('p3602x.png')" class="hous-icon" />
|
|
14
16
|
</div>
|
|
15
17
|
</div>
|
|
@@ -21,7 +23,7 @@
|
|
|
21
23
|
|
|
22
24
|
</div>
|
|
23
25
|
</template>
|
|
24
|
-
</
|
|
26
|
+
</div>
|
|
25
27
|
<div class="van-uploader__upload" v-if="!model.locked && photoList.length < max" @click="handleOpen()">
|
|
26
28
|
<i class="van-badge__wrapper van-icon van-icon-plus van-uploader__upload-icon"></i>
|
|
27
29
|
</div>
|
|
@@ -29,12 +31,12 @@
|
|
|
29
31
|
</div>
|
|
30
32
|
</template>
|
|
31
33
|
<script setup lang="ts">
|
|
32
|
-
import { ref, nextTick } from 'vue'
|
|
34
|
+
import { ref, nextTick, onMounted } from 'vue'
|
|
33
35
|
import { ElMessage } from 'element-plus'
|
|
34
36
|
import common from '../../utils/common'
|
|
35
37
|
import util from '../../utils/pub-use'
|
|
36
38
|
import PhotoSelect from '../../loader/src/PhotoSelect';
|
|
37
|
-
import
|
|
39
|
+
import Sortable from 'sortablejs'
|
|
38
40
|
const emit = defineEmits(['loaded'])
|
|
39
41
|
const props = defineProps({
|
|
40
42
|
vmodel: Object,
|
|
@@ -42,17 +44,11 @@ const props = defineProps({
|
|
|
42
44
|
})
|
|
43
45
|
const max = ref(99999)
|
|
44
46
|
const photoList = ref([])
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
ghostClass: "ghost",
|
|
51
|
-
dragClass: "drag",
|
|
52
|
-
chosenClass: "chosen",
|
|
53
|
-
forceFallback: true,
|
|
54
|
-
handle:'.van-uploader__preview-image',
|
|
55
|
-
}
|
|
47
|
+
const uploadImgItem = ref()
|
|
48
|
+
|
|
49
|
+
onMounted(() => {
|
|
50
|
+
initDragSort()
|
|
51
|
+
})
|
|
56
52
|
|
|
57
53
|
const model = ref()
|
|
58
54
|
init();
|
|
@@ -63,6 +59,30 @@ function init() {
|
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
}
|
|
62
|
+
const initDragSort = () => {
|
|
63
|
+
nextTick(() => {
|
|
64
|
+
// 选择包含所有可排序项目的容器
|
|
65
|
+
const el = uploadImgItem.value
|
|
66
|
+
|
|
67
|
+
// 确保 el 是一个有效的 DOM 元素
|
|
68
|
+
if (el) {
|
|
69
|
+
Sortable.create(el, {
|
|
70
|
+
group: 'shared', // 设置同一组内的元素可以互相排序
|
|
71
|
+
fallbackOnBody: false, // 如果需要的话,可以在 body 上进行拖拽
|
|
72
|
+
swapThreshold: 0.65, // 控制元素交换的阈值
|
|
73
|
+
onEnd: (/** 事件对象 */ evt) => {
|
|
74
|
+
// 获取旧的索引和新索引
|
|
75
|
+
const { oldIndex, newIndex } = evt
|
|
76
|
+
// 交换位置
|
|
77
|
+
const movedItem = photoList.value.splice(oldIndex, 1)[0]
|
|
78
|
+
photoList.value.splice(newIndex, 0, movedItem)
|
|
79
|
+
|
|
80
|
+
PhotoSelect.setfileSourceList(photoList.value, model.value);
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
}
|
|
66
86
|
|
|
67
87
|
function load(data) {
|
|
68
88
|
model.value = data;
|
|
@@ -140,22 +160,8 @@ function handleOpen() {
|
|
|
140
160
|
|
|
141
161
|
|
|
142
162
|
}
|
|
143
|
-
function onEnd(a, b) {
|
|
144
|
-
|
|
145
|
-
nextTick(function () {
|
|
146
|
-
PhotoSelect.setfileSourceList(photoList.value, model.value);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
function radiochecked(list, item) {
|
|
150
163
|
|
|
151
|
-
list.forEach((v) => {
|
|
152
|
-
v.flagDefault = false;
|
|
153
|
-
});
|
|
154
|
-
item.flagDefault = true;
|
|
155
|
-
PhotoSelect.setfileSourceList(list, model.value);
|
|
156
164
|
|
|
157
|
-
selfValidExcute("valid");
|
|
158
|
-
}
|
|
159
165
|
//不能共用的数据校验
|
|
160
166
|
function selfValidExcute(eventName) {
|
|
161
167
|
return PhotoSelect.selfValidExcute(eventName, model.value)
|
|
@@ -196,6 +202,7 @@ defineExpose({
|
|
|
196
202
|
position: absolute;
|
|
197
203
|
bottom: 0;
|
|
198
204
|
}
|
|
205
|
+
|
|
199
206
|
.swiper-i {
|
|
200
207
|
position: absolute;
|
|
201
208
|
width: 100%;
|
|
@@ -217,9 +224,9 @@ defineExpose({
|
|
|
217
224
|
transform: translate(-50%, -50%);
|
|
218
225
|
}
|
|
219
226
|
|
|
220
|
-
.van-uploader__preview-image
|
|
227
|
+
.van-uploader__preview-image,
|
|
228
|
+
.van-uploader__upload {
|
|
221
229
|
width: 110px;
|
|
222
230
|
height: 110px;
|
|
223
231
|
}
|
|
224
|
-
|
|
225
232
|
</style>
|
|
@@ -29,9 +29,11 @@
|
|
|
29
29
|
<template v-else>
|
|
30
30
|
<van-checkbox-group v-model="checkeds" ref="refCheckboxGroup">
|
|
31
31
|
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex">
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
<template v-if="isoperate || flagPopupSearchlist">
|
|
33
|
+
<van-checkbox v-if="flagSelect(row)" shape="square" checked-color="#EE6B6B"
|
|
34
|
+
icon-size="14px" :name="rowindex" @click="selectRow(row)"></van-checkbox>
|
|
35
|
+
<div class="van-checkbox" v-else></div>
|
|
36
|
+
</template>
|
|
35
37
|
<ct-layout :vmodel="row" :cellLayout="model.cellLayout" :rowindex="rowindex"
|
|
36
38
|
:key="itemKey" @rolRouterclick="rolRouterCellClickHandler"
|
|
37
39
|
:actionRouter="model.actionRouter"
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
|
|
108
108
|
<div @dragstart="drag($event, file)" @drop="drop($event, file)" @dragover.prevent
|
|
109
109
|
@dragenter="dragenter($event, file)" @dragleave="dragleave($event, file)" >
|
|
110
|
-
<el-image fit="fill"
|
|
110
|
+
<el-image fit="fill" @click="viewerfile(file)"
|
|
111
111
|
:src="file.url ? file.url : file.mediaUrl ? file.mediaUrl + '/100/100' : util.getAssetsImage('blank.png')"
|
|
112
112
|
style="width: 100px; height: 100px" :z-index="previewZIndex">
|
|
113
113
|
</el-image>
|
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
:searchDataApi="searchDataApi" :searchtreeHeight="searchtreeHeight" @loaded="loaded"></ct-tree>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
-
<div class="resizer" @mousedown="startResizing"></div>
|
|
12
11
|
</el-aside>
|
|
13
|
-
<el-main v-if="isShowMain">
|
|
14
|
-
|
|
12
|
+
<el-main v-if="isShowMain" style="position: relative;">
|
|
13
|
+
<div class="resizer" @mousedown="startResizing"></div>
|
|
15
14
|
<template v-if="pageType == 'form'">
|
|
16
15
|
<div style="height: 100%;">
|
|
17
16
|
<div class="ct-form"
|
|
@@ -171,17 +170,13 @@ onUnmounted(() => {
|
|
|
171
170
|
|
|
172
171
|
|
|
173
172
|
<style scoped>
|
|
174
|
-
|
|
175
|
-
position: relative;
|
|
176
|
-
}
|
|
177
|
-
|
|
173
|
+
|
|
178
174
|
.resizer {
|
|
179
175
|
position: absolute;
|
|
180
176
|
top: 0;
|
|
181
|
-
|
|
182
|
-
width:
|
|
177
|
+
left: 0;
|
|
178
|
+
width: 2px;
|
|
183
179
|
height: 100%;
|
|
184
|
-
cursor: ew-resize;
|
|
185
|
-
background-color: rgba(0, 0, 0, 0.2);
|
|
180
|
+
cursor: ew-resize;
|
|
186
181
|
}
|
|
187
182
|
</style>
|
|
@@ -41,10 +41,23 @@ function complete() {
|
|
|
41
41
|
|
|
42
42
|
var doc = document.getElementById("previewPdf").contentWindow.document;
|
|
43
43
|
if (doc) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
elementHideById("download", doc)
|
|
45
|
+
elementHideById("openFile", doc)
|
|
46
|
+
elementHideById("print", doc)
|
|
47
|
+
elementHideById("viewBookmark", doc)
|
|
48
|
+
|
|
49
|
+
elementHideById("editorHighlightButton", doc)
|
|
50
|
+
elementHideById("editorFreeText", doc)
|
|
51
|
+
elementHideById("editorInk", doc)
|
|
52
|
+
elementHideById("editorStamp", doc)
|
|
53
|
+
elementHideById("editorModeButtons", doc)
|
|
54
|
+
|
|
55
|
+
elementHideById("printButton", doc)
|
|
56
|
+
elementHideById("downloadButton", doc)
|
|
57
|
+
|
|
58
|
+
elementHideById("secondaryOpenFile", doc)
|
|
59
|
+
elementHideById("cursorToolButtons", doc)
|
|
60
|
+
elementHideById("documentProperties", doc)
|
|
48
61
|
doc.oncontextmenu = new Function("event.returnValue=false");
|
|
49
62
|
}
|
|
50
63
|
}
|
|
@@ -71,6 +84,13 @@ function getApplicationPath() {
|
|
|
71
84
|
}
|
|
72
85
|
return url;
|
|
73
86
|
}
|
|
87
|
+
function elementHideById(elementId, doc) {
|
|
88
|
+
if (doc.getElementById(elementId) != null) {
|
|
89
|
+
if (doc.getElementById(elementId).style) {
|
|
90
|
+
doc.getElementById(elementId).style.display = "none";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
74
94
|
watch(() => props.src, () => {
|
|
75
95
|
init(props.src);
|
|
76
96
|
//complete();
|
package/src/main.js
CHANGED
|
@@ -63,7 +63,7 @@ app.use(centaline, {
|
|
|
63
63
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
64
64
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
65
65
|
//authObject: '{token:"1647-1802885825978044416",platform:"WEB"}',
|
|
66
|
-
authObject: '{EmpID:"
|
|
66
|
+
authObject: '{EmpID:"Token_5d2d290d-98da-4c00-adef-bb975c372e46",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_5d2d290d-98da-4c00-adef-bb975c372e46",Platform:"WEB"}',
|
|
67
67
|
};
|
|
68
68
|
},
|
|
69
69
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/
|
|
4
|
-
:searchDataApi="'/
|
|
5
|
-
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
|
|
4
|
+
:searchDataApi="'/propertyTenderList/getListOfSearchModel'"></ct-searchlist>
|
|
6
5
|
<ct-dialoglist ref="dialogList"></ct-dialoglist>
|
|
7
6
|
|
|
8
7
|
</div>
|