2021-04-21 15:17:27 +08:00
|
|
|
<template>
|
|
|
|
<el-dialog
|
|
|
|
v-dialogDrag
|
|
|
|
title="检查配置接口"
|
|
|
|
:visible.sync="dialogVisible"
|
|
|
|
:before-close="doClose"
|
|
|
|
center
|
2021-04-21 15:46:37 +08:00
|
|
|
width="400px"
|
2021-04-21 15:17:27 +08:00
|
|
|
:close-on-click-modal="false"
|
|
|
|
:z-index="2000"
|
|
|
|
append-to-body
|
|
|
|
>
|
2021-04-21 15:46:37 +08:00
|
|
|
<el-form ref="form" :model="formModel" class="checkConfig" label-width="160px">
|
|
|
|
<el-form-item prop="check" label="是否检查" :required="true">
|
|
|
|
<el-switch
|
|
|
|
v-model="formModel.check"
|
|
|
|
active-color="#409eff"
|
|
|
|
inactive-color="#dcdfe6"
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
<div class="bottomBtnGroup">
|
|
|
|
<el-button type="primary" size="medium" @click="onSubmit">确定</el-button>
|
|
|
|
</div>
|
2021-04-21 15:17:27 +08:00
|
|
|
</el-dialog>
|
|
|
|
</template>
|
|
|
|
<script>
|
2021-04-21 15:46:37 +08:00
|
|
|
import { checkConfig } from '@/api/jmap/mapdraft';
|
2021-04-21 15:17:27 +08:00
|
|
|
export default {
|
|
|
|
name:'CheckConfig',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
dialogVisible:false,
|
2021-04-21 15:46:37 +08:00
|
|
|
formModel:{
|
|
|
|
check:false
|
|
|
|
}
|
2021-04-21 15:17:27 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
doShow() {
|
|
|
|
this.dialogVisible = true;
|
|
|
|
},
|
|
|
|
doClose() {
|
2021-04-21 15:46:37 +08:00
|
|
|
this.formModel = {
|
|
|
|
check:false
|
|
|
|
};
|
2021-04-21 15:17:27 +08:00
|
|
|
this.dialogVisible = false;
|
2021-04-21 15:46:37 +08:00
|
|
|
},
|
|
|
|
onSubmit() {
|
|
|
|
checkConfig(this.$route.params.mapId, this.formModel).then(res=>{
|
|
|
|
this.$message.success('检查配置成功');
|
|
|
|
this.$emit('checkOver');
|
|
|
|
this.doClose();
|
|
|
|
}).catch(error=>{
|
|
|
|
this.$messageBox('检查配置失败:' + error.meessage);
|
|
|
|
});
|
2021-04-21 15:17:27 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
2021-04-21 15:46:37 +08:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.checkConfig{}
|
|
|
|
.bottomBtnGroup{
|
|
|
|
width: 100%;
|
|
|
|
margin-top:10px;
|
|
|
|
text-align: center;
|
|
|
|
display: inline-block
|
|
|
|
}
|
|
|
|
</style>
|