vue2-client 1.14.88 → 1.14.90

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.14.88",
3
+ "version": "1.14.90",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -23,7 +23,13 @@
23
23
  :destroyOnClose="true">
24
24
  <x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
25
25
  </a-modal>
26
- <WorkflowDetail ref="workFlow" @success="success"></WorkflowDetail>
26
+ <WorkflowDetail
27
+ ref="workFlow"
28
+ @success="success"
29
+ @x-form-item-emit-func="handleFormItemEvent"
30
+ @address-selected="handleAddressSelected"
31
+ >
32
+ </WorkflowDetail>
27
33
  </a-card>
28
34
  </template>
29
35
 
@@ -84,6 +90,15 @@ export default {
84
90
  this.$refs.workFlow.init({
85
91
  workflowId: record.twf_id
86
92
  })
93
+ },
94
+ handleFormItemEvent (func, data, value) {
95
+ console.log('打印一下:', func, data, value)
96
+ if (func === 'selectAddress') {
97
+ this.$refs.workFlow.openAddressSelect()
98
+ }
99
+ },
100
+ handleAddressSelected (record) {
101
+ this.$refs.workFlow.setAddress({ address: record.f_address })
87
102
  }
88
103
  }
89
104
  }
@@ -48,6 +48,8 @@
48
48
  @refresh="stepChanged"
49
49
  @success="success"
50
50
  @nextClick="nextClick"
51
+ @x-form-item-emit-func="handleFormItemEvent"
52
+ @address-selected="handleAddressSelected"
51
53
  class="handle-content"
52
54
  />
53
55
  </template>
@@ -152,6 +154,7 @@ export default {
152
154
  visible: false
153
155
  }
154
156
  },
157
+ expose: ['setAddress', 'openAddressSelect'],
155
158
  computed: {
156
159
  ...mapState('account', { currUser: 'user' }),
157
160
  ...mapState('setting', ['isMobile'])
@@ -242,6 +245,20 @@ export default {
242
245
  // 提交完成后事件
243
246
  nextClick (res) {
244
247
  this.$emit('nextClick', res)
248
+ },
249
+ handleFormItemEvent (func, data, value) {
250
+ this.$emit('x-form-item-emit-func', func, data, value)
251
+ },
252
+ handleAddressSelected (record) {
253
+ this.$emit('address-selected', record)
254
+ },
255
+ // 选择地址弹出框方法
256
+ openAddressSelect () {
257
+ this.$refs.workflowHandle.$refs.addressSelect.setFormShow()
258
+ },
259
+ // 给地址选择表单项赋值
260
+ setAddress (record) {
261
+ this.$refs.workflowHandle.$refs.xAddForm.setForm(record)
245
262
  }
246
263
  }
247
264
  }
@@ -1040,13 +1040,11 @@ export default {
1040
1040
  return false
1041
1041
  }
1042
1042
  },
1043
- formItemEmitFunc (func) {
1044
- if (func === 'selectAddress') {
1045
- this.$refs.addressSelect.setFormShow()
1046
- }
1043
+ formItemEmitFunc (func, data, value) {
1044
+ this.$emit('x-form-item-emit-func', func, data, value)
1047
1045
  },
1048
1046
  setFormValue (record) {
1049
- this.$refs.xAddForm.setForm({ address: record.f_address })
1047
+ this.$emit('address-selected', record)
1050
1048
  }
1051
1049
  },
1052
1050
  watch: {}
@@ -1,24 +1,24 @@
1
- <template>
2
- <!-- 测试界面——测试地址选择新增组件-->
3
- <div>
4
- <a-button @click="open">打开选择地址弹窗</a-button>
5
- <address-select :addressShow="showDialog"/>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- import AddressSelect from '@/pages/addressSelect'
11
-
12
- export default {
13
- components: { AddressSelect },
14
- data: () => ({
15
- showDialog: false
16
- }),
17
- methods: {
18
- open () {
19
- console.log('打开选择地址弹窗')
20
- this.showDialog = true
21
- }
22
- }
23
- }
24
- </script>
1
+ <template>
2
+ <!-- 测试界面——测试地址选择新增组件-->
3
+ <div>
4
+ <a-button @click="open">打开选择地址弹窗</a-button>
5
+ <address-select :addressShow="showDialog"/>
6
+ </div>
7
+ </template>
8
+
9
+ <script>
10
+ import AddressSelect from '@/pages/addressSelect'
11
+
12
+ export default {
13
+ components: { AddressSelect },
14
+ data: () => ({
15
+ showDialog: false
16
+ }),
17
+ methods: {
18
+ open () {
19
+ console.log('打开选择地址弹窗')
20
+ this.showDialog = true
21
+ }
22
+ }
23
+ }
24
+ </script>
@@ -12,6 +12,9 @@ export default {
12
12
  this.onAddressTypeChange(newVal, oldVal)
13
13
  }
14
14
  },
15
+ mounted () {
16
+ this.getAreaList('')
17
+ },
15
18
  data () {
16
19
  return {
17
20
  selectAddressVisible: false,
@@ -111,7 +111,7 @@ export default {
111
111
  { key: '14', label: '异常报警', permission: '异常报警', component: 'UserException' },
112
112
  { key: '15', label: '价格调整', permission: '价格调整', component: 'PriceAdjustments' },
113
113
  { key: '16', label: '附件查看', permission: '附件查看', component: 'uploadFilesHistory' },
114
- { key: '16', label: '保险明细', permission: '保险明细', component: 'InsuranceDetailQuery' },
114
+ { key: '17', label: '保险明细', permission: '保险明细', component: 'InsuranceDetailQuery' },
115
115
  ],
116
116
  }
117
117
  },