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

master
yujialong 9 months ago
parent d5c72572be
commit 7d02d3baba
  1. 2
      public/index.html
  2. 688
      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. 438
      src/pages/activity/manage/manage/matchProgress.vue
  9. 261
      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. 170
      src/pages/information/contentManage/index.vue
  18. 148
      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. 447
      src/pages/match/manage/matchProgress.vue
  23. 3
      src/pages/match/manage/matchRank.vue
  24. 266
      src/pages/match/manage/notice.vue
  25. 9
      src/pages/project/add/index.vue
  26. 168
      src/pages/setting/list/index.vue
  27. 2175
      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 || []; var _hmt = _hmt || [];
(function() { (function() {
var hm = document.createElement('script'); 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]; var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s);
})(); })();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -2,10 +2,19 @@
<!-- 内容管理 --> <!-- 内容管理 -->
<div class="flex"> <div class="flex">
<div class="menu-con"> <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>
<div class="right"> <div class="right">
<ContentList ref="content" v-show="menuList.length" :columnId="columnId" /> <ContentList ref="content"
v-show="menuList.length"
:columnId="columnId" />
</div> </div>
</div> </div>
</template> </template>
@ -16,96 +25,97 @@ import ContentList from "./contentList";
import Setting from '@/setting' import Setting from '@/setting'
import { mapActions } from "vuex"; import { mapActions } from "vuex";
export default { export default {
name: "contentManage", name: "contentManage",
components: { components: {
menuTree, menuTree,
ContentList ContentList
}, },
data() { data () {
return { return {
menuList: [], menuList: [],
columnId: "", columnId: "",
ids: [] ids: []
}; };
}, },
mounted() { mounted () {
this.getMenuData(); this.getMenuData();
}, },
methods: { methods: {
...mapActions("info", [ ...mapActions("info", [
"setColumnId" "setColumnId"
]), ]),
getMenuData() { getMenuData () {
this.$get(this.api.queryAllColumns, { this.$get(this.api.queryAllColumns, {
platformId: Setting.platformId, platformId: Setting.platformId,
page: 1, page: 1,
size: 1000 size: 1000
}).then(res => { }).then(res => {
this.menuList = res.columnTree this.menuList = res.columnTree
const storeId = this.$store.state.info.columnId const storeId = this.$store.state.info.columnId
console.log("🚀 ~ file: index.vue ~ line 46 ~ getMenuData ~ storeId", storeId) console.log("🚀 ~ file: index.vue ~ line 46 ~ getMenuData ~ storeId", storeId)
if (this.menuList.length) { if (this.menuList.length) {
this.getId(this.menuList) this.getId(this.menuList)
this.columnId = this.menuList[0].id this.columnId = this.menuList[0].id
if (!storeId) { if (!storeId) {
this.setColumnId(this.columnId) this.setColumnId(this.columnId)
} else {
this.columnId = storeId
}
}
this.$nextTick(() => {
this.$refs.column.setCurrentKey(this.columnId)
})
}).catch(err => {
});
},
// id便
getId(data) {
data.map(e => {
this.ids.push(e.id)
e.children.length && this.getId(e.children)
})
},
setColumn(id) {
this.columnId = id
this.setColumnId(id)
},
handleSelect(key) {
const { content } = this.$refs
const { list, originList } = content
//
if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning'
}).then(() => {
content.sortSubmit()
this.setColumn(key.id)
}).catch(() => {
this.setColumn(key.id)
})
} else { } else {
this.setColumn(key.id) this.columnId = storeId
} }
} }
this.$nextTick(() => {
this.$refs.column.setCurrentKey(this.columnId)
})
}).catch(err => {
});
},
// id便
getId (data) {
data.map(e => {
this.ids.push(e.id)
e.children.length && this.getId(e.children)
})
},
setColumn (id) {
this.columnId = id
this.setColumnId(id)
},
handleSelect (key) {
const { content } = this.$refs
const { list, originList } = content
//
if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning',
closeOnClickModal: false
}).then(() => {
content.sortSubmit()
this.setColumn(key.id)
}).catch(() => {
this.setColumn(key.id)
})
} else {
this.setColumn(key.id)
}
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.menu-con { .menu-con {
width: 210px; width: 210px;
height: calc(100vh - 250px); height: calc(100vh - 250px);
border-right: solid 1px #e6e6e6; border-right: solid 1px #e6e6e6;
background-color: #F2F6FC; background-color: #f2f6fc;
/deep/.el-tree-node__content { /deep/.el-tree-node__content {
height: 50px; height: 50px;
} }
} }
.right { .right {
flex: 1; flex: 1;
} }
/deep/.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content { /deep/.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
color: #fff; color: #fff;
background-color: #9278ff; background-color: #9278ff;
} }
</style> </style>

@ -1,13 +1,19 @@
<template> <template>
<!-- 资讯管理 --> <!-- 资讯管理 -->
<div class="page"> <div class="page">
<ul class="column-tab"> <ul class="column-tab">
<li :class="{active: tabsName == 1}" @click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li> <li :class="{active: tabsName == 1}"
<li :class="{active: tabsName == 2}" @click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li> @click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li>
</ul> <li :class="{active: tabsName == 2}"
<columnManage class="flex-1" ref="content1" v-if="tabsName == 1" /> @click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
<ContentManage class="flex-1" ref="content2" v-if="tabsName == 2" /> </ul>
</div> <columnManage class="flex-1"
ref="content1"
v-if="tabsName == 1" />
<ContentManage class="flex-1"
ref="content2"
v-if="tabsName == 2" />
</div>
</template> </template>
<script> <script>
@ -16,77 +22,79 @@ import ContentManage from "../contentManage";
import { mapActions } from "vuex"; import { mapActions } from "vuex";
export default { export default {
components: { components: {
ColumnManage, ColumnManage,
ContentManage ContentManage
},
data () {
return {
tabsName: this.$store.state.info.tabsName
};
},
//
beforeRouteLeave (to, from, next) {
this.routeLeave(next, true)
},
methods: {
...mapActions("info", [
"setTabsName", "setColumnId"
]),
switchTab (id) {
this.tabsName = id
this.setTabsName(id)
this.setColumnId('')
}, },
data() { //
return { routeLeave (fn, param) {
tabsName: this.$store.state.info.tabsName const tab = this.tabsName
}; let content = this.$refs['content' + tab]
if (tab == 2) content = content.$refs.content
const { list, originList } = content
//
if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了${tab == 1 ? '栏目' : '文章'}排序,是否保存更改?`, '提示', {
type: 'warning',
closeOnClickModal: false
}).then(() => {
content.sortSubmit()
fn(param)
}).catch(() => {
fn(param)
})
} else {
fn(param)
}
}, },
// // tab
beforeRouteLeave(to, from, next) { handleClick (id) {
this.routeLeave(next, true) this.routeLeave(this.switchTab, id)
},
methods: {
...mapActions("info", [
"setTabsName", "setColumnId"
]),
switchTab(id) {
this.tabsName = id
this.setTabsName(id)
this.setColumnId('')
},
//
routeLeave(fn, param) {
const tab = this.tabsName
let content = this.$refs['content' + tab]
if (tab == 2) content = content.$refs.content
const { list, originList } = content
//
if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了${tab == 1 ? '栏目' : '文章'}排序,是否保存更改?`, '提示', {
type: 'warning'
}).then(() => {
content.sortSubmit()
fn(param)
}).catch(() => {
fn(param)
})
} else {
fn(param)
}
},
// tab
handleClick(id) {
this.routeLeave(this.switchTab, id)
}
},
mounted() {
} }
},
mounted () {
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
display: flex; display: flex;
} }
.column-tab { .column-tab {
width: 120px; width: 120px;
border-right: solid 1px #e6e6e6; border-right: solid 1px #e6e6e6;
li { li {
display: flex; display: flex;
align-items: center; align-items: center;
height: 60px; height: 60px;
cursor: pointer; cursor: pointer;
i { i {
margin-right: 5px; margin-right: 5px;
} }
&:hover, &.active { &:hover,
color: #9278FF; &.active {
color: #9278ff;
}
} }
}
} }
</style> </style>

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

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

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

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

@ -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 }) => { this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
whetherToPublish ? whetherToPublish ?
this.$confirm('排名已经发布,是否直接覆盖?', '提示', { this.$confirm('排名已经发布,是否直接覆盖?', '提示', {
type: 'success' type: 'success',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.publishSubmit() this.publishSubmit()
}).catch(() => { }) : }).catch(() => { }) :

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

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

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

File diff suppressed because it is too large Load Diff

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

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