|
|
@ -9,18 +9,18 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" label="标题"> |
|
|
|
<el-table-column prop="name" label="标题"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input placeholder="请输入标题" :disabled="!scope.row.operate" @blur="blur(scope.row)" @focus="focus()" v-model="scope.row.title"></el-input> |
|
|
|
<el-input placeholder="请输入标题" :disabled="!scope.row.operate" v-model="scope.row.title"></el-input> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" label="详情描述"> |
|
|
|
<el-table-column prop="name" label="详情描述"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input placeholder="请输入详情描述" :disabled="!scope.row.operate" @blur="blur(scope.row)" @focus="focus()" type="textarea" v-model="scope.row.description"></el-input> |
|
|
|
<el-input placeholder="请输入详情描述" :disabled="!scope.row.operate" type="textarea" v-model="scope.row.description"></el-input> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" label="状态" width="150"> |
|
|
|
<el-table-column prop="name" label="状态" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.status" :disabled="!scope.row.operate" clearable placeholder="请选择状态"> |
|
|
|
<el-select v-model="scope.row.status" :disabled="!scope.row.operate" clearable placeholder="请选择状态"> |
|
|
|
<el-option v-for="(item,index) in statusList" :key="index" @blur="blur(scope.row)" @focus="focus()" :label="item.name" :value="item.value"></el-option> |
|
|
|
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
@ -40,6 +40,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import util from "@/libs/util"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
|
|
|
|
import EventBus from "@/libs/bus.js"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "matchProgress", |
|
|
|
name: "matchProgress", |
|
|
@ -73,10 +74,11 @@ export default { |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
console.log(this.listData) |
|
|
|
console.log(this.listData) |
|
|
|
|
|
|
|
EventBus.$on("tabClickWait", () => this.waitSave()); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
operateIt(row) { |
|
|
|
operateIt(row) { |
|
|
|
this.$store.commit("match/setWait", true); |
|
|
|
this.$store.commit("match/setWait", 1); |
|
|
|
row.operate = true |
|
|
|
row.operate = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
blur(row) { |
|
|
|
blur(row) { |
|
|
@ -112,13 +114,12 @@ export default { |
|
|
|
// 未点编辑时不可输入 |
|
|
|
// 未点编辑时不可输入 |
|
|
|
this.$set(this.listData, index, { operate: false, ...this.listData[index]}) |
|
|
|
this.$set(this.listData, index, { operate: false, ...this.listData[index]}) |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(this.listData) |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
saveData(row) { |
|
|
|
saveData(row) { |
|
|
|
// 有点编辑的时候就要等待确认 |
|
|
|
// 有点编辑的时候就要等待确认 |
|
|
|
this.$store.commit("match/setWait", false); |
|
|
|
this.$store.commit("match/setWait", 999); |
|
|
|
let data = row; |
|
|
|
let data = row; |
|
|
|
if (data.title.length) { |
|
|
|
if (data.title.length) { |
|
|
|
if (row.id) { |
|
|
|
if (row.id) { |
|
|
@ -225,17 +226,16 @@ export default { |
|
|
|
message: '保存成功!' |
|
|
|
message: '保存成功!' |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
this.$store.commit("match/setWait", false); |
|
|
|
EventBus.$emit('tabChangeWait', this.$store.state.match.waitIndex) |
|
|
|
this.$emit('waitChange') |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
type: 'info', |
|
|
|
message: '已取消保存' |
|
|
|
message: '已取消保存' |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$store.commit("match/setWait", false); |
|
|
|
EventBus.$emit('tabChangeWait', this.$store.state.match.waitIndex) |
|
|
|
this.$emit('waitChange') |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -245,7 +245,12 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
beforeDestroy() { |
|
|
|
|
|
|
|
console.log('beforeDestroy') |
|
|
|
|
|
|
|
// EventBus.$off(); |
|
|
|
|
|
|
|
// this.waitSave() |
|
|
|
|
|
|
|
// if(this.hasEdit) { |
|
|
|
|
|
|
|
// console.log('what') |
|
|
|
|
|
|
|
// } |
|
|
|
// if (this.touchTime>0){ |
|
|
|
// if (this.touchTime>0){ |
|
|
|
// if (this.hasEdit){ |
|
|
|
// if (this.hasEdit){ |
|
|
|
// this.$confirm('暂未保存,是否保存本次编辑?', '提示', { |
|
|
|
// this.$confirm('暂未保存,是否保存本次编辑?', '提示', { |
|
|
|