文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 9bd1043f by Wang Yuhang

选择分片功能

parent f0d147f6
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:data="tableData" :data="tableData"
style="width: 100%" style="width: 100%"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@selection-change="handleSelectionChange" @selection-change="selectionChange"
@expand-change="expandChange" @expand-change="expandChange"
> >
<el-table-column v-if="showSelection" type="selection" width="55"></el-table-column> <el-table-column v-if="showSelection" type="selection" width="55"></el-table-column>
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
}) })
}, },
methods: { methods: {
handleSelectionChange (val) { selectionChange (val) {
this.multipleSelection = val this.multipleSelection = val
}, },
complete () { complete () {
...@@ -78,7 +78,18 @@ export default { ...@@ -78,7 +78,18 @@ export default {
type: 'warning' type: 'warning'
}) })
} else { } else {
this.$router.push('/ongoing') var selected = this.multipleSelection.map((item) => {
return item.id
})
var userId = this.$store.state.userInfo.userId
this.axios.post('/slice/selectPieces', {
userId,
selected
}).then((res) => {
// this.$router.push('/ongoing')
console.log(res)
})
} }
}, },
tableRowClassName ({row}) { tableRowClassName ({row}) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment