vue2-client 1.16.59 → 1.16.60

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.16.59",
3
+ "version": "1.16.60",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -21,7 +21,7 @@ const wrapperClassObject = computed(() => {
21
21
 
22
22
  // 通用布尔样式开关(以存在/空字符串/'true' 为真)
23
23
  const booleanStyleKeys = [
24
- 'max-width200'
24
+ 'max-width200', 'width173'
25
25
  ]
26
26
  for (const key of booleanStyleKeys) {
27
27
  const val = a[key]
@@ -176,9 +176,6 @@ defineExpose({
176
176
  .ant-btn {
177
177
  border: 1px solid #CDCDCD;
178
178
  color: #5D5C5C;
179
- width: auto;
180
- min-width: 124px;
181
- max-width: 140px;
182
179
  white-space: nowrap;
183
180
  overflow: hidden;
184
181
  margin-right: 0px;
@@ -196,9 +193,6 @@ defineExpose({
196
193
  :deep(.ant-btn-group) {
197
194
  justify-content: flex-start;
198
195
  gap: 12px;
199
- .ant-btn {
200
- flex: 1 1 auto;
201
- }
202
196
  }
203
197
  }
204
198
  // button-center样式 - 按钮居中排列
@@ -206,9 +200,6 @@ defineExpose({
206
200
  :deep(.ant-btn-group) {
207
201
  justify-content: center;
208
202
  gap: 12px;
209
- .ant-btn {
210
- flex: 1 1 auto;
211
- }
212
203
  }
213
204
  }
214
205
  // button-right样式 - 按钮从右到左排列
@@ -216,18 +207,12 @@ defineExpose({
216
207
  :deep(.ant-btn-group) {
217
208
  justify-content: flex-end;
218
209
  gap: 12px;
219
- .ant-btn {
220
- flex: 1 1 auto;
221
- }
222
210
  }
223
211
  }
224
212
  // button-space-between样式 - 按钮两端对齐(两个按钮时分布在两端)
225
213
  &.h-buttons-button-space-between {
226
214
  :deep(.ant-btn-group) {
227
215
  justify-content: space-between;
228
- .ant-btn {
229
- flex: 1 1 auto;
230
- }
231
216
  }
232
217
  }
233
218
 
@@ -375,6 +360,10 @@ defineExpose({
375
360
  align-items: center;
376
361
  }
377
362
  }
378
-
363
+ &.h-buttons-width173 {
364
+ :deep(.ant-btn) {
365
+ width: 173px !important;
366
+ }
367
+ }
379
368
  }
380
369
  </style>
@@ -4,10 +4,12 @@ import { ref, onMounted, getCurrentInstance, watch } from 'vue'
4
4
  import { getConfigByNameAsync } from '@vue2-client/services/api/common'
5
5
 
6
6
  // 与 HTab 保持一致的样式开关
7
- defineProps({
7
+ const props = defineProps({
8
8
  hasTopMargin: { type: Boolean, default: true },
9
9
  // 隐藏左侧索引栏(样式控制)
10
- leftHide: { type: Boolean, default: false }
10
+ leftHide: { type: Boolean, default: false },
11
+ // 标题蓝色圆圈样式
12
+ showDot: { type: Boolean, default: false }
11
13
  })
12
14
 
13
15
  // 内部 XFormGroup 实例引用
@@ -70,14 +72,16 @@ watch(() => [vm?.proxy?.$attrs?.queryParamsName, vm?.proxy?.$attrs?.serviceName,
70
72
  <div
71
73
  class="h-form-group-wrapper"
72
74
  :class="{
73
- 'h-form-group-has-top-margin': hasTopMargin,
74
- 'left-hide': leftHide
75
+ 'h-form-group-has-top-margin': props.hasTopMargin,
76
+ 'left-hide': props.leftHide,
77
+ 'show-dot': props.showDot
75
78
  }"
76
79
  >
77
80
  <x-form-group
78
81
  ref="xFormGroupRef"
79
82
  v-bind="$attrs"
80
83
  v-on="$listeners"
84
+ :showDot="props.showDot"
81
85
  >
82
86
  <template v-for="(_, name) in $slots" #[name]="slotData">
83
87
  <slot :name="name" v-bind="slotData" />
@@ -89,6 +93,7 @@ watch(() => [vm?.proxy?.$attrs?.queryParamsName, vm?.proxy?.$attrs?.serviceName,
89
93
 
90
94
  <style scoped lang="less">
91
95
  .h-form-group-wrapper {
96
+ padding: 6px;
92
97
  // XFormGroup 自身容器
93
98
  :deep(.XFormGroupClass) {
94
99
  height: 100%;
@@ -116,5 +121,18 @@ watch(() => [vm?.proxy?.$attrs?.queryParamsName, vm?.proxy?.$attrs?.serviceName,
116
121
  }
117
122
  }
118
123
  }
124
+ &.show-dot {
125
+ :deep(.x-title) {
126
+ font-size: 16px;
127
+ .title-content {
128
+ gap: 6px;
129
+ .title-dot {
130
+ height: 12px;
131
+ width: 12px;
132
+ }
133
+ }
134
+
135
+ }
136
+ }
119
137
  }
120
138
  </style>
@@ -24,7 +24,7 @@ const wrapperClassObject = computed(() => {
24
24
 
25
25
  // 通用布尔样式开关(以存在/空字符串/'true' 为真)
26
26
  const booleanStyleKeys = [
27
- 'hasTopMargin', 'useStyle7', 'useCycle', 'useStyle8', 'ant-tabs-bar-left0'
27
+ 'hasTopMargin', 'useStyle7', 'useCycle', 'useStyle8'
28
28
  ]
29
29
  for (const key of booleanStyleKeys) {
30
30
  const val = a[key]
@@ -175,7 +175,7 @@ defineExpose({
175
175
 
176
176
  :deep(.ant-tabs-bar) {
177
177
  border-bottom: 2px solid #0057FE;
178
- margin: 20px 10px 0 10px;
178
+ margin: 20px 0px 0 0px;
179
179
  }
180
180
 
181
181
  // 滚动状态下的容器左右内边距清零,避免左侧多出一截
@@ -229,7 +229,7 @@ defineExpose({
229
229
  :deep(.ant-tabs-ink-bar) {
230
230
  display: block;
231
231
  background-color: #0057FE;
232
- bottom: 8px;
232
+ bottom: 1px;
233
233
  height: 2px;
234
234
  /* 宽度交给 antd 自身计算,避免固定值影响自适应 */
235
235
  margin-left: 0;
@@ -247,7 +247,7 @@ defineExpose({
247
247
  /* 自适应宽度,允许通过变量覆盖最小宽度 */
248
248
  min-width: var(--tab-min-width, 96px);
249
249
  width: auto;
250
- padding: 0 12px;
250
+ padding: 0 12px 10px 12px;
251
251
  font-size: 16px;
252
252
  line-height: 10px;
253
253
  font-family: "Source Han Sans";
@@ -277,15 +277,16 @@ defineExpose({
277
277
  align-items: center !important; // 确保内容垂直居中
278
278
  line-height: normal !important; // 重置line-height避免冲突
279
279
  vertical-align: top !important; // 确保垂直对齐
280
+ justify-content: flex-start !important; // 确保内容左对齐
280
281
  }
281
282
  :deep(.ant-tabs-tab::before) {
282
283
  content: "" !important;
283
284
  position: absolute !important;
284
- left: 0 !important;
285
- top: 50% !important;
285
+ left: 3px !important;
286
+ top: calc(50% - 4px) !important;
286
287
  transform: translateY(-50%) !important;
287
- width: 8px !important;
288
- height: 8px !important;
288
+ width: 12px !important;
289
+ height: 12px !important;
289
290
  background: #0057FE !important;
290
291
  border-radius: 50% !important;
291
292
  display: block !important;
@@ -405,12 +406,5 @@ defineExpose({
405
406
  line-height: 0px !important;
406
407
  }
407
408
  }
408
- // 侧边栏tab页签移除左侧空白区域
409
- &.t-tab-ant-tabs-bar-left0 {
410
- :deep(.ant-tabs-bar) {
411
- border-bottom: 2px solid #0057FE;
412
- margin: 20px 0px 0 0px;
413
- }
414
- }
415
409
  }
416
410
  </style>
@@ -18,7 +18,8 @@
18
18
  <div class="group-item" :ref="`group-${index}`" :key="index" v-for="(item, index) in groups">
19
19
  <a-row :style="{ marginTop: index === 0 ? '' : '8px' }" v-if="formShow[`show${item.groupName}`] || formShow[`show${item.slotName}`]">
20
20
  <a-col :span="5">
21
- <span class="xFormGroupTitle">{{ item.describe }}</span>
21
+ <x-title v-if="showDot === true || showDot === 'true'" :title="item.describe" :dot="true" />
22
+ <span v-else class="xFormGroupTitle">{{ item.describe }}</span>
22
23
  </a-col>
23
24
  </a-row>
24
25
  <div v-show="formShow[`show${item.slotName}`]">
@@ -41,11 +42,19 @@
41
42
 
42
43
  <script>
43
44
  import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
45
+ import XTitle from '@vue2-client/base-client/components/his/XTitle/XTitle.vue'
44
46
 
45
47
  export default {
46
48
  name: 'XFormGroup',
47
49
  components: {
48
- XAddNativeForm
50
+ XAddNativeForm,
51
+ XTitle
52
+ },
53
+ props: {
54
+ showDot: {
55
+ type: Boolean,
56
+ default: false
57
+ }
49
58
  },
50
59
  data () {
51
60
  return {
@@ -2,8 +2,14 @@
2
2
  <a-card :bordered="false">
3
3
  <x-form-table
4
4
  title="示例表单"
5
- queryParamsName="ceshiCRUD"
6
- serviceName="af-linepatrol"
5
+ :queryParamsName="queryParamsName"
6
+ :fixedAddForm="fixedAddForm"
7
+ :x-tree-config-name="xTreeConfigName"
8
+ :externalSelectedRowKeys="selectedKeys"
9
+ @action="action"
10
+ @selectRow="selectRow"
11
+ @columnClick="columnClick"
12
+ serviceName="af-revenue"
7
13
  ref="xFormTable">
8
14
  </x-form-table>
9
15
  </a-card>
@@ -11,6 +17,7 @@
11
17
 
12
18
  <script>
13
19
  import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
20
+ import { microDispatch } from '@vue2-client/utils/microAppUtils'
14
21
 
15
22
  export default {
16
23
  name: 'Demo',
@@ -20,9 +27,9 @@ export default {
20
27
  data () {
21
28
  return {
22
29
  // 查询配置文件名
23
- queryParamsName: 'ceshiCRUD',
30
+ queryParamsName: 'address_management',
24
31
  // 查询配置左侧tree
25
- xTreeConfigName: '',
32
+ xTreeConfigName: 'addressType',
26
33
  // 新增表单固定值
27
34
  fixedAddForm: {},
28
35
  // 是否显示详情抽屉
@@ -38,6 +45,41 @@ export default {
38
45
  }
39
46
  },
40
47
  methods: {
48
+ test () {
49
+ this.$refs.xFormTable.setTableData([])
50
+ },
51
+ defaultF () {
52
+ this.$refs.xFormTable.setTableSize('default')
53
+ },
54
+ middleF () {
55
+ this.$refs.xFormTable.setTableSize('middle')
56
+ },
57
+ smallF () {
58
+ this.$refs.xFormTable.setTableSize('small')
59
+ },
60
+ columnClick (key, value, record) {
61
+ microDispatch({
62
+ type: 'v3route',
63
+ path: '/bingliguanli/dianzibingliluru',
64
+ props: { selected: arguments[0].his_f_admission_id }
65
+ })
66
+ },
67
+ action (record, id, actionType) {
68
+ this.detailVisible = true
69
+ console.log('触发了详情操作', record, id, actionType)
70
+ },
71
+ onClose () {
72
+ this.detailVisible = false
73
+ // 关闭详情之后重新查询表单
74
+ this.$refs.xFormTable.refreshTable(true)
75
+ },
76
+ selectRow (selectedRowKeys, selectedRows) {
77
+ this.selected = {
78
+ keys: selectedRowKeys,
79
+ rows: selectedRows
80
+ }
81
+ console.log('selectedDemo', this.selected)
82
+ },
41
83
  },
42
84
  computed: {},
43
85
  }
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <div id="xreport-hosp-demo">
3
+ <a-space style="margin-bottom: 12px;">
4
+ <a-button type="primary" @click="doInit">手动初始化</a-button>
5
+ </a-space>
6
+ <XReport
7
+ ref="reportRef"
8
+ :edit-mode="true"
9
+ :show-save-button="true"
10
+ :show-img-in-cell="false"
11
+ :use-oss-for-img="false"
12
+ server-name="af-his"
13
+ @updateImg="onUpdateImg"/>
14
+ </div>
15
+ </template>
16
+
17
+ <script setup>
18
+ import { ref } from 'vue'
19
+ import XReport from '@vue2-client/base-client/components/common/XReport'
20
+
21
+ const reportRef = ref(null)
22
+
23
+ const payload = {
24
+ arr: [
25
+ { BQ: '病房区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
26
+ { BQ: '感染科', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
27
+ { BQ: '骨科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
28
+ { BQ: '呼吸科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
29
+ { BQ: '急症科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
30
+ { BQ: '内科二病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 }
31
+ ]
32
+ }
33
+
34
+ const doInit = async () => {
35
+ if (!reportRef.value || !reportRef.value.init) return
36
+ await reportRef.value.init({
37
+ configName: 'hospitalizationStatsReport',
38
+ configData: payload
39
+ })
40
+ }
41
+
42
+ const onUpdateImg = data => {
43
+ console.warn('updateImg:', data)
44
+ }
45
+ </script>
@@ -1,186 +1,186 @@
1
- // print.js
2
-
3
- export function printElement (elementToPrint) {
4
- // 创建一个新的浏览器窗口
5
- const printWindow = window.open('', '_blank', 'height=1024,width=768')
6
- // 设置新窗口的文档内容
7
- printWindow.document.write(`
8
- <html>
9
- <head>
10
- <title>Print</title>
11
- <style>
12
- @page {
13
- size: auto;
14
- margin: 0mm;
15
- }
16
- html, body {
17
- margin: 0;
18
- padding: 0;
19
- width: 100%;
20
- height: 100%;
21
- }
22
- #print-container {
23
- display: none
24
- }
25
- .img{
26
- width: 95%;
27
- height: 180px;
28
- object-fit: cover;
29
- }
30
- .reportMain {
31
- text-align: center;
32
- margin: 0 auto;
33
- font-size: 16px;
34
- color: #000;
35
- background-color: #fff;
36
- padding: 15px;
37
- border-radius: 8px;
38
-
39
- .reportTitle {
40
- font-weight: bold;
41
- }
42
-
43
- .subTitle {
44
- display: flex;
45
- justify-content: space-between;
46
- margin-bottom: 1%;
47
-
48
- .subTitleItems {
49
- max-width: 30%;
50
- }
51
- }
52
-
53
- .inputsDiv {
54
- display: flex;
55
- justify-content: space-between;
56
- .inputsDivItem {
57
- display: flex;
58
- align-items: center;
59
- padding: 0 4px;
60
- white-space: nowrap;
61
- .inputsDivItemLabel {
62
- padding: 0 4px;
63
- }
64
- }
65
- }
66
-
67
- .reportTable {
68
- width: 100%;
69
- border-collapse: collapse;
70
- table-layout:fixed;
71
- word-break:break-all;
72
- text-align: center;
73
- }
74
- }
75
- .reportMainForDisplay {
76
- text-align: center;
77
- margin: 10% auto;
78
- font-size: 16px;
79
- color: #000;
80
- background-color: #fff;
81
- padding: 15px;
82
- border-radius: 8px;
83
-
84
- .reportTitle {
85
- font-weight: bold;
86
- }
87
-
88
- .subTitle {
89
- display: flex;
90
- justify-content: space-between;
91
-
92
- .subTitleItems {
93
- max-width: 30%;
94
- }
95
- }
96
-
97
- .inputsDiv {
98
- display: flex;
99
- justify-content: space-around;
100
- .inputsDivItem {
101
- display: flex;
102
- align-items: center;
103
- padding: 0 4px;
104
- white-space: nowrap;
105
- .inputsDivItemLabel {
106
- padding: 0 4px;
107
- }
108
- }
109
- }
110
-
111
- .reportTable {
112
- width: 100%;
113
- border-collapse: collapse;
114
- table-layout:fixed;
115
- word-break:break-all;
116
- }
117
- }
118
- .reportMainNoPadding {
119
- text-align: center;
120
- margin: 0 auto;
121
- font-size: 16px;
122
- color: #000;
123
- background-color: #fff;
124
- border-radius: 8px;
125
-
126
- .reportTitle {
127
- font-weight: bold;
128
- }
129
-
130
- .subTitle {
131
- display: flex;
132
- justify-content: space-between;
133
-
134
- .subTitleItems {
135
- max-width: 30%;
136
- }
137
- }
138
-
139
- .inputsDiv {
140
- display: flex;
141
- justify-content: space-between;
142
- .inputsDivItem {
143
- display: flex;
144
- align-items: center;
145
- padding: 0 4px;
146
- white-space: nowrap;
147
- .inputsDivItemLabel {
148
- padding: 0 4px;
149
- }
150
- }
151
- }
152
-
153
- .reportTable {
154
- width: 100%;
155
- border-collapse: collapse;
156
- table-layout:fixed;
157
- word-break:break-all;
158
- }
159
- }
160
- .tools{
161
- position: fixed;
162
- right: 2%;
163
- text-align: right;
164
- width: 60%;
165
- cursor: pointer;
166
- .toolsItem{
167
- width: 15%;
168
- margin-right: 3%;
169
- display: inline-block;
170
- }
171
- }
172
- </style>
173
- </head>
174
- <body>
175
- <!-- 将需要打印的元素内容复制到新窗口中 -->
176
- ${elementToPrint.innerHTML}
177
- </body>
178
- </html>
179
- `)
180
- // 延迟执行打印,以确保新窗口的内容已加载完成
181
- printWindow.document.close() // 关闭文档流,确保内容完全加载
182
- setTimeout(() => {
183
- printWindow.print() // 调用打印方法
184
- printWindow.close()
185
- }, 500) // 延迟500毫秒后执行打印
186
- }
1
+ // print.js
2
+
3
+ export function printElement (elementToPrint) {
4
+ // 创建一个新的浏览器窗口
5
+ const printWindow = window.open('', '_blank', 'height=1024,width=768')
6
+ // 设置新窗口的文档内容
7
+ printWindow.document.write(`
8
+ <html>
9
+ <head>
10
+ <title>Print</title>
11
+ <style>
12
+ @page {
13
+ size: auto;
14
+ margin: 0mm;
15
+ }
16
+ html, body {
17
+ margin: 0;
18
+ padding: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+ #print-container {
23
+ display: none
24
+ }
25
+ .img{
26
+ width: 95%;
27
+ height: 180px;
28
+ object-fit: cover;
29
+ }
30
+ .reportMain {
31
+ text-align: center;
32
+ margin: 0 auto;
33
+ font-size: 16px;
34
+ color: #000;
35
+ background-color: #fff;
36
+ padding: 15px;
37
+ border-radius: 8px;
38
+
39
+ .reportTitle {
40
+ font-weight: bold;
41
+ }
42
+
43
+ .subTitle {
44
+ display: flex;
45
+ justify-content: space-between;
46
+ margin-bottom: 1%;
47
+
48
+ .subTitleItems {
49
+ max-width: 30%;
50
+ }
51
+ }
52
+
53
+ .inputsDiv {
54
+ display: flex;
55
+ justify-content: space-between;
56
+ .inputsDivItem {
57
+ display: flex;
58
+ align-items: center;
59
+ padding: 0 4px;
60
+ white-space: nowrap;
61
+ .inputsDivItemLabel {
62
+ padding: 0 4px;
63
+ }
64
+ }
65
+ }
66
+
67
+ .reportTable {
68
+ width: 100%;
69
+ border-collapse: collapse;
70
+ table-layout:fixed;
71
+ word-break:break-all;
72
+ text-align: center;
73
+ }
74
+ }
75
+ .reportMainForDisplay {
76
+ text-align: center;
77
+ margin: 10% auto;
78
+ font-size: 16px;
79
+ color: #000;
80
+ background-color: #fff;
81
+ padding: 15px;
82
+ border-radius: 8px;
83
+
84
+ .reportTitle {
85
+ font-weight: bold;
86
+ }
87
+
88
+ .subTitle {
89
+ display: flex;
90
+ justify-content: space-between;
91
+
92
+ .subTitleItems {
93
+ max-width: 30%;
94
+ }
95
+ }
96
+
97
+ .inputsDiv {
98
+ display: flex;
99
+ justify-content: space-around;
100
+ .inputsDivItem {
101
+ display: flex;
102
+ align-items: center;
103
+ padding: 0 4px;
104
+ white-space: nowrap;
105
+ .inputsDivItemLabel {
106
+ padding: 0 4px;
107
+ }
108
+ }
109
+ }
110
+
111
+ .reportTable {
112
+ width: 100%;
113
+ border-collapse: collapse;
114
+ table-layout:fixed;
115
+ word-break:break-all;
116
+ }
117
+ }
118
+ .reportMainNoPadding {
119
+ text-align: center;
120
+ margin: 0 auto;
121
+ font-size: 16px;
122
+ color: #000;
123
+ background-color: #fff;
124
+ border-radius: 8px;
125
+
126
+ .reportTitle {
127
+ font-weight: bold;
128
+ }
129
+
130
+ .subTitle {
131
+ display: flex;
132
+ justify-content: space-between;
133
+
134
+ .subTitleItems {
135
+ max-width: 30%;
136
+ }
137
+ }
138
+
139
+ .inputsDiv {
140
+ display: flex;
141
+ justify-content: space-between;
142
+ .inputsDivItem {
143
+ display: flex;
144
+ align-items: center;
145
+ padding: 0 4px;
146
+ white-space: nowrap;
147
+ .inputsDivItemLabel {
148
+ padding: 0 4px;
149
+ }
150
+ }
151
+ }
152
+
153
+ .reportTable {
154
+ width: 100%;
155
+ border-collapse: collapse;
156
+ table-layout:fixed;
157
+ word-break:break-all;
158
+ }
159
+ }
160
+ .tools{
161
+ position: fixed;
162
+ right: 2%;
163
+ text-align: right;
164
+ width: 60%;
165
+ cursor: pointer;
166
+ .toolsItem{
167
+ width: 15%;
168
+ margin-right: 3%;
169
+ display: inline-block;
170
+ }
171
+ }
172
+ </style>
173
+ </head>
174
+ <body>
175
+ <!-- 将需要打印的元素内容复制到新窗口中 -->
176
+ ${elementToPrint.innerHTML}
177
+ </body>
178
+ </html>
179
+ `)
180
+ // 延迟执行打印,以确保新窗口的内容已加载完成
181
+ printWindow.document.close() // 关闭文档流,确保内容完全加载
182
+ setTimeout(() => {
183
+ printWindow.print() // 调用打印方法
184
+ printWindow.close()
185
+ }, 500) // 延迟500毫秒后执行打印
186
+ }
@@ -127,6 +127,7 @@ export default {
127
127
  },
128
128
  // 更新card-body的padding
129
129
  updateCardBodyPadding () {
130
+ if (this.widthMode) { return }
130
131
  this.$nextTick(() => {
131
132
  const cardBody = this.$el.querySelector('.ant-card-body')
132
133
  if (cardBody) {
@@ -176,7 +177,6 @@ export default {
176
177
  updateLayout (isOpen) {
177
178
  this.$nextTick(() => {
178
179
  try {
179
- // 获取所有同级a-col(仅筛选出 .ant-col-12)
180
180
  const otherCols = this.getSiblingCols()
181
181
  if (otherCols.length > 0) {
182
182
  let currentCol = this.$el.parentNode
@@ -184,7 +184,6 @@ export default {
184
184
  currentCol = currentCol.parentNode
185
185
  }
186
186
  if (currentCol) {
187
- // 触发XTab组件重新计算宽度
188
187
  const triggerResize = () => {
189
188
  this.$nextTick(() => {
190
189
  const tabComponent = this.$el.querySelector('.ant-tabs')
@@ -196,40 +195,34 @@ export default {
196
195
  }
197
196
 
198
197
  if (isOpen) {
199
- // 展开:仅当显式允许时才改变布局;否则恢复默认宽度
200
198
  if (this.affectLayout) {
201
199
  if (this.widthMode === 'px') {
202
- // px模式:使用固定像素宽度
203
200
  const drawerWidth = this.expandedWidth || 584
204
- currentCol.style.cssText = `
205
- flex: 0 0 ${drawerWidth}px !important;
206
- max-width: ${drawerWidth}px !important;
207
- transition: all 0.3s;`
201
+ // 使用 style 对象逐个设置属性,保留其他样式
202
+ currentCol.style.flex = `0 0 ${drawerWidth}px`
203
+ currentCol.style.maxWidth = `${drawerWidth}px`
204
+ currentCol.style.transition = 'all 0.3s'
208
205
  if (otherCols.length === 1) {
209
206
  const mainCol = otherCols[0]
210
- mainCol.style.cssText = `
211
- flex: 1 1 auto !important;
212
- max-width: calc(${this.totalWidth} - ${drawerWidth}px) !important;
213
- transition: all 0.3s;`
207
+ mainCol.style.flex = '1 1 auto'
208
+ mainCol.style.maxWidth = `calc(${this.totalWidth} - ${drawerWidth}px)`
209
+ mainCol.style.transition = 'all 0.3s'
214
210
  }
215
211
  } else {
216
- // percent模式:使用百分比宽度(原有逻辑)
217
212
  const drawerWidth = (this.expandedWidthPercent || 33.3)
218
- currentCol.style.cssText = `
219
- flex: 0 0 ${drawerWidth}% !important;
220
- max-width: ${drawerWidth}% !important;
221
- transition: all 0.3s;`
213
+ currentCol.style.flex = `0 0 ${drawerWidth}%`
214
+ currentCol.style.maxWidth = `${drawerWidth}%`
215
+ currentCol.style.transition = 'all 0.3s'
222
216
  if (otherCols.length === 1) {
223
217
  const mainCol = otherCols[0]
224
218
  const mainWidth = Math.max(0, Math.min(this.totalWidth, 100) - drawerWidth)
225
- mainCol.style.cssText = `
226
- flex: 0 0 ${mainWidth}% !important;
227
- max-width: ${mainWidth}% !important;
228
- transition: all 0.3s;`
219
+ mainCol.style.flex = `0 0 ${mainWidth}%`
220
+ mainCol.style.maxWidth = `${mainWidth}%`
221
+ mainCol.style.transition = 'all 0.3s'
229
222
  }
230
223
  }
231
224
  } else {
232
- // 恢复默认(移除我们加的内联样式)
225
+ // 恢复默认:只移除我们设置的属性
233
226
  currentCol.style.removeProperty('flex')
234
227
  currentCol.style.removeProperty('max-width')
235
228
  if (otherCols.length === 1) {
@@ -240,17 +233,15 @@ export default {
240
233
  }
241
234
  triggerResize()
242
235
  } else {
243
- // 收缩:为了消除空白,始终把侧栏压到 26px,并让相邻主列占满剩余
244
- currentCol.style.cssText = `
245
- flex: 0 0 26px !important;
246
- max-width: 26px !important;
247
- transition: all 0.3s;`
236
+ // 收缩状态
237
+ currentCol.style.flex = '0 0 26px'
238
+ currentCol.style.maxWidth = '26px'
239
+ currentCol.style.transition = 'all 0.3s'
248
240
  if (otherCols.length === 1) {
249
241
  const mainCol = otherCols[0]
250
- mainCol.style.cssText = `
251
- flex: 1 1 auto !important;
252
- max-width: calc(100% - 26px) !important;
253
- transition: all 0.3s;`
242
+ mainCol.style.flex = '1 1 auto'
243
+ mainCol.style.maxWidth = 'calc(100% - 26px)'
244
+ mainCol.style.transition = 'all 0.3s'
254
245
  }
255
246
  triggerResize()
256
247
  }
@@ -60,12 +60,14 @@ path: 'example',
60
60
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
61
61
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
62
62
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
63
- component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
63
+ // component: () => import('@vue2-client/base-client/components/common/HIS/demo.vue'),
64
+ // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
64
65
  // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
65
66
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
66
67
  // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
67
68
  // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
68
69
  // component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
70
+ // component: () => import('@vue2-client/base-client/components/his/XCharge/XChargeDemo.vue'),
69
71
  // component: () => import('@vue2-client/base-client/components/his/XImportExcelButton/XFrontImportExcelDemo.vue'),
70
72
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
71
73
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
@@ -1,47 +1,47 @@
1
- import AMapLoader from '@amap/amap-jsapi-loader'
2
- let Amap
3
- async function GetGDMap (secretKey, key) {
4
- if (!Amap) {
5
- window._AMapSecurityConfig = {
6
- securityJsCode: secretKey
7
- }
8
- // 解决高德地图加载报错 ---> 禁止多种API加载方式混用
9
- AMapLoader.reset()
10
- Amap = await AMapLoader.load({
11
- key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
12
- version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
13
- plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
14
- 'AMap.ToolBar', 'AMap.Geolocation', 'AMap.MouseTool',
15
- 'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete', 'AMap.Scale'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
16
- AMapUI: {
17
- version: '1.1', // AMapUI 缺省 1.1
18
- plugins: ['misc/PositionPicker'] // 需要加载的 AMapUI ui插件
19
- }
20
- })
21
- }
22
- return Amap
23
- }
24
-
25
- async function getGDMap (address) {
26
- new (await GetGDMap()).Geocoder({
27
- radius: 500 // 范围,默认:500
28
- }).getLocation(address, function (status, result) {
29
- if (status === 'complete' && result.geocodes.length) {
30
- return ({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
31
- } else {
32
- // eslint-disable-next-line prefer-promise-reject-errors
33
- throw new Error('根据经纬度查询地址失败')
34
- }
35
- })
36
- }
37
-
38
- async function GetLocation (address) {
39
- return new Promise((resolve, reject) => {
40
- try {
41
- resolve(getGDMap(address))
42
- } catch (e) {
43
- reject(e)
44
- }
45
- })
46
- }
47
- export { GetGDMap, GetLocation }
1
+ import AMapLoader from '@amap/amap-jsapi-loader'
2
+ let Amap
3
+ async function GetGDMap (secretKey, key) {
4
+ if (!Amap) {
5
+ window._AMapSecurityConfig = {
6
+ securityJsCode: secretKey
7
+ }
8
+ // 解决高德地图加载报错 ---> 禁止多种API加载方式混用
9
+ AMapLoader.reset()
10
+ Amap = await AMapLoader.load({
11
+ key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
12
+ version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
13
+ plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
14
+ 'AMap.ToolBar', 'AMap.Geolocation', 'AMap.MouseTool',
15
+ 'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete', 'AMap.Scale'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
16
+ AMapUI: {
17
+ version: '1.1', // AMapUI 缺省 1.1
18
+ plugins: ['misc/PositionPicker'] // 需要加载的 AMapUI ui插件
19
+ }
20
+ })
21
+ }
22
+ return Amap
23
+ }
24
+
25
+ async function getGDMap (address) {
26
+ new (await GetGDMap()).Geocoder({
27
+ radius: 500 // 范围,默认:500
28
+ }).getLocation(address, function (status, result) {
29
+ if (status === 'complete' && result.geocodes.length) {
30
+ return ({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
31
+ } else {
32
+ // eslint-disable-next-line prefer-promise-reject-errors
33
+ throw new Error('根据经纬度查询地址失败')
34
+ }
35
+ })
36
+ }
37
+
38
+ async function GetLocation (address) {
39
+ return new Promise((resolve, reject) => {
40
+ try {
41
+ resolve(getGDMap(address))
42
+ } catch (e) {
43
+ reject(e)
44
+ }
45
+ })
46
+ }
47
+ export { GetGDMap, GetLocation }
package/vue.config.js CHANGED
@@ -42,12 +42,6 @@ module.exports = {
42
42
  ws: false,
43
43
  changeOrigin: true
44
44
  },
45
- '/socket/af-system': {
46
- target: 'http://127.0.0.1:9002',
47
- ws: true,
48
- changeOrigin: true,
49
- pathRewrite: { '^/socket/af-system': '/concept-websocket' },
50
- },
51
45
  '/revenue-web/api/af-revenue': {
52
46
  pathRewrite: { '^/revenue-web/': '/' },
53
47
  target: v3Server,
@@ -89,10 +83,6 @@ module.exports = {
89
83
  target: revenue,
90
84
  changeOrigin: true
91
85
  },
92
- '/api/af-linepatrol': {
93
- target: revenue,
94
- changeOrigin: true
95
- },
96
86
  '/api/af-gaslink': {
97
87
  // pathRewrite: { '^/api/af-gaslink/': '/' },
98
88
  // target: 'http://127.0.0.1:9036',