commit
fe70be3206
@ -137,12 +137,14 @@ export default {
|
||||
this.showSave = false;
|
||||
this.$message.success("操作成功");
|
||||
},
|
||||
//取消收藏路径
|
||||
async cancelSavePath() {
|
||||
await HttpUtil.delete("/file/path/delete", { id: this.curSavePathId });
|
||||
this.refreshSavePathList();
|
||||
this.$emit("refreshSavePathList");
|
||||
this.$message.success("操作成功");
|
||||
},
|
||||
//变更路径
|
||||
changePath(item) {
|
||||
this.pathList = JSON.parse(item.content);
|
||||
this.breadcrumbClick(this.pathList.length - 1);
|
||||
|
@ -12,7 +12,18 @@
|
||||
<el-button type="primary" @click="showFileAdd" size="small">新增</el-button>
|
||||
<el-button type="primary" size="small" @click="selectAllFiles">反选</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 class="fileBlock">
|
||||
<!-- 左侧原始文件名 -->
|
||||
@ -177,6 +188,11 @@ export default {
|
||||
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() {
|
||||
this.savePathList = await HttpUtil.get("/file/path");
|
||||
},
|
||||
@ -234,6 +250,10 @@ function readChar(a, i, n) {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.savePath {
|
||||
cursor: pointer;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
.fileList {
|
||||
margin-top: 20px;
|
||||
text-align: left;
|
||||
|
Loading…
x
Reference in New Issue
Block a user