@zscreate/zhxy-app-component 1.0.285 → 1.0.286

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.
@@ -36,7 +36,7 @@ export default {
36
36
  },
37
37
  provide() {
38
38
  return {
39
- getData: (...args) => this.getData(...args)
39
+ // getData: (...args) => this.getData(...args)
40
40
  }
41
41
  },
42
42
  watch: {
@@ -67,21 +67,26 @@ export default {
67
67
  }
68
68
  },
69
69
  created() {
70
- this.loadData(this.widget.options.code)
70
+ // this.loadData(this.widget.options.code)
71
+ this.$u.get('/sys/category/childAllList', { code: this.widget.options.code }).then(res => {
72
+ const result = res.result || []
73
+ const map = item => {
74
+ return {
75
+ label: item.name,
76
+ value: item.code,
77
+ children: item?.childList?.map(map) || []
78
+ }
79
+ }
80
+ this.list = result.map(map)
81
+ // this.list = res.result.map(item => ({ label: item.dataValue, value: item.dataKey, children: [] }))
82
+ })
71
83
  // this.loadAllData(this.widget.options.code)
72
84
  },
73
85
  methods: {
74
- async loadAllData(id) {
75
- // this.$u.get('/sys/category/childAllList', { code: id }).then(res => {
76
- // this.list = res.result.map(item => ({ label: item.dataValue, value: item.dataKey, children: [] }))
77
- // })
78
- },
79
86
  async loadData(id) {
80
87
  const result = await this.getOptions(id)
81
88
  this.list = this.generateData(result)
82
89
 
83
-
84
-
85
90
  // 默认查询所有第一个
86
91
  if (!this.dataModel?.length) {
87
92
  let index = 0
@@ -129,7 +129,7 @@ export default {
129
129
  if (i === 0) {
130
130
  realIndex = this.pickerValue[0]
131
131
  }
132
- console.log(i + '-3', cloneDeep(this.pickerValue))
132
+ console.log(i + '-3', this.pickerColumns, pickerValue, cloneDeep(this.pickerValue))
133
133
  const selectItem = this.pickerColumns[i][pickerValue[i]]
134
134
  if (selectItem) {
135
135
  this.selectItem[i] = selectItem
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.285",
3
+ "version": "1.0.286",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",