|
@@ -11,7 +11,10 @@
|
|
|
<h4 class="login-head-subtitle">服务器IP地址设置</h4>
|
|
|
</div>
|
|
|
<div class="login-head-right">
|
|
|
- <el-button class="login-btn btn-setting" @click="toSetScan"
|
|
|
+ <el-button
|
|
|
+ class="login-btn btn-setting"
|
|
|
+ :disabled="setDisabled"
|
|
|
+ @click="toSetScan"
|
|
|
>配置扫描仪</el-button
|
|
|
>
|
|
|
</div>
|
|
@@ -70,6 +73,7 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
loading: false,
|
|
|
+ setDisabled: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -91,10 +95,16 @@ export default {
|
|
|
this.setModel.host = domain.replace(`${this.setModel.protocol}://`, "");
|
|
|
},
|
|
|
async toSetScan() {
|
|
|
+ if (this.setDisabled) return;
|
|
|
+ this.setDisabled = true;
|
|
|
await setScanner().catch((error) => {
|
|
|
console.dir(error);
|
|
|
this.$message.error("连接扫描仪异常");
|
|
|
});
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setDisabled = false;
|
|
|
+ }, 5000);
|
|
|
},
|
|
|
async submit() {
|
|
|
const valid = await this.$refs.setForm.validate().catch(() => {});
|