Commit 980cefa4 authored by 徐俊's avatar 徐俊

xujun

parent 5b07a31f
......@@ -43,8 +43,11 @@
<template slot="projName" slot-scope="record">
<a @click="recordClick(record, 'view')">{{record.projName}}</a>
</template>
<template slot="defenseInfo" slot-scope="record">
<editable-cell :text="record.defenseScore" @change="onCellChange(record.id, 'defenseScore', $event)" />
<template slot="defenseTechnologyInfo" slot-scope="record">
<editable-cell :text="record.defenseTechnologyScore" @change="onCellChange(record.id, 'defenseTechnologyScore', $event)" />
</template>
<template slot="defenseEconomyInfo" slot-scope="record">
<editable-cell :text="record.defenseEconomyScore" @change="onCellChange(record.id, 'defenseEconomyScore', $event)" />
</template>
<template slot="auditResultName" slot-scope="record">
<span v-if="record">
......@@ -173,9 +176,11 @@ export default {
],
itemCount: [0, 0, 0, 0, 0],
columns: [
{ title: "项目名称", scopedSlots: { customRender: 'projName' }, ellipsis: true, width: 300 },
{ title: "项目编号", dataIndex: "projNo", align: 'center' },
{ title: "答辩分数", scopedSlots: { customRender: 'defenseInfo' }, align: 'center', width: 150 },
{ title: "项目名称", scopedSlots: { customRender: 'projName' }, ellipsis: true, width: 300 },
{ title: "答辩技术专家评分", scopedSlots: { customRender: 'defenseTechnologyInfo' }, align: 'center', width: 150 },
{ title: "答辩账务专家评分", scopedSlots: { customRender: 'defenseEconomyInfo' }, align: 'center', width: 150 },
{ title: "答辩分数", dataIndex: "defenseScore", align: 'center', width: 150 },
{ title: "项目类别", dataIndex: 'projClassName' , align: 'center' },
{ title: '申报单位', dataIndex: 'appUnitName', align: 'center' },
{ title: '申报人', dataIndex: 'appPersonName', align: 'center' },
......@@ -195,8 +200,10 @@ export default {
{ title: '操作', scopedSlots: { customRender: 'option' }, align: 'center', fixed: 'right', width: 120, },
],
excelCol: [
{ title: "项目名称", scopedSlots: { customRender: 'projName' } },
{ title: "项目编号", dataIndex: "projNo", align: 'center' },
{ title: "项目名称", scopedSlots: { customRender: 'projName' } },
{ title: "答辩技术专家评分", dataIndex: 'defenseTechnologyScore', align: 'center' },
{ title: "答辩账务专家评分", dataIndex: 'defenseEconomyScore', align: 'center' },
{ title: "答辩分数", dataIndex: "defenseScore", align: 'center' },
{ title: "项目类别", dataIndex: 'projClassName', align: 'center' },
{ title: '申报单位', dataIndex: 'appUnitName', align: 'center' },
......@@ -408,11 +415,21 @@ export default {
onCellChange(key, dataIndex, value) {
const target = this.tableData.find(item => item.id === key);
if (target) {
target[dataIndex] = value;
// 调用API更新数据
target[dataIndex] = value
let defenseTechScore
let defenseEconScore
if (dataIndex === 'defenseTechnologyScore') {
defenseTechScore = value
defenseEconScore = target['defenseEconomyScore']
} else {
defenseTechScore = target['defenseTechnologyScore']
defenseEconScore = value
}
this.$api.project.updateDefenseScore({
id: target.projId,
defenseScore: value
defenseTechnologyScore: defenseTechScore,
defenseEconomyScore: defenseEconScore,
}).then(() => {
this.$message.success('答辩分数更新成功')
this.getListByPage()
......
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