|
@@ -71,6 +71,11 @@
|
|
|
label="终点类型"
|
|
|
show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="condition"
|
|
|
+ label="状态"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="operName"
|
|
|
label="操作人">
|
|
@@ -79,7 +84,7 @@
|
|
|
<el-table-column
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row)">删除</el-button>
|
|
|
+ <el-button type="text" size="small" :class="scope.row.isDeleted == 'N'?'delete':'review'" @click="showDelDialog(scope.row)">{{scope.row.isDeleted == 'N'?'删除':'恢复'}}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -103,6 +108,7 @@
|
|
|
data: function () {
|
|
|
return {
|
|
|
list: [],
|
|
|
+ nnn:'启用中',
|
|
|
cacheData: {},
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
@@ -142,6 +148,9 @@
|
|
|
api.knowledgeRelation(params).then((res) => {
|
|
|
if (res.data.code == '0') {
|
|
|
const data = res.data.data;
|
|
|
+ for(let j = 0;j < data.records.length;j++){
|
|
|
+ data.records[j].condition = (data.records[j].isDeleted == 'N'?'启用中':'已删除')
|
|
|
+ }
|
|
|
this.list = data.records;
|
|
|
if(!flag){//搜索时不缓存
|
|
|
this.cacheData[params.current] = data.records;
|
|
@@ -208,7 +217,8 @@
|
|
|
},
|
|
|
showDelDialog(item){
|
|
|
const params = {
|
|
|
- id:item.id
|
|
|
+ id:item.id,
|
|
|
+ isDeleted:item.isDeleted === 'N'?'Y':'N'
|
|
|
}
|
|
|
this.showConfirmDialog('是否删除该关系?可能对现有系统造成影响',()=>{
|
|
|
api.delKnowledgeRelation(params).then((res)=>{
|
|
@@ -266,6 +276,9 @@
|
|
|
.delete{
|
|
|
color: red;
|
|
|
}
|
|
|
+ .review{
|
|
|
+ color: #22ccc8;
|
|
|
+ }
|
|
|
.el-table .cell{
|
|
|
overflow: hidden;
|
|
|
white-space: nowrap;
|