Commit f2a853c9 authored by wangxl's avatar wangxl

44

parent 3aaba57b
......@@ -139,10 +139,10 @@ export default {
getUnitTypes () {
return fetch('/v1/science-admin/com-unit/getUnitType')
},
getAppUnitInfo() {
getAppUnitInfo () {
return fetch('/v1/science-admin/com-unit/getAppUnitInfo')
},
getCurrentUnitInfo() {
getCurrentUnitInfo () {
return fetch('/v1/science-admin/com-unit/getCurrentUnitInfo')
},
getUnitById (params) {
......@@ -550,6 +550,9 @@ export default {
getFinalAuditListByPage (params) {
return fetch(`/v1/science-admin/com_project_audit/getFinalAuditListByPage`, params)
},
projectBatchAudit (params) {
return fetch(`/v1/science-admin/com-project/batchAudit`, params, 'post', 'json')
},
projectAudit (params) {
return fetch(`/v1/science-admin/com-project/audit`, params, 'post', 'json')
},
......@@ -817,16 +820,16 @@ export default {
refreshSystemParameter () {
return fetch('/v1/science-admin/system-parameter/refreshSystemParameter')
},
getParameterListBySystemCode(params) {
getParameterListBySystemCode (params) {
return fetch(`/v1/science-admin/system-parameter/getParameterListBySystemCode`, params)
},
getKnowledgeInfoList1() {
getKnowledgeInfoList1 () {
return fetch(`/v1/science-admin/system-parameter/getKnowledgeInfoList1`)
},
getKnowledgeInfoList2() {
getKnowledgeInfoList2 () {
return fetch(`/v1/science-admin/system-parameter/getKnowledgeInfoList2`)
},
getSpecArray() {
getSpecArray () {
return fetch(`/v1/science-admin/system-parameter/getSpecArray`)
},
},
......
......@@ -23,7 +23,7 @@
<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" @click="batchAudit" style="margin-right: 8px;">批量审核</a-button> -->
<a-button type="primary" @click="batchAudit" style="margin-right: 8px;" v-if="isBatchButten">批量审核</a-button>
<a-button type="primary" @click="exportData" icon="download">Excel</a-button>
</div>
</div>
......@@ -49,7 +49,7 @@
<audit v-model="id" :objId="objectId" @close="closeWindow" @changeScroll="() => {this.$refs.s_modal.changeScroll()}"></audit>
</a-modal>
<a-modal v-model="visibleBatch" v-if="visibleBatch" title="批量审核" :footer="null" width="700px" :dialog-style="{ top: '15%' }" destroyOnClose :maskClosable="false">
<batch-audit v-model="id" :objId="objectId" @close="closeWindow" />
<batch-audit :idList="selectedRowKeys" @close="closeWindow" />
</a-modal>
<a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<project-view v-model="objectId" @close="closeWindow"></project-view>
......@@ -127,6 +127,7 @@ export default {
visibleAudit: false,
visibleView: false,
visibleBatch: false,
isBatchButten: true,
isButten: false,
description: '',
id: null,
......@@ -140,12 +141,15 @@ export default {
},
methods: {
onSelectChange (selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
},
batchAudit () {
console.log('selectedRowKeys changed: ', this.selectedRowKeys);
if (!!this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.visibleBatch = true
}
else
this.$message.error('请选择项目!')
},
search () {
this.pagination.pageIndex = 1
......@@ -211,12 +215,19 @@ export default {
closeWindow (value) {
if (value === 'audit') {
this.getListByPage()
this.id = null
this.objectId = null
this.selectedRowKeys = []
this.visibleView = false
this.visibleAudit = false
this.visibleBatch = false
} else if (value === 'error') {
this.id = null
this.objectId = null
this.visibleAudit = false
this.selectedRowKeys = []
this.visibleView = false
this.visibleAudit = false
this.visibleBatch = false
}
},
recordClick (record, type) {
......@@ -233,6 +244,10 @@ export default {
}
},
callback (key) {
if (key == '1') {
this.isBatchButten = true
} else
this.isBatchButten = false
this.searchForm.auditResult = key;
this.getListByPage()
},
......
......@@ -24,7 +24,7 @@ export default {
},
data () {
return {
auditObj: { id: this.value, auditObjectId: this.objId, auditResult: null, auditType: 1, auditContent: '' },
auditObj: { id: null, auditObjectId: null, auditResult: null, auditType: 1, auditContent: '', idList: this.idList },
rules: {
auditContent: { required: true, message: '请填写审核意见', trigger: 'blur' },
auditResult: { required: true, message: '请选择审核结果', trigger: 'change' },
......@@ -33,16 +33,10 @@ export default {
};
},
props: {
value: {
type: String,
default: () => {
return null
}
},
objId: {
type: String,
idList: {
type: Array,
default () {
return null
return []
}
},
},
......@@ -53,20 +47,16 @@ export default {
submit () {
this.$refs.form.validate(valid => {
if (valid) {
// this.loading = true
// let pars = isEmptyParams(this.auditObj)
// let par = { ...pars }
// this.$api.auditManager.projectBatchAudit(par).then(({ data = {} }) => {
// if (data) {
// if (data === '项目上报已经到达上限!') {
// this.$message.info('项目上报已经到达上限!')
// } else {
// this.$message.success('审核成功!')
// this.$emit('close', 'audit')
// }
// }
// this.loading = false
// }).catch(() => { this.loading = false })
this.loading = true
let pars = isEmptyParams(this.auditObj)
let par = { ...pars }
this.$api.auditManager.projectBatchAudit(par).then(({ data = {} }) => {
if (data) {
this.$message.success('审核成功!')
this.$emit('close', 'audit')
}
this.loading = false
}).catch(() => { this.loading = false })
} else {
this.$message.error('请选择审核结果或填写审核意见!')
return false
......
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