<template>
  <div>
    <form v-show="false" :action="userInfo.enginSysUrl" method="POST">
      <input type="hidden" :value="userInfo.enginUserName" name="username" />
      <input type="hidden" :value="userInfo.enginPassword" name="password" />
      <input type="hidden" value="zfire" name="vcode" />
      <input type="submit" ref="engineSubmit" />
    </form>
    <!--    工程机多帐号-->
    <!--    <form v-show="false" :action="userInfo.enginSysUrl" method="POST">-->
    <!--      <input type="hidden" :value="enginUserName" name="username" />-->
    <!--      <input type="hidden" :value="enginPassword" name="password" />-->
    <!--      <input type="hidden" value="zfire" name="vcode" >-->
    <!--      <input type="submit" ref="engineSubmit">-->
    <!--    </form>-->
  </div>
</template>

<script>
export default {
  name: 'OpenEngin',
  data() {
    return {
      userInfo: '',
      enginUserName: '',
      enginPassword: ''
    }
  },
  created() {
    this.userInfo = JSON.parse(localStorage.getItem('supply_user'))

    // this.enginUserName = this.userInfo.bindEnginList[this.$route.query.index].enginUserName
    // this.enginPassword = this.userInfo.bindEnginList[this.$route.query.index].enginPassword
    // console.log(this.enginUserName, this.enginPassword)
    // this.$successMsg("打开工程机系统")
    this.$nextTick(() => {
      this.$refs.engineSubmit.click()
    })
  }
}
</script>

<style scoped></style>
