imatrix-ui 2.8.21-dw → 2.8.21
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.umd.min.js +5 -35
- package/package.json +4 -2
- package/packages/breadcrumb/index.js +6 -0
- package/packages/breadcrumb/src/breadcrumb.vue +71 -0
- package/packages/department-tree/index.js +6 -0
- package/packages/department-tree/src/department-tree.vue +108 -0
- package/packages/department-tree-inline/index.js +6 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +402 -0
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +284 -0
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
- package/packages/department-tree-inline/src/department-tree-service.js +245 -0
- package/packages/department-tree-inline/src/search-result.vue +176 -0
- package/packages/department-user-tree/index.js +6 -0
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
- package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
- package/packages/department-user-tree/src/department-user-tree.vue +101 -0
- package/packages/department-user-tree-inline/index.js +6 -0
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +626 -0
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +269 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +230 -0
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +122 -0
- package/packages/department-user-tree-inline/src/search-result.vue +197 -0
- package/packages/directives/prevent-reclick.js +19 -0
- package/packages/dynamic-source-select/index.js +6 -0
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +70 -0
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +440 -0
- package/packages/dynamic-source-select/src/events.js +55 -0
- package/packages/fs-preview/index.js +6 -0
- package/packages/fs-preview/src/fs-preview.vue +226 -0
- package/packages/fs-upload/index.js +6 -0
- package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
- package/packages/fs-upload/src/fs-upload-single.vue +312 -0
- package/packages/fs-upload/src/fs-upload.vue +189 -0
- package/packages/fs-upload/src/see-big-picture.vue +55 -0
- package/packages/fs-upload-list/index.js +6 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
- package/packages/hamburger/index.js +6 -0
- package/packages/hamburger/src/hamburger.vue +38 -0
- package/packages/index.js +121 -0
- package/packages/multipart-upload/index.js +6 -0
- package/packages/multipart-upload/src/index.vue +73 -0
- package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
- package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
- package/packages/organization-input/index.js +6 -0
- package/packages/organization-input/src/organization-input.vue +542 -0
- package/packages/plugins/export-data-new.js +453 -0
- package/packages/plugins/export-data.js +361 -0
- package/packages/plugins/index.js +15 -0
- package/packages/plugins/public-method.js +43 -0
- package/packages/remove-department/index.js +6 -0
- package/packages/remove-department/src/remove-department.vue +172 -0
- package/packages/remove-department/src/remove-dept-service.js +20 -0
- package/packages/remove-user/index.js +6 -0
- package/packages/remove-user/src/remove-user-service.js +20 -0
- package/packages/remove-user/src/remove-user.vue +195 -0
- package/packages/remove-workgroup/index.js +6 -0
- package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
- package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
- package/packages/rich-editor/index.js +7 -0
- package/packages/rich-editor/index.vue +278 -0
- package/packages/rich-editor/langs/zh-Hans.js +1 -0
- package/packages/rich-editor/viewer.vue +103 -0
- package/packages/scan-code-input/index.js +6 -0
- package/packages/scan-code-input/src/events.js +33 -0
- package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
- package/packages/scan-code-input/src/scan-code-input.vue +116 -0
- package/packages/secret-info/index.js +7 -0
- package/packages/secret-info/index.vue +90 -0
- package/packages/super-grid/index.js +7 -0
- package/packages/super-grid/src/apis.js +763 -0
- package/packages/super-grid/src/columns-config.vue +335 -0
- package/packages/super-grid/src/custom-formatter.js +250 -0
- package/packages/super-grid/src/dynamic-input.vue +1279 -0
- package/packages/super-grid/src/eventBus.js +2 -0
- package/packages/super-grid/src/events.js +55 -0
- package/packages/super-grid/src/formValidatorUtil.js +226 -0
- package/packages/super-grid/src/formatter.js +181 -0
- package/packages/super-grid/src/group-column.vue +100 -0
- package/packages/super-grid/src/header-context-menu.vue +87 -0
- package/packages/super-grid/src/index-column.vue +51 -0
- package/packages/super-grid/src/normal-column.vue +769 -0
- package/packages/super-grid/src/public-methods.js +31 -0
- package/packages/super-grid/src/row-operation.vue +161 -0
- package/packages/super-grid/src/search-button.vue +66 -0
- package/packages/super-grid/src/search-condition-input.vue +61 -0
- package/packages/super-grid/src/search-condition-list.vue +59 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +653 -0
- package/packages/super-grid/src/search-form-dialog.vue +79 -0
- package/packages/super-grid/src/search-form-item.vue +386 -0
- package/packages/super-grid/src/search-form-number.vue +38 -0
- package/packages/super-grid/src/search-form-open.vue +162 -0
- package/packages/super-grid/src/search-form-ordinarySearch.vue +188 -0
- package/packages/super-grid/src/search-form.vue +634 -0
- package/packages/super-grid/src/search-methods.js +387 -0
- package/packages/super-grid/src/selection-column.vue +43 -0
- package/packages/super-grid/src/store.js +3 -0
- package/packages/super-grid/src/super-grid-service.js +561 -0
- package/packages/super-grid/src/super-grid.vue +2793 -0
- package/packages/super-grid/src/utils.js +763 -0
- package/packages/super-grid/src/view-image-dialog.vue +130 -0
- package/packages/super-nine-grid/index.js +7 -0
- package/packages/super-nine-grid/src/apis.js +103 -0
- package/packages/super-nine-grid/src/custom-formatter.js +66 -0
- package/packages/super-nine-grid/src/formatter.js +132 -0
- package/packages/super-nine-grid/src/search-form-number.vue +38 -0
- package/packages/super-nine-grid/src/search-form.vue +430 -0
- package/packages/super-nine-grid/src/search-methods.js +134 -0
- package/packages/super-nine-grid/src/store.js +3 -0
- package/packages/super-nine-grid/src/super-grid-service.js +91 -0
- package/packages/super-nine-grid/src/super-nine-grid.vue +872 -0
- package/packages/super-nine-grid/src/utils.js +261 -0
- package/packages/svg-icon/index.js +6 -0
- package/packages/svg-icon/src/svg-icon.vue +43 -0
- package/packages/utils/utils.js +152 -0
- package/packages/utils/value-set.js +86 -0
- package/packages/valid-code/index.js +7 -0
- package/packages/valid-code/src/valid-code.vue +95 -0
- package/packages/workflow-button/index.js +6 -0
- package/packages/workflow-button/src/workflow-button.vue +325 -0
- package/packages/workflow-history-list/index.js +6 -0
- package/packages/workflow-history-list/src/api.js +7 -0
- package/packages/workflow-history-list/src/workflow-history-list.vue +185 -0
- package/packages/workgroup-tree/index.js +6 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +76 -0
- package/packages/workgroup-tree-inline/index.js +6 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +317 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +43 -0
- package/packages/workgroup-user-tree/index.js +6 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
- package/packages/workgroup-user-tree-inline/index.js +6 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +163 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +436 -0
- package/packages/year-range-picker/index.js +6 -0
- package/packages/year-range-picker/src/year-range-picker.vue +51 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +4 -2
- package/src/i18n/langs/en.js +4 -2
- package/src/index.js +93 -0
- package/src/permission.js +7 -3
- package/src/plugins.js +3 -3
- package/src/router/index.js +24 -0
- package/src/store/getters.js +2 -1
- package/src/store/modules/app.js +10 -1
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/index.scss +32 -4
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/card.scss +64 -0
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
- package/src/styles/theme/dark-blue/dialog.scss +21 -0
- package/src/styles/theme/dark-blue/element-variables.scss +7 -0
- package/src/styles/theme/dark-blue/font.scss +71 -0
- package/src/styles/theme/dark-blue/form.scss +51 -0
- package/src/styles/theme/dark-blue/index.scss +247 -0
- package/src/styles/theme/dark-blue/input.scss +15 -0
- package/src/styles/theme/dark-blue/pagination.scss +14 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +296 -0
- package/src/styles/theme/dark-blue/tab.scss +83 -0
- package/src/styles/theme/dark-blue/table.scss +60 -0
- package/src/styles/theme/dark-blue/tree.scss +31 -0
- package/src/styles/theme/dark-blue/var.scss +1028 -0
- package/src/styles/theme/gray/form-style.scss +2 -2
- package/src/styles/theme/gray/input-style.scss +8 -0
- package/src/utils/auth-api.js +115 -0
- package/src/utils/auth.js +34 -42
- package/src/utils/calculator/calculator-factory.js +2 -2
- package/src/utils/common-util.js +34 -0
- package/src/utils/jump-page-utils.js +29 -5
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +4 -0
- package/src/utils/request.js +18 -2
- package/src/utils/util.js +7 -3
- package/src/views/dsc-component/Sidebar/Item.vue +4 -4
- package/src/views/dsc-component/Sidebar/Link.vue +11 -2
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +36 -20
- package/src/views/dsc-component/Sidebar/index.vue +24 -12
- package/src/views/dsc-component/tabs/tab-content.vue +16 -1
- package/src/views/login/index.vue +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const publicMethods = {
|
|
2
|
+
clearSelection: function() {
|
|
3
|
+
this.$refs.superGrid.clearSelection()
|
|
4
|
+
},
|
|
5
|
+
toggleRowSelection: function(row, selected) {
|
|
6
|
+
this.$refs.superGrid.toggleRowSelection(row, selected)
|
|
7
|
+
},
|
|
8
|
+
toggleAllSelection: function() {
|
|
9
|
+
this.$refs.superGrid.toggleAllSelection()
|
|
10
|
+
},
|
|
11
|
+
toggleRowExpansion: function(row, expanded) {
|
|
12
|
+
this.$refs.superGrid.toggleRowExpansion(row, expanded)
|
|
13
|
+
},
|
|
14
|
+
setCurrentRow: function(row) {
|
|
15
|
+
this.$refs.superGrid.setCurrentRow(row)
|
|
16
|
+
},
|
|
17
|
+
clearSort: function() {
|
|
18
|
+
this.$refs.superGrid.clearSort()
|
|
19
|
+
},
|
|
20
|
+
clearFilter: function(columnKey) {
|
|
21
|
+
this.$refs.superGrid.clearFilter(columnKey)
|
|
22
|
+
},
|
|
23
|
+
doLayout: function() {
|
|
24
|
+
this.$refs.superGrid.doLayout()
|
|
25
|
+
},
|
|
26
|
+
sort: function(prop, order) {
|
|
27
|
+
this.$refs.superGrid.sort(prop, order)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
export default publicMethods
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
|
|
3
|
+
@blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
|
|
4
|
+
<span :style="myStyle">
|
|
5
|
+
<span v-if="isShowButton()">
|
|
6
|
+
<span v-if="label">
|
|
7
|
+
<!-- <el-tooltip :content="label" class="item" effect="dark" placement="top-start"> -->
|
|
8
|
+
<component
|
|
9
|
+
:is="elementType"
|
|
10
|
+
v-if="operationSetting.permission"
|
|
11
|
+
v-permission="operationSetting.permission"
|
|
12
|
+
:disabled="preventReclick"
|
|
13
|
+
v-bind="operationSetting"
|
|
14
|
+
@mousedown.native="onClickFun"
|
|
15
|
+
>{{ label }}</component>
|
|
16
|
+
<component
|
|
17
|
+
:is="elementType"
|
|
18
|
+
v-else
|
|
19
|
+
:disabled="preventReclick"
|
|
20
|
+
v-bind="operationSetting"
|
|
21
|
+
@mousedown.native="onClickFun"
|
|
22
|
+
>{{ label }}</component>
|
|
23
|
+
<!-- </el-tooltip> -->
|
|
24
|
+
</span>
|
|
25
|
+
<span v-else>
|
|
26
|
+
<component
|
|
27
|
+
:is="elementType"
|
|
28
|
+
v-if="operationSetting.permission"
|
|
29
|
+
v-permission="operationSetting.permission"
|
|
30
|
+
:disabled="preventReclick"
|
|
31
|
+
v-bind="operationSetting"
|
|
32
|
+
@mousedown.native="onClickFun"
|
|
33
|
+
/>
|
|
34
|
+
<component
|
|
35
|
+
:is="elementType"
|
|
36
|
+
v-else
|
|
37
|
+
:disabled="preventReclick"
|
|
38
|
+
v-bind="operationSetting"
|
|
39
|
+
@mousedown.native="onClickFun"
|
|
40
|
+
/>
|
|
41
|
+
</span>
|
|
42
|
+
|
|
43
|
+
</span>
|
|
44
|
+
</span>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
import { mapGetters } from 'vuex'
|
|
49
|
+
import customFormatter from './custom-formatter'
|
|
50
|
+
export default {
|
|
51
|
+
name: 'RowOperation',
|
|
52
|
+
props: {
|
|
53
|
+
editing: {// 当前行是否是编辑行
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false
|
|
56
|
+
},
|
|
57
|
+
isShow: {
|
|
58
|
+
type: [Boolean, Function],
|
|
59
|
+
default: true
|
|
60
|
+
},
|
|
61
|
+
onClick: {
|
|
62
|
+
type: Function,
|
|
63
|
+
default: function() {}
|
|
64
|
+
},
|
|
65
|
+
entity: {
|
|
66
|
+
type: Object,
|
|
67
|
+
default: null
|
|
68
|
+
},
|
|
69
|
+
column: {
|
|
70
|
+
type: Object,
|
|
71
|
+
default: null
|
|
72
|
+
},
|
|
73
|
+
rowIndex: {
|
|
74
|
+
type: Number,
|
|
75
|
+
default: null
|
|
76
|
+
},
|
|
77
|
+
label: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: null
|
|
80
|
+
},
|
|
81
|
+
operationSetting: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: null
|
|
84
|
+
},
|
|
85
|
+
operationIndex: {
|
|
86
|
+
type: Number,
|
|
87
|
+
default: null
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
data() {
|
|
91
|
+
return {
|
|
92
|
+
elementType: 'el-button', // 组件标签,默认是按钮
|
|
93
|
+
myStyle: null // 组件样式
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
computed: {
|
|
98
|
+
...mapGetters([
|
|
99
|
+
'preventReclick'
|
|
100
|
+
])
|
|
101
|
+
},
|
|
102
|
+
created() {
|
|
103
|
+
if (this.operationSetting.elementType && this.operationSetting.elementType === 'el-link') {
|
|
104
|
+
this.operationSetting.type = 'primary'
|
|
105
|
+
}
|
|
106
|
+
if (!this.operationSetting.elementType || this.operationSetting.elementType === 'el-button') {
|
|
107
|
+
this.operationSetting.size = 'mini'
|
|
108
|
+
}
|
|
109
|
+
if (this.operationSetting.style) {
|
|
110
|
+
// 等于配置的样式
|
|
111
|
+
this.myStyle = this.operationSetting.style
|
|
112
|
+
} else if (this.operationIndex !== 0 && (this.operationSetting.elementType === undefined || this.operationSetting.elementType === 'el-button')) {
|
|
113
|
+
// 如果不是第0个元素,且是按钮时,添加左边距10px,使按钮不紧挨着
|
|
114
|
+
this.myStyle = { marginLeft: '10px' }
|
|
115
|
+
}
|
|
116
|
+
if (this.operationSetting.elementType) {
|
|
117
|
+
this.elementType = this.operationSetting.elementType
|
|
118
|
+
}
|
|
119
|
+
// if (!this.operationSetting.icon) {
|
|
120
|
+
// if (this.operationSetting.code === 'lineEditUpdate') {
|
|
121
|
+
// this.operationSetting.icon = 'el-icon-edit'
|
|
122
|
+
// } else if (this.operationSetting.code === 'lineEditSave') {
|
|
123
|
+
// this.operationSetting.icon = 'el-icon-check'
|
|
124
|
+
// } else if (this.operationSetting.code === 'lineEditDelete') {
|
|
125
|
+
// this.operationSetting.icon = 'el-icon-delete'
|
|
126
|
+
// } else if (this.operationSetting.code === 'restoreEdit') {
|
|
127
|
+
// this.operationSetting.icon = 'el-icon-circle-close'
|
|
128
|
+
// } else if (this.operationSetting.code === 'viewDetail') {
|
|
129
|
+
// this.operationSetting.icon = 'el-icon-view'
|
|
130
|
+
// }
|
|
131
|
+
// }
|
|
132
|
+
},
|
|
133
|
+
methods: {
|
|
134
|
+
onClickFun() {
|
|
135
|
+
customFormatter.onClickFun(this.entity, this.column, this.onClick, this.rowIndex)
|
|
136
|
+
},
|
|
137
|
+
isShowButton() {
|
|
138
|
+
// const start = new Date().getTime()
|
|
139
|
+
const val = customFormatter.isShowButtonFun(this.entity, this.column, this.isShow, this.rowIndex)
|
|
140
|
+
if (val) {
|
|
141
|
+
if (this.editing) {
|
|
142
|
+
if (this.operationSetting.code === 'lineEditUpdate') {
|
|
143
|
+
return false
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
if (this.operationSetting.code === 'restoreEdit') {
|
|
147
|
+
return false
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// const end = new Date().getTime()
|
|
152
|
+
// console.log('---super-grid--isShowButtonFun--time1=', (end - start))
|
|
153
|
+
return val
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
</script>
|
|
158
|
+
|
|
159
|
+
<style lang="scss" scoped>
|
|
160
|
+
|
|
161
|
+
</style>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="text-align: right">
|
|
3
|
+
<!-- :loading="loading" -->
|
|
4
|
+
<el-button size="small" @click="$emit('save-condition')">
|
|
5
|
+
{{ $t('superGrid.saveCondition') }}
|
|
6
|
+
</el-button>
|
|
7
|
+
<el-button :loading="loading" size="small" @click="resetForm">
|
|
8
|
+
{{ $t('imatrixUIPublicModel.reset') }}
|
|
9
|
+
</el-button>
|
|
10
|
+
<el-button :loading="loading" type="primary" size="small" @click="submitForm">
|
|
11
|
+
{{ $t('imatrixUIMessage.search') }}
|
|
12
|
+
</el-button>
|
|
13
|
+
<el-button size="small" type="text" :icon="isMyOpen?'el-icon-caret-top':'el-icon-caret-bottom'" @click="openFold">
|
|
14
|
+
{{ isMyOpen?$t('superGrid.fold'): $t('superGrid.open') }}
|
|
15
|
+
</el-button>
|
|
16
|
+
<!-- <span v-if="advancedQuery !== null && advancedQuery!== undefined && advancedQuery === true && normalQuery !== null && normalQuery!== undefined && normalQuery === true" style="margin-left:10px">
|
|
17
|
+
<el-button v-if="searchType === 'advanced'" size="mini" @click="searchType = 'normal'">
|
|
18
|
+
{{ $t('imatrixUIPublicModel.switchToNormalQuery') }}
|
|
19
|
+
</el-button>
|
|
20
|
+
<el-button v-if="searchType === 'normal'" size="mini" @click="searchType = 'advanced'">
|
|
21
|
+
{{ $t('imatrixUIPublicModel.switchToAdvancedQuery') }}
|
|
22
|
+
</el-button>
|
|
23
|
+
</span> -->
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
export default {
|
|
29
|
+
name: 'SearchButton',
|
|
30
|
+
props: {
|
|
31
|
+
isOpen: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
data() {
|
|
37
|
+
const isMyOpen = this.isOpen
|
|
38
|
+
return {
|
|
39
|
+
isMyOpen, // false表示折叠状态,应该显示“展开”,true表示当前是展开状态,应该显示“折叠”
|
|
40
|
+
loading: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
openFold() {
|
|
45
|
+
this.isMyOpen = !this.isMyOpen
|
|
46
|
+
this.$emit('open-fold', this.isMyOpen)
|
|
47
|
+
},
|
|
48
|
+
submitForm() {
|
|
49
|
+
this.loading = true
|
|
50
|
+
this.$emit('submit-form')
|
|
51
|
+
},
|
|
52
|
+
resetForm() {
|
|
53
|
+
this.loading = true
|
|
54
|
+
this.$emit('reset-form')
|
|
55
|
+
},
|
|
56
|
+
// 加载完毕
|
|
57
|
+
searchComplete() {
|
|
58
|
+
this.loading = false
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style lang="scss" scoped>
|
|
65
|
+
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-dialog
|
|
4
|
+
visible
|
|
5
|
+
:title="$t('superGrid.saveConditionTitle')"
|
|
6
|
+
:close-on-click-modal="false"
|
|
7
|
+
append-to-body
|
|
8
|
+
@open="$emit('open')"
|
|
9
|
+
@opend="$emit('opend')"
|
|
10
|
+
@close="$emit('close')"
|
|
11
|
+
@closed="$emit('closed')"
|
|
12
|
+
>
|
|
13
|
+
<el-form ref="conditionForm" :model="searchCondition" size="mini" label-position="left" label-width="120px">
|
|
14
|
+
<el-form-item
|
|
15
|
+
prop="conditionName"
|
|
16
|
+
:label="$t('superGrid.searchConditionName')"
|
|
17
|
+
:rules="[
|
|
18
|
+
{ required:true, message: this.$t('superGrid.pleaseInputSearchConditionName'),trigger:'blur'}
|
|
19
|
+
]"
|
|
20
|
+
>
|
|
21
|
+
<el-input v-model="searchCondition.conditionName" size="mini" />
|
|
22
|
+
</el-form-item>
|
|
23
|
+
</el-form>
|
|
24
|
+
<template v-slot:footer>
|
|
25
|
+
<div class="dialog-footer" style="padding-bottom:10px">
|
|
26
|
+
<el-button size="small" @click="$emit('close')">
|
|
27
|
+
{{ $t('imatrixUIPublicModel.cancel') }}
|
|
28
|
+
</el-button>
|
|
29
|
+
<el-button size="small" type="primary" @click="saveCondition">
|
|
30
|
+
{{ $t('imatrixUIPublicModel.sure') }}
|
|
31
|
+
</el-button>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
</el-dialog>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
<script>
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
name: 'SearchConditionInput',
|
|
41
|
+
data() {
|
|
42
|
+
return {
|
|
43
|
+
searchCondition: {
|
|
44
|
+
conditionName: null
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
saveCondition() {
|
|
50
|
+
this.$refs['conditionForm'].validate((valid) => {
|
|
51
|
+
if (valid) {
|
|
52
|
+
this.$emit('close', this.searchCondition.conditionName)
|
|
53
|
+
} else {
|
|
54
|
+
// console.log('error submit!!')
|
|
55
|
+
return false
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-tabs v-model="editConditionId" type="card" @tab-remove="removeCondition" @tab-click="selectCondition">
|
|
3
|
+
<el-tab-pane
|
|
4
|
+
v-for="item in searchConditions"
|
|
5
|
+
:key="item.id"
|
|
6
|
+
:label="item.name"
|
|
7
|
+
:disabled="item.queryType !== pageQueryType"
|
|
8
|
+
:closable="item.queryType === pageQueryType"
|
|
9
|
+
:name="item.id+''"
|
|
10
|
+
/>
|
|
11
|
+
</el-tabs>
|
|
12
|
+
</template>
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
name: 'SearchConditionList',
|
|
16
|
+
components: {
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
searchConditions: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: null
|
|
22
|
+
},
|
|
23
|
+
searchType: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: null
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
data() {
|
|
29
|
+
let pageQueryType = 'FIXED'
|
|
30
|
+
if (this.searchType && this.searchType === 'advanced') {
|
|
31
|
+
pageQueryType = 'CUSTOM'
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
pageQueryType,
|
|
35
|
+
editConditionId: null // 当前选择的条件id
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
watch: {
|
|
39
|
+
searchType: {
|
|
40
|
+
handler(newValue, oldValue) {
|
|
41
|
+
this.searchType = newValue
|
|
42
|
+
this.pageQueryType = 'FIXED'
|
|
43
|
+
if (newValue && newValue === 'advanced') {
|
|
44
|
+
this.pageQueryType = 'CUSTOM'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
removeCondition(conditionId) {
|
|
51
|
+
this.$emit('remove-condition', conditionId)
|
|
52
|
+
},
|
|
53
|
+
selectCondition(tab, event) {
|
|
54
|
+
const conditionId = tab.name
|
|
55
|
+
this.$emit('select-condition', conditionId)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</script>
|