|
@@ -18,7 +18,9 @@
|
|
|
</div>
|
|
|
<!-- 跳转导航结束 -->
|
|
|
<div class="pmInp">
|
|
|
- <el-button type="primary" class="btn" size="mini">上传文件</el-button>
|
|
|
+ <!-- <el-button type="primary" class="btn" @click="addFile" size="mini">上传文件</el-button> -->
|
|
|
+ <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept"></beUpload>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
<!-- 表格部分开始 -->
|
|
@@ -26,13 +28,19 @@
|
|
|
:data="tableData"
|
|
|
tooltip-effect="dark"
|
|
|
stripe
|
|
|
- height="500px"
|
|
|
+ height="550px"
|
|
|
class="fontSize"
|
|
|
:header-cell-style="{ background: '#f2f2f2',color:'#000' }"
|
|
|
>
|
|
|
-
|
|
|
<el-table-column
|
|
|
- prop="projectName"
|
|
|
+ prop="projectTitle"
|
|
|
+ label="项目名称"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="fileName"
|
|
|
label="项目中期报告"
|
|
|
align="center"
|
|
|
>
|
|
@@ -46,7 +54,7 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
- prop="date"
|
|
|
+ prop="uploadTime"
|
|
|
label="时间"
|
|
|
align="center"
|
|
|
>
|
|
@@ -66,37 +74,91 @@
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
- <div class="pm5footer">
|
|
|
- <!-- <el-button type="primary" class="backBtn" @click="backBtn2">返回</el-button>
|
|
|
- -->
|
|
|
- <el-pagination
|
|
|
+ <!-- 分页 -->
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="table.currentPage"
|
|
|
+ :page-size="table.packageSize"
|
|
|
+ layout=" prev, pager, next"
|
|
|
background
|
|
|
- layout="prev, pager, next"
|
|
|
- :total="1">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
+ class="pagination"
|
|
|
+ :total="table.total">
|
|
|
+ </el-pagination>
|
|
|
+ <!-- 分页结束 -->
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import beUpload from '../../components/tool/beUpload'
|
|
|
+
|
|
|
export default {
|
|
|
+ components:{beUpload},
|
|
|
data() {
|
|
|
return {
|
|
|
- tableData:[{
|
|
|
- projectName:'创业孵化基地企业情况信息表',
|
|
|
- date:'2022年11月12日',
|
|
|
- size:'50k'
|
|
|
- },
|
|
|
- {
|
|
|
- projectName:'创业孵化基地企业情况信息表',
|
|
|
- size:'50k',
|
|
|
- date:'2022年11月12日',
|
|
|
- }
|
|
|
- ],
|
|
|
+ accept:".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
+ table:{ // 分页数据
|
|
|
+ total:0,
|
|
|
+ packageSize:8,
|
|
|
+ currentPage:1
|
|
|
+ },
|
|
|
+ tableData:[], //附件列表
|
|
|
+ file:''
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ getFile(val) { //上传文件
|
|
|
+ this.file = val;
|
|
|
+ let param={
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
+ cid:JSON.parse(localStorage.getItem('pid')),
|
|
|
+ projectFile:val
|
|
|
+ }
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api+'',param)
|
|
|
+ .then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ },err=>{
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) { //当页数发生改变的时候调用获取列表数据请求
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ this.table.currentPage=val
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ getData(){ //获取基础信息
|
|
|
+ let param={
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
+ pid:JSON.parse(localStorage.getItem('pid')),
|
|
|
+ page:this.table.currentPage,
|
|
|
+ lim:this.table.packageSize
|
|
|
+ }
|
|
|
+ // console.log(param);
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api+'/SelectProjectManageFile',param)
|
|
|
+ .then(res=>{
|
|
|
+ let file = JSON.parse(res.data[0][0]['endFile']);
|
|
|
+ file.forEach(item=>item.projectTitle = res.data[0][0]['title'])
|
|
|
+ console.log(file)
|
|
|
+ // res.data[0].forEach((e,i) => {
|
|
|
+ // let { title: f, } = JSON.parse(e.endFile);
|
|
|
+ // console.log(e.title);
|
|
|
+
|
|
|
+ // console.log(JSON.parse(e.endFile));
|
|
|
+ // JSON.parse(e.endFile).title=e.title
|
|
|
+ // JSON.parse(e.endFile).forEach((o,i)=>{
|
|
|
+ // k.title=o.title
|
|
|
+ // })
|
|
|
+ // console.log(JSON.parse(e.endFile));
|
|
|
+ // k.push(Object.assign({title:f},JSON.parse(l)))
|
|
|
+ // });
|
|
|
+ this.tableData=file
|
|
|
+ // console.log(this.tableData);
|
|
|
+ },err=>{
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ },
|
|
|
content(){
|
|
|
this.$router.push('/ProjectManagement1')
|
|
|
},
|
|
@@ -123,15 +185,19 @@
|
|
|
this.$router.push('/ProjectManagement')
|
|
|
},
|
|
|
},
|
|
|
- created(){
|
|
|
- // this.value=(this.options[0].value)
|
|
|
+ mounted(){
|
|
|
+ this.getData()
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
.ProjectManagement5{
|
|
|
-
|
|
|
+ .pagination{
|
|
|
+ float: right;
|
|
|
+ margin: 20px 55px 10px;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
.pm5footer{
|
|
|
float: right;
|