ap-dev 1.1.26 → 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
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>
|