|
|
@@ -17,19 +17,47 @@ Page({
|
|
|
result: [],
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ //是否为单选
|
|
|
+ if (options.radio) this.setData({
|
|
|
+ radio: true
|
|
|
+ })
|
|
|
if (options.ownertable) {
|
|
|
this.setData({
|
|
|
- content: {
|
|
|
- ...options
|
|
|
- }
|
|
|
+ "content.ownertable": options.ownertable,
|
|
|
+ "content.ownerid": options.ownerid,
|
|
|
});
|
|
|
this.getList();
|
|
|
console.log(this.data.content)
|
|
|
};
|
|
|
- if (options.radio) this.setData({
|
|
|
- radio: true
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ let result = this.data.result;
|
|
|
+ if (result.length == 0) return;
|
|
|
+ console.log(result)
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20220930103601,
|
|
|
+ "content": {
|
|
|
+ "ownertable": this.data.content.ownertable,
|
|
|
+ "ownerid": this.data.content.ownerid,
|
|
|
+ "userids": result
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ wx.showToast({
|
|
|
+ title: '保存成功',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ const pages = getCurrentPages();
|
|
|
+ pages[pages.length - 2].selectComponent("#Group").getList();
|
|
|
+ wx.navigateBack();
|
|
|
+ }, 300)
|
|
|
})
|
|
|
},
|
|
|
+ /* 选中 */
|
|
|
onChange(e) {
|
|
|
const userid = e.currentTarget.dataset.item.userid + "";
|
|
|
if (!userid) return;
|
|
|
@@ -49,6 +77,7 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ //获取列表
|
|
|
getList(init = false) {
|
|
|
let content = this.data.content;
|
|
|
if (init) {
|