Commit f2a853c9 authored by wangxl's avatar wangxl

44

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