[add] 工作组在研项目,工作组详情

This commit is contained in:
zhaoxiao
2021-12-14 20:30:39 +08:00
parent d46e53c0da
commit c5a40fd92c
7 changed files with 383 additions and 42 deletions
+19 -4
View File
@@ -48,7 +48,7 @@
<!-- 项目名称-->
<template slot="projectName" slot-scope="text, record">
<j-ellipsis :value="text" :length="20" class="project-name" @click="openDetailModal(record)"></j-ellipsis>
<j-ellipsis :value="text" :length="20" class="project-name" @click="toDetail(record)"></j-ellipsis>
</template>
<template slot="text" slot-scope="text, record">
@@ -66,7 +66,8 @@
</a-card>
<project-detail-modal ref="projectDetail" @openContractModule="handleOpenContractModule"></project-detail-modal>
<mine-contract-module :contract-id="contractId" :visible.sync="contractModuleVisible" @openProjectDetail="openDetailModal"></mine-contract-module>
<mine-contract-module :contract-id="contractId" :visible.sync="contractModuleVisible"
@openProjectDetail="openDetailModal"></mine-contract-module>
</div>
</template>
<script>
@@ -133,8 +134,8 @@ export default {
toMeeting() {
this.$router.push({
path: '/meetingActivity/MeetingActivity',
query:{
meetingType:'1'
query: {
meetingType: '1'
}
})
},
@@ -158,6 +159,20 @@ export default {
projectName: record.chargeProject
}
})
},
/**
* 跳转至详情
* @param record
*/
toDetail(record) {
console.log(record.projectId)
this.$router.push({
path: '/workTeam/WorkTeamDetail',
query: {
projectId: record.id,
workingGroupId: record.workingGroupId
}
})
}
}
}
+280
View File
@@ -0,0 +1,280 @@
<template>
<div class="main-box">
<a-card :bordered="false">
<!-- 基本信息-->
<div class="basic-info basic-box">
<h3 class="title">基本信息</h3>
<a-spin :spinning="basicLoading">
<a-row :gutter="10">
<a-col :span="24" class="basic-info-item"><label>项目名称:</label><span>{{ detail.name }}</span>
</a-col>
<a-col :span="8" class="basic-info-item"><label>项目负责人:</label><span>{{ detail.principalName }}</span>
</a-col>
<a-col :span="8" class="basic-info-item"><label>需要发票:</label><span>{{ detail.needInvoice_dictText }}</span>
</a-col>
<a-col :span="8" class="basic-info-item"><label>工作经费:</label><span>{{ detail.receivableAmount }}元</span>
</a-col>
<a-col :span="8" class="basic-info-item"><label>实付金额:</label><span>{{ detail.paidAmount }}元</span></a-col>
<a-col :span="8" class="basic-info-item"><label>打包:</label><span>{{ detail.pack_dictText }}</span></a-col>
<a-col :span="8" class="basic-info-item"><label>付款方式:</label><span>{{ detail.chargeWay_dictText }}</span>
</a-col>
<!-- 合同-->
<!-- v-if="detail.chargeWay === 2"-->
<a-col :span="8" class="basic-info-item">
<label>合同编号:</label>
<span>{{ detail.contractNum }}</span>
</a-col>
<!-- 收费通知-->
<!-- v-if="detail.chargeWay === 3"-->
<a-col :span="8" class="basic-info-item">
<label>收费通知号:</label>
<span>{{ detail.chargeNoticeNo }}</span>
</a-col>
<!-- v-if="detail.chargeWay === 3"-->
<a-col :span="12" class="basic-info-item">
<label>收费通知:</label>
<span style="width: 100%;">
<preview-file style="width: 80%" :file-id="detail.chargeNoticeId"></preview-file>
</span>
</a-col>
<a-col :span="24" class="basic-info-item">
<label>任务及目标:</label>
<span>{{ detail.remarks }}</span>
</a-col>
</a-row>
</a-spin>
</div>
<!-- 在研项目-->
<div class="under-study basic-box">
<h3 class="title">在研项目</h3>
<a-table
ref="table"
size="middle"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
class="j-table-force-nowrap">
<template slot="text" slot-scope="text">
<j-ellipsis :value="text" :length="18"></j-ellipsis>
</template>
<!-- 过程文件-->
<span slot="project-approval" class="action-span-cell" slot-scope="text, record">
<a @click="viewFiles(record)">查看</a>
</span>
</a-table>
</div>
<!-- 工作组会议-->
<div class="meeting basic-box">
<h3 class="title">工作组会议</h3>
<meeting-list></meeting-list>
</div>
<!-- 其他分发资料-->
<div class="meeting basic-box">
<div class="file-title"><h3 class="title">其他分发资料</h3><span>(如月报、调研表等)</span></div>
<file-list ref="fileListTable" :data-source="fileList"></file-list>
</div>
</a-card>
<under-study-files-modal ref="filesModal" :columns="fileColumns" :is-committee="false"></under-study-files-modal>
</div>
</template>
<script>
import MeetingList from '@comp/detailPage/MeetingList'
import FileList from '@comp/detailPage/FileList'
import { getWorkingGroupUnderStudyProject, queryCommonProjectById } from '@api/incomePaymentsApi'
import UnderStudyFilesModal from '@views/MessagePage/modules/UnderStudyFilesModal'
import PreviewFile from '@comp/jero/PreviewFile'
const columns = [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}, {
title: '项目名称',
align: 'center',
dataIndex: 'projectName',
scopedSlots: { customRender: 'text' }
}, {
title: '主要起草单位',
align: 'center',
dataIndex: 'draftCompany',
scopedSlots: { customRender: 'text' }
}, {
title: '项目进度',
align: 'center',
dataIndex: 'projectSchedule',
scopedSlots: { customRender: 'text' }
}, {
title: '过程文件',
align: 'center',
width: 100,
dataIndex: 'filesList',
scopedSlots: { customRender: 'project-approval' }
}
]
const fileColumns = [
{
title: '文件名',
align: 'center',
dataIndex: 'fileName',
scopedSlots: { customRender: 'text' }
}, {
title: '上传时间',
align: 'center',
dataIndex: 'createTime',
scopedSlots: { customRender: 'time' }
}, {
title: '操作',
align: 'center',
dataIndex: 'action',
width: 160,
scopedSlots: { customRender: 'action' }
}]
export default {
name: 'WorkTeamDetail',
components: { MeetingList, FileList, UnderStudyFilesModal, PreviewFile },
data() {
return {
basicLoading: false,
// 详情数据
detail: {},
// 文件数据
fileList: [],
// 在研项目
columns,
// 过程文件表头
fileColumns,
dataSource: [],
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30', '50', '100'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
loading: false
}
},
created() {
this.getUnderStudyProjectList()
this.getWorkingGroupDetail()
},
methods: {
/**
* 获取在研项目
*/
getUnderStudyProjectList() {
let param = {
workingGroupId: this.$route.query.workingGroupId,
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize
}
getWorkingGroupUnderStudyProject(param).then(res => {
if (res.success) {
this.dataSource = res.result.records
if (res.result.result.total) {
this.ipagination.total = res.result.result.total
} else {
this.ipagination.total = 0
}
} else {
this.$message.warn(res.message)
}
})
},
/**
* 查看文件
* @param record
*/
viewFiles(record) {
this.$refs.filesModal.title = '过程文件'
this.$refs.filesModal.dataSource = record.filesList
this.$refs.filesModal.visible = true
},
/**
* 获取工作组详情
*/
getWorkingGroupDetail() {
let param = {
id: this.$route.query.projectId
}
queryCommonProjectById(param).then(res => {
if (res.success) {
this.detail = res.result
} else {
this.$message.warn(res.message)
}
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.title {
position: relative;
}
.title::before {
position: absolute;
top: 4px;
left: -10px;
content: "";
height: 20px;
width: 2px;
background: #069f99;
}
.basic-box {
padding: 0 20px 10px 20px;
}
.basic-info {
.ant-col {
margin: 5px 0;
}
&-item {
display: flex;
label {
flex-shrink: 0;
}
}
}
.file-title {
display: flex;
align-items: center;
span {
margin-left: 10px;
margin-bottom: 5px;
}
}
</style>