抽线
This commit is contained in:
parent
51a0ebd5fe
commit
0c219aff71
123
src/jmapNew/theme/xian_01/menus/menuDialog/deleteRunplanLine.vue
Normal file
123
src/jmapNew/theme/xian_01/menus/menuDialog/deleteRunplanLine.vue
Normal file
@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
size="small"
|
||||
label-width="100px"
|
||||
:model="model"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item prop="serviceNumber" label="表号">
|
||||
<el-input maxlength="3" v-model="model.serviceNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="tripNumber" label="车次号">
|
||||
<el-input maxlength="4" v-model="model.tripNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button type="primary" :loading="loading" @click="commit">{{
|
||||
$t("menu.menuDialog.confirm")
|
||||
}}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button @click="doClose">{{
|
||||
$t("menu.menuDialog.cancel")
|
||||
}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sendCommandNew } from "@/api/jmap/training";
|
||||
export default {
|
||||
name: "DeleteRunplanLine",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dialogShow: false,
|
||||
model: {
|
||||
serviceNumber: "",
|
||||
tripNumber: ""
|
||||
},
|
||||
rules: {
|
||||
serviceNumber: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请输入表号"
|
||||
}
|
||||
],
|
||||
tripNumber: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请输入车次号"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return "抽线";
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// this.operate = operate || {};
|
||||
// this.operation = operate.operation;
|
||||
// // 非断电激活时设置初始值
|
||||
// if (!this.dialogShow) {
|
||||
// this.loading = false;
|
||||
// }
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
},
|
||||
commit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
const group = this.$route.query.group;
|
||||
const data = this.model;
|
||||
sendCommandNew(group, "RunPlan_Delete_Trip", data)
|
||||
.then(resp => {
|
||||
console.log(resp);
|
||||
this.doClose();
|
||||
})
|
||||
.catch(e => {
|
||||
this.$messageBox(e);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$store.state.runPlan": function(oldVal, newVal) {
|
||||
console.log(newVal);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
Loading…
Reference in New Issue
Block a user