部门周记模版+路由
This commit is contained in:
parent
11c989f9fd
commit
dbe4dbf9be
@ -0,0 +1,244 @@
|
|||||||
|
<!--<template>
|
||||||
|
<div id="content-container" :class="{'expand-right': expandRight}">
|
||||||
|
<page-loading :show="pageLoading"></page-loading>
|
||||||
|
<!–Page Title–>
|
||||||
|
<div id="page-title">
|
||||||
|
<h1 class="page-header text-overflow">部门周报填报</h1>
|
||||||
|
</div>
|
||||||
|
<div class="page-content">
|
||||||
|
<data-table
|
||||||
|
:totalColumnsData="tableColumnsData"
|
||||||
|
:rowsData="tableRowsData"
|
||||||
|
:showSingleOperation="tableShowSingleOperation"
|
||||||
|
:showMultipleOperation="false"
|
||||||
|
:canFolded="true"
|
||||||
|
:showPageCtr="true"
|
||||||
|
:totalPage="tableTotalPage"
|
||||||
|
:currentPage="pageNo"
|
||||||
|
@selectPage="tableSelectPage"
|
||||||
|
@singleEdit="tableSingleEdit"
|
||||||
|
@singleCheck="tableSingleCheck"
|
||||||
|
>
|
||||||
|
</data-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>-->
|
||||||
|
<template>
|
||||||
|
<div id="content-container" :class="{'expand-right': expandRight}">
|
||||||
|
<page-loading :show="pageLoading"></page-loading>
|
||||||
|
<div id="page-title">
|
||||||
|
<h1 class="page-header text-overflow">部门周报填报</h1>
|
||||||
|
</div>
|
||||||
|
<div class="page-content">
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="projectNo"
|
||||||
|
label="项目编号"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="projectName"
|
||||||
|
label="项目名称"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="thisWeek"
|
||||||
|
label="本周进展"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="nextWeek"
|
||||||
|
label="下周计划"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<el-button type="text" size="mini" @click="showById(scope.row.id)">查看工作量</el-button>
|
||||||
|
<el-button type="text" size="mini" @click="updateById(scope.row.id)">修改</el-button>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageNo"
|
||||||
|
:total="total"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:page-sizes="[5, 10, 20, 30, 40, 50, 100]"
|
||||||
|
style="padding: 30px 0; text-align: center;"
|
||||||
|
layout="sizes, prev, pager, next, jumper, ->, total, slot"
|
||||||
|
/>
|
||||||
|
<!-- 查看每人工作量(人日)-->
|
||||||
|
<el-dialog title="查看每人工作量" :visible.sync="formDataInfo" width="35%">
|
||||||
|
<h3>每人工作量(人日)</h3>
|
||||||
|
<div>
|
||||||
|
<el-table :data="workLoadInfo">
|
||||||
|
<el-table-column
|
||||||
|
prop="userId"
|
||||||
|
label="姓名"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="workload"
|
||||||
|
label="工作量(人日)"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="formDataInfo = false" size="small">取 消</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/ecmascript-6">
|
||||||
|
import routerData from '../../../../router.json'
|
||||||
|
import PageLoading from '../../../components/PageLoading.vue'
|
||||||
|
import DataForm from '../../../components/form/DataForm.vue'
|
||||||
|
import DataTable from '../../../components/DataTable.vue'
|
||||||
|
import Api from '../../../server/index.js'
|
||||||
|
import {getItem} from '../../../config/mUtils.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
beforeRouteEnter (to, from, next) {
|
||||||
|
next(function (vm) {
|
||||||
|
global.getMenuIndex(vm);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data (){
|
||||||
|
return {
|
||||||
|
expandRight: false,
|
||||||
|
// table单选操作
|
||||||
|
tableShowSingleOperation: {
|
||||||
|
show: true,
|
||||||
|
showEdit: false,
|
||||||
|
showDelete: false,
|
||||||
|
showCheck: true,
|
||||||
|
},
|
||||||
|
dataList: [],
|
||||||
|
workLoadInfo: [],
|
||||||
|
formDataInfo: false,
|
||||||
|
// 分页
|
||||||
|
pageNo: 1, // 默认页码
|
||||||
|
pageSize: 10, // 每页记录数
|
||||||
|
tableTotalPage: 1,
|
||||||
|
tableColumnsData: [],
|
||||||
|
tableRowsData: [],
|
||||||
|
isSuper: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.initTableColumns();
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init () {
|
||||||
|
let userId = getItem('userId');
|
||||||
|
if (userId === '0') {
|
||||||
|
this.isSuper = true;
|
||||||
|
}
|
||||||
|
let projectWeeklyFindReq = {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize
|
||||||
|
}
|
||||||
|
// this.pageLoading = true;
|
||||||
|
Api.ProjectManagements.getWeekly(projectWeeklyFindReq).then(result=>{
|
||||||
|
this.tableRowsData = [];
|
||||||
|
this.pageLoading = false;
|
||||||
|
console.log("周报填报列表",result)
|
||||||
|
if (result.status === 0) {
|
||||||
|
this.dataList = result.data.ls;
|
||||||
|
for (let i=0; i<this.dataList.length; i++) {
|
||||||
|
this.tableRowsData.push({
|
||||||
|
projectNo: this.dataList[i].projectNo,
|
||||||
|
projectName: this.dataList[i].projectName,
|
||||||
|
userName: this.dataList[i].userName,
|
||||||
|
workload: this.dataList[i].workload,
|
||||||
|
thisWeek: this.dataList[i].thisWeek,
|
||||||
|
nextWeek: this.dataList[i].nextWeek
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log("tableRowsData",this.tableRowsData)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 初始化tableColumns
|
||||||
|
initTableColumns () {
|
||||||
|
this.tableColumnsData = [
|
||||||
|
{
|
||||||
|
label: '项目编号',
|
||||||
|
prop: 'projectNo',
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目名称',
|
||||||
|
prop: 'projectName',
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '本周进展',
|
||||||
|
prop: 'thisWeek',
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '下周计划',
|
||||||
|
prop: 'nextWeek',
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '工作量(人日)',
|
||||||
|
prop: 'workload',
|
||||||
|
show: true,
|
||||||
|
children: [
|
||||||
|
{prop: 'name', show: true}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
},
|
||||||
|
tableSelectPage (param){
|
||||||
|
this.pageNo = param;
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
tableSingleCheck (index){
|
||||||
|
this.$router.push({
|
||||||
|
name: "ExpenseClaimApplyCheck",
|
||||||
|
params: {id: this.tableRowsData[index].id}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showById (id) {
|
||||||
|
Api.ProjectManagements.getWorkLoad(id).then(
|
||||||
|
response => {
|
||||||
|
this.formDataInfo = true
|
||||||
|
this.workLoadInfo = response.data
|
||||||
|
console.log("workLoadInfo", this.workLoadInfo)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
tableSingleEdit (index) {
|
||||||
|
this.$router.push({
|
||||||
|
name: "ExpenseClaimApplyEdit",
|
||||||
|
params: {id: this.tableRowsData[index].id}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
PageLoading, DataTable, DataForm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less" rel="stylesheet/less">
|
||||||
|
.expand-right {
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-content {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -321,6 +321,8 @@ const ClaimApplyDetail = r => require.ensure([], () => r(require('../pages/proje
|
|||||||
const ProjectBudgetApply = r => require.ensure([], () => r(require('../pages/projectManagements/weekly/projectBudget/ProjectBudgetApply.vue')), 'ProjectBudgetApply')
|
const ProjectBudgetApply = r => require.ensure([], () => r(require('../pages/projectManagements/weekly/projectBudget/ProjectBudgetApply.vue')), 'ProjectBudgetApply')
|
||||||
const ProjectBudgetApplyAdd = r => require.ensure([], () => r(require('../pages/projectManagements/weekly/projectBudget/ProjectBudgetApplyAdd.vue')), 'ProjectBudgetApplyAdd')
|
const ProjectBudgetApplyAdd = r => require.ensure([], () => r(require('../pages/projectManagements/weekly/projectBudget/ProjectBudgetApplyAdd.vue')), 'ProjectBudgetApplyAdd')
|
||||||
const ProjectBudgetApplyDetail = r => require.ensure([], () => r(require('../pages/projectManagements/weekly/projectBudget/ProjectBudgetApplyDetail.vue')), 'ProjectBudgetApplyDetail')
|
const ProjectBudgetApplyDetail = r => require.ensure([], () => r(require('../pages/projectManagements/weekly/projectBudget/ProjectBudgetApplyDetail.vue')), 'ProjectBudgetApplyDetail')
|
||||||
|
// 部门周报
|
||||||
|
const DepartmentWeeklyList = r => require.ensure([], () => r(require('../pages/projectManagements/departmentWeekly/DepartmentWeeklyList.vue')), 'DepartmentWeeklyList')
|
||||||
//财务管理
|
//财务管理
|
||||||
const ExpenseReceipteManagement = r => require.ensure([], () => r(require('../pages/financialManagement/expenseReceipteManagement/ExpenseReceipteManagement.vue')), 'ExpenseReceipteManagement')
|
const ExpenseReceipteManagement = r => require.ensure([], () => r(require('../pages/financialManagement/expenseReceipteManagement/ExpenseReceipteManagement.vue')), 'ExpenseReceipteManagement')
|
||||||
const ExpenseReceipteDetail = r => require.ensure([], () => r(require('../pages/financialManagement/expenseReceipteManagement/ExpenseReceipteDetail.vue')), 'ExpenseReceipteDetail')
|
const ExpenseReceipteDetail = r => require.ensure([], () => r(require('../pages/financialManagement/expenseReceipteManagement/ExpenseReceipteDetail.vue')), 'ExpenseReceipteDetail')
|
||||||
@ -2327,6 +2329,16 @@ export default new Router({
|
|||||||
module: 'finance'
|
module: 'finance'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// 项目管理-->部门项目周报填报
|
||||||
|
name: 'DepartmentWeeklyList',
|
||||||
|
path: '/project/managements/departmentWeekly/department/Weekly/list',
|
||||||
|
component: DepartmentWeeklyList,
|
||||||
|
meta: {
|
||||||
|
info: 'WeeklyManagements',
|
||||||
|
module: 'project'
|
||||||
|
}
|
||||||
|
},
|
||||||
//
|
//
|
||||||
// {
|
// {
|
||||||
// //项目管理-->项目立项
|
// //项目管理-->项目立项
|
||||||
|
@ -53,4 +53,6 @@ export default {
|
|||||||
getBudget:(param) => Ax('post', '/api/project/weekly/budget', param),
|
getBudget:(param) => Ax('post', '/api/project/weekly/budget', param),
|
||||||
addBudget:(param) => Ax('post', '/api/project/weekly/budget/add', param),
|
addBudget:(param) => Ax('post', '/api/project/weekly/budget/add', param),
|
||||||
delBudget:(param) => Ax('delete', '/api/project/weekly/budget/del', param),
|
delBudget:(param) => Ax('delete', '/api/project/weekly/budget/del', param),
|
||||||
|
getDepartmentWeekly: (param) => Ax('post', '/api/project/departmentWeekly', param),
|
||||||
|
getWorkLoad: (id) => Ax('get', `/api/project/departmentWeekly/showById/${id}`, id)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user