fix:路径收藏增加删除
This commit is contained in:
parent
c07dcc6ece
commit
9d8a6dcbfe
@ -137,12 +137,14 @@ export default {
|
|||||||
this.showSave = false;
|
this.showSave = false;
|
||||||
this.$message.success("操作成功");
|
this.$message.success("操作成功");
|
||||||
},
|
},
|
||||||
|
//取消收藏路径
|
||||||
async cancelSavePath() {
|
async cancelSavePath() {
|
||||||
await HttpUtil.delete("/file/path/delete", { id: this.curSavePathId });
|
await HttpUtil.delete("/file/path/delete", { id: this.curSavePathId });
|
||||||
this.refreshSavePathList();
|
this.refreshSavePathList();
|
||||||
this.$emit("refreshSavePathList");
|
this.$emit("refreshSavePathList");
|
||||||
this.$message.success("操作成功");
|
this.$message.success("操作成功");
|
||||||
},
|
},
|
||||||
|
//变更路径
|
||||||
changePath(item) {
|
changePath(item) {
|
||||||
this.pathList = JSON.parse(item.content);
|
this.pathList = JSON.parse(item.content);
|
||||||
this.breadcrumbClick(this.pathList.length - 1);
|
this.breadcrumbClick(this.pathList.length - 1);
|
||||||
|
@ -12,7 +12,18 @@
|
|||||||
<el-button type="primary" @click="showFileAdd" size="small">新增</el-button>
|
<el-button type="primary" @click="showFileAdd" size="small">新增</el-button>
|
||||||
<el-button type="primary" size="small" @click="selectAllFiles">反选</el-button>
|
<el-button type="primary" size="small" @click="selectAllFiles">反选</el-button>
|
||||||
<el-button type="danger" size="small" @click="deleteCheckedFiles">删除</el-button>
|
<el-button type="danger" size="small" @click="deleteCheckedFiles">删除</el-button>
|
||||||
收藏路径:<el-button v-for="item in savePathList" :key="item.id" @click="clickSavePath(item)" type="primary" text>{{ item.name }}</el-button>
|
收藏路径:<el-tag
|
||||||
|
v-for="item in savePathList"
|
||||||
|
:round="true"
|
||||||
|
class="savePath"
|
||||||
|
closable
|
||||||
|
:key="item.id"
|
||||||
|
@click="clickSavePath(item)"
|
||||||
|
@close="deleteSavePath(item)"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
>{{ item.name }}</el-tag
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="fileBlock">
|
<div class="fileBlock">
|
||||||
<!-- 左侧原始文件名 -->
|
<!-- 左侧原始文件名 -->
|
||||||
@ -177,6 +188,11 @@ export default {
|
|||||||
this.$refs["fileChose"].changePath(item);
|
this.$refs["fileChose"].changePath(item);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async deleteSavePath(item) {
|
||||||
|
console.log(item);
|
||||||
|
await HttpUtil.delete("/file/path/delete", { id: item.id });
|
||||||
|
await this.refreshSavePathList();
|
||||||
|
},
|
||||||
async refreshSavePathList() {
|
async refreshSavePathList() {
|
||||||
this.savePathList = await HttpUtil.get("/file/path");
|
this.savePathList = await HttpUtil.get("/file/path");
|
||||||
},
|
},
|
||||||
@ -234,6 +250,10 @@ function readChar(a, i, n) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
.savePath {
|
||||||
|
cursor: pointer;
|
||||||
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
.fileList {
|
.fileList {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user