This commit is contained in:
fan 2021-04-21 16:06:43 +08:00
commit 863e383311
5 changed files with 55 additions and 12 deletions

View File

@ -5,20 +5,35 @@
:visible.sync="dialogVisible"
:before-close="doClose"
center
width="400px"
:close-on-click-modal="false"
:z-index="2000"
append-to-body
>
{{}}
<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>
</el-dialog>
</template>
<script>
import { checkConfig } from '@/api/jmap/mapdraft';
export default {
name:'CheckConfig',
data() {
return {
dialogVisible:false,
check:false
formModel:{
check:false
}
};
},
methods:{
@ -26,8 +41,29 @@ export default {
this.dialogVisible = true;
},
doClose() {
this.formModel = {
check:false
};
this.dialogVisible = false;
},
onSubmit() {
checkConfig(this.$route.params.mapId, this.formModel).then(res=>{
this.$message.success('检查配置成功');
this.$emit('checkOver');
this.doClose();
}).catch(error=>{
this.$messageBox('检查配置失败:' + error.meessage);
});
}
}
};
</script>
<style lang="scss" scoped>
.checkConfig{}
.bottomBtnGroup{
width: 100%;
margin-top:10px;
text-align: center;
display: inline-block
}
</style>

View File

@ -257,6 +257,7 @@ export default {
this.$message.success('删除进路成功');
this.reloadData();
delete this.filterRouteMap[row.code];
this.$emit('refresh');
}).catch(error=>{
this.$messageBox('删除进路失败:' + error.meessage);
});

View File

@ -7,7 +7,7 @@
:route-data="routeData"
@setCenter="setCenter"
/>
<big-route-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" />
<big-route-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" @refresh="refresh" />
</div>
</template>
<script>
@ -91,6 +91,9 @@ export default {
},
batchSectionListFocus(flag) {
this.$refs.routeEdit.batchSectionListFocus(flag);
},
refresh() {
this.$refs.routeEdit.initPage();
}
}
};

View File

@ -266,16 +266,20 @@ export default {
}
},
mounted() {
getBigRouteList(this.$route.params.mapId).then(response => {
response.data.forEach(route=>{
if (!route.multiRoute) {
this.routeList.push({code:route.code, name:route.name});
}
});
}).catch(()=>{
});
this.initPage();
},
methods:{
initPage() {
this.routeList = [];
getBigRouteList(this.$route.params.mapId).then(response => {
response.data.forEach(route=>{
if (!route.multiRoute) {
this.routeList.push({code:route.code, name:route.name});
}
});
}).catch(()=>{
});
},
hover(field) {
this.field = field === this.field ? '' : field;
},

View File

@ -526,7 +526,6 @@ export default {
},
async verifyMapEvent() {
this.$refs.checkConfig.doShow();
// import { checkConfig } from '@/api/jmap/mapdraft';
},
tableToExcel(data) {
const filterVal = ['index'];