vue2-client 1.8.320 → 1.8.321

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.8.320",
3
+ "version": "1.8.321",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -23,6 +23,8 @@
23
23
 
24
24
  <script>
25
25
 
26
+ import { getConfigByName } from '@/services/api/common'
27
+
26
28
  export default {
27
29
  name: 'XSimpleDescriptions',
28
30
  props: {
@@ -35,6 +37,16 @@ export default {
35
37
  dataContent: {
36
38
  type: Object,
37
39
  default: undefined
40
+ },
41
+ // 配置名
42
+ dataConfigName: {
43
+ type: String,
44
+ default: undefined
45
+ },
46
+ // 服务名
47
+ serviceName: {
48
+ type: String,
49
+ default: process.env.VUE_APP_SYSTEM_NAME
38
50
  }
39
51
  },
40
52
  data () {
@@ -42,13 +54,17 @@ export default {
42
54
  // 配置
43
55
  config: [],
44
56
  // 数据
45
- data: {}
57
+ data: {},
46
58
  }
47
59
  },
48
60
  mounted () {
49
61
  // 初始化配置
50
62
  if (this.dataConfig) {
51
63
  this.config = this.dataConfig
64
+ } else if (this.dataConfigName) {
65
+ getConfigByName(this.dataConfigName, this.serviceName, (res) => {
66
+ this.config = res.config
67
+ }, true)
52
68
  } else {
53
69
  this.config = [
54
70
  {
@@ -2,7 +2,10 @@
2
2
  <a-card id="test">
3
3
  <!-- <XFormTable query-params-name="planMangeV4TestCRUD" service-name="af-safecheck" style="margin-bottom: 5%"/>-->
4
4
  <!-- 修改 import 路径展示不同的组件 Demo -->
5
- <Demo />
5
+ <Demo1
6
+ :data-content="dataContent"
7
+ data-config-name="planManagementSimpleDescConfig"
8
+ service-name="af-safecheck"/>
6
9
  </a-card>
7
10
  </template>
8
11
 
@@ -10,7 +13,7 @@
10
13
  import XReport from '@vue2-client/base-client/components/common/XReport'
11
14
  // import Demo from '@vue2-client/base-client/components/common/XFormGroup/demo.vue'
12
15
  // import Demo from '@vue2-client/base-client/components/common/XDescriptions/demo.vue'
13
- import Demo from '@vue2-client/base-client/components/common/AddressSearchCombobox/demo.vue'
16
+ // import Demo from '@vue2-client/base-client/components/common/AddressSearchCombobox/demo.vue'
14
17
  // import Demo from '@vue2-client/base-client/components/common/XFormTable/demo.vue'
15
18
  // import Demo from '@vue2-client/base-client/components/common/XDataCard/XDataCard.vue'
16
19
  import Demo1 from '@vue2-client/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue'
@@ -19,7 +22,6 @@ import XFormTable from '@vue2-client/base-client/components/common/XFormTable'
19
22
  export default {
20
23
  name: 'Example',
21
24
  components: {
22
- Demo,
23
25
  Demo1,
24
26
  XReport,
25
27
  XFormTable
@@ -28,130 +30,6 @@ export default {
28
30
  },
29
31
  data () {
30
32
  return {
31
- testData: [
32
- {
33
- userType: '民用',
34
- planType: '安检册计划',
35
- belongTo: '安检员0222',
36
- planTotal: '322户',
37
- doneNum: '3321312户',
38
- ratio: 5
39
- },
40
- {
41
- userType: '民用',
42
- planType: '安检册计划',
43
- belongTo: '安检员0222',
44
- planTotal: '322户',
45
- doneNum: '3321312户',
46
- ratio: 15
47
- },
48
- {
49
- userType: '非民用',
50
- planType: '安检册计划',
51
- belongTo: '安检员01、安检员02',
52
- planTotal: '1户',
53
- doneNum: '4223户',
54
- ratio: 25
55
- },
56
- {
57
- userType: '民用',
58
- planType: '安检册计划',
59
- belongTo: '安检员01、安检员02',
60
- planTotal: '11户',
61
- doneNum: '42户',
62
- ratio: 35
63
- },
64
- {
65
- userType: '民用',
66
- planType: '安检册计划',
67
- belongTo: '安检员01、安检员02',
68
- planTotal: '11户',
69
- doneNum: '42户',
70
- ratio: 45
71
- },
72
- {
73
- userType: '民用',
74
- planType: '安检册计划',
75
- belongTo: '安检员01、安检员02',
76
- planTotal: '11户',
77
- doneNum: '42户',
78
- ratio: 55
79
- },
80
- {
81
- userType: '民用',
82
- planType: '安检册计划',
83
- belongTo: '安检员1111、安检员222',
84
- planTotal: '22222户',
85
- doneNum: '12312户',
86
- ratio: 65
87
- },
88
- {
89
- userType: '民用',
90
- planType: '安检册计划',
91
- belongTo: '安检员1111、安检员222',
92
- planTotal: '22222户',
93
- doneNum: '12312户',
94
- ratio: 75
95
- },
96
- {
97
- userType: '民用',
98
- planType: '安检册计划',
99
- belongTo: '安检员1111、安检员222',
100
- planTotal: '22222户',
101
- doneNum: '12312户',
102
- ratio: 85
103
- },
104
- {
105
- userType: '民用',
106
- planType: '安检册计划',
107
- belongTo: '安检员1111、安检员222',
108
- planTotal: '22222户',
109
- doneNum: '12312户',
110
- ratio: 95
111
- },
112
- ],
113
- dataCardConfig: {
114
- title: '安检计划名称:测试01',
115
- content: [
116
- {
117
- label: '用户类型',
118
- key: 'userType'
119
- },
120
- {
121
- label: '计划类型',
122
- key: 'planType'
123
- },
124
- {
125
- label: '所属人员',
126
- key: 'belongTo'
127
- },
128
- {
129
- label: '计划总数',
130
- key: 'planTotal'
131
- },
132
- {
133
- label: '已检',
134
- key: 'doneNum'
135
- },
136
- {
137
- label: '安检率',
138
- key: 'ratio',
139
- type: 'progress'
140
- }
141
- ],
142
- footer: [
143
- {
144
- icon: 'edit',
145
- label: '计划修改',
146
- emit: 'planEdit'
147
- },
148
- {
149
- icon: 'user',
150
- label: '册内用户',
151
- emit: 'user'
152
- }
153
- ]
154
- },
155
33
  descConfig: [
156
34
  {
157
35
  label: '计划用户总数',
@@ -181,6 +59,19 @@ export default {
181
59
  doneNum: 800,
182
60
  todoNum: 200,
183
61
  ratio: 80
62
+ },
63
+ dataContent: {
64
+ c_id: '1240d022903c46c8a510b1f9e61f1ca2',
65
+ c_usertype: '民用',
66
+ c_plantype: '预约计划',
67
+ c_checker: 'wd7',
68
+ c_total: 2,
69
+ c_done: 1,
70
+ c_ratio: 50,
71
+ c_planname: '状态测试',
72
+ c_month: 8,
73
+ todoNum: 1,
74
+ totalResidentArea: 1
184
75
  }
185
76
  }
186
77
  },
package/vue.config.js CHANGED
@@ -62,6 +62,12 @@ module.exports = {
62
62
  target: revenue,
63
63
  changeOrigin: true
64
64
  },
65
+ '/devApi': {
66
+ // v3用
67
+ // pathRewrite: { '^/api/af-system/': '/rs/', '^/api/af-iot/': '/rs/' },
68
+ target: revenue,
69
+ changeOrigin: true
70
+ },
65
71
  '/resource': {
66
72
  // pathRewrite: { '^/resource': '/' },
67
73
  target: testUpload,