Commit c60a3d61 authored by wangxl's avatar wangxl

3333

parent 2764e4ab
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
}, },
//获取任务书状态 //获取任务书状态
getTaskStateList (params) { getTaskStateList (params) {
return fetch(`/v1/science-admin/com-project-test/getTaskStateList/`, params) return fetch(`/v1/science-admin/com-project-task/getTaskStateList/`, params)
}, },
//获取中期考核状态 //获取中期考核状态
getCheckStateList (params) { getCheckStateList (params) {
...@@ -502,25 +502,25 @@ export default { ...@@ -502,25 +502,25 @@ export default {
}, },
taskReport: { taskReport: {
getListByPage (params) { getListByPage (params) {
return fetch(`/v1/science-admin/com-project-test/getListByPage`, params) return fetch(`/v1/science-admin/com-project-task/getListByPage`, params)
}, },
getTestInfoByProjId (params) { getTestInfoByProjId (params) {
return fetch('/v1/science-admin/com-project-test/getTestInfoByProjId', params) return fetch('/v1/science-admin/com-project-task/getTestInfoByProjId', params)
}, },
save (params) { save (params) {
return fetch('/v1/science-admin/com-project-test/save', params, 'post', 'json') return fetch('/v1/science-admin/com-project-task/save', params, 'post', 'json')
}, },
report (params) { report (params) {
return fetch(`/v1/science-admin/com-project-test/report`, params, 'post', 'json') return fetch(`/v1/science-admin/com-project-task/report`, params, 'post', 'json')
}, },
getCount (params) { getCount (params) {
return fetch(`/v1/science-admin/com-project-test/getCount`, params) return fetch(`/v1/science-admin/com-project-task/getCount`, params)
}, },
asyncUploadTaskFile (params) { asyncUploadTaskFile (params) {
return fetch(`/v1/science-admin/com-project-test/asyncUploadTaskFile`, params, 'post', 'file') return fetch(`/v1/science-admin/com-project-task/asyncUploadTaskFile`, params, 'post', 'file')
}, },
deleteTaskFile (params) { deleteTaskFile (params) {
return fetch(`/v1/science-admin/com-project-test/deleteTaskFile/${params.id}`, params, 'delete', 'json') return fetch(`/v1/science-admin/com-project-task/deleteTaskFile/${params.id}`, params, 'delete', 'json')
}, },
}, },
checkReport: { checkReport: {
...@@ -563,7 +563,7 @@ export default { ...@@ -563,7 +563,7 @@ export default {
return fetch(`/v1/science-admin/com-project/audit`, params, 'post', 'json') return fetch(`/v1/science-admin/com-project/audit`, params, 'post', 'json')
}, },
testAudit (params) { testAudit (params) {
return fetch(`/v1/science-admin/com-project-test/audit`, params, 'post', 'json') return fetch(`/v1/science-admin/com-project-task/audit`, params, 'post', 'json')
}, },
checkAudit (params) { checkAudit (params) {
return fetch(`/v1/science-admin/com-project-check/audit`, params, 'post', 'json') return fetch(`/v1/science-admin/com-project-check/audit`, params, 'post', 'json')
......
...@@ -102,7 +102,7 @@ import scoreView from '@/views/evaluation/components/scoreView' ...@@ -102,7 +102,7 @@ import scoreView from '@/views/evaluation/components/scoreView'
export default { export default {
name: "projectFinal", name: "projectFinal",
components: { components: {
projectView, paraSelect, audit, unitTreeSelect, projectAssignDetail, taskFileInfo, scoreView, batchAudit projectView, paraSelect, audit, unitTreeSelect, projectAssignDetail, scoreView, batchAudit
}, },
data () { data () {
return { return {
...@@ -192,8 +192,6 @@ export default { ...@@ -192,8 +192,6 @@ export default {
id: null, id: null,
assignId: null, assignId: null,
objectId: null, objectId: null,
taskFileInfoView: false,
ProjId: null,
}; };
}, },
created () { created () {
...@@ -313,10 +311,7 @@ export default { ...@@ -313,10 +311,7 @@ export default {
} else if (type === 'evaluation') { } else if (type === 'evaluation') {
this.objectId = record.auditObjectId this.objectId = record.auditObjectId
this.assignInfoVisible = true this.assignInfoVisible = true
} else if (type === 'viewProjectTask') { } else if (type === 'eView') {
this.ProjId = record.auditObjectId
this.taskFileInfoView = true;
} else if (type === 'eView') {
this.assignId = record.id this.assignId = record.id
this.visibleEvaluationView = true this.visibleEvaluationView = true
} }
......
...@@ -153,17 +153,14 @@ export default { ...@@ -153,17 +153,14 @@ export default {
this.getListByPage() this.getListByPage()
}, },
getYear () { getYear () {
let pars = { type: 2 } this.$api.batch.getCurrentYearBatch({ type: 2, projType: getType(), timeType: 2 }).then(({ data = {} }) => {
this.$api.year.getYearByTreeCode(pars).then(({ data = {} }) => {
if (data) { if (data) {
this.isButten = data.disabled this.isButten = data.disabled
this.description = data.description this.description = data.description
this.searchForm.reportYear = data.reportYear this.searchForm.reportYear = data.year
this.getListByPage() this.getListByPage()
} }
}).catch(() => { }).catch(() => { })
this.loading = false
})
}, },
getListByPage () { getListByPage () {
this.getCount() this.getCount()
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<a-form-item> <a-form-item>
<base-select v-model="searchForm.projState" :title="'状态'" :type="1" :isAll="true" :width="160" /> <base-select v-model="searchForm.projState" :title="'状态'" :type="1" :isAll="true" :width="160" />
</a-form-item> </a-form-item>
<para-multi-select2 :typeId="6" />
<a-form-item> <a-form-item>
<a-button type="primary" icon="search" @click="search">搜索</a-button> <a-button type="primary" icon="search" @click="search">搜索</a-button>
<a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button>
...@@ -82,17 +81,6 @@ export default { ...@@ -82,17 +81,6 @@ export default {
created () { created () {
}, },
methods: { methods: {
search () {
this.pagination.pageIndex = 1
this.getListByPage()
},
reset () {
this.searchForm.projName = null
this.searchForm.projNo = null
this.searchForm.projState = ''
this.pagination.pageIndex = 1
this.getListByPage()
},
getListByPage () { getListByPage () {
this.loading = true this.loading = true
let pars = isEmptyParams(this.searchForm) let pars = isEmptyParams(this.searchForm)
...@@ -114,6 +102,17 @@ export default { ...@@ -114,6 +102,17 @@ export default {
this.loading = false this.loading = false
}) })
}, },
search () {
this.pagination.pageIndex = 1
this.getListByPage()
},
reset () {
this.searchForm.projName = null
this.searchForm.projNo = null
this.searchForm.projState = ''
this.pagination.pageIndex = 1
this.getListByPage()
},
change () { change () {
this.getListByPage() this.getListByPage()
}, },
......
<template> <template>
<div class="report" ref="report"> <div class="app-content">
<a-form class="search_form" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" :model="searchForm"> <a-form :form="form" :model="searchForm" ref="formRef" layout="inline" class="search_form">
<a-row> <a-form-item>
<a-col :span="6"> <a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 160px" />
<a-form-item label="项目名称"> </a-form-item>
<a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 272px" /> <a-form-item>
</a-form-item> <a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 160px" />
</a-col> </a-form-item>
<a-col :span="6"> <a-form-item>
<a-form-item label="项目编号"> <base-select v-model="searchForm.reportYear" :title="'年度'" :type="7" :isAll="true" :width="160" />
<a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 272px" /> </a-form-item>
</a-form-item> <a-form-item>
</a-col> <base-select v-model="searchForm.taskState" :title="'状态'" :type="2" :isAll="true" :width="160" />
<a-col :span="6"> </a-form-item>
<a-form-item label="项目类别"> <a-form-item>
<para-select v-model="searchForm.projClass" :typeId="52" /> <a-button type="primary" icon="search" @click="search">搜索</a-button>
</a-form-item> <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button>
</a-col> </a-form-item>
</a-row>
<a-row>
<a-col :span="6">
<a-form-item label="年度">
<base-select v-model="searchForm.reportYear" :type="4" :isAll="true" />
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="任务书状态">
<base-select v-model="searchForm.testState" :type="2" :isAll="true" />
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item>
<a-button type="primary" icon="search" @click="search">搜索</a-button>
<a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button>
</a-form-item>
</a-col>
</a-row>
</a-form> </a-form>
<a-row> <a-divider style="height: 1px; background-color: #e8e8e8;" />
<a-col :span="18"> <div class="submit-btn">
<a-button type="primary" @click="exportData">导出Excel</a-button> <a-button type="primary" @click="exportData" icon="download">Excel</a-button>
</a-col> </div>
</a-row>
<div style="margin-top: 8px;"></div>
<a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading"> <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading">
<template slot="testStateName" slot-scope="record"> <template slot="taskStateName" slot-scope="record">
<span v-if="record"> <span v-if="record">
{{record}} {{record}}
</span> </span>
...@@ -67,6 +46,7 @@ ...@@ -67,6 +46,7 @@
</template> </template>
<script> <script>
import { getType } from '@/views/utils/auth'
import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common"; import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common";
import TestEdit from "@/views/report/task/components/taskEdit.vue" import TestEdit from "@/views/report/task/components/taskEdit.vue"
import TestView from "@/views/report/task/components/taskView.vue" import TestView from "@/views/report/task/components/taskView.vue"
...@@ -79,26 +59,22 @@ export default { ...@@ -79,26 +59,22 @@ export default {
}, },
data () { data () {
return { return {
form: this.$form.createForm(this, { name: 'advanced_search' }),
// 表单 // 表单
searchForm: { projName: null, projNo: null, projClass: null, reportYear: null, testState: null }, searchForm: { projName: null, projNo: null, projClass: null, reportYear: null, taskState: null, projType: getType() },
tableData: [], tableData: [],
columns: [ columns: [
{ title: '项目名称', dataIndex: 'projName' }, { title: '项目名称', dataIndex: 'projName' },
{ title: '项目编号', dataIndex: 'projNo' }, { title: '项目编号', dataIndex: 'projNo' },
{ title: '版本号', dataIndex: 'versionNo' }, { title: '版本号', dataIndex: 'versionNo' },
{ title: '项目类别', dataIndex: 'projClassName' }, { title: '项目类别', dataIndex: 'projClassName' },
{ title: '任务书开始时间', dataIndex: 'startDate' }, { title: '开始时间', dataIndex: 'startDate' },
{ title: '任务书结束时间', dataIndex: 'endDate' }, { title: '结束时间', dataIndex: 'endDate' },
{ title: '申报年度', dataIndex: 'reportYear' }, { title: '申报年度', dataIndex: 'reportYear' },
{ title: '状态', dataIndex: 'testStateName', scopedSlots: { customRender: 'testStateName' }, width: '100px', }, { title: '状态', dataIndex: 'taskStateName', scopedSlots: { customRender: 'taskStateName' }, width: '100px', },
{ title: '操作', fixed: 'right', scopedSlots: { customRender: 'option' } } { title: '操作', fixed: 'right', scopedSlots: { customRender: 'option' } }
], ],
pagination: { pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, total: 0, pageSizeOptions: this.$defaultPageSizeOptions, },
pageIndex: 1,
pageSize: this.$defaultPageSize,
total: 0,
pageSizeOptions: this.$defaultPageSizeOptions,
},
loading: false, loading: false,
// 弹窗标志 // 弹窗标志
visibleView: false, visibleView: false,
...@@ -113,22 +89,10 @@ export default { ...@@ -113,22 +89,10 @@ export default {
this.getListByPage() this.getListByPage()
}, },
methods: { methods: {
search () {
this.pagination.pageIndex = 1
this.getListByPage()
},
reset () {
this.pagination.pageIndex = 1
this.getListByPage()
},
getListByPage () { getListByPage () {
this.loading = true this.loading = true
let pars = isEmptyParams(this.searchForm) let pars = isEmptyParams(this.searchForm)
let par = { let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
...pars,
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}
this.$api.taskReport.getListByPage(par).then(({ data = {} }) => { this.$api.taskReport.getListByPage(par).then(({ data = {} }) => {
if (data) { if (data) {
const { dataList = [], total = 0 } = data const { dataList = [], total = 0 } = data
...@@ -140,7 +104,16 @@ export default { ...@@ -140,7 +104,16 @@ export default {
this.loading = false this.loading = false
}) })
}, },
submitForm () { search () {
this.pagination.pageIndex = 1
this.getListByPage()
},
reset () {
this.searchForm.projName = null
this.searchForm.projNo = null
this.searchForm.taskState = ''
this.pagination.pageIndex = 1
this.getListByPage()
}, },
change () { change () {
this.getListByPage() this.getListByPage()
......
...@@ -17,34 +17,36 @@ ...@@ -17,34 +17,36 @@
<btn-group :data="tabDate" :itemCount="itemCount" v-model="activekey" @change="callback" /> <btn-group :data="tabDate" :itemCount="itemCount" v-model="activekey" @change="callback" />
</div> </div>
<div style="display: inline-block;;width:50%;text-align: right;"> <div style="display: inline-block;;width:50%;text-align: right;">
<a-button type="primary" style="margin-right:8px;" v-if="isButten" @click="createProject">新建项目</a-button>
<a-button type="primary" @click="exportData" icon="download">Excel</a-button> <a-button type="primary" @click="exportData" icon="download">Excel</a-button>
</div> </div>
</div> </div>
<a-divider style="height: 1px; background-color: #e8e8e8;" /> <a-divider style="height: 1px; background-color: #e8e8e8;" />
<span class="form-description"> ※填报时间:{{ description }}</span> <span class="form-description"> ※填报时间:{{ description }}</span>
<a-table :dataSource="tableData" :columns="columns" rowKey="projId" :pagination="false" :loading="loading" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"> <!-- <a-table :dataSource="tableData" :columns="columns" rowKey="projId" :pagination="false" :loading="loading" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"> -->
<template slot="testStateName" slot-scope="record"> <a-table :dataSource="tableData" :columns="columns" :scroll="{ x: 'max-content' }" rowKey="projId" :pagination="false" :loading="loading">
<template slot="taskStateName" slot-scope="record">
<span v-if="record">{{record}}</span> <span v-if="record">{{record}}</span>
<span v-else>未填写</span> <span v-else>未填写</span>
</template> </template>
<template slot="option" slot-scope="record"> <template slot="option" slot-scope="record">
<a-button type="link" size="small" v-if="record.testState" @click="recordClick(record,'view')">查看</a-button> <a-button type="link" size="small" v-if="record.taskState!=0" @click="recordClick(record,'view')">查看</a-button>
<a-button type="primary" size="small" v-if="((record.testState==-20||record.testState==-10||record.testState==30)&&isButten)" @click="recordClick(record,'edit')">修改</a-button> <a-button type="link" size="small" v-if="(record.taskState==0 && isButten)" @click="recordClick(record,'create')">填写</a-button>
<a-button type="primary" size="small" v-if="((record.testState==-10||record.testState==30)&&isButten)" @click="recordClick(record,'report')">上报</a-button> <a-button type="link" size="small" v-if="((record.taskState==-10||record.taskState==10||record.taskState==30))" @click="recordClick(record,'edit')">修改</a-button>
<a-button type="link" size="small" v-if="((record.taskState==10||record.taskState==30))" @click="recordClick(record,'report')">上报</a-button>
</template> </template>
</a-table> </a-table>
<a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" />
<a-modal v-model="visibleEdit" :title="'创建/修改'" :width="'80%'" :dialog-style="{ top: '5%' }" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal" :centered="true"> <a-modal v-model="visibleEdit" :title="'创建/修改'" :width="'80%'" :dialog-style="{ top: '5%' }" :maskClosable="false" :footer="null" destroyOnClose :centered="true">
<task-edit v-model="projId" @close="closeWindow" /> <task-edit v-model="projId" @close="closeWindow" />
</a-modal> </a-modal>
<a-modal v-model="visibleView" title="查看合同书" :width="'80%'" :dialog-style="{ top: '5%' }" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> <a-modal v-model="visibleView" title="查看合同书" :width="'80%'" :dialog-style="{ top: '5%' }" :maskClosable="false" :footer="null" destroyOnClose>
<task-view v-model="projId" @close="closeWindow" /> <task-view v-model="projId" @close="closeWindow" />
</a-modal> </a-modal>
</div> </div>
</template> </template>
<script> <script>
import { getType } from '@/views/utils/auth'
import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common"; import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common";
import taskEdit from "@/views/report/task/components/taskEdit.vue" import taskEdit from "@/views/report/task/components/taskEdit.vue"
import taskView from "@/views/report/task/components/taskView.vue" import taskView from "@/views/report/task/components/taskView.vue"
...@@ -66,16 +68,16 @@ export default { ...@@ -66,16 +68,16 @@ export default {
], ],
itemCount: [0, 0, 0, 0, 0], itemCount: [0, 0, 0, 0, 0],
form: this.$form.createForm(this, { name: 'advanced_search' }), form: this.$form.createForm(this, { name: 'advanced_search' }),
searchForm: { projName: '', projNo: '', testState: '1', reportYear: null }, searchForm: { projName: '', projNo: '', taskState: '1', reportYear: null },
tableData: [], tableData: [],
columns: [ columns: [
{ title: '项目名称', dataIndex: 'projName' }, { title: '项目名称', dataIndex: 'projName', align: 'center' },
{ title: '项目编号', dataIndex: 'projNo' }, { title: '项目编号', dataIndex: 'projNo', align: 'center' },
{ title: '开始时间', dataIndex: 'startDate', tabKey: '1' }, { title: '开始时间', dataIndex: 'startDate', align: 'center' },
{ title: '结束时间', dataIndex: 'endDate', tabKey: '1' }, { title: '结束时间', dataIndex: 'endDate', align: 'center' },
{ title: '申报年度', dataIndex: 'reportYear' }, { title: '申报年度', dataIndex: 'reportYear', align: 'center' },
{ title: '状态', dataIndex: 'testStateName', scopedSlots: { customRender: 'testStateName' } }, { title: '状态', dataIndex: 'taskStateName', scopedSlots: { customRender: 'taskStateName' }, align: 'center' },
{ title: '操作', fixed: 'right', width: '200px', scopedSlots: { customRender: 'option' } } { title: '操作', fixed: 'right', width: '200px', scopedSlots: { customRender: 'option' }, align: 'center' }
], ],
pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, total: 0, pageSizeOptions: this.$defaultPageSizeOptions, }, pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, total: 0, pageSizeOptions: this.$defaultPageSizeOptions, },
loading: false, loading: false,
...@@ -94,17 +96,14 @@ export default { ...@@ -94,17 +96,14 @@ export default {
}, },
methods: { methods: {
getYear () { getYear () {
let pars = { type: 2 } this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 2 }).then(({ data = {} }) => {
this.$api.year.getYearByTreeCode(pars).then(({ data = {} }) => {
if (data) { if (data) {
this.isButten = data.disabled this.isButten = data.disabled
this.description = data.description this.description = data.description
this.searchForm.reportYear = data.reportYear this.searchForm.reportYear = data.year
this.getListByPage() this.getListByPage()
} }
}).catch(() => { }).catch(() => { })
this.loading = false
})
}, },
getListByPage () { getListByPage () {
this.getCount() this.getCount()
...@@ -155,6 +154,9 @@ export default { ...@@ -155,6 +154,9 @@ export default {
if (type === 'view') { if (type === 'view') {
this.projId = record.projId this.projId = record.projId
this.visibleView = true this.visibleView = true
} else if (type === 'create') {
this.projId = record.projId
this.visibleEdit = true
} else if (type === 'edit') { } else if (type === 'edit') {
this.projId = record.projId this.projId = record.projId
this.visibleEdit = true this.visibleEdit = true
...@@ -179,7 +181,7 @@ export default { ...@@ -179,7 +181,7 @@ export default {
this.visibleView = false this.visibleView = false
}, },
callback (key) { callback (key) {
this.searchForm.testState = key; this.searchForm.taskState = key;
this.getListByPage() this.getListByPage()
}, },
exportData () { exportData () {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</a-col> </a-col>
<a-col :span="6"> <a-col :span="6">
<a-form-item label="任务书状态"> <a-form-item label="任务书状态">
<base-select v-model="searchForm.testState" :type="2" :isAll="true" /> <base-select v-model="searchForm.taskState" :type="2" :isAll="true" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</a-row> </a-row>
<div style="margin-top: 8px;"></div> <div style="margin-top: 8px;"></div>
<a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading"> <a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading">
<template slot="testStateName" slot-scope="record"> <template slot="taskStateName" slot-scope="record">
<span v-if="record"> <span v-if="record">
{{record}} {{record}}
</span> </span>
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
appUnitName: null, appUnitName: null,
appPersonName: null, appPersonName: null,
reportYear: null, reportYear: null,
testState: null, taskState: null,
auditType: 2 auditType: 2
}, },
tableData: [], tableData: [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment