剧本条件调整
This commit is contained in:
parent
06c252cd58
commit
62dddae1e5
@ -144,7 +144,7 @@ export default {
|
|||||||
doShow(actionInfo) {
|
doShow(actionInfo) {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.tableData = (actionInfo.condition || {}).trainStatuses || [];
|
this.tableData = (actionInfo.condition || {}).trainStatuses || [];
|
||||||
this.delay = (actionInfo.condition || {}).delay || 0;
|
this.delay = ((actionInfo.condition || {}).delay || 0) / 1000;
|
||||||
this.actionId = actionInfo.id;
|
this.actionId = actionInfo.id;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
@ -166,7 +166,7 @@ export default {
|
|||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
const data = [...this.tableData];
|
const data = [...this.tableData];
|
||||||
data.splice(index, 1);
|
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;
|
this.tableData = data;
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.$message.error('删除条件失败');
|
this.$message.error('删除条件失败');
|
||||||
@ -177,7 +177,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const data = [...this.tableData];
|
const data = [...this.tableData];
|
||||||
data[this.updateIndex] = this.formModel;
|
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;
|
this.tableData = data;
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.$message.error('修改条件失败');
|
this.$message.error('修改条件失败');
|
||||||
@ -186,7 +186,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onUpdateDelay() {
|
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(()=>{
|
}).catch(()=>{
|
||||||
this.$message.error('修改条件失败');
|
this.$message.error('修改条件失败');
|
||||||
});
|
});
|
||||||
@ -205,7 +205,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const data = [...this.tableData];
|
const data = [...this.tableData];
|
||||||
data.push(this.formModel);
|
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;
|
this.tableData = data;
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.$message.error('添加条件失败');
|
this.$message.error('添加条件失败');
|
||||||
|
Loading…
Reference in New Issue
Block a user