|
@@ -4,54 +4,43 @@
|
|
|
<el-header style="display:flex;justify-content: space-between;">
|
|
|
<div>
|
|
|
<mySearch :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch>
|
|
|
- <!-- <el-form :inline="true">
|
|
|
- <el-form-item label="名称">
|
|
|
- <el-input v-model="form.fileName" size="small" placeholder="请输入文件名称"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="" size="small" @click="getList">查询</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form> -->
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-button type="primary" size="small" @click="handleAdd()">新增</el-button>
|
|
|
</div>
|
|
|
</el-header>
|
|
|
<el-main>
|
|
|
- <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">
|
|
|
- <el-table-column type="index" label="#" width="55" align="center"></el-table-column>
|
|
|
- <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope" v-if="scope.row.reportFiles">
|
|
|
- <div>
|
|
|
- <span>{{ scope.row.name }}</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="suffix" label="类型" align="center" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope" v-if="scope.row.reportFiles">
|
|
|
+ <el-table v-loading="loading" :data="tableData" style="width: 100%;" border
|
|
|
+ header-row-class-name="custom-table-header" @sort-change="sortChange">
|
|
|
+ <el-table-column label="#" align="center" width="80px">
|
|
|
+ <template slot-scope="scope">
|
|
|
<div>
|
|
|
- <span>{{ scope.row.reportFiles[0].suffix }}</span>
|
|
|
+ {{ (queryParams.current - 1) * queryParams.size + scope.$index + 1 }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="reportName" label="所属报告" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="personName" label="创建人" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="creationTime" label="创建时间" align="center" show-overflow-tooltip>
|
|
|
+
|
|
|
+ <el-table-column v-for="item in columnList" :key="item.value" :prop="item.value"
|
|
|
+ :render-header="$commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.creationTime }}</span>
|
|
|
+ <div v-if="['name'].includes(item.value)">
|
|
|
+ <el-tooltip :content="$commonJS.getColumnData(scope.row, item)" placement="top">
|
|
|
+ <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-else v-html="$commonJS.getColumnData(scope.row, item)"></div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
|
|
|
+
|
|
|
<el-table-column label="操作" align="center" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-dropdown split-button type="primary" size="small">
|
|
|
- <P @click="handleEdit(scope.row)">编辑</P>
|
|
|
+ <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)">
|
|
|
+ <P @click="handleCommand('e', scope.row)">编辑</P>
|
|
|
|
|
|
<el-dropdown-menu slot="dropdown" class="text-align_center">
|
|
|
- <el-dropdown-item @click.native="handleDownload(scope.row)">下载</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="preview(scope.row.reportFiles[0])">预览</el-dropdown-item>
|
|
|
- <el-dropdown-item divided class="color-red"
|
|
|
- @click.native="handleDelete(scope.row)">删除</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="0">下载</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="1">预览</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="2" divided style="color: red;">删除</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
@@ -62,9 +51,7 @@
|
|
|
@current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
|
|
|
</div>
|
|
|
</el-main>
|
|
|
- <el-footer class="footer-common">
|
|
|
- <el-button @click="close">关 闭</el-button>
|
|
|
- </el-footer>
|
|
|
+
|
|
|
</el-container>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -81,19 +68,96 @@ export default {
|
|
|
size: 10,
|
|
|
},
|
|
|
total: 0,
|
|
|
+ // 表格字段
|
|
|
+ columnList: [
|
|
|
+ {
|
|
|
+ name: "名称",
|
|
|
+ type: "String",
|
|
|
+ value: "name",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "类型",
|
|
|
+ type: "String",
|
|
|
+ value: "suffix",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "所属报告",
|
|
|
+ type: "String",
|
|
|
+ value: "reportName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "创建人",
|
|
|
+ type: "String",
|
|
|
+ value: "personName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "创建时间",
|
|
|
+ type: "String",
|
|
|
+ value: "DataTime",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "备注",
|
|
|
+ type: "String",
|
|
|
+ value: "remark",
|
|
|
+ },
|
|
|
+ ],
|
|
|
// 检索字段
|
|
|
searchFiled: [],
|
|
|
// 检索字符串
|
|
|
searchOption: {},
|
|
|
//排序字段
|
|
|
sort: [{ "orderBy": "createTime", "orderType": 1 }],
|
|
|
+ // 表格loading
|
|
|
+ loading: false
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
-
|
|
|
+ async mounted() {
|
|
|
+ // 获取table栏位
|
|
|
+ // this.columnList = await this.$commonJS.getCustomField('projectTask')
|
|
|
+ // 获取栏位
|
|
|
+ // await this.getColumn()
|
|
|
+ // 获取数据
|
|
|
+ // this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getList() {
|
|
|
+ let params = {
|
|
|
+
|
|
|
+ }
|
|
|
+ this.$api.query(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 分页
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.queryParams.current = val
|
|
|
+
|
|
|
+ },
|
|
|
+ // 排序
|
|
|
+ sortChange() { },
|
|
|
+ // 新增
|
|
|
+ handleAdd() { },
|
|
|
+ // 检索
|
|
|
+ search(val) { },
|
|
|
+ // 编辑等下拉菜单
|
|
|
+ handleCommand(ev, row) {
|
|
|
+ switch (ev) {
|
|
|
+ case 'e':
|
|
|
+
|
|
|
+ break;
|
|
|
+ case 'e':
|
|
|
+
|
|
|
+ break;
|
|
|
+ case 'e':
|
|
|
+
|
|
|
+ break;
|
|
|
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|