|
|
|
@ -1,39 +1,53 @@ |
|
|
|
|
<template> |
|
|
|
|
<div ref="main" class="main"> |
|
|
|
|
<div ref="main" |
|
|
|
|
class="main"> |
|
|
|
|
<el-form :disabled="isDetail"> |
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<div class="flex-between"> |
|
|
|
|
<el-page-header @back="back" content="项目配置"></el-page-header> |
|
|
|
|
<el-page-header @back="back" |
|
|
|
|
content="项目配置"></el-page-header> |
|
|
|
|
<div v-if="!isDetail"> |
|
|
|
|
<el-button type="success" @click="save(0)">保存为草稿</el-button> |
|
|
|
|
<el-button type="primary" @click="save(1)">确定并发布</el-button> |
|
|
|
|
<el-button type="success" |
|
|
|
|
@click="save(0)">保存为草稿</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="save(1)">确定并发布</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<h6 class="p-title">基本信息</h6> |
|
|
|
|
<div> |
|
|
|
|
<el-form label-width="80px" :disabled="isDetail"> |
|
|
|
|
<el-form label-width="80px" |
|
|
|
|
:disabled="isDetail"> |
|
|
|
|
<div class="flex"> |
|
|
|
|
<el-form-item label="系统"> |
|
|
|
|
<el-select v-model="projectManage.systemId" placeholder="请选择" @change="systemChange"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in systemList" |
|
|
|
|
<el-select v-model="projectManage.systemId" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
@change="systemChange"> |
|
|
|
|
<el-option v-for="item in systemList" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.id" |
|
|
|
|
></el-option> |
|
|
|
|
:value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="项目名称"> |
|
|
|
|
<el-input v-model.trim="projectManage.projectName" placeholder="20个字符以内" @blur="projectNameExistis"></el-input> |
|
|
|
|
<el-input v-model.trim="projectManage.projectName" |
|
|
|
|
placeholder="20个字符以内" |
|
|
|
|
@blur="projectNameExistis"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="项目权限"> |
|
|
|
|
<el-select v-model="projectManage.permissions" placeholder="请选择" @change="permissionChange"> |
|
|
|
|
<el-option label="练习" :value="0"></el-option> |
|
|
|
|
<el-option label="考核" :value="1"></el-option> |
|
|
|
|
<el-option label="竞赛" :value="2"></el-option> |
|
|
|
|
<el-select v-model="projectManage.permissions" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
@change="permissionChange"> |
|
|
|
|
<el-option label="练习" |
|
|
|
|
:value="0"></el-option> |
|
|
|
|
<el-option label="考核" |
|
|
|
|
:value="1"></el-option> |
|
|
|
|
<el-option label="竞赛" |
|
|
|
|
:value="2"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
@ -41,100 +55,158 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<h6 class="p-title">实验目标</h6> |
|
|
|
|
<div> |
|
|
|
|
<el-form label-width="0"> |
|
|
|
|
<el-form-item> |
|
|
|
|
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentTarget" :minHeight="150" :height="150" /> |
|
|
|
|
<quill :border="true" |
|
|
|
|
:readonly="isDetail" |
|
|
|
|
v-model="projectManage.experimentTarget" |
|
|
|
|
:minHeight="150" |
|
|
|
|
:height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<h6 class="p-title">项目背景</h6> |
|
|
|
|
<div> |
|
|
|
|
<el-form label-width="0"> |
|
|
|
|
<el-form-item> |
|
|
|
|
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentDescription" :minHeight="150" :height="150" :index="1" /> |
|
|
|
|
<quill :border="true" |
|
|
|
|
:readonly="isDetail" |
|
|
|
|
v-model="projectManage.experimentDescription" |
|
|
|
|
:minHeight="150" |
|
|
|
|
:height="150" |
|
|
|
|
:index="1" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<div class="m-b-20 flex-between"> |
|
|
|
|
<h6 class="p-title" style="margin-bottom: 0">实验任务</h6> |
|
|
|
|
<h6 class="p-title" |
|
|
|
|
style="margin-bottom: 0">实验任务</h6> |
|
|
|
|
<div> |
|
|
|
|
<!--<el-button :disabled="isDetail" type="primary" @click="toJudgePoint('home')">进入判分点</el-button>--> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="m-b-20 flex-between"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<div class="m-r-20" style="color: #f00">项目总分值:100分</div> |
|
|
|
|
<div class="m-r-20" |
|
|
|
|
style="color: #f00">项目总分值:100分</div> |
|
|
|
|
<!-- <div>权重 <div class="dib"><el-input></el-input></div></div> --> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button class="m-r-20" type="text" @click="avgDistributionScore">平均分配分值</el-button> |
|
|
|
|
<el-button class="m-r-20" type="text" @click="manualDistributionScore">手动分配分值</el-button> |
|
|
|
|
<el-button class="m-r-20" |
|
|
|
|
type="text" |
|
|
|
|
@click="avgDistributionScore">平均分配分值</el-button> |
|
|
|
|
<el-button class="m-r-20" |
|
|
|
|
type="text" |
|
|
|
|
@click="manualDistributionScore">手动分配分值</el-button> |
|
|
|
|
<span>(待分配分值: {{ handDistributionScore }}/100分)</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" round @click="handleQueryJudgment" style="margin-bottom: 10px">判分点</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-delete" round @click="batchDeleteProjectJudgment" style="margin-bottom: 10px">批量删除</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
round |
|
|
|
|
@click="handleQueryJudgment" |
|
|
|
|
style="margin-bottom: 10px">判分点</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
round |
|
|
|
|
@click="batchDeleteProjectJudgment" |
|
|
|
|
style="margin-bottom: 10px">批量删除</el-button> |
|
|
|
|
<div class="draggable"> |
|
|
|
|
<el-table |
|
|
|
|
ref="projectJudgementTable" |
|
|
|
|
<el-table ref="projectJudgementTable" |
|
|
|
|
:data="projectJudgmentData" |
|
|
|
|
class="table" |
|
|
|
|
stripe |
|
|
|
|
header-align="center" |
|
|
|
|
@selection-change="handleSelectionProjectJudgment" |
|
|
|
|
row-key="judgmentId" |
|
|
|
|
v-loading="listLoading" |
|
|
|
|
> |
|
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="sort" label="序号" width="80" align="center"> |
|
|
|
|
v-loading="listLoading"> |
|
|
|
|
<el-table-column type="selection" |
|
|
|
|
width="55" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="sort" |
|
|
|
|
label="序号" |
|
|
|
|
width="80" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.sort }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="name" label="判分指标" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column label="实验要求" align="center" width="600"> |
|
|
|
|
<el-table-column prop="name" |
|
|
|
|
label="判分指标" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="name" |
|
|
|
|
label="判分点名称" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column label="实验要求" |
|
|
|
|
align="center" |
|
|
|
|
width="600"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<quill :border="true" :readonly="true" elseRead="true" v-model="scope.row.experimentalRequirements" :minHeight="150" :height="150" :index="2" /> |
|
|
|
|
<quill :border="true" |
|
|
|
|
:readonly="true" |
|
|
|
|
elseRead="true" |
|
|
|
|
v-model="scope.row.experimentalRequirements" |
|
|
|
|
:minHeight="150" |
|
|
|
|
:height="150" |
|
|
|
|
:index="2" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="score" label="分数" align="center" width="120"> |
|
|
|
|
<el-table-column prop="score" |
|
|
|
|
label="分数" |
|
|
|
|
align="center" |
|
|
|
|
width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<!--type="number" @blur="updateProjectJudgment"--> |
|
|
|
|
<el-input v-model.trim="scope.row.score" @input="scoreChange(scope.row, scope.$index,$event)"></el-input> |
|
|
|
|
<el-input v-model.trim="scope.row.score" |
|
|
|
|
@input="scoreChange(scope.row, scope.$index,$event)"></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" width="100" align="center"> |
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
width="100" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<!--<el-button :disabled="isDetail" type="text" style="margin-right: 10px" @click="toJudgePoint('edit', scope.row)">自定义</el-button>--> |
|
|
|
|
<el-button type="text" @click="delJudgePoint(scope.$index)">删除</el-button> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="delJudgePoint(scope.$index)">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<div class="m-b-20 flex-between"> |
|
|
|
|
<h6 class="p-title" style="margin-bottom: 0">实验提示</h6> |
|
|
|
|
<h6 class="p-title" |
|
|
|
|
style="margin-bottom: 0">实验提示</h6> |
|
|
|
|
<div> |
|
|
|
|
启用 |
|
|
|
|
<el-switch :active-value="0" :inactive-value="1" v-model="projectManage.hintOpen"></el-switch> |
|
|
|
|
<el-switch :active-value="0" |
|
|
|
|
:inactive-value="1" |
|
|
|
|
v-model="projectManage.hintOpen"></el-switch> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-form label-width="0"> |
|
|
|
|
<el-form-item prop="tips" label=""> |
|
|
|
|
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentHint" :minHeight="150" :height="150" :index="3" /> |
|
|
|
|
<el-form-item prop="tips" |
|
|
|
|
label=""> |
|
|
|
|
<quill :border="true" |
|
|
|
|
:readonly="isDetail" |
|
|
|
|
v-model="projectManage.experimentHint" |
|
|
|
|
:minHeight="150" |
|
|
|
|
:height="150" |
|
|
|
|
:index="3" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -142,14 +214,19 @@ |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
<!--选择判分点对话框--> |
|
|
|
|
<el-dialog title="添加判分点" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false"> |
|
|
|
|
<el-dialog title="添加判分点" |
|
|
|
|
:visible.sync="dialogVisible" |
|
|
|
|
width="40%" |
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
<div class="text-right m-b-10"> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入需要查找的判分点" prefix-icon="el-icon-search" v-model.trim="judgementpointsquery" clearable></el-input> |
|
|
|
|
<el-input placeholder="请输入需要查找的判分点" |
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
v-model.trim="judgementpointsquery" |
|
|
|
|
clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-table |
|
|
|
|
v-loading="visibleLoading" |
|
|
|
|
<el-table v-loading="visibleLoading" |
|
|
|
|
:data="judgementData" |
|
|
|
|
ref="judgementTable" |
|
|
|
|
class="table" |
|
|
|
@ -157,24 +234,36 @@ |
|
|
|
|
header-align="center" |
|
|
|
|
max-height="400" |
|
|
|
|
@selection-change="handleSelectionJudgment" |
|
|
|
|
:row-key="rowKey" |
|
|
|
|
> |
|
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
|
<el-table-column prop="id" label="序号" align="center" width="100"> |
|
|
|
|
:row-key="rowKey"> |
|
|
|
|
<el-table-column type="selection" |
|
|
|
|
width="55" |
|
|
|
|
align="center" |
|
|
|
|
:reserve-selection="true"></el-table-column> |
|
|
|
|
<el-table-column prop="id" |
|
|
|
|
label="序号" |
|
|
|
|
align="center" |
|
|
|
|
width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.$index + 1 }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" width="100"> |
|
|
|
|
<el-table-column prop="name" |
|
|
|
|
label="判分点名称" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
align="center" |
|
|
|
|
width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button size="mini" @click="toJudgePoint('view', scope.row)">查看</el-button> |
|
|
|
|
<el-button size="mini" |
|
|
|
|
@click="toJudgePoint('view', scope.row)">查看</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
<div slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="addJudgment">确 定</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="addJudgment">确 定</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
@ -191,7 +280,7 @@ export default { |
|
|
|
|
components: { |
|
|
|
|
quill |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
projectId: this.$route.query.projectId, |
|
|
|
|
founder: this.$route.query.founder, |
|
|
|
@ -229,7 +318,7 @@ export default { |
|
|
|
|
searchTimer: null, |
|
|
|
|
isToPoint: false, // 判断是否是跳转到判分点系统 |
|
|
|
|
visibleLoading: false, // 加载弹框 |
|
|
|
|
listLoading:false,// 列表加载 |
|
|
|
|
listLoading: false,// 列表加载 |
|
|
|
|
submiting: false, // 新增编辑员工防抖标识 |
|
|
|
|
updateTime: 0, |
|
|
|
|
next: null, |
|
|
|
@ -240,7 +329,7 @@ export default { |
|
|
|
|
...mapState("project", [ |
|
|
|
|
"projectFields", "lastSystemId" |
|
|
|
|
]), |
|
|
|
|
handDistributionScore: function() { |
|
|
|
|
handDistributionScore: function () { |
|
|
|
|
//计算判分点分值,超出100提示, |
|
|
|
|
let score = 0; |
|
|
|
|
this.projectJudgmentData.forEach(e => { |
|
|
|
@ -260,12 +349,12 @@ export default { |
|
|
|
|
watch: { |
|
|
|
|
// 监听信息是否有更改,有的话页面离开的时候要询问是否要保存 |
|
|
|
|
projectManage: { |
|
|
|
|
handler(){ |
|
|
|
|
handler () { |
|
|
|
|
this.updateTime++ |
|
|
|
|
}, |
|
|
|
|
deep:true |
|
|
|
|
deep: true |
|
|
|
|
}, |
|
|
|
|
judgementpointsquery(n) { |
|
|
|
|
judgementpointsquery (n) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
this.handleQueryJudgment(); |
|
|
|
@ -273,10 +362,10 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 离开的时候判断是否有保存更改的信息,没有则拦截并提示 |
|
|
|
|
beforeRouteLeave(to, from, next) { |
|
|
|
|
beforeRouteLeave (to, from, next) { |
|
|
|
|
console.log(44, this.updateTime) |
|
|
|
|
if(this.updateTime){ |
|
|
|
|
if(!this.backType) { |
|
|
|
|
if (this.updateTime) { |
|
|
|
|
if (!this.backType) { |
|
|
|
|
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', { |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
@ -285,15 +374,15 @@ export default { |
|
|
|
|
}).catch(() => { |
|
|
|
|
next() |
|
|
|
|
}) |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
next() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
next() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
mounted () { |
|
|
|
|
this.getSystemData(); |
|
|
|
|
if (this.$route.query.projectId) { |
|
|
|
|
this.projectId = this.$route.query.projectId; |
|
|
|
@ -308,7 +397,7 @@ export default { |
|
|
|
|
this.rowDrop(); |
|
|
|
|
this.$refs.main.scrollTop = 0; |
|
|
|
|
}, |
|
|
|
|
beforeDestroy() { |
|
|
|
|
beforeDestroy () { |
|
|
|
|
if (!this.isToPoint) { |
|
|
|
|
this.setProject({}); |
|
|
|
|
} |
|
|
|
@ -317,12 +406,12 @@ export default { |
|
|
|
|
...mapActions("project", [ |
|
|
|
|
"setSystemId", "setProject" |
|
|
|
|
]), |
|
|
|
|
getSystemData() { |
|
|
|
|
getSystemData () { |
|
|
|
|
this.$get(this.api.getSystemIdBySchool).then(res => { |
|
|
|
|
this.systemList = res.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getInfoData() { // 获取详情数据 |
|
|
|
|
getInfoData () { // 获取详情数据 |
|
|
|
|
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { |
|
|
|
|
let { projectManage, projectJudgmentVos } = res; |
|
|
|
|
this.projectManage = projectManage; |
|
|
|
@ -339,7 +428,7 @@ export default { |
|
|
|
|
console.log(err); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
projectNameExistis() { // 项目管理名称判重 |
|
|
|
|
projectNameExistis () { // 项目管理名称判重 |
|
|
|
|
const { projectName } = this.projectManage |
|
|
|
|
if (this.originName === projectName) { |
|
|
|
|
this.projectNameRepeat = false |
|
|
|
@ -353,7 +442,7 @@ export default { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
systemChange() { // 切换系统 |
|
|
|
|
systemChange () { // 切换系统 |
|
|
|
|
if (this.projectJudgmentData.length) { |
|
|
|
|
this.$confirm("更换系统会清空实验任务,确认更换?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
@ -367,10 +456,10 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 去除空白标签 |
|
|
|
|
removeTag(val) { |
|
|
|
|
removeTag (val) { |
|
|
|
|
return val.replace('<p><br></p>', '') |
|
|
|
|
}, |
|
|
|
|
judgmentRelease(state) { //判断能否成功发布 |
|
|
|
|
judgmentRelease (state) { //判断能否成功发布 |
|
|
|
|
let { |
|
|
|
|
projectName, |
|
|
|
|
experimentTarget, |
|
|
|
@ -414,7 +503,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
}, |
|
|
|
|
save(state) { //处理提交 |
|
|
|
|
save (state) { //处理提交 |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
if (!this.judgmentRelease(state)) { //判断页面是否有没有输入的内容 |
|
|
|
|
return; |
|
|
|
@ -453,7 +542,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
updateProject(params) { // 更新项目 |
|
|
|
|
updateProject (params) { // 更新项目 |
|
|
|
|
this.$post(this.api[params.projectManage.state ? 'updateProjectManage' : 'editProjectDraft'], params).then(res => { |
|
|
|
|
util.successMsg("更新实验项目成功"); |
|
|
|
|
this.updateTime = 0 |
|
|
|
@ -462,7 +551,7 @@ export default { |
|
|
|
|
this.submiting = false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
addProject(params) { // 添加项目 |
|
|
|
|
addProject (params) { // 添加项目 |
|
|
|
|
console.log("🚀 ~ file: index.vue ~ line 448 ~ addProject ~ params", params) |
|
|
|
|
this.$post(this.api[params.projectManage.state ? 'addProjectManage' : 'saveProjectDraft'], params).then(res => { |
|
|
|
|
util.successMsg("添加实验项目成功"); |
|
|
|
@ -472,10 +561,10 @@ export default { |
|
|
|
|
this.submiting = false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
manualDistributionScore() { //点击手动分配分值 |
|
|
|
|
manualDistributionScore () { //点击手动分配分值 |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
avgDistributionScore() { |
|
|
|
|
avgDistributionScore () { |
|
|
|
|
//点击平均分配分值 |
|
|
|
|
if (this.projectJudgmentData.length) { |
|
|
|
|
this.$get(this.api.avgValues, { |
|
|
|
@ -491,10 +580,10 @@ export default { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
scoreChange(row, index, val) { // 暂时解决,输入分数,页面没有更新 |
|
|
|
|
scoreChange (row, index, val) { // 暂时解决,输入分数,页面没有更新 |
|
|
|
|
this.projectJudgmentData.splice(index, 1, row); |
|
|
|
|
}, |
|
|
|
|
delJudgePoint(index) { // 删除判分点 |
|
|
|
|
delJudgePoint (index) { // 删除判分点 |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
@ -502,10 +591,10 @@ export default { |
|
|
|
|
}).catch(() => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleSelectionProjectJudgment(val) { |
|
|
|
|
handleSelectionProjectJudgment (val) { |
|
|
|
|
this.selectedProjectJudgment = val; |
|
|
|
|
}, |
|
|
|
|
batchDeleteProjectJudgment() { // 批量删除判分点 |
|
|
|
|
batchDeleteProjectJudgment () { // 批量删除判分点 |
|
|
|
|
if (this.selectedProjectJudgment.length) { |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
@ -522,7 +611,7 @@ export default { |
|
|
|
|
util.errorMsg("请选择判分点"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleQueryJudgment() { // 查询判分点数据 |
|
|
|
|
handleQueryJudgment () { // 查询判分点数据 |
|
|
|
|
let { systemId } = this.projectManage; |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.$nextTick(() => { |
|
|
|
@ -544,7 +633,7 @@ export default { |
|
|
|
|
this.getProgrammingClassData(params); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getProcessClassData(params) { // 获取流程类判分点列表数据 |
|
|
|
|
getProcessClassData (params) { // 获取流程类判分点列表数据 |
|
|
|
|
this.visibleLoading = true; |
|
|
|
|
this.$get(`${this.api.getBcJudgmentPoint}`, params).then(res => { |
|
|
|
|
let list = res.judgmentPoints |
|
|
|
@ -558,7 +647,7 @@ export default { |
|
|
|
|
this.visibleLoading = false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getProgrammingClassData(params) { // 获取编程类判分点列表数据 |
|
|
|
|
getProgrammingClassData (params) { // 获取编程类判分点列表数据 |
|
|
|
|
this.visibleLoading = true; |
|
|
|
|
this.$get(this.api.getBcJudgmentPoint, params).then(res => { |
|
|
|
|
let list = res.judgmentPoints |
|
|
|
@ -572,10 +661,10 @@ export default { |
|
|
|
|
this.visibleLoading = false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleSelectionJudgment(val) { // 处理多选判分点 |
|
|
|
|
handleSelectionJudgment (val) { // 处理多选判分点 |
|
|
|
|
this.selectedJudgment = val; |
|
|
|
|
}, |
|
|
|
|
addJudgment() { // 确认选择判分点 |
|
|
|
|
addJudgment () { // 确认选择判分点 |
|
|
|
|
if (this.selectedJudgment.length) { |
|
|
|
|
// console.log(this.selectedJudgment, "queren"); |
|
|
|
|
this.dialogVisible = false; |
|
|
|
@ -594,11 +683,11 @@ export default { |
|
|
|
|
util.errorMsg("请选择判分点"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleCacheData() { // 处理缓存数据 |
|
|
|
|
handleCacheData () { // 处理缓存数据 |
|
|
|
|
this.isToPoint = true; |
|
|
|
|
this.setProject({ projectManage: this.projectManage, projectJudgmentData: this.projectJudgmentData }); |
|
|
|
|
}, |
|
|
|
|
toJudgePoint(type, row) { // 进入判分点系统 |
|
|
|
|
toJudgePoint (type, row) { // 进入判分点系统 |
|
|
|
|
this.handleCacheData(); |
|
|
|
|
let jumpPath = Setting.jumpPath; |
|
|
|
|
// let jumpPath = "http://192.168.31.154:8087/"; // 本地 |
|
|
|
@ -640,22 +729,22 @@ export default { |
|
|
|
|
} |
|
|
|
|
location.href = href; |
|
|
|
|
}, |
|
|
|
|
permissionChange(){ |
|
|
|
|
if (this.projectManage.permissions){ |
|
|
|
|
permissionChange () { |
|
|
|
|
if (this.projectManage.permissions) { |
|
|
|
|
this.projectManage.hintOpen = 1 |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.projectManage.hintOpen = 0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 行拖拽 |
|
|
|
|
rowDrop() { |
|
|
|
|
rowDrop () { |
|
|
|
|
// 此时找到的元素是要拖拽元素的父容器 |
|
|
|
|
const tbody = document.querySelector(".draggable .el-table__body-wrapper tbody"); |
|
|
|
|
const _this = this; |
|
|
|
|
Sortable.create(tbody, { |
|
|
|
|
// 指定父元素下可被拖拽的子元素 |
|
|
|
|
draggable: ".draggable .el-table__row", |
|
|
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
|
|
onEnd ({ newIndex, oldIndex }) { |
|
|
|
|
_this.projectJudgmentData.splice(newIndex, 0, _this.projectJudgmentData.splice(oldIndex, 1)[0]); |
|
|
|
|
let newArray = _this.projectJudgmentData.slice(0); |
|
|
|
|
_this.projectJudgmentData = []; |
|
|
|
@ -671,7 +760,7 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 修改判分点中间表 |
|
|
|
|
async updateProjectJudgment() { |
|
|
|
|
async updateProjectJudgment () { |
|
|
|
|
let param = this.projectJudgmentData.map((e, i) => { |
|
|
|
|
let obj = { |
|
|
|
|
judgmentId: e.judgmentId, |
|
|
|
@ -702,10 +791,10 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 返回 |
|
|
|
|
back() { |
|
|
|
|
back () { |
|
|
|
|
this.backType = true |
|
|
|
|
// 更改了信息才需要提示 |
|
|
|
|
if(this.updateTime){ |
|
|
|
|
if (this.updateTime) { |
|
|
|
|
this.$confirm('编辑的内容未保存,是否保存?', "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
@ -727,9 +816,9 @@ export default { |
|
|
|
|
padding: 0; |
|
|
|
|
border-bottom: 0; |
|
|
|
|
} |
|
|
|
|
.main{ |
|
|
|
|
.main { |
|
|
|
|
overflow: auto; |
|
|
|
|
overflow-x: hidden; |
|
|
|
|
height: calc(100vh - 152px ); |
|
|
|
|
height: calc(100vh - 152px); |
|
|
|
|
} |
|
|
|
|
</style> |