|
@@ -3,9 +3,9 @@ Page({
|
|
|
data: {
|
|
|
ownertable: null,
|
|
|
ownerid: null,
|
|
|
- active: 0,
|
|
|
copyTeams: [], //用来本地搜索
|
|
|
keyword: "", //搜索关键字
|
|
|
+ activeNames: ["1"],
|
|
|
},
|
|
|
handelSubmit(userids) {
|
|
|
const that = this;
|
|
@@ -47,22 +47,18 @@ Page({
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
if (options.item) {
|
|
|
- let item = JSON.parse(options.item);
|
|
|
this.setData({
|
|
|
- ...item
|
|
|
+ ...JSON.parse(options.item)
|
|
|
});
|
|
|
this.getList()
|
|
|
}
|
|
|
},
|
|
|
- onInput({
|
|
|
- detail
|
|
|
- }) {
|
|
|
- let list = this.data.copyTeams[this.data.active];
|
|
|
- if (detail.value) list = list.filter(v => v.position.includes(detail.value) || v.name.includes(detail.value));
|
|
|
+ onChange(event) {
|
|
|
this.setData({
|
|
|
- [`teams[${this.data.active}].team`]: list
|
|
|
- })
|
|
|
+ activeNames: event.detail,
|
|
|
+ });
|
|
|
},
|
|
|
+
|
|
|
toAdd() {
|
|
|
wx.navigateTo({
|
|
|
url: `/packageA/group/select?data=${
|
|
@@ -73,21 +69,7 @@ Page({
|
|
|
}`,
|
|
|
})
|
|
|
},
|
|
|
- /* 取消搜索 */
|
|
|
- cancelTheSearch() {
|
|
|
- this.setData({
|
|
|
- keyword: "",
|
|
|
- [`teams[${this.data.active}].team`]: this.data.copyTeams[this.data.active]
|
|
|
- })
|
|
|
- },
|
|
|
- /* 切换tabs */
|
|
|
- onChange({
|
|
|
- detail
|
|
|
- }) {
|
|
|
- this.setData({
|
|
|
- active: detail.index
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
//获取列表
|
|
|
getList() {
|
|
|
_Http.basic({
|