|
|
|
@ -5,8 +5,8 @@ |
|
|
|
|
<div class="flex-between"> |
|
|
|
|
<el-page-header @back="goBack" content="项目配置"></el-page-header> |
|
|
|
|
<div v-if="!isDetail"> |
|
|
|
|
<el-button v-if="!projectId" type="success" @click="handleSubmit(0)">保存为草稿</el-button> |
|
|
|
|
<el-button type="primary" @click="handleSubmit(1)">确定并发布</el-button> |
|
|
|
|
<el-button v-if="!projectId && item != 0" type="success" @click="handleSubmit(0)">保存为草稿</el-button> |
|
|
|
|
<el-button v-if='item != 0' type="primary" @click="handleSubmit(1)">确定并发布</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
@ -17,17 +17,17 @@ |
|
|
|
|
<el-form label-width="80px"> |
|
|
|
|
<div class="flex"> |
|
|
|
|
<el-form-item label="项目名称"> |
|
|
|
|
<el-input :disabled="isDetail" v-model.trim="projectManage.projectName" placeholder="20个字符以内" @blur="projectNameExistis"></el-input> |
|
|
|
|
<el-input :disabled="isDetail || item == 0" v-model.trim="projectManage.projectName" placeholder="20个字符以内" @blur="projectNameExistis"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="项目权限"> |
|
|
|
|
<el-select :disabled="isDetail" v-model="projectManage.permissions" placeholder="请选择"> |
|
|
|
|
<el-select :disabled="isDetail || item == 0" v-model="projectManage.permissions" placeholder="请选择"> |
|
|
|
|
<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> |
|
|
|
|
<el-form-item label="系统"> |
|
|
|
|
<el-select :disabled="isDetail" v-model="projectManage.systemId" placeholder="请选择" @change="systemChange"> |
|
|
|
|
<el-select :disabled="isDetail || item == 0" v-model="projectManage.systemId" placeholder="请选择" @change="systemChange"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in systemList" |
|
|
|
|
:key="item.id" |
|
|
|
@ -46,7 +46,7 @@ |
|
|
|
|
<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 || item == 0" v-model="projectManage.experimentTarget" :minHeight="150" :height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -57,7 +57,7 @@ |
|
|
|
|
<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 || item == 0" v-model="projectManage.experimentDescription" :minHeight="150" :height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -76,13 +76,13 @@ |
|
|
|
|
<!-- <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> |
|
|
|
|
<el-button :disabled="isDetail" class="m-r-20" type="text" @click="manualDistributionScore">手动分配分值</el-button> |
|
|
|
|
<el-button :disabled="isDetail || item == 0" class="m-r-20" type="text" @click="avgDistributionScore">平均分配分值</el-button> |
|
|
|
|
<el-button :disabled="isDetail || item == 0" 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="handleQueryJudgment" 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> |
|
|
|
|
<el-button :disabled="isDetail || item == 0" type="primary" icon="el-icon-plus" round @click="handleQueryJudgment" style="margin-bottom: 10px">判分点</el-button> |
|
|
|
|
<el-button :disabled="isDetail || item == 0" type="primary" icon="el-icon-delete" round @click="batchDeleteProjectJudgment" style="margin-bottom: 10px">批量删除</el-button> |
|
|
|
|
<div class="draggable"> |
|
|
|
|
<el-table |
|
|
|
|
ref="projectJudgementTable" |
|
|
|
@ -110,13 +110,13 @@ |
|
|
|
|
<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> |
|
|
|
|
<el-button :disabled="isDetail || item == 0" type="text" @click="delJudgePoint(scope.$index)">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="score" label="分数" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<!--type="number" @blur="updateProjectJudgment"--> |
|
|
|
|
<el-input :disabled="isDetail" v-model.trim="scope.row.score" @input="scoreChange(scope.row, scope.$index,$event)"></el-input> |
|
|
|
|
<el-input :disabled="isDetail || item == 0" v-model.trim="scope.row.score" @input="scoreChange(scope.row, scope.$index,$event)"></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -128,13 +128,13 @@ |
|
|
|
|
<h6 class="p-title" style="margin-bottom: 0">实验提示</h6> |
|
|
|
|
<div> |
|
|
|
|
启用 |
|
|
|
|
<el-switch :disabled="isDetail" :active-value="0" :inactive-value="1" v-model="projectManage.hintOpen"></el-switch> |
|
|
|
|
<el-switch :disabled="isDetail || item == 0" :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" /> |
|
|
|
|
<quill :border="true" :readonly="isDetail || item == 0" v-model="projectManage.experimentHint" :minHeight="150" :height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -193,6 +193,7 @@ export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
projectId: this.$route.query.projectId, |
|
|
|
|
item: this.$route.query.item, |
|
|
|
|
systemList: [], |
|
|
|
|
token: util.local.get(Setting.tokenKey), |
|
|
|
|
isDetail: Boolean(this.$route.query.show), |
|
|
|
|