Files
income_payments_client/src/views/projectManagement/CommitteeUnderStudyProject.vue
T

211 lines
6.6 KiB
Vue

<template>
<div>
<page-header-title :is-level-one="false" :level-two-title="$route.query.title"></page-header-title>
<a-card :bordered="false">
<!-- 查询区域-start -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入项目名称" v-model="queryParam.projectName" :maxLength='50'></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-end-->
<!-- table表格区域-->
<div>
<a-table
ref="table"
size="middle"
bordered
:rowKey="(record, index) => index"
:columns="columns"
:scroll="{x: 1600}"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
@change="handleTableChange"
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="viewProjectApproval(record)" :disabled=" record.FILE_LIST10.length === 0 ">查看</a>
</span>
<!-- 征求意见-->
<span slot="advice" class="action-span-cell" slot-scope="text, record">
<a @click="viewAdvice(record)" :disabled=" record.FILE_LIST20.length === 0 ">查看</a>
</span>
<!-- 送审材料-->
<span slot="review-material" class="action-span-cell" slot-scope="text, record">
<a @click="viewReviewMaterial(record)" :disabled=" record.FILE_LIST30.length === 0 ">查看</a>
</span>
</a-table>
</div>
</a-card>
<!-- 文件弹窗-->
<committee-under-study-files-modal ref="filesModal"></committee-under-study-files-modal>
</div>
</template>
<script>
import PageHeaderTitle from '../../components/layouts/PageHeaderTitle'
import { JeroListMixin } from '../../mixins/JeroListMixin'
import { getAction } from '../../api/manage'
import CommitteeUnderStudyFilesModal from './modules/CommitteeUnderStudyFilesModal'
export default {
name: 'CommitteeUnderStudyProject',
components: { PageHeaderTitle, CommitteeUnderStudyFilesModal },
mixins: [JeroListMixin],
data() {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 10 }
},
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: 'planNo',
scopedSlots: { customRender: 'text' }
}, {
title: '起草单位',
align: 'center',
dataIndex: 'draftCompany',
scopedSlots: { customRender: 'text' }
}, {
title: '项目进度',
align: 'center',
dataIndex: 'projectSchedule',
scopedSlots: { customRender: 'text' }
}, {
title: '立项文件',
align: 'center',
width: 100,
fixed: 'right',
dataIndex: 'FILE_LIST10',
scopedSlots: { customRender: 'project-approval' }
}, {
title: '征求意见',
align: 'center',
width: 100,
fixed: 'right',
dataIndex: 'FILE_LIST20',
scopedSlots: { customRender: 'advice' }
}, {
title: '送审材料',
align: 'center',
width: 100,
fixed: 'right',
dataIndex: 'FILE_LIST30',
scopedSlots: { customRender: 'review-material' }
}
],
url: {
list: '/payResearchProject/payResearchProject/listForThree'
}
}
},
methods: {
loadData(arg) {
if (!this.url.list) {
this.$message.error('请设置url.list属性!')
return
}
//加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1
}
let params = this.getQueryParams()//查询条件
params.abbreviation = this.$route.query.abbreviation
this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.result.records
if (res.result.result.total) {
this.ipagination.total = res.result.result.total
} else {
this.ipagination.total = 0
}
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
}
if (res.code === 510) {
this.$message.warning(res.message)
}
this.loading = false
}).finally(() => {
this.loading = false
})
},
/**
* 查看立项文件
* @param record
*/
viewProjectApproval(record) {
this.$refs.filesModal.title = '立项文件'
this.$refs.filesModal.dataSource = record.FILE_LIST10
this.$refs.filesModal.visible = true
},
/**
* 查看征求意见
* @param record
*/
viewAdvice(record) {
this.$refs.filesModal.title = '征求意见'
this.$refs.filesModal.dataSource = record.FILE_LIST20
this.$refs.filesModal.visible = true
},
/**
* 查看送审材料
* @param record
*/
viewReviewMaterial(record) {
this.$refs.filesModal.title = '送审材料'
this.$refs.filesModal.dataSource = record.FILE_LIST30
this.$refs.filesModal.visible = true
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>