|
@@ -19,11 +19,28 @@
|
|
|
</el-select> -->
|
|
|
<selectTag
|
|
|
v-model="checkFolderid"
|
|
|
- :options="myFolderArray"
|
|
|
+ :options="myFolderArray2"
|
|
|
:placeholder="'请选择文件夹'"
|
|
|
style="width: 250px;"
|
|
|
@change="serchFile()"
|
|
|
/>
|
|
|
+ <el-select
|
|
|
+ v-if="pid.split('/')[0] == '1'"
|
|
|
+ style="width: 120px;margin-left: 10px"
|
|
|
+ v-loading="!userArray.length"
|
|
|
+ v-model="user"
|
|
|
+ placeholder="拥有者"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @change="serchFile2()"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in userArray"
|
|
|
+ :key="index"
|
|
|
+ :label="item.username"
|
|
|
+ :value="item.userid"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
<div class="f_box_top_right">
|
|
|
<div class="input">
|
|
@@ -40,7 +57,7 @@
|
|
|
style="background-color: rgb(51, 112, 255);"
|
|
|
>刷新</el-button
|
|
|
>
|
|
|
- <el-button type="primary" size="small" @click="addImg($event)"
|
|
|
+ <el-button v-if="pid.split('/')[0] == '0'" type="primary" size="small" @click="addImg($event)"
|
|
|
icon="el-icon-plus"
|
|
|
style="background-color: rgb(51, 112, 255);"
|
|
|
>上传文件
|
|
@@ -78,6 +95,7 @@
|
|
|
type="selection"
|
|
|
width="50px"
|
|
|
:reserve-selection="true"
|
|
|
+ :selectable="isSelectable"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
prop="name"
|
|
@@ -144,7 +162,8 @@
|
|
|
@click="extractFile(scope.row)"
|
|
|
@mouseover="isHover = true"
|
|
|
:disabled="scope.row.ingestionStatus == 'failed'"
|
|
|
- @mouseleave="isHover = false">
|
|
|
+ @mouseleave="isHover = false"
|
|
|
+ v-if="scope.row.userid == userid">
|
|
|
<img
|
|
|
style="width: 14px;"
|
|
|
:src="isHover ? tqList2 : tqList"
|
|
@@ -282,10 +301,12 @@ export default {
|
|
|
this.fileArray = [];
|
|
|
this.checkArray = [];
|
|
|
this.fileName = "";
|
|
|
- this.checkFolderid = [this.moFolderid];
|
|
|
- // this.getData();
|
|
|
+ this.checkFolderid = [];
|
|
|
+ console.log(this.myFolderArray);
|
|
|
+ this.page = 1
|
|
|
+ this.getData();
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -318,7 +339,9 @@ export default {
|
|
|
limit: 10,
|
|
|
total: 0,
|
|
|
page: 1,
|
|
|
- checkFolderid: []
|
|
|
+ checkFolderid: [],
|
|
|
+ user: "",
|
|
|
+ userArray: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -359,7 +382,14 @@ export default {
|
|
|
return item;
|
|
|
}
|
|
|
};
|
|
|
- }
|
|
|
+ },
|
|
|
+ myFolderArray2() {
|
|
|
+ if (this.user) {
|
|
|
+ return this.myFolderArray.filter(e => e.userid == this.user);
|
|
|
+ } else {
|
|
|
+ return this.myFolderArray;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
handleCurrentChange(val) {
|
|
@@ -367,6 +397,7 @@ export default {
|
|
|
this.getData();
|
|
|
},
|
|
|
getData() {
|
|
|
+ let type = this.pid.split("/");
|
|
|
this.isLoading = true;
|
|
|
let params = {
|
|
|
uid: this.userid,
|
|
@@ -375,14 +406,18 @@ export default {
|
|
|
page: this.page,
|
|
|
num: this.limit
|
|
|
};
|
|
|
+ if(type[0] == '1'){
|
|
|
+ params.userid = this.user
|
|
|
+ }
|
|
|
this.ajax
|
|
|
- .post(this.$store.state.fileApi + "getFile", [params])
|
|
|
+ .post(this.$store.state.fileApi + (type[0] == '0' ? "getFile" : "getFileOpen"), [params])
|
|
|
.then(res => {
|
|
|
this.isLoading = false;
|
|
|
console.log(res.data);
|
|
|
this.total = res.data.result.length ? res.data.result[0].num : 0;
|
|
|
this.fileArray = res.data.result;
|
|
|
- this.$parent.$refs.folder.getData();
|
|
|
+ this.userArray = res.data.user
|
|
|
+ // this.$parent.$refs.folder.getData();
|
|
|
})
|
|
|
.catch(err => {
|
|
|
this.isLoading = false;
|
|
@@ -418,6 +453,11 @@ export default {
|
|
|
this.page = 1;
|
|
|
this.getData();
|
|
|
},
|
|
|
+ serchFile2() {
|
|
|
+ this.checkFolderid = ""
|
|
|
+ this.page = 1;
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
async beforeUpload(event) {
|
|
|
let file = "";
|
|
|
let cfindex2 = 0;
|
|
@@ -620,6 +660,9 @@ export default {
|
|
|
} catch (err) {
|
|
|
console.error(err);
|
|
|
}
|
|
|
+ },
|
|
|
+ isSelectable(row) {
|
|
|
+ return row.userid == this.userid;
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|