confirm确认弹框禁止点击遮盖层关闭

master
yujialong 9 months ago
parent d5c72572be
commit 7d02d3baba
  1. 2
      public/index.html
  2. 228
      src/pages/achievement/edit/index.vue
  3. 8
      src/pages/achievement/show/index.vue
  4. 3
      src/pages/activity/details/index.vue
  5. 3
      src/pages/activity/list/index.vue
  6. 6
      src/pages/activity/manage/add/index.vue
  7. 8
      src/pages/activity/manage/manage/index.vue
  8. 122
      src/pages/activity/manage/manage/matchProgress.vue
  9. 91
      src/pages/activity/manage/manage/notice.vue
  10. 6
      src/pages/assessment/add/index.vue
  11. 3
      src/pages/assessment/list/index.vue
  12. 9
      src/pages/course/add/index.vue
  13. 3
      src/pages/course/contentSettings/index.vue
  14. 3
      src/pages/expSystem/backstage/addModel.vue
  15. 3
      src/pages/expSystem/backstage/sourceModel.vue
  16. 6
      src/pages/information/addarticle/index.vue
  17. 30
      src/pages/information/contentManage/index.vue
  18. 34
      src/pages/information/list/index.vue
  19. 9
      src/pages/match/add/index.vue
  20. 3
      src/pages/match/manage/index.vue
  21. 3
      src/pages/match/manage/matchInfo.vue
  22. 127
      src/pages/match/manage/matchProgress.vue
  23. 3
      src/pages/match/manage/matchRank.vue
  24. 94
      src/pages/match/manage/notice.vue
  25. 9
      src/pages/project/add/index.vue
  26. 60
      src/pages/setting/list/index.vue
  27. 521
      src/pages/setting/list/info.vue
  28. 3
      src/pages/station/preview/index.vue
  29. 3
      vue.config.js

@ -10,7 +10,7 @@
var _hmt = _hmt || [];
(function() {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?e4d7deeca2d6ea71d2bd5fa2365bc654';
hm.src = 'https://hm.baidu.com/hm.js?72fbad6ebf1d6c705117fe8fe0686a0e';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();

@ -2,21 +2,30 @@
<div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-between">
<div class="per_title" @click="goback()">
<div class="per_title"
@click="goback()">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school">修改分数</span>
</div>
<div>
<el-button type="success" round class="mag" @click="saveAdd('form')">预览</el-button>
<el-button type="primary" round class="mag" @click="saveAdd('form')">发布成绩</el-button>
<el-button type="success"
round
class="mag"
@click="saveAdd('form')">预览</el-button>
<el-button type="primary"
round
class="mag"
@click="saveAdd('form')">发布成绩</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<h6 style="text-align: center;font-size: 20px">实验成绩报告</h6>
<div class="flex-center mgb20 user_header">
<p class="addhr_tag"></p>
@ -24,159 +33,239 @@
</div>
<div>
<el-table :data="infoData" class="table" stripe header-align="center">
<el-table-column prop="projectName" label="实验名称" align="center">
<el-table :data="infoData"
class="table"
stripe
header-align="center">
<el-table-column prop="projectName"
label="实验名称"
align="center">
</el-table-column>
<el-table-column prop="period" label="实验学时" align="center">
<el-table-column prop="period"
label="实验学时"
align="center">
</el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center">
<el-table-column prop="userName"
label="学生姓名"
align="center">
</el-table-column>
<el-table-column prop="number" label="学生学号" align="center">
<el-table-column prop="number"
label="学生学号"
align="center">
</el-table-column>
<el-table-column prop="class" label="学生班级" align="center">
<el-table-column prop="class"
label="学生班级"
align="center">
</el-table-column>
<el-table-column prop="content" label="实验内容" align="center">
<el-table-column prop="content"
label="实验内容"
align="center">
</el-table-column>
<el-table-column prop="desc" label="实验数据与结果分析" align="center">
<el-table-column prop="desc"
label="实验数据与结果分析"
align="center">
</el-table-column>
<el-table-column prop="result" label="实验结论" align="center">
<el-table-column prop="result"
label="实验结论"
align="center">
</el-table-column>
<el-table-column prop="experience" label="实验与心得体会" align="center">
<el-table-column prop="experience"
label="实验与心得体会"
align="center">
</el-table-column>
<el-table-column prop="total" label="总分" align="center">
<el-table-column prop="total"
label="总分"
align="center">
</el-table-column>
</el-table>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">实验项目名称</p>
</div>
<el-input v-model="form.projectName" type="textarea" :disabled="true" rows="5"></el-input>
<el-input v-model="form.projectName"
type="textarea"
:disabled="true"
rows="5"></el-input>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">实验目的</p>
<span>得分50/60</span>
</div>
<el-input v-model="form.experimentGoal" type="textarea" :disabled="true" rows="5"></el-input>
<el-input v-model="form.experimentGoal"
type="textarea"
:disabled="true"
rows="5"></el-input>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">实验原理</p>
<span>得分50/60</span>
</div>
<el-input v-model="form.principle" type="textarea" :disabled="true" rows="5"></el-input>
<el-input v-model="form.principle"
type="textarea"
:disabled="true"
rows="5"></el-input>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">实验内容</p>
<span>得分50/60</span>
</div>
<el-input v-model="form.content" type="textarea" :disabled="true" rows="5"></el-input>
<el-input v-model="form.content"
type="textarea"
:disabled="true"
rows="5"></el-input>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">实验步骤</p>
<span>得分50/60</span>
</div>
<el-input v-model="form.step" type="textarea" :disabled="true" rows="5"></el-input>
<el-input v-model="form.step"
type="textarea"
:disabled="true"
rows="5"></el-input>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">实验数据</p>
<span>得分50/60</span>
</div>
<el-table :data="expData" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
<el-table :data="expData"
class="table"
stripe
header-align="center">
<el-table-column type="index"
width="100"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="module" label="模块" align="center">
<el-table-column prop="module"
label="模块"
align="center">
</el-table-column>
<el-table-column prop="judgmentPointsName" label="考核点" align="center">
<el-table-column prop="judgmentPointsName"
label="考核点"
align="center">
</el-table-column>
<el-table-column prop="userAnswer" label="学生答案" align="center">
<el-table-column prop="userAnswer"
label="学生答案"
align="center">
</el-table-column>
<el-table-column prop="answer" label="参考答案" align="center">
<el-table-column prop="answer"
label="参考答案"
align="center">
</el-table-column>
<el-table-column prop="codeScore" label="得分" align="center">
<el-table-column prop="codeScore"
label="得分"
align="center">
</el-table-column>
</el-table>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">实验结论</p>
<span>得分50/60</span>
</div>
<el-input type="textarea" v-model="form.conclusion" rows="5"></el-input>
<div class="flex-between" style="margin-top: 10px">
<el-input type="textarea"
v-model="form.conclusion"
rows="5"></el-input>
<div class="flex-between"
style="margin-top: 10px">
<span>教师评分</span>
<div>
<el-input style="display: inline-block;width: auto;" placeholder="请输入"></el-input>
<el-input style="display: inline-block;width: auto;"
placeholder="请输入"></el-input>
(10)
</div>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">总结及心得体会</p>
<span>得分50/60</span>
</div>
<el-input type="textarea" v-model="form.summarize" rows="5"></el-input>
<div class="flex-between" style="margin-top: 10px">
<el-input type="textarea"
v-model="form.summarize"
rows="5"></el-input>
<div class="flex-between"
style="margin-top: 10px">
<span>教师评分</span>
<div>
<el-input style="display: inline-block;width: auto;" placeholder="请输入"></el-input>
<el-input style="display: inline-block;width: auto;"
placeholder="请输入"></el-input>
(10)
</div>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">对本实验过程及方法手段的改进建议</p>
<span>得分50/60</span>
</div>
<el-input type="textarea" rows="5" v-model="form.improvement"></el-input>
<el-input type="textarea"
rows="5"
v-model="form.improvement"></el-input>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-between mgb20">
<span>老师寄语</span>
</div>
<el-input type="textarea" rows="5"></el-input>
<el-input type="textarea"
rows="5"></el-input>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<p class="mgb20">教师签名</p>
<div class="mgb20">
<el-radio v-model="autograph" label="1">不使用</el-radio>
<el-radio v-model="autograph" label="2">已有签名</el-radio>
<el-radio v-model="autograph" label="3">重新上传</el-radio>
<el-radio v-model="autograph"
label="1">不使用</el-radio>
<el-radio v-model="autograph"
label="2">已有签名</el-radio>
<el-radio v-model="autograph"
label="3">重新上传</el-radio>
</div>
<el-row v-if="autograph != 1">
<el-col :span="6">
<el-select class="sign-select" v-model="signId" placeholder="请选择签名" size="mini" v-show="autograph == 2">
<el-option
v-for="item in signList"
<el-select class="sign-select"
v-model="signId"
placeholder="请选择签名"
size="mini"
v-show="autograph == 2">
<el-option v-for="item in signList"
:key="item.id"
:label="item.signatureName"
:value="item.id"
>
:value="item.id">
</el-option>
</el-select>
<el-upload
:data="{userId: userId}"
<el-upload :data="{userId: userId}"
:limit="1"
:action="api.uploadSignature"
list-type="picture-card"
@ -195,7 +284,7 @@
<script>
export default {
data() {
data () {
return {
userId: this.$store.state.userLoginId,
id: this.$route.query.id,
@ -222,12 +311,12 @@ export default {
signId: ""
};
},
mounted() {
mounted () {
this.getData();
this.getSgin();
},
methods: {
getData() {
getData () {
let data = {
// reportId: this.id
reportId: 97
@ -248,7 +337,7 @@ export default {
}).catch(res => {
});
},
getSgin() {
getSgin () {
let data = {
userId: this.userId
};
@ -257,10 +346,10 @@ export default {
}).catch(res => {
});
},
handleRemove(file, fileList) {
handleRemove (file, fileList) {
console.log(file, fileList);
},
saveAdd() {
saveAdd () {
let data = {
systemId: this.configId,
systemName: this.form.systemName,
@ -281,7 +370,7 @@ export default {
});
}
},
SpanMethod({ row, column, rowIndex, columnIndex }) {
SpanMethod ({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
if (columnIndex === 6) {
if (!row.Intranet) {
@ -293,15 +382,15 @@ export default {
// }
}
},
editMsg() {
editMsg () {
this.isEdit = true;
},
handleExceed(files, fileList) {
handleExceed (files, fileList) {
util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
);
},
uploadSuccess(res, file) {
uploadSuccess (res, file) {
if (res.status == 200) {
util.successMsg("上传成功");
this.getSgin();
@ -309,9 +398,10 @@ export default {
$message.error(res.message);
}
},
goback() {
goback () {
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning"
type: "warning",
closeOnClickModal: false
})
.then(() => {
this.$router.back();

@ -156,12 +156,7 @@
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}}
</span>
<span v-else>
<span>{{index+1}}. </span>未填写
</span>
{{index+1}}. {{item.userAnswer || '未填写'}}
</div>
</div>
<div v-else
@ -290,6 +285,7 @@ export default {
e.lcRuleRecords.map((n, i) => {
e.assessmentPoint += `${i + 1}.${n.name}`
e.referenceAnswer += `${i + 1}.${n.ruleAnswer}`
if (!n.userAnswer) n.userAnswer = '未填写'
e.answer += `${i + 1}.${n.userAnswer}`
})
})

@ -333,7 +333,8 @@ export default {
} else if (status == 1) {
//
this.$confirm('是否要取消报名?', '提示', {
type: 'success'
type: 'success',
closeOnClickModal: false
}).then(() => {
this.$post(`${this.api.delActivityApplicant}?id=${this.form.cancelId}`).then(res => {
this.getData()

@ -354,7 +354,8 @@ export default {
} else if (status == 1) {
//
this.$confirm('是否要取消报名?', '提示', {
type: 'success'
type: 'success',
closeOnClickModal: false
}).then(() => {
this.$post(`${this.api.delActivityApplicant}?id=${item.cancelId}`).then(res => {
this.getData()

@ -261,7 +261,8 @@ export default {
//
if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save(this.form.publishStatus)
}).catch(() => {
@ -433,7 +434,8 @@ export default {
//
if (this.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save(this.form.publishStatus)
}).catch(() => {

@ -64,8 +64,9 @@ export default {
beforeRouteLeave (to, from, next) {
const detail = this.$refs.detail
if (detail && detail.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示.......', {
type: 'warning'
this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示', {
type: 'warning',
closeOnClickModal: false
}).then(() => {
detail.save(detail.form.publishStatus)
}).catch(() => {
@ -89,7 +90,8 @@ export default {
const detail = this.$refs.detail
if (detail && detail.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
detail.save(detail.form.publishStatus)
this.backOrTab(i)

@ -1,38 +1,71 @@
<template>
<!-- 竞赛进展 -->
<div class="page-content" style="padding: 24px">
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center">
<div class="page-content"
style="padding: 24px">
<el-table ref="table"
:data="listData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="name" label="标题">
<el-table-column prop="name"
label="标题">
<template slot-scope="scope">
<el-input placeholder="请输入标题" :disabled="!scope.row.operate" v-model="scope.row.title"></el-input>
<el-input placeholder="请输入标题"
:disabled="!scope.row.operate"
v-model="scope.row.title"></el-input>
</template>
</el-table-column>
<el-table-column prop="name" label="详情描述">
<el-table-column prop="name"
label="详情描述">
<template slot-scope="scope">
<el-input placeholder="请输入详情描述" :disabled="!scope.row.operate" type="textarea" v-model="scope.row.description"></el-input>
<el-input placeholder="请输入详情描述"
:disabled="!scope.row.operate"
type="textarea"
v-model="scope.row.description"></el-input>
</template>
</el-table-column>
<el-table-column prop="name" label="状态" width="150">
<el-table-column prop="name"
label="状态"
width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.status" :disabled="!scope.row.operate" clearable placeholder="请选择状态">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-select v-model="scope.row.status"
:disabled="!scope.row.operate"
clearable
placeholder="请选择状态">
<el-option v-for="(item,index) in statusList"
:key="index"
:label="item.name"
:value="item.value"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170">
<el-table-column label="操作"
align="center"
width="170">
<template slot-scope="scope">
<el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)">编辑</el-button>
<el-button v-else type="text" @click="saveData(scope.row)">保存</el-button>
<el-button type="text" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
<el-button v-if="!scope.row.operate"
type="text"
@click="operateIt(scope.row)">编辑</el-button>
<el-button v-else
type="text"
@click="saveData(scope.row)">保存</el-button>
<el-button type="text"
@click="handleDelete(scope.row, scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="plus" @click="addData">
<div class="plus"
@click="addData">
<i class="el-icon-circle-plus-outline"></i>
</div>
</div>
@ -42,7 +75,7 @@
import util from "@/libs/util";
export default {
name: "matchProgress",
data() {
data () {
return {
save: false,
id: this.$route.query.id,
@ -65,43 +98,43 @@ export default {
pageNo: 1,
pageSize: 10,
totals: 0,
touchTime:0,
touchTime: 0,
timeOut: {}
};
},
mounted() {
mounted () {
this.getData();
},
methods: {
operateIt(row) {
operateIt (row) {
row.operate = true
},
getData() {
getData () {
this.$get(this.api.listActivityProgress, {
activityId: this.id
}).then(res => {
this.listData = res.activityProgressList;
for(let index=0; index<this.listData.length; index++) {
for (let index = 0; index < this.listData.length; index++) {
//
this.$set(this.listData, index, { operate: false, ...this.listData[index]})
this.$set(this.listData, index, { operate: false, ...this.listData[index] })
}
}).catch(res => {
});
},
saveData(row) {
saveData (row) {
//
let data = row;
if (data.title.length) {
if (row.id) {
this.$post(this.api.updateActivityProgress, data).then(res => {
this.touchTime = this.touchTime-1
this.touchTime = this.touchTime - 1
util.successMsg("修改成功");
this.getData();
}).catch(res => {
});
} else {
this.$post(this.api.addActivityProgress, data).then(res => {
this.touchTime = this.touchTime-1
this.touchTime = this.touchTime - 1
util.successMsg("创建成功");
this.getData();
}).catch(res => {
@ -111,22 +144,22 @@ export default {
util.warningMsg("请填写标题");
}
},
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val;
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.getData();
},
handleDelete(row, index) {
handleDelete (row, index) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
}).then(() => {
if(row.id === "") {
if (row.id === "") {
this.listData.splice(index, 1)
util.successMsg("删除成功");
}else {
this.touchTime = this.touchTime+1
} else {
this.touchTime = this.touchTime + 1
this.$post(this.api.delActivityProgress, [row.id]).then(res => {
util.successMsg("删除成功");
this.getData();
@ -137,9 +170,9 @@ export default {
}).catch(() => {
});
},
addData() {
addData () {
// this.$store.commit("activity/setWait", 1);
this.touchTime = this.touchTime+1
this.touchTime = this.touchTime + 1
if (this.listData.length) {
if (this.listData[this.listData.length - 1].id) {
this.listData.push({
@ -165,15 +198,16 @@ export default {
});
}
},
waitSave() {
if(this.hasEdit) {
waitSave () {
if (this.hasEdit) {
this.$confirm('暂未保存,是否保存本次编辑?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
let num = 0;
for(var i=0;i<this.listData.length;i++){
for (var i = 0; i < this.listData.length; i++) {
let data = this.listData[i];
if (data.title) {
if (this.listData[i].id) {
@ -181,19 +215,19 @@ export default {
}).catch(res => {
});
}else{
num = num+1
} else {
num = num + 1
}
}else{
num = num+1
} else {
num = num + 1
}
}
if (num >0){
if (num > 0) {
this.$message({
type: 'error',
message: '保存失败,有未填项目'
});
}else{
} else {
this.$message({
type: 'success',
message: '保存成功!'
@ -210,7 +244,7 @@ export default {
}
},
computed: {
hasEdit() {
hasEdit () {
return this.listData.some(item => item.operate)
}
}

@ -1,44 +1,67 @@
<template>
<!-- 报名人员 -->
<div class="page-content" style="padding: 24px">
<div class="tool" style="justify-content: flex-end">
<el-button type="primary" round @click="add">新增</el-button>
<div class="page-content"
style="padding: 24px">
<div class="tool"
style="justify-content: flex-end">
<el-button type="primary"
round
@click="add">新增</el-button>
</div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center">
<el-table ref="table"
:data="listData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="announcementTitle" label="标题名称">
<el-table-column prop="announcementTitle"
label="标题名称">
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="createTime"
label="创建时间">
</el-table-column>
<el-table-column prop="updateTime" label="发布时间">
<el-table-column prop="updateTime"
label="发布时间">
</el-table-column>
<el-table-column prop="phone" label="状态">
<el-table-column prop="phone"
label="状态">
<template slot-scope="scope">
{{ scope.row.status ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<el-table-column label="操作"
align="center"
width="250">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
<el-switch
v-model="scope.row.isOpen"
<el-button type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button type="text"
@click="del(scope.row)">删除</el-button>
<el-switch v-model="scope.row.isOpen"
:active-text="scope.row.isOpen ? '关' : '开'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)"
></el-switch>
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo">
<el-pagination background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="pageNo">
</el-pagination>
</div>
</div>
@ -50,7 +73,7 @@ import Setting from "@/setting";
export default {
name: "matchSignup",
data() {
data () {
return {
token: util.local.get(Setting.tokenKey),
id: this.$route.query.id,
@ -63,32 +86,32 @@ export default {
};
},
watch: {
keyword: function(val) {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData();
}, 500);
}
},
mounted() {
mounted () {
this.getData()
},
methods: {
getData() {
getData () {
this.$post(`${this.api.listActivityAnnouncement}?pageNum=${this.pageNo}&pageSize=${this.pageSize}&competitionId=${this.id}`).then(({ data }) => {
this.listData = data.records
this.totals = data.total
this.$refs.table.clearSelection()
}).catch(res => {})
}).catch(res => { })
},
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val;
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.getData();
},
del(row) {
del (row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
@ -102,12 +125,13 @@ export default {
.catch(() => {
});
},
switchOff(val, row, index) {
switchOff (val, row, index) {
if (val) {
this.$put(`${this.api.disableActivityAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {}).catch(err => {})
this.$put(`${this.api.disableActivityAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => { }).catch(err => { })
} else if (!row.status) {
this.$confirm('是否发布该公告?', '提示', {
type: 'success'
type: 'success',
closeOnClickModal: false
}).then(() => {
this.$put(`${this.api.disableActivityAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {
this.$post(this.api.updateActivityAnnouncement, {
@ -115,19 +139,19 @@ export default {
status: 1
}).then(res => {
this.getData()
}).catch(err => {})
}).catch(err => {})
}).catch(err => { })
}).catch(err => { })
}).catch(() => {
row.isOpen = 1
})
} else {
this.$put(`${this.api.disableActivityAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {}).catch(err => {})
this.$put(`${this.api.disableActivityAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => { }).catch(err => { })
}
},
add() {
add () {
this.$router.push(`noticeDetail?activityId=${this.id}`)
},
edit(row) {
edit (row) {
this.$router.push(`noticeDetail?id=${row.id}&activityId=${this.id}`)
}
}
@ -135,5 +159,4 @@ export default {
</script>
<style scoped>
</style>

@ -313,7 +313,8 @@ export default {
beforeRouteLeave (to, from, next) {
if (!this.isToProject && this.updateTime) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save(next)
}).catch(() => {
@ -623,7 +624,8 @@ export default {
//
if (this.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save()
}).catch(() => {

@ -470,7 +470,8 @@ export default {
},
finish (row) {
this.$confirm("确定要提前结束吗?", "提示", {
type: "warning"
type: "warning",
closeOnClickModal: false
}).then(() => {
let data = {
id: row.id,

@ -264,7 +264,8 @@ export default {
beforeRouteLeave (to, from, next) {
if (this.updateTime) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save(next)
}).catch(() => {
@ -388,7 +389,8 @@ export default {
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success",
confirmButtonText: "马上设置",
cancelButtonText: "稍后操作"
cancelButtonText: "稍后操作",
closeOnClickModal: false
}).then(() => {
this.$router.replace(`/course/contentSettings?id=${courseId}`);
}).catch(() => {
@ -410,7 +412,8 @@ export default {
//
if (updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save()
}).catch(() => {

@ -449,7 +449,8 @@ export default {
//
if (this.moved) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.saveSort()
this.moved = false

@ -184,7 +184,8 @@ export default {
//
if ((id && updateTime > 1) || (!id && updateTime)) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.submit(this.postStatus ? 1 : 0, 1)
this.backPage()

@ -253,7 +253,8 @@ export default {
}
})
this.$confirm(`确定要${off ? '启用' : '禁用'}吗?`, "提示", {
type: "warning"
type: "warning",
closeOnClickModal: false
}).then(() => {
//
this.$post(this.api[isSystem ? (off ? 'demoHiddenOpen' : 'demoHiddenClose') : 'disableModelDemo'], list).then(async res => {

@ -145,7 +145,8 @@ export default {
beforeRouteLeave (to, from, next) {
if (this.updateTime) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save(next)
}).catch(() => {
@ -248,7 +249,8 @@ export default {
//
if (this.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save()
}).catch(() => {

@ -2,10 +2,19 @@
<!-- 内容管理 -->
<div class="flex">
<div class="menu-con">
<el-tree ref="column" :data="menuList" :props="{ label: 'name' }" highlight-current :expand-on-click-node="false" default-expand-all node-key="id" @node-click="handleSelect"></el-tree>
<el-tree ref="column"
:data="menuList"
:props="{ label: 'name' }"
highlight-current
:expand-on-click-node="false"
default-expand-all
node-key="id"
@node-click="handleSelect"></el-tree>
</div>
<div class="right">
<ContentList ref="content" v-show="menuList.length" :columnId="columnId" />
<ContentList ref="content"
v-show="menuList.length"
:columnId="columnId" />
</div>
</div>
</template>
@ -21,21 +30,21 @@ export default {
menuTree,
ContentList
},
data() {
data () {
return {
menuList: [],
columnId: "",
ids: []
};
},
mounted() {
mounted () {
this.getMenuData();
},
methods: {
...mapActions("info", [
"setColumnId"
]),
getMenuData() {
getMenuData () {
this.$get(this.api.queryAllColumns, {
platformId: Setting.platformId,
page: 1,
@ -60,23 +69,24 @@ export default {
});
},
// id便
getId(data) {
getId (data) {
data.map(e => {
this.ids.push(e.id)
e.children.length && this.getId(e.children)
})
},
setColumn(id) {
setColumn (id) {
this.columnId = id
this.setColumnId(id)
},
handleSelect(key) {
handleSelect (key) {
const { content } = this.$refs
const { list, originList } = content
//
if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
content.sortSubmit()
this.setColumn(key.id)
@ -96,7 +106,7 @@ export default {
width: 210px;
height: calc(100vh - 250px);
border-right: solid 1px #e6e6e6;
background-color: #F2F6FC;
background-color: #f2f6fc;
/deep/.el-tree-node__content {
height: 50px;
}

@ -2,11 +2,17 @@
<!-- 资讯管理 -->
<div class="page">
<ul class="column-tab">
<li :class="{active: tabsName == 1}" @click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li>
<li :class="{active: tabsName == 2}" @click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
<li :class="{active: tabsName == 1}"
@click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li>
<li :class="{active: tabsName == 2}"
@click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
</ul>
<columnManage class="flex-1" ref="content1" v-if="tabsName == 1" />
<ContentManage class="flex-1" ref="content2" v-if="tabsName == 2" />
<columnManage class="flex-1"
ref="content1"
v-if="tabsName == 1" />
<ContentManage class="flex-1"
ref="content2"
v-if="tabsName == 2" />
</div>
</template>
@ -20,26 +26,26 @@ export default {
ColumnManage,
ContentManage
},
data() {
data () {
return {
tabsName: this.$store.state.info.tabsName
};
},
//
beforeRouteLeave(to, from, next) {
beforeRouteLeave (to, from, next) {
this.routeLeave(next, true)
},
methods: {
...mapActions("info", [
"setTabsName", "setColumnId"
]),
switchTab(id) {
switchTab (id) {
this.tabsName = id
this.setTabsName(id)
this.setColumnId('')
},
//
routeLeave(fn, param) {
routeLeave (fn, param) {
const tab = this.tabsName
let content = this.$refs['content' + tab]
if (tab == 2) content = content.$refs.content
@ -47,7 +53,8 @@ export default {
//
if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了${tab == 1 ? '栏目' : '文章'}排序,是否保存更改?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
content.sortSubmit()
fn(param)
@ -59,11 +66,11 @@ export default {
}
},
// tab
handleClick(id) {
handleClick (id) {
this.routeLeave(this.switchTab, id)
}
},
mounted() {
mounted () {
}
};
@ -84,8 +91,9 @@ export default {
i {
margin-right: 5px;
}
&:hover, &.active {
color: #9278FF;
&:hover,
&.active {
color: #9278ff;
}
}
}

@ -208,7 +208,8 @@ export default {
const { updateTime } = this.$refs['step' + this.step]
if (this.$refs['step' + this.step] && updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save(0, 1)
}).catch(() => {
@ -257,7 +258,8 @@ export default {
const { updateTime } = this.$refs['step' + this.step]
if (this.step < 4 && this.$refs['step' + this.step] && updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save(0, 3)
}).catch(() => {
@ -275,7 +277,8 @@ export default {
const { updateTime } = this.$refs['step' + this.step]
if (this.step < 4 && this.$refs['step' + this.step] && updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.save(0)
}).catch(() => {

@ -134,7 +134,8 @@ export default {
const step = detail.$refs['step' + detail.step]
if (detail.step < 4 && step && step.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
detail.save(1, 1)
this.backOrTab(i)

@ -539,7 +539,8 @@ export default {
}
}
this.$confirm(include ? `该成员已被指定参加${include},踢出后需重新指定成员参加,是否确认踢出团队?` : '确定要踢出该成员吗?', '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.$post(`${this.api.removeTheLine}?teamId=${this.info.teamId}&competitionId=${this.id}&accountId=${row.accountId}`).then(res => {
util.successMsg('移除成功')

@ -1,38 +1,74 @@
<template>
<!-- 竞赛进展 -->
<div class="page-content" style="padding: 24px">
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center">
<div class="page-content"
style="padding: 24px">
<el-table ref="table"
:data="listData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="name" label="标题">
<el-table-column prop="name"
label="标题">
<template slot-scope="scope">
<el-input placeholder="请输入标题" :disabled="!scope.row.operate" v-model="scope.row.title"></el-input>
<el-input placeholder="请输入标题"
:disabled="!scope.row.operate"
v-model="scope.row.title"></el-input>
</template>
</el-table-column>
<el-table-column prop="name" label="详情描述">
<el-table-column prop="name"
label="详情描述">
<template slot-scope="scope">
<el-input placeholder="请输入详情描述" :disabled="!scope.row.operate" type="textarea" v-model="scope.row.description"></el-input>
<el-input placeholder="请输入详情描述"
:disabled="!scope.row.operate"
type="textarea"
v-model="scope.row.description"></el-input>
</template>
</el-table-column>
<el-table-column prop="name" label="状态" width="150">
<el-table-column prop="name"
label="状态"
width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.status" :disabled="!scope.row.operate" clearable placeholder="请选择状态">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-select v-model="scope.row.status"
:disabled="!scope.row.operate"
clearable
placeholder="请选择状态">
<el-option v-for="(item,index) in statusList"
:key="index"
:label="item.name"
:value="item.value"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170">
<el-table-column label="操作"
align="center"
width="170">
<template slot-scope="scope">
<el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)" v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button>
<el-button v-else type="text" @click="saveData(scope.row)">保存</el-button>
<el-button type="text" @click="handleDelete(scope.row, scope.$index)" v-auth="'/match/list:管理:竞赛进展:删除'">删除</el-button>
<el-button v-if="!scope.row.operate"
type="text"
@click="operateIt(scope.row)"
v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button>
<el-button v-else
type="text"
@click="saveData(scope.row)">保存</el-button>
<el-button type="text"
@click="handleDelete(scope.row, scope.$index)"
v-auth="'/match/list:管理:竞赛进展:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="plus" @click="addData" v-auth="'/match/list:管理:竞赛进展:新增'">
<div class="plus"
@click="addData"
v-auth="'/match/list:管理:竞赛进展:新增'">
<i class="el-icon-circle-plus-outline"></i>
</div>
</div>
@ -42,7 +78,7 @@
import util from "@/libs/util";
export default {
name: "matchProgress",
data() {
data () {
return {
save: false,
id: this.$route.query.id,
@ -65,43 +101,43 @@ export default {
pageNo: 1,
pageSize: 10,
totals: 0,
touchTime:0,
touchTime: 0,
timeOut: {}
};
},
mounted() {
mounted () {
this.getData();
},
methods: {
operateIt(row) {
operateIt (row) {
row.operate = true
},
getData() {
getData () {
this.$get(this.api.getCompetitionProgress, {
competitionId: this.id
}).then(res => {
this.listData = res.competitionProgressList;
for(let index=0; index<this.listData.length; index++) {
for (let index = 0; index < this.listData.length; index++) {
//
this.$set(this.listData, index, { operate: false, ...this.listData[index]})
this.$set(this.listData, index, { operate: false, ...this.listData[index] })
}
}).catch(res => {
});
},
saveData(row) {
saveData (row) {
//
let data = row;
if (data.title.length) {
if (row.id) {
this.$put(this.api.editCompetitionProgress, data).then(res => {
this.touchTime = this.touchTime-1
this.touchTime = this.touchTime - 1
util.successMsg("修改成功");
this.getData();
}).catch(res => {
});
} else {
this.$post(this.api.addCompetitionProgress, data).then(res => {
this.touchTime = this.touchTime-1
this.touchTime = this.touchTime - 1
util.successMsg("创建成功");
this.getData();
}).catch(res => {
@ -111,26 +147,26 @@ export default {
util.warningMsg("请填写标题");
}
},
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val;
},
onSearch() {
onSearch () {
this.pageNo = 1;
this.getData();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.getData();
},
handleDelete(row, index) {
handleDelete (row, index) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
}).then(() => {
if(row.id === "") {
if (row.id === "") {
this.listData.splice(index, 1)
util.successMsg("删除成功");
}else {
this.touchTime = this.touchTime+1
} else {
this.touchTime = this.touchTime + 1
this.$del(`${this.api.deleteCompetitionProgress}?competitionProgressId=${row.id}`).then(res => {
util.successMsg("删除成功");
this.getData();
@ -141,9 +177,9 @@ export default {
}).catch(() => {
});
},
addData() {
addData () {
// this.$store.commit("match/setWait", 1);
this.touchTime = this.touchTime+1
this.touchTime = this.touchTime + 1
if (this.listData.length) {
if (this.listData[this.listData.length - 1].id) {
this.listData.push({
@ -169,15 +205,16 @@ export default {
});
}
},
waitSave() {
if(this.hasEdit) {
waitSave () {
if (this.hasEdit) {
this.$confirm('暂未保存,是否保存本次编辑?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
let num = 0;
for(var i=0;i<this.listData.length;i++){
for (var i = 0; i < this.listData.length; i++) {
let data = this.listData[i];
if (data.title) {
if (this.listData[i].id) {
@ -185,19 +222,19 @@ export default {
}).catch(res => {
});
}else{
num = num+1
} else {
num = num + 1
}
}else{
num = num+1
} else {
num = num + 1
}
}
if (num >0){
if (num > 0) {
this.$message({
type: 'error',
message: '保存失败,有未填项目'
});
}else{
} else {
this.$message({
type: 'success',
message: '保存成功!'
@ -214,7 +251,7 @@ export default {
}
},
computed: {
hasEdit() {
hasEdit () {
return this.listData.some(item => item.operate)
}
}

@ -604,7 +604,8 @@ export default {
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'
type: 'success',
closeOnClickModal: false
}).then(() => {
this.publishSubmit()
}).catch(() => { }) :

@ -1,45 +1,71 @@
<template>
<!-- 报名人员 -->
<div class="page-content" style="padding: 24px">
<div class="tool" style="justify-content: flex-end">
<el-button type="primary" round @click="add" v-auth="'/match/list:管理:公告通知:新增'">新增</el-button>
<div class="page-content"
style="padding: 24px">
<div class="tool"
style="justify-content: flex-end">
<el-button type="primary"
round
@click="add"
v-auth="'/match/list:管理:公告通知:新增'">新增</el-button>
</div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center">
<el-table ref="table"
:data="listData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="announcementTitle" label="标题名称">
<el-table-column prop="announcementTitle"
label="标题名称">
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="createTime"
label="创建时间">
</el-table-column>
<el-table-column prop="updateTime" label="发布时间">
<el-table-column prop="updateTime"
label="发布时间">
</el-table-column>
<el-table-column prop="phone" label="状态">
<el-table-column prop="phone"
label="状态">
<template slot-scope="scope">
{{ scope.row.status ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<el-table-column label="操作"
align="center"
width="250">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)" v-auth="'/match/list:管理:公告通知:编辑'">编辑</el-button>
<el-button type="text" @click="del(scope.row)" v-auth="'/match/list:管理:公告通知:删除'">删除</el-button>
<el-switch
v-auth="'/match/list:管理:公告通知:启用'"
<el-button type="text"
@click="edit(scope.row)"
v-auth="'/match/list:管理:公告通知:编辑'">编辑</el-button>
<el-button type="text"
@click="del(scope.row)"
v-auth="'/match/list:管理:公告通知:删除'">删除</el-button>
<el-switch v-auth="'/match/list:管理:公告通知:启用'"
v-model="scope.row.isOpen"
:active-text="scope.row.isOpen ? '关' : '开'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)"
></el-switch>
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo">
<el-pagination background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="pageNo">
</el-pagination>
</div>
</div>
@ -51,7 +77,7 @@ import Setting from "@/setting";
export default {
name: "matchSignup",
data() {
data () {
return {
token: util.local.get(Setting.tokenKey),
id: this.$route.query.id,
@ -64,32 +90,32 @@ export default {
};
},
watch: {
keyword: function(val) {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData();
}, 500);
}
},
mounted() {
mounted () {
this.getData()
},
methods: {
getData() {
getData () {
this.$post(`${this.api.queryAnnouncementByCompetitionId}?pageNum=${this.pageNo}&pageSize=${this.pageSize}&competitionId=${this.id}`).then(({ data }) => {
this.listData = data.records
this.totals = data.total
this.$refs.table.clearSelection()
}).catch(res => {})
}).catch(res => { })
},
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val;
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.getData();
},
del(row) {
del (row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
@ -103,12 +129,13 @@ export default {
.catch(() => {
});
},
switchOff(val, row, index) {
switchOff (val, row, index) {
if (val) {
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {}).catch(err => {})
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => { }).catch(err => { })
} else if (!row.status) {
this.$confirm('是否发布该公告?', '提示', {
type: 'success'
type: 'success',
closeOnClickModal: false
}).then(() => {
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {
this.$post(this.api.amendmentAnnouncement, {
@ -116,19 +143,19 @@ export default {
status: 1
}).then(res => {
this.getData()
}).catch(err => {})
}).catch(err => {})
}).catch(err => { })
}).catch(err => { })
}).catch(() => {
row.isOpen = 1
})
} else {
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => {}).catch(err => {})
this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`).then(res => { }).catch(err => { })
}
},
add() {
add () {
this.$router.push(`noticeDetail?competitionId=${this.id}`)
},
edit(row) {
edit (row) {
this.$router.push(`noticeDetail?id=${row.id}&competitionId=${this.id}`)
}
}
@ -136,5 +163,4 @@ export default {
</script>
<style scoped>
</style>

@ -388,7 +388,8 @@ export default {
if (this.updateTime) {
if (!this.backType) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.next = next
this.save(this.projectManage.state)
@ -494,7 +495,8 @@ export default {
systemChange () { //
if (this.projectJudgmentData.length) {
this.$confirm("更换系统会清空实验任务,确认更换?", "提示", {
type: "warning"
type: "warning",
closeOnClickModal: false
}).then(() => {
this.projectJudgmentData = [];
this.setSystemId(this.projectManage.systemId);
@ -846,7 +848,8 @@ export default {
//
if (this.updateTime) {
this.$confirm('编辑的内容未保存,是否保存?', "提示", {
type: "warning"
type: "warning",
closeOnClickModal: false
}).then(() => {
this.save(this.projectManage.state)
}).catch(() => {

@ -4,21 +4,32 @@
<div class="left">
<div class="inner">
<div class="text-center">
<img :src="avatar" class="avatar" />
<el-upload :headers="{token}" :action="this.api.uploadUserAvatars" name="file" :limit="10" :show-file-list="false" :on-success="changeAvatar">
<el-button type="text" size="small">点击更换头像</el-button>
<img :src="avatar"
class="avatar" />
<el-upload :headers="{token}"
:action="this.api.uploadUserAvatars"
name="file"
:limit="10"
:show-file-list="false"
:on-success="changeAvatar">
<el-button type="text"
size="small">点击更换头像</el-button>
</el-upload>
</div>
<ul class="menu">
<li v-for="item in typeList" :key="item.index" :class="{active: item.index == active}">
<li v-for="item in typeList"
:key="item.index"
:class="{active: item.index == active}">
{{ item.title }}
</li>
</ul>
</div>
</div>
<div class="right">
<info ref="info" v-if="active == 1" @updateStatus="updateStatus"></info>
<info ref="info"
v-if="active == 1"
@updateStatus="updateStatus"></info>
<download v-else></download>
</div>
</div>
@ -27,11 +38,11 @@
<script>
import Setting from '@/setting'
import { mapState,mapActions } from 'vuex'
import { mapState, mapActions } from 'vuex'
import info from './info'
import util from '@/libs/util'
export default {
data() {
data () {
return {
token: util.local.get(Setting.tokenKey),
typeList: [
@ -45,17 +56,18 @@ export default {
};
},
// ,
beforeRouteLeave(to, from, next) {
if(this.edited){
beforeRouteLeave (to, from, next) {
if (this.edited) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.$refs.info.save()
next()
}).catch(() => {
next()
})
}else{
} else {
next()
}
},
@ -65,17 +77,17 @@ export default {
'avatar'
]),
},
mounted() {
mounted () {
},
methods: {
...mapActions('user', [
'setAvatar'
]),
changeAvatar(res) {
changeAvatar (res) {
this.setAvatar(res.message)
},
updateStatus(status){
updateStatus (status) {
console.log("🚀 ~ file: index.vue:79 ~ updateStatus ~ status", status)
this.edited = status
}
@ -84,45 +96,45 @@ export default {
</script>
<style lang="scss" scoped>
.main{
.main {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.wrap{
.wrap {
display: flex;
width: $min-width;
padding: 12px 0 0;
.left{
.left {
margin-right: 12px;
background-color: #fff;
box-shadow: 2px 0px 6px 0px #EEEEEE;
.inner{
box-shadow: 2px 0px 6px 0px #eeeeee;
.inner {
width: 170px;
padding: 20px 0;
}
.avatar{
.avatar {
width: 80px;
height: 80px;
border-radius: 50%;
}
.menu{
.menu {
margin-top: 32px;
li{
li {
padding: 0 20px;
color: #303133;
font-size: 14px;
line-height: 38px;
cursor: pointer;
&.active{
&.active {
color: #fff;
background-color: $main-color;
}
}
}
}
.right{
.right {
flex: 1;
}
}

File diff suppressed because it is too large Load Diff

@ -933,7 +933,8 @@ export default {
this.$confirm('是否要继续上次的实验?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'success'
type: 'success',
closeOnClickModal: false
}).then(() => {
this.curProject = projectId
this.toSub()

@ -15,5 +15,6 @@ module.exports = {
assetsDir: Setting.assetsDir,
devServer: {
port: 8081 // 固定端口
}
},
productionSourceMap: false,
}
Loading…
Cancel
Save