<!-- @desc:多员工范围权限  @auth:洪旭东  @time:2022/4/20 13:08 -->
<template>
  <div class="main-div" ref="mainDiv">

    <!-- 列表部分   -->
    <card ref="tableCard">
      <div style="display: flex;">
        <div style="width: 1000px">
          <div class="quick-top-div">
            <!--      商品属性-->
            <DkTabs ref="dkTabs" v-model="tabsModel" :options="tabsOptions" @on-click="tabsClick"></DkTabs>
          </div>

          <div style="display: flex;">
            <!-- 列表部分左侧   -->
            <div :style="{height:(tableHeight)+'px'}" style="width: 1000px;">
              <div slot="content">
                <DkTable v-show="tabsModelID == 0" primaryKey="attributeId" :pageFlag="false" ref="brandTable"
                         :data="brandTableData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="attributeName" width="150" :title="$t('brandName')"></DkTableColumn>
                </DkTable>
                <DkTable v-show="tabsModelID == 1" ref="channelTable" primaryKey="dataCode" :pageFlag="false"
                         :data="channelTableData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="dataName" :title="$t('channel')" width="150"></DkTableColumn>
                </DkTable>
                <DkTree v-show="tabsModelID == 2" ref="operatingOrganization" :data="operatingOrganizationData"
                        :height="this.tableHeight" show-checkbox></DkTree>
                <DkTree v-show="tabsModelID == 3" ref="viewOrganization" :data="viewOrganizationData"
                        :height="this.tableHeight" show-checkbox></DkTree>
                <DkTable v-show="tabsModelID == 4" ref="salesWarehouseTable" primaryKey="whId" :pageFlag="false"
                         :data="salesWarehouseData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="whName" width="150"></DkTableColumn>
                  <DkTableColumn field="mmCode" width="150px"></DkTableColumn>
                  <DkTableColumn field="whType" width="150px"></DkTableColumn>
                </DkTable>
                <DkTable v-show="tabsModelID == 5" ref="operateWarehouseTable" primaryKey="whId" :pageFlag="false"
                         :data="operateWarehouseData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="whName" width="150"></DkTableColumn>
                  <DkTableColumn field="mmCode" width="150px"></DkTableColumn>
                  <DkTableColumn field="whType" width="150px"></DkTableColumn>
                </DkTable>
                <DkTable v-show="tabsModelID == 6" ref="viewWarehouseTable" primaryKey="whId" :pageFlag="false"
                         :data="viewWarehouseData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="whName" width="150"></DkTableColumn>
                  <DkTableColumn field="mmCode" width="150px"></DkTableColumn>
                  <DkTableColumn field="whType" width="150px"></DkTableColumn>
                </DkTable>
                <DkTable v-show="tabsModelID == 7" ref="customerTable" primaryKey="customerId" :pageFlag="false"
                         :data="customerTableData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="channelName" :title="$t('channel')" width="150"></DkTableColumn>
                  <DkTableColumn field="orgName" width="150"></DkTableColumn>
                  <DkTableColumn field="customerCode" width="150"></DkTableColumn>
                  <DkTableColumn field="customerName" width="150"></DkTableColumn>
                  <DkTableColumn field="addressName" :title="$t('customerAddress')" width="150"></DkTableColumn>
                  <DkTableColumn field="flgValid"></DkTableColumn>
                </DkTable>
                <DkTable v-show="tabsModelID == 8" ref="staffTable" primaryKey="aoId" :pageFlag="false"
                         :data="staffTableData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="aoCode" :title="$t('staffCode')" width="150"></DkTableColumn>
                  <DkTableColumn field="aoName" :title="$t('staffName')" width="150"></DkTableColumn>
                  <DkTableColumn field="orgName" width="150"></DkTableColumn>
                  <DkTableColumn field="jobName" width="150"></DkTableColumn>
                  <DkTableColumn field="postName" width="150"></DkTableColumn>
                </DkTable>
                <div v-show="tabsModelID == 9" style="display: flex;">
                  <div style="width: 500px;">
                    <DkTable ref="staffTeamTable" :pageFlag="false" primaryKey="teamId" :data="staffTeamTableData"
                             :height="this.tableHeight" @current-change="currentChangeGetStaff" :refresh-select="false">
                      <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                      <DkTableColumn type="seq" width="50"></DkTableColumn>
                      <DkTableColumn field="flgValid"></DkTableColumn>
                      <DkTableColumn field="teamName" :title="$t('staffTeam')" width="150"></DkTableColumn>
                      <DkTableColumn field="staffQuantity" width="150" :digits="0"></DkTableColumn>
                    </DkTable>
                  </div>
                  <div style="margin-left: 5px;width:500px">
                    <DkTable ref="staffsTable" :pageFlag="false" :data="staffsTableData" :height="this.tableHeight"
                             :refresh-select="false">
                      <DkTableColumn type="seq" width="50"></DkTableColumn>
                      <DkTableColumn field="flgValid"></DkTableColumn>
                      <DkTableColumn field="staffCode" width="150"></DkTableColumn>
                      <DkTableColumn field="staffName" width="150"></DkTableColumn>
                      <DkTableColumn field="orgName" width="150"></DkTableColumn>
                    </DkTable>
                  </div>
                </div>
                <DkTable v-show="tabsModelID == 10" ref="supplierTable" primaryKey="supplierId" :pageFlag="false"
                         :data="supplierTableData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="flgValid"></DkTableColumn>
                  <DkTableColumn field="supplierCode" width="150"></DkTableColumn>
                  <DkTableColumn field="supplierName" width="150"></DkTableColumn>
                  <DkTableColumn field="supplierType" width="150"></DkTableColumn>
                </DkTable>
                <DkTable v-show="tabsModelID == 11" ref="capitalAccountTable" primaryKey="capitalId" :pageFlag="false"
                         :data="capitalAccountTableData" :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="flgValid"></DkTableColumn>
                  <DkTableColumn field="capitalName" width="150"></DkTableColumn>
                  <DkTableColumn field="capitalType" width="150"></DkTableColumn>
                </DkTable>
                <DkTable v-show="tabsModelID == 12" ref="fileLevelTable" :pageFlag="false" :data="fileLevelTableData"
                         :height="this.tableHeight" :refresh-select="false">
                  <DkTableColumn type="checkbox" width="60"></DkTableColumn>
                  <DkTableColumn type="seq" width="50"></DkTableColumn>
                  <DkTableColumn field="flgValid"></DkTableColumn>
                  <DkTableColumn field="fileLevel" width="150"></DkTableColumn>
                </DkTable>
              </div>
            </div>
          </div>
        </div>

        <!-- 多员工选择-->
        <div :style="{height:(tableHeight)+'px'}" style="width:calc( 100% - 1000px );margin-left: 5px;">
          <DkTable :id="'table-'+$options.name" ref="table-select" :data="checkStaffsTableData"
                   :height="this.tableHeight" primaryKey="userId"
                   name="table" :refresh-select="false">
            <DkTableColumn type="checkbox" width="60"></DkTableColumn>
            <DkTableColumn :title="$t('seq')" min-width="44px" type="seq" width="60"></DkTableColumn>
            <DkTableColumn field="staffCode" width="110"></DkTableColumn>
            <DkTableColumn field="staffName"></DkTableColumn>
            <DkTableColumn field="userGrade"></DkTableColumn>
            <DkTableColumn field="orgName"></DkTableColumn>
            <DkTableColumn field="jobName"></DkTableColumn>
            <DkTableColumn field="postName"></DkTableColumn>
            <DkTableColumn field="genderName"></DkTableColumn>
          </DkTable>
        </div>
      </div>
    </card>

    <!--  下部分按钮区域  -->
    <div style="width: 100%;height: 60px;position: absolute;bottom: 0;z-index: 10;">
      <card style="margin-bottom: 1%;padding: 0;height: 60px;">
        <DkButton ref="save" type="primary" style="position: absolute;right: 170px" :loading="loading"
                  @click="submitForm">{{ $t('save') }}
        </DkButton>
        <DkButton ref="cancel" style="position: absolute;right: 80px;" :loading="loading" @click="cancel">取消</DkButton>
      </card>
    </div>

  </div>
</template>

<script>
import { formMixin } from '@/mixins/form'

export default {
  name: 'purview-multiple',
  mixins: [formMixin],
  data() {
    let self = this
    return {
      //模式切换
      tabsModel: this.$t('goodsBrand'),
      //模式切换
      tabsModelID: 0,
      //品牌
      brandTableData: [],
      //渠道
      channelTableData: [],
      //客户
      customerTableData: [],
      //业务员
      staffTableData: [],
      //操作业务部门
      operatingOrganizationData: [],
      //查看业务部门
      viewOrganizationData: [],
      //销售库区
      salesWarehouseData: [],
      //操作库区
      operateWarehouseData: [],
      //查看库区
      viewWarehouseData: [],
      //员工组
      staffTeamTableData: [],
      staffsTableData: [],
      //供应商
      supplierTableData: [],
      //资金账户
      capitalAccountTableData: [],
      //文件级别
      fileLevelTableData: [],
      checkStaffsTableData: [],
      brandCheckRowKeys: () => [],
      errMessage: {},
      tableHeight: 755,
      //模式
      tabsOptions: [
        { label: this.$t('goodsBrand'), name: this.$t('goodsBrand'), id: 0 },
        { label: this.$t('channel'), name: this.$t('channel'), id: 1 },
        { label: '操作部门', name: '操作部门', id: 2 },
        { label: '查看部门', name: '查看部门', id: 3 },
        { label: this.$t('salesWarehouse'), name: this.$t('salesWarehouse'), id: 4 },
        { label: this.$t('operateWarehouse'), name: this.$t('operateWarehouse'), id: 5 },
        { label: this.$t('viewWarehouse'), name: this.$t('viewWarehouse'), id: 6 },
        { label: this.$t('customer'), name: this.$t('customer'), id: 7 },
        { label: this.$t('staffId'), name: this.$t('staffId'), id: 8 },
        { label: this.$t('staffTeam'), name: this.$t('staffTeam'), id: 9 },
        { label: this.$t('supplier'), name: this.$t('supplier'), id: 10 },
        { label: this.$t('capital-account'), name: this.$t('capital-account'), id: 11 },
        { label: '文件级别', name: '文件级别', id: 12 }],

    }
  },
  methods: {
    /**
     * @desc   : 保存
     * @author : 洪旭东
     * @date   : 2022/4/22 13:25
     */
    submitForm() {
      //多员工，循环员工保存
      // let staffsKeys = this.$refs['table-select'].batchKeys;
      // if(staffsKeys.length > 0){
      //   console.log('staffKeys',staffsKeys)
      //   for (let index = 0; index < staffsKeys.length; index++) {
      //     //获取参数
      //     let params = this.getParams(staffsKeys[index])
      //     if(params.length > 0){
      //       //保存
      //       purviewUserService.insertBatch(params).then(res => {
      //         if (res.code === 200) {
      //           this.$Message.success(this.$t('I_001', { 'param': this.$t('save') }))
      //         } else {
      //           this.$Message.warning(res.message)
      //         }
      //       })
      //     }
      //   }
      // }
      this.$Message.success(this.$t('I_001', { 'param': this.$t('save') }))
      this.closeTag(this.$route)
    },
    /**
     * @desc   : 取消
     * @author : 洪旭东
     * @date   : 2022-04-26 09:05
     */
    cancel() {
      this.closeTag(this.$route)
    },
    /**
     * @desc   : 获取参数
     * @author : 洪旭东
     * @date   : 2022/4/22 13:47
     */
    getParams(userId) {
      let params = []
      //品牌
      let brandKeys = this.$refs['brandTable'].batchKeys
      if (brandKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '品牌',
          purviewIds: brandKeys,
          flgNoLimit: false
        })
      }
      //渠道
      let channelKeys = this.$refs['channelTable'].batchKeys
      if (channelKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '渠道',
          purviewCodes: channelKeys,
          flgNoLimit: false
        })
      }
      //销售库区
      let salesWarehouseKeys = this.$refs['salesWarehouseTable'].batchKeys
      if (salesWarehouseKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '销售库区',
          purviewIds: salesWarehouseKeys,
          flgNoLimit: false
        })
      }
      //操作库区
      let operateWarehouseKeys = this.$refs['operateWarehouseTable'].batchKeys
      if (operateWarehouseKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '操作库区',
          purviewIds: operateWarehouseKeys,
          flgNoLimit: false
        })
      }
      //查看库区
      let viewWarehouseKeys = this.$refs['viewWarehouseTable'].batchKeys
      if (viewWarehouseKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '查看库区',
          purviewIds: viewWarehouseKeys,
          flgNoLimit: false
        })
      }
      //客户
      let customerKeys = this.$refs['customerTable'].batchKeys
      if (customerKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '客户',
          purviewIds: customerKeys,
          flgNoLimit: false
        })
      }
      //业务员
      let staffKeys = this.$refs['staffTable'].batchKeys
      if (staffKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '业务员',
          purviewIds: staffKeys,
          flgNoLimit: false
        })
      }
      //员工组
      let staffTeamKeys = this.$refs['staffTeamTable'].batchKeys
      if (staffTeamKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '员工组',
          purviewIds: staffTeamKeys,
          flgNoLimit: false
        })
      }
      //供应商
      let supplierKeys = this.$refs['supplierTable'].batchKeys
      if (supplierKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '供应商',
          purviewIds: supplierKeys,
          flgNoLimit: false
        })
      }
      //资金账户
      let capitalAccountKeys = this.$refs['capitalAccountTable'].batchKeys
      if (capitalAccountKeys.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '资金账户',
          purviewIds: capitalAccountKeys,
          flgNoLimit: false
        })
      }
      //操作部门
      let operatingOrganization = this.$refs['operatingOrganization'].getDataChecked()
      let operationOrg = []
      if (operatingOrganization.length > 0) {
        for (let index = 0; index < operatingOrganization.length; index++) {
          operationOrg.push(operatingOrganization[index].orgId)
        }
      }
      if (operationOrg.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '操作部门',
          purviewIds: operationOrg,
          flgNoLimit: false
        })
      }

      //查看部门
      let viewOrganization = this.$refs['viewOrganization'].getDataChecked()
      let viewOrg = []
      if (viewOrganization.length > 0) {
        for (let index = 0; index < viewOrganization.length; index++) {
          viewOrg.push(viewOrganization[index].orgId)
        }
      }
      if (viewOrg.length > 0) {
        params.push({
          soId: this.$store.state.user.soId,
          userId: userId,
          purviewCode: '查看部门',
          purviewIds: viewOrg,
          flgNoLimit: false
        })
      }

      return params
    },
    /**
     * @desc   : 点击TAB进行切换
     * @author : 洪旭东
     * @date   : 2022/4/20 14:12
     */
    tabsClick(val, it) {
      //无数据发生变化
      this.tabsData(val, it)
    },
    /**
     * @desc   : 点击Tab切换查询
     * @author : 洪旭东
     * @date   : 2022/4/20 14:16
     */
    tabsData(val, it) {
      this.tabsModel = val
      this.tabsModelID = it.id
    },
    /**
     * @desc   : 员工组获取员工
     * @author : 洪旭东
     * @date   : 2022/4/21 14:24
     */
    currentChangeGetStaff({ row }) {
      let params = {}
      params.ids = row.staffIds
      params.soId = this.$store.state.user.soId
      params.currentPage = ''
      params.pageSize = ''
      staffService.selectByCond(params).then(res => { //调用api接口
        if (res.code === 200) {
          this.staffsTableData = res.data.list
        }
      })
    },
    /**
     * @desc   : 获取范围权限数据源
     * @author : 洪旭东
     * @date   : 2022/4/20 11:32
     */
    getPurviewData() {
      let paramsAll = {
        'GoodsAttribute_goodsBrand': {
          'soId': this.$store.state.user.soId,
          'lan': 'zh_CN',
          'attributeType': '商品属性-品牌'
        },
        'BasicSalesChannel': {
          'lan': 'zh_CN',//国际化类型
          'typeCode': this.$config.basicTypeCode.salesChannel //销售渠道
        },
        'Staff': {
          'soId': this.$store.state.user.soId,
        },
        'StaffTeam': {
          'soId': this.$store.state.user.soId,
        },
        'Customer': {
          'soId': this.$store.state.user.soId,
        },
        'Supplier': {
          'soId': this.$store.state.user.soId,
        },
        'CapitalAccount': {
          'soId': this.$store.state.user.soId,
        },
        'Warehouse': {
          'soId': this.$store.state.user.soId,
        },
      }
      //获获取页面初始加载数据
      let res = {
        'code': 200,
'message': '操作成功',
'exception': null,
'data': {
          'CapitalAccount': [{
            'capitalType': '银行',
            'capitalId': 2,
            'capitalName': '2022031701',
            'capitalCode': '2022031701',
            'flgValid': false
          }, {
            'capitalType': '银行',
            'capitalId': 4,
            'capitalName': '2022031801',
            'capitalCode': '2022031801',
            'flgValid': true
          }, {
            'capitalType': '银行',
            'capitalId': 5,
            'capitalName': '2022031802',
            'capitalCode': '2022031802',
            'flgValid': true
          }, {
            'capitalType': '银行',
            'capitalId': 6,
            'capitalName': '2022031803',
            'capitalCode': '2022031803',
            'flgValid': false
          }, {
            'capitalType': '银行',
            'capitalId': 8,
            'capitalName': '2022032103',
            'capitalCode': '2022032103',
            'flgValid': false
          }, {
            'capitalType': '银行',
            'capitalId': 7,
            'capitalName': '2022032103',
            'capitalCode': '2022032103',
            'flgValid': true
          }, {
            'capitalType': '银行',
            'capitalId': 9,
            'capitalName': '2022032201',
            'capitalCode': '2022032201',
            'flgValid': true
          }, {
            'capitalType': '银行',
            'capitalId': 10,
            'capitalName': '2022032202',
            'capitalCode': '2022032202',
            'flgValid': false
          }, {
            'capitalType': '现金',
            'capitalId': 12,
            'capitalName': '2022032203',
            'capitalCode': '2022032203',
            'flgValid': true
          }, {
            'capitalType': '现金',
            'capitalId': 13,
            'capitalName': '2022032204',
            'capitalCode': '2022032204',
            'flgValid': true
          }, {
            'capitalType': '银行',
            'capitalId': 14,
            'capitalName': '2022032205',
            'capitalCode': '2022032205',
            'flgValid': true
          }],
          'Warehouse': [{
            'whName': '添加仓库',
            'whType': '仓库标识-样品仓',
            'whId': 30,
            'mmCode': 'TJCK',
            'remarks': 'qqq'
          }, {
            'whName': '测试新1库',
            'whType': '仓库标识-主仓',
            'whId': 22,
            'mmCode': 'CSX1K',
            'remarks': 'qqq'
          }, {
            'whName': '测试新库区',
            'whType': '仓库标识-主仓',
            'whId': 24,
            'mmCode': 'CSXKQ',
            'remarks': 'qqq'
          }, {
            'whName': '新建111',
            'whType': '仓库标识-样品仓',
            'whId': 23,
            'mmCode': 'XJ111',
            'remarks': 'qqq'
          }, {
            'whName': '测试新库',
            'whType': '仓库标识-样品仓',
            'whId': 21,
            'mmCode': 'CSXK',
            'remarks': 'qqq'
          }, { 'whName': '测试3库', 'whType': '仓库标识-其他', 'whId': 13, 'mmCode': 'CS3K', 'remarks': 'qqq' }, {
            'whName': '测试5库',
            'whType': '仓库标识-其他',
            'whId': 15,
            'mmCode': 'CS5K',
            'remarks': 'qqq'
          }, {
            'whName': '测试仓库啊',
            'whType': '仓库标识-主仓',
            'whId': 25,
            'mmCode': 'CSCKA',
            'remarks': 'qqq'
          }, { 'whName': '仓库7', 'whType': '仓库标识-样品仓', 'whId': 19, 'mmCode': 'CK7', 'remarks': 'qqq' }, {
            'whName': '新建2库',
            'whType': '仓库标识-其他',
            'whId': 8,
            'mmCode': 'XJ2K',
            'remarks': 'qqq'
          }, { 'whName': '测试6库', 'whType': '仓库标识-主仓', 'whId': 16, 'mmCode': 'CS6K', 'remarks': '' }, {
            'whName': '仓库8',
            'whType': '仓库标识-主仓',
            'whId': 20,
            'mmCode': 'CK8',
            'remarks': ''
          }, {
            'whName': '测试4库',
            'whType': '仓库标识-其他',
            'whId': 14,
            'mmCode': 'CS4K',
            'remarks': 'dfgsdgsdfgsd'
          }, {
            'whName': '测试1库',
            'whType': '仓库标识-其他',
            'whId': 4,
            'mmCode': 'CS1K',
            'remarks': 'dfgsdgsdfgsd'
          }, { 'whName': '适当放松', 'whType': '仓库标识-主仓', 'whId': 26, 'mmCode': 'SDFS', 'remarks': '' }, {
            'whName': '第三方',
            'whType': '仓库标识-主仓',
            'whId': 27,
            'mmCode': 'DSF',
            'remarks': ''
          }, { 'whName': '的双方各', 'whType': '仓库标识-主仓', 'whId': 28, 'mmCode': 'DSFG', 'remarks': '' }, {
            'whName': 'dgsd',
            'whType': '仓库标识-主仓',
            'whId': 29,
            'mmCode': 'dgsd',
            'remarks': ''
          }],
          'StaffTeam': [{
            'teamName': '测试班组772',
            'staffIds': [194, 163, 195],
            'teamId': 1,
            'staffQuantity': 3,
            'orgId': 2,
            'flgValid': true
          }, {
            'teamName': '测试班组88',
            'staffIds': [197, 186],
            'teamId': 2,
            'staffQuantity': 2,
            'orgId': 2,
            'flgValid': true
          }],
          'Customer': [{
            'orgName': '销售一部',
            'customerId': 184,
            'customerCode': '15840356985',
            'channelName': '销售渠道-零售',
            'customerName': '张先生',
            'flgValid': true
          }, {
            'orgName': '销售二部',
            'customerId': 155,
            'customerCode': 'dfsfsdf',
            'channelName': '销售渠道-分销',
            'customerName': 'dfsfsdf',
            'flgValid': true
          }, {
            'orgName': '销售一部',
            'customerId': 172,
            'customerCode': 'DK',
            'channelName': '销售渠道-家装',
            'customerName': '东科',
            'flgValid': true
          }, {
            'orgName': '销售一部',
            'customerId': 177,
            'customerCode': 'dkdongke',
            'channelName': '销售渠道-零售',
            'customerName': 'dkdongke',
            'flgValid': true
          }, {
            'orgName': '北京分公司',
            'customerId': 183,
            'customerCode': 'dkdongke111',
            'channelName': '销售渠道-家装',
            'customerName': 'dkdongke22',
            'flgValid': false
          }, {
            'orgName': '销售二部',
            'customerId': 156,
            'customerCode': 'dktett',
            'channelName': '销售渠道-工程',
            'customerName': 'dktett',
            'flgValid': true
          }, {
            'orgName': '销售一部',
            'customerId': 176,
            'customerCode': 'HHH',
            'channelName': '销售渠道-工程',
            'customerName': '哈哈哈',
            'flgValid': true
          }, {
            'orgName': '销售一部',
            'customerId': 178,
            'customerCode': 'HHH1',
            'channelName': '销售渠道-零售',
            'customerName': '哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈',
            'flgValid': true
          }, {
            'orgName': '销售四部',
            'customerId': 173,
            'customerCode': 'NH',
            'channelName': '销售渠道-家装',
            'customerName': '你好',
            'flgValid': true
          }, {
            'orgName': '销售一部',
            'customerId': 148,
            'customerCode': 'SY',
            'channelName': '销售渠道-零售',
            'customerName': '沈阳',
            'flgValid': false
          }, {
            'orgName': '销售二部',
            'customerId': 147,
            'customerCode': 'SYDK',
            'channelName': '销售渠道-家装',
            'customerName': '沈阳东科',
            'flgValid': true
          }],
          'Staff': [{
            'orgName': '销售二部',
            'staffCode': 'zhangsan3',
            'aoId': 194,
            'staffName': '张三3',
            'aoCode': 'zhangsan3',
            'userId': 1001,
            'aoName': '张三3',
            'orgId': 7,
            'staffId': 194
          }, {
            'orgName': '销售二部',
            'staffCode': '22042401',
            'aoId': 197,
            'staffName': '霹雳',
            'aoCode': '22042401',
            'userId': 1001,
            'aoName': '霹雳',
            'orgId': 7,
            'staffId': 197
          }, {
            'orgName': '销售一部',
            'staffCode': 'zhangsan',
            'aoId': 186,
            'staffName': '张三',
            'aoCode': 'zhangsan',
            'userId': 1001,
            'aoName': '张三',
            'orgId': 6,
            'staffId': 186
          }, {
            'orgName': '销售一部',
            'staffCode': '1001',
            'aoId': 130,
            'staffName': '张三1',
            'aoCode': '1001',
            'userId': 1001,
            'aoName': '张三1',
            'orgId': 6,
            'staffId': 130
          }, {
            'orgName': '销售一部',
            'staffCode': '1003',
            'aoId': 163,
            'staffName': '王五',
            'aoCode': '1003',
            'userId': 1003,
            'aoName': '王五',
            'orgId': 6,
            'staffId': 163
          }, {
            'orgName': '销售一部',
            'staffCode': '1002',
            'aoId': 162,
            'staffName': '李四',
            'aoCode': '1002',
            'userId': 1004,
            'aoName': '李四',
            'orgId': 6,
            'staffId': 162
          }, {
            'orgName': '销售三部',
            'staffCode': 'wangwu',
            'aoId': 195,
            'staffName': '王五刘',
            'aoCode': 'wangwu',
            'userId': 1001,
            'aoName': '王五刘',
            'orgId': 8,
            'staffId': 195
          }],
          'Supplier': [{
            'supplierName': '1',
            'supplierId': 142,
            'supplierCode': '1',
            'supplierType': '供应商类型-厂家',
            'flgValid': true
          }, {
            'supplierName': '2',
            'supplierId': 143,
            'supplierCode': '2',
            'supplierType': '供应商类型-厂家',
            'flgValid': true
          }, {
            'supplierName': '3',
            'supplierId': 144,
            'supplierCode': '3',
            'supplierType': '供应商类型-厂家',
            'flgValid': true
          }, {
            'supplierName': '4',
            'supplierId': 145,
            'supplierCode': '4',
            'supplierType': '供应商类型-厂家',
            'flgValid': false
          }, {
            'supplierName': '5',
            'supplierId': 147,
            'supplierCode': '5',
            'supplierType': '供应商类型-厂家',
            'flgValid': true
          }, {
            'supplierName': '6',
            'supplierId': 171,
            'supplierCode': '6',
            'supplierType': '供应商类型-厂家',
            'flgValid': true
          }, {
            'supplierName': '611',
            'supplierId': 173,
            'supplierCode': '611',
            'supplierType': '供应商类型-厂家',
            'flgValid': true
          }, {
            'supplierName': '62',
            'supplierId': 160,
            'supplierCode': '62',
            'supplierType': '供应商类型-厂家',
            'flgValid': false
          }, {
            'supplierName': '7',
            'supplierId': 175,
            'supplierCode': '7',
            'supplierType': '供应商类型-厂家',
            'flgValid': true
          }],
          'GoodsAttribute_goodsBrand': [{
            'attributeId': 1,
            'attributeName': '东科4',
            'remarks': '商品属性-品牌'
          }, { 'attributeId': 7, 'attributeName': '东科521', 'remarks': '商品品牌' }, {
            'attributeId': 10,
            'attributeName': '东科31',
            'remarks': '3333333333333333333333333333333333333333333333333333333333333333333333333333333'
          }, { 'attributeId': 15, 'attributeName': '东科45' }, {
            'attributeId': 16,
            'attributeName': '东科62',
            'remarks': '上'
          }],
          'BasicSalesChannel': [{ 'dataName': '零售', 'dataCode': '销售渠道-零售' }, {
            'dataName': '家装',
            'dataCode': '销售渠道-家装'
          }, { 'dataName': '分销', 'dataCode': '销售渠道-分销' }, { 'dataName': '工程', 'dataCode': '销售渠道-工程' }, {
            'dataName': '其他',
            'dataCode': '销售渠道-其他'
          }]
        }
      }
      // this.$baseDataService.getWebInitData(paramsAll).then(res => {
      if (res.code === 200) {
        //品牌
        this.brandTableData = res.data.GoodsAttribute_goodsBrand
        //销售渠道
        this.channelTableData = res.data.BasicSalesChannel
        //业务员
        this.staffTableData = res.data.Staff
        //员工组
        this.staffTeamTableData = res.data.StaffTeam
        //客户
        this.customerTableData = res.data.Customer
        //供应商
        this.supplierTableData = res.data.Supplier
        //资金账户
        this.capitalAccountTableData = res.data.CapitalAccount
        //库区(操作库区，查看库区，销售库区)
        this.salesWarehouseData = res.data.Warehouse
        this.viewWarehouseData = res.data.Warehouse
        this.operateWarehouseData = res.data.Warehouse
      }
      // })
      //部门(操作部门，查看部门)
      let params = {
        'soId': this.$store.state.user.soId,
      }
      // 查询组织机构树形结构接口
      let res2 = {
        'code': 200,
'message': '操作成功',
'exception': null,
'data': [{
          'levelCode': '#001',
'expand': true,
'orgName': '集团',
'children': [{
            'levelCode': '#001#001',
'expand': true,
'orgName': '沈阳分公司',
'children': [{
              'levelCode': '#001#001#001',
              'expand': true,
              'orgName': '销售部',
              'children': [{
                'levelCode': '#001#001#001#001',
                'expand': true,
                'orgName': '销售一部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '销售一部',
                'orgId': 6,
                'parentId': 5
              }, {
                'levelCode': '#001#001#001#002',
                'expand': true,
                'orgName': '销售二部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '销售二部',
                'orgId': 7,
                'parentId': 5
              }, {
                'levelCode': '#001#001#001#003',
                'expand': true,
                'orgName': '销售三部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '销售三部',
                'orgId': 8,
                'parentId': 5
              }, {
                'levelCode': '#001#001#001#004',
                'expand': true,
                'orgName': '销售四部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '销售四部',
                'orgId': 9,
                'parentId': 5
              }, {
                'levelCode': '#001#001#001#005',
                'expand': true,
                'orgName': '销售五部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '销售五部',
                'orgId': 10,
                'parentId': 5
              }, {
                'levelCode': '#001#001#001#006',
                'expand': true,
                'orgName': '销售六部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '销售六部',
                'orgId': 11,
                'parentId': 5
              }, {
                'levelCode': '#001#001#001#007',
                'expand': true,
                'orgName': '销售七部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '销售七部',
                'orgId': 12,
                'parentId': 5
              }, {
                'levelCode': '#001#001#001#008',
                'expand': true,
                'orgName': '销售八部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '销售八部',
                'orgId': 13,
                'parentId': 5
              }],
              'cpName': '沈阳分公司',
              'title': '销售部',
              'orgId': 5,
              'parentId': 2
            }, {
              'levelCode': '#001#001#002',
              'expand': true,
              'orgName': '分销部',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '分销部',
              'orgId': 14,
              'parentId': 2
            }, {
              'levelCode': '#001#001#003',
              'expand': true,
              'orgName': '工程部',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '工程部',
              'orgId': 15,
              'parentId': 2
            }, {
              'levelCode': '#001#001#004',
              'expand': true,
              'orgName': '家装部',
              'children': [{
                'levelCode': '#001#001#004#001',
                'expand': true,
                'orgName': '工程部',
                'children': [],
                'cpName': '沈阳分公司',
                'title': '工程部',
                'orgId': 17,
                'parentId': 16
              }],
              'cpName': '沈阳分公司',
              'title': '家装部',
              'orgId': 16,
              'parentId': 2
            }, {
              'levelCode': '#001#001#005',
              'expand': true,
              'orgName': '仓储部',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '仓储部',
              'orgId': 18,
              'parentId': 2
            }, {
              'levelCode': '#001#001#006',
              'expand': true,
              'orgName': '财务部',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '财务部',
              'orgId': 19,
              'parentId': 2
            }, {
              'levelCode': '#001#001#007',
              'expand': true,
              'orgName': '办公室内勤',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '办公室内勤',
              'orgId': 20,
              'parentId': 2
            }, {
              'levelCode': '#001#001#008',
              'expand': true,
              'orgName': '技术部',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '技术部',
              'orgId': 21,
              'parentId': 2
            }, {
              'levelCode': '#001#001#009',
              'expand': true,
              'orgName': '售后部',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '售后部',
              'orgId': 22,
              'parentId': 2
            }, {
              'levelCode': '#001#001#010',
              'expand': true,
              'orgName': '行政部',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '行政部',
              'orgId': 23,
              'parentId': 2
            }, {
              'levelCode': '#001#001#011',
              'expand': true,
              'orgName': '项目部',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '项目部',
              'orgId': 24,
              'parentId': 2
            }, {
              'levelCode': '#001#001#012',
              'expand': true,
              'orgName': '办公室',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '办公室',
              'orgId': 25,
              'parentId': 2
            }, {
              'expand': true,
              'orgName': '分销商测试',
              'children': [],
              'cpName': '沈阳分公司',
              'title': '分销商测试',
              'mmCode': '',
              'orgId': 34,
              'parentId': 2
            }],
'cpName': '沈阳分公司',
'title': '沈阳分公司',
'mmCode': 'sy',
'orgId': 2,
'parentId': 1
          }, {
            'levelCode': '#001#002',
            'expand': true,
            'orgName': '北京分公司',
            'children': [],
            'cpName': '北京分公司',
            'title': '北京分公司',
            'mmCode': 'bj',
            'orgId': 3,
            'parentId': 1
          }],
'cpName': '集团',
'title': '集团',
'mmCode': 'jt',
'orgId': 1,
'parentId': 0
        }]
      }
      // this.$baseDataService.getOrganization(params).then(res => {
      if (res2.code === 200) {
        this.operatingOrganizationData = res2.data
        this.viewOrganizationData = res2.data
      } else {
        this.$Message.warning(res2.message)
        this.loading = false
      }
      // })
      //文件级别

    },
    /**
     * @desc   : 查询员工数据
     * @author : 洪旭东
     * @date   : 2022/4/24 10:43
     */
    getStaff() {
      let params = {}
      params.soId = this.$store.state.user.soId
      params.currentPage = ''
      params.pageSize = ''
      params.flgValid = true
      params.levelCode = ''

      // 查询员工档案资料接口
      let res = {
        'code': 200,
'message': '操作成功',
'exception': null,
'data': {
          'list': [{
            'pageSize': null,
            'currentPage': null,
            'start': null,
            'end': null,
            'soId': 1001,
            'aoId': 197,
            'aoCode': '22042401',
            'aoName': '霹雳',
            'aoType': 2,
            'contactName': null,
            'contactNo': '15645684865',
            'addressRange': null,
            'addressName': null,
            'addressNo': null,
            'addressGcj02': null,
            'creditLimit': null,
            'taxRate': null,
            'taxNo': null,
            'bankName': null,
            'bankAccount': null,
            'birthdate': null,
            'emailUrl': '',
            'trDataEx': null,
            'pageItemEx': null,
            'customTags': [],
            'remarks': '',
            'flgValid': true,
            'opCreateTime': null,
            'opCreateUserId': null,
            'opUpdateTime': null,
            'opUpdateUserId': null,
            'opAppId': null,
            'opApiId': null,
            'opTimestamp': null,
            'opDbUser': null,
            'userId': 1001,
            'orgId': 7,
            'postId': 35,
            'jobId': 13,
            'genderCode': null,
            'national': null,
            'maritalStatus': null,
            'politicalStatus': null,
            'educational': null,
            'graduateSchool': '',
            'speciality': '',
            'height': null,
            'weight': null,
            'nativePlace': '',
            'idCard': '',
            'imageId': null,
            'joinpartydate': null,
            'entrydate': null,
            'probation': null,
            'isDeformity': false,
            'ids': null,
            'staffCode': '22042401',
            'staffName': '霹雳',
            'orgName': '销售二部',
            'levelCode': null,
            'postName': '经理',
            'jobName': '装修工',
            'genderName': null,
            'nationalName': null,
            'maritalStatusName': null,
            'politicalStatusName': null,
            'educationalName': null,
            'userGrade': '操作用户',
            'createTimeStart': null,
            'createTimeEnd': null,
            'postIds': null,
            'jobIds': null,
            'educationals': null,
            'genderCodes': null,
            'maritalStatuss': null,
            'nationals': null,
            'politicalStatuss': null
          }, {
            'pageSize': null,
            'currentPage': null,
            'start': null,
            'end': null,
            'soId': 1001,
            'aoId': 195,
            'aoCode': 'wangwu',
            'aoName': '王五刘',
            'aoType': 2,
            'contactName': null,
            'contactNo': '298084',
            'addressRange': null,
            'addressName': null,
            'addressNo': null,
            'addressGcj02': null,
            'creditLimit': null,
            'taxRate': null,
            'taxNo': null,
            'bankName': null,
            'bankAccount': null,
            'birthdate': null,
            'emailUrl': '111',
            'trDataEx': null,
            'pageItemEx': null,
            'customTags': [],
            'remarks': '111111',
            'flgValid': true,
            'opCreateTime': null,
            'opCreateUserId': null,
            'opUpdateTime': null,
            'opUpdateUserId': null,
            'opAppId': null,
            'opApiId': null,
            'opTimestamp': null,
            'opDbUser': null,
            'userId': 1001,
            'orgId': 8,
            'postId': 12,
            'jobId': 13,
            'genderCode': '性别-男',
            'national': '民族-汉族',
            'maritalStatus': '婚姻状况-未婚',
            'politicalStatus': '政治面貌-群众',
            'educational': '学历-初中',
            'graduateSchool': '1111',
            'speciality': '111',
            'height': 111.00,
            'weight': 111.00,
            'nativePlace': '111',
            'idCard': '11111',
            'imageId': null,
            'joinpartydate': null,
            'entrydate': null,
            'probation': null,
            'isDeformity': true,
            'ids': null,
            'staffCode': 'wangwu',
            'staffName': '王五刘',
            'orgName': '销售三部',
            'levelCode': null,
            'postName': '运营中心',
            'jobName': '装修工',
            'genderName': '男',
            'nationalName': '汉族',
            'maritalStatusName': '未婚',
            'politicalStatusName': '群众',
            'educationalName': '初中',
            'userGrade': '操作用户',
            'createTimeStart': null,
            'createTimeEnd': null,
            'postIds': null,
            'jobIds': null,
            'educationals': null,
            'genderCodes': null,
            'maritalStatuss': null,
            'nationals': null,
            'politicalStatuss': null
          }, {
            'pageSize': null,
            'currentPage': null,
            'start': null,
            'end': null,
            'soId': 1001,
            'aoId': 194,
            'aoCode': 'zhangsan3',
            'aoName': '张三3',
            'aoType': 2,
            'contactName': null,
            'contactNo': '15902409627',
            'addressRange': null,
            'addressName': null,
            'addressNo': null,
            'addressGcj02': null,
            'creditLimit': null,
            'taxRate': null,
            'taxNo': null,
            'bankName': null,
            'bankAccount': null,
            'birthdate': null,
            'emailUrl': 'jyh198088@163.com',
            'trDataEx': null,
            'pageItemEx': null,
            'customTags': [],
            'remarks': '',
            'flgValid': true,
            'opCreateTime': null,
            'opCreateUserId': null,
            'opUpdateTime': null,
            'opUpdateUserId': null,
            'opAppId': null,
            'opApiId': null,
            'opTimestamp': null,
            'opDbUser': null,
            'userId': 1001,
            'orgId': 7,
            'postId': 12,
            'jobId': 13,
            'genderCode': null,
            'national': null,
            'maritalStatus': null,
            'politicalStatus': null,
            'educational': null,
            'graduateSchool': '',
            'speciality': '',
            'height': null,
            'weight': null,
            'nativePlace': '',
            'idCard': '',
            'imageId': null,
            'joinpartydate': null,
            'entrydate': null,
            'probation': null,
            'isDeformity': false,
            'ids': null,
            'staffCode': 'zhangsan3',
            'staffName': '张三3',
            'orgName': '销售二部',
            'levelCode': null,
            'postName': '运营中心',
            'jobName': '装修工',
            'genderName': null,
            'nationalName': null,
            'maritalStatusName': null,
            'politicalStatusName': null,
            'educationalName': null,
            'userGrade': '操作用户',
            'createTimeStart': null,
            'createTimeEnd': null,
            'postIds': null,
            'jobIds': null,
            'educationals': null,
            'genderCodes': null,
            'maritalStatuss': null,
            'nationals': null,
            'politicalStatuss': null
          }, {
            'pageSize': null,
            'currentPage': null,
            'start': null,
            'end': null,
            'soId': 1001,
            'aoId': 186,
            'aoCode': 'zhangsan',
            'aoName': '张三',
            'aoType': 2,
            'contactName': null,
            'contactNo': '15902409627',
            'addressRange': null,
            'addressName': null,
            'addressNo': null,
            'addressGcj02': null,
            'creditLimit': null,
            'taxRate': null,
            'taxNo': null,
            'bankName': null,
            'bankAccount': null,
            'birthdate': null,
            'emailUrl': null,
            'trDataEx': null,
            'pageItemEx': null,
            'customTags': [],
            'remarks': '备注',
            'flgValid': true,
            'opCreateTime': null,
            'opCreateUserId': null,
            'opUpdateTime': null,
            'opUpdateUserId': null,
            'opAppId': null,
            'opApiId': null,
            'opTimestamp': null,
            'opDbUser': null,
            'userId': 1001,
            'orgId': 6,
            'postId': 12,
            'jobId': 13,
            'genderCode': '性别-无',
            'national': '民族-汉族',
            'maritalStatus': '婚姻状况-无',
            'politicalStatus': null,
            'educational': '学历-小学',
            'graduateSchool': '11',
            'speciality': '11',
            'height': 111.00,
            'weight': 11.00,
            'nativePlace': '1',
            'idCard': '11',
            'imageId': null,
            'joinpartydate': null,
            'entrydate': null,
            'probation': 11,
            'isDeformity': true,
            'ids': null,
            'staffCode': 'zhangsan',
            'staffName': '张三',
            'orgName': '销售一部',
            'levelCode': null,
            'postName': '运营中心',
            'jobName': '装修工',
            'genderName': '无',
            'nationalName': '汉族',
            'maritalStatusName': '无',
            'politicalStatusName': null,
            'educationalName': '小学',
            'userGrade': '操作用户',
            'createTimeStart': null,
            'createTimeEnd': null,
            'postIds': null,
            'jobIds': null,
            'educationals': null,
            'genderCodes': null,
            'maritalStatuss': null,
            'nationals': null,
            'politicalStatuss': null
          }, {
            'pageSize': null,
            'currentPage': null,
            'start': null,
            'end': null,
            'soId': 1001,
            'aoId': 163,
            'aoCode': '1003',
            'aoName': '王五',
            'aoType': 2,
            'contactName': null,
            'contactNo': null,
            'addressRange': null,
            'addressName': null,
            'addressNo': null,
            'addressGcj02': null,
            'creditLimit': null,
            'taxRate': null,
            'taxNo': null,
            'bankName': null,
            'bankAccount': null,
            'birthdate': null,
            'emailUrl': null,
            'trDataEx': null,
            'pageItemEx': null,
            'customTags': [],
            'remarks': '备注',
            'flgValid': true,
            'opCreateTime': null,
            'opCreateUserId': null,
            'opUpdateTime': null,
            'opUpdateUserId': null,
            'opAppId': null,
            'opApiId': null,
            'opTimestamp': null,
            'opDbUser': null,
            'userId': 1003,
            'orgId': 6,
            'postId': 12,
            'jobId': 13,
            'genderCode': null,
            'national': null,
            'maritalStatus': null,
            'politicalStatus': null,
            'educational': null,
            'graduateSchool': null,
            'speciality': null,
            'height': null,
            'weight': null,
            'nativePlace': null,
            'idCard': null,
            'imageId': null,
            'joinpartydate': null,
            'entrydate': null,
            'probation': null,
            'isDeformity': false,
            'ids': null,
            'staffCode': '1003',
            'staffName': '王五',
            'orgName': '销售一部',
            'levelCode': null,
            'postName': '运营中心',
            'jobName': '装修工',
            'genderName': null,
            'nationalName': null,
            'maritalStatusName': null,
            'politicalStatusName': null,
            'educationalName': null,
            'userGrade': '操作用户',
            'createTimeStart': null,
            'createTimeEnd': null,
            'postIds': null,
            'jobIds': null,
            'educationals': null,
            'genderCodes': null,
            'maritalStatuss': null,
            'nationals': null,
            'politicalStatuss': null
          }, {
            'pageSize': null,
            'currentPage': null,
            'start': null,
            'end': null,
            'soId': 1001,
            'aoId': 162,
            'aoCode': '1002',
            'aoName': '李四',
            'aoType': 2,
            'contactName': null,
            'contactNo': null,
            'addressRange': null,
            'addressName': null,
            'addressNo': null,
            'addressGcj02': null,
            'creditLimit': null,
            'taxRate': null,
            'taxNo': null,
            'bankName': null,
            'bankAccount': null,
            'birthdate': null,
            'emailUrl': null,
            'trDataEx': null,
            'pageItemEx': null,
            'customTags': [],
            'remarks': '备注',
            'flgValid': true,
            'opCreateTime': null,
            'opCreateUserId': null,
            'opUpdateTime': null,
            'opUpdateUserId': null,
            'opAppId': null,
            'opApiId': null,
            'opTimestamp': null,
            'opDbUser': null,
            'userId': 1004,
            'orgId': 6,
            'postId': 12,
            'jobId': 13,
            'genderCode': null,
            'national': null,
            'maritalStatus': null,
            'politicalStatus': null,
            'educational': null,
            'graduateSchool': null,
            'speciality': null,
            'height': null,
            'weight': null,
            'nativePlace': null,
            'idCard': null,
            'imageId': null,
            'joinpartydate': null,
            'entrydate': null,
            'probation': null,
            'isDeformity': false,
            'ids': null,
            'staffCode': '1002',
            'staffName': '李四',
            'orgName': '销售一部',
            'levelCode': null,
            'postName': '运营中心',
            'jobName': '装修工',
            'genderName': null,
            'nationalName': null,
            'maritalStatusName': null,
            'politicalStatusName': null,
            'educationalName': null,
            'userGrade': '操作用户',
            'createTimeStart': null,
            'createTimeEnd': null,
            'postIds': null,
            'jobIds': null,
            'educationals': null,
            'genderCodes': null,
            'maritalStatuss': null,
            'nationals': null,
            'politicalStatuss': null
          }, {
            'pageSize': null,
            'currentPage': null,
            'start': null,
            'end': null,
            'soId': 1001,
            'aoId': 130,
            'aoCode': '1001',
            'aoName': '张三1',
            'aoType': 2,
            'contactName': null,
            'contactNo': null,
            'addressRange': null,
            'addressName': null,
            'addressNo': null,
            'addressGcj02': null,
            'creditLimit': null,
            'taxRate': null,
            'taxNo': null,
            'bankName': null,
            'bankAccount': null,
            'birthdate': null,
            'emailUrl': null,
            'trDataEx': null,
            'pageItemEx': null,
            'customTags': [],
            'remarks': '备注',
            'flgValid': true,
            'opCreateTime': null,
            'opCreateUserId': null,
            'opUpdateTime': null,
            'opUpdateUserId': null,
            'opAppId': null,
            'opApiId': null,
            'opTimestamp': null,
            'opDbUser': null,
            'userId': 1001,
            'orgId': 6,
            'postId': 12,
            'jobId': 13,
            'genderCode': null,
            'national': null,
            'maritalStatus': null,
            'politicalStatus': null,
            'educational': null,
            'graduateSchool': null,
            'speciality': null,
            'height': null,
            'weight': null,
            'nativePlace': null,
            'idCard': null,
            'imageId': null,
            'joinpartydate': null,
            'entrydate': null,
            'probation': null,
            'isDeformity': false,
            'ids': null,
            'staffCode': '1001',
            'staffName': '张三1',
            'orgName': '销售一部',
            'levelCode': null,
            'postName': '运营中心',
            'jobName': '装修工',
            'genderName': null,
            'nationalName': null,
            'maritalStatusName': null,
            'politicalStatusName': null,
            'educationalName': null,
            'userGrade': '操作用户',
            'createTimeStart': null,
            'createTimeEnd': null,
            'postIds': null,
            'jobIds': null,
            'educationals': null,
            'genderCodes': null,
            'maritalStatuss': null,
            'nationals': null,
            'politicalStatuss': null
          }],
'total': 7,
'pageSize': 0,
'currentPage': 0
        }
      }
      // staffService.selectByCond(params).then(res => {
      if (res.code === 200) {
        //商品一览表
        this.checkStaffsTableData = res.data.list
      } else {
        this.$Message.warning(res.message)
      }
      this.loading = false
      // })
    },
  },
  created() {
    //查询所有tab页所有数据源
    this.getPurviewData()
    //查询员工
    this.getStaff()
  },
  activated() {

  },
  mounted() {
  }
}
</script>

<style lang="less" scoped>

</style>
