vue2-client 1.9.2 → 1.9.3
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/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +1 -1
- package/package.json +1 -1
- package/src/base-client/components/common/XAddReport/XAddReport.vue +10 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +10 -4
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +8 -3
- package/src/base-client/components/common/XTab/XTab.vue +8 -4
- package/vue.config.js +2 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
# 通过this可以调用的函数
|
|
7
7
|
- openDialog(configName, selectedId, mixinData, outEnv):打开一个对话框:
|
|
8
|
-
* selectId:id号,formtable选择时,用selectId过滤数据
|
|
8
|
+
* selectId:id号,formtable选择时,用selectId过滤数据 可以传递 json {a_id: 1} 或者 传递 1 ,传递数值会默认拼接查询条件 {selected_id:1}
|
|
9
9
|
* mixinData: form表单需要的数据
|
|
10
10
|
* outEnv: 传递给打开的界面的数据,在打开界面的js中通过this.outEnv可以访问
|
|
11
11
|
```js
|
package/package.json
CHANGED
|
@@ -68,7 +68,7 @@ export default {
|
|
|
68
68
|
},
|
|
69
69
|
provide () {
|
|
70
70
|
return {
|
|
71
|
-
getSelectedId: () =>
|
|
71
|
+
getSelectedId: () => this.getSelectedId(),
|
|
72
72
|
getMixinData: () => { return this.mixinData },
|
|
73
73
|
isInAModal: () => { return true }
|
|
74
74
|
}
|
|
@@ -100,6 +100,15 @@ export default {
|
|
|
100
100
|
// 把打开时的环境传递给打开窗口,以便js脚本中使用
|
|
101
101
|
this.outEnv = outEnv
|
|
102
102
|
},
|
|
103
|
+
getSelectedId () {
|
|
104
|
+
if (typeof this.selectedId === 'object') {
|
|
105
|
+
if (Object.keys(this.selectedId) > 0) {
|
|
106
|
+
return this.selectedId[Object.keys(this.selectedId)[0]]
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
return this.selectedId
|
|
110
|
+
}
|
|
111
|
+
},
|
|
103
112
|
selectRow (selectedRowKeys, selectedRows) {
|
|
104
113
|
this.table_selectedRowKeys = selectedRowKeys
|
|
105
114
|
this.table_selectedRows = selectedRows
|
|
@@ -608,10 +608,16 @@ export default {
|
|
|
608
608
|
}
|
|
609
609
|
},
|
|
610
610
|
mounted () {
|
|
611
|
-
if (this.getSelectedId && this.getSelectedId
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
611
|
+
if (this.getSelectedId && typeof this.this.getSelectedId === 'function') {
|
|
612
|
+
const selectedId = this.getSelectedId()
|
|
613
|
+
console.log('注入数据', selectedId)
|
|
614
|
+
if (typeof selectedId === 'object') {
|
|
615
|
+
Object.assign(this.fixedAddForm, selectedId)
|
|
616
|
+
Object.assign(this.fixedQueryForm, selectedId)
|
|
617
|
+
} else {
|
|
618
|
+
Object.assign(this.fixedAddForm, { selected_id: selectedId })
|
|
619
|
+
Object.assign(this.fixedQueryForm, { selected_id: selectedId })
|
|
620
|
+
}
|
|
615
621
|
}
|
|
616
622
|
}
|
|
617
623
|
}
|
|
@@ -504,10 +504,15 @@ export default {
|
|
|
504
504
|
// 如果配置了 表单初始化logic
|
|
505
505
|
// 调用 logic 获取参数
|
|
506
506
|
let param = { ...this.mixinData }
|
|
507
|
+
let selectedId
|
|
507
508
|
if (res.paramLogicName) {
|
|
508
|
-
|
|
509
|
-
selectedId
|
|
510
|
-
|
|
509
|
+
if (!!this.getSelectedId) {
|
|
510
|
+
selectedId = this.getSelectedId()
|
|
511
|
+
if (typeof selectedId !== 'object') {
|
|
512
|
+
selectedId = { selectedId: selectedId }
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
param = Object.assign(param, await runLogic(res.paramLogicName, selectedId, cell.serviceName))
|
|
511
516
|
}
|
|
512
517
|
this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
|
|
513
518
|
serviceName: cell.serviceName,
|
|
@@ -82,11 +82,15 @@ export default {
|
|
|
82
82
|
// 如果配置了 表单初始化logic
|
|
83
83
|
// 调用 logic 获取参数
|
|
84
84
|
let param = {}
|
|
85
|
+
let selectedId
|
|
85
86
|
if (res.paramLogicName) {
|
|
86
|
-
|
|
87
|
-
selectedId
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
if (!!this.getSelectedId) {
|
|
88
|
+
selectedId = this.getSelectedId()
|
|
89
|
+
if (typeof selectedId !== 'object') {
|
|
90
|
+
selectedId = { selectedId: selectedId }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
param = Object.assign(param, await runLogic(res.paramLogicName, selectedId, tab.serviceName))
|
|
90
94
|
}
|
|
91
95
|
this.$refs[`tab_com_${tab.slotType}_${index}`][0].init({
|
|
92
96
|
formItems: res.formJson,
|
package/vue.config.js
CHANGED
|
@@ -11,11 +11,11 @@ const productionGzipExtensions = ['js', 'css']
|
|
|
11
11
|
const isProd = process.env.NODE_ENV === 'production'
|
|
12
12
|
|
|
13
13
|
// v4 产品演示
|
|
14
|
-
const v3Server = 'http://
|
|
14
|
+
const v3Server = 'http://192.168.11.160:31467/'
|
|
15
15
|
const gateway = 'http://192.168.50.67:31467'
|
|
16
16
|
const testUpload = 'http://123.60.214.109:8406'
|
|
17
17
|
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
18
|
-
const revenue = 'http://
|
|
18
|
+
const revenue = 'http://192.168.11.160:31467/'
|
|
19
19
|
// const OSSServerProd = 'http://192.168.50.67:31351'
|
|
20
20
|
// const testUploadLocal = 'http://127.0.0.1:9001'
|
|
21
21
|
// v3 铜川
|