vue2-client 1.12.101 → 1.12.102

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.12.101",
3
+ "version": "1.12.102",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -2,20 +2,17 @@
2
2
  <div>
3
3
  <a-collapse
4
4
  :activeKey="activeKey"
5
- @change="handleChange"
6
- >
5
+ @change="handleChange">
7
6
  <a-collapse-panel
8
7
  v-for="(panel, panelIndex) in config.showData"
9
8
  :key="panelIndex.toString()"
10
9
  :show-arrow="false"
11
- :disabled="config.collapsible"
12
- >
10
+ :disabled="config.collapsible">
13
11
  <template #header>
14
12
  <div class="header-content">
15
13
  <span
16
14
  class="header-text"
17
- :style="config.titleStyle"
18
- >
15
+ :style="config.titleStyle">
19
16
  {{ panel.title }}
20
17
  </span>
21
18
  <!-- 当有 title2 数据时显示信息项 -->
@@ -24,8 +21,7 @@
24
21
  v-for="(item, headerIndex) in panel.title2"
25
22
  :key="headerIndex"
26
23
  class="info-item"
27
- :style="config.title2Style"
28
- >
24
+ :style="config.title2Style">
29
25
  <!-- 根据showTitle是否显示键名 -->
30
26
  <span v-if="item.showTitle">{{ item.key }}:</span>
31
27
  <span>{{ item.value }}</span>
@@ -35,8 +31,7 @@
35
31
  <span
36
32
  v-if="panel.title3"
37
33
  class="time-item"
38
- :style="config.title3Style"
39
- >
34
+ :style="config.title3Style">
40
35
  {{ panel.title3 }}
41
36
  </span>
42
37
  <!-- 修改搜索框的显示条件 -->
@@ -46,8 +41,7 @@
46
41
  :placeholder="panel.searchPlace"
47
42
  class="search-input"
48
43
  @search="(value) => onSearch(value, panelIndex)"
49
- @click.stop
50
- />
44
+ @click.stop/>
51
45
  </div>
52
46
  </template>
53
47
  <!-- 根据类型显示不同内容 -->
@@ -60,11 +54,11 @@
60
54
  :ref="`dynamicComponent_${ panel.type }`"
61
55
  serverName="af-his"
62
56
  :queryParamsName="panel.configName"
57
+ :parameter="panel.parameter"
63
58
  :countVisible="false"
64
59
  :env="env"
65
60
  @listClick="listClick"
66
- @click="click"
67
- />
61
+ @click="click"/>
68
62
  </template>
69
63
  </a-collapse-panel>
70
64
  </a-collapse>
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <x-collapse :query-params-name="openPrescriptionConfig" />
3
+ </template>
4
+
5
+ <script>
6
+ import XCollapse from '@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'
7
+ export default {
8
+ name: 'Demo',
9
+ components: { XCollapse }
10
+ }
11
+ </script>
12
+
13
+ <style scoped>
14
+
15
+ </style>
@@ -1,44 +1,44 @@
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="openPrescriptionCover"
8
- server-name="af-his"
9
- :show-img-in-cell="true"
10
- :display-only="true"
11
- :edit-mode="false"
12
- :dont-format="true"/>
13
- </a-card>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import XReport from './XReport'
19
- import XAddReport from '../XAddReport/XAddReport.vue'
20
- // eslint-disable-next-line no-unused-vars
21
-
22
- export default {
23
- name: 'XReportDemo',
24
- components: {
25
- XReport, XAddReport
26
- },
27
- mounted () {
28
- // this.$refs.xAddReport.init({
29
- // configName: 'skinTestExecuActionCover',
30
- // selectedId: '11111',
31
- // mixinData: {}
32
- // })
33
- },
34
- data () {
35
- return {
36
- }
37
- },
38
- methods: {
39
- }
40
- }
41
- </script>
42
- <style scoped>
43
-
44
- </style>
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="openPrescriptionCover"
8
+ server-name="af-his"
9
+ :show-img-in-cell="true"
10
+ :display-only="true"
11
+ :edit-mode="false"
12
+ :dont-format="true"/>
13
+ </a-card>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import XReport from './XReport'
19
+ import XAddReport from '../XAddReport/XAddReport.vue'
20
+ // eslint-disable-next-line no-unused-vars
21
+
22
+ export default {
23
+ name: 'XReportDemo',
24
+ components: {
25
+ XReport, XAddReport
26
+ },
27
+ mounted () {
28
+ // this.$refs.xAddReport.init({
29
+ // configName: 'skinTestExecuActionCover',
30
+ // selectedId: '11111',
31
+ // mixinData: {}
32
+ // })
33
+ },
34
+ data () {
35
+ return {
36
+ }
37
+ },
38
+ methods: {
39
+ }
40
+ }
41
+ </script>
42
+ <style scoped>
43
+
44
+ </style>
@@ -43,6 +43,12 @@ export default {
43
43
  queryParamsName: {
44
44
  type: String,
45
45
  default: 'DescriptionsExampleConfig'
46
+ },
47
+ parameter: {
48
+ type: Object,
49
+ default: () => {
50
+ return {}
51
+ }
46
52
  }
47
53
  },
48
54
  created () {
@@ -54,7 +60,8 @@ export default {
54
60
  getConfigByName(data, 'af-his', res => {
55
61
  this.configurationParameters = res
56
62
  console.log(this.configurationParameters)
57
- runLogic(res.logicName, res.parameter, 'af-his').then(result => {
63
+ const parameter = { ...res.parameter, ...this.parameter }
64
+ runLogic(res.logicName, parameter, 'af-his').then(result => {
58
65
  this.data = result
59
66
  })
60
67
  })
@@ -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])
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])
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>
@@ -127,14 +127,14 @@ export default {
127
127
  currentCol = currentCol.parentNode
128
128
  }
129
129
  if (currentCol) {
130
- // 更新当前列的宽度
130
+ // 更新当前列的宽度
131
131
  const drawerWidth = isOpen ? 33.3 : 2
132
132
  // 强制更新样式
133
133
  currentCol.style.cssText = `
134
134
  flex: 0 0 ${drawerWidth}% !important;
135
135
  max-width: ${drawerWidth}% !important;
136
136
  transition: all 0.3s;`
137
- // 触发XTab组件重新计算宽度
137
+ // 触发XTab组件重新计算宽度
138
138
  this.$nextTick(() => {
139
139
  const tabComponent = this.$el.querySelector('.ant-tabs')
140
140
  if (tabComponent) {
@@ -142,7 +142,7 @@ export default {
142
142
  window.dispatchEvent(new Event('resize'))
143
143
  }
144
144
  })
145
- // 更新其他列宽度
145
+ // 更新其他列宽度
146
146
  otherCols.forEach((col, index) => {
147
147
  if (index < this.mainWithData.length) {
148
148
  const widthValue = isOpen ? this.mainWithData[index].min : this.mainWithData[index].max
@@ -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>
@@ -1,119 +1,124 @@
1
- const { homePage } = require('../../config')
2
- // 视图组件
3
- const view = {
4
- tabs: () => import('@vue2-client/layouts/tabs'),
5
- blank: () => import('@vue2-client/layouts/BlankView'),
6
- page: () => import('@vue2-client/layouts/PageView'),
7
- // his-web$ceshiGrid?type=GridView&configName=RxPreparedMed
8
- gridView: () => import('@vue2-client/layouts/GridView'),
9
- login: () => import('@vue2-client/pages/login/Login'),
10
- loginv3: () => import('@vue2-client/pages/login/LoginV3')
11
- }
12
- // 动态路由对象定义
13
- const routerResource = {}
14
- // --------------------------------------基本视图组件--------------------------------------
15
- // 空白视图
16
- routerResource.blank = view.blank
17
- // 单页面视图
18
- routerResource.singlePage = view.blank
19
- // 栅格配置视图
20
- routerResource.gridView = view.gridView
21
-
22
- // --------------------------------------仪表盘--------------------------------------
23
- routerResource.dashboard = view.blank
24
- // 工作台
25
- routerResource.workplace = () =>
26
- import('@vue2-client/pages/dashboard/workplace')
27
- // --------------------------------------系统配置--------------------------------------
28
- routerResource.system = view.blank
29
- // 字典管理
30
- routerResource.dictionaryManage = () => import('@vue2-client/pages/system/dictionary')
31
- // 文件管理
32
- routerResource.fileManager = () => import('@vue2-client/pages/system/file')
33
- // 登录日志
34
- routerResource.loginInfor = () => import('@vue2-client/pages/system/monitor/loginInfor')
35
- // 操作日志
36
- routerResource.operLog = () => import('@vue2-client/pages/system/monitor/operLog')
37
- // 系统问题反馈工单
38
- routerResource.submitTicket = () => import('@vue2-client/pages/system/ticket')
39
- // 通用服务评价
40
- routerResource.ServiceReview = () => import('@vue2-client/pages/ServiceReview')
41
- // 系统设置
42
- routerResource.settings = () => import('@vue2-client/pages/system/settings')
43
- // AMIS示例页面
44
- routerResource.amisDemo = () => import('@vue2-client/pages/AMisDemo/AMisDemo')
45
- // 页面编辑器
46
- routerResource.editablePage = () => import('@vue2-client/pages/lowCode/lowCodeEditor.vue')
47
- // 数据检索
48
- routerResource.dynamicStatistics = () => import('@vue2-client/pages/DynamicStatistics')
49
- // 数据检索(新)
50
- routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynamicStatistics')
51
- // 示例页面
52
- routerResource.example = {
53
- path: 'example',
54
- name: '示例主页面',
55
- // component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
56
- // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
57
- // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
58
- // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
59
- // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
60
- // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
61
- // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
62
- // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
63
- // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
64
- // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
65
- // component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
66
- // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
67
- // component: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue'),
68
- // component: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
69
- // component: () => import('@vue2-client/base-client/components/common/XPrint/Demo.vue'),
70
- // component: () => import('@vue2-client/base-client/components/AI/demo.vue'),
71
- // component: () => import('@vue2-client/components/g2Charts/demo.vue'),
72
- // component: () => import('@vue2-client/pages/LogicCallExample/index.vue'),
73
- // component: () => import('@vue2-client/components/FilePreview/FilePreviewDemo.vue'),
74
- component: () => import('@vue2-client/pages/ReportGrid/index.vue'),
75
- }
76
- // routerResource.example = () =>
77
- // import('@vue2-client/pages/Example')
78
- routerResource.XReportView = () => import('@vue2-client/pages/XReportView')
79
-
80
- routerResource.XReportGrid = () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo')
81
-
82
- routerResource.XTab = () => import('@vue2-client/base-client/components/common/XTab/XTabDemo')
83
-
84
- // 基础路由组件注册
85
- const routerMap = {
86
- login: {
87
- authority: '*',
88
- path: '/login',
89
- component: process.env.VUE_APP_LOGIN_VERSION === 'V3'
90
- ? view.loginv3 : view.login
91
- },
92
- root: {
93
- path: '/',
94
- name: '首页',
95
- redirect: homePage,
96
- component: process.env.VUE_APP_SINGLE_PAPER === 'TRUE' ? view.blank : view.tabs,
97
- },
98
- exp403: {
99
- authority: '*',
100
- name: 'exp403',
101
- path: '403',
102
- component: () =>
103
- import('@vue2-client/pages/exception/403')
104
- },
105
- exp404: {
106
- name: 'exp404',
107
- path: '404',
108
- component: () =>
109
- import('@vue2-client/pages/exception/404')
110
- },
111
- exp500: {
112
- name: 'exp500',
113
- path: '500',
114
- component: () =>
115
- import('@vue2-client/pages/exception/500')
116
- }
117
- }
118
- Object.assign(routerMap, routerResource)
119
- export default routerMap
1
+ const { homePage } = require('../../config')
2
+ // 视图组件
3
+ const view = {
4
+ tabs: () => import('@vue2-client/layouts/tabs'),
5
+ blank: () => import('@vue2-client/layouts/BlankView'),
6
+ page: () => import('@vue2-client/layouts/PageView'),
7
+ // his-web$ceshiGrid?type=GridView&configName=RxPreparedMed
8
+ gridView: () => import('@vue2-client/layouts/GridView'),
9
+ login: () => import('@vue2-client/pages/login/Login'),
10
+ loginv3: () => import('@vue2-client/pages/login/LoginV3')
11
+ }
12
+ // 动态路由对象定义
13
+ const routerResource = {}
14
+ // --------------------------------------基本视图组件--------------------------------------
15
+ // 空白视图
16
+ routerResource.blank = view.blank
17
+ // 单页面视图
18
+ routerResource.singlePage = view.blank
19
+ // 栅格配置视图
20
+ routerResource.gridView = view.gridView
21
+
22
+ // --------------------------------------仪表盘--------------------------------------
23
+ routerResource.dashboard = view.blank
24
+ // 工作台
25
+ routerResource.workplace = () =>
26
+ import('@vue2-client/pages/dashboard/workplace')
27
+ // --------------------------------------系统配置--------------------------------------
28
+ routerResource.system = view.blank
29
+ // 字典管理
30
+ routerResource.dictionaryManage = () => import('@vue2-client/pages/system/dictionary')
31
+ // 文件管理
32
+ routerResource.fileManager = () => import('@vue2-client/pages/system/file')
33
+ // 登录日志
34
+ routerResource.loginInfor = () => import('@vue2-client/pages/system/monitor/loginInfor')
35
+ // 操作日志
36
+ routerResource.operLog = () => import('@vue2-client/pages/system/monitor/operLog')
37
+ // 系统问题反馈工单
38
+ routerResource.submitTicket = () => import('@vue2-client/pages/system/ticket')
39
+ // 通用服务评价
40
+ routerResource.ServiceReview = () => import('@vue2-client/pages/ServiceReview')
41
+ // 系统设置
42
+ routerResource.settings = () => import('@vue2-client/pages/system/settings')
43
+ // AMIS示例页面
44
+ routerResource.amisDemo = () => import('@vue2-client/pages/AMisDemo/AMisDemo')
45
+ // 页面编辑器
46
+ routerResource.editablePage = () => import('@vue2-client/pages/lowCode/lowCodeEditor.vue')
47
+ // 数据检索
48
+ routerResource.dynamicStatistics = () => import('@vue2-client/pages/DynamicStatistics')
49
+ // 数据检索(新)
50
+ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynamicStatistics')
51
+ // 示例页面
52
+ routerResource.example = {
53
+ path: 'example',
54
+ name: '示例主页面',
55
+ // component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect.vue'),
56
+ // component: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
57
+ // component: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
58
+ // component: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
59
+ // component: () => import('@vue2-client/base-client/components/common/XDataCard/XDataCard.vue'),
60
+ // component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
61
+ // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
62
+ // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
63
+ // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
64
+ // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
65
+ // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
66
+ // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
67
+ // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
68
+ // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
69
+ // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
70
+ // component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
71
+ // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
72
+ // component: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue'),
73
+ // component: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
74
+ // component: () => import('@vue2-client/base-client/components/common/XPrint/Demo.vue'),
75
+ // component: () => import('@vue2-client/base-client/components/AI/demo.vue'),
76
+ // component: () => import('@vue2-client/components/g2Charts/demo.vue'),
77
+ // component: () => import('@vue2-client/pages/LogicCallExample/index.vue'),
78
+ // component: () => import('@vue2-client/components/FilePreview/FilePreviewDemo.vue'),
79
+ component: () => import('@vue2-client/pages/ReportGrid/index.vue')
80
+ }
81
+ // routerResource.example = () =>
82
+ // import('@vue2-client/pages/Example')
83
+ routerResource.XReportView = () => import('@vue2-client/pages/XReportView')
84
+
85
+ routerResource.XReportGrid = () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo')
86
+
87
+ routerResource.XTab = () => import('@vue2-client/base-client/components/common/XTab/XTabDemo')
88
+
89
+ // 基础路由组件注册
90
+ const routerMap = {
91
+ login: {
92
+ authority: '*',
93
+ path: '/login',
94
+ component: process.env.VUE_APP_LOGIN_VERSION === 'V3'
95
+ ? view.loginv3 : view.login
96
+ },
97
+ root: {
98
+ path: '/',
99
+ name: '首页',
100
+ redirect: homePage,
101
+ component: process.env.VUE_APP_SINGLE_PAPER === 'TRUE' ? view.blank : view.tabs,
102
+ },
103
+ exp403: {
104
+ authority: '*',
105
+ name: 'exp403',
106
+ path: '403',
107
+ component: () =>
108
+ import('@vue2-client/pages/exception/403')
109
+ },
110
+ exp404: {
111
+ name: 'exp404',
112
+ path: '404',
113
+ component: () =>
114
+ import('@vue2-client/pages/exception/404')
115
+ },
116
+ exp500: {
117
+ name: 'exp500',
118
+ path: '500',
119
+ component: () =>
120
+ import('@vue2-client/pages/exception/500')
121
+ }
122
+ }
123
+ Object.assign(routerMap, routerResource)
124
+ export default routerMap