ap-dev 1.1.23 → 1.1.28
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/dev/ApiPanel/menus.js +4 -1
- package/dev/ApiPanel/modules/ApiApOrg.vue +239 -0
- package/dev/ApiPanel/modules/ApiDcOrgSearch.vue +2 -2
- package/dev/ApiPanel/modules/ApiDcSupplierSearch.vue +2 -2
- package/dev/ApiPanel/modules/ApiJavaUtils.vue +6 -1
- package/dev/ApiPanel/modules/ApiVueUtils.vue +1 -1
- package/dev/ApiPanel/tabs/ApiApSearchPick.vue +186 -195
- package/dev/ApiPanel/tabs/ApiMediumUtil.vue +42 -0
- package/package.json +1 -1
package/dev/ApiPanel/menus.js
CHANGED
|
@@ -55,9 +55,12 @@ const menus = [
|
|
|
55
55
|
}, {
|
|
56
56
|
id: 'ApiDcOrgSelect',
|
|
57
57
|
label: '3.3 组织-下拉选择'
|
|
58
|
+
}, {
|
|
59
|
+
id: 'ApiApOrg',
|
|
60
|
+
label: '3.4 组织架构组件(new)'
|
|
58
61
|
}, {
|
|
59
62
|
id: 'ApiDcSupplierSearch',
|
|
60
|
-
label: '3.
|
|
63
|
+
label: '3.5 供应商-选择组件'
|
|
61
64
|
}]
|
|
62
65
|
}, {
|
|
63
66
|
id: 'ApiDefault',
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<h3>组织架构组件:ap-org</h3>
|
|
4
|
+
<api-tittle-2>一、示例:</api-tittle-2>
|
|
5
|
+
<div>
|
|
6
|
+
<div>
|
|
7
|
+
1、部门树[org-tree]:{{ orgTreeValue }}<br>
|
|
8
|
+
<div style="width: 300px">
|
|
9
|
+
<ap-org :options.sync="orgTree" v-model="orgTreeValue"></ap-org>
|
|
10
|
+
<api-code>{{ js1 }}</api-code>
|
|
11
|
+
</div>
|
|
12
|
+
2、部门[org-select]:{{ orgSelectValue }}<br>
|
|
13
|
+
<div style="width: 300px">
|
|
14
|
+
<ap-org :options.sync="orgSelect" v-model="orgSelectValue"></ap-org>
|
|
15
|
+
<api-code>{{ js2 }}</api-code>
|
|
16
|
+
</div>
|
|
17
|
+
3、人员选择[org-pick]:{{ orgPickValue }}<br>
|
|
18
|
+
<div style="width: 300px">
|
|
19
|
+
<ap-org :options.sync="orgPick" v-model="orgPickValue"></ap-org>
|
|
20
|
+
<api-code>{{ js3 }}</api-code>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<api-tittle-2>二、参数说明:</api-tittle-2>
|
|
25
|
+
1、部门树相关的参数:type -> org-tree
|
|
26
|
+
<api-table :data="attrData1" :columns="attrCols1"/>
|
|
27
|
+
2、部门下拉相关的参数:type -> org-select
|
|
28
|
+
<api-table :data="attrData2" :columns="attrCols1"/>
|
|
29
|
+
3、人员相关的参数:type -> org-pick
|
|
30
|
+
<api-table :data="attrData3" :columns="attrCols1"/>
|
|
31
|
+
<api-tittle-2>三、事件说明:</api-tittle-2>
|
|
32
|
+
<api-table :data="methodData" :columns="methodCols"/>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
name: 'ApiApOrg',
|
|
41
|
+
components: {
|
|
42
|
+
ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
const attrCols1 = [
|
|
46
|
+
{label: '名称', prop: 'name', width: '180px'},
|
|
47
|
+
{label: '类型', prop: 'type', width: '100px'},
|
|
48
|
+
{label: '默认值', prop: 'default', width: '80px'},
|
|
49
|
+
{label: '描述', prop: 'memo', minWidth: '100px'},
|
|
50
|
+
{label: '示例代码', prop: 'code', minWidth: '100px'}]
|
|
51
|
+
|
|
52
|
+
const attrData1 = [
|
|
53
|
+
{
|
|
54
|
+
name: 'type',
|
|
55
|
+
type: '类型',
|
|
56
|
+
default: '',
|
|
57
|
+
memo: 'type: "org-tree"<br>组织部门树',
|
|
58
|
+
}, {
|
|
59
|
+
name: 'params',
|
|
60
|
+
type: '对象',
|
|
61
|
+
default: '见描述',
|
|
62
|
+
memo: '默认参数{companyId: "登录用户公司别", disabled:"0"}<br>' +
|
|
63
|
+
'参数说明:<br>companyId: 公司别过滤:默认登录用户公司;ALL表示全部 ' +
|
|
64
|
+
'<br>disabled:是否失效过滤:0有效(默认);1失效;all表示全部'
|
|
65
|
+
}, {
|
|
66
|
+
name: 'multiSelect',
|
|
67
|
+
type: '布尔',
|
|
68
|
+
default: 'false',
|
|
69
|
+
memo: '是否多选。默认false单选,true多选。'
|
|
70
|
+
}, {
|
|
71
|
+
name: 'fullName',
|
|
72
|
+
type: '布尔',
|
|
73
|
+
default: 'false',
|
|
74
|
+
memo: '是否显示全称。默认false简称,true全称(带父部门)。'
|
|
75
|
+
}, {
|
|
76
|
+
name: 'clear',
|
|
77
|
+
type: '方法',
|
|
78
|
+
default: '',
|
|
79
|
+
memo: '点击清空回调方法:返回true关闭弹框,false不关闭弹框',
|
|
80
|
+
code: `<div class="api-code">clear: () => {return true;}</div>`
|
|
81
|
+
}, {
|
|
82
|
+
name: 'confirm',
|
|
83
|
+
type: '方法',
|
|
84
|
+
default: '',
|
|
85
|
+
memo: '点击确定回调方法:返回true关闭弹框,false不关闭弹框',
|
|
86
|
+
code: `<div class="api-code">confirm: (selectedRows) => {return true;}</div>`
|
|
87
|
+
}, {
|
|
88
|
+
name: '其他参数',
|
|
89
|
+
type: '',
|
|
90
|
+
default: '',
|
|
91
|
+
memo: '参考【ap-search-tree】组件'
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
const attrData2 = [
|
|
96
|
+
{
|
|
97
|
+
name: 'type',
|
|
98
|
+
type: '类型',
|
|
99
|
+
default: '',
|
|
100
|
+
memo: 'type: "org-select"<br>组织部门下拉<br>注:数据源是组织分组的数据',
|
|
101
|
+
}, {
|
|
102
|
+
name: 'params',
|
|
103
|
+
type: '对象',
|
|
104
|
+
default: '见描述',
|
|
105
|
+
memo: '默认参数{code: "组织分组编码", companyId:"登录用户公司别"}<br>' +
|
|
106
|
+
'参数说明:<br>companyId: 公司别过滤:默认登录用户公司;ALL表示全部 ' +
|
|
107
|
+
'<br>code:[必填]组织分组编码'
|
|
108
|
+
}, {
|
|
109
|
+
name: 'addOptions',
|
|
110
|
+
type: '数组',
|
|
111
|
+
default: 'false',
|
|
112
|
+
memo: '添加的下拉选项,见示例',
|
|
113
|
+
code: `<div class="api-code">addOptions:[{label: "全部", value: "all"},{label: "无", value: ""}]</div>`
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
const attrData3 = [
|
|
118
|
+
{
|
|
119
|
+
name: 'type',
|
|
120
|
+
type: '类型',
|
|
121
|
+
default: '',
|
|
122
|
+
memo: 'type: "org-pick"<br>组织人员选择',
|
|
123
|
+
}, {
|
|
124
|
+
name: '常用参数',
|
|
125
|
+
type: '',
|
|
126
|
+
default: '',
|
|
127
|
+
memo: '见实例',
|
|
128
|
+
code: `// 配置表格单选
|
|
129
|
+
searchPickTableOptions: {
|
|
130
|
+
multiSelect: false,
|
|
131
|
+
}`
|
|
132
|
+
}, {
|
|
133
|
+
name: '其他参数',
|
|
134
|
+
type: '',
|
|
135
|
+
default: '',
|
|
136
|
+
memo: '参考【ap-search-pick】组件'
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
const methodCols = [
|
|
142
|
+
{label: '名称', prop: 'name', width: '200px'},
|
|
143
|
+
{label: '描述', prop: 'memo', minWidth: '100px'},
|
|
144
|
+
{label: '示例代码', prop: 'code', minWidth: '100px'}]
|
|
145
|
+
|
|
146
|
+
const methodData = [
|
|
147
|
+
{
|
|
148
|
+
group: '设置数据',
|
|
149
|
+
name: 'initSearchData',
|
|
150
|
+
memo: '设置选中数据。<br>' +
|
|
151
|
+
'<span class="api-memo">参数1:value。选中值,必填,多个数据使用“,”间隔</span><br>' +
|
|
152
|
+
'<span class="api-memo">参数2:text。显示文本,非必填,多个数据使用“,”间隔</span>',
|
|
153
|
+
code: '1、参数传输 (value),调用searchPickTextUrl获取对象<br/>' +
|
|
154
|
+
'单选:<span class="api-code">this.$refs.searchRef.initSearchData(\'xxx\');</span><br/>' +
|
|
155
|
+
'多选:<span class="api-code">this.$refs.searchRef.initSearchData(\'xxx,xxx\');</span><br/>' +
|
|
156
|
+
'2、参数传输 (value, text),不会调用请求获取对象<br/>' +
|
|
157
|
+
'单选:<span class="api-code">this.$refs.searchRef.initSearchData(\'xxx\',\'xxx\');</span><br/>' +
|
|
158
|
+
'多选:<span class="api-code">this.$refs.searchRef.initSearchData(\'xxx,xxx\',\'xxx,xxx\');</span><br/>'
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
const js1 = `// 1、部门树选择组件:
|
|
163
|
+
<ap-org :options.sync="orgTree" v-model="orgTreeValue"></ap-org>
|
|
164
|
+
|
|
165
|
+
// 2、data参数:
|
|
166
|
+
orgTreeValue: "",
|
|
167
|
+
orgTree: {
|
|
168
|
+
type: "org-tree",
|
|
169
|
+
multiSelect: true,
|
|
170
|
+
fullName: true
|
|
171
|
+
}`;
|
|
172
|
+
const js2 = `// 1、部门下拉组件:
|
|
173
|
+
<ap-org :options.sync="orgSelect" v-model="orgSelectValue"></ap-org>
|
|
174
|
+
|
|
175
|
+
// 2、data参数:
|
|
176
|
+
orgSelectValue: "",
|
|
177
|
+
orgSelect: {
|
|
178
|
+
type: "org-select",
|
|
179
|
+
multiSelect: false,
|
|
180
|
+
addOptions: [{label: "无", value: ""}],
|
|
181
|
+
params: () => {
|
|
182
|
+
return {
|
|
183
|
+
code: "ap-default-company",
|
|
184
|
+
companyId: "ALL"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}`
|
|
188
|
+
const js3 = `// 1、人员选择组件:
|
|
189
|
+
<ap-org :options.sync="orgPick" v-model="orgPickValue"></ap-org>
|
|
190
|
+
|
|
191
|
+
// 2、data参数:
|
|
192
|
+
orgPickValue: "",
|
|
193
|
+
orgPick: {
|
|
194
|
+
type: "org-pick",
|
|
195
|
+
searchPickValue: ""
|
|
196
|
+
}`
|
|
197
|
+
return {
|
|
198
|
+
attrCols1,
|
|
199
|
+
attrData1,
|
|
200
|
+
attrData2,
|
|
201
|
+
attrData3,
|
|
202
|
+
methodData,
|
|
203
|
+
methodCols,
|
|
204
|
+
js1,
|
|
205
|
+
js2,
|
|
206
|
+
js3,
|
|
207
|
+
orgTreeValue: "",
|
|
208
|
+
orgTree: {
|
|
209
|
+
type: "org-tree",
|
|
210
|
+
multiSelect: true,
|
|
211
|
+
fullName: true
|
|
212
|
+
},
|
|
213
|
+
orgSelect: {
|
|
214
|
+
type: "org-select",
|
|
215
|
+
multiSelect: false,
|
|
216
|
+
addOptions: [{label: "无", value: ""}],
|
|
217
|
+
params: () => {
|
|
218
|
+
return {
|
|
219
|
+
code: "ap-default-company",
|
|
220
|
+
companyId: "ALL"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
orgSelectValue: "",
|
|
225
|
+
// orgSelectValue: [ "93f1d90583ea4588b561bcc6f1a7f349" ]
|
|
226
|
+
orgPickValue: "",
|
|
227
|
+
orgPick: {
|
|
228
|
+
type: "org-pick",
|
|
229
|
+
searchPickValue: ""
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
methods: {}
|
|
235
|
+
}
|
|
236
|
+
</script>
|
|
237
|
+
|
|
238
|
+
<style scoped>
|
|
239
|
+
</style>
|
|
@@ -124,7 +124,7 @@ export default {
|
|
|
124
124
|
memo: '设置选中数据。<br>' +
|
|
125
125
|
'<span class="api-memo">参数1:value。选中值,必填,多个数据使用“,”间隔</span><br>' +
|
|
126
126
|
'<span class="api-memo">参数2:text。显示文本,非必填,多个数据使用“,”间隔</span>',
|
|
127
|
-
code: '1、参数传输 (value),调用
|
|
127
|
+
code: '1、参数传输 (value),调用searchPickTextUrl获取对象<br/>' +
|
|
128
128
|
'单选:<span class="api-code">this.$refs.searchRef.initSearchData(\'xxx\');</span><br/>' +
|
|
129
129
|
'多选:<span class="api-code">this.$refs.searchRef.initSearchData(\'xxx,xxx\');</span><br/>' +
|
|
130
130
|
'2、参数传输 (value, text),不会调用请求获取对象<br/>' +
|
|
@@ -221,4 +221,4 @@ options:{
|
|
|
221
221
|
</script>
|
|
222
222
|
|
|
223
223
|
<style scoped>
|
|
224
|
-
</style>
|
|
224
|
+
</style>
|
|
@@ -103,7 +103,7 @@ export default {
|
|
|
103
103
|
memo: '设置选中数据。<br>' +
|
|
104
104
|
'<span class="api-memo">参数1:value。选中值,必填,多个数据使用“,”间隔</span><br>' +
|
|
105
105
|
'<span class="api-memo">参数2:text。显示文本,非必填,多个数据使用“,”间隔</span>',
|
|
106
|
-
code: '1、参数传输 (value),调用
|
|
106
|
+
code: '1、参数传输 (value),调用searchPickTextUrl获取对象<br/>' +
|
|
107
107
|
'单选:<span class="api-code">this.$refs.searchRef.initSearchData(\'xxx\');</span><br/>' +
|
|
108
108
|
'多选:<span class="api-code">this.$refs.searchRef.initSearchData(\'xxx,xxx\');</span><br/>' +
|
|
109
109
|
'2、参数传输 (value, text),不会调用请求获取对象<br/>' +
|
|
@@ -177,4 +177,4 @@ options:{
|
|
|
177
177
|
</script>
|
|
178
178
|
|
|
179
179
|
<style scoped>
|
|
180
|
-
</style>
|
|
180
|
+
</style>
|
|
@@ -23,6 +23,7 @@ import ApiStringUtil from './../tabs/ApiStringUtil'
|
|
|
23
23
|
import ApiQyWxUtil from './../tabs/ApiQyWxUtil'
|
|
24
24
|
import ApiJavaCommonUtil from './../tabs/ApiJavaCommonUtil'
|
|
25
25
|
import ApiWebSocketUtil from './../tabs/ApiWebSocketUtil'
|
|
26
|
+
import ApiMediumUtil from './../tabs/ApiMediumUtil'
|
|
26
27
|
|
|
27
28
|
export default {
|
|
28
29
|
name: "ApiJavaUtils",
|
|
@@ -40,7 +41,8 @@ export default {
|
|
|
40
41
|
ApiStringUtil,
|
|
41
42
|
ApiQyWxUtil,
|
|
42
43
|
ApiJavaCommonUtil,
|
|
43
|
-
ApiWebSocketUtil
|
|
44
|
+
ApiWebSocketUtil,
|
|
45
|
+
ApiMediumUtil
|
|
44
46
|
},
|
|
45
47
|
data() {
|
|
46
48
|
let opts = [
|
|
@@ -77,6 +79,9 @@ export default {
|
|
|
77
79
|
}, {
|
|
78
80
|
label: 'QyWxUtil',
|
|
79
81
|
component: 'ApiQyWxUtil',
|
|
82
|
+
},{
|
|
83
|
+
label: 'MediumUtil',
|
|
84
|
+
component: 'ApiMediumUtil',
|
|
80
85
|
}, {
|
|
81
86
|
label: 'DictionaryUtil',
|
|
82
87
|
component: 'ApiDictionaryUtil',
|
|
@@ -1,149 +1,148 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<h3>树-表查询选择:ap-search-pick</h3>
|
|
4
|
+
<api-tittle-2>一、示例:</api-tittle-2>
|
|
5
|
+
<div>
|
|
6
|
+
<div style="width: 200px;">
|
|
7
|
+
<ap-search-pick :options.sync="typeGridOptions"/>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<api-code>{{ js1 }}</api-code>
|
|
11
|
+
<api-tittle-2>二、参数说明:</api-tittle-2>
|
|
12
|
+
<api-table :data="attrData" :columns="attrCols" style="height: 950px"/>
|
|
13
|
+
<api-tittle-2>三、方法说明:</api-tittle-2>
|
|
14
|
+
<api-table :data="methodData" :columns="methodCols"/>
|
|
9
15
|
</div>
|
|
10
|
-
<api-code>{{ js1 }}</api-code>
|
|
11
|
-
<api-tittle-2>二、参数说明:</api-tittle-2>
|
|
12
|
-
<api-table :data="attrData" :columns="attrCols" />
|
|
13
|
-
<api-tittle-2>三、方法说明:</api-tittle-2>
|
|
14
|
-
<api-table :data="methodData" :columns="methodCols" />
|
|
15
|
-
</div>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
19
|
import ApSearchPick from 'ap-frame/frame/components/ApSearchPick'
|
|
20
|
-
import {
|
|
20
|
+
import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
|
|
21
21
|
|
|
22
22
|
export default {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
name: 'ApiApSearchPick',
|
|
24
|
+
components: {
|
|
25
|
+
ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2, ApSearchPick
|
|
26
|
+
},
|
|
27
|
+
data() {
|
|
28
|
+
const attrCols = [
|
|
29
|
+
{label: '分类', prop: 'group', width: '150px'},
|
|
30
|
+
{label: '名称', prop: 'name', width: '180px'},
|
|
31
|
+
{label: '类型', prop: 'type', width: '100px'},
|
|
32
|
+
{label: '默认值', prop: 'default', width: '150px'},
|
|
33
|
+
{label: '描述', prop: 'memo', minWidth: '100px'},
|
|
34
|
+
{label: '示例代码', prop: 'code', minWidth: '100px'}]
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
36
|
+
const attrData = [{
|
|
37
|
+
group: '基础参数',
|
|
38
|
+
name: 'searchPickText',
|
|
39
|
+
type: '字符串',
|
|
40
|
+
default: '',
|
|
41
|
+
memo: '组件的显示值。'
|
|
42
|
+
}, {
|
|
43
|
+
name: 'searchPickTextUrl',
|
|
44
|
+
type: '字符串',
|
|
45
|
+
default: '',
|
|
46
|
+
memo: '初始化searchPickText显示值和弹出框的已选值:根据searchPickValue,后台获取对应信息。' +
|
|
47
|
+
'<br> 后端接口说明:<br> 1、默认POST请求,后端接收参数默认ids。<br> 2、返回值:返回list。list对象的属性分别映射"searchPickTableLabelKey"和表格的"rowKey"参数。默认为fdName和fdId。'
|
|
48
|
+
}, {
|
|
49
|
+
name: 'searchPickValue',
|
|
50
|
+
type: '字符串',
|
|
51
|
+
default: '',
|
|
52
|
+
memo: '组件的选择值。'
|
|
53
|
+
}, {
|
|
54
|
+
name: 'searchPickTitle',
|
|
55
|
+
type: '字符串',
|
|
56
|
+
default: '',
|
|
57
|
+
memo: 'Dialog弹出层标题'
|
|
58
|
+
}, {
|
|
59
|
+
name: 'searchPickHeight',
|
|
60
|
+
type: '字符串',
|
|
61
|
+
default: '400px',
|
|
62
|
+
memo: '树-表Dialog的内容高度。百分比或者px。'
|
|
63
|
+
}, {
|
|
64
|
+
name: 'searchPickWidth',
|
|
65
|
+
type: '字符串',
|
|
66
|
+
default: '70%',
|
|
67
|
+
memo: '树-表Dialog的宽度。百分比或者px。'
|
|
68
|
+
}, {
|
|
69
|
+
name: 'searchPickDisabled',
|
|
70
|
+
type: '布尔',
|
|
71
|
+
default: 'false',
|
|
72
|
+
memo: '是否禁用。'
|
|
73
|
+
}, {
|
|
74
|
+
name: 'searchPickClear',
|
|
75
|
+
type: '方法',
|
|
76
|
+
default: '',
|
|
77
|
+
memo: '点击清空回调。返回true确认清空。',
|
|
78
|
+
code: `<div class="api-code">searchPickClear: () => {
|
|
79
|
+
// 返回false不清空
|
|
80
|
+
if(xxx) { return false;}
|
|
80
81
|
return true;
|
|
81
82
|
}</div>`
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
// 执行选择赋值逻辑
|
|
83
|
+
}, {
|
|
84
|
+
name: 'searchPickConfirm',
|
|
85
|
+
type: '方法',
|
|
86
|
+
default: '',
|
|
87
|
+
memo: '点击确定回调。参数:selectData。返回true确认选择,关闭dialog。',
|
|
88
|
+
code: `<div class="api-code">searchPickConfirm: (selectData) => {
|
|
89
|
+
// 返回false,选择无效dialog不关闭
|
|
90
|
+
if(xxx) { return false;}
|
|
91
91
|
return true;
|
|
92
92
|
}</div>`
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
}, {
|
|
94
|
+
group: '左侧树参数',
|
|
95
|
+
name: 'searchPickTreeOptions',
|
|
96
|
+
type: '对象',
|
|
97
|
+
memo: '树相关参数,参考【树查询组件】相关参数。',
|
|
98
|
+
code: `<div class="api-code">searchPickTreeOptions: {
|
|
98
99
|
searchTreeUrl: "/dc/open/org/getEnableOrgList",
|
|
99
100
|
searchTreeParams: {"disabled": 0},
|
|
100
|
-
searchTreeSelectMultiple:
|
|
101
|
+
searchTreeSelectMultiple: true
|
|
101
102
|
}</div>`
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
memo: '查询对象接口数据请求方式。'
|
|
123
|
-
}]
|
|
103
|
+
}, {
|
|
104
|
+
group: '右侧表格参数',
|
|
105
|
+
name: 'searchPickTableOptions',
|
|
106
|
+
type: '对象',
|
|
107
|
+
default: '',
|
|
108
|
+
memo: '表相关参数,参照【表格组件】相关参数。'
|
|
109
|
+
}, {
|
|
110
|
+
name: 'searchPickTableParamKey',
|
|
111
|
+
type: '对象',
|
|
112
|
+
default: '见描述',
|
|
113
|
+
memo: '默认:{selectedKey:"selectedIds",filterKey:"filterText"}<br>' +
|
|
114
|
+
'表格数据请求,后台controller参数名。<br>' +
|
|
115
|
+
'selectedKey -> tree选中值的参数名<br>' +
|
|
116
|
+
'filterKey -> 过滤文本的参数名'
|
|
117
|
+
}, {
|
|
118
|
+
name: 'searchPickTableLabelKey',
|
|
119
|
+
type: '字符串',
|
|
120
|
+
default: 'fdName',
|
|
121
|
+
memo: '表格顶部已选值,对应的属性名。<br>注:id为表格的rowKey属性'
|
|
122
|
+
}]
|
|
124
123
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
const methodCols = [
|
|
125
|
+
{label: '名称', prop: 'name', width: '200px'},
|
|
126
|
+
{label: '描述', prop: 'memo', minWidth: '100px'},
|
|
127
|
+
{label: '示例代码', prop: 'code', minWidth: '100px'}]
|
|
129
128
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
129
|
+
const methodData = [
|
|
130
|
+
{
|
|
131
|
+
group: '设置数据',
|
|
132
|
+
name: 'initText',
|
|
133
|
+
memo: '设置选中数据。<br>' +
|
|
134
|
+
'<span class="api-memo">参数1:value。选中值,必填,多个数据使用“,”间隔</span><br>' +
|
|
135
|
+
'<span class="api-memo">参数2:text。显示文本,非必填,多个数据使用“,”间隔</span>',
|
|
136
|
+
code: '1、参数传输 (value),调用searchPickTextUrl获取对象<br/>' +
|
|
137
|
+
'单选:<span class="api-code">this.$refs.searchRef.initText(\'xxx\');</span><br/>' +
|
|
138
|
+
'多选:<span class="api-code">this.$refs.searchRef.initText(\'xxx,xxx\');</span><br/>' +
|
|
139
|
+
'2、参数传输 (value, text),不会调用请求获取对象<br/>' +
|
|
140
|
+
'单选:<span class="api-code">this.$refs.searchRef.initText(\'xxx\',\'xxx\');</span><br/>' +
|
|
141
|
+
'多选:<span class="api-code">this.$refs.searchRef.initText(\'xxx,xxx\',\'xxx,xxx\');</span><br/>'
|
|
142
|
+
}
|
|
143
|
+
]
|
|
145
144
|
|
|
146
|
-
|
|
145
|
+
const js1 = `// 1、定义树表查询:
|
|
147
146
|
<el-form :model="form" :rules="rules" ref="formRef" label-width="100px">
|
|
148
147
|
<el-form-item label="attr" prop="attr">
|
|
149
148
|
<ap-search-pick ref="searchRef" :options.sync="options"></ap-search-pick>
|
|
@@ -155,17 +154,13 @@ export default {
|
|
|
155
154
|
// 2、配置options
|
|
156
155
|
options:{
|
|
157
156
|
searchPickText: "期初文本",
|
|
158
|
-
searchPickInitText: true,
|
|
159
157
|
searchPickValue: "",
|
|
160
158
|
searchPickTitle: "弹出层标题",
|
|
161
159
|
searchPickTreeOptions: {
|
|
162
160
|
searchTreeUrl: "/dc/open/org/getEnableSimplifyOrgList",
|
|
163
161
|
searchTreeSelectMultiple: true,
|
|
164
162
|
},
|
|
165
|
-
|
|
166
|
-
searchGridItemUrl: '/dc/open/person/getEnablePersonList',
|
|
167
|
-
},
|
|
168
|
-
searchPickTableConfigs: {
|
|
163
|
+
searchPickTableOptions: {
|
|
169
164
|
dataUrl: "/dc/open/person/getEnablePersonGridList",
|
|
170
165
|
title: "自定义列表",
|
|
171
166
|
columns: [{
|
|
@@ -207,75 +202,71 @@ options:{
|
|
|
207
202
|
|
|
208
203
|
// 3、期初数据方式
|
|
209
204
|
// 方式1:有具体对象的数据,参照 searchPickConfirm 实现方式 -- 注:需要对象数据完整
|
|
210
|
-
this.
|
|
211
|
-
this.
|
|
205
|
+
this.options.searchPickText = 'xxx';
|
|
206
|
+
this.options.searchPickValue = 'xxx';
|
|
212
207
|
|
|
213
208
|
// 方式2:只有对象Id,调用函数 -- 注:只要传输Id
|
|
214
209
|
this.$refs.searchRef.initSearchData("xxx");
|
|
215
210
|
`
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
211
|
+
const typeGridOptions = {
|
|
212
|
+
searchPickText: '期初文本',
|
|
213
|
+
searchPickValue: 'f6754c4206a647d7af4a97ececd5d284',
|
|
214
|
+
searchPickTitle: '弹出层标题',
|
|
215
|
+
searchPickTreeOptions: {
|
|
216
|
+
searchTreeUrl: '/dc/open/org/getEnableSimplifyOrgList',
|
|
217
|
+
searchTreeSelectMultiple: false
|
|
218
|
+
},
|
|
219
|
+
searchPickTableOptions: {
|
|
220
|
+
dataUrl: '/dc/open/person/getEnablePersonGridList',
|
|
221
|
+
title: '自定义列表',
|
|
222
|
+
columns: [{
|
|
223
|
+
prop: 'fdName',
|
|
224
|
+
label: '名称',
|
|
225
|
+
type: 'input'
|
|
226
|
+
}, {
|
|
227
|
+
prop: 'fdNo',
|
|
228
|
+
label: '工号',
|
|
229
|
+
type: 'input'
|
|
230
|
+
}, {
|
|
231
|
+
prop: 'fdDeptName',
|
|
232
|
+
label: '部门名称',
|
|
233
|
+
type: 'input'
|
|
234
|
+
}],
|
|
235
|
+
multiSelect: true
|
|
236
|
+
},
|
|
237
|
+
searchPickConfirm: (selectData) => {
|
|
238
|
+
if (Array.isArray(selectData)) {
|
|
239
|
+
// 多选
|
|
240
|
+
// 使用了 ES6 语法 获取对象数组的指定属性数组
|
|
241
|
+
const valueArr = selectData.map(item => item.fdId)
|
|
242
|
+
const labelArr = selectData.map(item => item.fdName)
|
|
243
|
+
this.typeGridOptions.searchPickValue = valueArr.join(',')
|
|
244
|
+
this.typeGridOptions.searchPickText = labelArr.join(',')
|
|
245
|
+
} else {
|
|
246
|
+
// 单选
|
|
247
|
+
this.typeGridOptions.searchPickValue = selectData.fdId
|
|
248
|
+
this.typeGridOptions.searchPickText = selectData.fdName
|
|
249
|
+
}
|
|
250
|
+
return true
|
|
251
|
+
},
|
|
252
|
+
searchPickClear: () => {
|
|
253
|
+
this.typeGridOptions.searchPickValue = ''
|
|
254
|
+
this.typeGridOptions.searchPickText = ''
|
|
255
|
+
return true
|
|
256
|
+
}
|
|
258
257
|
}
|
|
259
|
-
return
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
attrCols,
|
|
270
|
-
methodData,
|
|
271
|
-
methodCols,
|
|
272
|
-
js1,
|
|
273
|
-
typeGridOptions
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
methods: {}
|
|
258
|
+
return {
|
|
259
|
+
attrData,
|
|
260
|
+
attrCols,
|
|
261
|
+
methodData,
|
|
262
|
+
methodCols,
|
|
263
|
+
js1,
|
|
264
|
+
typeGridOptions
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
methods: {}
|
|
277
268
|
}
|
|
278
269
|
</script>
|
|
279
270
|
|
|
280
271
|
<style scoped>
|
|
281
|
-
</style>
|
|
272
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<h3>消息推送工具类 - QyWxUtil</h3>
|
|
4
|
+
<api-table :data="methodData" :columns="methodCols"/>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: 'ApiMediumUtil',
|
|
13
|
+
components: {
|
|
14
|
+
ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
const methodCols = [
|
|
18
|
+
{label: '方法名', prop: 'name', width: '220px'},
|
|
19
|
+
{label: '说明', prop: 'memo', width: '300px'},
|
|
20
|
+
{label: '示例代码', prop: 'code', minWidth: '100px'}]
|
|
21
|
+
const methodData = [
|
|
22
|
+
{
|
|
23
|
+
name: 'getMediumList',
|
|
24
|
+
memo: `获取消息推送列表<br>
|
|
25
|
+
注:根据分组类型自动转换为邮箱、工号、手机号`,
|
|
26
|
+
code: `<span class="api-code">// 获取编码为"test"的推送列表
|
|
27
|
+
List<String> list = MediumUtil.getMediumList("test")
|
|
28
|
+
</span>`
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
methodData,
|
|
34
|
+
methodCols
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
methods: {}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style scoped>
|
|
42
|
+
</style>
|