|
@@ -77,52 +77,74 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%"
|
|
|
- stripe
|
|
|
- :header-cell-style="{ background: '#F7F7F7' }"
|
|
|
- :height="screenHeight"
|
|
|
- ref="editTable"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- v-for="(item, index) in listData"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :prop="item.value"
|
|
|
- :width="item.width"
|
|
|
- :min-width="item.minWidth"
|
|
|
- :align="item.align"
|
|
|
+ <div>
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ stripe
|
|
|
+ ref="editTable"
|
|
|
+ :header-cell-style="{ background: '#F7F7F7' }"
|
|
|
+ :height="screenHeight"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <div v-if="item.value == 'status'">
|
|
|
- <el-switch
|
|
|
- v-model="scope.row.status"
|
|
|
- active-color="#17A8FF"
|
|
|
- inactive-color="#AFAFAF"
|
|
|
- @change="statusChange($event, scope.row)"
|
|
|
+ <el-table-column
|
|
|
+ label="分类名称"
|
|
|
+ prop="typeName"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="文件名称"
|
|
|
+ prop="name"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="链接地址"
|
|
|
+ prop="linkUrl"
|
|
|
+ align="center"
|
|
|
+ min-width="180"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="禁用/启用"
|
|
|
+ prop="status"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
+ <el-switch
|
|
|
+ v-model="scope.row.status"
|
|
|
+ active-color="#17A8FF"
|
|
|
+ inactive-color="#AFAFAF"
|
|
|
+ @change="statusChange($event, scope.row)"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </div>
|
|
|
+ </div> </template
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="创建人"
|
|
|
+ prop="createUser"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="创建时间"
|
|
|
+ prop="createTime"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column label="操作" width="140px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button type="text" @click="history(scope.row)"
|
|
|
+ >历史版本</el-button
|
|
|
>
|
|
|
- </el-switch>
|
|
|
+ <el-button type="text" @click="edit(scope.row)">编辑</el-button>
|
|
|
</div>
|
|
|
- <div v-else>
|
|
|
- {{ scope.row[scope.column.property] }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="操作" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <el-button type="text" @click="history(scope.row)"
|
|
|
- >历史版本</el-button
|
|
|
- >
|
|
|
- <el-button type="text" @click="edit(scope.row)">编辑</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
@@ -156,50 +178,6 @@ export default {
|
|
|
{ label: '启用', value: 1 },
|
|
|
{ label: '禁用', value: 0 }
|
|
|
],
|
|
|
- listData: [
|
|
|
- {
|
|
|
- name: '分类名称',
|
|
|
- value: 'typeName',
|
|
|
- width: '',
|
|
|
- minWidth: '',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '文件名称',
|
|
|
- value: 'name',
|
|
|
- width: '',
|
|
|
- minWidth: '',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '链接地址',
|
|
|
- value: 'linkUrl',
|
|
|
- width: '',
|
|
|
- minWidth: '',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '禁用/启用',
|
|
|
- value: 'status',
|
|
|
- width: '',
|
|
|
- minWidth: '',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '创建人',
|
|
|
- value: 'createUser',
|
|
|
- width: '',
|
|
|
- minWidth: '',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '创建时间',
|
|
|
- value: 'createTime',
|
|
|
- width: '',
|
|
|
- minWidth: '',
|
|
|
- align: 'center'
|
|
|
- }
|
|
|
- ],
|
|
|
form: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
@@ -210,17 +188,17 @@ export default {
|
|
|
typeId: ''
|
|
|
},
|
|
|
classifyList: [],
|
|
|
- screenHeight:document.body.clientHeight-370,
|
|
|
+ screenHeight: document.body.clientHeight - 320,
|
|
|
tableDataheight: 0
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.screenHeight = document.body.clientHeight-370;
|
|
|
- window.onresize = () => {
|
|
|
- return (() => {
|
|
|
- this.screenHeight = document.body.clientHeight-370;
|
|
|
- })();
|
|
|
- };
|
|
|
+ this.screenHeight = document.body.clientHeight - 320
|
|
|
+ window.onresize = () => {
|
|
|
+ return (() => {
|
|
|
+ this.screenHeight = document.body.clientHeight - 320
|
|
|
+ })()
|
|
|
+ }
|
|
|
this.listDataInit()
|
|
|
},
|
|
|
methods: {
|
|
@@ -365,16 +343,16 @@ export default {
|
|
|
<style lang="less">
|
|
|
.fileManagement_List {
|
|
|
.fileManagement_List_headerSelect {
|
|
|
- .fileManagement-list-btn{
|
|
|
+ .fileManagement-list-btn {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- align-items:center;
|
|
|
+ align-items: center;
|
|
|
margin-bottom: 10px;
|
|
|
- .el-input__suffix{
|
|
|
+ .el-input__suffix {
|
|
|
height: 32px;
|
|
|
}
|
|
|
}
|
|
|
- margin-bottom: 32px;
|
|
|
+ margin-bottom: 20px;
|
|
|
.el-form-item {
|
|
|
margin-bottom: 10px;
|
|
|
margin-right: 60px;
|