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