Commit c60a3d61 authored by wangxl's avatar wangxl

3333

parent 2764e4ab
......@@ -50,7 +50,7 @@ export default {
},
//获取任务书状态
getTaskStateList (params) {
return fetch(`/v1/science-admin/com-project-test/getTaskStateList/`, params)
return fetch(`/v1/science-admin/com-project-task/getTaskStateList/`, params)
},
//获取中期考核状态
getCheckStateList (params) {
......@@ -502,25 +502,25 @@ export default {
},
taskReport: {
getListByPage (params) {
return fetch(`/v1/science-admin/com-project-test/getListByPage`, params)
return fetch(`/v1/science-admin/com-project-task/getListByPage`, 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) {
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) {
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) {
return fetch(`/v1/science-admin/com-project-test/getCount`, params)
return fetch(`/v1/science-admin/com-project-task/getCount`, 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) {
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: {
......@@ -563,7 +563,7 @@ export default {
return fetch(`/v1/science-admin/com-project/audit`, params, 'post', 'json')
},
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) {
return fetch(`/v1/science-admin/com-project-check/audit`, params, 'post', 'json')
......
......@@ -102,7 +102,7 @@ import scoreView from '@/views/evaluation/components/scoreView'
export default {
name: "projectFinal",
components: {
projectView, paraSelect, audit, unitTreeSelect, projectAssignDetail, taskFileInfo, scoreView, batchAudit
projectView, paraSelect, audit, unitTreeSelect, projectAssignDetail, scoreView, batchAudit
},
data () {
return {
......@@ -192,8 +192,6 @@ export default {
id: null,
assignId: null,
objectId: null,
taskFileInfoView: false,
ProjId: null,
};
},
created () {
......@@ -313,9 +311,6 @@ export default {
} else if (type === 'evaluation') {
this.objectId = record.auditObjectId
this.assignInfoVisible = true
} else if (type === 'viewProjectTask') {
this.ProjId = record.auditObjectId
this.taskFileInfoView = true;
} else if (type === 'eView') {
this.assignId = record.id
this.visibleEvaluationView = true
......
......@@ -153,17 +153,14 @@ export default {
this.getListByPage()
},
getYear () {
let pars = { type: 2 }
this.$api.year.getYearByTreeCode(pars).then(({ data = {} }) => {
this.$api.batch.getCurrentYearBatch({ type: 2, projType: getType(), timeType: 2 }).then(({ data = {} }) => {
if (data) {
this.isButten = data.disabled
this.description = data.description
this.searchForm.reportYear = data.reportYear
this.searchForm.reportYear = data.year
this.getListByPage()
}
}).catch(() => {
this.loading = false
})
}).catch(() => { })
},
getListByPage () {
this.getCount()
......
......@@ -13,7 +13,6 @@
<a-form-item>
<base-select v-model="searchForm.projState" :title="'状态'" :type="1" :isAll="true" :width="160" />
</a-form-item>
<para-multi-select2 :typeId="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>
......@@ -82,17 +81,6 @@ export default {
created () {
},
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 () {
this.loading = true
let pars = isEmptyParams(this.searchForm)
......@@ -114,6 +102,17 @@ export default {
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 () {
this.getListByPage()
},
......
<template>
<div class="report" ref="report">
<a-form class="search_form" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" :model="searchForm">
<a-row>
<a-col :span="6">
<a-form-item label="项目名称">
<a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 272px" />
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="项目编号">
<a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 272px" />
<div class="app-content">
<a-form :form="form" :model="searchForm" ref="formRef" layout="inline" class="search_form">
<a-form-item>
<a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 160px" />
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="项目类别">
<para-select v-model="searchForm.projClass" :typeId="52" />
<a-form-item>
<a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 160px" />
</a-form-item>
</a-col>
</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>
<base-select v-model="searchForm.reportYear" :title="'年度'" :type="7" :isAll="true" :width="160" />
</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>
<base-select v-model="searchForm.taskState" :title="'状态'" :type="2" :isAll="true" :width="160" />
</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-row>
<a-col :span="18">
<a-button type="primary" @click="exportData">导出Excel</a-button>
</a-col>
</a-row>
<div style="margin-top: 8px;"></div>
<a-divider style="height: 1px; background-color: #e8e8e8;" />
<div class="submit-btn">
<a-button type="primary" @click="exportData" icon="download">Excel</a-button>
</div>
<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">
{{record}}
</span>
......@@ -67,6 +46,7 @@
</template>
<script>
import { getType } from '@/views/utils/auth'
import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common";
import TestEdit from "@/views/report/task/components/taskEdit.vue"
import TestView from "@/views/report/task/components/taskView.vue"
......@@ -79,26 +59,22 @@ export default {
},
data () {
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: [],
columns: [
{ title: '项目名称', dataIndex: 'projName' },
{ title: '项目编号', dataIndex: 'projNo' },
{ title: '版本号', dataIndex: 'versionNo' },
{ title: '项目类别', dataIndex: 'projClassName' },
{ title: '任务书开始时间', dataIndex: 'startDate' },
{ title: '任务书结束时间', dataIndex: 'endDate' },
{ title: '开始时间', dataIndex: 'startDate' },
{ title: '结束时间', dataIndex: 'endDate' },
{ 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' } }
],
pagination: {
pageIndex: 1,
pageSize: this.$defaultPageSize,
total: 0,
pageSizeOptions: this.$defaultPageSizeOptions,
},
pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, total: 0, pageSizeOptions: this.$defaultPageSizeOptions, },
loading: false,
// 弹窗标志
visibleView: false,
......@@ -113,22 +89,10 @@ export default {
this.getListByPage()
},
methods: {
search () {
this.pagination.pageIndex = 1
this.getListByPage()
},
reset () {
this.pagination.pageIndex = 1
this.getListByPage()
},
getListByPage () {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = {
...pars,
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}
let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
this.$api.taskReport.getListByPage(par).then(({ data = {} }) => {
if (data) {
const { dataList = [], total = 0 } = data
......@@ -140,7 +104,16 @@ export default {
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 () {
this.getListByPage()
......
......@@ -17,34 +17,36 @@
<btn-group :data="tabDate" :itemCount="itemCount" v-model="activekey" @change="callback" />
</div>
<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>
</div>
</div>
<a-divider style="height: 1px; background-color: #e8e8e8;" />
<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' }">
<template slot="testStateName" slot-scope="record">
<!-- <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" :scroll="{ x: 'max-content' }" rowKey="projId" :pagination="false" :loading="loading">
<template slot="taskStateName" slot-scope="record">
<span v-if="record">{{record}}</span>
<span v-else>未填写</span>
</template>
<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="primary" size="small" v-if="((record.testState==-20||record.testState==-10||record.testState==30)&&isButten)" @click="recordClick(record,'edit')">修改</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!=0" @click="recordClick(record,'view')">查看</a-button>
<a-button type="link" size="small" v-if="(record.taskState==0 && isButten)" @click="recordClick(record,'create')">填写</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>
</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-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" />
</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" />
</a-modal>
</div>
</template>
<script>
import { getType } from '@/views/utils/auth'
import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common";
import taskEdit from "@/views/report/task/components/taskEdit.vue"
import taskView from "@/views/report/task/components/taskView.vue"
......@@ -66,16 +68,16 @@ export default {
],
itemCount: [0, 0, 0, 0, 0],
form: this.$form.createForm(this, { name: 'advanced_search' }),
searchForm: { projName: '', projNo: '', testState: '1', reportYear: null },
searchForm: { projName: '', projNo: '', taskState: '1', reportYear: null },
tableData: [],
columns: [
{ title: '项目名称', dataIndex: 'projName' },
{ title: '项目编号', dataIndex: 'projNo' },
{ title: '开始时间', dataIndex: 'startDate', tabKey: '1' },
{ title: '结束时间', dataIndex: 'endDate', tabKey: '1' },
{ title: '申报年度', dataIndex: 'reportYear' },
{ title: '状态', dataIndex: 'testStateName', scopedSlots: { customRender: 'testStateName' } },
{ title: '操作', fixed: 'right', width: '200px', scopedSlots: { customRender: 'option' } }
{ title: '项目名称', dataIndex: 'projName', align: 'center' },
{ title: '项目编号', dataIndex: 'projNo', align: 'center' },
{ title: '开始时间', dataIndex: 'startDate', align: 'center' },
{ title: '结束时间', dataIndex: 'endDate', align: 'center' },
{ title: '申报年度', dataIndex: 'reportYear', align: 'center' },
{ title: '状态', dataIndex: 'taskStateName', scopedSlots: { customRender: 'taskStateName' }, align: 'center' },
{ title: '操作', fixed: 'right', width: '200px', scopedSlots: { customRender: 'option' }, align: 'center' }
],
pagination: { pageIndex: 1, pageSize: this.$defaultPageSize, total: 0, pageSizeOptions: this.$defaultPageSizeOptions, },
loading: false,
......@@ -94,17 +96,14 @@ export default {
},
methods: {
getYear () {
let pars = { type: 2 }
this.$api.year.getYearByTreeCode(pars).then(({ data = {} }) => {
this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType(), timeType: 2 }).then(({ data = {} }) => {
if (data) {
this.isButten = data.disabled
this.description = data.description
this.searchForm.reportYear = data.reportYear
this.searchForm.reportYear = data.year
this.getListByPage()
}
}).catch(() => {
this.loading = false
})
}).catch(() => { })
},
getListByPage () {
this.getCount()
......@@ -155,6 +154,9 @@ export default {
if (type === 'view') {
this.projId = record.projId
this.visibleView = true
} else if (type === 'create') {
this.projId = record.projId
this.visibleEdit = true
} else if (type === 'edit') {
this.projId = record.projId
this.visibleEdit = true
......@@ -179,7 +181,7 @@ export default {
this.visibleView = false
},
callback (key) {
this.searchForm.testState = key;
this.searchForm.taskState = key;
this.getListByPage()
},
exportData () {
......
......@@ -19,7 +19,7 @@
</a-col>
<a-col :span="6">
<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-col>
</a-row>
......@@ -54,7 +54,7 @@
</a-row>
<div style="margin-top: 8px;"></div>
<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">
{{record}}
</span>
......@@ -97,7 +97,7 @@ export default {
appUnitName: null,
appPersonName: null,
reportYear: null,
testState: null,
taskState: null,
auditType: 2
},
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