vue2-client 1.12.96 → 1.12.97
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/XCollapse/XCollapse.vue +247 -247
- package/src/base-client/components/common/XReportGrid/XReportDemo.vue +44 -44
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +709 -709
- package/src/base-client/components/his/XList/XList.vue +131 -131
- package/src/base-client/plugins/AppData.js +126 -126
- package/src/pages/ReportGrid/index.vue +76 -76
- package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +130 -130
- package/src/pages/userInfoDetailManage/userInfoDetailQueryTabs.vue +1 -1
- package/src/router/async/router.map.js +119 -124
- package/src/base-client/components/common/XCollapse/XCollapseDemo.vue +0 -15
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="list-wrapper">
|
|
3
|
-
<a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
|
|
4
|
-
<a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
|
|
5
|
-
<i
|
|
6
|
-
v-if="icon"
|
|
7
|
-
class="icon-menu"
|
|
8
|
-
:style="getIconStyle(item)"
|
|
9
|
-
></i>
|
|
10
|
-
<span
|
|
11
|
-
class="item-text">
|
|
12
|
-
{{ item.number }} {{ item.name }}
|
|
13
|
-
</span>
|
|
14
|
-
<a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
|
|
15
|
-
</a-list-item>
|
|
16
|
-
</a-list>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script>
|
|
21
|
-
|
|
22
|
-
import { runLogic } from '@vue2-client/services/api/common'
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
name: 'XList',
|
|
26
|
-
props: {
|
|
27
|
-
queryParamsName: {
|
|
28
|
-
type: Object,
|
|
29
|
-
default: null
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
inject: ['getComponentByName'],
|
|
33
|
-
data () {
|
|
34
|
-
return {
|
|
35
|
-
data: [],
|
|
36
|
-
button: false,
|
|
37
|
-
icon: false,
|
|
38
|
-
buttonName: ''
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
created () {
|
|
42
|
-
this.getData(this.queryParamsName)
|
|
43
|
-
},
|
|
44
|
-
methods: {
|
|
45
|
-
async getData (config) {
|
|
46
|
-
runLogic(config, {}, 'af-his').then(res => {
|
|
47
|
-
this.button = res.button
|
|
48
|
-
this.icon = res.icon
|
|
49
|
-
this.buttonName = res.buttonName
|
|
50
|
-
this.data = res.data
|
|
51
|
-
})
|
|
52
|
-
},
|
|
53
|
-
handleClick (index) {
|
|
54
|
-
this.$emit('listClick', this.data[index])
|
|
55
|
-
},
|
|
56
|
-
refreshList () {
|
|
57
|
-
this.getData(this.queryParamsName)
|
|
58
|
-
},
|
|
59
|
-
click (index) {
|
|
60
|
-
this.$emit('click', this.data[index + 1])
|
|
61
|
-
},
|
|
62
|
-
getIconStyle (item) {
|
|
63
|
-
return item.picture
|
|
64
|
-
? { backgroundImage: `url(${item.picture})` }
|
|
65
|
-
: {}
|
|
66
|
-
},
|
|
67
|
-
filterData (par) {
|
|
68
|
-
runLogic(this.queryParamsName, par, 'af-his').then(res => {
|
|
69
|
-
this.data = res.data
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
75
|
-
|
|
76
|
-
<style scoped>
|
|
77
|
-
.list-wrapper {
|
|
78
|
-
max-height: 240px;
|
|
79
|
-
overflow-y: auto;
|
|
80
|
-
padding-right: 2px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.list-container {
|
|
84
|
-
width: 100%;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.list-item {
|
|
88
|
-
height: 35px;
|
|
89
|
-
border-radius: 6px;
|
|
90
|
-
background-color: #F4F4F4;
|
|
91
|
-
padding: 8px 15px;
|
|
92
|
-
font-size: 16px;
|
|
93
|
-
display: flex;
|
|
94
|
-
align-items: center;
|
|
95
|
-
width: 100%;
|
|
96
|
-
border: 1px solid #D9D9D9;
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
margin-bottom: 8px !important;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.icon-menu {
|
|
102
|
-
display: inline-block;
|
|
103
|
-
width: 20px;
|
|
104
|
-
height: 20px;
|
|
105
|
-
background-color: #ccc;
|
|
106
|
-
margin-right: 8px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.item-text {
|
|
110
|
-
flex: 1;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.confirm-btn {
|
|
114
|
-
margin-left: auto;
|
|
115
|
-
padding: 0 8px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* 自定义滚动条样式 */
|
|
119
|
-
.list-wrapper::-webkit-scrollbar {
|
|
120
|
-
width: 6px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.list-wrapper::-webkit-scrollbar-thumb {
|
|
124
|
-
background-color: #d9d9d9;
|
|
125
|
-
border-radius: 3px;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.list-wrapper::-webkit-scrollbar-track {
|
|
129
|
-
background-color: #f0f0f0;
|
|
130
|
-
}
|
|
131
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="list-wrapper">
|
|
3
|
+
<a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
|
|
4
|
+
<a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
|
|
5
|
+
<i
|
|
6
|
+
v-if="icon"
|
|
7
|
+
class="icon-menu"
|
|
8
|
+
:style="getIconStyle(item)"
|
|
9
|
+
></i>
|
|
10
|
+
<span
|
|
11
|
+
class="item-text">
|
|
12
|
+
{{ item.number }} {{ item.name }}
|
|
13
|
+
</span>
|
|
14
|
+
<a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
|
|
15
|
+
</a-list-item>
|
|
16
|
+
</a-list>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
|
|
22
|
+
import { runLogic } from '@vue2-client/services/api/common'
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
name: 'XList',
|
|
26
|
+
props: {
|
|
27
|
+
queryParamsName: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: null
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
inject: ['getComponentByName'],
|
|
33
|
+
data () {
|
|
34
|
+
return {
|
|
35
|
+
data: [],
|
|
36
|
+
button: false,
|
|
37
|
+
icon: false,
|
|
38
|
+
buttonName: ''
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
created () {
|
|
42
|
+
this.getData(this.queryParamsName)
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
async getData (config) {
|
|
46
|
+
runLogic(config, {}, 'af-his').then(res => {
|
|
47
|
+
this.button = res.button
|
|
48
|
+
this.icon = res.icon
|
|
49
|
+
this.buttonName = res.buttonName
|
|
50
|
+
this.data = res.data
|
|
51
|
+
})
|
|
52
|
+
},
|
|
53
|
+
handleClick (index) {
|
|
54
|
+
this.$emit('listClick', this.data[index])
|
|
55
|
+
},
|
|
56
|
+
refreshList () {
|
|
57
|
+
this.getData(this.queryParamsName)
|
|
58
|
+
},
|
|
59
|
+
click (index) {
|
|
60
|
+
this.$emit('click', this.data[index + 1])
|
|
61
|
+
},
|
|
62
|
+
getIconStyle (item) {
|
|
63
|
+
return item.picture
|
|
64
|
+
? { backgroundImage: `url(${item.picture})` }
|
|
65
|
+
: {}
|
|
66
|
+
},
|
|
67
|
+
filterData (par) {
|
|
68
|
+
runLogic(this.queryParamsName, par, 'af-his').then(res => {
|
|
69
|
+
this.data = res.data
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style scoped>
|
|
77
|
+
.list-wrapper {
|
|
78
|
+
max-height: 240px;
|
|
79
|
+
overflow-y: auto;
|
|
80
|
+
padding-right: 2px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.list-container {
|
|
84
|
+
width: 100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.list-item {
|
|
88
|
+
height: 35px;
|
|
89
|
+
border-radius: 6px;
|
|
90
|
+
background-color: #F4F4F4;
|
|
91
|
+
padding: 8px 15px;
|
|
92
|
+
font-size: 16px;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
width: 100%;
|
|
96
|
+
border: 1px solid #D9D9D9;
|
|
97
|
+
box-sizing: border-box;
|
|
98
|
+
margin-bottom: 8px !important;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.icon-menu {
|
|
102
|
+
display: inline-block;
|
|
103
|
+
width: 20px;
|
|
104
|
+
height: 20px;
|
|
105
|
+
background-color: #ccc;
|
|
106
|
+
margin-right: 8px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.item-text {
|
|
110
|
+
flex: 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.confirm-btn {
|
|
114
|
+
margin-left: auto;
|
|
115
|
+
padding: 0 8px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* 自定义滚动条样式 */
|
|
119
|
+
.list-wrapper::-webkit-scrollbar {
|
|
120
|
+
width: 6px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.list-wrapper::-webkit-scrollbar-thumb {
|
|
124
|
+
background-color: #d9d9d9;
|
|
125
|
+
border-radius: 3px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.list-wrapper::-webkit-scrollbar-track {
|
|
129
|
+
background-color: #f0f0f0;
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
import { manageApi, post } from '@vue2-client/services/api'
|
|
2
|
-
import { handleTree } from '@vue2-client/utils/util'
|
|
3
|
-
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
4
|
-
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
5
|
-
|
|
6
|
-
const GetAppDataService = {
|
|
7
|
-
install (Vue) {
|
|
8
|
-
// 给vue增添对话框显示方法
|
|
9
|
-
Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
|
|
10
|
-
},
|
|
11
|
-
async load () {
|
|
12
|
-
const params = {}
|
|
13
|
-
await post(manageApi.getDictionaryValue, {}).then((res) => {
|
|
14
|
-
Object.assign(params, res)
|
|
15
|
-
const badgeItemArray = {}
|
|
16
|
-
for (const key of Object.keys(params)) {
|
|
17
|
-
badgeItemArray[key] = {}
|
|
18
|
-
for (const item of params[key]) {
|
|
19
|
-
let status
|
|
20
|
-
if (!item.status) {
|
|
21
|
-
status = 'none'
|
|
22
|
-
} else {
|
|
23
|
-
status = item.status
|
|
24
|
-
}
|
|
25
|
-
badgeItemArray[key][item.value] = {
|
|
26
|
-
status: status,
|
|
27
|
-
text: item.text
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// 追加参数
|
|
32
|
-
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
33
|
-
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
34
|
-
})
|
|
35
|
-
},
|
|
36
|
-
// 返回树形省市区
|
|
37
|
-
async getDivisionsOhChinaForTree () {
|
|
38
|
-
// 获取省市区数据
|
|
39
|
-
return new Promise((resolve, reject) => {
|
|
40
|
-
try {
|
|
41
|
-
indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, res => {
|
|
42
|
-
resolve(res)
|
|
43
|
-
}, processRes => {
|
|
44
|
-
return handleTree(processRes, 'code', 'parentcode')
|
|
45
|
-
})
|
|
46
|
-
} catch (e) {
|
|
47
|
-
reject(e)
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
},
|
|
51
|
-
// 旧版获取配置中心字典
|
|
52
|
-
getDictionaryList (key) {
|
|
53
|
-
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
54
|
-
const object = JSON.parse(str)
|
|
55
|
-
return object[key]
|
|
56
|
-
},
|
|
57
|
-
async getDictValue (dictKey, value, func, isDev = false, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
|
|
58
|
-
const processResult = (result) => {
|
|
59
|
-
if (!result.value) {
|
|
60
|
-
return {
|
|
61
|
-
status: 'none',
|
|
62
|
-
text: value
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const item = result.value.find(item => item.value == value)
|
|
66
|
-
if (item) {
|
|
67
|
-
return {
|
|
68
|
-
status: item.status || 'none',
|
|
69
|
-
text: item.label
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
status: 'none',
|
|
74
|
-
text: value
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (func) {
|
|
78
|
-
getConfigByName(dictKey, serviceName, result => {
|
|
79
|
-
func(processResult(result))
|
|
80
|
-
}, isDev)
|
|
81
|
-
} else {
|
|
82
|
-
const result = await new Promise((resolve) => {
|
|
83
|
-
getConfigByName(dictKey, serviceName, resolve, isDev)
|
|
84
|
-
})
|
|
85
|
-
return processResult(result)
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
// 新版获取配置中心字典推荐使用 服务名默认为当前服务
|
|
89
|
-
getDictByKey (dictKey, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
|
|
90
|
-
getConfigByName(dictKey, undefined, result => {
|
|
91
|
-
callback(result.value)
|
|
92
|
-
}, isDev)
|
|
93
|
-
},
|
|
94
|
-
getParam (key, value, callback) {
|
|
95
|
-
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
96
|
-
const object = JSON.parse(str)
|
|
97
|
-
if (object && object[key]) {
|
|
98
|
-
const result = object[key]
|
|
99
|
-
if (Object.prototype.hasOwnProperty.call(result, value)) {
|
|
100
|
-
return result[value]
|
|
101
|
-
} else {
|
|
102
|
-
return { status: 'none', text: value }
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return null
|
|
106
|
-
},
|
|
107
|
-
getParams () {
|
|
108
|
-
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
109
|
-
return JSON.parse(str)
|
|
110
|
-
},
|
|
111
|
-
getSingleValues () {
|
|
112
|
-
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
113
|
-
return JSON.parse(str)
|
|
114
|
-
},
|
|
115
|
-
getWebConfigByKey (key) {
|
|
116
|
-
const str = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
|
|
117
|
-
const object = JSON.parse(str)
|
|
118
|
-
return object[key]
|
|
119
|
-
},
|
|
120
|
-
getStylesByKey (key) {
|
|
121
|
-
const str = localStorage.getItem(process.env.VUE_APP_WEB_STYLES_KEY)
|
|
122
|
-
const object = JSON.parse(str)
|
|
123
|
-
return object[key]
|
|
124
|
-
},
|
|
125
|
-
}
|
|
126
|
-
export default GetAppDataService
|
|
1
|
+
import { manageApi, post } from '@vue2-client/services/api'
|
|
2
|
+
import { handleTree } from '@vue2-client/utils/util'
|
|
3
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
4
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
5
|
+
|
|
6
|
+
const GetAppDataService = {
|
|
7
|
+
install (Vue) {
|
|
8
|
+
// 给vue增添对话框显示方法
|
|
9
|
+
Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
|
|
10
|
+
},
|
|
11
|
+
async load () {
|
|
12
|
+
const params = {}
|
|
13
|
+
await post(manageApi.getDictionaryValue, {}).then((res) => {
|
|
14
|
+
Object.assign(params, res)
|
|
15
|
+
const badgeItemArray = {}
|
|
16
|
+
for (const key of Object.keys(params)) {
|
|
17
|
+
badgeItemArray[key] = {}
|
|
18
|
+
for (const item of params[key]) {
|
|
19
|
+
let status
|
|
20
|
+
if (!item.status) {
|
|
21
|
+
status = 'none'
|
|
22
|
+
} else {
|
|
23
|
+
status = item.status
|
|
24
|
+
}
|
|
25
|
+
badgeItemArray[key][item.value] = {
|
|
26
|
+
status: status,
|
|
27
|
+
text: item.text
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// 追加参数
|
|
32
|
+
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
33
|
+
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
34
|
+
})
|
|
35
|
+
},
|
|
36
|
+
// 返回树形省市区
|
|
37
|
+
async getDivisionsOhChinaForTree () {
|
|
38
|
+
// 获取省市区数据
|
|
39
|
+
return new Promise((resolve, reject) => {
|
|
40
|
+
try {
|
|
41
|
+
indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, res => {
|
|
42
|
+
resolve(res)
|
|
43
|
+
}, processRes => {
|
|
44
|
+
return handleTree(processRes, 'code', 'parentcode')
|
|
45
|
+
})
|
|
46
|
+
} catch (e) {
|
|
47
|
+
reject(e)
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
// 旧版获取配置中心字典
|
|
52
|
+
getDictionaryList (key) {
|
|
53
|
+
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
54
|
+
const object = JSON.parse(str)
|
|
55
|
+
return object[key]
|
|
56
|
+
},
|
|
57
|
+
async getDictValue (dictKey, value, func, isDev = false, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
|
|
58
|
+
const processResult = (result) => {
|
|
59
|
+
if (!result.value) {
|
|
60
|
+
return {
|
|
61
|
+
status: 'none',
|
|
62
|
+
text: value
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const item = result.value.find(item => item.value == value)
|
|
66
|
+
if (item) {
|
|
67
|
+
return {
|
|
68
|
+
status: item.status || 'none',
|
|
69
|
+
text: item.label
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
status: 'none',
|
|
74
|
+
text: value
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (func) {
|
|
78
|
+
getConfigByName(dictKey, serviceName, result => {
|
|
79
|
+
func(processResult(result))
|
|
80
|
+
}, isDev)
|
|
81
|
+
} else {
|
|
82
|
+
const result = await new Promise((resolve) => {
|
|
83
|
+
getConfigByName(dictKey, serviceName, resolve, isDev)
|
|
84
|
+
})
|
|
85
|
+
return processResult(result)
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
// 新版获取配置中心字典推荐使用 服务名默认为当前服务
|
|
89
|
+
getDictByKey (dictKey, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
|
|
90
|
+
getConfigByName(dictKey, undefined, result => {
|
|
91
|
+
callback(result.value)
|
|
92
|
+
}, isDev)
|
|
93
|
+
},
|
|
94
|
+
getParam (key, value, callback) {
|
|
95
|
+
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
96
|
+
const object = JSON.parse(str)
|
|
97
|
+
if (object && object[key]) {
|
|
98
|
+
const result = object[key]
|
|
99
|
+
if (Object.prototype.hasOwnProperty.call(result, value)) {
|
|
100
|
+
return result[value]
|
|
101
|
+
} else {
|
|
102
|
+
return { status: 'none', text: value }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return null
|
|
106
|
+
},
|
|
107
|
+
getParams () {
|
|
108
|
+
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
109
|
+
return JSON.parse(str)
|
|
110
|
+
},
|
|
111
|
+
getSingleValues () {
|
|
112
|
+
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
113
|
+
return JSON.parse(str)
|
|
114
|
+
},
|
|
115
|
+
getWebConfigByKey (key) {
|
|
116
|
+
const str = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
|
|
117
|
+
const object = JSON.parse(str)
|
|
118
|
+
return object[key]
|
|
119
|
+
},
|
|
120
|
+
getStylesByKey (key) {
|
|
121
|
+
const str = localStorage.getItem(process.env.VUE_APP_WEB_STYLES_KEY)
|
|
122
|
+
const object = JSON.parse(str)
|
|
123
|
+
return object[key]
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
export default GetAppDataService
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="test" v-if="showReport">
|
|
3
|
-
<XReport
|
|
4
|
-
@updateImg="updateImg"
|
|
5
|
-
ref="main"
|
|
6
|
-
:use-oss-for-img="false"
|
|
7
|
-
config-name="outpatientWait"
|
|
8
|
-
server-name="af-his"
|
|
9
|
-
:show-img-in-cell="true"
|
|
10
|
-
:display-only="displayOnly"
|
|
11
|
-
:edit-mode="false"
|
|
12
|
-
:show-save-button="false"
|
|
13
|
-
:dont-format="true"/>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import XReport from '@vue2-client/base-client/components/common/XReportGrid/XReport'
|
|
19
|
-
// eslint-disable-next-line no-unused-vars
|
|
20
|
-
import { exportHTMLNodeToPDF } from '@vue2-client/utils/htmlToPDFApi'
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
name: 'Example',
|
|
24
|
-
components: {
|
|
25
|
-
XReport
|
|
26
|
-
},
|
|
27
|
-
mounted () {
|
|
28
|
-
console.log(this.$route)
|
|
29
|
-
},
|
|
30
|
-
data () {
|
|
31
|
-
return {
|
|
32
|
-
test: {
|
|
33
|
-
title: {
|
|
34
|
-
type: 'titleKey',
|
|
35
|
-
value: 'f_type'
|
|
36
|
-
},
|
|
37
|
-
designMode: 'json',
|
|
38
|
-
},
|
|
39
|
-
total: 1,
|
|
40
|
-
registerMap: [],
|
|
41
|
-
displayOnly: true,
|
|
42
|
-
showReport: true
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
updateImg (data) {
|
|
47
|
-
console.warn('demo', data)
|
|
48
|
-
},
|
|
49
|
-
testExport () {
|
|
50
|
-
this.showReport = false
|
|
51
|
-
this.displayOnly = true
|
|
52
|
-
this.$nextTick(() => {
|
|
53
|
-
this.showReport = true
|
|
54
|
-
setTimeout(() => {
|
|
55
|
-
exportHTMLNodeToPDF('123', '#test')
|
|
56
|
-
this.showReport = false
|
|
57
|
-
this.displayOnly = false
|
|
58
|
-
this.$nextTick(() => {
|
|
59
|
-
this.showReport = true
|
|
60
|
-
})
|
|
61
|
-
}, 500)
|
|
62
|
-
})
|
|
63
|
-
},
|
|
64
|
-
testSave () {
|
|
65
|
-
const result = []
|
|
66
|
-
this.registerMap.forEach(item => {
|
|
67
|
-
result.push(item.exportData())
|
|
68
|
-
})
|
|
69
|
-
console.warn('save', result)
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
<style scoped>
|
|
75
|
-
|
|
76
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="test" v-if="showReport">
|
|
3
|
+
<XReport
|
|
4
|
+
@updateImg="updateImg"
|
|
5
|
+
ref="main"
|
|
6
|
+
:use-oss-for-img="false"
|
|
7
|
+
config-name="outpatientWait"
|
|
8
|
+
server-name="af-his"
|
|
9
|
+
:show-img-in-cell="true"
|
|
10
|
+
:display-only="displayOnly"
|
|
11
|
+
:edit-mode="false"
|
|
12
|
+
:show-save-button="false"
|
|
13
|
+
:dont-format="true"/>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import XReport from '@vue2-client/base-client/components/common/XReportGrid/XReport'
|
|
19
|
+
// eslint-disable-next-line no-unused-vars
|
|
20
|
+
import { exportHTMLNodeToPDF } from '@vue2-client/utils/htmlToPDFApi'
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: 'Example',
|
|
24
|
+
components: {
|
|
25
|
+
XReport
|
|
26
|
+
},
|
|
27
|
+
mounted () {
|
|
28
|
+
console.log(this.$route)
|
|
29
|
+
},
|
|
30
|
+
data () {
|
|
31
|
+
return {
|
|
32
|
+
test: {
|
|
33
|
+
title: {
|
|
34
|
+
type: 'titleKey',
|
|
35
|
+
value: 'f_type'
|
|
36
|
+
},
|
|
37
|
+
designMode: 'json',
|
|
38
|
+
},
|
|
39
|
+
total: 1,
|
|
40
|
+
registerMap: [],
|
|
41
|
+
displayOnly: true,
|
|
42
|
+
showReport: true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
updateImg (data) {
|
|
47
|
+
console.warn('demo', data)
|
|
48
|
+
},
|
|
49
|
+
testExport () {
|
|
50
|
+
this.showReport = false
|
|
51
|
+
this.displayOnly = true
|
|
52
|
+
this.$nextTick(() => {
|
|
53
|
+
this.showReport = true
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
exportHTMLNodeToPDF('123', '#test')
|
|
56
|
+
this.showReport = false
|
|
57
|
+
this.displayOnly = false
|
|
58
|
+
this.$nextTick(() => {
|
|
59
|
+
this.showReport = true
|
|
60
|
+
})
|
|
61
|
+
}, 500)
|
|
62
|
+
})
|
|
63
|
+
},
|
|
64
|
+
testSave () {
|
|
65
|
+
const result = []
|
|
66
|
+
this.registerMap.forEach(item => {
|
|
67
|
+
result.push(item.exportData())
|
|
68
|
+
})
|
|
69
|
+
console.warn('save', result)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
<style scoped>
|
|
75
|
+
|
|
76
|
+
</style>
|