agilebuilder-ui 1.0.70 → 1.0.71-temp8
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/lib/super-ui.css +1 -1
- package/lib/super-ui.js +44662 -42816
- package/lib/super-ui.umd.cjs +94 -86
- package/package.json +4 -2
- package/packages/department-tree/src/department-tree.vue +28 -10
- package/packages/department-tree-mobile/src/department-tree-app.vue +6 -6
- package/packages/department-user-tree/src/department-user-tree.vue +16 -2
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +6 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +410 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +484 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +140 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +220 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +249 -0
- package/packages/fs-upload-new/src/fs-button-upload.vue +9 -13
- package/packages/fs-upload-new/src/fs-drag-upload.vue +4 -8
- package/packages/fs-upload-new/src/fs-preview-new.vue +103 -36
- package/packages/fs-upload-new/src/fs-upload-new.vue +88 -8
- package/packages/super-grid/src/apis.js +6 -6
- package/packages/super-grid/src/search-button.vue +18 -14
- package/packages/super-grid/src/search-form-mobile.vue +250 -0
- package/packages/super-grid/src/search-form.vue +159 -82
- package/packages/super-grid/src/super-grid.vue +21 -5
- package/src/api/sso-service.js +25 -14
- package/src/i18n/langs/cn.js +4 -1
- package/src/i18n/langs/en.js +4 -1
- package/src/permission.js +108 -122
- package/src/styles/theme/green/sidebar.scss +11 -0
- package/src/utils/common-util.js +217 -124
- package/src/utils/i18n-util.js +127 -0
- package/src/utils/jump-page-utils.js +34 -13
- package/src/utils/permissionAuth.js +47 -8
- package/src/utils/util.js +1 -1
|
@@ -1,32 +1,65 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
<el-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="!isMobile">
|
|
4
|
+
<div v-for="(file, index) in fileList" :key="index" style="width: 100%">
|
|
5
|
+
<el-tag>
|
|
6
|
+
<el-tooltip content="预览" placement="top">
|
|
7
|
+
<span style="cursor: pointer" @click="preview(file.showName, file.serverPath)">
|
|
8
|
+
<el-icon><Paperclip /></el-icon>
|
|
9
|
+
<span style="margin-left: 6.5px">{{ file.showName }}</span>
|
|
10
|
+
</span>
|
|
11
|
+
</el-tooltip>
|
|
12
|
+
<el-tooltip v-if="!disabled" content="下载" placement="top">
|
|
13
|
+
<el-icon @click="handleDownload(file)">
|
|
14
|
+
<Download />
|
|
15
|
+
</el-icon>
|
|
16
|
+
</el-tooltip>
|
|
17
|
+
<el-tooltip v-if="!disabled" content="移除" placement="top">
|
|
18
|
+
<el-icon @click="handleOnRemove(file)"><Close /></el-icon>
|
|
19
|
+
</el-tooltip>
|
|
20
|
+
</el-tag>
|
|
21
|
+
</div>
|
|
22
22
|
</div>
|
|
23
|
+
<span v-else class="el-upload-list__item-actions mobile-item-action">
|
|
24
|
+
<span
|
|
25
|
+
v-if="isPreview(file.showName ? file.showName: file.name)"
|
|
26
|
+
class="el-upload-list__item-preview"
|
|
27
|
+
@click="preview(file.showName ? file.showName: file.name, file.serverPath)"
|
|
28
|
+
>
|
|
29
|
+
<el-icon><zoom-in /></el-icon>
|
|
30
|
+
</span>
|
|
31
|
+
<span
|
|
32
|
+
v-if="!disabled"
|
|
33
|
+
class="el-upload-list__item-delete"
|
|
34
|
+
@click="handleDownload(file)"
|
|
35
|
+
>
|
|
36
|
+
<el-icon><Download /></el-icon>
|
|
37
|
+
</span>
|
|
38
|
+
<span
|
|
39
|
+
v-if="!disabled"
|
|
40
|
+
class="el-upload-list__item-delete"
|
|
41
|
+
@click="handleOnRemove(file)"
|
|
42
|
+
>
|
|
43
|
+
<el-icon><Delete /></el-icon>
|
|
44
|
+
</span>
|
|
45
|
+
</span>
|
|
46
|
+
<el-dialog v-model="dialogVisible" title="预览" width="500">
|
|
47
|
+
<el-image :preview-src-list="previewSrcList" :src="previewImageInfo.src" />
|
|
48
|
+
</el-dialog>
|
|
49
|
+
</div>
|
|
23
50
|
</template>
|
|
24
|
-
|
|
51
|
+
<style scoped>
|
|
52
|
+
/* .el-upload-list--picture-card .el-upload-list__item-actions, */
|
|
53
|
+
.mobile-item-action {
|
|
54
|
+
z-index: 2000;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
25
57
|
<script setup lang="ts">
|
|
26
58
|
import { Close, Paperclip, Download } from '@element-plus/icons-vue'
|
|
27
59
|
import { ref, defineProps } from 'vue'
|
|
28
|
-
import { getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
|
|
60
|
+
import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getReplaceUrlDomain } from '../../../src/utils/common-util'
|
|
29
61
|
import { getToken } from '../../../src/utils/auth'
|
|
62
|
+
import { isImage } from '../../../src/utils/util'
|
|
30
63
|
const props = defineProps({
|
|
31
64
|
systemCode: {
|
|
32
65
|
type: String,
|
|
@@ -59,15 +92,24 @@ const props = defineProps({
|
|
|
59
92
|
beforeDownload: {
|
|
60
93
|
type: Function,
|
|
61
94
|
default: () => {}
|
|
95
|
+
},
|
|
96
|
+
file: {
|
|
97
|
+
type: Object,
|
|
98
|
+
default: null
|
|
99
|
+
},
|
|
100
|
+
baseURL: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: null
|
|
62
103
|
}
|
|
63
104
|
})
|
|
64
|
-
const baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
105
|
+
const baseURL = props.baseURL ? props.baseURL: window.$vueApp.config.globalProperties.baseURL
|
|
65
106
|
const baseAPI = window.$vueApp.config.globalProperties.baseAPI
|
|
66
107
|
|
|
67
108
|
const dialogVisible = ref<boolean>(false)
|
|
68
109
|
const previewImageInfo = ref<any>({})
|
|
69
110
|
const previewSrcList = ref<string[]>([])
|
|
70
|
-
|
|
111
|
+
const isMobile = ref(isMobileBrowser())
|
|
112
|
+
const emits = defineEmits(['remove'])
|
|
71
113
|
const handleDownload = (file: any) => {
|
|
72
114
|
if (isPromise(props.beforeDownload)) {
|
|
73
115
|
props.beforeDownload(props.pageContext, props.configure, file).then((res: any) => {
|
|
@@ -87,7 +129,8 @@ const handleDownload = (file: any) => {
|
|
|
87
129
|
}
|
|
88
130
|
const download = (file: any) => {
|
|
89
131
|
const token = getToken()
|
|
90
|
-
const
|
|
132
|
+
const fileName = file.showName ? file.showName: file.name
|
|
133
|
+
const showName = fileName.replace('#', '~~').replace('?', '~$').replace('&', '$')
|
|
91
134
|
let url =
|
|
92
135
|
baseURL +
|
|
93
136
|
'/common/super-form/downloads?showName=' +
|
|
@@ -109,10 +152,19 @@ const download = (file: any) => {
|
|
|
109
152
|
window.location.href = url
|
|
110
153
|
}
|
|
111
154
|
const handleOnRemove = (file: any) => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
155
|
+
let isCanRemove = true
|
|
156
|
+
if (props.beforeRemove && typeof props.beforeRemove === 'function') {
|
|
157
|
+
const isMobile = true
|
|
158
|
+
isCanRemove = props.beforeRemove(props.pageContext, props.configure, file, isMobile)
|
|
159
|
+
}
|
|
160
|
+
if (isCanRemove!==undefined && !isCanRemove) {
|
|
161
|
+
// 不能删除文件
|
|
162
|
+
return
|
|
163
|
+
}
|
|
164
|
+
const index = props.fileList.findIndex((item: any) => (item.serverPath === file.uuid || item.serverPath === file.serverPath))
|
|
165
|
+
console.log('handleOnRemove----props.fileList=', props.fileList, 'index=', index)
|
|
166
|
+
props.fileList.splice(index, 1)
|
|
167
|
+
emits('remove', {file, index: index})
|
|
116
168
|
props.onRemove(file)
|
|
117
169
|
}
|
|
118
170
|
|
|
@@ -120,21 +172,23 @@ const isPromise = (p: any) => {
|
|
|
120
172
|
return p && Object.prototype.toString.call(p) === '[object Promise]'
|
|
121
173
|
}
|
|
122
174
|
const preview = (showName: string, serverPath: string) => {
|
|
123
|
-
console.log('preview')
|
|
175
|
+
console.log('preview----props.fileList=', props.fileList)
|
|
124
176
|
|
|
125
|
-
let
|
|
126
|
-
if (showName &&
|
|
127
|
-
|
|
177
|
+
let isImg = false
|
|
178
|
+
if (showName && isImage(showName)) {
|
|
179
|
+
isImg = true
|
|
128
180
|
}
|
|
129
|
-
if (
|
|
181
|
+
if (isImg) {
|
|
130
182
|
previewImageInfo.value.src = getPreviewSrc(showName, serverPath)
|
|
131
183
|
const srcList: string[] = []
|
|
132
184
|
props.fileList.forEach((item: any) => {
|
|
133
|
-
|
|
185
|
+
const fileName = item.showName ? item.showName: item.name
|
|
186
|
+
srcList.push(getPreviewSrc(fileName, item.serverPath))
|
|
134
187
|
})
|
|
135
188
|
previewSrcList.value = srcList
|
|
136
189
|
dialogVisible.value = true
|
|
137
190
|
} else {
|
|
191
|
+
// 移动端时不能预览文档
|
|
138
192
|
previweDoc(showName, serverPath)
|
|
139
193
|
}
|
|
140
194
|
}
|
|
@@ -184,9 +238,10 @@ function getPreviewSrc(showName: string, serverPath: string) {
|
|
|
184
238
|
showName = formatName(showName)
|
|
185
239
|
const token = getToken()
|
|
186
240
|
let url = baseURL + '/common/super-form/downloads?jwt=' + token
|
|
187
|
-
if (
|
|
241
|
+
if (isPlateSys(props.systemCode)) {
|
|
188
242
|
url = baseAPI + '/component/super-form/downloads?jwt=' + token
|
|
189
243
|
}
|
|
244
|
+
url = getReplaceUrlDomain(url)
|
|
190
245
|
return url + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath
|
|
191
246
|
}
|
|
192
247
|
|
|
@@ -196,4 +251,16 @@ const formatName = (showName: string) => {
|
|
|
196
251
|
}
|
|
197
252
|
return showName
|
|
198
253
|
}
|
|
254
|
+
|
|
255
|
+
const isPreview = (fileName: string) => {
|
|
256
|
+
if(isMobile.value){
|
|
257
|
+
if (fileName && isImage(fileName)) {
|
|
258
|
+
// 移动端时,只能预览图片
|
|
259
|
+
return true
|
|
260
|
+
}
|
|
261
|
+
} else {
|
|
262
|
+
return true
|
|
263
|
+
}
|
|
264
|
+
return false
|
|
265
|
+
}
|
|
199
266
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FsUploadList
|
|
3
|
-
v-if="displayType === 'input'"
|
|
3
|
+
v-if="!isMobile && displayType === 'input'"
|
|
4
4
|
:value="props.fileInfo.showName"
|
|
5
5
|
:row="entity"
|
|
6
6
|
:disabled="disabled"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
@delete-success="onInputDeleteSuccess"
|
|
12
12
|
/>
|
|
13
13
|
<fs-button-upload
|
|
14
|
-
v-else-if="displayType === 'button'"
|
|
14
|
+
v-else-if="!isMobile && displayType === 'button'"
|
|
15
15
|
:disabled="disabled"
|
|
16
16
|
:fileInfo="fileInfo"
|
|
17
17
|
:systemCode="systemCode"
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
:action="action"
|
|
24
24
|
:headers="headers"
|
|
25
25
|
:file-list="fileList"
|
|
26
|
-
:
|
|
26
|
+
:beforeUpload="beforeUpload"
|
|
27
27
|
:onSuccess="onSuccess"
|
|
28
28
|
:beforeRemove="beforeRemove"
|
|
29
29
|
:onRemove="onRemove"
|
|
30
30
|
:beforeDownload="beforeDownload"
|
|
31
31
|
:pageContext="pageContext"
|
|
32
32
|
:configure="configure"
|
|
33
|
-
|
|
33
|
+
:openFsUpload="openFsUpload"
|
|
34
34
|
/>
|
|
35
35
|
<fs-drag-upload
|
|
36
|
-
v-else-if="displayType === 'drag'"
|
|
36
|
+
v-else-if="!isMobile && displayType === 'drag'"
|
|
37
37
|
:disabled="disabled"
|
|
38
38
|
:fileInfo="fileInfo"
|
|
39
39
|
:systemCode="systemCode"
|
|
@@ -45,20 +45,68 @@
|
|
|
45
45
|
:action="action"
|
|
46
46
|
:headers="headers"
|
|
47
47
|
:file-list="fileList"
|
|
48
|
-
:
|
|
48
|
+
:beforeUpload="beforeUpload"
|
|
49
49
|
:onSuccess="onSuccess"
|
|
50
50
|
:beforeRemove="beforeRemove"
|
|
51
51
|
:onRemove="onRemove"
|
|
52
52
|
:beforeDownload="beforeDownload"
|
|
53
53
|
:pageContext="pageContext"
|
|
54
54
|
:configure="configure"
|
|
55
|
-
|
|
55
|
+
:openFsUpload="openFsUpload"
|
|
56
|
+
/>
|
|
57
|
+
<FileUploadInputMobile
|
|
58
|
+
v-else-if="isMobile && displayType === 'input'"
|
|
59
|
+
:disabled="disabled"
|
|
60
|
+
:fileInfo="fileInfo"
|
|
61
|
+
:systemCode="systemCode"
|
|
62
|
+
:accept="accept"
|
|
63
|
+
:multiple="multiple"
|
|
64
|
+
:limit="limit"
|
|
65
|
+
:limitFileSize="limitFileSize"
|
|
66
|
+
:placeholder="placeholder"
|
|
67
|
+
:action="action"
|
|
68
|
+
:headers="headers"
|
|
69
|
+
:file-list="fileList"
|
|
70
|
+
:beforeUpload="beforeUpload"
|
|
71
|
+
:onSuccess="onSuccess"
|
|
72
|
+
:beforeRemove="beforeRemove"
|
|
73
|
+
:onRemove="onRemove"
|
|
74
|
+
:beforeDownload="beforeDownload"
|
|
75
|
+
:pageContext="pageContext"
|
|
76
|
+
:configure="configure"
|
|
77
|
+
:openFsUpload="openFsUpload"
|
|
78
|
+
/>
|
|
79
|
+
<FileUploadMobile v-else-if="isMobile"
|
|
80
|
+
:disabled="disabled"
|
|
81
|
+
:fileInfo="fileInfo"
|
|
82
|
+
:systemCode="systemCode"
|
|
83
|
+
:accept="accept"
|
|
84
|
+
:multiple="multiple"
|
|
85
|
+
:limit="limit"
|
|
86
|
+
:limitFileSize="limitFileSize"
|
|
87
|
+
:placeholder="placeholder"
|
|
88
|
+
:action="action"
|
|
89
|
+
:headers="headers"
|
|
90
|
+
:file-list="fileList"
|
|
91
|
+
:beforeUpload="beforeUpload"
|
|
92
|
+
:onSuccess="onSuccess"
|
|
93
|
+
:beforeRemove="beforeRemove"
|
|
94
|
+
:onRemove="onRemove"
|
|
95
|
+
:beforeDownload="beforeDownload"
|
|
96
|
+
:pageContext="pageContext"
|
|
97
|
+
:configure="configure"
|
|
98
|
+
:openFsUpload="openFsUpload"
|
|
99
|
+
@uploadend="uploadendMobile"
|
|
100
|
+
@remove="removeMobileFile"
|
|
56
101
|
/>
|
|
57
102
|
</template>
|
|
58
103
|
<script setup lang="ts">
|
|
59
104
|
import FsDragUpload from './fs-drag-upload.vue'
|
|
60
105
|
import FsButtonUpload from './fs-button-upload.vue'
|
|
106
|
+
import FileUploadMobile from './file-upload-mobile/file-upload.vue'
|
|
107
|
+
import FileUploadInputMobile from './file-upload-mobile/file-upload-input.vue'
|
|
61
108
|
import { ref, defineProps } from 'vue'
|
|
109
|
+
import { getReplaceUrlDomain, isMobileBrowser, isPlateSys } from '../../../src/utils/common-util'
|
|
62
110
|
const props = defineProps({
|
|
63
111
|
openFsUpload:{
|
|
64
112
|
type: Object,
|
|
@@ -118,7 +166,7 @@ const props = defineProps({
|
|
|
118
166
|
type: Array<{ showName: string; serverPath: string }>,
|
|
119
167
|
default: () => []
|
|
120
168
|
},
|
|
121
|
-
|
|
169
|
+
beforeUpload: {
|
|
122
170
|
type: Function,
|
|
123
171
|
default: () => {}
|
|
124
172
|
},
|
|
@@ -147,6 +195,9 @@ const props = defineProps({
|
|
|
147
195
|
default: () => ({})
|
|
148
196
|
}
|
|
149
197
|
})
|
|
198
|
+
const isMobile = ref(isMobileBrowser())
|
|
199
|
+
const pageType = ref(props.pageContext.pageType)
|
|
200
|
+
console.log('附件上传控件---fs-upload-new---isMobile=', isMobile.value, 'pageType=', pageType.value , 'systemCode=', props.systemCode ,'configure=', props.configure, 'props.pageContext=', props.pageContext)
|
|
150
201
|
const listFileLabel = ref<string>('')
|
|
151
202
|
if (props.displayType === 'input') {
|
|
152
203
|
listFileLabel.value = props.fileInfo.showName || ''
|
|
@@ -179,4 +230,33 @@ const onInputDeleteSuccess = (res: any) => {
|
|
|
179
230
|
listFileLabel.value = props.fileList.map((item: any) => item.showName).join(',')
|
|
180
231
|
props.onRemove()
|
|
181
232
|
}
|
|
233
|
+
|
|
234
|
+
function uploadendMobile(fileList) {
|
|
235
|
+
const fileServerPaths = Array.from(props.fileList,({serverPath})=>serverPath)
|
|
236
|
+
// console.log('uploadendMobile---props.fileList=', props.fileList,'fileServerPaths=',fileServerPaths, 'fileList=', fileList)
|
|
237
|
+
fileList.forEach(file=>{
|
|
238
|
+
// 如果已经存在就不要重复添加到fileList中了
|
|
239
|
+
if(fileServerPaths.indexOf(file.serverPath) < 0){
|
|
240
|
+
props.fileList.push({
|
|
241
|
+
showName: file.name,
|
|
242
|
+
serverPath: file.serverPath
|
|
243
|
+
})
|
|
244
|
+
}
|
|
245
|
+
})
|
|
246
|
+
props.onSuccess()
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
function removeMobileFile(param) {
|
|
251
|
+
// console.log('removeMobileFile---props.fileList=', props.fileList, 'param=', param)
|
|
252
|
+
const deleteFile = param.rmFiles && param.rmFiles.length > 0 ? param.rmFiles[0] : null
|
|
253
|
+
if(deleteFile){
|
|
254
|
+
let index = props.fileList.findIndex((item: any) => item.serverPath === deleteFile.serverPath)
|
|
255
|
+
if (index > -1) {
|
|
256
|
+
// eslint-disable-next-line vue/no-mutating-props
|
|
257
|
+
props.fileList.splice(index, 1)
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
props.onRemove()
|
|
261
|
+
}
|
|
182
262
|
</script>
|
|
@@ -155,7 +155,7 @@ const apis = {
|
|
|
155
155
|
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
156
156
|
// 每页显示多少条
|
|
157
157
|
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
158
|
-
const isMobile =
|
|
158
|
+
const isMobile = this.isMobile
|
|
159
159
|
if(gridParams.pageContext){
|
|
160
160
|
canCreate = gridParams.options.lineEditOptions.beforeInsertRow.call(
|
|
161
161
|
this,{gridData:isSubTableShowPage ? gridParams.subTableData : gridParams.gridData,
|
|
@@ -306,7 +306,7 @@ const apis = {
|
|
|
306
306
|
// 每页显示多少条
|
|
307
307
|
const pageSize =
|
|
308
308
|
gridParams.pagination && gridParams.pagination.pageSize
|
|
309
|
-
const isMobile =
|
|
309
|
+
const isMobile = this.isMobile
|
|
310
310
|
|
|
311
311
|
if(gridParams.pageContext){
|
|
312
312
|
gridParams.options.lineEditOptions.afterInsertRow.call(
|
|
@@ -901,7 +901,7 @@ const apis = {
|
|
|
901
901
|
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
902
902
|
// 每页显示多少条
|
|
903
903
|
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
904
|
-
const isMobile =
|
|
904
|
+
const isMobile = this.isMobile
|
|
905
905
|
isValidate =
|
|
906
906
|
gridParams.options.lineEditOptions.beforeRestoreValidate.call(this, {
|
|
907
907
|
rowIndex,
|
|
@@ -942,7 +942,7 @@ const apis = {
|
|
|
942
942
|
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
943
943
|
// 每页显示多少条
|
|
944
944
|
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
945
|
-
const isMobile =
|
|
945
|
+
const isMobile = this.isMobile
|
|
946
946
|
canRestore = gridParams.options.lineEditOptions.beforeRestore.call(
|
|
947
947
|
this,
|
|
948
948
|
{
|
|
@@ -1055,7 +1055,7 @@ const apis = {
|
|
|
1055
1055
|
const gridData = isSubTableShowPage
|
|
1056
1056
|
? gridParams.subTableData
|
|
1057
1057
|
: gridParams.gridData
|
|
1058
|
-
const isMobile =
|
|
1058
|
+
const isMobile = this.isMobile
|
|
1059
1059
|
if(gridParams.pageContext){
|
|
1060
1060
|
canDelete = gridParams.options.lineEditOptions.beforeDelete.call(
|
|
1061
1061
|
this,{
|
|
@@ -1134,7 +1134,7 @@ const apis = {
|
|
|
1134
1134
|
// 每页显示多少条
|
|
1135
1135
|
const pageSize =
|
|
1136
1136
|
gridParams.pagination && gridParams.pagination.pageSize
|
|
1137
|
-
const isMobile =
|
|
1137
|
+
const isMobile = this.isMobile
|
|
1138
1138
|
if(gridParams.pageContext){
|
|
1139
1139
|
gridParams.options.lineEditOptions.afterDelete.call(
|
|
1140
1140
|
this,{
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="search-button" style="
|
|
2
|
+
<div class="search-button" :style="{textAlign: isMobile?'center':'right'}">
|
|
3
3
|
<!-- :loading="loading" -->
|
|
4
|
-
<el-button class="button--default" size="default" @click="$emit('save-condition')">
|
|
5
|
-
{{ $t('superGrid.saveCondition') }}
|
|
6
|
-
</el-button>
|
|
7
|
-
<el-button :loading="loading" class="button--default" size="default" @click="resetForm">
|
|
8
|
-
{{ $t('imatrixUIPublicModel.reset') }}
|
|
9
|
-
</el-button>
|
|
10
4
|
<el-button
|
|
11
5
|
:loading="loading"
|
|
12
6
|
size="default"
|
|
13
7
|
type="primary"
|
|
14
8
|
@click="submitForm"
|
|
15
9
|
>
|
|
16
|
-
{{
|
|
10
|
+
{{$t('imatrixUIPublicModel.sure')}}
|
|
11
|
+
</el-button>
|
|
12
|
+
<el-button :loading="loading" class="button--default" size="default" @click="resetForm">
|
|
13
|
+
{{ $t('imatrixUIPublicModel.reset') }}
|
|
14
|
+
</el-button>
|
|
15
|
+
<el-button class="button--default" size="default" @click="$emit('save-condition')">
|
|
16
|
+
{{ $t('superGrid.saveCondition') }}
|
|
17
17
|
</el-button>
|
|
18
18
|
<el-button
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
v-if="!isMobile"
|
|
20
|
+
:icon="isMyOpen ? CaretTop : CaretBottom"
|
|
21
|
+
link
|
|
22
|
+
size="default"
|
|
23
|
+
@click="openFold"
|
|
23
24
|
>
|
|
24
25
|
{{ isMyOpen ? $t('superGrid.fold') : $t('superGrid.open') }}
|
|
25
26
|
</el-button>
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
import {$emit} from '../../utils/gogocodeTransfer'
|
|
39
40
|
import {CaretBottom, CaretTop} from '@element-plus/icons-vue'
|
|
40
41
|
import {shallowRef} from "vue";
|
|
42
|
+
import {isMobileBrowser} from '../../../src/utils/common-util'
|
|
41
43
|
|
|
42
44
|
export default {
|
|
43
45
|
name: 'SearchButton',
|
|
@@ -45,15 +47,17 @@ export default {
|
|
|
45
47
|
isOpen: {
|
|
46
48
|
type: Boolean,
|
|
47
49
|
default: false,
|
|
48
|
-
}
|
|
50
|
+
}
|
|
49
51
|
},
|
|
50
52
|
data() {
|
|
53
|
+
const isMobile = isMobileBrowser()
|
|
51
54
|
const isMyOpen = this.isOpen
|
|
52
55
|
return {
|
|
53
56
|
isMyOpen, // false表示折叠状态,应该显示“展开”,true表示当前是展开状态,应该显示“折叠”
|
|
54
57
|
loading: false,
|
|
55
58
|
CaretTop: shallowRef(CaretTop),
|
|
56
|
-
CaretBottom: shallowRef(CaretBottom)
|
|
59
|
+
CaretBottom: shallowRef(CaretBottom),
|
|
60
|
+
isMobile // 移动端时不需要显示展开折叠按钮
|
|
57
61
|
}
|
|
58
62
|
},
|
|
59
63
|
methods: {
|