agilebuilder-ui 1.0.70 → 1.0.71-tmp2
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 +26040 -25707
- package/lib/super-ui.umd.cjs +58 -58
- package/package.json +3 -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/fs-button-upload.vue +8 -12
- package/packages/fs-upload-new/src/fs-drag-upload.vue +2 -2
- package/packages/fs-upload-new/src/fs-preview-new.vue +77 -27
- 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 +2 -1
- package/src/i18n/langs/en.js +2 -1
- package/src/index.js +3 -1
- package/src/permission.js +108 -122
- package/src/styles/theme/green/sidebar.scss +12 -1
- package/src/utils/common-util.js +170 -115
- package/src/utils/jump-page-utils.js +34 -13
- package/src/utils/permissionAuth.js +47 -8
- package/src/utils/util.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agilebuilder-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71tmp2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./lib/super-ui.js",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"path-to-regexp": "6.2.1",
|
|
20
20
|
"sortablejs": "^1.15.0",
|
|
21
21
|
"tinymce": "5.8.2",
|
|
22
|
-
"uuid": "^9.0.1"
|
|
22
|
+
"uuid": "^9.0.1",
|
|
23
|
+
"vue-plugin-load-script": "^1.3.2"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@element-plus/icons-vue": "^2.1.0",
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
|
|
4
|
+
<DepartmentMobileTree
|
|
5
|
+
v-if="isMobile"
|
|
6
|
+
ref="inlineDeparmentTree"
|
|
7
|
+
:department-info="departmentInfo"
|
|
8
|
+
:multiple="multiple"
|
|
9
|
+
:search-field="searchField"
|
|
10
|
+
:select-department-info="selectDepartmentInfo"
|
|
11
|
+
:separator="separator"
|
|
12
|
+
@close="result"
|
|
13
|
+
/>
|
|
3
14
|
<el-dialog
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
v-else
|
|
16
|
+
:close-on-click-modal="false"
|
|
17
|
+
:title="myTitle"
|
|
18
|
+
:width="multiple ? '920px' : '509px'"
|
|
19
|
+
append-to-body
|
|
20
|
+
class="user-tree"
|
|
21
|
+
model-value
|
|
22
|
+
@close="$emit('close')"
|
|
23
|
+
@closed="$emit('closed')"
|
|
24
|
+
@open="$emit('open')"
|
|
25
|
+
@opend="$emit('opend')"
|
|
14
26
|
>
|
|
15
27
|
<inline-department-tree
|
|
16
28
|
ref="inlineDeparmentTree"
|
|
@@ -40,11 +52,14 @@
|
|
|
40
52
|
<script>
|
|
41
53
|
import {$emit} from '../../utils/gogocodeTransfer'
|
|
42
54
|
import InlineDepartmentTree from '../../department-tree-inline/src/department-tree-inline.vue'
|
|
55
|
+
import DepartmentMobileTree from '../../department-tree-mobile/src/department-tree-app.vue'
|
|
56
|
+
import {isMobileBrowser} from '../../../src/utils/common-util'
|
|
43
57
|
|
|
44
58
|
export default {
|
|
45
59
|
name: 'DepartmentTree',
|
|
46
60
|
components: {
|
|
47
61
|
InlineDepartmentTree,
|
|
62
|
+
DepartmentMobileTree
|
|
48
63
|
},
|
|
49
64
|
props: {
|
|
50
65
|
// 是否是多选树,默认是true
|
|
@@ -93,12 +108,15 @@ export default {
|
|
|
93
108
|
},
|
|
94
109
|
},
|
|
95
110
|
data() {
|
|
111
|
+
const isMobile = isMobileBrowser()
|
|
112
|
+
console.log('部门树---isMobile=', isMobile)
|
|
96
113
|
let myTitle = this.$t('imatrixUIMessage.pleaseSelectDepartment')
|
|
97
114
|
if (this.title) {
|
|
98
115
|
myTitle = this.title
|
|
99
116
|
}
|
|
100
117
|
return {
|
|
101
118
|
myTitle,
|
|
119
|
+
isMobile
|
|
102
120
|
}
|
|
103
121
|
},
|
|
104
122
|
methods: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-drawer v-model="isShowForm" direction="btt" size="100%" class="organization-tree">
|
|
2
|
+
<el-drawer v-model="isShowForm" :close-on-click-modal="false" :close-on-press-escape="false" direction="btt" size="100%" class="organization-tree" @close="closeTree()">
|
|
3
3
|
<template #header>
|
|
4
4
|
<div style="text-align: center;">
|
|
5
5
|
{{$t('imatrixUIMessage.pleaseSelect')}}
|
|
@@ -48,10 +48,10 @@ const props = defineProps<{
|
|
|
48
48
|
}
|
|
49
49
|
}>()
|
|
50
50
|
const emits = defineEmits(['close'])
|
|
51
|
-
let isShowForm = ref(
|
|
52
|
-
function showTree() {
|
|
53
|
-
|
|
54
|
-
}
|
|
51
|
+
let isShowForm = ref(true)
|
|
52
|
+
// function showTree() {
|
|
53
|
+
// isShowForm.value = true
|
|
54
|
+
// }
|
|
55
55
|
function closeTree(selectNodeInfo) {
|
|
56
56
|
emits('close', selectNodeInfo)
|
|
57
57
|
isShowForm.value = false
|
|
@@ -59,7 +59,7 @@ const props = defineProps<{
|
|
|
59
59
|
function selectDepartment() {
|
|
60
60
|
// this.$refs.inlineDeparmentTree.selectDepartment()
|
|
61
61
|
}
|
|
62
|
-
defineExpose({showTree})
|
|
62
|
+
// defineExpose({showTree})
|
|
63
63
|
</script>
|
|
64
64
|
<style>
|
|
65
65
|
.organization-tree, .organization-tree .el-checkbox__label,.organization-tree .el-breadcrumb__inner,.organization-tree .el-tree {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<department-user-multi-tree
|
|
4
|
-
v-if="multiple"
|
|
4
|
+
v-if="!isMobile && multiple"
|
|
5
5
|
:department-info="departmentInfo"
|
|
6
6
|
:height="height"
|
|
7
7
|
:is-need-virtual-user="isNeedVirtualUser"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
@opendDialog="opendDialog"
|
|
17
17
|
/>
|
|
18
18
|
<department-user-single-tree
|
|
19
|
-
v-if="!multiple"
|
|
19
|
+
v-if="!isMobile && !multiple"
|
|
20
20
|
:department-info="departmentInfo"
|
|
21
21
|
:is-need-virtual-user="isNeedVirtualUser"
|
|
22
22
|
:title="title"
|
|
@@ -26,6 +26,14 @@
|
|
|
26
26
|
@openDialog="openDialog"
|
|
27
27
|
@opendDialog="opendDialog"
|
|
28
28
|
/>
|
|
29
|
+
<DepartmentUserMobileTree
|
|
30
|
+
v-if="isMobile"
|
|
31
|
+
:department-info="departmentInfo"
|
|
32
|
+
:search-field="searchField"
|
|
33
|
+
:select-user-info="selectUserInfo"
|
|
34
|
+
:separator="separator"
|
|
35
|
+
@close="closeDialog"
|
|
36
|
+
/>
|
|
29
37
|
</div>
|
|
30
38
|
</template>
|
|
31
39
|
|
|
@@ -33,12 +41,15 @@
|
|
|
33
41
|
import {$emit} from '../../utils/gogocodeTransfer'
|
|
34
42
|
import DepartmentUserSingleTree from './department-user-single-tree.vue'
|
|
35
43
|
import DepartmentUserMultiTree from './department-user-multiple-tree.vue'
|
|
44
|
+
import DepartmentUserMobileTree from '../../department-user-tree-mobile/src/department-user-tree-app.vue'
|
|
45
|
+
import {isMobileBrowser} from '../../../src/utils/common-util'
|
|
36
46
|
|
|
37
47
|
export default {
|
|
38
48
|
name: 'DepartmentUserTree',
|
|
39
49
|
components: {
|
|
40
50
|
DepartmentUserSingleTree,
|
|
41
51
|
DepartmentUserMultiTree,
|
|
52
|
+
DepartmentUserMobileTree
|
|
42
53
|
},
|
|
43
54
|
props: {
|
|
44
55
|
// 是否是多选树,默认是true
|
|
@@ -88,12 +99,15 @@ export default {
|
|
|
88
99
|
}
|
|
89
100
|
},
|
|
90
101
|
data() {
|
|
102
|
+
const isMobile = isMobileBrowser()
|
|
103
|
+
console.log('部门人员树---isMobile=', isMobile)
|
|
91
104
|
let myTitle = this.$t('imatrixUIMessage.pleaseSelectPersonnel')
|
|
92
105
|
if (this.title) {
|
|
93
106
|
myTitle = this.title
|
|
94
107
|
}
|
|
95
108
|
return {
|
|
96
109
|
myTitle,
|
|
110
|
+
isMobile
|
|
97
111
|
}
|
|
98
112
|
},
|
|
99
113
|
methods: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-drawer v-model="isShowForm" direction="btt" size="100%" class="organization-tree">
|
|
2
|
+
<el-drawer v-model="isShowForm" direction="btt" size="100%" class="organization-tree" @close="closeTree()">
|
|
3
3
|
<template #header>
|
|
4
4
|
<div style="text-align: center;">
|
|
5
5
|
{{$t('imatrixUIMessage.pleaseSelect')}}
|
|
@@ -47,10 +47,10 @@ const props = defineProps<{
|
|
|
47
47
|
}
|
|
48
48
|
}>()
|
|
49
49
|
const emits = defineEmits(['close'])
|
|
50
|
-
let isShowForm = ref(
|
|
51
|
-
function showTree() {
|
|
52
|
-
|
|
53
|
-
}
|
|
50
|
+
let isShowForm = ref(true)
|
|
51
|
+
// function showTree() {
|
|
52
|
+
// isShowForm.value = true
|
|
53
|
+
// }
|
|
54
54
|
function closeTree(selectNodeInfo) {
|
|
55
55
|
emits('close', selectNodeInfo)
|
|
56
56
|
isShowForm.value = false
|
|
@@ -58,7 +58,7 @@ const props = defineProps<{
|
|
|
58
58
|
function selectDepartment() {
|
|
59
59
|
// this.$refs.inlineDeparmentTree.selectDepartment()
|
|
60
60
|
}
|
|
61
|
-
defineExpose({showTree})
|
|
61
|
+
// defineExpose({showTree})
|
|
62
62
|
</script>
|
|
63
63
|
<style>
|
|
64
64
|
.organization-tree, .organization-tree .el-checkbox__label,.organization-tree .el-breadcrumb__inner,.organization-tree .el-tree {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:show-file-list="false"
|
|
8
8
|
auto-upload
|
|
9
9
|
:headers="headers"
|
|
10
|
-
|
|
10
|
+
:disabled="!openFsUpload"
|
|
11
11
|
:action="defaultAction"
|
|
12
12
|
:multiple="multiple"
|
|
13
13
|
:before-upload="handleBeforeUpload"
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
>
|
|
17
17
|
<el-button size="small" type="primary">{{ placeholder }}</el-button>
|
|
18
18
|
<template #tip>
|
|
19
|
-
<el-text size="small"> {{ accept }}
|
|
19
|
+
<el-text size="small"> {{ accept }} {{$t('imatrixUIMessage.uploadFileTip',{fileSzie: limitFileSize})}}</el-text>
|
|
20
20
|
</template>
|
|
21
21
|
</el-upload>
|
|
22
22
|
<template v-if="fileList && fileList.length > 0">
|
|
23
|
-
<fs-preview-new :disabled="disabled" :file-list="fileList" :system-code="systemCode" />
|
|
23
|
+
<fs-preview-new :disabled="disabled" :file-list="fileList" :system-code="systemCode" :before-remove="beforeRemove" :on-remove="onRemove" :before-download="beforeDownload"/>
|
|
24
24
|
</template>
|
|
25
25
|
</template>
|
|
26
26
|
|
|
@@ -31,10 +31,10 @@ import { getToken } from '../../../src/utils/auth'
|
|
|
31
31
|
import type { UploadFile, UploadFiles } from 'element-plus'
|
|
32
32
|
import fsPreviewNew from './fs-preview-new.vue'
|
|
33
33
|
const props = defineProps({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
openFsUpload: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: true
|
|
37
|
+
},
|
|
38
38
|
systemCode: {
|
|
39
39
|
type: String,
|
|
40
40
|
default: ''
|
|
@@ -75,10 +75,6 @@ const props = defineProps({
|
|
|
75
75
|
type: Array<{ showName: string; serverPath: string }>,
|
|
76
76
|
default: () => []
|
|
77
77
|
},
|
|
78
|
-
handleBeforeUpload: {
|
|
79
|
-
type: Function,
|
|
80
|
-
default: () => {}
|
|
81
|
-
},
|
|
82
78
|
onSuccess: {
|
|
83
79
|
type: Function,
|
|
84
80
|
default: () => {}
|
|
@@ -126,7 +122,7 @@ if (!props.headers || !props.headers['Authorization']) {
|
|
|
126
122
|
props.headers.Authorization = getToken()
|
|
127
123
|
}
|
|
128
124
|
const handleBeforeUpload = (file: File) => {
|
|
129
|
-
return props.
|
|
125
|
+
return props.beforeUpload(file)
|
|
130
126
|
}
|
|
131
127
|
const onSuccess = (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|
132
128
|
// eslint-disable-next-line vue/no-mutating-props
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
|
19
19
|
<div class="el-upload__text">{{ placeholder }}</div>
|
|
20
20
|
<template #tip>
|
|
21
|
-
<el-text size="small"> {{ accept }}
|
|
21
|
+
<el-text size="small"> {{ accept }} {{$t('imatrixUIMessage.uploadFileTip',{fileSzie: limitFileSize})}}</el-text>
|
|
22
22
|
</template>
|
|
23
23
|
</el-upload>
|
|
24
24
|
<template v-if="fileList && fileList.length > 0">
|
|
25
|
-
<fs-preview-new :disabled="disabled" :file-list="fileList" :system-code="systemCode" />
|
|
25
|
+
<fs-preview-new :disabled="disabled" :file-list="fileList" :system-code="systemCode" :before-remove="beforeRemove" :on-remove="onRemove" :before-download="beforeDownload" />
|
|
26
26
|
</template>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
@@ -1,32 +1,60 @@
|
|
|
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">
|
|
24
|
+
<span
|
|
25
|
+
v-if="isPreview(file.showName)"
|
|
26
|
+
class="el-upload-list__item-preview"
|
|
27
|
+
@click="preview(file.showName, 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="handleRemove(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
|
|
|
25
52
|
<script setup lang="ts">
|
|
26
53
|
import { Close, Paperclip, Download } from '@element-plus/icons-vue'
|
|
27
54
|
import { ref, defineProps } from 'vue'
|
|
28
|
-
import { getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
|
|
55
|
+
import { getSystemFrontendUrl, isPlateSys, isMobileBrowser, getReplaceUrlDomain } from '../../../src/utils/common-util'
|
|
29
56
|
import { getToken } from '../../../src/utils/auth'
|
|
57
|
+
import { isImage } from '../../../src/utils/util'
|
|
30
58
|
const props = defineProps({
|
|
31
59
|
systemCode: {
|
|
32
60
|
type: String,
|
|
@@ -59,15 +87,23 @@ const props = defineProps({
|
|
|
59
87
|
beforeDownload: {
|
|
60
88
|
type: Function,
|
|
61
89
|
default: () => {}
|
|
90
|
+
},
|
|
91
|
+
file: {
|
|
92
|
+
type: Object,
|
|
93
|
+
default: null
|
|
94
|
+
},
|
|
95
|
+
baseURL: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: null
|
|
62
98
|
}
|
|
63
99
|
})
|
|
64
|
-
const baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
100
|
+
const baseURL = props.baseURL ? props.baseURL: window.$vueApp.config.globalProperties.baseURL
|
|
65
101
|
const baseAPI = window.$vueApp.config.globalProperties.baseAPI
|
|
66
102
|
|
|
67
103
|
const dialogVisible = ref<boolean>(false)
|
|
68
104
|
const previewImageInfo = ref<any>({})
|
|
69
105
|
const previewSrcList = ref<string[]>([])
|
|
70
|
-
|
|
106
|
+
const isMobile = ref(isMobileBrowser())
|
|
71
107
|
const handleDownload = (file: any) => {
|
|
72
108
|
if (isPromise(props.beforeDownload)) {
|
|
73
109
|
props.beforeDownload(props.pageContext, props.configure, file).then((res: any) => {
|
|
@@ -122,11 +158,11 @@ const isPromise = (p: any) => {
|
|
|
122
158
|
const preview = (showName: string, serverPath: string) => {
|
|
123
159
|
console.log('preview')
|
|
124
160
|
|
|
125
|
-
let
|
|
126
|
-
if (showName &&
|
|
127
|
-
|
|
161
|
+
let isImg = false
|
|
162
|
+
if (showName && isImage(showName)) {
|
|
163
|
+
isImg = true
|
|
128
164
|
}
|
|
129
|
-
if (
|
|
165
|
+
if (isImg) {
|
|
130
166
|
previewImageInfo.value.src = getPreviewSrc(showName, serverPath)
|
|
131
167
|
const srcList: string[] = []
|
|
132
168
|
props.fileList.forEach((item: any) => {
|
|
@@ -135,6 +171,7 @@ const preview = (showName: string, serverPath: string) => {
|
|
|
135
171
|
previewSrcList.value = srcList
|
|
136
172
|
dialogVisible.value = true
|
|
137
173
|
} else {
|
|
174
|
+
// 移动端时不能预览文档
|
|
138
175
|
previweDoc(showName, serverPath)
|
|
139
176
|
}
|
|
140
177
|
}
|
|
@@ -187,6 +224,7 @@ function getPreviewSrc(showName: string, serverPath: string) {
|
|
|
187
224
|
if (!isPlateSys(props.systemCode)) {
|
|
188
225
|
url = baseAPI + '/component/super-form/downloads?jwt=' + token
|
|
189
226
|
}
|
|
227
|
+
url = getReplaceUrlDomain(url)
|
|
190
228
|
return url + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath
|
|
191
229
|
}
|
|
192
230
|
|
|
@@ -196,4 +234,16 @@ const formatName = (showName: string) => {
|
|
|
196
234
|
}
|
|
197
235
|
return showName
|
|
198
236
|
}
|
|
237
|
+
|
|
238
|
+
const isPreview = (fileName: string) => {
|
|
239
|
+
if(isMobile.value){
|
|
240
|
+
if (fileName && isImage(fileName)) {
|
|
241
|
+
// 移动端时,只能预览图片
|
|
242
|
+
return true
|
|
243
|
+
}
|
|
244
|
+
} else {
|
|
245
|
+
return true
|
|
246
|
+
}
|
|
247
|
+
return false
|
|
248
|
+
}
|
|
199
249
|
</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: {
|