|
@@ -92,14 +92,22 @@
|
|
|
:columns="columns"
|
|
|
:getDataWay="getDataWay"
|
|
|
:pagination="pagination"
|
|
|
+ selection
|
|
|
index
|
|
|
+ :needSelectedCallBack="true"
|
|
|
+ :selectedCallBack="selectedCallBackB"
|
|
|
+ :selectedAllCallBack="selectedAllCallBackB"
|
|
|
>
|
|
|
<el-table-column label="操作" slot="cgInfos" align="center" width="180">
|
|
|
<template v-slot="scope">
|
|
|
<span v-if="!isEdit" @click="toEvaluate(scope.row)" class="elIcon">
|
|
|
评价结果
|
|
|
</span>
|
|
|
- <span v-if="isEdit" @click="navigatorEdit(scope.row.id)" class="elIcon">
|
|
|
+ <span
|
|
|
+ v-if="isEdit"
|
|
|
+ @click="navigatorEdit(scope.row.id)"
|
|
|
+ class="elIcon"
|
|
|
+ >
|
|
|
编辑
|
|
|
</span>
|
|
|
<span v-if="isEdit" @click="deleteScene(scope.row.id)" class="elIcon">
|
|
@@ -134,6 +142,7 @@ export default {
|
|
|
projectMaxSeconds: '', // 最大仿真时间
|
|
|
projectDescription: '', // 项目描述
|
|
|
},
|
|
|
+ selectSceneIds: [], // 选中ids
|
|
|
columns: [
|
|
|
{
|
|
|
label: '地图文件',
|
|
@@ -237,7 +246,7 @@ export default {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('提交成功')
|
|
|
this.$router.push({
|
|
|
- path:'/multimodeSimulation'
|
|
|
+ path: '/multimodeSimulation',
|
|
|
})
|
|
|
} else {
|
|
|
this.$message.error(res.message || '提交失败')
|
|
@@ -250,7 +259,28 @@ export default {
|
|
|
? this.$refs['table'].loadData(param)
|
|
|
: this.$refs['table'].loadData()
|
|
|
},
|
|
|
- copyConfig() {},
|
|
|
+ // 复制场景列表
|
|
|
+ copyConfig() {
|
|
|
+ if (this.selectSceneIds.length <= 0) {
|
|
|
+ this.$message.warning('请选择要复制的列表')
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: this.$api.multimode.copyMulationScene,
|
|
|
+ data: {
|
|
|
+ sceneIdList: this.selectSceneIds,
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('复制成功')
|
|
|
+ this.refreshList({ projectId: this.projectId })
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message || '复制失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 新增场景列表
|
|
|
addConfig() {
|
|
|
this.$axios({
|
|
@@ -261,14 +291,37 @@ export default {
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.isEdit = true
|
|
|
+ this.isEdit = true
|
|
|
this.$message.success('添加成功')
|
|
|
+ this.selectSceneIds = []
|
|
|
this.refreshList({ projectId: this.projectId })
|
|
|
} else {
|
|
|
this.$message.error(res.message || '添加失败')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 单列表选中
|
|
|
+ selectedCallBackB(row, type) {
|
|
|
+ // 选中
|
|
|
+ if (type == 1) {
|
|
|
+ const arr = this.selectSceneIds
|
|
|
+ arr.push(row.id)
|
|
|
+ this.selectSceneIds = arr
|
|
|
+ } else {
|
|
|
+ // 取消选中
|
|
|
+ this.selectSceneIds = this.selectSceneIds.filter(
|
|
|
+ (item) => item !== row.id
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 全选
|
|
|
+ selectedAllCallBackB(row) {
|
|
|
+ const arr = []
|
|
|
+ row.forEach((item) => {
|
|
|
+ arr.push(item.id)
|
|
|
+ })
|
|
|
+ this.selectSceneIds = arr
|
|
|
+ },
|
|
|
// 创建仿真任务
|
|
|
createTask() {
|
|
|
if (
|