Skip to content

Commit

Permalink
some change
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Dec 5, 2018
1 parent ac6a049 commit 00a6f3a
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 37 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ module.exports = {
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],

plugins: [
'js',
'vue'
],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"clipboard": "^2.0.1",
"echarts": "^3.8.5",
"element-ui": "2.4.6",
"eslint-import-resolver-webpack": "^0.10.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"font-awesome": "4.7.0",
"http-proxy-middleware": "^0.17.3",
Expand Down
7 changes: 1 addition & 6 deletions src/components/CommonToolBar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,7 @@ export default {
this.$emit('searchEvent')
},
ClearOption() {
this.searchArr = [
{
SearchKey: '',
SearchValue: ''
}
]
this.buttonVisible = 'el-icon-arrow-down'
this.$emit('clearEvent')
},
Expand Down
67 changes: 41 additions & 26 deletions src/components/UploadAffix/index.vue
Original file line number Diff line number Diff line change
@@ -1,49 +1,64 @@
<template>
<div class="upload-container">
<el-upload
ref="upload"
class="upload-demo"
:action="baseUrl"
:data="Params['Param']"
:headers="token"
v-if="!Params.IsDetail"
:show-file-list = "false"
:on-success="uploadSuccess"
>
<el-button size="small" style="float:left;margin-top:10px 0" type="primary">点击上传</el-button>
</el-upload>
<div class="upload-container">
<el-upload
ref="upload"
class="upload-demo"
:action="baseUrl"
:data="Params['Param']"
:headers="token"
v-if="!Params.IsDetail"
:show-file-list="false"
:on-success="uploadSuccess"
>
<el-button size="small" style="float:left;margin-top:10px 0" type="primary">点击上传</el-button>
</el-upload>

<el-table :default-sort="{prop: 'name', order: 'descending'}" :data="filelist" v-loading.body="listLoading" element-loading-text="拼命加载中" border fit highlight-current-row>

<el-table
:default-sort="{prop: 'name', order: 'descending'}"
:data="filelist"
v-loading.body="listLoading"
element-loading-text="拼命加载中"
border
fit
highlight-current-row
>
<el-table-column label="文件名" prop="filename" sortable align="center">
<template slot-scope="scope">
{{scope.row.filename}}
</template>
<template slot-scope="scope">{{scope.row.filename}}</template>
</el-table-column>
<el-table-column label="上传时间" prop="timestamp" sortable align="center">
<template slot-scope="scope">
<span>{{timestampToTime(scope.row.timestamp)}}</span>
</template>
</el-table-column>


<el-table-column label="操作" align="center" min-width="110px">
<template slot-scope="scope">
<el-button @click="exportfile(scope.row.id)" type="success" :disabled="false" size="small">下载</el-button>
<el-button
@click="exportfile(scope.row.id)"
type="success"
:disabled="false"
size="small"
>下载</el-button>

<el-button v-if="!Params.IsDetail" @click="delete_file(scope.row.id)" :disabled="false" type="danger" size="small">删除</el-button>
<el-button
v-if="!Params.IsDetail"
@click="delete_file(scope.row.id)"
:disabled="false"
type="danger"
size="small"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>


<script>
import { getToken } from "@/utils/auth";
import { GetFileList, deletefile } from "@/api/public/file";
import { GetFileList, deletefile } from "@/api/public/file";
import { timestampToTime } from "@/utils/index";
import download from '@/utils/download'
import download from "@/utils/download";
export default {
name: "UploadAffix",
data() {
Expand All @@ -53,13 +68,13 @@ export default {
auth: getToken()
},
listLoading: false,
baseUrl:`${process.env.BASE_API}file/upload`
baseUrl: `${process.env.BASE_API}file/upload`
};
},
props: {
Params: {
type: Object // IsDetail true则 只显示文件list以及download button
type: Object // IsDetail true则 只显示文件list以及download button
}
},
methods: {
Expand Down
12 changes: 10 additions & 2 deletions src/views/Archive/person_edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:searchArr ="listQuery.searchArr"
@addEvent ="New"
@searchEvent ="Refresh"
@clearEvent ="Refresh"
@clearEvent ="Clear"
></common-tool-bar>


Expand Down Expand Up @@ -158,7 +158,15 @@ export default {
})
})
},
Clear(){
this.listQuery.searchArr = [
{
SearchKey: '',
SearchValue: ''
}
]
this.Refresh()
},
Edit(id) {
this.dialogStatus = 'update'
GetUsersDetail(id).then(response => {
Expand Down
1 change: 0 additions & 1 deletion src/views/layout/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import BackToTop from '@/components/BackToTop'
export default {
name: 'layout',
components: {
Navbar,
Sidebar,
Expand Down

0 comments on commit 00a6f3a

Please sign in to comment.