|
|
@@ -3,7 +3,7 @@
|
|
|
<el-button type="primary" @click="show = true">文件上传</el-button>
|
|
|
<el-dialog
|
|
|
v-model="show"
|
|
|
- width="1200"
|
|
|
+ width="1200px"
|
|
|
:show-close="false"
|
|
|
:close-on-click-modal="false"
|
|
|
@close="onClose"
|
|
|
@@ -66,11 +66,18 @@
|
|
|
<el-tab-pane label="合同" name="4"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<div class="area">
|
|
|
- <div
|
|
|
- v-if="activeName === '2'"
|
|
|
- class="full-width flex flex-center flex-justify-start ml-20"
|
|
|
- ></div>
|
|
|
- <div class="files">
|
|
|
+ <div class="full-width flex flex-center flex-justify-start ml-20">
|
|
|
+ <file-way
|
|
|
+ v-if="activeName === '2'"
|
|
|
+ :next="currentRow ? currentRow : ''"
|
|
|
+ @before="goBefore"
|
|
|
+ @goHome="getFolderList"
|
|
|
+ />
|
|
|
+ <div class="tips" v-else>
|
|
|
+ {{ tips }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="files full-height">
|
|
|
<xtable
|
|
|
:data="list"
|
|
|
:option="option"
|
|
|
@@ -91,8 +98,8 @@
|
|
|
<span class="bold">已选择 {{ selectedList.length }}/9 项</span>
|
|
|
<div>
|
|
|
<el-button type="primary" plain @click="show = false"
|
|
|
- >取 消</el-button
|
|
|
- >
|
|
|
+ >取 消
|
|
|
+ </el-button>
|
|
|
<el-button type="primary">确 定</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -104,10 +111,13 @@
|
|
|
<script>
|
|
|
import xtable from '@/views/resource/component/xtable.vue'
|
|
|
import uploadFile from '@/components/upload-file/index.vue'
|
|
|
+import fileWay from '@/components/file-way/index.vue'
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
xtable,
|
|
|
- uploadFile
|
|
|
+ uploadFile,
|
|
|
+ fileWay
|
|
|
},
|
|
|
props: {
|
|
|
projectId: {
|
|
|
@@ -146,6 +156,7 @@ export default {
|
|
|
topFolder: true,
|
|
|
show: false,
|
|
|
activeName: '1',
|
|
|
+ tips: '最近15天内上传的文件',
|
|
|
list: [],
|
|
|
selectedList: [],
|
|
|
isLatest: 0,
|
|
|
@@ -160,6 +171,7 @@ export default {
|
|
|
option: {
|
|
|
showMenu: false,
|
|
|
showCheckBox: true,
|
|
|
+ height: 500,
|
|
|
column: [
|
|
|
{
|
|
|
label: '名称',
|
|
|
@@ -184,6 +196,7 @@ export default {
|
|
|
if (this.activeName === '1') {
|
|
|
this.isLatest = 0
|
|
|
this.dictKey = ''
|
|
|
+ this.tips = '最近15天内上传的文件'
|
|
|
this.fetchData()
|
|
|
} else if (this.activeName === '2') {
|
|
|
this.isLatest = 0
|
|
|
@@ -240,7 +253,6 @@ export default {
|
|
|
* @param row
|
|
|
*/
|
|
|
getFileList(row) {
|
|
|
- console.log(row)
|
|
|
this.topFolder = false
|
|
|
const item = {
|
|
|
id: row.id,
|
|
|
@@ -283,6 +295,7 @@ export default {
|
|
|
},
|
|
|
rowClick(res) {
|
|
|
this.currentRow = res
|
|
|
+ console.log(this.currentRow)
|
|
|
const tmp = this.list.find(ele => ele.id === res.id)
|
|
|
this.parentId = tmp.id
|
|
|
if (tmp && tmp.type !== 2) {
|
|
|
@@ -311,6 +324,17 @@ export default {
|
|
|
this.list.length = 0
|
|
|
this.activeName = '1'
|
|
|
this.parentId = ''
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 返回上一级
|
|
|
+ */
|
|
|
+ goBefore(res) {
|
|
|
+ if (!this.topFolder) {
|
|
|
+ this.getFileList(res)
|
|
|
+ } else {
|
|
|
+ console.log('top')
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -318,9 +342,17 @@ export default {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.area {
|
|
|
- height: 600px;
|
|
|
+ height: 630px;
|
|
|
width: 88%;
|
|
|
}
|
|
|
+
|
|
|
+.tips {
|
|
|
+ width: 100%;
|
|
|
+ height: 32px;
|
|
|
+ padding: 8px 5px;
|
|
|
+ background-color: bisque;
|
|
|
+}
|
|
|
+
|
|
|
.files {
|
|
|
overflow-y: scroll;
|
|
|
padding: 0 10px;
|