yangfeng
2024-01-04 edb9e3f9ff72a96e43a4172ac38614b9968ed363
用户管理、用户等级列表页页面开发、新增/编辑用户等级弹窗页面开发
1个文件已添加
3个文件已修改
796 ■■■■■ 已修改文件
src/components/makepager/CommonSearch.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/unifiedManage/userLevel/components/AddUserLevel.vue 394 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/unifiedManage/userLevel/index.vue 343 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/unifiedManage/userManage/index.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonSearch.vue
@@ -2,18 +2,7 @@
  <div class="search-list">
    <div class="search-top">
      <div class="left">
        <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn">
          <div style="display: flex">
            <!-- <img
              v-if="ishumanResource"
              src="../../../assets/DingDing/index.png"
              style="width: 15px; height: 15px; margin-right: 5px; background-color: #ffffff; border-radius: 50%"
              alt=""
            /> -->
            <slot name="buttonIcon" />
            <p style="margin-top: 1px; line-height: 15px">{{ addTitle }}</p>
          </div>
        </el-button>
        <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn">{{ addTitle }}</el-button>
        <slot name="leftButton" />
        <div class="download" @click="downloadClick" :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }">
          <img src="@/assets/img/xiazai.png" style="width: 13px" />
@@ -227,7 +216,8 @@
    align-items: center;
    .left {
      display: flex;
      width: 150px;
      width: 250px;
      .download {
        width: 30px;
        height: 30px;
src/views/unifiedManage/userLevel/components/AddUserLevel.vue
New file
@@ -0,0 +1,394 @@
<template>
  <div class="add-quotation">
    <el-dialog
      :title="editCommonConfig.title + '等级'"
      :visible.sync="editConfig.visible"
      :width="dialogWidth"
      :before-close="handleClose"
      append-to-body
      custom-class="iframe-dialog"
    >
      <div class="drawerContent" style="overflow: auto">
        <el-form ref="form" :rules="rules" :model="form" label-width="120px">
          <el-form-item label="角色名称" prop="name">
            <el-input v-model="form.name" placeholder="请输入" style="width: 63%"></el-input>
          </el-form-item>
          <el-form-item label="参考角色" prop="prepareRole">
            <el-select
              placeholder="请选择参考角色"
              v-model="form.prepareRole"
              style="width: 63%"
              @change="selPrepareRole"
            >
              <el-option
                v-for="(ele, index) in prepareRoleList"
                :key="index"
                :label="ele.name"
                :value="ele.id"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="角色描述" prop="comment">
            <el-input v-model="form.comment" placeholder="请输入" style="width: 63%"></el-input>
          </el-form-item>
          <el-form-item label="页面权限" prop="subsystemIDs">
            <div class="icon-box">
              <div class="icon-box-item" v-for="(item, index) in completeList" :key="item.systemType">
                <div
                  class="iconItem"
                  :class="{ iconActive: form.completeType == item.systemType }"
                  @click="imgClick(item, index)"
                >
                  {{ item.name }}
                </div>
              </div>
              <div style="clear: both"></div>
              <div style="height: calc(100% - 40px)" v-for="item in menusList" :key="'tree_' + item.systemType">
                <el-tree
                  v-show="form.completeType == item.systemType"
                  class="icon-item-tree"
                  :ref="'menuTree&' + item.systemType"
                  :data="item.menus"
                  show-checkbox
                  node-key="id"
                  @check-change="handleCheckChange"
                  :props="treeDefaultProp"
                  default-expand-all
                >
                </el-tree>
              </div>
            </div>
          </el-form-item>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="handleClose">取消</el-button>
        <el-button type="primary" @click="onSubmit('form')">确定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
// import codeMixin from "@/components/makepager/mixin/codeMixin"
export default {
  name: "AddUserLevel",
  // mixins: [codeMixin],
  props: {
    editCommonConfig: {
      type: Object,
      default: () => {
        return {
          visible: false,
          title: "新建",
          infomation: {}
        }
      }
    }
  },
  components: {},
  computed: {},
  data() {
    return {
      dialogWidth: "35%",
      editConfig: this.editCommonConfig,
      prepareRoleList: [], // 参考角色
      menusList: [], //菜单
      // 权限 管理
      completeList: [],
      form: {},
      rules: {
        name: [{ required: true, message: "请输入角色名称", trigger: "blur" }]
      },
      treeDefaultProp: {
        children: "children",
        label: "title",
        id: "id"
      }
    }
  },
  watch: {
    "editCommonConfig.visible"(val) {
      if (val) {
        this.$refs.form.resetFields()
        this.getDataInfo()
      }
    },
    "editCommonConfig.infomation"(val) {
      if (this.isopen) {
        this.$refs.form.resetFields()
        if (val.id) {
          this.getDataInfo(val)
        }
      }
    }
  },
  created() {
    this.getDataInfo()
  },
  methods: {
    handleClose() {
      this.editConfig.visible = false
    },
    handleCheckChange(data, checked, indeterminate) {
      console.log(data, checked, indeterminate)
    },
    // 获取参考角色 页面权限  菜单 的数据
    async getDataInfo(val) {
      console.log(val)
      // const rsp = await getDataRole({ useType: 1 })
      // if (rsp.code == 200) {
      //   // 参考角色
      //   this.prepareRoleList = rsp.data.roles ? rsp.data.roles : []
      //   this.menusList = rsp.data.menus ? rsp.data.menus : []
      //   // 页面权限
      //   this.completeList = rsp.data.subsystems ? rsp.data.subsystems : []
      //   this.form.completeType = this.completeList.length > 0 ? this.completeList[0].systemType : 1
      // }
      // if (this.isopen) {
      //   this.resetForm(val)
      // }
    },
    getMenuCheck(val) {
      if (val && val.length > 0) {
        for (let i in this.menusList) {
          this.$refs["menuTree&" + this.menusList[i].systemType][0].setCheckedKeys(val)
        }
      }
    },
    resetForm(val) {
      this.form = {
        prepareRole: "",
        menuIDs: [],
        name: "",
        comment: "",
        subsystemIDs: [],
        completeType:
          this.completeList.length > 0 && this.completeList[0].systemType ? this.completeList[0].systemType : 1
      }
      if (val) {
        this.form = JSON.parse(JSON.stringify(val))
        this.form.completeType =
          this.completeList.length > 0 && this.completeList[0].systemType ? this.completeList[0].systemType : 1
        if (this.form.menuIDs && this.form.menuIDs.length > 0) {
          for (let i in this.menusList) {
            this.$refs["menuTree&" + this.menusList[i].systemType][0].setCheckedKeys(this.form.allMenu.split(","))
          }
        }
      } else {
        for (let i in this.menusList) {
          this.$refs["menuTree&" + this.menusList[i].systemType][0].setCheckedKeys([])
        }
      }
    },
    imgClick(item) {
      this.form.completeType = item.systemType
      this.$forceUpdate()
    },
    selPrepareRole(val) {
      if (val) {
        for (let i in this.prepareRoleList) {
          if (this.prepareRoleList[i].id == val) {
            let value = this.prepareRoleList[i]
            this.completeList = value.subsystems
            this.form.completeType = this.completeList.length > 0 ? this.completeList[0].systemType : 1
            this.getMenuCheck(value.menuIDs ? value.menuIDs : [])
            this.$forceUpdate()
            break
          }
        }
      }
    },
    onSubmit(formName) {
      this.$refs[formName].validate((valid) => {
        console.log(valid)
        if (valid) {
          // let submitFn = this.editRow.id ? updateRole : addRole
          // let param = this.saveParams()
          // submitFn(param).then((reply) => {
          //   if (reply && reply.code === 200) {
          //     this.$message.success("保存成功")
          //     this.$emit("shutdown", false)
          //   }
          // })
        }
      })
    },
    saveParams() {
      let data = this.form
      // 用户的权限配置 树形结构
      let menuIds = []
      // 全选的用户权限
      let allMenuIds = []
      //对应的页面权限 是否选择了菜单
      let indexArr = []
      for (let i in this.menusList) {
        let arr = this.$refs["menuTree&" + this.menusList[i].systemType][0].getCheckedKeys()
        menuIds = menuIds.concat(arr)
        allMenuIds = allMenuIds.concat(arr)
        let arr2 = this.$refs["menuTree&" + this.menusList[i].systemType][0].getHalfCheckedKeys()
        menuIds = menuIds.concat(arr2)
        //对应的页面权限 是否选择了菜单
        let arr3 = arr.concat(arr2)
        if (arr3.length > 0) {
          indexArr.push(i)
        }
      }
      let subsystemIDs = []
      for (let i in indexArr) {
        for (let j in this.completeList) {
          if (this.menusList[indexArr[i]].systemType == this.completeList[j].systemType) {
            subsystemIDs.push(this.completeList[j].id)
            break
          }
        }
      }
      console.log(subsystemIDs, "===subsystemIDs")
      let params = {
        subsystemIDs: subsystemIDs,
        role: {
          allMenu: allMenuIds.join(),
          id: this.editRow.id,
          comment: data.comment || "",
          name: data.name || "",
          useType: 1
        },
        menuIDs: menuIds
      }
      return params
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
::v-deep {
  .iframe-dialog .el-dialog__body {
    .drawerContent {
      width: 90%;
      padding: 0;
      margin: auto;
      overflow: hidden;
      margin-top: 15px;
      // 溢出隐藏滚动条
      scrollbar-width: none; /* firefox */
      -ms-overflow-style: none; /* IE 10+ */
      .button {
        position: absolute;
        right: 60px;
        bottom: 20px;
        .el-button {
          width: 80px;
          height: 38px;
          font-family: PingFangSC-Medium, sans-serif;
        }
      }
      .content-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
      }
      .name-tips {
        position: absolute;
        top: 25px;
        left: 20px;
        color: rgb(255, 0, 0);
        font-size: 10px;
      }
    }
    .el-tree {
      height: 305px;
      overflow-y: auto;
    }
    .icon-box {
      width: 100%;
      height: 320px;
      overflow: hidden;
      box-sizing: border-box;
      font-size: 14px;
      position: relative;
      .icon-box-item {
        float: left;
      }
      .icon-item-tree {
        width: 100%;
        height: calc(100% - 40px);
        position: absolute;
        top: 40px;
        left: 0px;
      }
      .iconItem {
        width: auto;
        height: 32px;
        padding: 0 5px;
        line-height: 32px;
        border-radius: 6px;
        float: left;
        margin-right: 10px;
        margin-bottom: 5px;
        text-align: center;
        box-sizing: border-box;
        border: 1px solid #e5e5e5;
        cursor: pointer;
        // &:hover {
        //   background: rgba(30, 120, 235, 1);
        //   border: 1px solid rgba(30, 120, 235, 1);
        //   color: #fff;
        //   box-sizing: border-box;
        // }
      }
      .iconActive {
        background: rgba(30, 120, 235, 1);
        color: #fff;
        box-sizing: border-box;
      }
    }
    .dialog-footer {
      background-color: #f5f5f5;
      height: 55px;
      line-height: 55px;
    }
  }
  .el-input__inner {
    font-size: 13px !important;
    color: rgba(0, 0, 0, 0.9);
    text-align: left;
  }
  .el-input__inner::placeholder {
    color: rgba(0, 0, 0, 0.4);
  }
  .el-form-item__error {
    font-family: PingFangSC;
  }
  .el-select-dropdown__wrap {
    overflow: auto !important;
  }
  .el-select-dropdown {
    position: absolute !important;
    top: 36px !important;
    left: 0px !important;
  }
  .el-form-item__label {
    font-size: 13px !important;
    color: #000;
    font-family: PingFangSC;
    text-align: center !important;
    width: 60px;
  }
  .input-box .input-content input {
    width: 23px;
    height: 26px;
    border-color: rgba(0, 0, 0, 0.1);
  }
  .el-icon-minus {
    width: 0px !important;
    height: 26px !important;
    line-height: 38px !important;
    color: #e5e5e5;
    font-size: 13px;
  }
}
</style>
src/views/unifiedManage/userLevel/index.vue
@@ -1,56 +1,72 @@
<template>
  <div class="user-level">
    用户等级
    <!-- <div v-if="isDetail" class="detail-top">
      <DetailListCommonBtn :query-class-options="queryClassOptions" />
    </div>
    <div v-else class="filter">
      <div class="filter-card">
        <CommonSearch :show-add="false" :amount-view="false" placeholder="请输入单据编号" @searchClick="onFilterSearch">
          <template slot="leftButton">
            <el-button size="small" type="primary" @click="addBtnClick">新建</el-button>
          </template>
        </CommonSearch>
      </div>
    <div class="top-card">
      <CommonSearch
        :add-title="'新增等级'"
        :total-object="totalObject"
        :other-options="otherOptions"
        :placeholder="'请输入等级名称'"
        @addCommonClick="addBtnClick"
        @searchClick="searchClick"
      ></CommonSearch>
    </div>
    <div class="body">
      <div class="body-card">
      <div class="content-top">
        <div class="list-view">
          <TableCommonView
            ref="tableListRef"
            :table-list="tableList"
            :show-summary="showSummary"
            @selClientClick="selClientClick"
            @selMasterClick="selMasterClick"
            @selCommonClick="selCommonClick"
            @getSelectArray="getSelectArray"
            @selTableCol="selTableCol"
            @tableRowClick="tableRowClick"
            :selectClassRow="selectRow"
          >
            <template slot="tableButton">
              <el-table-column label="操作" width="90">
              <el-table-column label="操作" width="120">
                <template slot-scope="scope">
                  <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
                  <el-button @click="deleteItem(scope.row.id)" type="text" size="small">删除</el-button>
                  <el-button v-if="scope.row.status" type="text" size="small" @click.stop="changeStatusClick(scope.row)"
                    >停用</el-button
                  >
                  <el-button v-else @click.stop="getRoleChange(scope.row)" type="text" size="small">启用</el-button>
                  <el-button @click.stop="handleClick(scope.row)" type="text" size="small">编辑</el-button>
                  <el-button @click.stop="delClick(scope.row)" type="text" size="small">删除</el-button>
                </template>
              </el-table-column>
            </template>
          </TableCommonView>
        </div>
        <div class="btn-pager">
          <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
        </div>
      </div> -->
    <!-- </div> -->
      </div>
      <div class="content-bottom">
        <div class="bottom-tabs bgcGrey">
          <div
            class="tab-pane"
            @click="getTab(0)"
            :style="{
              background: TabsIndex == 0 ? '#2a78fb' : '#F1F3F8',
              color: TabsIndex == 0 ? '#fff' : '#666'
            }"
          >
            管理员
          </div>
        </div>
        <div class="list-view">
          <TableCommonView :loading="loading" :table-list="bottomTableList" @selTableCol="selBottomTableCol">
          </TableCommonView>
        </div>
      </div>
    </div>
    <!-- 新建/编辑 -->
    <!-- <AddSubOrderDialog v-if="editConfig.visible" :edit-common-config="editConfig" /> -->
    <AddUserLevel v-if="editConfig.visible" :edit-common-config="editConfig" />
  </div>
</template>
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import AddUserLevel from "@/views/unifiedManage/userLevel/components/AddUserLevel"
export default {
  name: "UserLevel",
  props: {
@@ -66,27 +82,290 @@
    }
  },
  mixins: [pageMixin],
  components: {},
  components: { AddUserLevel },
  computed: {},
  data() {
    return {
      tableList: {}
      totalObject: {
        value: 0,
        label: "全部"
      },
      otherOptions: [
        {
          value: 0,
          label: "启用",
          status: "success"
        },
        {
          value: 0,
          label: "停用",
          status: "error"
        }
      ],
      tableList: {},
      tableColumn: [
        { label: "等级名称", prop: "name", default: true },
        { label: "等级描述", prop: "comment", default: true },
        { label: "员工数", prop: "count" },
        { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getRoleStatus }
      ],
      showCol: ["等级名称", "等级描述", "员工数", "状态"],
      selectRow: {},
      TabsIndex: 0,
      bottomTableList: {},
      loading: false,
      tableBottomColumn: [
        { label: "用户名", prop: "username", default: true },
        { label: "姓名", prop: "nickName", default: true },
        { label: "手机号", prop: "phone" },
        { label: "岗位职务", prop: "dutyNames" },
        { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getUserStatus }
      ],
      showBottomCol: ["用户名", "姓名", "手机号", "岗位职务", "状态"],
      isopen: false,
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
      },
      data: {
        keyword: "",
        page: 1,
        pageSize: 15,
        useType: 1
      }
    }
  },
  created() {
    this.setTable()
  },
  methods: {
    setTable() {}
    // 新建
    addBtnClick() {
      this.editConfig.title = "新建"
      this.editConfig.infomation = { ...this.addConfig, currency: "人民币" }
      this.editConfig.visible = true
    },
    // 搜索
    searchClick(val) {
      this.data.keyword = val
      this.pagerOptions.currPage = 1
      // this.getData();
    },
    // 停用
    changeStatusClick(row) {
      this.$confirm("是否停用此等级?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          this.getRoleChange(row)
        })
        .catch(() => {})
    },
    // 启用 停用请求
    async getRoleChange(row) {
      console.log(row)
      // await roleChange({
      //   id: row.id,
      //   status: !row.status,
      // }).then((reply) => {
      //   if (reply && reply.code == 200) {
      //     let tips = row.status ? "停用成功" : "启用成功";
      //     this.getData();
      //     this.$message({
      //       type: "success",
      //       message: tips,
      //     });
      //   }
      // });
    },
    // 编辑
    handleClick(val) {
      this.editRow = val
      this.isopen = true
    },
    // 删除等级
    delClick(row) {
      console.log(row)
      this.$confirm("删除后数据不能恢复,确定是否删除?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          // deleteRole(row.id).then((reply) => {
          //   if (reply && reply.code == 200) {
          //     this.getData();
          //     this.$message({
          //       type: "success",
          //       message: "删除成功",
          //     });
          //   }
          // });
        })
        .catch(() => {})
    },
    // 行点击
    tableRowClick(row) {
      console.log(row)
      this.selectRow = row
      // this.getUserList(row.id);
    },
    // 等级状态
    getRoleStatus(val) {
      return val ? "启用" : "停用"
    },
    //获取当前选中等级的id
    getTab(tab) {
      this.TabsIndex = tab
      if (this.TabsIndex == 0) {
        // 产品信息列表
        this.showBottomCol = this.showProductCol
        this.setBottomList()
        this.getProductInventoryInfo(this.selectRow)
      }
    },
    // 用户状态
    getUserStatus(val) {
      return val === 0 ? "禁用" : val === 1 ? "正常" : "审核中"
    },
    // 初始化列表
    setTable() {
      this.tableList = {
        selectIndex: true,
        tableInfomation: [],
        allcol: [],
        showcol: this.showCol,
        tableColumn: this.setColumnVisible(this.showCol, this.tableColumn)
      }
      this.setTableList(this.tableList)
      // bottom
      this.setBottomList()
    },
    // 等级列表
    setTableList(tableList) {
      tableList.allcol = tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
      this.searchOptions = []
      for (let i = 0; i < tableList.tableColumn.length; i++) {
        const label = tableList.tableColumn[i].label
        const value = tableList.tableColumn[i].prop
        this.searchOptions.push({ value: value, label: label })
      }
    },
    // bom 列表
    setBottomList() {
      this.bottomTableList = {
        selectIndex: true,
        tableInfomation: [],
        allcol: [],
        showcol: this.showBottomCol,
        tableColumn: this.setColumnVisible(this.showBottomCol, this.tableBottomColumn)
      }
      this.setTableList(this.bottomTableList)
    },
    // 等级
    selTableCol(val) {
      this.showcol = val
      this.tableList.tableColumn = this.setColumnVisible(val)
    },
    // bottom
    selBottomTableCol(val) {
      this.showcol = val
      this.bottomTableList.tableColumn = this.setColumnVisible(val, this.tableBottomColumn)
    },
    setColumnVisible(showCol, tableColumn) {
      return tableColumn.map((ele) => {
        return {
          ...ele,
          isShowColumn: showCol.includes(ele.label)
        }
      })
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
::v-deep {
}
.user-level {
  height: 100%;
  .top-card {
    height: 80px;
    display: flex;
    align-items: center;
    margin: 12px 20px 0 20px;
    border-radius: 12px;
    background-color: #fff;
    padding-left: 20px;
  }
  .body {
    box-sizing: border-box;
    padding: 10px 20px;
    border-radius: 12px;
    height: calc(100% - 92px);
    .body-card {
      background-color: #fff;
      border-radius: 12px;
      height: 100%;
      overflow: hidden;
    }
    .content-top {
      background-color: #fff;
      border-radius: 12px;
      min-height: 70px;
      height: 48%;
      position: relative;
      .list-view {
        height: calc(100% - 60px);
      }
    }
    .content-bottom {
      .bottom-tabs {
        height: 40px;
        line-height: 40px;
        background: #e6ecf2;
        display: flex;
        .tab-pane {
          width: 100px;
          margin-right: 20px;
          font-size: 14px !important;
          text-align: center;
          cursor: pointer;
          background: #2a78fb;
          border-top-left-radius: 20px;
          border-top-right-radius: 20px;
        }
      }
      .lable-view {
        background: #e6ecf2;
        height: 40px;
        line-height: 40px;
        .name {
          border-left: 4px solid #2a78fb;
          padding-left: 10px;
        }
      }
      background-color: #fff;
      border-radius: 12px;
      min-height: 70px;
      height: calc(52% - 60px);
      margin-top: 10px;
      // padding: 10px 20px;
      .list-view {
        height: calc(100% - 10px);
      }
    }
    .btn-pager {
      display: flex;
      margin-top: 10px;
      .page {
        margin-left: auto;
      }
    }
  }
}
::v-deep {
}
</style>
src/views/unifiedManage/userManage/index.vue
@@ -16,18 +16,9 @@
    <div class="body">
      <div class="body-card">
        <div class="list-view">
          <TableCommonView
            ref="tableListRef"
            :table-list="tableList"
            :show-summary="showSummary"
            @selClientClick="selClientClick"
            @selMasterClick="selMasterClick"
            @selCommonClick="selCommonClick"
            @getSelectArray="getSelectArray"
            @selTableCol="selTableCol"
          >
          <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol">
            <template slot="tableButton">
              <el-table-column label="操作" width="90">
              <el-table-column label="操作" width="120">
                <template slot-scope="scope">
                  <el-button @click="viewClick(scope.row)" type="text" size="small">查看</el-button>
                  <el-button @click="approveClick(scope.row)" type="text" size="small">审核</el-button>
@@ -60,23 +51,26 @@
    return {
      tableList: {},
      tableColumn: [
        { label: "序号", prop: "number", default: true },
        { label: "用户名", prop: "client_name" },
        { label: "手机号", prop: "signTime" }, // 签约日期
        { label: "公司名称", prop: "serviceContractType" },
        { label: "联系人姓名", prop: "serviceContractStatus" },
        { label: "邮箱", prop: "member_name" },
        { label: "行业", prop: "productName", isProductName: true },
        { label: "地区", prop: "startTime" },
        { label: "状态", prop: "endTime" }
        { label: "用户名", prop: "username" },
        { label: "手机号", prop: "phone" },
        { label: "公司名称", prop: "company" },
        { label: "联系人姓名", prop: "contact" },
        { label: "邮箱", prop: "mailbox" },
        { label: "行业", prop: "industry" },
        { label: "地区", prop: "region" },
        { label: "状态", prop: "status" }
      ],
      showCol: ["序号", "用户名", "手机号", "公司名称", "联系人姓名", "邮箱", "行业", "地区", "状态"]
      showCol: ["用户名", "手机号", "公司名称", "联系人姓名", "邮箱", "行业", "地区", "状态"]
    }
  },
  created() {
    this.setTable()
  },
  methods: {
    // 搜索
    onFilterSearch(val) {
      console.log(val)
    },
    // 查看
    viewClick(row) {
      console.log(row)
@@ -93,7 +87,12 @@
    setTable() {
      this.tableList = {
        selectIndex: true,
        tableInfomation: [],
        tableInfomation: [
          {
            usename: "测试",
            status: 1
          }
        ],
        allcol: [],
        showcol: this.showCol,
        tableColumn: this.setColumnVisible(this.showCol)