yangfeng
2024-01-26 eb30bab79870f892cf11774d8a09684381074640
src/views/unifiedManage/userManage/index.vue
@@ -2,10 +2,11 @@
  <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>
@@ -50,7 +51,7 @@
      </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>
@@ -72,12 +73,12 @@
    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 }
      ],
@@ -110,7 +111,13 @@
      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
      })
    },
@@ -123,7 +130,7 @@
    // 查看
    viewClick(row) {
      console.log(row)
      this.editConfig.visible = true
      this.$refs.editUserInfoRef.isvisible = true
      this.editConfig.title = "查看"
      this.editConfig.form = row
    },
@@ -165,10 +172,18 @@
    // 编辑
    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 = {