vue2-client 1.9.119 → 1.9.120

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.9.119",
3
+ "version": "1.9.120",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -6,9 +6,21 @@ export default {
6
6
  name: 'Demo',
7
7
  components: { XAddNativeForm },
8
8
  mounted () {
9
- getConfigByNameAsync('formtestForm', 'af-system').then(res => {
9
+ getConfigByNameAsync('updateSaleOrderCarForm', 'af-gaslink').then(res => {
10
10
  console.log('===res', res)
11
- this.$refs.xAddFrom.init(res)
11
+ this.$refs.xAddFrom.init({
12
+ formItems: res.formJson,
13
+ modifyModelData: {
14
+ data: {
15
+ f_plate_number: '陕C45C3A2',
16
+ f_trailer_number: '陕C45C3A2挂',
17
+ }
18
+ },
19
+ title: '修改销售订单',
20
+ businessType: '修改',
21
+ layout: 'inline',
22
+ ...res
23
+ })
12
24
  })
13
25
  },
14
26
  methods: {
@@ -4,10 +4,9 @@
4
4
  @updateImg="updateImg"
5
5
  ref="main"
6
6
  :use-oss-for-img="false"
7
- config-name="RegistrationForm"
8
- :local-config="test"
7
+ config-name="CheckForm"
9
8
  :config-data="test_data"
10
- server-name="af-apply"
9
+ server-name="af-his"
11
10
  :show-img-in-cell="true"
12
11
  :display-only="displayOnly"
13
12
  :edit-mode="false"
@@ -33,6 +32,7 @@ export default {
33
32
  },
34
33
  data () {
35
34
  return {
35
+ configName: 'CheckForm',
36
36
  test: {
37
37
  title: {
38
38
  type: 'titleKey',
@@ -54,6 +54,7 @@
54
54
  :server-name="serverName"
55
55
  :use-oss-for-img="useOssForImg"
56
56
  :key="rowIndex"
57
+ :row-key="rowIndex"
57
58
  :columns="row"
58
59
  :no-top-border="noTopBorder"
59
60
  :config-data="activatedConfig.data"
@@ -71,6 +72,7 @@
71
72
  :use-oss-for-img="useOssForImg"
72
73
  :config="activatedConfig"
73
74
  :key="rowIndex + listIndex"
75
+ :row-key="rowIndex"
74
76
  :columns="row"
75
77
  :no-top-border="noTopBorder"
76
78
  :config-data="activatedConfig.data"
@@ -93,6 +95,7 @@
93
95
  v-for="(item, definitionIndex) in activatedConfig.data[row[0].dataIndex]"
94
96
  :input-columns-definition-index="definitionIndex"
95
97
  :display="forDisplay"
98
+ :row-key="rowIndex"
96
99
  :key="row[0].dataIndex + definitionIndex + rowIndex"></x-report-tr-group>
97
100
  <template v-if="!forDisplay">
98
101
  <!-- 动态行交互按钮 -->
@@ -104,6 +107,7 @@
104
107
  :use-oss-for-img="useOssForImg"
105
108
  :config="activatedConfig"
106
109
  :key="rowIndex"
110
+ :row-key="rowIndex"
107
111
  :columns="row"
108
112
  :no-top-border="noTopBorder"
109
113
  :config-data="activatedConfig.data"
@@ -310,7 +314,7 @@ export default {
310
314
  }
311
315
 
312
316
  .reportMain {
313
- text-align: center;
317
+ text-align: left;
314
318
  margin: 0 auto;
315
319
  font-size: 16px;
316
320
  color: #000;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <tr>
2
+ <tr :style="calculateTrStyle(rowKey, config)">
3
3
  <!-- 预览页展示 -->
4
4
  <template v-if="display">
5
5
  <template v-if="!inputColumns">
@@ -442,7 +442,12 @@ export default {
442
442
  imgPrefix: {
443
443
  type: String,
444
444
  default: undefined
445
- }
445
+ },
446
+ // 接收父组件传递的 row-key
447
+ rowKey: {
448
+ type: Number,
449
+ default: null
450
+ },
446
451
  },
447
452
  data () {
448
453
  return {
@@ -517,13 +522,13 @@ export default {
517
522
  // 普通带边框单元格
518
523
  const withBorder = {
519
524
  border: borderWidth + ' solid ' + color,
520
- padding: '8px'
525
+ padding: '4px, 2px'
521
526
  }
522
527
  // 只有左右边框的单元格
523
528
  const noBorder = {
524
529
  borderLeft: borderWidth + ' solid ' + color,
525
530
  borderRight: borderWidth + ' solid ' + color,
526
- padding: '8px'
531
+ padding: '4px, 2px'
527
532
  }
528
533
  // 只没有上边框的单元格
529
534
  const NoTopBorder = {
@@ -531,7 +536,7 @@ export default {
531
536
  borderLeft: borderWidth + ' solid ' + color,
532
537
  borderRight: borderWidth + ' solid ' + color,
533
538
  borderBottom: borderWidth + ' solid ' + color,
534
- padding: '8px'
539
+ padding: '4px, 2px'
535
540
  }
536
541
  let result = {}
537
542
  // 如果表格也声明了样式,用表格样式将样式覆盖
@@ -760,6 +765,26 @@ export default {
760
765
 
761
766
  return result
762
767
  },
768
+ calculateTrStyle (key, config) {
769
+ console.log('行样式配置', config.trStyle, key)
770
+ // 初始化行样式
771
+ let trStyle = {}
772
+
773
+ // 如果 config.trStyle 存在且是数组
774
+ if (Array.isArray(config.trStyle)) {
775
+ // 遍历 trStyle 数组,匹配 originalRowIndex 的值
776
+ const styleConfig = config.trStyle.find(item => item.originalRowIndex === key)
777
+
778
+ // 如果找到匹配项,获取其 style
779
+ if (styleConfig && styleConfig.style) {
780
+ trStyle = styleConfig.style
781
+ }
782
+ }
783
+
784
+ return {
785
+ ...trStyle, // 返回找到的样式对象
786
+ }
787
+ },
763
788
  },
764
789
  beforeMount () {
765
790
  if (this.useOssForImg) {
@@ -790,12 +815,12 @@ export default {
790
815
  .tdNoBorder {
791
816
  border-left: 1px solid #000;
792
817
  border-right: 1px solid #000;
793
- padding: 8px;
818
+ padding: 4px, 2px;
794
819
  }
795
820
 
796
821
  .tdWithBorder {
797
822
  border: 1px solid #000;
798
- padding: 8px;
823
+ padding: 4px, 2px;
799
824
  }
800
825
 
801
826
  .tdWithNoTopBorder {
@@ -28,17 +28,22 @@ export default {
28
28
  },
29
29
  provide () {
30
30
  return {
31
- getSelectedId: () => 10
31
+ getSelectedId: () => 10,
32
32
  }
33
33
  },
34
34
  mounted () {
35
- // this.$refs.main.openDialog('surgerySchedCover', -1, {})
35
+ // this.$refs.main.openDialog('surgerySchedCover', -1, {})
36
+ },
37
+ beforeCreate () {
38
+ this.$store.commit('account/setUser', {
39
+ id: '374870707835895810'
40
+ })
36
41
  },
37
42
  data () {
38
43
  return {
39
- // configName: 'medicalRecordCover'
44
+ configName: 'medicalRecordCover'
40
45
  // configName: 'physicianOrderEntryCover'
41
- configName: 'threeHealthCenterCover'
46
+ // configName: 'threeHealthCenterCover'
42
47
  // configName: 'medOrderManaActCover'
43
48
  }
44
49
  },
@@ -86,10 +86,10 @@ routerResource.example = {
86
86
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
87
87
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
88
88
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
89
- // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
89
+ component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
90
90
  // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
91
91
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
92
- component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
92
+ // component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
93
93
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
94
94
  // component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
95
95
  // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),