Commit 2e2a6550 by Kyle_Li

删除已选择标签

parent 69a68fc1
......@@ -21,7 +21,10 @@
</el-alert>
<header>已选择删除的标签值</header>
<ul class="tagBox">
<li v-for="item in trashList" :key="item.tagItemId" class="tagItem">{{ item.tagItemName }}</li>
<li v-for="item in trashList" :key="item.tagItemId" class="tagItem">
{{ item.tagItemName }}
<i class="el-icon-error delIcon" @click="delCheckTag(item.tagItemId)"></i>
</li>
</ul>
<span slot="footer">
<el-button @click="dialogVisible = false">取消</el-button>
......@@ -32,7 +35,7 @@
</template>
<script>
import CycleWrap from './CycleWrap.vue';
import { getProgress, getTrashList, isCleanTrashList, cleanTrashList } from '@/request/api';
import { getProgress, getTrashList, isCleanTrashList, cleanTrashList, delTrashList } from '@/request/api';
let Success = {
template: '<i class="el-icon-success" style="color:#52C41A;font-size:20px;"></i>'
}
......@@ -101,6 +104,14 @@ export default {
this.dialogVisible = false;
this.getProgress();
})
},
delCheckTag(tagItemId) {
delTrashList({ tagItemId }).then(res => {
const { errorCode, message } = res;
if(errorCode != 1) return this.$message.error(message);
this.getTrashList();
this.$message.success('删除成功');
})
}
}
}
......@@ -160,14 +171,25 @@ header {
display: flex;
flex-wrap: wrap;
.tagItem {
position: relative;
margin-top: 10px;
margin-right: 10px;
padding: 5px 8px;
margin-right: 13px;
padding: 5px 10px;
border: 1px solid #DCDFE6;
border-radius: 2px;
background-color: #FAFAFA;
font-size: 13px;
color: #606266;
&:hover .delIcon {
display: block;
}
}
.delIcon {
display: none;
position: absolute;
top: -6px;
right: -6px;
cursor: pointer;
}
}
</style>
\ No newline at end of file
......@@ -281,3 +281,14 @@ export const isCleanTrashList = (params = {}) =>
...params
}
});
// 清除垃圾桶里的标签
export const delTrashList = (params = {}) =>
request({
url: '/delTagItem/delAll',
method: 'get',
params: {
requestProject: 'gic-member-tag-web',
...params
}
});
......@@ -297,6 +297,7 @@ export default {
tagItemIndex: index,
tagItemId: item.tagItemId
});
this.tagValTableData[index].showDelPopOver = false;
getRequest('/delTagItem/add', para).then(res => {
const { errorCode, result } = res.data;
if (errorCode === 1) {
......
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