|
|
|
@ -1,19 +1,25 @@ |
|
|
|
|
<template> |
|
|
|
|
<div ref="main" class="main"> |
|
|
|
|
<div ref="main" |
|
|
|
|
class="main"> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="mgb20"> |
|
|
|
|
<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="handleSubmit(0,projectManage.isOpen=1,projectManage.ztOpen = 1)">保存为草稿 |
|
|
|
|
<el-button type="success" |
|
|
|
|
@click="handleSubmit(0,projectManage.isOpen=1,projectManage.ztOpen = 1)">保存为草稿 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" @click="handleSubmit(1)">确定并发布</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="handleSubmit(1)">确定并发布</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="mgb20"> |
|
|
|
|
<div class="flex-center mgb20"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>课程信息</span> |
|
|
|
@ -24,18 +30,26 @@ |
|
|
|
|
<el-form label-width="80px"> |
|
|
|
|
<div style="display: flex"> |
|
|
|
|
<el-form-item label="项目名称"> |
|
|
|
|
<el-input :disabled="isDetail" v-model.trim="projectManage.projectName" |
|
|
|
|
placeholder="20个字符以内" @blur="projectNameExistis"></el-input> |
|
|
|
|
<el-input :disabled="isDetail" |
|
|
|
|
v-model.trim="projectManage.projectName" |
|
|
|
|
placeholder="20个字符以内" |
|
|
|
|
@blur="projectNameExistis"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="备注"> |
|
|
|
|
<el-input v-model.trim="projectManage.remark" placeholder="20个字符以内"></el-input> |
|
|
|
|
<el-input v-model.trim="projectManage.remark" |
|
|
|
|
placeholder="20个字符以内"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="项目权限"> |
|
|
|
|
<el-select :disabled="isDetail" 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-form-item label="项目用途"> |
|
|
|
|
<el-select :disabled="isDetail" |
|
|
|
|
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> |
|
|
|
@ -43,7 +57,8 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="mgb20"> |
|
|
|
|
<div class="flex-center mgb20"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>实验目标</span> |
|
|
|
@ -52,14 +67,18 @@ |
|
|
|
|
<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="mgb20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="mgb20"> |
|
|
|
|
<div class="flex-center mgb20"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>项目背景</span> |
|
|
|
@ -68,21 +87,27 @@ |
|
|
|
|
<div> |
|
|
|
|
<el-form label-width="0"> |
|
|
|
|
<el-form-item> |
|
|
|
|
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentDescription" |
|
|
|
|
:minHeight="150" :height="150" /> |
|
|
|
|
<quill :border="true" |
|
|
|
|
:readonly="isDetail" |
|
|
|
|
v-model="projectManage.experimentDescription" |
|
|
|
|
:minHeight="150" |
|
|
|
|
:height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="mgb20"> |
|
|
|
|
<div class="flex-between mgb20"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>实验任务</span> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button :disabled="isDetail" type="primary" @click="toJudgePoint('home')">进入判分点 |
|
|
|
|
<el-button :disabled="isDetail" |
|
|
|
|
type="primary" |
|
|
|
|
@click="toJudgePoint('home')">进入判分点 |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -90,63 +115,101 @@ |
|
|
|
|
|
|
|
|
|
<div class="mgb20 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 :disabled="isDetail" class="m-r-20" type="text" @click="avgDistributionScore"> |
|
|
|
|
<el-button :disabled="isDetail" |
|
|
|
|
class="m-r-20" |
|
|
|
|
type="text" |
|
|
|
|
@click="avgDistributionScore"> |
|
|
|
|
平均分配分值 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button :disabled="isDetail" class="m-r-20" type="text" @click="manualDistributionScore"> |
|
|
|
|
<el-button :disabled="isDetail" |
|
|
|
|
class="m-r-20" |
|
|
|
|
type="text" |
|
|
|
|
@click="manualDistributionScore"> |
|
|
|
|
手动分配分值 |
|
|
|
|
</el-button> |
|
|
|
|
<span>(待分配分值: {{ handDistributionScore }}/100分)</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-button :disabled="isDetail" type="primary" icon="el-icon-plus" round |
|
|
|
|
@click="handleAddJudgment" style="margin-bottom: 10px">判分点 |
|
|
|
|
<el-button :disabled="isDetail" |
|
|
|
|
type="primary" |
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
round |
|
|
|
|
@click="handleAddJudgment" |
|
|
|
|
style="margin-bottom: 10px">判分点 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button :disabled="isDetail" type="primary" icon="el-icon-delete" round |
|
|
|
|
@click="batchDeleteProjectJudgment" style="margin-bottom: 10px">批量删除 |
|
|
|
|
<el-button :disabled="isDetail" |
|
|
|
|
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="100" |
|
|
|
|
<quill :border="true" |
|
|
|
|
:readonly="true" |
|
|
|
|
elseRead="true" |
|
|
|
|
v-model="scope.row.experimentalRequirements" |
|
|
|
|
:minHeight="100" |
|
|
|
|
:height="100" /> |
|
|
|
|
</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 :disabled="isDetail" v-model.trim="scope.row.score" |
|
|
|
|
<el-input :disabled="isDetail" |
|
|
|
|
v-model.trim="scope.row.score" |
|
|
|
|
@input="scoreChange(scope.row, scope.$index,$event)"></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" width="140" align="center"> |
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
width="140" |
|
|
|
|
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 :disabled="isDetail" type="text" @click="delJudgePoint(scope.$index)"> |
|
|
|
|
<el-button :disabled="isDetail" |
|
|
|
|
type="text" |
|
|
|
|
style="margin-right: 10px" |
|
|
|
|
@click="toJudgePoint('edit', scope.row)">自定义</el-button> |
|
|
|
|
<el-button :disabled="isDetail" |
|
|
|
|
type="text" |
|
|
|
|
@click="delJudgePoint(scope.$index)"> |
|
|
|
|
删除 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
@ -155,7 +218,8 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="mgb20"> |
|
|
|
|
<div class="flex-between mgb20"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
@ -163,16 +227,22 @@ |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
启用 |
|
|
|
|
<el-switch :disabled="isDetail" :active-value="0" :inactive-value="1" |
|
|
|
|
<el-switch :disabled="isDetail" |
|
|
|
|
:active-value="0" |
|
|
|
|
:inactive-value="1" |
|
|
|
|
v-model="projectManage.hintOpen"></el-switch> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="border-b-dashed"></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" /> |
|
|
|
|
<el-form-item prop="tips" |
|
|
|
|
label=""> |
|
|
|
|
<quill :border="true" |
|
|
|
|
:readonly="isDetail" |
|
|
|
|
v-model="projectManage.experimentHint" |
|
|
|
|
:minHeight="150" |
|
|
|
|
:height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -181,15 +251,21 @@ |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!--选择判分点对话框--> |
|
|
|
|
<el-dialog title="添加判分点" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false" @close="closeJudgment"> |
|
|
|
|
<el-dialog title="添加判分点" |
|
|
|
|
:visible.sync="dialogVisible" |
|
|
|
|
width="40%" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
@close="closeJudgment"> |
|
|
|
|
<div class="text-right mgb10"> |
|
|
|
|
<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" |
|
|
|
@ -197,24 +273,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="closeJudgment">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="saveJudgment">确 定</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="saveJudgment">确 定</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
@ -229,18 +317,18 @@ export default { |
|
|
|
|
components: { |
|
|
|
|
quill |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
projectId: this.$route.query.projectId, |
|
|
|
|
founder: this.$route.query.founder, |
|
|
|
|
token: btoa(sessionStorage.getItem("token")), |
|
|
|
|
isDetail: this.$route.query.show, |
|
|
|
|
isDetails:this.$route.query.isDetails, |
|
|
|
|
isDetails: this.$route.query.isDetails, |
|
|
|
|
projectManage: { |
|
|
|
|
founder: 0, // 创建人角色(0、系统 1、老师) |
|
|
|
|
projectName: "", // 项目名称 |
|
|
|
|
remark: '', |
|
|
|
|
permissions: 0, // 项目权限(0、练习 1、考核 2、竞赛) |
|
|
|
|
permissions: 0, // 项目用途(0、练习 1、考核 2、竞赛) |
|
|
|
|
systemId: this.$route.query.systemId, // 系统id |
|
|
|
|
hintOpen: 1, // 实验提示是否开启(0开启 1不开启 默认1) |
|
|
|
|
experimentHint: "", // 实验提示 |
|
|
|
@ -252,7 +340,7 @@ export default { |
|
|
|
|
isDel: 0 // 是否删除(0、未删除 1、已删除 默认0) |
|
|
|
|
}, |
|
|
|
|
projectJudgmentData: [], //实验任务(项目判分点) |
|
|
|
|
oriPer: '', // 原始项目权限,用于保存的时候对比是否有修改该值,如果有,要调另一个接口查询提示 |
|
|
|
|
oriPer: '', // 原始项目用途,用于保存的时候对比是否有修改该值,如果有,要调另一个接口查询提示 |
|
|
|
|
selectedProjectJudgment: [], // 选中的项目判分点 |
|
|
|
|
|
|
|
|
|
dialogVisible: false, // 选择判分点对话框 |
|
|
|
@ -269,19 +357,19 @@ export default { |
|
|
|
|
searchTimer: null, |
|
|
|
|
isToPoint: false, // 判断是否是跳转到判分点系统 |
|
|
|
|
visibleLoading: false, // 加载判分点数据 |
|
|
|
|
listLoading:false,// 列表加载 |
|
|
|
|
listLoading: false,// 列表加载 |
|
|
|
|
submiting: false, // 新增编辑防抖标识 |
|
|
|
|
updateTime: 0 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
lastSystemId() { |
|
|
|
|
lastSystemId () { |
|
|
|
|
return this.$store.state.lastSystemId; |
|
|
|
|
}, |
|
|
|
|
projectFields() { |
|
|
|
|
projectFields () { |
|
|
|
|
return this.$store.state.projectFields; |
|
|
|
|
}, |
|
|
|
|
handDistributionScore: function() { |
|
|
|
|
handDistributionScore: function () { |
|
|
|
|
//计算判分点分值,超出100提示, |
|
|
|
|
let score = 0; |
|
|
|
|
this.projectJudgmentData.forEach(e => { |
|
|
|
@ -299,19 +387,19 @@ export default { |
|
|
|
|
watch: { |
|
|
|
|
// 监听信息是否有更改,有的话页面离开的时候要询问是否要保存 |
|
|
|
|
projectManage: { |
|
|
|
|
handler(){ |
|
|
|
|
handler () { |
|
|
|
|
this.updateTime++ |
|
|
|
|
}, |
|
|
|
|
deep:true |
|
|
|
|
deep: true |
|
|
|
|
}, |
|
|
|
|
judgementpointsquery(n) { |
|
|
|
|
judgementpointsquery (n) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
this.handleQueryJudgment(); |
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
mounted () { |
|
|
|
|
if (this.$route.query.projectId) { |
|
|
|
|
this.projectId = this.$route.query.projectId; |
|
|
|
|
this.getInfoData(); |
|
|
|
@ -325,20 +413,20 @@ export default { |
|
|
|
|
this.rowDrop(); |
|
|
|
|
this.$refs.main.scrollTop = 0; |
|
|
|
|
}, |
|
|
|
|
beforeDestroy() { |
|
|
|
|
beforeDestroy () { |
|
|
|
|
if (!this.isToPoint) { |
|
|
|
|
this.$store.dispatch("setProject", {}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
permissionChange(){ |
|
|
|
|
if (this.projectManage.permissions){ |
|
|
|
|
permissionChange () { |
|
|
|
|
if (this.projectManage.permissions) { |
|
|
|
|
this.projectManage.hintOpen = 1 |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.projectManage.hintOpen = 0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getInfoData() { // 获取详情数据 |
|
|
|
|
getInfoData () { // 获取详情数据 |
|
|
|
|
if (!this.isToPoint) { |
|
|
|
|
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { |
|
|
|
|
let { projectManage, projectJudgmentVos } = res; |
|
|
|
@ -358,7 +446,7 @@ export default { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
projectNameExistis() { // 项目管理名称判重 |
|
|
|
|
projectNameExistis () { // 项目管理名称判重 |
|
|
|
|
const { projectName } = this.projectManage |
|
|
|
|
if (this.originName === projectName) { |
|
|
|
|
this.projectNameRepeat = false |
|
|
|
@ -372,7 +460,7 @@ export default { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
systemChange() { // 切换系统 |
|
|
|
|
systemChange () { // 切换系统 |
|
|
|
|
if (this.projectJudgmentData.length) { |
|
|
|
|
this.$confirm("更换系统会清空实验任务,确认更换?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
@ -386,10 +474,10 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 去除空白标签 |
|
|
|
|
removeTag(val) { |
|
|
|
|
removeTag (val) { |
|
|
|
|
return val.replace('<p><br></p>', '') |
|
|
|
|
}, |
|
|
|
|
judgmentRelease(state) { //判断能否成功发布 |
|
|
|
|
judgmentRelease (state) { //判断能否成功发布 |
|
|
|
|
let { |
|
|
|
|
projectName, |
|
|
|
|
experimentTarget, |
|
|
|
@ -433,7 +521,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
}, |
|
|
|
|
handleSubmit(state) { //处理提交 |
|
|
|
|
handleSubmit (state) { //处理提交 |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
if (!this.judgmentRelease(state)) { //判断页面是否有没有输入的内容 |
|
|
|
|
return; |
|
|
|
@ -473,14 +561,14 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
updateProject(params) { // 更新项目 |
|
|
|
|
updateProject (params) { // 更新项目 |
|
|
|
|
this.$post(this.api[params.projectManage.state ? 'updateProjectManage' : 'editProjectDraft'], params).then(res => { |
|
|
|
|
if (res.status === 200) { |
|
|
|
|
// 中台创建的项目,并且更改了项目权限,就需要调这个接口 |
|
|
|
|
// 中台创建的项目,并且更改了项目用途,就需要调这个接口 |
|
|
|
|
if (!params.projectManage.founder && this.oriPer !== params.projectManage.permissions) { |
|
|
|
|
this.$get(`${this.api.checkConfig}?projectId=${this.projectId}`).then(res => { |
|
|
|
|
this.$message.success(res.message === 'success' ? '更新实验项目成功' : res.message) |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
} else { |
|
|
|
|
this.$message.success('更新实验项目成功') |
|
|
|
|
} |
|
|
|
@ -490,7 +578,7 @@ export default { |
|
|
|
|
this.submiting = false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
addProject(params) { // 添加项目 |
|
|
|
|
addProject (params) { // 添加项目 |
|
|
|
|
this.$post(this.api[params.projectManage.state ? 'addProjectManage' : 'saveProjectDraft'], params).then(res => { |
|
|
|
|
if (res.status === 200) { |
|
|
|
|
this.$message.success("添加实验项目成功"); |
|
|
|
@ -500,10 +588,10 @@ export default { |
|
|
|
|
this.submiting = false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
manualDistributionScore() { //点击手动分配分值 |
|
|
|
|
manualDistributionScore () { //点击手动分配分值 |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
avgDistributionScore() { |
|
|
|
|
avgDistributionScore () { |
|
|
|
|
//点击平均分配分值 |
|
|
|
|
if (this.projectJudgmentData.length) { |
|
|
|
|
this.$get(this.api.avgValues, { |
|
|
|
@ -519,20 +607,20 @@ export default { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleMoveUp(index) { // 处理上移(作废) |
|
|
|
|
handleMoveUp (index) { // 处理上移(作废) |
|
|
|
|
let x = index; |
|
|
|
|
let y = index + 1; |
|
|
|
|
this.projectJudgmentData.splice(x - 1, 1, ...this.projectJudgmentData.splice(y - 1, 1, this.projectJudgmentData[x - 1])); |
|
|
|
|
}, |
|
|
|
|
handleMoveDown(index) { // 处理下移(作废) |
|
|
|
|
handleMoveDown (index) { // 处理下移(作废) |
|
|
|
|
let x = index + 1; |
|
|
|
|
let y = index + 2; |
|
|
|
|
this.projectJudgmentData.splice(x - 1, 1, ...this.projectJudgmentData.splice(y - 1, 1, this.projectJudgmentData[x - 1])); |
|
|
|
|
}, |
|
|
|
|
scoreChange(row, index) { // 暂时解决,输入没有反应 |
|
|
|
|
scoreChange (row, index) { // 暂时解决,输入没有反应 |
|
|
|
|
this.projectJudgmentData.splice(index, 1, row); |
|
|
|
|
}, |
|
|
|
|
delJudgePoint(index) { // 删除判分点 |
|
|
|
|
delJudgePoint (index) { // 删除判分点 |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
@ -540,10 +628,10 @@ export default { |
|
|
|
|
}).catch(() => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleSelectionProjectJudgment(val) { |
|
|
|
|
handleSelectionProjectJudgment (val) { |
|
|
|
|
this.selectedProjectJudgment = val; |
|
|
|
|
}, |
|
|
|
|
batchDeleteProjectJudgment() { // 批量删除判分点 |
|
|
|
|
batchDeleteProjectJudgment () { // 批量删除判分点 |
|
|
|
|
if (this.selectedProjectJudgment.length) { |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
@ -561,11 +649,11 @@ export default { |
|
|
|
|
this.$message.error("请选择判分点"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleAddJudgment() { // 处理添加判分点 |
|
|
|
|
handleAddJudgment () { // 处理添加判分点 |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.handleQueryJudgment(); |
|
|
|
|
}, |
|
|
|
|
handleQueryJudgment() { // 查询判分点数据 |
|
|
|
|
handleQueryJudgment () { // 查询判分点数据 |
|
|
|
|
let { systemId } = this.projectManage; |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs.judgementTable.clearSelection(); |
|
|
|
@ -574,7 +662,7 @@ export default { |
|
|
|
|
name: this.judgementpointsquery, |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 10000, |
|
|
|
|
enable:0, |
|
|
|
|
enable: 0, |
|
|
|
|
systemId |
|
|
|
|
}; |
|
|
|
|
if (systemId == 2 || systemId == 3) { |
|
|
|
@ -589,7 +677,7 @@ export default { |
|
|
|
|
this.getProgrammingClassData(params); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getProcessClassData(params) { // 获取流程类判分点列表数据 |
|
|
|
|
getProcessClassData (params) { // 获取流程类判分点列表数据 |
|
|
|
|
this.visibleLoading = true; |
|
|
|
|
this.$post(`${this.api.getLcJudgmentPoint}`, params).then(res => { |
|
|
|
|
if (res.status === 200) { |
|
|
|
@ -606,7 +694,7 @@ export default { |
|
|
|
|
this.visibleLoading = false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getProgrammingClassData(params) { // 获取编程类判分点列表数据 |
|
|
|
|
getProgrammingClassData (params) { // 获取编程类判分点列表数据 |
|
|
|
|
this.visibleLoading = true; |
|
|
|
|
this.$post(this.api.getBcJudgmentPoint, params).then(res => { |
|
|
|
|
if (res.status === 200) { |
|
|
|
@ -623,14 +711,14 @@ export default { |
|
|
|
|
this.visibleLoading = false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleSelectionJudgment(val) { // 处理多选判分点 |
|
|
|
|
handleSelectionJudgment (val) { // 处理多选判分点 |
|
|
|
|
this.selectedJudgment = val; |
|
|
|
|
}, |
|
|
|
|
closeJudgment() { // 关闭判分点对话框 |
|
|
|
|
closeJudgment () { // 关闭判分点对话框 |
|
|
|
|
this.judgementpointsquery = ""; |
|
|
|
|
this.dialogVisible = false; |
|
|
|
|
}, |
|
|
|
|
saveJudgment() { // 确认选择判分点 |
|
|
|
|
saveJudgment () { // 确认选择判分点 |
|
|
|
|
if (this.selectedJudgment.length) { |
|
|
|
|
this.judgementpointsquery = ""; |
|
|
|
|
this.dialogVisible = false; |
|
|
|
@ -650,14 +738,14 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 行拖拽 |
|
|
|
|
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 }) { |
|
|
|
|
// 解决拖拽数据不变化的问题:在改变了数据之后 先用一个变量深拷贝这个数据,然后把这个数据清空,最后再在vue的$nextTick函数里面重新给那个数据赋值 |
|
|
|
|
_this.projectJudgmentData.splice(newIndex, 0, _this.projectJudgmentData.splice(oldIndex, 1)[0]); |
|
|
|
|
let newArray = _this.projectJudgmentData.slice(0); |
|
|
|
@ -674,7 +762,7 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 修改判分点中间表 |
|
|
|
|
async updateProjectJudgment() { |
|
|
|
|
async updateProjectJudgment () { |
|
|
|
|
let param = this.projectJudgmentData.map((e, i) => { |
|
|
|
|
let obj = { |
|
|
|
|
judgmentId: e.judgmentId, |
|
|
|
@ -704,14 +792,14 @@ export default { |
|
|
|
|
console.log(err); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleCacheData() { // 处理缓存数据 |
|
|
|
|
handleCacheData () { // 处理缓存数据 |
|
|
|
|
this.isToPoint = true; |
|
|
|
|
this.$store.dispatch("setProject", { |
|
|
|
|
projectManage: this.projectManage, |
|
|
|
|
projectJudgmentData: this.projectJudgmentData |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
toJudgePoint(type, row) { // 进入判分点系统 |
|
|
|
|
toJudgePoint (type, row) { // 进入判分点系统 |
|
|
|
|
this.handleCacheData(); |
|
|
|
|
let jumpPath = Setting.jumpPath; |
|
|
|
|
let { systemId } = this.projectManage; |
|
|
|
@ -753,13 +841,13 @@ export default { |
|
|
|
|
location.href = href; |
|
|
|
|
}, |
|
|
|
|
// 返回列表 |
|
|
|
|
toList() { |
|
|
|
|
toList () { |
|
|
|
|
this.$router.back() |
|
|
|
|
}, |
|
|
|
|
// 返回 |
|
|
|
|
back() { |
|
|
|
|
back () { |
|
|
|
|
// 更改了信息才需要提示 |
|
|
|
|
if(this.updateTime){ |
|
|
|
|
if (this.updateTime) { |
|
|
|
|
this.$confirm('编辑的内容未保存,是否保存?', "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
@ -781,9 +869,9 @@ export default { |
|
|
|
|
padding: 0; |
|
|
|
|
border-bottom: 0; |
|
|
|
|
} |
|
|
|
|
.main{ |
|
|
|
|
.main { |
|
|
|
|
overflow: auto; |
|
|
|
|
overflow-x: hidden; |
|
|
|
|
height: calc(100vh - 152px ); |
|
|
|
|
height: calc(100vh - 152px); |
|
|
|
|
} |
|
|
|
|
</style> |