| | |
| | | <FormItem label="用户昵称" prop="name"> |
| | | <Input v-model="form.nickName" style="width: 200px" /> |
| | | </FormItem> |
| | | <FormItem label="标签" prop="tags"> |
| | | <Select v-model="selectTagIds" multiple filterable :loading="selectLoading" style="width:200px;"> |
| | | <Option v-for="item in options" :key="item.id" :label="item.tagName" :value="item.id"></Option> |
| | | </Select> |
| | | </FormItem> |
| | | <FormItem label="性别" prop="sex"> |
| | | <RadioGroup type="button" button-style="solid" v-model="form.sex"> |
| | | <Radio :label="1"> |
| | |
| | | import * as API_Member from "@/api/member.js"; |
| | | import ossManage from "@/views/sys/oss-manage/ossManage"; |
| | | import * as RegExp from "@/libs/RegExp.js"; |
| | | import { getTags } from "@/api/tag.js"; |
| | | |
| | | export default { |
| | | name: "member", |
| | |
| | | descFlag: false, //编辑查看框 |
| | | loading: true, // 表单加载状态 |
| | | addFlag: false, // modal显隐控制 |
| | | |
| | | selectLoading: false, |
| | | options: [], |
| | | selectTagIds: [], |
| | | selectTags: [], |
| | | addMemberForm: { |
| | | // 添加用户表单 |
| | | mobile: "", |
| | |
| | | * 查询查看会员详情 |
| | | */ |
| | | getMemberInfo(id) { |
| | | var that = this; |
| | | API_Member.getMemberInfoData(id).then((res) => { |
| | | if (res.result) { |
| | | debugger |
| | | that.selectTags = [] |
| | | that.selectTagIds = [] |
| | | res.result.tags.forEach(element => { |
| | | that.selectTags.push(element.tagName) |
| | | that.selectTagIds.push(element.tagId) |
| | | }); |
| | | this.$set(this, "form", res.result); |
| | | } |
| | | }); |
| | |
| | | |
| | | // 提交修改数据 |
| | | handleSubmitModal() { |
| | | debugger |
| | | const { nickName, sex, username, face, newPassword,id,regionId,region } = this.form; |
| | | let time = new Date(this.form.birthday); |
| | | let birthday = this.form.birthday=== undefined?'': |
| | |
| | | id |
| | | }; |
| | | |
| | | submit.tags = this.selectTagIds |
| | | if (newPassword) { |
| | | submit.password = this.md5(newPassword); |
| | | } |
| | |
| | | } |
| | | }); |
| | | }, |
| | | selectTag(e) { |
| | | debugger |
| | | if (this.selectTagIds.indexOf(e.value) != -1) { |
| | | this.selectTagIds.splice(this.selectTagIds.indexOf(e.value), 1) |
| | | this.selectTags.splice(this.selectTags.indexOf(e.label), 1) |
| | | } |
| | | else { |
| | | this.selectTagIds.push(e.value) |
| | | this.selectTags.push(e.label) |
| | | } |
| | | console.log(this.selectTags); |
| | | |
| | | }, |
| | | remoteMethod(query) { |
| | | this.selectLoading = true; |
| | | var params = { |
| | | "tagTypeKey": "USER", |
| | | "pageNumber": 1, |
| | | "pageSize": 500 |
| | | } |
| | | getTags(params).then(res => { |
| | | this.options = res.data; |
| | | this.selectLoading = false; |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getData(); |
| | | this.remoteMethod("") |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | /deep/ .ivu-table-wrapper { |
| | | width: 100%; |
| | | } |
| | | |
| | | /deep/ .ivu-card { |
| | | width: 100%; |
| | | } |
| | | |
| | | .face { |
| | | width: 60px; |
| | | height: 60px; |