flame-plus 0.1.17 → 0.1.19
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/package.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<script lang="ts" setup>
|
|
40
40
|
import { PropType, ref, Ref, computed, ComputedRef } from 'vue'
|
|
41
41
|
import { flmForm } from '../../index'
|
|
42
|
-
import { SearchConfig, FormItemConfig } from '../../../model/flmComponentConfig'
|
|
42
|
+
import { SearchConfig, FormItemConfig ,ButtonType} from '../../../model/flmComponentConfig'
|
|
43
43
|
import { isValidKey } from '../../../utils'
|
|
44
44
|
|
|
45
45
|
const emit = defineEmits(['searchSubmit', 'searchReset', 'searchCustomEvent'])
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<slot :name="`search-${searchSlot}`" :prop="prop" :formModel="formModel"></slot>
|
|
11
11
|
</template>
|
|
12
12
|
</flmSearch>
|
|
13
|
-
<flmToolbar class="page-toolbar" :config="reportPageConfig.toolbar" @toolbarClick="toolbarClick" />
|
|
13
|
+
<flmToolbar v-if="isDialog==false" class="page-toolbar" :config="reportPageConfig.toolbar" @toolbarClick="toolbarClick" />
|
|
14
14
|
<flmTable
|
|
15
15
|
class="page-table"
|
|
16
16
|
:config="reportPageConfig.table"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</template>
|
|
64
64
|
|
|
65
65
|
<script lang="ts" setup>
|
|
66
|
-
import { ref, Ref, computed, onMounted } from 'vue'
|
|
66
|
+
import { ref, Ref, computed, onMounted,toRaw } from 'vue'
|
|
67
67
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
68
68
|
import {
|
|
69
69
|
flmForm,
|
|
@@ -72,21 +72,26 @@ import {
|
|
|
72
72
|
flmTable,
|
|
73
73
|
flmPagination,
|
|
74
74
|
flmDialog
|
|
75
|
-
} from '
|
|
75
|
+
} from '../../index'
|
|
76
76
|
import {
|
|
77
77
|
FormItemConfig,
|
|
78
78
|
FormConfig,
|
|
79
79
|
TableColumnConfig,
|
|
80
80
|
ReportPageSetting,
|
|
81
|
-
} from '
|
|
82
|
-
import { isValidKey } from '
|
|
81
|
+
} from '../../../model/flmComponentConfig'
|
|
82
|
+
import { isValidKey } from '../../../utils'
|
|
83
83
|
import request from '@/plugins/request'
|
|
84
|
+
import { is } from '@babel/types'
|
|
84
85
|
|
|
85
86
|
const props = defineProps({
|
|
86
87
|
// 表名
|
|
87
88
|
tableName: {
|
|
88
89
|
type: String,
|
|
89
90
|
required: true
|
|
91
|
+
},
|
|
92
|
+
isDialog:{
|
|
93
|
+
type:Boolean,
|
|
94
|
+
default:false,
|
|
90
95
|
}
|
|
91
96
|
})
|
|
92
97
|
|
|
@@ -152,14 +157,21 @@ const queryPageSetting = () => {
|
|
|
152
157
|
const reportPageSetting: ReportPageSetting = items
|
|
153
158
|
reportPageSetting.table['height'] = tableHeight()
|
|
154
159
|
reportPageSetting.table['max-height'] = tableHeight()
|
|
155
|
-
|
|
160
|
+
if(props.isDialog==false) {
|
|
161
|
+
reportPageSetting.tableAction.buttons.length && reportPageSetting.table.columns?.push({
|
|
156
162
|
prop: 'tableAction',
|
|
157
163
|
label: '操作',
|
|
158
164
|
isSlot: true,
|
|
165
|
+
align: 'center',
|
|
166
|
+
'header-align':'center',
|
|
159
167
|
fixed: 'right',
|
|
160
|
-
'min-width': '200px'
|
|
168
|
+
'min-width': '200px',
|
|
169
|
+
'width': '200px'
|
|
161
170
|
})
|
|
171
|
+
}
|
|
172
|
+
|
|
162
173
|
reportPageConfig.value = reportPageSetting
|
|
174
|
+
isLoaded.value =true;
|
|
163
175
|
queryPageData()
|
|
164
176
|
})
|
|
165
177
|
}
|
|
@@ -183,7 +195,6 @@ const queryPageData = () => {
|
|
|
183
195
|
.then(({ items, total }: any) => {
|
|
184
196
|
reportPageConfig.value.table.data = items
|
|
185
197
|
reportPageConfig.value.pagination['total'] = total
|
|
186
|
-
isLoaded.value = true
|
|
187
198
|
})
|
|
188
199
|
}
|
|
189
200
|
|
|
@@ -203,16 +214,15 @@ const searchSubmit = (event: object) => {
|
|
|
203
214
|
const toolbarClick = (event: string) => {
|
|
204
215
|
isValidKey(event, pageDefaultEvent)
|
|
205
216
|
? pageDefaultEvent[event]()
|
|
206
|
-
: emit('customEvent', event)
|
|
217
|
+
: emit('customEvent', {event,data:{}})
|
|
207
218
|
}
|
|
208
219
|
|
|
209
220
|
// 表格操作栏点击
|
|
210
221
|
const tableActionClick = (event: string, scope: any) => {
|
|
211
222
|
isValidKey(event, pageDefaultEvent)
|
|
212
223
|
? pageDefaultEvent[event](scope)
|
|
213
|
-
: emit('customEvent', { event,
|
|
224
|
+
: emit('customEvent', { event,data: toRaw(scope.row) })
|
|
214
225
|
}
|
|
215
|
-
|
|
216
226
|
// 表格操作
|
|
217
227
|
const tableEvent: Record<string, (event?: any) => void> = {
|
|
218
228
|
// 表格勾选项变化
|
|
@@ -242,7 +252,7 @@ const pageDefaultEvent: Record<string, (event?: any) => void> = {
|
|
|
242
252
|
openReadDialog:(scope: any) => {
|
|
243
253
|
request.flameApi.singleSearch({
|
|
244
254
|
tableName: safeTableName.value,
|
|
245
|
-
data: { key: scope.row.flame_id }
|
|
255
|
+
data: { key: scope.row.flame_id ,ref_level:1}
|
|
246
256
|
})
|
|
247
257
|
.then(({ items }: any) => {
|
|
248
258
|
reportPageConfig.value.readForm['model'] = items
|