Branch_d40a2540 V2.2.8
yujialong 2 years ago
parent d0c11c180c
commit b2e97e87fc
  1. 10
      src/api/index.js
  2. 12
      src/components/quill/index.vue
  3. 1
      src/layouts/navbar/index.vue
  4. 7
      src/pages/achievement/show/index.vue
  5. 9
      src/pages/achievement/teach/index.vue
  6. 51
      src/pages/assessment/add/index.vue
  7. 33
      src/pages/course/add/index.vue
  8. 3
      src/pages/evaluation/list/index.vue
  9. 130
      src/pages/information/addarticle/index.vue
  10. 2
      src/pages/match/add/index.vue
  11. 19
      src/pages/match/add/set.vue
  12. 21
      src/pages/match/add/step2.vue
  13. 4
      src/pages/match/add/step3.vue
  14. 6
      src/pages/match/manage/matchArchList.vue
  15. 50
      src/pages/match/manage/matchInfo.vue
  16. 212
      src/pages/match/manage/matchRank.vue
  17. 50
      src/pages/match/manage/matchSignup.vue
  18. 8
      src/pages/match/manage/noticeDetail.vue
  19. 52
      src/pages/project/add/index.vue
  20. 16
      src/pages/setting/list/index.vue
  21. 57
      src/pages/setting/list/info.vue
  22. 2
      src/pages/station/preview/index.vue
  23. 58
      src/pages/system/list/staffSide.vue
  24. 2
      src/setting.js

@ -11,6 +11,7 @@ export default {
isClient: `users/users/user/isClient`,// 是否为客户 isClient: `users/users/user/isClient`,// 是否为客户
getUserAllRoleByToken : `users/users/role/getUserAllRoleByToken`, getUserAllRoleByToken : `users/users/role/getUserAllRoleByToken`,
getSchoolIdByToken : `users/users/data/user/getSchoolIdByToken`, getSchoolIdByToken : `users/users/data/user/getSchoolIdByToken`,
deleteProfile : `users/users/userInfo/deleteProfile`,
platformLogList: `nakadai/nakadai/log/platformLogList`, platformLogList: `nakadai/nakadai/log/platformLogList`,
logNotification: `nakadai/nakadai/log/logNotification`, logNotification: `nakadai/nakadai/log/logNotification`,
@ -75,7 +76,7 @@ export default {
// 成绩管理 // 成绩管理
deleteExperimentalReport: `occupationlab/occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告 deleteExperimentalReport: `occupationlab/occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告
exportAssessmentInfo: `${host}occupationlab/occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩 exportAssessmentInfo: `${host}occupationlab/occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `occupationlab/occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩 exportPracticeInfo: `${host}occupationlab/occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
getAchievementInfo: `occupationlab/occupationlab/achievement/getAchievementInfo`, // 管理端成绩管理 getAchievementInfo: `occupationlab/occupationlab/achievement/getAchievementInfo`, // 管理端成绩管理
getAssessmentDetail: `occupationlab/occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情 getAssessmentDetail: `occupationlab/occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情
getPracticeDetail: `occupationlab/occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情 getPracticeDetail: `occupationlab/occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情
@ -173,6 +174,7 @@ export default {
updateUser: `users/users/userInfo/updateUser`, updateUser: `users/users/userInfo/updateUser`,
enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`, enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`,
cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`, cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`,
schoolsInCompetitionArea: `competition/competition/range/schoolsInCompetitionArea`,
// 赛事公告 // 赛事公告
addAnnouncement: `competition/competition/announcement/addAnnouncement`, addAnnouncement: `competition/competition/announcement/addAnnouncement`,
amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`,
@ -202,6 +204,12 @@ export default {
manuallyRankTheUploadList: `competition/competition/rank/manuallyRankTheUploadList`, manuallyRankTheUploadList: `competition/competition/rank/manuallyRankTheUploadList`,
queryPublicationSource: `competition/competition/rank/queryPublicationSource`, queryPublicationSource: `competition/competition/rank/queryPublicationSource`,
releaseVerification: `competition/competition/rank/releaseVerification`, releaseVerification: `competition/competition/rank/releaseVerification`,
totalRankingScoreDetails: `competition/competition/rank/totalRankingScoreDetails`,
batchRelease: `competition/competition/rank/batchRelease`,
manuallyUploadedRankings: `competition/competition/rank/manuallyUploadedRankings`,
toggleTheSortingMode: `competition/competition/rank/toggleTheSortingMode`,
selectTheLastSortStatus: `competition/competition/rank/selectTheLastSortStatus`,
cancelImport: `competition/competition/rank/cancelImport`,
gradeImport: `${host}template/赛事成绩导入模板.xlsx`, gradeImport: `${host}template/赛事成绩导入模板.xlsx`,
rankImportTeam: `${host}template/赛事排名导入模板(团队赛).xlsx`, rankImportTeam: `${host}template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `${host}template/赛事排名导入模板(个人赛).xlsx`, rankImportPerson: `${host}template/赛事排名导入模板(个人赛).xlsx`,

@ -9,7 +9,7 @@
:on-success="editorUploadSuccess" :on-success="editorUploadSuccess"
style="display: none" style="display: none"
> >
<el-button class="editorUpload" type="primary">点击上传</el-button> <el-button :id="'editorUpload' + index" type="primary">点击上传</el-button>
</el-upload> </el-upload>
</div> </div>
</template> </template>
@ -54,9 +54,15 @@ export default {
*/ */
elseRead: { elseRead: {
type: String, default: "false" type: String, default: "false"
} },
//
index: {
type: Number,
default: 0
},
}, },
data() { data() {
const that = this
return { return {
headers: { headers: {
token: util.local.get(Setting.tokenKey) token: util.local.get(Setting.tokenKey)
@ -74,7 +80,7 @@ export default {
"image": function(value) { "image": function(value) {
if (value) { if (value) {
// iview // iview
document.querySelector(".editorUpload").click(); document.querySelector("#editorUpload" + that.index).click();
} else { } else {
this.Quill.format("image", false); this.Quill.format("image", false);
} }

@ -156,6 +156,7 @@ export default {
menuSelect(path) { menuSelect(path) {
this.setTabsName('1') this.setTabsName('1')
this.setColumnId('') this.setColumnId('')
this.$store.commit('match/setCache', null)
if (path === '/screen') { if (path === '/screen') {
let arr=this.$route.path.split("/"); let arr=this.$route.path.split("/");
let name = `/${arr[1]}/list` let name = `/${arr[1]}/list`

@ -128,7 +128,7 @@
<img src="@/assets/img/report5.png" alt=""> <img src="@/assets/img/report5.png" alt="">
实验总结与体会 实验总结与体会
</h6> </h6>
<quill v-if="editing" :border="true" v-model="form.summarize" :minHeight="150" :height="150" /> <quill v-if="editing" :border="true" v-model="form.summarize" :minHeight="150" :height="150" :index="1" />
<div v-else class="pre-wrap" v-html="form.summarize"></div> <div v-else class="pre-wrap" v-html="form.summarize"></div>
</div> </div>
</div> </div>
@ -207,6 +207,11 @@ export default {
e.answer += `${i + 1}.${n.userAnswer}` e.answer += `${i + 1}.${n.userAnswer}`
}) })
}) })
} else { // pythonuserScores
list.forEach(e => {
const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList
})
} }
this.expData = list this.expData = list
}, },

@ -29,13 +29,13 @@
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<div> <div>
<el-input <!-- <el-input
size="small" size="small"
placeholder="请输入学校/学生姓名" placeholder="请输入学校/学生姓名"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" clearable v-model="keyword" clearable
style="width: 300px" style="width: 300px"
></el-input> ></el-input> -->
</div> </div>
<div> <div>
<el-button type="primary" @click="delAllData">批量删除</el-button> <el-button type="primary" @click="delAllData">批量删除</el-button>
@ -165,6 +165,11 @@ export default {
}).catch(res => {}) }).catch(res => {})
} }
}, },
initData() {
this.$refs.table.clearSelection();
this.page = 1;
this.getData();
},
// //
handlePage(){ handlePage(){
const list = this.listDataAll const list = this.listDataAll

@ -5,7 +5,7 @@
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="goBack" :content="isDetail ? '查看' : (form.id ? '更新' : '创建') + '教学实验'"></el-page-header> <el-page-header @back="goBack" :content="isDetail ? '查看' : (form.id ? '更新' : '创建') + '教学实验'"></el-page-header>
<div> <div>
<el-button type="primary" @click="submit" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button> <el-button type="primary" @click="save(0)" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
@ -264,15 +264,29 @@ export default {
"assFields" "assFields"
]) ])
}, },
// ,
beforeRouteLeave(to, from, next) {
if(!this.isToProject && this.updateTime){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.save(next)
}).catch(() => {
next()
})
}else{
next()
}
},
beforeDestroy() {
if (!this.isToProject) this.setAss({});
},
mounted() { mounted() {
this.date = [util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000)), util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000))]; this.date = [util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000)), util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000))];
this.form.id && this.getData(); this.form.id && this.getData();
this.recoveryData(); this.recoveryData();
this.getschoolCourse(); this.getschoolCourse();
}, },
beforeDestroy() {
if (!this.isToProject) this.setAss({});
},
watch: { watch: {
// , // ,
form: { form: {
@ -285,11 +299,13 @@ export default {
if (val[0] != "0000-00-00 00:00:00") { if (val[0] != "0000-00-00 00:00:00") {
this.startTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[0])); this.startTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[0]));
this.stopTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[1])); this.stopTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[1]));
this.updateTime++
} }
}, },
duration: { duration: {
handler(n, o) { handler(n, o) {
this.form.experimentDuration = `${n.day ? n.day : 0}d${n.hour ? n.hour : 0}h${n.minute ? n.minute : 0}m`; this.form.experimentDuration = `${n.day ? n.day : 0}d${n.hour ? n.hour : 0}h${n.minute ? n.minute : 0}m`;
this.updateTime++
}, },
deep: true deep: true
}, },
@ -398,6 +414,9 @@ export default {
this.getProjectData(); this.getProjectData();
} }
} }
this.$nextTick(() => {
this.updateTime = 0
})
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });
@ -409,7 +428,8 @@ export default {
pageSize:this.pageSize, pageSize:this.pageSize,
cid:this.form.curriculumId, cid:this.form.curriculumId,
projectName:this.keyword, projectName:this.keyword,
systemId: curItem ? curItem.systemId : 1 systemId: curItem ? curItem.systemId : 1,
permissions: 1
} }
this.$post(this.api.projectListByCourseId,data).then(res => { this.$post(this.api.projectListByCourseId,data).then(res => {
let { status, data } = res; let { status, data } = res;
@ -428,7 +448,7 @@ export default {
this.page = 1; this.page = 1;
this.getProjectData(); this.getProjectData();
}, },
submit() { // save(cb) { //
if (this.submiting) return false if (this.submiting) return false
if (!this.form.experimentalName) return util.warningMsg("请填写考核名称"); if (!this.form.experimentalName) return util.warningMsg("请填写考核名称");
if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入"); if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入");
@ -479,15 +499,17 @@ export default {
this.submiting = true this.submiting = true
if (this.form.id) { if (this.form.id) {
this.$post(this.api.modifyAssessment, this.form).then(res => { this.$post(this.api.modifyAssessment, this.form).then(res => {
this.updateTime = 0
util.successMsg("修改成功"); util.successMsg("修改成功");
this.$router.back(); cb ? cb() : this.$router.back()
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}); });
} else { } else {
this.$post(this.api.saveAssessment, this.form).then(res => { this.$post(this.api.saveAssessment, this.form).then(res => {
this.updateTime = 0
util.successMsg("创建成功"); util.successMsg("创建成功");
this.$router.back(); cb ? cb() : this.$router.back()
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}); });
@ -509,6 +531,9 @@ export default {
minute: duration[2] minute: duration[2]
}; };
this.date = [this.startTime, this.stopTime]; this.date = [this.startTime, this.stopTime];
this.$nextTick(() => {
this.updateTime = 0
})
}, },
recoveryData() { // recoveryData() { //
if (JSON.stringify(this.assFields) != "{}") { if (JSON.stringify(this.assFields) != "{}") {
@ -542,7 +567,7 @@ export default {
}, },
toProject() { toProject() {
this.handleCacheData(); this.handleCacheData();
this.$router.push("/project/list/?show=1"); this.$router.push("/project/list?show=1");
}, },
showProject(row) { showProject(row) {
this.handleCacheData(); this.handleCacheData();
@ -564,18 +589,18 @@ export default {
this.$router.back() this.$router.back()
}, },
goBack() { goBack() {
const { id } = this.form
const updateTime = this.updateTime
// //
if (updateTime > 1) { if (this.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.submit() this.save()
}).catch(() => { }).catch(() => {
this.updateTime = 0
this.backPage() this.backPage()
}) })
} else { } else {
this.updateTime = 0
this.backPage() this.backPage()
} }
} }

@ -73,7 +73,7 @@
<quill :border="true" :readonly="isDetail" v-model="form.courseIntroduction" :height="400" /> <quill :border="true" :readonly="isDetail" v-model="form.courseIntroduction" :height="400" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="save" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button> <el-button type="primary" @click="save(0)" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -218,6 +218,20 @@ export default {
deep:true deep:true
} }
}, },
// ,
beforeRouteLeave(to, from, next) {
if(this.updateTime){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.save(next)
}).catch(() => {
next()
})
}else{
next()
}
},
mounted() { mounted() {
this.getClassification() this.getClassification()
this.form.id && this.getData() this.form.id && this.getData()
@ -259,7 +273,9 @@ export default {
} }
this.visibleChange(data.visibleRange) this.visibleChange(data.visibleRange)
this.form = data this.form = data
this.$nextTick(() => {
this.updateTime = 0
})
this.uploadList.push({ this.uploadList.push({
name: "cover.jpg", name: "cover.jpg",
url: data.coverUrl url: data.coverUrl
@ -304,7 +320,7 @@ export default {
this.form.coverUrl = '' this.form.coverUrl = ''
}).catch(res => {}); }).catch(res => {});
}, },
save() { save(cb) {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.nameRepeat) return util.errorMsg('当前课程名已存在!') if (this.nameRepeat) return util.errorMsg('当前课程名已存在!')
@ -315,15 +331,17 @@ export default {
form.courseId = form.id form.courseId = form.id
form.platformSource = Setting.platformSource form.platformSource = Setting.platformSource
this.$post(this.api.updateTheoreticalCourse, form).then(res => { this.$post(this.api.updateTheoreticalCourse, form).then(res => {
this.updateTime = 0
this.submiting = false; this.submiting = false;
util.successMsg("修改成功"); util.successMsg("修改成功");
this.$router.back(); cb ? cb() : this.$router.back()
}).catch(err => { }).catch(err => {
this.submiting = false; this.submiting = false;
}); });
} else { } else {
this.$post(this.api.saveTheoreticalCourse, form).then(({ courseId }) => { this.$post(this.api.saveTheoreticalCourse, form).then(({ courseId }) => {
this.submiting = false; this.submiting = false;
this.updateTime = 0
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", { this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success", type: "success",
confirmButtonText: "马上设置", confirmButtonText: "马上设置",
@ -331,7 +349,7 @@ export default {
}).then(() => { }).then(() => {
this.$router.replace(`/course/contentSettings?id=${courseId}`); this.$router.replace(`/course/contentSettings?id=${courseId}`);
}).catch(() => { }).catch(() => {
this.$router.back(); cb ? cb() : this.$router.back()
}); });
}).catch(err => { }).catch(err => {
this.submiting = false; this.submiting = false;
@ -345,18 +363,19 @@ export default {
this.$router.back() this.$router.back()
}, },
back() { back() {
const { id } = this.form
const updateTime = this.updateTime const updateTime = this.updateTime
// //
if ((id && updateTime > 2) || (!id && updateTime)) { if (updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.save() this.save()
}).catch(() => { }).catch(() => {
this.updateTime = 0
this.backPage() this.backPage()
}) })
} else { } else {
this.updateTime = 0
this.backPage() this.backPage()
} }
} }

@ -372,7 +372,7 @@ export default {
this.$get(`${this.api.questionsDetail}`, { id }).then(res => { this.$get(`${this.api.questionsDetail}`, { id }).then(res => {
this.topicForm = res.questions; this.topicForm = res.questions;
this.topicForm.id = id; this.topicForm.id = id;
this.topicForm.questionType = res.questions.questionTypeName; this.$set(this.topicForm, 'questionType', res.questions.questionTypeName)
this.NewTopics = true; this.NewTopics = true;
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
@ -454,6 +454,7 @@ export default {
}); });
}, },
questionTypeChange() { questionTypeChange() {
console.log(11, this.topicForm.questionType)
for (let i in this.topicForm) { for (let i in this.topicForm) {
if (i.includes("isTrue")) this.topicForm[i] = false; if (i.includes("isTrue")) this.topicForm[i] = false;
} }

@ -2,7 +2,7 @@
<div> <div>
<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="goBack" :content="'新增文章'"></el-page-header> <el-page-header @back="back" :content="'新增文章'"></el-page-header>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
@ -45,7 +45,7 @@
<quill :border="true" v-model="form.content" :uploading.sync="uploading" :height="400" /> <quill :border="true" v-model="form.content" :uploading.sync="uploading" :height="400" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="saveData">确定</el-button> <el-button type="primary" @click="save(0)">确定</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -61,6 +61,7 @@ export default {
name: "addarticle", name: "addarticle",
data() { data() {
return { return {
id: this.$route.query.id,
headers: { headers: {
token: util.local.get(Setting.tokenKey) token: util.local.get(Setting.tokenKey)
}, },
@ -95,7 +96,8 @@ export default {
uploadList: [], uploadList: [],
uploadDataList: [], uploadDataList: [],
submiting: false, submiting: false,
uploading: false uploading: false,
updateTime: 0,
}; };
}, },
computed: { computed: {
@ -106,50 +108,41 @@ export default {
components: { components: {
quill quill
}, },
watch: {
// ,
form: {
handler(val){
this.updateTime++
},
deep:true
}
},
// ,
beforeRouteLeave(to, from, next) {
if(this.updateTime){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.save(next)
}).catch(() => {
next()
})
}else{
next()
}
},
mounted() { mounted() {
this.id = this.$route.query.id;
this.id && this.getData(); this.id && this.getData();
}, },
methods: { methods: {
//
goBack() {
this.$router.back();
},
getData() { getData() {
this.$get(`${this.api.getArticle}?articleId=${this.id}`).then(({ article }) => { this.$get(`${this.api.getArticle}?articleId=${this.id}`).then(({ article }) => {
this.form = article this.form = article
this.$nextTick(() => {
this.updateTime = 0
})
}).catch(err => {}) }).catch(err => {})
}, },
saveData() {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
const { form } = this
if (this.uploading) return util.warningMsg("图片正在上传中,请稍等");
this.submiting = true
if (form.id) {
this.$put(this.api.editArticle, form).then(res => {
this.submiting = false;
util.successMsg("修改成功");
this.back();
})
.catch(err => {
this.submiting = false;
});
} else {
this.createUser = this.customerName || this.userName
this.$post(this.api.addArticle, form).then(res => {
this.submiting = false;
util.successMsg("创建成功");
this.back();
})
.catch(err => {
this.submiting = false;
});
}
}
})
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.currPage = val; this.currPage = val;
}, },
@ -188,19 +181,6 @@ export default {
this.keyword = ""; this.keyword = "";
this.getData(); this.getData();
}, },
back() {
this.$router.back();
},
goback() {
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning"
})
.then(() => {
this.back();
})
.catch(() => {
});
},
addSponsor() { addSponsor() {
this.sponsorList.push(""); this.sponsorList.push("");
}, },
@ -212,6 +192,54 @@ export default {
}, },
delOrganizer(index) { delOrganizer(index) {
this.organzinerList.splice(index, 1); this.organzinerList.splice(index, 1);
},
save(cb) {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
const { form } = this
if (this.uploading) return util.warningMsg("图片正在上传中,请稍等");
this.submiting = true
if (form.id) {
this.$put(this.api.editArticle, form).then(res => {
this.submiting = false;
util.successMsg("修改成功");
this.updateTime = 0
cb ? cb() : this.$router.back()
})
.catch(err => {
this.submiting = false;
});
} else {
this.createUser = this.customerName || this.userName
this.$post(this.api.addArticle, form).then(res => {
this.submiting = false;
util.successMsg("创建成功");
this.updateTime = 0
cb ? cb() : this.$router.back()
})
.catch(err => {
this.submiting = false;
});
}
}
})
},
back() {
//
if (this.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.save()
}).catch(() => {
this.updateTime = 0
this.$router.back()
})
} else {
this.updateTime = 0
this.$router.back()
}
} }
} }
}; };

@ -88,7 +88,7 @@ export default {
} }
], ],
publishStatus: 0, publishStatus: 0,
competitionId: '', competitionId: this.$route.query.id || '',
step: 1, step: 1,
submiting: false, submiting: false,
updateTime: 0, updateTime: 0,

@ -71,10 +71,9 @@
{{ permissionsKeys[scope.row.permissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> -->
<el-table-column prop="founder" label="创建人" align="center"> <el-table-column prop="founder" label="创建人" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createUser }} {{ scope.row.founder ? '老师创建' : '系统内置' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
@ -154,9 +153,8 @@ export default {
}, },
// //
courseChange(val) { courseChange(val) {
const { sysId, sysName } = this.curriculumList.find(e => e.cid == this.form.cid) const { systemId } = this.curriculumList.find(e => e.cid == this.form.cid)
this.form.sysName = sysName this.sysId = systemId
this.sysId = sysId
if (val) this.loadIns = Loading.service() if (val) this.loadIns = Loading.service()
this.getProject() this.getProject()
}, },
@ -187,9 +185,11 @@ export default {
}, },
// //
toProject() { toProject() {
const { form, curStep } = this.$parent
form[curStep] = this.form
this.$store.commit('match/setCache', { this.$store.commit('match/setCache', {
form: this.form, form,
curStep: this.$parent.curStep curStep
}) })
this.$router.push(`/project/list?show=1`) this.$router.push(`/project/list?show=1`)
}, },
@ -226,11 +226,10 @@ export default {
if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。') if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
if (!form.cid) return util.warningMsg('请选择课程') if (!form.cid) return util.warningMsg('请选择课程')
if (!form.projectId) return util.warningMsg('请选择项目') if (!form.projectId) return util.warningMsg('请选择项目')
const cur = this.curriculumList.find(e => e.cid == form.cid) const { systemId, systemName, projectName } = this.projects.find(e => e.projectId == form.projectId)
if (cur) form.systemName = cur.sysName
const { systemId, projectName } = this.projects.find(e => e.projectId == form.projectId)
if (systemId) form.systemId = systemId if (systemId) form.systemId = systemId
if (projectName) form.projectName = projectName if (projectName) form.projectName = projectName
if (systemName) form.systemName = systemName
form.startTime = form.time[0] form.startTime = form.time[0]
form.endTime = form.time[1] form.endTime = form.time[1]
this.$emit('hideSet', this.form) this.$emit('hideSet', this.form)

@ -28,7 +28,7 @@
) )
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="resultCalculationMethod" label="总成绩计算方式"> <el-form-item v-if="!form.rule" prop="resultCalculationMethod" label="总成绩计算方式">
<el-radio v-model="form.resultCalculationMethod" :label="0">各阶段成绩加权求和</el-radio> <el-radio v-model="form.resultCalculationMethod" :label="0">各阶段成绩加权求和</el-radio>
<el-radio v-model="form.resultCalculationMethod" :label="1">各阶段成绩直接求和</el-radio> <el-radio v-model="form.resultCalculationMethod" :label="1">各阶段成绩直接求和</el-radio>
<el-radio v-model="form.resultCalculationMethod" :label="2">各阶段成绩取平均值</el-radio> <el-radio v-model="form.resultCalculationMethod" :label="2">各阶段成绩取平均值</el-radio>
@ -280,13 +280,19 @@ export default {
}, },
// //
stageChange(val) { stageChange(val) {
const list = [] const stages = this.form.competitionStageList
for (let i = 1; i <= val; i++) { const { ruleId } = this.form
const form = JSON.parse(JSON.stringify(this.ruleForm)) if (stages.length < val) {
form.number = i const list = []
list.push(form) for (let i = 1; i <= val - stages.length; i++) {
const form = JSON.parse(JSON.stringify(this.ruleForm))
form.number = stages.length + i
if (ruleId) form.ruleId = ruleId
this.form.competitionStageList.push(form)
}
} else {
this.form.competitionStageList = stages.slice(0, val)
} }
this.form.competitionStageList = list
}, },
// //
save(status, next = 0) { save(status, next = 0) {
@ -300,6 +306,7 @@ export default {
const stages = form.competitionStageList const stages = form.competitionStageList
if (form.rule === 2) { // if (form.rule === 2) { //
const e = stages[0] const e = stages[0]
e.stageName = step1.name
if (!e.resultsDetails) { if (!e.resultsDetails) {
if (e.resultAnnouncementTime === '') { if (e.resultAnnouncementTime === '') {
return util.errorMsg('请填写成绩公布时间') return util.errorMsg('请填写成绩公布时间')

@ -134,7 +134,7 @@ export default {
resumeData() { resumeData() {
if (this.cache) { if (this.cache) {
this.curStep = this.cache.curStep this.curStep = this.cache.curStep
if (this.cache.form) this.form[this.curStep] = this.cache.form if (this.cache.form) this.form = this.cache.form
this.setVisible = true this.setVisible = true
this.$store.commit('match/setCache', null) this.$store.commit('match/setCache', null)
} }
@ -278,7 +278,7 @@ export default {
}).then(res => { }).then(res => {
this.$parent.hideLoad() this.$parent.hideLoad()
// //
!form[0].contentId && status && this.publish(status) status && this.publish(status)
util.successMsg((status ? '发布' : '保存') + '成功') util.successMsg((status ? '发布' : '保存') + '成功')
this.$emit('next', next) this.$emit('next', next)
}).catch(err => { }).catch(err => {

@ -93,6 +93,7 @@
:data="{ :data="{
competitionId: this.id, competitionId: this.id,
stageId: this.stageId, stageId: this.stageId,
systemId: 0
}" }"
> >
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> <el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
@ -133,7 +134,7 @@ export default {
uploadFaild: false, uploadFaild: false,
exportCode: '', exportCode: '',
headers: { headers: {
token: sessionStorage.getItem("token") token: util.local.get(Setting.tokenKey)
}, },
statData: {} statData: {}
}; };
@ -173,7 +174,7 @@ export default {
}, },
// //
show(row) { show(row) {
this.$router.push(`/matchReport?reportId=${row.reportId}`) this.$router.push(`/match/report?reportId=${row.reportId}`)
}, },
// () // ()
exportData() { exportData() {
@ -183,6 +184,7 @@ export default {
url += `&ids=${ids.toString()}` url += `&ids=${ids.toString()}`
} }
axios.post(this.api.exportExperimentalResultsInBatch, this.list, { axios.post(this.api.exportExperimentalResultsInBatch, this.list, {
headers: this.headers,
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
util.downloadFileDirect(`赛事成绩.xls`,new Blob([res.data])) util.downloadFileDirect(`赛事成绩.xls`,new Blob([res.data]))

@ -25,18 +25,20 @@
</div> </div>
</div> </div>
<table class="table"> <table class="table">
<tr> <template v-if="form.completeCompetitionSetup.competitionType === 0">
<th width="150">姓名</th> <tr>
<td>{{ info.person.userName }}</td> <th width="150">姓名</th>
</tr> <td>{{ info.person.userName }}</td>
<tr> </tr>
<th>学号</th> <tr>
<td>{{ info.person.workNumber }}</td> <th>学号</th>
</tr> <td>{{ info.person.workNumber }}</td>
<tr> </tr>
<th>学校</th> <tr>
<td>{{ info.person.schoolName }}</td> <th>学校</th>
</tr> <td>{{ info.person.schoolName }}</td>
</tr>
</template>
<template v-if="form.completeCompetitionSetup.competitionType"> <template v-if="form.completeCompetitionSetup.competitionType">
<template> <template>
<tr> <tr>
@ -79,8 +81,8 @@
<template v-if="form.completeCompetitionSetup.competitionType"> <template v-if="form.completeCompetitionSetup.competitionType">
<th width="110">参赛人数限制</th> <th width="110">参赛人数限制</th>
<th>允许参赛人员</th> <th>允许参赛人员</th>
<th v-if="form.rule === 0">总分</th>
</template> </template>
<th v-if="form.rule === 0">总分</th>
<th>竞赛成绩</th> <th>竞赛成绩</th>
</tr> </tr>
<template v-if="info.stages.length"> <template v-if="info.stages.length">
@ -103,10 +105,10 @@
<span v-else class="m-r-5"></span> <span v-else class="m-r-5"></span>
<i class="el-icon-edit icon" @click="selectPar(item)"></i> <i class="el-icon-edit icon" @click="selectPar(item)"></i>
</td> </td>
<td v-if="form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td>
</template> </template>
<td v-if="form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td>
<td> <td>
<span v-if="item.score > 0" class="m-r-10">分数{{item.score}}</span> <span v-if="item.score >= 0" class="m-r-10">分数{{item.score}}</span>
<el-button type="text" :disabled="item.resultsDetails === 1 || (form.completeCompetitionSetup.competitionType && !item.reportId) || (form.completeCompetitionSetup.competitionType === 0 && !item.reportId)" @click="show(item)">查看成绩详情</el-button> <el-button type="text" :disabled="item.resultsDetails === 1 || (form.completeCompetitionSetup.competitionType && !item.reportId) || (form.completeCompetitionSetup.competitionType === 0 && !item.reportId)" @click="show(item)">查看成绩详情</el-button>
</td> </td>
</tr> </tr>
@ -265,7 +267,7 @@ export default {
this.$once('hook:beforeDestroy', function() { this.$once('hook:beforeDestroy', function() {
clearInterval(this.timer) clearInterval(this.timer)
this.timerList.forEach(n => { this.timerList.forEach(n => {
clearInterval(n) clearTimeout(n)
}) })
this.timerList = [] this.timerList = []
}) })
@ -318,7 +320,7 @@ export default {
const endTime = new Date(e.endTime).getTime() + e.resultAnnouncementTime * 3600000 // + const endTime = new Date(e.endTime).getTime() + e.resultAnnouncementTime * 3600000 // +
if (now > endTime) { // if (now > endTime) { //
info.stages.find(n => n.stageId == e.stageId).showDetail = 1 info.stages.find(n => n.stageId == e.stageId).showDetail = 1
} else { // } else if (endTime - now < 86400000) { //
this.timerList.push(setTimeout(this.getInfo, endTime - now)) this.timerList.push(setTimeout(this.getInfo, endTime - now))
} }
} }
@ -544,16 +546,16 @@ export default {
if (this.form.completeCompetitionSetup.competitionType) { // if (this.form.completeCompetitionSetup.competitionType) { //
this.curRow = row this.curRow = row
this.memberVisible = true this.memberVisible = true
const teamId = this.form.competitionRegistration.teamId const teamId = this.info.teamId
if (teamId) { if (teamId) {
this.$post(this.api.stageGradeManagementList, { this.$post(this.api.frontOfficeCompetitionRanking, {
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
competitionId: this.id, competitionId: this.id,
stageId: row.stageId, isOverallRanking: 0,
isNakadai: 0 teamId
}).then(({ page }) => { }).then(({ list }) => {
this.members = page.records.filter(e => e.teamId === teamId) this.members = list
}).catch(res => {}) }).catch(res => {})
} else { } else {
this.members = [] this.members = []
@ -564,7 +566,7 @@ export default {
}, },
// //
toReport(row) { toReport(row) {
this.$router.push(`/matchReport?reportId=${row.reportId}`) this.$router.push(`/match/report?reportId=${row.reportId}`)
}, },
} }
}; };

@ -20,8 +20,9 @@
<el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button> <el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button>
</div> </div>
<div> <div>
<el-button v-if="(type && uploadData.length) || (!type && !published) || (!type && sourceType == 1)" type="primary" @click="cancelPublish(1)">发布排名</el-button> <!-- <el-button v-if="(type && uploadData.length) || (!type && !published) || (!type && sourceType == 1)" type="primary" @click="cancelPublish(1)">发布排名</el-button> -->
<el-button v-if="published && ((!type && sourceType === '0') || (type && sourceType == 1))" type="primary" @click="cancelPublish(0)">取消发布</el-button> <el-button v-if="!published" type="primary" @click="cancelPublish(1)">发布排名</el-button>
<el-button v-else type="primary" @click="cancelPublish(0)">取消发布</el-button>
</div> </div>
</div> </div>
<el-table :data="list" class="table" ref="table" stripe header-align="center"> <el-table :data="list" class="table" ref="table" stripe header-align="center">
@ -38,13 +39,13 @@
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column> <el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="timeSum" label="用时" width="90" align="center"> <el-table-column prop="timeSum" label="用时" width="90" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.timeSum }}min {{ scope.row.timeSum + (scope.row.timeSum === '—' ? '' : 'min') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center"></el-table-column> <el-table-column prop="score" label="分数" width="90" align="center"></el-table-column>
<el-table-column label="得分详情" align="center" width="160"> <el-table-column label="得分详情" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row, scope.$index)">查看</el-button> <el-button v-if="(!competitionType && scope.row.reportId) || competitionType" type="text" @click="show(scope.row, scope.$index)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -113,7 +114,7 @@
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button> <el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div> </div>
<el-upload <el-upload
ref="importStaff" ref="upload"
name="file" name="file"
accept=".xls,.xlsx" accept=".xls,.xlsx"
:on-remove="handleRemove" :on-remove="handleRemove"
@ -128,8 +129,10 @@
:data="{ :data="{
competitionId: this.id, competitionId: this.id,
stageId: this.stageId, stageId: this.stageId,
isOverallRanking: active ? 0 : 1 isOverallRanking: active ? 0 : 1,
schoolId: this.$store.state.user.schoolId
}" }"
:auto-upload="false"
> >
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> <el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload> </el-upload>
@ -204,33 +207,58 @@ export default {
// //
getData() { getData() {
// //
this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ whetherToPublish }) => { // this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ whetherToPublish }) => {
const ids = this.grades.map(e => e.stageId) // const ids = this.grades.map(e => e.stageId)
ids.pop() // ids.pop()
// >(:(1,0)) // // >(:(1,0))
whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => { // whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
this.sourceType = source // this.sourceType = source
this.type = source == 1 ? 1 : 0 // this.type = source == 1 ? 1 : 0
}).catch(res => {}) // }).catch(res => {})
this.published = whetherToPublish // this.published = whetherToPublish
this.getRank(whetherToPublish) // this.getRank(whetherToPublish)
// }).catch(res => {})
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
// const ids = this.grades.map(e => e.stageId)
// ids.pop()
// // >(:(1,0))
// whetherToPublish ?
// this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
// this.sourceType = source
// this.type = source == 1 ? 1 : 0
// this.getRank(whetherToPublish)
// }).catch(res => {}) :
// this.getRank()
// this.published = whetherToPublish
// }).catch(res => {})
this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
this.sourceType = source
this.type = source == 1 ? 1 : 0
this.getRank()
}).catch(res => {}) }).catch(res => {})
}, },
// //
getRank(whetherToPublish) { getRank() {
// //
if (whetherToPublish) { if (this.type) {
this.$post(this.api.manuallyRankTheUploadList, { this.$post(this.api.manuallyUploadedRankings, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
competitionId: this.id, competitionId: this.id,
isOverallRanking: this.active ? 0 : 1, isOverallRanking: this.active ? 0 : 1,
stageId: this.active || '' stageId: this.active || this.stageId
}).then(({ message }) => { }).then(({ message, publishStatus }) => {
// isRelease 01
this.published = publishStatus
this.sourceType = message.total ? message.records[0].isRelease : 0
this.list = message.records this.list = message.records
this.total = message.total this.total = message.total
}).catch(res => {}) }).catch(res => {})
} else { // } else { //
if (!this.active) { if (!this.active) {
// //
const ids = this.grades.map(e => e.stageId) const ids = this.grades.map(e => e.stageId)
@ -238,13 +266,17 @@ export default {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
competitionId: this.id, competitionId: this.id,
publicationType: this.type,
locationStageId: this.stageId,
stageIds: ids.splice(0, ids.length - 1) stageIds: ids.splice(0, ids.length - 1)
}).then(({ page }) => { }).then(({ page, publishStatus }) => {
this.published = publishStatus
this.list = page this.list = page
this.total = total this.total = total
}).catch(res => {}) }).catch(res => {})
} else { // } else { //
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(({ page, total }) => { this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}`).then(({ page, total, publishStatus }) => {
this.published = publishStatus
this.list = page this.list = page
this.total = total this.total = total
}).catch(res => {}) }).catch(res => {})
@ -270,7 +302,14 @@ export default {
}, },
// //
typeChange(val) { typeChange(val) {
this.getRank(val) this.$post(`${this.api.toggleTheSortingMode}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => {}).catch(res => {})
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
// if (whetherToPublish && !val) this.sourceType = '0'
this.getRank()
// this.published = whetherToPublish
// }).catch(res => {})
}, },
initData() { initData() {
this.page = 1 this.page = 1
@ -363,7 +402,7 @@ export default {
}, },
// //
toReport(row) { toReport(row) {
this.$router.push(`/matchReport?reportId=${row.reportId}`) this.$router.push(`/match/report?reportId=${row.reportId}`)
}, },
handleCurrentChange(val) { // handleCurrentChange(val) { //
this.page = val; this.page = val;
@ -371,47 +410,71 @@ export default {
}, },
// //
publishSubmit() { publishSubmit() {
let data = this.uploadData // data const { startTime, endTime } = this.grades[this.index]
if (!this.type) { // if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!')
// if (this.type) { //
const { list, id } = this this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => {
const isOverall = this.active ? 0 : 1
if (list.length) {
const isPerson = this.competitionType == 0
list.map(e => {
e.competitionId = id
e.isOverallRanking = isOverall
// if (isOverall) delete e.stageId
if (isPerson) e.teamId = null // teamIdnull
})
data = list
}
}
const ids = this.grades.map(e => e.stageId)
ids.pop()
//
this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => {
this.$post(this.api.publishRanking, data).then(res => {
this.uploadData = []
this.getData() this.getData()
util.successMsg('发布成功!') util.successMsg('发布成功!')
}).catch(res => {}) }).catch(res => {})
}).catch(res => {}) } else {
let data = [] // data
if (!this.type) { //
//
const { list, id } = this
const isOverall = this.active ? 0 : 1
if (list.length) {
const isPerson = this.competitionType == 0
list.map(e => {
e.competitionId = id
e.isOverallRanking = isOverall
e.stageId = this.stageId
// if (isOverall) delete e.stageId
if (isPerson) e.teamId = null // teamIdnull
})
data = list
}
}
data.forEach(e => {
e.publicationType = this.type
})
const ids = this.grades.map(e => e.stageId)
ids.pop()
//
// this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => {
this.$post(this.api.publishRanking, data).then(res => {
this.uploadData = []
this.getData()
util.successMsg('发布成功!')
}).catch(res => {})
// }).catch(res => {})
}
}, },
// //
publish() { publish() {
// //
if (this.published && this.sourceType != this.type) { // if (this.published && this.sourceType != this.type) {
this.$confirm(this.sourceType == 1 && !this.type ? // this.$confirm(this.sourceType == 1 && !this.type ?
'手动排名已发布,是否要取消手动排名的内容,改为系统排名的内容?' : // '' :
'默认系统排名已发布,是否要取消系统排名的内容,改为手动发布的内容?', '提示', { // '', '', {
type: 'success' // type: 'success'
}).then(() => { // }).then(() => {
// this.publishSubmit()
// }).catch(() => {})
// } else {
// this.publishSubmit()
// }
this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
whetherToPublish ?
this.$confirm('排名已经发布,是否直接覆盖?', '提示', {
type: 'success'
}).then(() => {
this.publishSubmit()
}).catch(() => {}) :
this.publishSubmit() this.publishSubmit()
}).catch(() => {}) }).catch(res => {})
} else { // this.publishSubmit()
this.publishSubmit()
}
}, },
// //
cancelPublish(publish) { cancelPublish(publish) {
@ -424,13 +487,15 @@ export default {
// //
// //
if (publish) { if (publish) {
this.$post(this.api.deleteLastPublication, { // this.type ?
competitionId: this.id,
isOverallRanking: this.active ? 0 : 1,
stageIds: this.active ? [this.active] : stageIds
}).then(res => {
this.publish() this.publish()
}).catch(res => {}) // this.$post(this.api.deleteLastPublication, {
// competitionId: this.id,
// isOverallRanking: this.active ? 0 : 1,
// stageIds: this.active ? [this.active] : stageIds
// }).then(res => {
// this.publish()
// }).catch(res => {})
} else { } else {
this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`).then(res => { this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`).then(res => {
this.sourceType = '' this.sourceType = ''
@ -473,10 +538,13 @@ export default {
this.exportCode = exportCode this.exportCode = exportCode
this.uploadFaild = true this.uploadFaild = true
util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`) util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`)
} else {
this.importVisible = false
this.getRank()
util.successMsg('请检查数据后,点击发布排名以发布数据!')
} }
this.uploadData = res.data.data
} else { } else {
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据") util.errorMsg(res.message || "上传失败,请检查数据")
} }
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
@ -494,9 +562,11 @@ export default {
this.uploadFaild = false this.uploadFaild = false
}, },
uploadSure() { uploadSure() {
this.importVisible = false this.list.length ?
this.list = this.uploadData this.$post(this.api.cancelImport, this.list.map(e => e.id)).then(res => {
this.uploadData.length && util.successMsg('请检查数据后,点击发布排名以发布数据!') this.$refs.upload.submit()
}).catch(res => {}) :
this.$refs.upload.submit()
} }
} }
}; };

@ -5,7 +5,7 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入姓名/手机号/团队名称/学号" prefix-icon="el-icon-search" v-model="keyword" clearable size="mini" style="width: 250px"></el-input> <el-input placeholder="请输入姓名/手机号/学号" prefix-icon="el-icon-search" v-model="keyword" clearable size="mini" style="width: 250px"></el-input>
</li> </li>
<li v-if="info.releaseType"> <li v-if="info.releaseType">
<label>参赛人员状态</label> <label>参赛人员状态</label>
@ -62,7 +62,7 @@
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" :visible.sync="addVisible" width="400px" class="dialog" :close-on-click-modal="false" @close="closeAdd"> <el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" :visible.sync="addVisible" width="400px" class="dialog" :close-on-click-modal="false" @close="closeAdd">
<el-form ref="form" :model="form" :rules="rules" label-width="80px" style='margin-right: 10px;'> <el-form ref="form" :model="form" :rules="rules" label-width="80px" style='margin-right: 10px;'>
<el-form-item prop="schoolId" label="院校"> <el-form-item v-if="!schoolDisable" prop="schoolId" label="院校">
<el-select v-model="form.schoolId" filterable style="width: 100%"> <el-select v-model="form.schoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in clients" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option> <el-option v-for="(item, i) in clients" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select> </el-select>
@ -76,7 +76,7 @@
<el-form-item label="账号角色"> <el-form-item label="账号角色">
学生 学生
</el-form-item> </el-form-item>
<el-form-item prop="teamId" label="所属团队"> <el-form-item v-if="info.completeCompetitionSetup.competitionType" prop="teamId" label="所属团队">
<div style="display: flex;align-items: center"> <div style="display: flex;align-items: center">
<el-select v-model="form.teamId" :disabled="formEnable && isAdd" filterable style="width: 240px;margin-right: 10px"> <el-select v-model="form.teamId" :disabled="formEnable && isAdd" filterable style="width: 240px;margin-right: 10px">
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option> <el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
@ -194,7 +194,9 @@ export default {
identification: 1 identification: 1
}, },
originForm: {}, originForm: {},
exitMember: 0 exitMember: 0,
notExit: 0,
schoolDisable: false
}; };
}, },
watch: { watch: {
@ -206,9 +208,9 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(44, this.$store.state.user.schoolId)
this.initData() this.initData()
this.getInfo() this.getInfo()
this.getClient()
this.getTeam() this.getTeam()
}, },
methods: { methods: {
@ -232,6 +234,13 @@ export default {
getInfo() { getInfo() {
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => { this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => {
this.info = competition this.info = competition
//
if (competition.competitionScope) {
this.getClient()
} else {
this.schoolDisable = true
this.form.schoolId = this.$store.state.user.schoolId
}
}).catch(err => {}) }).catch(err => {})
}, },
initData() { initData() {
@ -257,12 +266,14 @@ export default {
}, },
// //
add() { add() {
this.notExit = 0
this.isAdd = true this.isAdd = true
this.addVisible = true this.addVisible = true
}, },
// //
edit(row) { edit(row) {
this.isAdd = false this.isAdd = false
this.notExit = 0
this.addVisible = true this.addVisible = true
row.userName = row.username row.userName = row.username
this.exitMember = 0 this.exitMember = 0
@ -281,6 +292,7 @@ export default {
} }
this.formEnable = !account this.formEnable = !account
}).catch(res => { }).catch(res => {
if (res.message === '学生不存在') this.notExit = 1
if (!this.isAdd) this.exitMember = 1 if (!this.isAdd) this.exitMember = 1
}) })
} else { } else {
@ -289,12 +301,16 @@ export default {
}, },
// //
submitForm() { submitForm() {
if (this.notExit) {
this.submiting = false
return util.errorMsg('学生不存在,无法添加!')
}
if (this.exitMember) {
this.submiting = false
return util.errorMsg('学生已存在')
}
const { form } = this const { form } = this
if (!this.isAdd) { // if (!this.isAdd) { //
if (this.exitMember) {
this.submiting = false
return util.errorMsg('学生已存在')
}
this.$post(this.api.updateUser, { this.$post(this.api.updateUser, {
hrUserAccount: { hrUserAccount: {
...form, ...form,
@ -333,7 +349,7 @@ export default {
}) })
} else { } else {
// //
this.$post(this.api.joinCompetitionTeam, { this.$post(this.api[this.info.completeCompetitionSetup.competitionType ? 'joinCompetitionTeam' : 'addCompetitionRegistration'], {
accountId: form.id, accountId: form.id,
competitionId: this.id, competitionId: this.id,
teamId: this.form.teamId, teamId: this.form.teamId,
@ -376,7 +392,7 @@ export default {
competitionId: this.id, competitionId: this.id,
userName: '', userName: '',
workNumber: '', workNumber: '',
schoolId: '', schoolId: this.schoolDisable ? this.$store.state.user.schoolId : '',
teamId: '', teamId: '',
whetherSignUp: 0, whetherSignUp: 0,
phone: '', phone: '',
@ -400,9 +416,15 @@ export default {
}, },
// //
getClient() { getClient() {
this.$get(this.api.querySchoolData).then(({ list }) => { if (this.info.competitionScope === 2) { //
this.clients = list this.$get(`${this.api.schoolsInCompetitionArea}?competitionId=${this.id}`).then(({ schools }) => {
}).catch(res => {}) this.clients = schools
}).catch(res => {})
} else { //
this.$get(this.api.querySchoolData).then(({ list }) => {
this.clients = list
}).catch(res => {})
}
}, },
// //
getTeam() { getTeam() {

@ -160,9 +160,11 @@ export default {
return this.$confirm(`确定移除 ${file.name}`); return this.$confirm(`确定移除 ${file.name}`);
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.$del(`${this.api.fileDeletion}?keys=${file.url}`).then(res => {}).catch(res => {}) if (file.url) {
const id = this.form.announcementAnnexList.find(e => e.fileName === file.name).id this.$del(`${this.api.fileDeletion}?keys=${file.url}`).then(res => {}).catch(res => {})
this.$post(`${this.api.deleteAnnouncementAnnex}?id=${id}`).then(res => {}).catch(res => {}) const id = this.form.announcementAnnexList.find(e => e.fileName === file.name).id
this.$post(`${this.api.delAnnex}?id=${id}`).then(res => {}).catch(res => {})
}
}, },
back() { back() {
this.$router.back() this.$router.back()

@ -5,8 +5,8 @@
<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="handleSubmit(0)">保存为草稿</el-button> <el-button type="success" @click="save(0)">保存为草稿</el-button>
<el-button type="primary" @click="handleSubmit(1)">确定并发布</el-button> <el-button type="primary" @click="save(1)">确定并发布</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
@ -57,7 +57,7 @@
<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" :index="1" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -104,7 +104,7 @@
<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 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" /> <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">
@ -134,7 +134,7 @@
<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" :index="3" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -231,7 +231,8 @@ export default {
visibleLoading: false, // visibleLoading: false, //
listLoading:false,// listLoading:false,//
submiting: false, // submiting: false, //
updateTime: 0 updateTime: 0,
next: null
}; };
}, },
computed: { computed: {
@ -270,10 +271,24 @@ export default {
}, 500); }, 500);
} }
}, },
created() { // ,
this.getSystemData(); beforeRouteLeave(to, from, next) {
console.log(44, this.updateTime)
if(this.updateTime){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.next = next
this.save(this.projectManage.state)
}).catch(() => {
next()
})
}else{
next()
}
}, },
mounted() { mounted() {
this.getSystemData();
if (this.$route.query.projectId) { if (this.$route.query.projectId) {
this.projectId = this.$route.query.projectId; this.projectId = this.$route.query.projectId;
this.getInfoData(); this.getInfoData();
@ -312,6 +327,7 @@ export default {
}); });
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.main.scrollTop = 0; this.$refs.main.scrollTop = 0;
this.updateTime = 0
}); });
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
@ -392,7 +408,7 @@ export default {
} }
return true; return true;
}, },
handleSubmit(state) { // save(state) { //
if (this.submiting) return false if (this.submiting) return false
if (!this.judgmentRelease(state)) { // if (!this.judgmentRelease(state)) { //
return; return;
@ -434,7 +450,8 @@ 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.$router.back(); this.updateTime = 0
this.next ? this.next() : this.$router.back();
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}); });
@ -443,7 +460,8 @@ export default {
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("添加实验项目成功");
this.$router.back(); this.updateTime = 0
this.next ? this.next() : this.$router.back();
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}); });
@ -677,23 +695,19 @@ export default {
console.log(err); console.log(err);
}); });
}, },
//
toList() {
this.$router.back()
},
// //
back() { back() {
// //
if(this.updateTime > 1){ if(this.updateTime){
this.$confirm('编辑的内容未保存,是否保存?', "提示", { this.$confirm('编辑的内容未保存,是否保存?', "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.handleSubmit(this.projectManage.state) this.save(this.projectManage.state)
}).catch(() => { }).catch(() => {
this.toList() this.$router.back()
}) })
} else { } else {
this.toList() this.$router.back()
} }
} }
} }

@ -44,6 +44,21 @@ export default {
edited: false edited: false
}; };
}, },
// ,
beforeRouteLeave(to, from, next) {
if(this.edited){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.$refs.info.save()
next()
}).catch(() => {
next()
})
}else{
next()
}
},
components: { info }, components: { info },
computed: { computed: {
...mapState('user', [ ...mapState('user', [
@ -61,6 +76,7 @@ export default {
this.setAvatar(res.message) this.setAvatar(res.message)
}, },
updateStatus(status){ updateStatus(status){
console.log("🚀 ~ file: index.vue:79 ~ updateStatus ~ status", status)
this.edited = status this.edited = status
} }
} }

@ -176,7 +176,7 @@
</div> </div>
</div> </div>
<div class="btns"> <div class="btns">
<el-button size="small" v-throttle @click="$router.back()">取消</el-button> <!-- <el-button size="small" v-throttle @click="cancel">取消</el-button> -->
<el-button type="primary" size="small" v-throttle @click="save">更新</el-button> <el-button type="primary" size="small" v-throttle @click="save">更新</el-button>
</div> </div>
@ -400,6 +400,23 @@ export default {
"userId", "avatar" "userId", "avatar"
]) ])
}, },
watch: {
// ,
form: {
handler(){
this.updateTime++
if(this.updateTime > 1) this.$emit('updateStatus',this.updateTime > 1)
},
deep:true
},
archivesList: {
handler(){
this.updateTime++
if(this.updateTime > 1) this.$emit('updateStatus',this.updateTime > 1)
},
deep:true
}
},
mounted() { mounted() {
this.getData(); this.getData();
this.getProvince(); this.getProvince();
@ -549,6 +566,10 @@ export default {
} else { } else {
this.concatArch(1); this.concatArch(1);
} }
setTimeout(() => {
this.updateTime = 1
this.$emit('updateStatus',this.updateTime > 1)
}, 500)
}); });
}) })
.catch(err => { .catch(err => {
@ -779,7 +800,21 @@ export default {
}); });
} }
}, },
save() { //
cancel() {
if(this.updateTime > 1){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.save(1)
}).catch(() => {
this.$router.back()
})
}else{
this.$router.back()
}
},
save(close) {
let isEmpty = false; let isEmpty = false;
// this.archivesList.forEach((n, k) => { // this.archivesList.forEach((n, k) => {
// if (!n.personalCareerId) isEmpty = true; // if (!n.personalCareerId) isEmpty = true;
@ -832,6 +867,7 @@ export default {
this.$post(this.api.updatePersonCenter, data).then(res => { this.$post(this.api.updatePersonCenter, data).then(res => {
this.setUserName(form.userName); this.setUserName(form.userName);
this.$message.success("提交成功!"); this.$message.success("提交成功!");
close && this.$router.back()
}).catch(res => { }).catch(res => {
}); });
}, },
@ -967,23 +1003,6 @@ export default {
} }
} }
}, },
watch: {
// ,
form: {
handler(){
this.updateTime++
// if(this.updateTime > 1) this.$emit('updateStatus',this.updateTime > 1)
},
deep:true
},
archivesForm: {
handler(){
this.updateTime++
// if(this.updateTime > 1) this.$emit('updateStatus',this.updateTime > 1)
},
deep:true
},
},
}; };
</script> </script>

@ -169,7 +169,7 @@ export default {
}, },
methods: { methods: {
goBack() { goBack() {
this.$router.back(); this.$router.push('/station')
}, },
async getData() { async getData() {
let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}`); let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}`);

@ -47,7 +47,7 @@
<el-dialog :title="Form.staffArchitectureId ? '编辑部门' : '新增部门'" :visible.sync="majorVisible" width="24%" center @close="closeAdd" :close-on-click-modal="false"> <el-dialog :title="Form.staffArchitectureId ? '编辑部门' : '新增部门'" :visible.sync="majorVisible" width="24%" center @close="closeAdd" :close-on-click-modal="false">
<el-form ref="Form" :model="Form" :rules="rules"> <el-form ref="Form" :model="Form" :rules="rules">
<el-form-item prop="staffArchitectureName"> <el-form-item prop="staffArchitectureName">
<el-input placeholder="请输入专业名称" v-model="Form.staffArchitectureName"></el-input> <el-input placeholder="请输入部门名称" v-model="Form.staffArchitectureName"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -57,14 +57,14 @@
</el-dialog> </el-dialog>
<el-dialog :title="Form.gradeId ? '编辑部门' : '新增部门'" :visible.sync="depVisible" width="24%" center @close="closeAdd" :close-on-click-modal="false"> <el-dialog :title="Form.gradeId ? '编辑部门' : '新增部门'" :visible.sync="depVisible" width="24%" center @close="closeAdd" :close-on-click-modal="false">
<el-form ref="Form" :model="Form" :rules="rules"> <el-form ref="Form1" :model="Form" :rules="rules">
<el-form-item prop="gradeName"> <el-form-item prop="gradeName">
<el-input placeholder="请输入部门名称" v-model="Form.gradeName"></el-input> <el-input placeholder="请输入部门名称" v-model="Form.gradeName"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="depVisible = false"> </el-button> <el-button @click="depVisible = false"> </el-button>
<el-button type="primary" @click="sureDepartment('Form')"> </el-button> <el-button type="primary" @click="sureDepartment('Form1')"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -89,7 +89,7 @@ export default {
}, },
rules: { rules: {
staffArchitectureName: [ staffArchitectureName: [
{ required: true, message: "请输入专业名称", trigger: "blur" } { required: true, message: "请输入部门名称", trigger: "blur" }
], ],
gradeName: [ gradeName: [
{ required: true, message: "请输入部门名称", trigger: "blur" } { required: true, message: "请输入部门名称", trigger: "blur" }
@ -167,16 +167,17 @@ export default {
this.$post(this.api.saveProfessional, data).then(res => { this.$post(this.api.saveProfessional, data).then(res => {
util.successMsg("添加成功"); util.successMsg("添加成功");
this.majorVisible = false; this.majorVisible = false;
let newData = { this.getStaff()
staffArchitectureId: res.staffArchitectureId, // let newData = {
staffArchitectureName: this.Form.staffArchitectureName, // staffArchitectureId: res.staffArchitectureId,
label: this.Form.staffArchitectureName, // staffArchitectureName: this.Form.staffArchitectureName,
value: res.staffArchitectureId, // label: this.Form.staffArchitectureName,
ifVisible: false, // value: res.staffArchitectureId,
ischeck: false, // ifVisible: false,
children: [] // ischeck: false,
}; // children: []
this.orgList.push(newData); // };
// this.orgList.push(newData);
}).catch(res => { }).catch(res => {
}); });
} }
@ -235,20 +236,21 @@ export default {
this.$post(this.api.saveGrade, data).then(res => { this.$post(this.api.saveGrade, data).then(res => {
util.successMsg("添加成功"); util.successMsg("添加成功");
this.depVisible = false; this.depVisible = false;
let newData = { this.getStaff()
gradeId: res.gradeId, // let newData = {
gradeName: this.Form.gradeName, // gradeId: res.gradeId,
label: this.Form.gradeName, // gradeName: this.Form.gradeName,
value: res.gradeId, // label: this.Form.gradeName,
ifVisible: false, // value: res.gradeId,
ischeck: false // ifVisible: false,
}; // ischeck: false
this.orgList.map(e => { // };
if (e.staffArchitectureId == this.Form.staffArchitectureId) { // this.orgList.map(e => {
e.ifVisible = true; // if (e.staffArchitectureId == this.Form.staffArchitectureId) {
e.children.push(newData); // e.ifVisible = true;
} // e.children.push(newData);
}); // }
// });
}).catch(res => { }).catch(res => {
}); });
} }

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
// host = "http://192.168.31.51:9000/"; // 榕 // host = "http://192.168.31.151:9000/"; // 榕
host = 'http://192.168.31.116:9000/'; // 赓 host = 'http://192.168.31.116:9000/'; // 赓
} }

Loading…
Cancel
Save