|
@@ -55,12 +55,12 @@
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <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="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>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -157,7 +157,11 @@ export default {
|
|
|
if (userInfoCopy && userInfoCopy.bindEngin) {
|
|
|
checkEngineAccount().then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- this.$refs.engineSubmit.click()
|
|
|
+ // this.$refs.engineSubmit.click()
|
|
|
+ const {href} = this.$router.resolve({
|
|
|
+ name: 'open_engin'
|
|
|
+ })
|
|
|
+ window.open(href, '_blank')
|
|
|
} else {
|
|
|
this.$errorMsg("账号密码错误,请重新绑定")
|
|
|
this.dialogFormVisible = true
|
|
@@ -175,14 +179,18 @@ export default {
|
|
|
enginPassword: this.engineForm.password
|
|
|
}
|
|
|
bindEngineAccount(params).then(res => {
|
|
|
- console.log('-----------', res)
|
|
|
if (res.code === 200) {
|
|
|
this.$successMsg("绑定成功,正在打开工程机系统")
|
|
|
+ this.dialogFormVisible = false
|
|
|
this.$store.dispatch('user/getInfo').then(() => {
|
|
|
- this.userInfo.bindEngin = true
|
|
|
- this.userInfo.enginUserName = this.engineForm.account
|
|
|
- this.userInfo.enginPassword = this.engineForm.password
|
|
|
- this.$refs.engineSubmit.click()
|
|
|
+ this.userInfo = JSON.parse(localStorage.getItem("supply_user"))
|
|
|
+ const {href} = this.$router.resolve({
|
|
|
+ name: 'open_engin'
|
|
|
+ })
|
|
|
+ window.open(href, '_blank')
|
|
|
+ // this.userInfo.enginUserName = this.engineForm.account
|
|
|
+ // this.userInfo.enginPassword = this.engineForm.password
|
|
|
+ // this.$refs.engineSubmit.click()
|
|
|
})
|
|
|
} else {
|
|
|
this.$errorMsg(res.message)
|