vue2-client 1.8.438 → 1.8.440
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 +1 -1
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +6 -2
- package/src/base-client/components/common/XBadge/XBadge.vue +9 -1
- package/src/base-client/components/common/XForm/XFormItem.vue +1 -1
- package/src/base-client/components/common/XReport/XReport.vue +1 -1
- package/src/base-client/components/common/XTable/XTable.vue +10 -2
- package/src/base-client/plugins/AppData.js +4 -4
- package/src/layouts/GridView.vue +43 -0
- package/src/services/api/common.js +1 -0
package/package.json
CHANGED
|
@@ -271,9 +271,9 @@ export default {
|
|
|
271
271
|
getFromItem (formItems, formJson) {
|
|
272
272
|
const _formItems = formItems || formJson
|
|
273
273
|
if (typeof formItems === 'string') {
|
|
274
|
-
|
|
274
|
+
return JSON.parse(_formItems)
|
|
275
275
|
} else {
|
|
276
|
-
|
|
276
|
+
return JSON.parse(JSON.stringify(_formItems))
|
|
277
277
|
}
|
|
278
278
|
},
|
|
279
279
|
// 时间组件赋默认值
|
|
@@ -680,6 +680,10 @@ export default {
|
|
|
680
680
|
},
|
|
681
681
|
// 默认提交事件
|
|
682
682
|
defaultSubmit (realForm, callback) {
|
|
683
|
+
// 新增移除id
|
|
684
|
+
if (this.businessType === '新增') {
|
|
685
|
+
delete realForm.id
|
|
686
|
+
}
|
|
683
687
|
// 组织请求
|
|
684
688
|
const requestParameters = {
|
|
685
689
|
queryParamsName: this.configName,
|
|
@@ -35,6 +35,14 @@ export default {
|
|
|
35
35
|
type: String,
|
|
36
36
|
default: ''
|
|
37
37
|
},
|
|
38
|
+
serviceName: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: process.env.VUE_APP_SYSTEM_NAME
|
|
41
|
+
},
|
|
42
|
+
env: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'prod'
|
|
45
|
+
},
|
|
38
46
|
isExternalText: {
|
|
39
47
|
type: Boolean,
|
|
40
48
|
required: false
|
|
@@ -65,7 +73,7 @@ export default {
|
|
|
65
73
|
this.dictionary = result
|
|
66
74
|
return
|
|
67
75
|
}
|
|
68
|
-
this.dictionary = await this.$appdata.getDictValue(this.badgeKey, this.value, undefined)
|
|
76
|
+
this.dictionary = await this.$appdata.getDictValue(this.badgeKey, this.value, undefined, this.env === 'dev', this.serviceName)
|
|
69
77
|
},
|
|
70
78
|
badgeFilter (key, value) {
|
|
71
79
|
return this.$appdata.getParam(key, value)
|
|
@@ -885,7 +885,7 @@ export default {
|
|
|
885
885
|
this.initRadioValue()
|
|
886
886
|
} else if (this.attr.type === 'richText') {
|
|
887
887
|
this.initRichText()
|
|
888
|
-
} else if (this.attr.keyName) {
|
|
888
|
+
} else if (this.attr.keyName && typeof this.attr.keyName === 'string') {
|
|
889
889
|
if (this.attr.keyName.indexOf('logic@') !== -1) {
|
|
890
890
|
this.getData({}, res => this.getDataCallback(res))
|
|
891
891
|
} else if (this.attr.keyName.indexOf('search@') !== -1) {
|
|
@@ -33,6 +33,12 @@
|
|
|
33
33
|
@click="importData">
|
|
34
34
|
<a-icon :style="iconStyle" type="import"/>导入
|
|
35
35
|
</a-button>
|
|
36
|
+
<a-button
|
|
37
|
+
v-if="!buttonState || buttonState.import && buttonRendering('editRow')"
|
|
38
|
+
type="dashed"
|
|
39
|
+
@click="()=>editRow = true">
|
|
40
|
+
<a-icon :style="iconStyle" type="import"/>行编辑
|
|
41
|
+
</a-button>
|
|
36
42
|
<a-dropdown v-if="!buttonState || buttonState.export && buttonRendering('export')">
|
|
37
43
|
<a-menu slot="overlay">
|
|
38
44
|
<a-menu-item :disabled="selectedRowKeys.length === 0" key="1" @click="handleExport(true)"><a-icon
|
|
@@ -127,7 +133,7 @@
|
|
|
127
133
|
</span>
|
|
128
134
|
<!-- 徽标(badge) -->
|
|
129
135
|
<span v-else-if="item.slotType === 'badge'" :key="'badge-' + c_index">
|
|
130
|
-
<x-badge v-if="text !== null && text !== undefined" :badge-key="item.slotKeyMap" :value="text"/>
|
|
136
|
+
<x-badge :service-name="serviceName" :env="env" v-if="text !== null && text !== undefined" :badge-key="item.slotKeyMap" :value="text"/>
|
|
131
137
|
</span>
|
|
132
138
|
<!-- 日期(date) -->
|
|
133
139
|
<span v-else-if="item.slotType === 'date'" :key="'date-' + c_index">
|
|
@@ -360,7 +366,9 @@ export default {
|
|
|
360
366
|
// 允许看板模式
|
|
361
367
|
allowCardMode: false,
|
|
362
368
|
// 看板模式配置
|
|
363
|
-
cardModeConfig: undefined
|
|
369
|
+
cardModeConfig: undefined,
|
|
370
|
+
// 是否开启行编辑
|
|
371
|
+
editRow: false
|
|
364
372
|
}
|
|
365
373
|
},
|
|
366
374
|
props: {
|
|
@@ -54,7 +54,7 @@ const GetAppDataService = {
|
|
|
54
54
|
const object = JSON.parse(str)
|
|
55
55
|
return object[key]
|
|
56
56
|
},
|
|
57
|
-
async getDictValue (dictKey, value, func) {
|
|
57
|
+
async getDictValue (dictKey, value, func, isDev = false, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
|
|
58
58
|
const processResult = (result) => {
|
|
59
59
|
if (!result.value) {
|
|
60
60
|
return {
|
|
@@ -75,12 +75,12 @@ const GetAppDataService = {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
if (func) {
|
|
78
|
-
getConfigByName(dictKey,
|
|
78
|
+
getConfigByName(dictKey, serviceName, result => {
|
|
79
79
|
func(processResult(result))
|
|
80
|
-
})
|
|
80
|
+
}, isDev)
|
|
81
81
|
} else {
|
|
82
82
|
const result = await new Promise((resolve) => {
|
|
83
|
-
getConfigByName(dictKey,
|
|
83
|
+
getConfigByName(dictKey, serviceName, resolve, isDev)
|
|
84
84
|
})
|
|
85
85
|
return processResult(result)
|
|
86
86
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="test">
|
|
3
|
+
<a-card :bordered="false">
|
|
4
|
+
<XReport
|
|
5
|
+
ref="main"
|
|
6
|
+
:use-oss-for-img="false"
|
|
7
|
+
config-name="adviceCheckCover"
|
|
8
|
+
:show-img-in-cell="true"
|
|
9
|
+
:display-only="true"
|
|
10
|
+
:edit-mode="false"
|
|
11
|
+
:show-save-button="false"
|
|
12
|
+
:no-padding="true"
|
|
13
|
+
:dont-format="true"/>
|
|
14
|
+
</a-card>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import XReport from '@vue2-client/base-client/components/common/XReport'
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'GridView',
|
|
23
|
+
components: {
|
|
24
|
+
XReport
|
|
25
|
+
},
|
|
26
|
+
mounted () {
|
|
27
|
+
// 获取当前路由中的meta
|
|
28
|
+
this.configName = this.$router.currentRoute.meta.configName
|
|
29
|
+
this.nothing = !this.configName
|
|
30
|
+
},
|
|
31
|
+
data () {
|
|
32
|
+
return {
|
|
33
|
+
configName: '',
|
|
34
|
+
nothing: false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
<style scoped>
|
|
42
|
+
|
|
43
|
+
</style>
|