<style>
  .user_time_picker .el-date-editor--date>.el-input__inner {
    padding: 0 10px;
    font-size: 13px;
  }

  .user_time_picker .el-date-editor--date>span.el-input__prefix {
    display: none;
  }

  .user_time_picker .el-date-editor--date>span.el-input__suffix {
    top: -4px;
    right: 2px;
  }

  .zidingyiFz i {
    font-size: 14px !important;
  }

</style>
<template>
  <div class="flexOne">
    <div class="query-box">
      <ul class="user_time_picker">
        <li><span><em>{{$t('admin.admin_Post')}}</em>
            <el-select filterable v-model='msg.RB_Post_Id'>
              <el-option :label="$t('pub.unlimitedSel')" value='0'></el-option>
              <el-option v-for='item in PostList' :label='item.PostName' :value='item.PostId' :key='item.PostId'>
              </el-option>
            </el-select>
          </span></li>
        <li><span><em>{{$t('system.query_name')}}</em>
            <el-input v-model='msg.EmName' @keyup.enter.native="getList"></el-input>
          </span></li>
        <li><span><em>{{$t('adm.adm_logincount')}}</em>
            <el-input v-model='msg.EmAccount' @keyup.enter.native="getList"></el-input>
          </span></li>
        <li><span><em>{{$t('hotel.hotel_status')}}</em>
            <el-select filterable v-model="msg.Status">
              <el-option :label="$t('pub.unlimitedSel')" value="-1"></el-option>
              <el-option :label="$t('pub.jobSel')" value="0"></el-option>
              <el-option :label="$t('pub.noJobSel')" value="1"></el-option>
            </el-select>
          </span>
        </li>
        <li><span><em>{{$t('admin.admin_Entrytime')}}</em>
            <el-date-picker v-model='msg.sEmEntry' class='w105' value-format="yyyy-MM-dd" type="date"></el-date-picker>
            -
            <el-date-picker v-model='msg.eEmEntry' class='w105' value-format="yyyy-MM-dd" type="date"></el-date-picker>
          </span>
        </li>
        <li><span><em>{{$t('admin.admin_Departuretime')}}</em>
            <el-date-picker v-model='msg.sEmLeave' value-format="yyyy-MM-dd" class='w105' type="date"></el-date-picker>
            -
            <el-date-picker v-model='msg.eEmLeave' value-format="yyyy-MM-dd" class='w105' type="date"></el-date-picker>
          </span>
        </li>
        <li><input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
            @click="resetPageIndex(),getList()" /> &nbsp;
        </li>
      </ul>
    </div>
    <div class="clearfix"></div>
    <div style="margin: 10px 0;" class="fz14 color333">{{$t('adm.adm_Validaccount')}}:<span
        class="colorE95252">{{UseNum}}</span>&nbsp;&nbsp;&nbsp;&nbsp;账号限额：<span class="colorE95252">{{TotalNum}}</span>
    </div>
    <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th>{{$t('admin.admin_Post')}}</th>
        <th>{{$t('system.query_name')}}</th>
        <th>{{$t('system.table_sex')}}</th>
        <th>{{$t('system.table_acc')}}</th>
        <th>{{$t('adm.adm_logintel')}}</th>
        <th>{{$t('admin.admin_Entrytime')}}</th>
        <th>{{$t('hotel.hotel_status')}}</th>
        <th>{{$t('admin.admin_operate')}}</th>
      </tr>
      <tr v-for="(item,index) in DataList" v-loading='loading'>
        <td>{{item.PostName}}</td>
        <td>{{item.EmName}}</td>
        <td>{{item.EmSex==0 ? $t('pub.man') :$t('pub.woman')}}</td>
        <td>{{item.EmAccount}}</td>
        <td>{{item.EmLoginMobile}}</td>
        <td>{{item.EmEntry}}</td>
        <td>{{item.EmLeave | leaveTimeFormat(item.EmLeave)}}</td>
        <td>
          <el-tooltip class="item" effect="dark" :content="$t('adm.adm_changeUserInfo')" placement="top">
            <el-button type="primary" icon="el-icon-edit" circle
              @click="outerVisible=true,dialogTitle='修改用户信息',updateData(item.EmployeeId),getCompany()"></el-button>
          </el-tooltip>
          <el-tooltip class="item" effect="dark" :content="$t('adm.adm_bindaccountinfo')" placement="top">
            <el-button type="primary" class='zidingyiFz' icon="iconfont icon-bangdingzhagnhuxinxi" circle
              @click="goUrl('empBankAccount',item.EmployeeId)"></el-button>
          </el-tooltip>
        </td>
      </tr>
    </table>
    <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
      layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total>
    </el-pagination>
    <el-dialog custom-class='w800' :title="dialogTitle" :visible.sync="outerVisible" center
      :before-close="closeChangeMachie">
      <el-dialog custom-class='w400' :title="$t('adm.adm_changepd')" :visible.sync="innerVisible" center append-to-body
        :before-close="closeChangeMachie1">
        <el-form :model="pwdMsg" label-width="100px" :rules="rulesPwd" ref="pwdMsg">
          <el-form-item :label="$t('system.table_staffs')" prop="EmName">
            <el-input class='w217' type="text" v-model="addMsg.EmName" :placeholder="$t('pub.pleaseImport')" readonly>
            </el-input>
          </el-form-item>
          <el-form-item :label="$t('system.table_acc')" prop="EmAccount">
            <el-input class='w217' type="text" v-model="addMsg.EmAccount" :placeholder="$t('pub.pleaseImport')"
              readonly></el-input>
          </el-form-item>
          <el-form-item :label="$t('adm.adm_newPd')" prop="Pwd">
            <el-input class='w217' type="password" v-model="pwdMsg.Pwd" :placeholder="$t('pub.pleaseImport')">
            </el-input>
          </el-form-item>
          <el-form-item :label="$t('adm.adm_Reinput')" prop="Pwd1">
            <el-input class='w217' type="password" v-model="pwdMsg.Pwd1" :placeholder="$t('pub.pleaseImport')">
            </el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <button class="hollowFixedBtn"
            @click="innerVisible=false,resetForm('pwdMsg')">{{$t('pub.cancelBtn')}}</button>
          <button class="normalBtn" @click="submitForm1('pwdMsg')">{{$t('pub.sureBtn')}}</button>
        </div>
      </el-dialog>
      <el-dialog custom-class='w400' :title="$t('adm.adm_changelogintel')" :visible.sync="updateLoginMobile" center
        append-to-body :before-close="closeChangeMachieulm">
        <el-form :model="ulmMsg" label-width="100px" :rules="rulesulm" ref="ulmMsg">
          <el-form-item :label="$t('adm.adm_staff')" prop="EmName">
            <el-input class='w217' type="text" v-model="addMsg.EmName" :placeholder="$t('pub.pleaseImport')" readonly>
            </el-input>
          </el-form-item>
          <el-form-item :label="$t('adm.adm_logintel')" prop="EmAccount">
            <el-input class='w217' type="text" v-model="EmLoginMobile" :placeholder="$t('pub.pleaseImport')" readonly>
            </el-input>
          </el-form-item>
          <el-form-item :label="$t('adm.adm_newphone')" prop="LoginMobile">
            <el-input class='w217' type="text" v-model="ulmMsg.LoginMobile" :placeholder="$t('pub.pleaseImport')">
            </el-input>
          </el-form-item>
          <el-form-item :label="$t('adm.adm_Reinput')" prop="LoginMobile1">
            <el-input class='w217' type="text" v-model="ulmMsg.LoginMobile1" :placeholder="$t('pub.pleaseImport')">
            </el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <button class="hollowFixedBtn"
            @click="updateLoginMobile=false,resetForm('ulmMsg')">{{$t('pub.cancelBtn')}}</button>
          <button class="normalBtn" @click="submitFormulm('ulmMsg')">{{$t('pub.sureBtn')}}</button>
        </div>
      </el-dialog>
      <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
        <table class="layerTable layerNoIcon">
          <tr>
            <td>
              <el-form-item :label="$t('admin.admin_Post')" prop="RB_Post_Id">
                <el-select filterable class='w217' v-model='addMsg.RB_Post_Id' :placeholder="$t('pub.pleaseSel')">
                  <el-option v-for='item in layerPostList' :label='item.PostName' :value='item.PostId'
                    :key='item.PostId'>
                  </el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item :label="$t('system.query_name')" prop="EmName">
                <el-input maxlength='20' class='w217' type="text" v-model="addMsg.EmName"
                  :placeholder="$t('pub.pleaseImport')"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item :label="$t('system.table_IDcard')" prop="EmCard">
                <el-input class='w217' type="text" v-model="addMsg.EmCard" :placeholder="$t('pub.pleaseImport')">
                </el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item :label="$t('leader.leader_Sex')" prop="EmSex">
                <el-select class='w217' filterable v-model='addMsg.EmSex' :placeholder="$t('pub.pleaseSel')">
                  <el-option :label="$t('pub.man')" value='0'></el-option>
                  <el-option :label="$t('pub.woman')" value='1'></el-option>
                </el-select>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item :label="$t('admin.admin_xueli')" prop="EmEducation">
                <el-input maxlength='20' class='w217' type="text" v-model="addMsg.EmEducation"
                  :placeholder="$t('pub.pleaseImport')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item :label="$t('admin.admin_Entrytime')" prop="EmEntry">
                <el-date-picker value-format="yyyy-MM-dd" class='w217' v-model='addMsg.EmEntry' type="date">
                </el-date-picker>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item :label="$t('admin.admin_Departuretime')" prop="EmLeave">
                <el-date-picker value-format="yyyy-MM-dd" class='w217' v-model='addMsg.EmLeave' type="date" disabled>
                </el-date-picker>
              </el-form-item>
            </td>
            <td>
              <el-form-item :label="$t('hotel.table_address')" prop="EmAddress">
                <el-input maxlength='50' class='w217' type="text" v-model="addMsg.EmAddress"
                  :placeholder="$t('pub.pleaseImport')"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item :label="$t('system.table_phone')" prop="EmMobile">
                <el-input class='w217' type="text" v-model="addMsg.EmMobile" :placeholder="$t('pub.pleaseImport')">
                </el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item :label="$t('hotel.hotel_landline')" prop="EmTel">
                <el-input maxlength='20' class='w217' type="text" v-model="addMsg.EmTel"
                  :placeholder="$t('pub.pleaseImport')"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item label="QQ" prop="EmQQ">
                <el-input class='w217' type="text" v-model="addMsg.EmQQ" :placeholder="$t('pub.pleaseImport')">
                </el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item :label="$t('admin.admin_Birthday')" prop="EmBirthday">
                <el-date-picker value-format="yyyy-MM-dd" class='w217' v-model='addMsg.EmBirthday' type="date">
                </el-date-picker>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item :label="$t('system.table_acc')" prop="EmAccount">
                <el-input class='w217' type="text" v-model="addMsg.EmAccount" :placeholder="$t('pub.pleaseImport')">
                </el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item :label="$t('admin.admin_password')" prop="EmPassword">
                <el-input v-if='!isleaveBtn' class='w217' type="text" v-model="addMsg.EmPassword"
                  :placeholder="$t('pub.pleaseImport')"></el-input>
                <input type="button" :value="$t('adm.adm_resetpd')" v-if='isleaveBtn' class="normalBtn"
                  @click="innerVisible=true,resetForm('pwdMsg')" />
              </el-form-item>
            </td>
          </tr>
        </table>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <button class="hollowFixedBtn"
          @click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button> &nbsp;
        <button class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> &nbsp;
        <button v-if='isleaveBtn' class="normalBtn" @click="setIsLeave(leaveId)">{{leaveBtn}}</button>
        <button v-if="isleaveBtn&&EmLoginMobile!=''" class="normalBtn"
          @click="updateLoginMobile=true,resetForm('ulmMsg')">修改登录手机</button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
  export default {
    data() {
      let validatorPwd1 = (rule, value, callback) => {
        if (this.pwdMsg.Pwd != '' && this.pwdMsg.Pwd != this.pwdMsg.Pwd1) {
          return callback(new Error(this.$t('adm.adm_twopdnotsame')));
        } else {
          callback();
        }
      }
      let validatorulm = (rule, value, callback) => {
        if (this.ulmMsg.LoginMobile != '' && this.ulmMsg.LoginMobile != this.ulmMsg.LoginMobile1) {
          return callback(new Error(this.$t('adm.adm_twotelphnotsame')));
        } else {
          callback();
        }
      }
      return {
        UseNum: 0,
        TotalNum: 0,
        leaveBtn: '',
        leaveId: '',
        loading: true,
        isleaveBtn: false,
        total: 0,
        pageSize: '',
        currentPage: 1,
        outerVisible: false,
        innerVisible: false,
        updateLoginMobile: false,
        isRight: true,
        dialogTitle: '',
        insideDialogTxt: '',
        //请求
        msg: {
          pageIndex: 1,
          pageSize: 15,
          EmName: '',
          EmAccount: '',
          RB_Group_id: '0',
          RB_Branch_id: '-1',
          RB_Department_Id: '0',
          RB_Post_Id: '0',
          Status: '0',
          sEmEntry: '',
          eEmEntry: '',
          sEmLeave: '',
          eEmLeave: '',
          IsParentCompany: 2
        },
        rules: {
          RB_Branch_id: [{
            required: true,
            message: this.$t('rule.company'),
            trigger: 'change'
          }],
          RB_Department_Id: [{
            required: true,
            message: this.$t('tips.qxzbumen'),
            trigger: 'change'
          }],
          RB_Post_Id: [{
            required: true,
            message: this.$t('tips.qxzgangwei'),
            trigger: 'change'
          }],
          EmName: [{
            required: true,
            message: this.$t('rule.qsrname'),
            trigger: 'blur'
          }],
          EmEntry: [{
            required: true,
            message: this.$t('rule.qxzrzshijian'),
            trigger: 'blur'
          }],
          EmAccount: [{
              required: true,
              message: this.$t('login.login_account'),
              trigger: 'blur'
            },
            {
              pattern: /^[a-zA-Z0-9]{4,18}$/,
              message: '账号为6-18位字母数字组成'
            }
          ],
          EmPassword: [{
            required: true,
            message: this.$t('login.login_password'),
            trigger: 'blur'
          }],
          EmQQ: [{
            pattern: /^\d{5,11}$/,
            message: this.$t('rule.qsrzqdqq')
          }],
          EmMobile: [{
            pattern: /^(0|86|17951)?(13[0-9]|15[012356789]|17[012356789]|18[0-9]|19[0-9]|14[57])[0-9]{8}$/,
            message: '请输入正确的手机'
          }],
          EmCard: [{
            pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
            message: this.$t('rule.qsrIdnum')
          }],
        },
        addMsg: {
          EmName: '',
          EmSex: '0',
          EmCard: '',
          EmBirthday: '',
          EmEducation: '',
          EmEntry: '',
          EmLeave: '',
          EmAddress: '',
          EmMobile: '',
          EmTel: '',
          EmQQ: '',
          EmPhoto: '',
          EmAccount: '',
          EmPassword: '',
          RB_Group_id: '',
          RB_Branch_id: '',
          RB_Department_Id: '',
          RB_Post_Id: '',
        },
        pwdMsg: {
          Id: '',
          Pwd: '',
          pwd1: ''
        },
        ulmMsg: {
          EmployeeId: '',
          LoginMobile: '',
          LoginMobile1: ''
        },
        rulesPwd: {
          Pwd: [{
            required: true,
            message: this.$t('login.login_password'),
            trigger: 'blur'
          }],
          Pwd1: [{
            validator: validatorPwd1,
            trigger: 'blur'
          }],

        },
        rulesulm: {
          LoginMobile: [{
            required: true,
            pattern: /^(0|86|17951)?(13[0-9]|15[012356789]|17[012356789]|18[0-9]|19[0-9]|14[57])[0-9]{8}$/,
            message: this.$t('rule.qsrtelphone'),
            trigger: 'blur'
          }],
          LoginMobile1: [{
            validator: validatorulm,
            trigger: 'blur'
          }],
        },
        getGroupMsg: {
          Status: '0',
          GroupName: '',
          Domain: '',
          Versions_Id: '',
        },
        getCompanyMsg: {
          RB_Group_Id: '0',
          Status: '0',
        },
        getDepartmentMsg: {
          RB_Group_Id: '0',
          RB_Branch_Id: '-1',
          Status: '0',
        },
        getPostMsg: {
          RB_Group_Id: '0',
          RB_Branch_Id: '-1',
          RB_Department_Id: '0',
        },
        //返回值的接收变量
        EmLoginMobile: '',
        DataList: [],
        groupList: [],
        layerCompanyList: [],
        companyList: [],
        layerDepartMentList: [],
        departMentList: [],
        layerPostList: [],
        PostList: [],
        RB_Group_id: -1,
      }
    },
    mounted() {
      let userInfo = this.getLocalStorage();
      this.RB_Group_id = userInfo.RB_Group_id;
      this.getPostMsg.RB_Group_Id = this.getCompanyMsg.RB_Group_Id = this.getDepartmentMsg.RB_Group_Id = this.addMsg
        .RB_Group_id = this.msg.RB_Group_id = userInfo.RB_Group_id; //集团
      this.getPostMsg.RB_Branch_Id = this.getDepartmentMsg.RB_Branch_Id = this.msg.RB_Branch_id = userInfo
        .RB_Branch_id; //公司
      this.getPostMsg.RB_Department_Id = userInfo.RB_Department_Id; //部门
      this.msg.IsParentCompany = userInfo.IsParentCompany; //是否为总公司
      this.getList();
      this.getCompany();
      this.getDerpartMent();
      this.getPost();
      this.getTotalNum()
    },
    filters: {
      leaveTimeFormat(value) {
        if (value == '') {
          return '在职'
        } else {
          return value
        }
      }
    },
    methods: {
      getTotalNum() {
        this.apipost('admin_get_GetGroupEmployeeNum', {}, res => {
          if (res.data.resultCode == 1) {
            this.UseNum = res.data.data.UseNum,
              this.TotalNum = res.data.data.TotalNum
          } else {
            this.$message.error(res.data.message)
          }
        }, err => {})
      },
      savePwd() {
        this.apipost('admin_post_EmployeeResetPwd', this.pwdMsg, res => {
          if (res.data.resultCode == 1) {
            this.$message.success(res.data.message)
            this.innerVisible = false
          } else {
            this.$message.error(res.data.message)
          }
        }, err => {})
      },
      saveUpdateLoginMobile() {
        this.apipost('admin_post_ResetLoginMobile', this.ulmMsg, res => {
          if (res.data.resultCode == 1) {
            this.$message.success(res.data.message)
            this.updateLoginMobile = false
          } else {
            this.$message.error(res.data.message)
          }
        }, err => {})
      },
      setIsLeave(Id) {
        let myDate = new Date();
        let _year = myDate.getFullYear();
        let _month = myDate.getMonth() >= 9 ? myDate.getMonth() + 1 : '0' + (myDate.getMonth() + 1);
        let _date = myDate.getDate() > 9 ? myDate.getDate() : '0' + myDate.getDate();
        let _time = _year + '-' + _month + '-' + _date;
        this.apipost('admin_post_EmployeeInOrOut', {
          Id: Id,
          Time: _time,
        }, res => {
          if (res.data.resultCode == 1) {
            this.$message.success(res.data.message)
            this.outerVisible = false;
            this.getList();
          } else {
            this.$message.error(res.data.message)
          }
        }, err => {})
      },
      getGroup() {
        this.apipost('admin_get_GroupGetList', this.getGroupMsg, res => {
          if (res.data.resultCode == 1) {
            this.groupList = res.data.data;
          }
        }, err => {})
      },
      getCompany() {
        this.apipost('admin_get_BranchGetList', this.getCompanyMsg, res => {
          if (res.data.resultCode == 1) {
            if (this.outerVisible) {
              this.layerCompanyList = res.data.data;
            } else {
              this.companyList = res.data.data;
            }
          }
        }, err => {})
      },
      getDerpartMent() { //获取部门
        this.apipost('admin_get_DepartmentGetList', this.getDepartmentMsg, res => {
          if (res.data.resultCode == 1) {
            if (this.outerVisible) {
              this.layerDepartMentList = res.data.data;
            } else {
              this.departMentList = res.data.data;
            }
          }
        }, err => {})
      },
      getPost() { //岗位
        this.apipost('admin_get_TempPostGetList', {
          RB_Group_id: this.RB_Group_id
        }, res => {
          if (res.data.resultCode == 1) {
            if (this.outerVisible) {
              this.layerPostList = res.data.data;
            } else {
              this.PostList = res.data.data;
            }
          }
        }, err => {})
      },
      getList() { //获取数据
        this.loading = true,
          this.apipost('admin_get_TempEmployeeList', this.msg, res => {
            if (res.data.resultCode == 1) {
              this.loading = false;
              this.DataList = res.data.data.pageData;
              this.total = res.data.data.count;
            }
          }, err => {})
      },
      addData() {
        this.isleaveBtn = false;
        this.apipost('admin_post_TempEmployeeOperate', this.addMsg, res => {
          if (res.data.resultCode == 1) {
            this.$message.success(res.data.message);
            this.outerVisible = false;
            this.getList()
            this.resetForm('addMsg');
          } else {
            this.$message.error(res.data.message)
          }
        }, err => {})
        this.getList();
      },
      updateData(id) {
        this.pwdMsg.Id = id;
        this.ulmMsg.EmployeeId = id;
        this.leaveId = id;
        this.isleaveBtn = true;
        this.apipost('admin_get_EmployeeGet', {
          Id: id
        }, res => {
          if (res.data.resultCode == 1) {
            this.getDepartmentMsg.RB_Branch_Id = res.data.data.RB_Branch_id
            this.getPostMsg.RB_Department_Id = res.data.data.RB_Department_Id;
            this.getDerpartMent();
            this.getPost();
            this.addMsg = res.data.data;
            this.EmLoginMobile = res.data.data.EmLoginMobile;
            if (res.data.data.IsLeave == 0) {
              this.leaveBtn = this.$t('adm.adm_swlizhi');
            } else {
              this.leaveBtn = this.$t('adm.adm_swzaizhi');
            }
            this.addMsg.EmSex = res.data.data.EmSex.toString();
          }
        }, err => {})
      },
      linkageDepartment() { //联动部门
        this.msg.RB_Department_Id = '0';
        this.msg.RB_Post_Id = '0';
        this.getDepartmentMsg.RB_Branch_Id = this.msg.RB_Branch_id;
        this.getDerpartMent();
      },
      layerLinkageDepartment() { //弹窗联动部门
        this.addMsg.RB_Department_Id = '';
        this.addMsg.RB_Post_Id = '',
          this.getDepartmentMsg.RB_Branch_Id = this.addMsg.RB_Branch_id;
        this.getDerpartMent();
      },
      linkagePost() { //联动岗位
        this.getPostMsg.RB_Branch_Id = this.msg.RB_Branch_id;
        this.getPostMsg.RB_Department_Id = this.msg.RB_Department_Id
        this.getPost();
      },
      layerLinkagePost() { //弹窗联动岗位
        this.addMsg.RB_Post_Id = '',
          this.getPostMsg.RB_Branch_Id = this.addMsg.RB_Branch_id;
        this.getPostMsg.RB_Department_Id = this.addMsg.RB_Department_Id
        this.getPost();
      },
      handleCurrentChange(val) {
        this.msg.pageIndex = val;
        this.getList();
      },
      resetPageIndex() {
        this.msg.pageIndex = 1;
        this.currentPage = 1
      },
      submitForm(addMsg) { //提交创建、修改表单
        this.$refs[addMsg].validate((valid) => {
          if (valid) {
            this.addData()
          } else {
            return false;
          }
        });
      },
      submitForm1(pwdMsg) { //提交创建、修改表单
        this.$refs[pwdMsg].validate((valid) => {
          if (valid) {
            this.savePwd()
          } else {
            return false;
          }
        });
      },
      submitFormulm(ulmMsg) { //提交创建、修改表单
        this.$refs[ulmMsg].validate((valid) => {
          if (valid) {
            this.saveUpdateLoginMobile()
          } else {
            return false;
          }
        });
      },
      goUrl(name, id) {
        this.$router.push({
          name: name,
          query: {
            "id": id,
            "type": 9,
            blank: 'y',
            tab: '绑定账户信息'
          }
        })
      },
      closeChangeMachie(done) { //弹出框关闭初始化弹框内表单
        done();
        this.resetForm('addMsg');
      },
      closeChangeMachie1(done) { //弹出框关闭初始化弹框内表单
        done();
        this.resetForm('pwdMsg');
      },
      closeChangeMachieulm(done) { //弹出框关闭初始化弹框内表单
        done();
        this.resetForm('ulmMsg');
      },
      resetForm(formName) { //弹出框取消 初始化谈框内表单
        this.$refs[formName].resetFields();
        this.addMsg.EmployeeId = '0'
      }
    }
  }

</script>
