|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div ref="main" class="main"> |
|
|
|
<div> |
|
|
|
<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"> |
|
|
@ -30,7 +30,7 @@ |
|
|
|
<el-select :disabled="isDetail" v-model="projectManage.systemId" placeholder="请选择" @change="systemChange"> |
|
|
|
<el-select :disabled="isDetail" v-model="projectManage.systemId" placeholder="请选择" @change="systemChange"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in systemList" |
|
|
|
v-for="item in systemList" |
|
|
|
:key="item.value" |
|
|
|
:key="item.id" |
|
|
|
:label="item.label" |
|
|
|
:label="item.label" |
|
|
|
:value="item.id" |
|
|
|
:value="item.id" |
|
|
|
></el-option> |
|
|
|
></el-option> |
|
|
@ -83,7 +83,7 @@ |
|
|
|
</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 @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" type="primary" icon="el-icon-delete" round @click="batchDeleteProjectJudgment" style="margin-bottom: 10px">批量删除</el-button> |
|
|
|
<div class="draggable" style="padding: 20px"> |
|
|
|
<div class="draggable"> |
|
|
|
<el-table |
|
|
|
<el-table |
|
|
|
ref="projectJudgementTable" |
|
|
|
ref="projectJudgementTable" |
|
|
|
:data="projectJudgmentData" |
|
|
|
:data="projectJudgmentData" |
|
|
@ -92,12 +92,11 @@ |
|
|
|
header-align="center" |
|
|
|
header-align="center" |
|
|
|
@selection-change="handleSelectionProjectJudgment" |
|
|
|
@selection-change="handleSelectionProjectJudgment" |
|
|
|
row-key="judgmentId" |
|
|
|
row-key="judgmentId" |
|
|
|
v-loading="listLoading" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<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="sort" label="序号" width="80" align="center"> |
|
|
|
<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" label="判分指标" align="center"></el-table-column> |
|
|
@ -184,17 +183,16 @@ import Setting from "@/setting"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import quill from "@/components/quill"; |
|
|
|
import quill from "@/components/quill"; |
|
|
|
import Sortable from 'sortablejs'; |
|
|
|
import Sortable from "sortablejs"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
quill |
|
|
|
quill |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
host: Setting.apiBaseURL, |
|
|
|
|
|
|
|
isHh: Setting.isHh, |
|
|
|
|
|
|
|
projectId: this.$route.query.projectId, |
|
|
|
projectId: this.$route.query.projectId, |
|
|
|
systemList: Setting.systemList, |
|
|
|
systemList: [], |
|
|
|
token: btoa(util.local.get(Setting.tokenKey)), |
|
|
|
token: btoa(util.local.get(Setting.tokenKey)), |
|
|
|
isDetail: Boolean(this.$route.query.show), |
|
|
|
isDetail: Boolean(this.$route.query.show), |
|
|
|
|
|
|
|
|
|
|
@ -226,8 +224,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
searchTimer: null, |
|
|
|
searchTimer: null, |
|
|
|
isToPoint: false, // 判断是否是跳转到判分点系统 |
|
|
|
isToPoint: false, // 判断是否是跳转到判分点系统 |
|
|
|
visibleLoading:false,// 加载弹框 |
|
|
|
visibleLoading: false// 加载弹框 |
|
|
|
listLoading:false,// 列表加载 |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -247,16 +244,17 @@ export default { |
|
|
|
// util.warningMsg(res.message); |
|
|
|
// util.warningMsg(res.message); |
|
|
|
util.errorMsg("分配的数值已超过100"); |
|
|
|
util.errorMsg("分配的数值已超过100"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log("chuli"); |
|
|
|
return score; |
|
|
|
return score; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
// projectJudgmentData: { |
|
|
|
projectJudgmentData: { |
|
|
|
// handler(newValue) { |
|
|
|
handler(newValue) { |
|
|
|
// console.log("newValue:", newValue); |
|
|
|
console.log("newValue:", newValue); |
|
|
|
// }, |
|
|
|
}, |
|
|
|
// deep: true |
|
|
|
deep: true |
|
|
|
// }, |
|
|
|
}, |
|
|
|
judgementpointsquery(n) { |
|
|
|
judgementpointsquery(n) { |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
@ -265,7 +263,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
created() { |
|
|
|
// console.log(this.projectManage.systemId, "this.projectManage.systemId", this.lastSystemId); |
|
|
|
this.getSystemData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
if (this.$route.query.projectId) { |
|
|
|
if (this.$route.query.projectId) { |
|
|
@ -278,7 +276,7 @@ export default { |
|
|
|
this.projectManage = projectManage; |
|
|
|
this.projectManage = projectManage; |
|
|
|
this.projectJudgmentData = projectJudgmentData; |
|
|
|
this.projectJudgmentData = projectJudgmentData; |
|
|
|
} |
|
|
|
} |
|
|
|
this.rowDrop() |
|
|
|
this.rowDrop(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
beforeDestroy() { |
|
|
|
if (!this.isToPoint) { |
|
|
|
if (!this.isToPoint) { |
|
|
@ -301,15 +299,20 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
getSystemData() { |
|
|
|
|
|
|
|
this.$get(this.api.getSystemIdBySchool).then(res => { |
|
|
|
|
|
|
|
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 => { |
|
|
|
if (res.status === 200) { |
|
|
|
if (res.status === 200) { |
|
|
|
let { projectManage, projectJudgmentVos } = res; |
|
|
|
let { projectManage, projectJudgmentVos } = res; |
|
|
|
this.projectManage = projectManage; |
|
|
|
this.projectManage = projectManage; |
|
|
|
this.projectJudgmentData = projectJudgmentVos; |
|
|
|
this.projectJudgmentData = projectJudgmentVos; |
|
|
|
this.projectJudgmentData.forEach((e,i)=>{ |
|
|
|
this.projectJudgmentData.forEach((e, i) => { |
|
|
|
e.sort = i+1 |
|
|
|
e.sort = i + 1; |
|
|
|
}) |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
util.warningMsg(res.message); |
|
|
|
util.warningMsg(res.message); |
|
|
|
} |
|
|
|
} |
|
|
@ -341,7 +344,7 @@ export default { |
|
|
|
this.setSystemId(this.projectManage.systemId); |
|
|
|
this.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"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -398,7 +401,7 @@ export default { |
|
|
|
projectId: this.projectId ? this.projectId : "", |
|
|
|
projectId: this.projectId ? this.projectId : "", |
|
|
|
judgmentId: i.judgmentId, |
|
|
|
judgmentId: i.judgmentId, |
|
|
|
score: i.score, |
|
|
|
score: i.score, |
|
|
|
sort:i.sort |
|
|
|
sort: i.sort |
|
|
|
}; |
|
|
|
}; |
|
|
|
return obj; |
|
|
|
return obj; |
|
|
|
}); |
|
|
|
}); |
|
|
@ -459,7 +462,7 @@ export default { |
|
|
|
item.score = res.data[index]; |
|
|
|
item.score = res.data[index]; |
|
|
|
return item; |
|
|
|
return item; |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.updateProjectJudgment() |
|
|
|
this.updateProjectJudgment(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -474,16 +477,16 @@ export default { |
|
|
|
// 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])); |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
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(() => { |
|
|
|
if(this.projectId){ |
|
|
|
if (this.projectId) { |
|
|
|
this.deleteProjectJudgment([this.projectJudgmentData[index].id]) |
|
|
|
this.deleteProjectJudgment([this.projectJudgmentData[index].id]); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.projectJudgmentData.splice(index, 1); |
|
|
|
this.projectJudgmentData.splice(index, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
@ -498,10 +501,10 @@ export default { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
// this.projectJudgmentData.splice(index, 1); |
|
|
|
// this.projectJudgmentData.splice(index, 1); |
|
|
|
if(this.projectId){// 编辑项目的时候 |
|
|
|
if (this.projectId) {// 编辑项目的时候 |
|
|
|
let param = this.selectedProjectJudgment.map(e=>e.id) |
|
|
|
let param = this.selectedProjectJudgment.map(e => e.id); |
|
|
|
this.deleteProjectJudgment(param)// 调删除接口 |
|
|
|
this.deleteProjectJudgment(param);// 调删除接口 |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
let list = this.projectJudgmentData; |
|
|
|
let list = this.projectJudgmentData; |
|
|
|
let result = []; |
|
|
|
let result = []; |
|
|
|
list.map(i => { |
|
|
|
list.map(i => { |
|
|
@ -540,7 +543,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getProcessClassData(params) { // 获取流程类判分点列表数据 |
|
|
|
getProcessClassData(params) { // 获取流程类判分点列表数据 |
|
|
|
this.visibleLoading = true |
|
|
|
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; |
|
|
@ -549,7 +552,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.visibleLoading = false; |
|
|
|
this.judgementData = result; |
|
|
|
this.judgementData = result; |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
@ -557,7 +560,7 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getProgrammingClassData(params) { // 获取编程类判分点列表数据 |
|
|
|
getProgrammingClassData(params) { // 获取编程类判分点列表数据 |
|
|
|
this.visibleLoading = true |
|
|
|
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; |
|
|
@ -566,12 +569,11 @@ 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.visibleLoading = false; |
|
|
|
this.judgementData = result; |
|
|
|
this.judgementData = result; |
|
|
|
console.log(res,'res') |
|
|
|
// console.log(res, "res"); |
|
|
|
console.log(this.projectJudgmentData,'projectJudgmentData') |
|
|
|
// console.log(this.projectJudgmentData, "projectJudgmentData"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -581,20 +583,20 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
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; |
|
|
|
if(this.projectId){ // 编辑的时候,新增调接口 |
|
|
|
if (this.projectId) { // 编辑的时候,新增调接口 |
|
|
|
this.addProjectJudgment() |
|
|
|
this.addProjectJudgment(); |
|
|
|
}else{ |
|
|
|
} 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)=>{ |
|
|
|
this.projectJudgmentData.map((e, i) => { |
|
|
|
e.sort = i+1 |
|
|
|
e.sort = i + 1; |
|
|
|
}) |
|
|
|
}); |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.projectJudgementTable.clearSelection(); |
|
|
|
this.$refs.projectJudgementTable.clearSelection(); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -609,42 +611,42 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
toJudgePoint(type, row) { // 进入判分点系统 |
|
|
|
toJudgePoint(type, row) { // 进入判分点系统 |
|
|
|
this.handleCacheData(); |
|
|
|
this.handleCacheData(); |
|
|
|
// let host = this.host; |
|
|
|
let jumpPath = Setting.jumpPath; |
|
|
|
let host = "http://192.168.31.154:8087/"; // 本地 |
|
|
|
// 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 = `${host}jdTrials/#/programOption?id=${row.judgmentPointsId}`; |
|
|
|
console.log(systemId); |
|
|
|
} else if (systemId == 3) { |
|
|
|
} else if (systemId == 3) { |
|
|
|
href = `${host}jdTrials/#/programOptions?id=${row.judgmentPointsId}`; |
|
|
|
console.log(systemId); |
|
|
|
} else if (systemId == 11) { |
|
|
|
} else if (systemId == 11) { |
|
|
|
// 交易类判分点(银行综合系统) |
|
|
|
// 交易类判分点(银行综合系统) |
|
|
|
href = `${host}jdTrials/#/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)}`; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 编程类判分点(python子系统) |
|
|
|
// 编程类判分点(python子系统) |
|
|
|
href = `${host}jdTrials/#/program?isView=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
href = `${jumpPath}#/program?isView=true&systemId=${systemId}&bcId=${row.judgmentId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (type === "edit") { |
|
|
|
} else if (type === "edit") { |
|
|
|
// 自定义(老师端隐藏此功能) |
|
|
|
// 自定义(老师端隐藏此功能) |
|
|
|
if (systemId == 2) { |
|
|
|
if (systemId == 2) { |
|
|
|
href = `${host}jdTrials/#/programOption?id=${row.judgmentPointsId}`; |
|
|
|
console.log(systemId); |
|
|
|
} else if (systemId == 3) { |
|
|
|
} else if (systemId == 3) { |
|
|
|
href = `${host}jdTrials/#/programOptions?id=${row.judgmentPointsId}`; |
|
|
|
console.log(systemId); |
|
|
|
} else if (systemId == 11) { |
|
|
|
} else if (systemId == 11) { |
|
|
|
// 交易类判分点(银行综合系统) |
|
|
|
// 交易类判分点(银行综合系统) |
|
|
|
href = `${host}jdTrials/#/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)}`; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 编程类判分点(python子系统) |
|
|
|
// 编程类判分点(python子系统) |
|
|
|
href = `${host}jdTrials/#/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 = `${host}jdTrials/#/list`; |
|
|
|
console.log(systemId); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 进入判分点系统首页(老师端隐藏此功能) |
|
|
|
// 进入判分点系统首页(老师端隐藏此功能) |
|
|
|
href = `${host}#/?systemId=${systemId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
href = `${jumpPath}#/?systemId=${systemId}&token=${this.token}&referrer=${btoa(location.href)}`; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
location.href = href; |
|
|
|
location.href = href; |
|
|
@ -652,47 +654,45 @@ export default { |
|
|
|
// 行拖拽 |
|
|
|
// 行拖拽 |
|
|
|
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 }) { |
|
|
|
let newItem = _this.projectJudgmentData[newIndex] |
|
|
|
let newItem = _this.projectJudgmentData[newIndex]; |
|
|
|
_this.projectJudgmentData[newIndex] = _this.projectJudgmentData[oldIndex] |
|
|
|
_this.projectJudgmentData[newIndex] = _this.projectJudgmentData[oldIndex]; |
|
|
|
_this.projectJudgmentData[oldIndex] = newItem |
|
|
|
_this.projectJudgmentData[oldIndex] = newItem; |
|
|
|
// 循环,重新赋值排序赋值 |
|
|
|
// 循环,重新赋值排序赋值 |
|
|
|
_this.projectJudgmentData.forEach((e,i)=>{ |
|
|
|
_this.projectJudgmentData.forEach((e, i) => { |
|
|
|
_this.$set(e,'sort',i+1)// 不更新 |
|
|
|
_this.$set(e, "sort", i + 1);// 不更新 |
|
|
|
_this.$set(e,'name',e.name+"?") |
|
|
|
_this.$set(e, "name", e.name + "?"); |
|
|
|
_this.$set(e,'name',e.name.slice(0,e.name.length-1)) // 不更新的解决方案 |
|
|
|
_this.$set(e, "name", e.name.slice(0, e.name.length - 1)); // 不更新的解决方案 |
|
|
|
}) |
|
|
|
}); |
|
|
|
// console.log('处理',_this.projectJudgmentData) |
|
|
|
|
|
|
|
// 调修改接口,更新列表 |
|
|
|
// 调修改接口,更新列表 |
|
|
|
if(_this.projectId){// 如果是编辑项目,则调编辑接口 |
|
|
|
if (_this.projectId) {// 如果是编辑项目,则调编辑接口 |
|
|
|
console.log('调接口') |
|
|
|
_this.updateProjectJudgment(); |
|
|
|
_this.updateProjectJudgment() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 添加判分点中间表 |
|
|
|
// 添加判分点中间表 |
|
|
|
addProjectJudgment(){ |
|
|
|
addProjectJudgment() { |
|
|
|
let param = this.selectedJudgment.map((e,i)=>{ |
|
|
|
let param = this.selectedJudgment.map((e, i) => { |
|
|
|
let obj = { |
|
|
|
let obj = { |
|
|
|
judgmentId:e.judgmentId, |
|
|
|
judgmentId: e.judgmentId, |
|
|
|
projectId:this.projectId||'', |
|
|
|
projectId: this.projectId || "", |
|
|
|
score:0, |
|
|
|
score: 0, |
|
|
|
sort:i+1 |
|
|
|
sort: i + 1 |
|
|
|
} |
|
|
|
}; |
|
|
|
return obj |
|
|
|
return obj; |
|
|
|
}) |
|
|
|
}); |
|
|
|
console.log(param,'param',this.projectId,) |
|
|
|
// console.log(param, "param", this.projectId); |
|
|
|
this.$post(this.api.addProjectJudgment,param).then(res => { |
|
|
|
this.$post(this.api.addProjectJudgment, param).then(res => { |
|
|
|
// 重新调接口 |
|
|
|
// 重新调接口 |
|
|
|
console.log('添加成功',res) |
|
|
|
// console.log("添加成功", res); |
|
|
|
if(this.projectId){ // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
if (this.projectId) { // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
this.listAgain() |
|
|
|
this.listAgain(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
@ -700,62 +700,48 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 修改判分点中间表 |
|
|
|
// 修改判分点中间表 |
|
|
|
updateProjectJudgment(){ |
|
|
|
updateProjectJudgment() { |
|
|
|
// 直接传data回去 |
|
|
|
// 直接传data回去 |
|
|
|
let param = this.projectJudgmentData.map((e,i)=>{ |
|
|
|
let param = this.projectJudgmentData.map((e, i) => { |
|
|
|
let obj = { |
|
|
|
let obj = { |
|
|
|
judgmentId:e.judgmentId, |
|
|
|
judgmentId: e.judgmentId, |
|
|
|
projectId:this.projectId||'', |
|
|
|
projectId: this.projectId || "", |
|
|
|
score:e.score, |
|
|
|
score: e.score, |
|
|
|
sort:i+1, |
|
|
|
sort: i + 1, |
|
|
|
id:e.id |
|
|
|
id: e.id |
|
|
|
} |
|
|
|
}; |
|
|
|
return obj |
|
|
|
return obj; |
|
|
|
}) |
|
|
|
}); |
|
|
|
this.$post(this.api.updateProjectJudgment, param).then(res => { |
|
|
|
this.$post(this.api.updateProjectJudgment, param).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
// 重新调接口 |
|
|
|
// 重新调接口 |
|
|
|
if(this.projectId){ // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
if (this.projectId) { // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
this.listAgain() |
|
|
|
this.listAgain(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 批量删除判分点中间表 |
|
|
|
// 批量删除判分点中间表 |
|
|
|
deleteProjectJudgment(values){ |
|
|
|
deleteProjectJudgment(values) { |
|
|
|
if(values&&values.length>0){ |
|
|
|
if (values && values.length > 0) { |
|
|
|
this.$post(this.api.deleteProjectJudgment+"?projectJudgmentIds="+`${values}`).then(res => { |
|
|
|
this.$post(this.api.deleteProjectJudgment + "?projectJudgmentIds=" + `${values}`).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
// 重新调接口 |
|
|
|
// 重新调接口 |
|
|
|
if(this.projectId){ // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
if (this.projectId) { // 有项目id,调接口,没有项目id,手动更新 |
|
|
|
this.listAgain() |
|
|
|
this.listAgain(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => {}); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 重新调接口,专门赋值列表 |
|
|
|
// 重新调接口,专门赋值列表 |
|
|
|
listAgain(){ |
|
|
|
listAgain() { |
|
|
|
this.listLoading = true |
|
|
|
|
|
|
|
let scrollTop = this.$refs.main.scrollTop |
|
|
|
|
|
|
|
this.projectJudgmentData = [] |
|
|
|
|
|
|
|
this.$refs.main.scrollTop = scrollTop |
|
|
|
|
|
|
|
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; |
|
|
|
projectJudgmentVos.map((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)) // 不更新的解决方案 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.projectJudgmentData = projectJudgmentVos; |
|
|
|
this.projectJudgmentData = projectJudgmentVos; |
|
|
|
this.listLoading = false |
|
|
|
this.projectJudgmentData.map((e, i) => { |
|
|
|
}).catch(()=>{ |
|
|
|
e.sort = i + 1; |
|
|
|
this.listLoading = false |
|
|
|
}); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -768,8 +754,4 @@ export default { |
|
|
|
padding: 0; |
|
|
|
padding: 0; |
|
|
|
border-bottom: 0; |
|
|
|
border-bottom: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
.main{ |
|
|
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
height: calc(100vh - 152px ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
</style> |