剧本条件调整

This commit is contained in:
fan 2020-11-04 14:54:12 +08:00
parent 06c252cd58
commit 62dddae1e5

View File

@ -144,7 +144,7 @@ export default {
doShow(actionInfo) {
this.tableData = [];
this.tableData = (actionInfo.condition || {}).trainStatuses || [];
this.delay = (actionInfo.condition || {}).delay || 0;
this.delay = ((actionInfo.condition || {}).delay || 0) / 1000;
this.actionId = actionInfo.id;
this.dialogVisible = true;
},
@ -166,7 +166,7 @@ export default {
handleDelete(index, row) {
const data = [...this.tableData];
data.splice(index, 1);
updateActionCondition(this.$route.query.group, this.actionId, {trainStatuses: data, delay: this.delay}).then(resp => {
updateActionCondition(this.$route.query.group, this.actionId, {trainStatuses: data, delay: this.delay * 1000}).then(resp => {
this.tableData = data;
}).catch(()=>{
this.$message.error('删除条件失败');
@ -177,7 +177,7 @@ export default {
if (valid) {
const data = [...this.tableData];
data[this.updateIndex] = this.formModel;
updateActionCondition(this.$route.query.group, this.actionId, {trainStatuses: data, delay: this.delay}).then(resp => {
updateActionCondition(this.$route.query.group, this.actionId, {trainStatuses: data, delay: this.delay * 1000}).then(resp => {
this.tableData = data;
}).catch(()=>{
this.$message.error('修改条件失败');
@ -186,7 +186,7 @@ export default {
});
},
onUpdateDelay() {
updateActionCondition(this.$route.query.group, this.actionId, {trainStatuses: this.tableData, delay: this.delay}).then(resp => {
updateActionCondition(this.$route.query.group, this.actionId, {trainStatuses: this.tableData, delay: this.delay * 1000}).then(resp => {
}).catch(()=>{
this.$message.error('修改条件失败');
});
@ -205,7 +205,7 @@ export default {
if (valid) {
const data = [...this.tableData];
data.push(this.formModel);
updateActionCondition(this.$route.query.group, this.actionId, {trainStatuses: data, delay: this.delay}).then(resp => {
updateActionCondition(this.$route.query.group, this.actionId, {trainStatuses: data, delay: this.delay * 1000}).then(resp => {
this.tableData = data;
}).catch(()=>{
this.$message.error('添加条件失败');