Commit 91cf8f7c authored by wangxl's avatar wangxl

9999

parent d379340e
......@@ -450,9 +450,6 @@ export default {
projectImport (params) {
return fetch('/v1/science-admin/com-project/projectImport', params, 'post', 'json')
},
getProjectBasicInfoById (params) {
return fetch(`/v1/science-admin/com-project/getProjectBasicInfoById/`, params)
},
},
conclusion: {
getConclusionByProjId (params) {
......@@ -497,12 +494,12 @@ export default {
return fetch(`/v1/science-admin/com-conclusion-thesis/getListByPage`, params)
},
},
taskReport: {
task: {
getListByPage (params) {
return fetch(`/v1/science-admin/com-project-task/getListByPage`, params)
},
getTestInfoByProjId (params) {
return fetch('/v1/science-admin/com-project-task/getTestInfoByProjId', params)
getTaskByProjId (params) {
return fetch('/v1/science-admin/com-project-task/getTaskByProjId', params)
},
save (params) {
return fetch('/v1/science-admin/com-project-task/save', params, 'post', 'json')
......@@ -513,12 +510,6 @@ export default {
getCount (params) {
return fetch(`/v1/science-admin/com-project-task/getCount`, params)
},
asyncUploadTaskFile (params) {
return fetch(`/v1/science-admin/com-project-task/asyncUploadTaskFile`, params, 'post', 'file')
},
deleteTaskFile (params) {
return fetch(`/v1/science-admin/com-project-task/deleteTaskFile/${params.id}`, params, 'delete', 'json')
},
},
checkReport: {
getListByPage (params) {
......
......@@ -116,7 +116,7 @@ export default {
methods: {
getTestInfoByProjId () {
let pars = { projId: this.projId }
this.$api.taskReport.getTestInfoByProjId(pars).then(({ data = {} }) => {
this.$api.task.getTestInfoByProjId(pars).then(({ data = {} }) => {
if (data) {
this.testInfo = data
}
......
......@@ -81,7 +81,7 @@ export default {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
this.$api.taskReport.getListByPage(par).then(({ data = {} }) => {
this.$api.task.getListByPage(par).then(({ data = {} }) => {
if (data) {
const { dataList = [], total = 0 } = data
this.tableData = dataList
......
......@@ -109,7 +109,7 @@ export default {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
this.$api.taskReport.getListByPage(par).then(({ data = {} }) => {
this.$api.task.getListByPage(par).then(({ data = {} }) => {
if (data) {
const { dataList = [], total = 0 } = data
this.tableData = dataList
......@@ -122,7 +122,7 @@ export default {
},
getCount () {
let pars = isEmptyParams({ reportYear: this.searchForm.reportYear });
this.$api.taskReport.getCount(pars).then(({ data = {} }) => {
this.$api.task.getCount(pars).then(({ data = {} }) => {
if (data) {
this.itemCount = [data.count1, data.count2, data.count3, data.count4, data.count5]
}
......@@ -161,7 +161,7 @@ export default {
this.visibleEdit = true
} else {
let par = { auditObjectId: record.id, auditType: 2 }
this.$api.taskReport.report(par).then(({ data = {} }) => {
this.$api.task.report(par).then(({ data = {} }) => {
if (data) {
this.$message.success('上报成功!')
this.getListByPage()
......
......@@ -2,47 +2,27 @@
<template>
<div class="app-content" style="height: 76vh;overflow: auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<div class="page-steps">
<a-steps size="small" :current="current" @change="onChange">
<a-step :status="item.status" v-for="(item,index) in stepsArray" :key="index+'stepsArray'" :title="item.title" />
</a-steps>
</div>
<div class="page-content">
<task-edit v-model="value" @close="closeWindow" @load="onLoad" @onStepChange="onStepChange" :completeStatus.sync=completeStatus :stepsArray.sync="stepsArray" ref="projCreate" />
<task-edit v-model="value" @close="closeWindow" @load="onLoad" ref="taskCreate" />
</div>
<div class="page-footer">
<a-button v-if="currSteps > 0" style="margin-left: 40px" type="primary" @click="prev">上一步</a-button>
<a-button style="margin-left: 40px" type="primary" @click="save">保 存</a-button>
<a-button v-if="currSteps < stepsArray.length - 1" style="margin-left: 40px" type="primary" @click="next">下一步</a-button>
<a-button v-if="currSteps == stepsArray.length - 1" style="margin-left: 40px" type="primary" @click="submit">完成填写</a-button>
<a-button type="primary" @click="save">保 存</a-button>
<a-button type="primary" style="margin-left: 40px" @click="submit">完成填写</a-button>
</div>
</a-spin>
</div>
</template>
<script>
import { getType } from '@/views/utils/auth'
import taskEdit from "@/views/report/task/components/taskEdit"
export default {
name: "projectCreate",
name: "taskCreate",
components: {
taskEdit,
},
data () {
return {
loading: false,
projType: getType() == "1",
current: 10,
currSteps: 0,
stepsArray: [
{ status: "process", title: '基本信息', showStatus: true },
{ status: "wait", title: '项目组成员及单位', showStatus: false },
{ status: "wait", title: '经费预算及设备明细', showStatus: false },
{ status: "wait", title: '阶段目标及课题设置', showStatus: false },
{ status: "wait", title: '绩效指标', showStatus: false },
{ status: "wait", title: '附件', showStatus: false }
],
completeStatus: "0,0,0,0,0,0"
}
},
props: {
......@@ -56,62 +36,11 @@ export default {
created () {
},
methods: {
stepsChange (e) {
debugger
this.currSteps = e
this.changeSteps(this.currSteps)
},
next () {
this.$refs.projCreate.submit(this.currSteps, true)
},
prev () {
this.currSteps--;
this.changeSteps(this.currSteps)
},
onChange (e) {
if (e != this.currSteps) {
var arr = this.completeStatus.split(',')
if (arr[e] == "1") {
this.loading = true
this.changeSteps(e)
this.loading = false
} else {
this.$message.error('所选步骤没填写完成,请填写当前步骤后点【下一步】跳转!')
}
}
},
onStepChange (e) {
this.completeStatus = e.state
this.changeSteps(e.step)
},
changeSteps (e) {
this.currSteps = e
var clone = [].concat(this.stepsArray)
clone.forEach(e => {
e.showStatus = false
})
clone[e].showStatus = true;
this.stepsArray = clone
this.getCompleteStatus(e, this.completeStatus)
},
getCompleteStatus (step, completeStatus) {
var arr = completeStatus.split(',')
if (!!arr && arr.length > 0) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] == "1") {
this.stepsArray[i].status = "finish"
} else {
this.stepsArray[i].status = "wait"
}
}
this.stepsArray[step].status = "process"
}
},
save () {
this.$refs.projCreate.save(this.currSteps)
this.$refs.taskCreate.save()
},
submit () {
this.$refs.projCreate.submit(this.currSteps, false)
this.$refs.taskCreate.submit()
},
closeWindow (value) {
this.$emit('close', value)
......@@ -131,16 +60,9 @@ export default {
width: 8px;
height: 6px;
}
.page-steps {
width: 100%;
height: 40px;
padding: 8px 20px 5px 20px;
background: rgb(248, 248, 248);
border: 1px 1px 0px 1px solid #e8e8e8;
}
.page-content {
width: 100%;
height: calc(100% - 80px);
height: calc(100% - 40px);
overflow: auto;
}
.page-footer {
......
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