|
|
@ -6,7 +6,8 @@ |
|
|
|
<div class="flex-between"> |
|
|
|
<div class="flex-between"> |
|
|
|
<el-page-header @back="goBack" content="项目配置"></el-page-header> |
|
|
|
<el-page-header @back="goBack" content="项目配置"></el-page-header> |
|
|
|
<div v-if="!isDetail"> |
|
|
|
<div v-if="!isDetail"> |
|
|
|
<el-button v-if="!projectId" type="success" size="small" @click="handleSubmit(0)">保存为草稿</el-button> |
|
|
|
<el-button v-if="!projectId" type="success" size="small" @click="handleSubmit(0)">保存为草稿 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleSubmit(1)">确定并发布</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleSubmit(1)">确定并发布</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -23,10 +24,12 @@ |
|
|
|
<el-form label-width="80px"> |
|
|
|
<el-form label-width="80px"> |
|
|
|
<div style="display: flex"> |
|
|
|
<div style="display: flex"> |
|
|
|
<el-form-item label="项目名称"> |
|
|
|
<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> |
|
|
|
<el-form-item label="项目权限"> |
|
|
|
<el-form-item label="项目权限"> |
|
|
|
<el-select :disabled="isDetail" v-model="projectManage.permissions" placeholder="请选择"> |
|
|
|
<el-select :disabled="isDetail" v-model="projectManage.permissions" |
|
|
|
|
|
|
|
placeholder="请选择"> |
|
|
|
<el-option label="练习" :value="0"></el-option> |
|
|
|
<el-option label="练习" :value="0"></el-option> |
|
|
|
<el-option label="考核" :value="1"></el-option> |
|
|
|
<el-option label="考核" :value="1"></el-option> |
|
|
|
<el-option label="竞赛" :value="2"></el-option> |
|
|
|
<el-option label="竞赛" :value="2"></el-option> |
|
|
@ -46,7 +49,8 @@ |
|
|
|
<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> |
|
|
@ -61,7 +65,8 @@ |
|
|
|
<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" /> |
|
|
|
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentDescription" |
|
|
|
|
|
|
|
:minHeight="150" :height="150" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -74,7 +79,8 @@ |
|
|
|
<span>实验任务</span> |
|
|
|
<span>实验任务</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<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="border-b-dashed"></div> |
|
|
|
<div class="border-b-dashed"></div> |
|
|
@ -86,13 +92,22 @@ |
|
|
|
</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="avgDistributionScore"> |
|
|
|
<el-button :disabled="isDetail" class="m-r-20" type="text" @click="manualDistributionScore">手动分配分值</el-button> |
|
|
|
平均分配分值 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-button :disabled="isDetail" class="m-r-20" type="text" @click="manualDistributionScore"> |
|
|
|
|
|
|
|
手动分配分值 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
<span>(待分配分值: {{ handDistributionScore }}/100分)</span> |
|
|
|
<span>(待分配分值: {{ handDistributionScore }}/100分)</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</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-plus" round |
|
|
|
<el-button :disabled="isDetail" type="primary" icon="el-icon-delete" round @click="batchDeleteProjectJudgment" style="margin-bottom: 10px">批量删除</el-button> |
|
|
|
@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> |
|
|
|
|
|
|
|
<div class="draggable"> |
|
|
|
<el-table |
|
|
|
<el-table |
|
|
|
ref="projectJudgementTable" |
|
|
|
ref="projectJudgementTable" |
|
|
|
:data="projectJudgmentData" |
|
|
|
:data="projectJudgmentData" |
|
|
@ -103,51 +118,38 @@ |
|
|
|
row-key="judgmentId" |
|
|
|
row-key="judgmentId" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column> |
|
|
|
<el-table-column prop="id" label="序号" width="80" align="center"> |
|
|
|
<el-table-column prop="sort" label="序号" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.$index + 1 }} |
|
|
|
{{ 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" label="判分指标" align="center"></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"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
:disabled="isDetail" |
|
|
|
|
|
|
|
v-show="scope.$index > 0" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
icon="el-icon-top" |
|
|
|
|
|
|
|
@click="handleMoveUp(scope.$index)" |
|
|
|
|
|
|
|
style="font-size: 24px" |
|
|
|
|
|
|
|
></el-button> |
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
:disabled="isDetail" |
|
|
|
|
|
|
|
v-show="(scope.$index+1) < projectJudgmentData.length" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
icon="el-icon-bottom" |
|
|
|
|
|
|
|
@click="handleMoveDown(scope.$index)" |
|
|
|
|
|
|
|
style="font-size: 24px" |
|
|
|
|
|
|
|
></el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="实验要求" align="center"> |
|
|
|
<el-table-column label="实验要求" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<quill :border="true" :readonly="true" elseRead="true" v-model="scope.row.experimentalRequirements" :minHeight="150" :height="150" /> |
|
|
|
<quill :border="true" :readonly="true" elseRead="true" |
|
|
|
|
|
|
|
v-model="scope.row.experimentalRequirements" :minHeight="150" |
|
|
|
|
|
|
|
:height="150" /> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="140" align="center"> |
|
|
|
<el-table-column label="操作" width="140" 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 :disabled="isDetail" type="text" @click="delJudgePoint(scope.$index)">删除</el-button> |
|
|
|
<el-button :disabled="isDetail" type="text" @click="delJudgePoint(scope.$index)"> |
|
|
|
|
|
|
|
删除 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="score" label="分数" align="center"> |
|
|
|
<el-table-column prop="score" label="分数" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!--type="number"--> |
|
|
|
<!--type="number"--> |
|
|
|
<el-input :disabled="isDetail" v-model.trim="scope.row.score" @input="scoreChange(scope.row, scope.$index)"></el-input> |
|
|
|
<el-input :disabled="isDetail" v-model.trim="scope.row.score" |
|
|
|
|
|
|
|
@blur="updateProjectJudgment" |
|
|
|
|
|
|
|
@input="scoreChange(scope.row, scope.$index,$event)"></el-input> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
@ -158,14 +160,16 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
启用 |
|
|
|
启用 |
|
|
|
<el-switch :disabled="isDetail" :active-value="0" :inactive-value="1" v-model="projectManage.hintOpen"></el-switch> |
|
|
|
<el-switch :disabled="isDetail" :active-value="0" :inactive-value="1" |
|
|
|
|
|
|
|
v-model="projectManage.hintOpen"></el-switch> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="border-b-dashed"></div> |
|
|
|
<div class="border-b-dashed"></div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-form label-width="0"> |
|
|
|
<el-form label-width="0"> |
|
|
|
<el-form-item prop="tips" label=""> |
|
|
|
<el-form-item prop="tips" label=""> |
|
|
|
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentHint" :minHeight="150" :height="150" /> |
|
|
|
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentHint" |
|
|
|
|
|
|
|
:minHeight="150" :height="150" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -175,13 +179,14 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!--选择判分点对话框--> |
|
|
|
<!--选择判分点对话框--> |
|
|
|
<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 mgb10"> |
|
|
|
<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" |
|
|
|
:data="judgementData" |
|
|
|
:data="judgementData" |
|
|
|
ref="judgementTable" |
|
|
|
ref="judgementTable" |
|
|
|
class="table" |
|
|
|
class="table" |
|
|
@ -215,6 +220,8 @@ |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import Setting from "@/setting"; |
|
|
|
import Setting from "@/setting"; |
|
|
|
import quill from "@/components/quill"; |
|
|
|
import quill from "@/components/quill"; |
|
|
|
|
|
|
|
import Sortable from "sortablejs"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
quill |
|
|
|
quill |
|
|
@ -222,8 +229,7 @@ export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
projectId: this.$route.query.projectId, |
|
|
|
projectId: this.$route.query.projectId, |
|
|
|
systemList: Setting.systemList, |
|
|
|
token: btoa(sessionStorage.getItem("token")), |
|
|
|
token: btoa(sessionStorage.getItem('token')), |
|
|
|
|
|
|
|
isDetail: Boolean(this.$route.query.show), |
|
|
|
isDetail: Boolean(this.$route.query.show), |
|
|
|
|
|
|
|
|
|
|
|
projectManage: { |
|
|
|
projectManage: { |
|
|
@ -254,7 +260,8 @@ export default { |
|
|
|
avgValuelist: [], //取得判分点平均分的数组 |
|
|
|
avgValuelist: [], //取得判分点平均分的数组 |
|
|
|
|
|
|
|
|
|
|
|
searchTimer: null, |
|
|
|
searchTimer: null, |
|
|
|
isToPoint: false // 判断是否是跳转到判分点系统 |
|
|
|
isToPoint: false, // 判断是否是跳转到判分点系统 |
|
|
|
|
|
|
|
visibleLoading: false// 加载判分点数据 |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -302,15 +309,16 @@ export default { |
|
|
|
this.getInfoData(); |
|
|
|
this.getInfoData(); |
|
|
|
} |
|
|
|
} |
|
|
|
// 判断有没有缓存数据 |
|
|
|
// 判断有没有缓存数据 |
|
|
|
if (JSON.stringify(this.projectFields) != '{}') { |
|
|
|
if (JSON.stringify(this.projectFields) != "{}") { |
|
|
|
let { projectManage, projectJudgmentData } = this.projectFields; |
|
|
|
let { projectManage, projectJudgmentData } = this.projectFields; |
|
|
|
this.projectManage = projectManage; |
|
|
|
this.projectManage = projectManage; |
|
|
|
this.projectJudgmentData = projectJudgmentData; |
|
|
|
this.projectJudgmentData = projectJudgmentData; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.rowDrop(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
beforeDestroy() { |
|
|
|
if (!this.isToPoint) { |
|
|
|
if (!this.isToPoint) { |
|
|
|
this.$store.dispatch('setProject',{}); |
|
|
|
this.$store.dispatch("setProject", {}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
@ -362,7 +370,7 @@ export default { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.projectJudgmentData = []; |
|
|
|
this.projectJudgmentData = []; |
|
|
|
this.$store.dispatch('setSystemId',this.projectManage.systemId); |
|
|
|
this.$store.dispatch("setSystemId", this.projectManage.systemId); |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
this.projectManage.systemId = this.lastSystemId; |
|
|
|
this.projectManage.systemId = this.lastSystemId; |
|
|
|
console.log(this.lastSystemId, "this.lastSystemId"); |
|
|
|
console.log(this.lastSystemId, "this.lastSystemId"); |
|
|
@ -415,7 +423,7 @@ export default { |
|
|
|
if (!this.judgmentRelease()) { //判断页面是否有没有输入的内容 |
|
|
|
if (!this.judgmentRelease()) { //判断页面是否有没有输入的内容 |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
this.$store.dispatch('setSystemId',this.projectManage.systemId) |
|
|
|
this.$store.dispatch("setSystemId", this.projectManage.systemId); |
|
|
|
this.projectManage.state = state; |
|
|
|
this.projectManage.state = state; |
|
|
|
let tempArr = this.projectJudgmentData.map(i => { |
|
|
|
let tempArr = this.projectJudgmentData.map(i => { |
|
|
|
let obj = { |
|
|
|
let obj = { |
|
|
@ -486,12 +494,12 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleMoveUp(index) { // 处理上移 |
|
|
|
handleMoveUp(index) { // 处理上移(作废) |
|
|
|
let x = index; |
|
|
|
let x = index; |
|
|
|
let y = index + 1; |
|
|
|
let y = index + 1; |
|
|
|
this.projectJudgmentData.splice(x - 1, 1, ...this.projectJudgmentData.splice(y - 1, 1, this.projectJudgmentData[x - 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 x = index + 1; |
|
|
|
let y = index + 2; |
|
|
|
let y = index + 2; |
|
|
|
this.projectJudgmentData.splice(x - 1, 1, ...this.projectJudgmentData.splice(y - 1, 1, this.projectJudgmentData[x - 1])); |
|
|
|
this.projectJudgmentData.splice(x - 1, 1, ...this.projectJudgmentData.splice(y - 1, 1, this.projectJudgmentData[x - 1])); |
|
|
@ -553,6 +561,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getProcessClassData(params) { // 获取流程类判分点列表数据 |
|
|
|
getProcessClassData(params) { // 获取流程类判分点列表数据 |
|
|
|
|
|
|
|
this.visibleLoading = true; |
|
|
|
this.$post(`${this.api.getLcJudgmentPoint}`, params).then(res => { |
|
|
|
this.$post(`${this.api.getLcJudgmentPoint}`, params).then(res => { |
|
|
|
if (res.status === 200) { |
|
|
|
if (res.status === 200) { |
|
|
|
let list = res.message.records; |
|
|
|
let list = res.message.records; |
|
|
@ -561,6 +570,7 @@ export default { |
|
|
|
i.judgmentId = i.lcId; |
|
|
|
i.judgmentId = i.lcId; |
|
|
|
this.projectJudgmentData.find(j => j.judgmentId === i.judgmentId) || result.push(i); |
|
|
|
this.projectJudgmentData.find(j => j.judgmentId === i.judgmentId) || result.push(i); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this.visibleLoading = false; |
|
|
|
this.judgementData = result; |
|
|
|
this.judgementData = result; |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
@ -568,6 +578,7 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getProgrammingClassData(params) { // 获取编程类判分点列表数据 |
|
|
|
getProgrammingClassData(params) { // 获取编程类判分点列表数据 |
|
|
|
|
|
|
|
this.visibleLoading = true; |
|
|
|
this.$post(this.api.getBcJudgmentPoint, params).then(res => { |
|
|
|
this.$post(this.api.getBcJudgmentPoint, params).then(res => { |
|
|
|
if (res.status === 200) { |
|
|
|
if (res.status === 200) { |
|
|
|
let list = res.message.records; |
|
|
|
let list = res.message.records; |
|
|
@ -576,9 +587,9 @@ export default { |
|
|
|
i.judgmentId = i.bcId; |
|
|
|
i.judgmentId = i.bcId; |
|
|
|
this.projectJudgmentData.find(j => j.judgmentId === i.judgmentId) || result.push(i); |
|
|
|
this.projectJudgmentData.find(j => j.judgmentId === i.judgmentId) || result.push(i); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this.visibleLoading = false; |
|
|
|
this.judgementData = result; |
|
|
|
this.judgementData = result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -589,34 +600,139 @@ export default { |
|
|
|
addJudgment() { // 确认选择判分点 |
|
|
|
addJudgment() { // 确认选择判分点 |
|
|
|
if (this.selectedJudgment.length) { |
|
|
|
if (this.selectedJudgment.length) { |
|
|
|
this.dialogVisible = false; |
|
|
|
this.dialogVisible = false; |
|
|
|
|
|
|
|
if (this.projectId) { // 编辑的时候,新增调接口 |
|
|
|
|
|
|
|
this.addProjectJudgment(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 新增时,假添加 |
|
|
|
let tempArr = this.selectedJudgment.map(i => { |
|
|
|
let tempArr = this.selectedJudgment.map(i => { |
|
|
|
i.score = 0; |
|
|
|
i.score = 0; |
|
|
|
return i; |
|
|
|
return i; |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.projectJudgmentData = this.projectJudgmentData.concat(tempArr); |
|
|
|
this.projectJudgmentData = this.projectJudgmentData.concat(tempArr); |
|
|
|
|
|
|
|
this.projectJudgmentData.map((e, i) => { |
|
|
|
|
|
|
|
e.sort = i + 1; |
|
|
|
|
|
|
|
}); |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.projectJudgementTable.clearSelection(); |
|
|
|
this.$refs.projectJudgementTable.clearSelection(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$message.warning("请选择判分点"); |
|
|
|
this.$message.warning("请选择判分点"); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 行拖拽 |
|
|
|
|
|
|
|
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 }) { |
|
|
|
|
|
|
|
let newItem = _this.projectJudgmentData[newIndex]; |
|
|
|
|
|
|
|
_this.projectJudgmentData[newIndex] = _this.projectJudgmentData[oldIndex]; |
|
|
|
|
|
|
|
_this.projectJudgmentData[oldIndex] = newItem; |
|
|
|
|
|
|
|
// 循环,重新赋值排序赋值 |
|
|
|
|
|
|
|
_this.projectJudgmentData.forEach((e, i) => { |
|
|
|
|
|
|
|
_this.$set(e, "sort", i + 1);// 不更新 |
|
|
|
|
|
|
|
_this.$set(e, "name", e.name + "?"); |
|
|
|
|
|
|
|
_this.$set(e, "name", e.name.slice(0, e.name.length - 1)); // 不更新的解决方案 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// 调修改接口,更新列表 |
|
|
|
|
|
|
|
if (_this.projectId) {// 如果是编辑项目,则调编辑接口 |
|
|
|
|
|
|
|
_this.updateProjectJudgment(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 添加判分点中间表 |
|
|
|
|
|
|
|
addProjectJudgment() { |
|
|
|
|
|
|
|
let param = this.selectedJudgment.map((e, i) => { |
|
|
|
|
|
|
|
let obj = { |
|
|
|
|
|
|
|
judgmentId: e.judgmentId, |
|
|
|
|
|
|
|
projectId: this.projectId || "", |
|
|
|
|
|
|
|
score: 0, |
|
|
|
|
|
|
|
sort: i + 1 |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return obj; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
console.log(param, "param", this.projectId); |
|
|
|
|
|
|
|
this.$post(this.api.addProjectJudgment, param).then(res => { |
|
|
|
|
|
|
|
// 重新调接口 |
|
|
|
|
|
|
|
console.log("添加成功", res); |
|
|
|
|
|
|
|
if (this.projectId) { // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
|
|
|
|
this.listAgain(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 修改判分点中间表 |
|
|
|
|
|
|
|
updateProjectJudgment() { |
|
|
|
|
|
|
|
// 直接传data回去 |
|
|
|
|
|
|
|
let param = this.projectJudgmentData.map((e, i) => { |
|
|
|
|
|
|
|
let obj = { |
|
|
|
|
|
|
|
judgmentId: e.judgmentId, |
|
|
|
|
|
|
|
projectId: this.projectId || "", |
|
|
|
|
|
|
|
score: e.score, |
|
|
|
|
|
|
|
sort: i + 1, |
|
|
|
|
|
|
|
id: e.id |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return obj; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.$post(this.api.updateProjectJudgment, param).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 重新调接口 |
|
|
|
|
|
|
|
if (this.projectId) { // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
|
|
|
|
this.listAgain(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 批量删除判分点中间表 |
|
|
|
|
|
|
|
deleteProjectJudgment(values) { |
|
|
|
|
|
|
|
if (values && values.length > 0) { |
|
|
|
|
|
|
|
this.$post(this.api.deleteProjectJudgment + "?projectJudgmentIds=" + `${values}`).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 重新调接口 |
|
|
|
|
|
|
|
if (this.projectId) { // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
|
|
|
|
this.listAgain(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 重新调接口,专门赋值列表 |
|
|
|
|
|
|
|
listAgain() { |
|
|
|
|
|
|
|
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { |
|
|
|
|
|
|
|
let { projectManage, projectJudgmentVos } = res; |
|
|
|
|
|
|
|
this.projectJudgmentData = projectJudgmentVos; |
|
|
|
|
|
|
|
this.projectJudgmentData.map((e, i) => { |
|
|
|
|
|
|
|
e.sort = i + 1; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
handleCacheData() { // 处理缓存数据 |
|
|
|
handleCacheData() { // 处理缓存数据 |
|
|
|
this.isToPoint = true; |
|
|
|
this.isToPoint = true; |
|
|
|
this.$store.dispatch('setProject',{ projectManage: this.projectManage, projectJudgmentData: this.projectJudgmentData }); |
|
|
|
this.$store.dispatch("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 { systemId } = this.projectManage; |
|
|
|
let { systemId } = this.projectManage; |
|
|
|
let href = ""; |
|
|
|
let href = ""; |
|
|
|
if (type === "view") { |
|
|
|
if (type === "view") { |
|
|
|
// 查看 |
|
|
|
// 查看 |
|
|
|
if (systemId == 2) { |
|
|
|
if (systemId == 2) { |
|
|
|
href = `${jumpPath}/#/programOption?id=${row.judgmentPointsId}`; |
|
|
|
console.log(systemId); |
|
|
|
} else if (systemId == 3) { |
|
|
|
} else if (systemId == 3) { |
|
|
|
href = `${jumpPath}/#/programOptions?id=${row.judgmentPointsId}`; |
|
|
|
console.log(systemId); |
|
|
|
} else if (systemId == 11) { |
|
|
|
} else if (systemId == 11) { |
|
|
|
// 交易类判分点(银行综合系统) |
|
|
|
// 交易类判分点(银行综合系统) |
|
|
|
href = `${jumpPath}/#/Transaction?isView=true&systemId=${systemId}&lcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
href = `${jumpPath}/#/Transaction?isView=true&systemId=${systemId}&lcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
@ -627,9 +743,9 @@ export default { |
|
|
|
} else if (type === "edit") { |
|
|
|
} else if (type === "edit") { |
|
|
|
// 自定义(老师端隐藏此功能) |
|
|
|
// 自定义(老师端隐藏此功能) |
|
|
|
if (systemId == 2) { |
|
|
|
if (systemId == 2) { |
|
|
|
href = `${jumpPath}/#/programOption?id=${row.judgmentPointsId}`; |
|
|
|
console.log(systemId); |
|
|
|
} else if (systemId == 3) { |
|
|
|
} else if (systemId == 3) { |
|
|
|
href = `${jumpPath}/#/programOptions?id=${row.judgmentPointsId}`; |
|
|
|
console.log(systemId); |
|
|
|
} else if (systemId == 11) { |
|
|
|
} else if (systemId == 11) { |
|
|
|
// 交易类判分点(银行综合系统) |
|
|
|
// 交易类判分点(银行综合系统) |
|
|
|
href = `${jumpPath}/#/Transaction?isEdit=true&systemId=${systemId}&lcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
href = `${jumpPath}/#/Transaction?isEdit=true&systemId=${systemId}&lcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
@ -637,7 +753,7 @@ export default { |
|
|
|
// 编程类判分点(python子系统) |
|
|
|
// 编程类判分点(python子系统) |
|
|
|
href = `${jumpPath}/#/program?isEdit=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
href = `${jumpPath}/#/program?isEdit=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (type === 'home') { |
|
|
|
} else if (type === "home") { |
|
|
|
if (systemId == 2 || systemId == 3) { |
|
|
|
if (systemId == 2 || systemId == 3) { |
|
|
|
href = `${jumpPath}/#/list`; |
|
|
|
href = `${jumpPath}/#/list`; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -648,7 +764,7 @@ export default { |
|
|
|
location.href = href; |
|
|
|
location.href = href; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|