vue2-client 1.8.460 → 1.9.1
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.
|
@@ -4,14 +4,44 @@
|
|
|
4
4
|
- 用this.函数函数调用方式调用相应功能。
|
|
5
5
|
|
|
6
6
|
# 通过this可以调用的函数
|
|
7
|
-
- openDialog(configName, selectedId, mixinData
|
|
7
|
+
- openDialog(configName, selectedId, mixinData, outEnv):打开一个对话框:
|
|
8
|
+
* selectId:id号,formtable选择时,用selectId过滤数据
|
|
9
|
+
* mixinData: form表单需要的数据
|
|
10
|
+
* outEnv: 传递给打开的界面的数据,在打开界面的js中通过this.outEnv可以访问
|
|
11
|
+
```js
|
|
12
|
+
this.openDialog('xxx', 5, {}, {})
|
|
13
|
+
```
|
|
8
14
|
- runLogic(logicName, parameter): 运行业务逻辑, 例如: this.runLogic('xxx', {})
|
|
9
15
|
|
|
10
16
|
# 如何调用珊格中组件的数据及函数
|
|
11
17
|
- 先给组件起名字,命名规范:main,left,right,top,bottom
|
|
12
18
|
- 用 this.getComponentByName('main') 拿到组件。
|
|
13
19
|
|
|
20
|
+
# 特殊处理
|
|
21
|
+
- form表单提交数据到列表,而非后台。用 `this.outEnv.data.push(...[])`刷新列表数据。
|
|
22
|
+
|
|
14
23
|
# x-form-table 可以使用的函数/数据
|
|
24
|
+
- getTableData(): 获取所有数据
|
|
25
|
+
- 获取selectedid getSelectedId()
|
|
26
|
+
- 重新查询 refreshTable()
|
|
27
|
+
```js
|
|
28
|
+
假如组件名称叫 xtable
|
|
29
|
+
// 所有选中的id
|
|
30
|
+
const allid = this.$refs.xtable.table_selectedRowKeys
|
|
31
|
+
// 所有选中的行 table_selectedRowKeys
|
|
32
|
+
const allrecord = this.$refs.xtable.table_selectedRows
|
|
33
|
+
|
|
34
|
+
// xtable 所调用事件
|
|
35
|
+
// 新增修改后调用事件
|
|
36
|
+
afterSubmit( type(新增/修改/擦和讯), id: (所操作的主键id), form: (请求的表单内容))
|
|
37
|
+
// 查询后
|
|
38
|
+
afterQuery( res (查询后数据), querparams (查询参数))
|
|
39
|
+
// 删除后
|
|
40
|
+
afterDelete( res (删除接口返回数据))
|
|
41
|
+
// 操作按钮
|
|
42
|
+
action(record (当前记录), id (当前记录主键), actionType (操作类型))
|
|
43
|
+
```
|
|
44
|
+
|
|
15
45
|
- table_selectedRowKeys 获取选中的id /不用加 () 这是一个data 中的变量
|
|
16
46
|
- table_selectedRows 获取选中的行 /不用加 () 这是一个data 中的变量
|
|
17
47
|
- getSelectedId 获取获取selectedid
|
package/package.json
CHANGED
|
@@ -125,16 +125,9 @@ export function getConfigByLogic (logicName, parameter, serviceName = process.en
|
|
|
125
125
|
* @deprecated 这个函数应该只有琉璃中心会使用,其他项目不能使用 之后会删除这个
|
|
126
126
|
* @param configContent 原配置内容
|
|
127
127
|
* @param configType 配置类型
|
|
128
|
-
* @param serviceName 命名空间名称
|
|
129
|
-
* @param isDev 是否是开发环境
|
|
130
128
|
*/
|
|
131
|
-
export function parseConfig (configContent, configType
|
|
132
|
-
|
|
133
|
-
if (isDev) {
|
|
134
|
-
apiPre = '/devApi/'
|
|
135
|
-
}
|
|
136
|
-
const url = apiPre + serviceName + '/' + commonApi.parseConfig
|
|
137
|
-
return post(url, {
|
|
129
|
+
export function parseConfig (configContent, configType) {
|
|
130
|
+
return post('/api/af-liuli/logic/openapi/parseConfigByClient', {
|
|
138
131
|
configType: configType,
|
|
139
132
|
configContent: configContent
|
|
140
133
|
})
|