vue2-client 1.18.36 → 1.18.37
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/.eslintrc.js +90 -90
- package/Components.md +60 -60
- package/docs/index.md +30 -30
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.setup.js +7 -7
- package/package.json +1 -1
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
- package/src/base-client/components/common/CreateQuery/index.js +3 -3
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
- package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Tree/Tree.vue +149 -149
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +174 -174
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +322 -322
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XFormTable/demo.vue +125 -125
- package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTable/XTable.vue +1715 -1715
- package/src/base-client/components/common/XTable/XTableWrapper.vue +759 -756
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/components/Charts/Bar.vue +62 -62
- package/src/components/Charts/ChartCard.vue +134 -134
- package/src/components/Charts/Liquid.vue +67 -67
- package/src/components/Charts/MiniArea.vue +39 -39
- package/src/components/Charts/MiniBar.vue +39 -39
- package/src/components/Charts/MiniProgress.vue +75 -75
- package/src/components/Charts/MiniSmoothArea.vue +40 -40
- package/src/components/Charts/Radar.vue +68 -68
- package/src/components/Charts/RankList.vue +77 -77
- package/src/components/Charts/TagCloud.vue +113 -113
- package/src/components/Charts/TransferBar.vue +64 -64
- package/src/components/Charts/Trend.vue +82 -82
- package/src/components/Charts/chart.less +12 -12
- package/src/components/Charts/smooth.area.less +13 -13
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/NumberInfo/index.js +3 -3
- package/src/components/NumberInfo/index.less +54 -54
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/card/ChartCard.vue +79 -79
- package/src/components/chart/Bar.vue +60 -60
- package/src/components/chart/MiniArea.vue +67 -67
- package/src/components/chart/MiniBar.vue +59 -59
- package/src/components/chart/MiniProgress.vue +57 -57
- package/src/components/chart/Radar.vue +80 -80
- package/src/components/chart/RankingList.vue +60 -60
- package/src/components/chart/Trend.vue +79 -79
- package/src/components/chart/index.less +9 -9
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/input/IInput.vue +66 -66
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/config/CreateQueryConfig.js +325 -325
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/layouts/header/HeaderNotice.vue +177 -177
- package/src/lib.js +1 -1
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/XTreeOneProExample/index.vue +67 -67
- package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/services/api/cas.js +79 -79
- package/src/store/modules/setting.js +119 -119
- package/src/utils/authority-utils.js +85 -85
- package/src/utils/errorCode.js +6 -6
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="row">
|
|
3
|
-
<div class="content">
|
|
4
|
-
<a-skeleton :loading="loading" :paragraph="{ rows: 4 }" />
|
|
5
|
-
<div v-show="!loading">
|
|
6
|
-
<template v-if="!loadError">
|
|
7
|
-
<a-descriptions v-if="realData" :column="isMobile ? 1 : column" size="small" :title="title">
|
|
8
|
-
<a-descriptions-item
|
|
9
|
-
v-for="(value, key) in realData"
|
|
10
|
-
:key="key"
|
|
11
|
-
:label="key">
|
|
12
|
-
{{ formatText(value) }}
|
|
13
|
-
</a-descriptions-item>
|
|
14
|
-
</a-descriptions>
|
|
15
|
-
</template>
|
|
16
|
-
<template v-else>
|
|
17
|
-
<a-empty>
|
|
18
|
-
<span slot="description"> 页面配置不存在,请联系系统管理员 </span>
|
|
19
|
-
</a-empty>
|
|
20
|
-
</template>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="extra" v-if="extraShow">
|
|
24
|
-
<slot name="addonAfter"/>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
<script>
|
|
29
|
-
|
|
30
|
-
import { mapState } from 'vuex'
|
|
31
|
-
import { getRealKeyData } from '@vue2-client/utils/formatter'
|
|
32
|
-
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
33
|
-
|
|
34
|
-
export default {
|
|
35
|
-
name: 'XDescriptions',
|
|
36
|
-
components: {
|
|
37
|
-
},
|
|
38
|
-
props: {
|
|
39
|
-
// 标题
|
|
40
|
-
title: {
|
|
41
|
-
type: String,
|
|
42
|
-
required: true
|
|
43
|
-
},
|
|
44
|
-
// 内容
|
|
45
|
-
content: {
|
|
46
|
-
type: Object,
|
|
47
|
-
required: true
|
|
48
|
-
},
|
|
49
|
-
// 模型名
|
|
50
|
-
model: {
|
|
51
|
-
type: String,
|
|
52
|
-
required: false,
|
|
53
|
-
default: ''
|
|
54
|
-
},
|
|
55
|
-
// 配置名称
|
|
56
|
-
configName: {
|
|
57
|
-
type: String,
|
|
58
|
-
required: true
|
|
59
|
-
},
|
|
60
|
-
// 配置所属命名空间
|
|
61
|
-
serviceName: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: undefined
|
|
64
|
-
},
|
|
65
|
-
env: {
|
|
66
|
-
type: String,
|
|
67
|
-
default: 'prod'
|
|
68
|
-
},
|
|
69
|
-
// 每列显示数量
|
|
70
|
-
column: {
|
|
71
|
-
type: Number,
|
|
72
|
-
default: 2
|
|
73
|
-
},
|
|
74
|
-
// 每列显示数量
|
|
75
|
-
getRealData: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: false
|
|
78
|
-
},
|
|
79
|
-
// 是否展示插槽
|
|
80
|
-
extraShow: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
default: true
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
created () {
|
|
86
|
-
this.initConfig()
|
|
87
|
-
},
|
|
88
|
-
data () {
|
|
89
|
-
return {
|
|
90
|
-
// 加载状态
|
|
91
|
-
loading: false,
|
|
92
|
-
loadError: false,
|
|
93
|
-
realData: undefined
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
computed: {
|
|
97
|
-
...mapState('setting', { isMobile: 'isMobile' })
|
|
98
|
-
},
|
|
99
|
-
methods: {
|
|
100
|
-
initConfig () {
|
|
101
|
-
this.loading = true
|
|
102
|
-
this.loadError = false
|
|
103
|
-
if (this.configName) {
|
|
104
|
-
this.getConfig()
|
|
105
|
-
} else {
|
|
106
|
-
this.loading = false
|
|
107
|
-
this.loadError = true
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
getConfig () {
|
|
111
|
-
getConfigByName(this.configName, this.serviceName, (res) => {
|
|
112
|
-
const mapIndex = {}
|
|
113
|
-
const result = {}
|
|
114
|
-
if (res.formJson) {
|
|
115
|
-
res.formJson.filter(item => {
|
|
116
|
-
const model = item.model
|
|
117
|
-
return model.indexOf(this.model) > 0
|
|
118
|
-
})[0].groupItems.forEach(item => {
|
|
119
|
-
mapIndex[item.model.substring(item.model.indexOf('_') + 1)] = item.name
|
|
120
|
-
})
|
|
121
|
-
for (const key of Object.keys(this.content)) {
|
|
122
|
-
const name = mapIndex[key]
|
|
123
|
-
if (name) {
|
|
124
|
-
result[name] = this.content[key]
|
|
125
|
-
} else {
|
|
126
|
-
result[key] = this.content[key]
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
} else if (res.column) {
|
|
130
|
-
// [{label:'标签1',filed:'字段1'}]
|
|
131
|
-
let content = {}
|
|
132
|
-
if (this.getRealData) {
|
|
133
|
-
content = getRealKeyData(this.content)
|
|
134
|
-
} else {
|
|
135
|
-
content = this.content
|
|
136
|
-
}
|
|
137
|
-
if (typeof content === 'string') {
|
|
138
|
-
content = JSON.parse(content)
|
|
139
|
-
}
|
|
140
|
-
res.column.forEach(item => {
|
|
141
|
-
result[item.label] = content[item.filed]
|
|
142
|
-
})
|
|
143
|
-
}
|
|
144
|
-
this.realData = result
|
|
145
|
-
this.loading = false
|
|
146
|
-
}, this.env === 'dev')
|
|
147
|
-
},
|
|
148
|
-
// 文字格式化
|
|
149
|
-
formatText (value) {
|
|
150
|
-
return value ?? '--'
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
</script>
|
|
155
|
-
<style>
|
|
156
|
-
.row {
|
|
157
|
-
display: flex;
|
|
158
|
-
|
|
159
|
-
.content {
|
|
160
|
-
-webkit-box-flex: 1;
|
|
161
|
-
flex: auto;
|
|
162
|
-
-ms-flex: auto;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.extra {
|
|
166
|
-
flex: 0 1 auto;
|
|
167
|
-
-webkit-box-flex: 0;
|
|
168
|
-
-ms-flex: 0 1 auto;
|
|
169
|
-
min-width: 242px;
|
|
170
|
-
margin-left: 88px;
|
|
171
|
-
text-align: right;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="row">
|
|
3
|
+
<div class="content">
|
|
4
|
+
<a-skeleton :loading="loading" :paragraph="{ rows: 4 }" />
|
|
5
|
+
<div v-show="!loading">
|
|
6
|
+
<template v-if="!loadError">
|
|
7
|
+
<a-descriptions v-if="realData" :column="isMobile ? 1 : column" size="small" :title="title">
|
|
8
|
+
<a-descriptions-item
|
|
9
|
+
v-for="(value, key) in realData"
|
|
10
|
+
:key="key"
|
|
11
|
+
:label="key">
|
|
12
|
+
{{ formatText(value) }}
|
|
13
|
+
</a-descriptions-item>
|
|
14
|
+
</a-descriptions>
|
|
15
|
+
</template>
|
|
16
|
+
<template v-else>
|
|
17
|
+
<a-empty>
|
|
18
|
+
<span slot="description"> 页面配置不存在,请联系系统管理员 </span>
|
|
19
|
+
</a-empty>
|
|
20
|
+
</template>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="extra" v-if="extraShow">
|
|
24
|
+
<slot name="addonAfter"/>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<script>
|
|
29
|
+
|
|
30
|
+
import { mapState } from 'vuex'
|
|
31
|
+
import { getRealKeyData } from '@vue2-client/utils/formatter'
|
|
32
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
name: 'XDescriptions',
|
|
36
|
+
components: {
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
// 标题
|
|
40
|
+
title: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
44
|
+
// 内容
|
|
45
|
+
content: {
|
|
46
|
+
type: Object,
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
// 模型名
|
|
50
|
+
model: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: false,
|
|
53
|
+
default: ''
|
|
54
|
+
},
|
|
55
|
+
// 配置名称
|
|
56
|
+
configName: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: true
|
|
59
|
+
},
|
|
60
|
+
// 配置所属命名空间
|
|
61
|
+
serviceName: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: undefined
|
|
64
|
+
},
|
|
65
|
+
env: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: 'prod'
|
|
68
|
+
},
|
|
69
|
+
// 每列显示数量
|
|
70
|
+
column: {
|
|
71
|
+
type: Number,
|
|
72
|
+
default: 2
|
|
73
|
+
},
|
|
74
|
+
// 每列显示数量
|
|
75
|
+
getRealData: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
78
|
+
},
|
|
79
|
+
// 是否展示插槽
|
|
80
|
+
extraShow: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
created () {
|
|
86
|
+
this.initConfig()
|
|
87
|
+
},
|
|
88
|
+
data () {
|
|
89
|
+
return {
|
|
90
|
+
// 加载状态
|
|
91
|
+
loading: false,
|
|
92
|
+
loadError: false,
|
|
93
|
+
realData: undefined
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
computed: {
|
|
97
|
+
...mapState('setting', { isMobile: 'isMobile' })
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
initConfig () {
|
|
101
|
+
this.loading = true
|
|
102
|
+
this.loadError = false
|
|
103
|
+
if (this.configName) {
|
|
104
|
+
this.getConfig()
|
|
105
|
+
} else {
|
|
106
|
+
this.loading = false
|
|
107
|
+
this.loadError = true
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
getConfig () {
|
|
111
|
+
getConfigByName(this.configName, this.serviceName, (res) => {
|
|
112
|
+
const mapIndex = {}
|
|
113
|
+
const result = {}
|
|
114
|
+
if (res.formJson) {
|
|
115
|
+
res.formJson.filter(item => {
|
|
116
|
+
const model = item.model
|
|
117
|
+
return model.indexOf(this.model) > 0
|
|
118
|
+
})[0].groupItems.forEach(item => {
|
|
119
|
+
mapIndex[item.model.substring(item.model.indexOf('_') + 1)] = item.name
|
|
120
|
+
})
|
|
121
|
+
for (const key of Object.keys(this.content)) {
|
|
122
|
+
const name = mapIndex[key]
|
|
123
|
+
if (name) {
|
|
124
|
+
result[name] = this.content[key]
|
|
125
|
+
} else {
|
|
126
|
+
result[key] = this.content[key]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
} else if (res.column) {
|
|
130
|
+
// [{label:'标签1',filed:'字段1'}]
|
|
131
|
+
let content = {}
|
|
132
|
+
if (this.getRealData) {
|
|
133
|
+
content = getRealKeyData(this.content)
|
|
134
|
+
} else {
|
|
135
|
+
content = this.content
|
|
136
|
+
}
|
|
137
|
+
if (typeof content === 'string') {
|
|
138
|
+
content = JSON.parse(content)
|
|
139
|
+
}
|
|
140
|
+
res.column.forEach(item => {
|
|
141
|
+
result[item.label] = content[item.filed]
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
this.realData = result
|
|
145
|
+
this.loading = false
|
|
146
|
+
}, this.env === 'dev')
|
|
147
|
+
},
|
|
148
|
+
// 文字格式化
|
|
149
|
+
formatText (value) {
|
|
150
|
+
return value ?? '--'
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
</script>
|
|
155
|
+
<style>
|
|
156
|
+
.row {
|
|
157
|
+
display: flex;
|
|
158
|
+
|
|
159
|
+
.content {
|
|
160
|
+
-webkit-box-flex: 1;
|
|
161
|
+
flex: auto;
|
|
162
|
+
-ms-flex: auto;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.extra {
|
|
166
|
+
flex: 0 1 auto;
|
|
167
|
+
-webkit-box-flex: 0;
|
|
168
|
+
-ms-flex: 0 1 auto;
|
|
169
|
+
min-width: 242px;
|
|
170
|
+
margin-left: 88px;
|
|
171
|
+
text-align: right;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
</style>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XDescriptions from './XDescriptions.vue'
|
|
2
|
-
|
|
3
|
-
export default XDescriptions
|
|
1
|
+
import XDescriptions from './XDescriptions.vue'
|
|
2
|
+
|
|
3
|
+
export default XDescriptions
|