|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
+ <div style="display:flex; justify-content:flex-end;align-items: center;height: 50px;">
|
|
|
+ <el-button type="danger" @click="delPlan">删除</el-button>
|
|
|
+ </div>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
border
|
|
@@ -10,7 +13,7 @@
|
|
|
v-loading="loading"
|
|
|
style="min-width: 100%; overflow:auto">
|
|
|
|
|
|
- <el-table-column prop="right" label="权要" align="center" width="200px">
|
|
|
+ <el-table-column prop="right" label="权要" align="center" width="200px" :filters="rightList" :filter-method="filterHandler">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tooltip class="item" effect="dark" :content="scope.row.right" placement="top">
|
|
|
<span>{{scope.row.right}}</span>
|
|
@@ -18,12 +21,28 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="content" label="对比组合" align="center" width="300px">
|
|
|
+ <el-table-column prop="resultant" label="对比组合" align="center" width="300px" :filters="resultant" :filter-method="filterHandler">
|
|
|
+ <!-- <template slot="header">
|
|
|
+ <div>
|
|
|
+ <span>对比组合</span>
|
|
|
+ <el-dropdown size="small">
|
|
|
+ <div class="el-dropdown-link">
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </div>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item v-for="item in resultant" @click.native="handleClick(item)">
|
|
|
+ <span>{{ item.text }}</span>
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
+ </template> -->
|
|
|
<template slot-scope="scope" >
|
|
|
<div >
|
|
|
<el-checkbox-group v-model="checkList" >
|
|
|
- <el-checkbox :label="scope.row.content" @change="getFunInfo(scope.row)" >
|
|
|
- <p>对比组合{{(scope.$index+1)}}</p>
|
|
|
+ <el-checkbox :label="scope.row.id" @change="getFunInfo(scope.row)" >
|
|
|
+ <!-- <p>对比组合{{(scope.$index+1)}}</p> -->
|
|
|
+ <p>{{ scope.row.resultant}}</p>
|
|
|
</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
@@ -115,6 +134,8 @@ export default {
|
|
|
imageUrl:'',
|
|
|
showFile :false,
|
|
|
checkList:[],
|
|
|
+ rightList:[],
|
|
|
+ resultant:[],
|
|
|
tableData:[],
|
|
|
loading:false,
|
|
|
mergeObj: {},
|
|
@@ -130,6 +151,10 @@ export default {
|
|
|
this.imageUrl =this.$p + url
|
|
|
this.showFile = true
|
|
|
},
|
|
|
+ filterHandler(value, row, column) {
|
|
|
+ const property = column['property'];
|
|
|
+ return row[property] === value;
|
|
|
+ },
|
|
|
// 表格隔行变色
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
if (rowIndex % 2 === 0) {
|
|
@@ -138,11 +163,48 @@ export default {
|
|
|
return ''
|
|
|
}
|
|
|
},
|
|
|
+ delPlan(){
|
|
|
+ console.log(this.checkList)
|
|
|
+ this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.deleteCompareScenarios(this.checkList).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ });
|
|
|
+ this.getContrastPlan()
|
|
|
+ this.checkList = []
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
getContrastPlan(){
|
|
|
this.$api.selectCompareScenarios({reportID:this.reportId}).then(response=>{
|
|
|
if(response.code == 200){
|
|
|
console.log(response.data)
|
|
|
- response.data.forEach(item=>{
|
|
|
+ response.data.forEach((item,index)=>{
|
|
|
+ var a = this.rightList.findIndex(i=>{
|
|
|
+ return i.value == item.right
|
|
|
+ })
|
|
|
+ if(a==-1){
|
|
|
+ this.rightList.push({
|
|
|
+ text:item.right,
|
|
|
+ value:item.right
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.resultant.push({
|
|
|
+ text:'对比组合'+(index+1),
|
|
|
+ value:'对比组合'+(index+1)
|
|
|
+ })
|
|
|
+ item.resultant = '对比组合'+(index+1)
|
|
|
item.featuresList.forEach(i=>{
|
|
|
item.assoRecordsFeatures.push({
|
|
|
featureId:i.id,
|