This commit is contained in:
fan 2020-04-23 13:37:59 +08:00
commit 880e837285
21 changed files with 90 additions and 93 deletions

View File

@ -128,7 +128,7 @@ export default {
this.$emit('setOperate', { step: 1, success: true }); this.$emit('setOperate', { step: 1, success: true });
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.$emit('setOperate', { step: 0, success: false }); this.$emit('setOperate', { step: 0, success: false });
this.doClose(); this.doClose();
@ -147,9 +147,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => { this.doClose(); });
this.doClose();
});
} }
} }
}; };

View File

@ -94,7 +94,7 @@ export default {
this.$emit('setOperate', { step: 1, success: true }); this.$emit('setOperate', { step: 1, success: true });
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.$emit('setOperate', { step: 0, success: false }); this.$emit('setOperate', { step: 0, success: false });
this.doClose(); this.doClose();
@ -112,9 +112,7 @@ export default {
this.$emit('setOperate', { step: 0, success: false }); this.$emit('setOperate', { step: 0, success: false });
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => { this.doClose(); });
this.doClose();
});
} }
} }
}; };

View File

@ -14,31 +14,31 @@
<div style="width: 96%;"> <div style="width: 96%;">
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode"> <el-form-item label="车 组 号:" label-width="95px" prop="trainCode">
<el-select v-model="addModel.trainCode" filterable> <el-select v-model="addModel.trainCode" filterable>
<el-option <el-option
v-for="train in trainList" v-for="train in trainList"
:key="train.groupNumber" :key="train.groupNumber"
:label="train.groupNumber" :label="train.groupNumber"
:value="train.code" :value="train.code"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber"> <el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange"> <el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option <el-option
v-for="tripNum in tripNumberList" v-for="tripNum in tripNumberList"
:key="tripNum" :key="tripNum"
:label="tripNum" :label="tripNum"
:value="tripNum" :value="tripNum"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber"> <el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable> <el-select v-model="addModel.serviceNumber" filterable>
<el-option <el-option
v-for="serviceNumber in serviceNumberList" v-for="serviceNumber in serviceNumberList"
:key="serviceNumber" :key="serviceNumber"
:label="serviceNumber" :label="serviceNumber"
:value="serviceNumber" :value="serviceNumber"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -61,7 +61,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation'; import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default { export default {
// name: 'TrainMove', // name: 'TrainMove',
name: 'TrainAddPlan', name: 'TrainAddPlan',
@ -155,7 +154,8 @@ export default {
} }
}); });
}).catch(error => { }).catch(error => {
this.$messageBox(error.message); console.log(error);
// this.$messageBox(error.message);
}); });
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {

View File

@ -124,7 +124,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
}); });
@ -143,7 +143,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };

View File

@ -136,7 +136,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
@ -156,7 +156,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };

View File

@ -121,7 +121,7 @@ export default {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}, 1000).catch((error) => { }, 1000).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
} }

View File

@ -155,7 +155,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); this.model; }); }).catch(() => { this.doClose(); this.model; });
} }
} }
}; };

View File

@ -127,7 +127,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };

View File

@ -172,7 +172,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };

View File

@ -149,7 +149,7 @@ export default {
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);

View File

@ -149,7 +149,7 @@ export default {
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
@ -182,7 +182,7 @@ export default {
} }
}; };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
/deep/ .el-radio { /deep/ .el-radio {

View File

@ -109,7 +109,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
}); });
@ -124,7 +124,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };

View File

@ -158,7 +158,7 @@ export default {
if (valid) { if (valid) {
this.$refs.userAdd.doShow(operate); this.$refs.userAdd.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
@ -176,7 +176,7 @@ export default {
if (valid) { if (valid) {
this.$refs.userEdit.doShow(operate, this.selected); this.$refs.userEdit.doShow(operate, this.selected);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
} else { } else {
@ -198,7 +198,7 @@ export default {
if (valid) { if (valid) {
this.$refs.userDelete.doShow(operate, this.selected); this.$refs.userDelete.doShow(operate, this.selected);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
} else { } else {
@ -215,7 +215,7 @@ export default {
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
@ -230,7 +230,7 @@ export default {
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
this.selected = row; this.selected = row;
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
@ -246,7 +246,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
}); });
@ -261,7 +261,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}, },
// //
operateUser(data) { operateUser(data) {

View File

@ -197,7 +197,6 @@ export default {
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch(() => {
}); });
}, },
// //
@ -216,7 +215,6 @@ export default {
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch((error) => {
}); });
}, },
// //
@ -235,7 +233,6 @@ export default {
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch(() => {
}); });
} }
} }

View File

@ -137,7 +137,7 @@ export default {
} else { } else {
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
@ -157,7 +157,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };

View File

@ -120,7 +120,7 @@ export default {
} else { } else {
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
@ -140,7 +140,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };

View File

@ -137,7 +137,7 @@ export default {
} else { } else {
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
@ -157,7 +157,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };

View File

@ -264,7 +264,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
@ -284,7 +284,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
} }

View File

@ -12,38 +12,38 @@
> >
<div class="el-dialog-div"> <div class="el-dialog-div">
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left"> <el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
<el-form-item prop="trainCode" label="车组号:"> trainCode" label="车组号:">
<!--<el-input v-model="addModel.trainCode"/>--> inCode"/>-->
<el-select v-model="addModel.trainCode" filterable> rainCode" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.code"
/>
</el-select>
</el-form-item>
<el-form-item label="车次号:" prop="tripNumber"> "车次号:" prop="tripNumber">
<!--<el-input v-model="addModel.tripNumber"/>--> dModel.tripNumber"/>-->
<el-select v-model="addModel.tripNumber" @change="tripNumberChange" filterable> del.tripNumber" filtefiltefiltefilt filtefilterable @change="tripNumberChange"
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item> item>
<el-form-item label="服务号:" prop="serviceNumber"> tem label="服务号:" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable> addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList" t"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item> item>
</el-form> </el-form>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -150,7 +150,8 @@ export default {
} }
}); });
}).catch(error => { }).catch(error => {
this.$messageBox(error.message); console.log(error);;
// this.$messageBox(error.message);
}); });
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
@ -185,10 +186,11 @@ export default {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(error => {
; ;onsole.log(error);
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
this.$messageBox(error.message); // this.$messageBox(error.message);
}); });
} else { } else {
return false; return false;

View File

@ -155,7 +155,8 @@ export default {
} }
}); });
}).catch(error => { }).catch(error => {
this.$messageBox(error.message); console.log(error);
// this.$messageBox(error.message);
}); });
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {

View File

@ -155,7 +155,8 @@ export default {
} }
}); });
}).catch(error => { }).catch(error => {
this.$messageBox(error.message); console.log(error);
// this.$messageBox(error.message);
}); });
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {