| | |
| | | <div class="user-manage"> |
| | | <div class="top-card"> |
| | | <CommonSearch |
| | | :show-add="false" |
| | | :add-title="'添加用户'" |
| | | :amount-view="false" |
| | | placeholder="请输入用户名/手机号" |
| | | @searchClick="onFilterSearch" |
| | | @addCommonClick="addBtnClick" |
| | | > |
| | | <!-- <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新建</el-button> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 查看/编辑 --> |
| | | <EditUserInfo v-if="editConfig.visible" :edit-common-config="editConfig" /> |
| | | <EditUserInfo ref="editUserInfoRef" :edit-common-config="editConfig" /> |
| | | <!-- 审核 --> |
| | | <ReviewDialog v-if="reviewConfig.visible" :edit-common-config="reviewConfig" /> |
| | | </div> |
| | |
| | | return { |
| | | tableList: {}, |
| | | tableColumn: [ |
| | | { label: "用户名", prop: "username", default: true }, |
| | | { label: "用户名", prop: "userName", default: true }, |
| | | { label: "手机号", prop: "phone" }, |
| | | { label: "公司名称", prop: "companyName" }, |
| | | { label: "联系人姓名", prop: "nickName" }, |
| | | { label: "邮箱", prop: "companyEmail" }, |
| | | { label: "行业", prop: "industry" }, |
| | | { label: "行业", prop: "companyTrade" }, |
| | | { label: "地区", prop: "region" }, |
| | | { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getStatus } |
| | | ], |
| | |
| | | this.obj.page = this.pagerOptions.currPage |
| | | listUser(this.obj).then((res) => { |
| | | console.log(res) |
| | | this.tableList.tableInfomation = res.data.list || [] |
| | | let list = res.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | userName: item.username |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.total |
| | | }) |
| | | }, |
| | |
| | | // 查看 |
| | | viewClick(row) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.$refs.editUserInfoRef.isvisible = true |
| | | this.editConfig.title = "查看" |
| | | this.editConfig.form = row |
| | | }, |
| | |
| | | // 编辑 |
| | | editClick(row) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.$refs.editUserInfoRef.isvisible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.form = { ...row } |
| | | }, |
| | | // 添加用户 |
| | | addBtnClick() { |
| | | this.$refs.editUserInfoRef.isvisible = true |
| | | this.editConfig.title = "添加" |
| | | this.editConfig.form = { |
| | | roleIDs: [] |
| | | } |
| | | }, |
| | | // 列表初始化 |
| | | setTable() { |
| | | this.tableList = { |