提交 f8857843 编写于 作者: zhentian.jia's avatar zhentian.jia

对接项目管理 新建项目后端接口

上级 f0f99394
......@@ -12,7 +12,7 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
config.headers['sysCode'] = 12
config.headers['token'] = 'C1C5360EEC754092B9EC244147B35BB7'
config.headers['token'] = 'AB14D7D7675E4D09B4B1566170076122'
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
// if (config.data && config.data.setEntry) {
// config.headers['sysCode'] = config.data.sysCode || 10
......
......@@ -124,6 +124,21 @@ const vueFilter = {
}else {
return '已禁用'
}
},
statusProject: (value) => {
if(value == 1) {
return '草稿'
}else if(value == 2) {
return '未上架'
}else if(value == 3) {
return '审批中'
}else if(value == 4) {
return '已上架'
}else if(value == 5) {
return '已下架'
}else {
return '已拒绝'
}
}
}
export default vueFilter
\ No newline at end of file
此差异已折叠。
......@@ -42,12 +42,16 @@
<el-table-column prop="projectIntro" label="项目简介"></el-table-column>
<el-table-column prop="projectBegintime" label="项目开始时间"></el-table-column>
<el-table-column prop="projectEndtime" label="项目结束时间"></el-table-column>
<el-table-column prop="projectStatus" label="状态"></el-table-column>
<el-table-column prop="projectStatus" label="状态">
<template slot-scope="scope">
<span>{{ scope.row.projectStatus | statusProject }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope">
<el-button class="title" type="text" size="small">编辑</el-button>
<el-button class="title" type="text" size="small">发布</el-button>
<el-button class="title" type="text" size="small">删除</el-button>
<el-button @click="editItem(scope.row)" class="title" type="text" size="small">编辑</el-button>
<el-button @click="releaseItem(scope.row)" class="title" type="text" size="small">发布</el-button>
<el-button @click="delItem(scope.row)" class="title" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -57,7 +61,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchParam.pageNo"
:page-sizes="[15, 30, 50, 100]"
:page-sizes="[10, 30, 50, 100]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
......@@ -148,32 +152,41 @@ export default {
},
//查询项目列表
getProjectList() {
console.log("数据请求");
let req = {
pageNo: this.searchParam.pageNo,
pageSize: this.searchParam.pageNo
pageSize: this.searchParam.pageSize,
};
vm.GET("portalInfo/getProjectList", req).then(res => {
if (res.code == "000000") {
vm.tableData = res.data.data;
vm.totalRows = res.data.data.length;
vm.totalRows = res.data.totalRows;
}
});
},
editItem(row) {
},
releaseItem(row) {
},
delItem(row) {
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.pageSize = val;
this.handleCurrentChange(this.currentPage);
this.searchParam.pageSize = val;
this.handleCurrentChange(this.searchParam.pageNo);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
this.searchParam.pageNo = val;
this.getProjectList();
//需要判断是否检索
if (!this.flag) {
this.currentChangePage(this.tableDataEnd);
} else {
this.currentChangePage(this.filterTableDataEnd);
}
// if (!this.flag) {
// this.currentChangePage(this.tableDataEnd);
// } else {
// this.currentChangePage(this.filterTableDataEnd);
// }
}, //组件自带监控当前页码
currentChangePage(list) {
let from = (this.currentPage - 1) * this.pageSize;
......
......@@ -25,7 +25,15 @@ let data = {
"kind": 3
}
]
}
};
let req = {
projectModel:
'{"id":6,"projectBegintime":1551853576789,"projectEndtime":1551853576789,"projectIntro":"测试用例","projectName":"testProjectName"}',
attachmentModel:
'[{"attachmentType":1,"attachmentUrl":"www.baidu.com","kind":1,"portalProjectId":6,"seqNo":1},{"attachmentType":2,"attachmentUrl":"www.qq.com","kind":2,"portalProjectId":6,"seqNo":1}]',
attachmentPDFModel:
'[{"attachmentType":3,"attachmentUrl":"www.pdf.com","kind":3,"portalProjectId":6},{"attachmentType":3,"attachmentUrl":"www.pdf.com","kind":3,"portalProjectId":6}]'
};
/**
projectModel
ProjectBegintime ProjectEndtime 开始结束时间
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册