From 7d02d3babaa4daff18f85b9db9a677082954b7eb Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 8 Mar 2024 10:41:51 +0800 Subject: [PATCH] =?UTF-8?q?confirm=E7=A1=AE=E8=AE=A4=E5=BC=B9=E6=A1=86?= =?UTF-8?q?=E7=A6=81=E6=AD=A2=E7=82=B9=E5=87=BB=E9=81=AE=E7=9B=96=E5=B1=82?= =?UTF-8?q?=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 +- src/pages/achievement/edit/index.vue | 688 +++--- src/pages/achievement/show/index.vue | 8 +- src/pages/activity/details/index.vue | 3 +- src/pages/activity/list/index.vue | 3 +- src/pages/activity/manage/add/index.vue | 6 +- src/pages/activity/manage/manage/index.vue | 8 +- .../activity/manage/manage/matchProgress.vue | 438 ++-- src/pages/activity/manage/manage/notice.vue | 261 +- src/pages/assessment/add/index.vue | 6 +- src/pages/assessment/list/index.vue | 3 +- src/pages/course/add/index.vue | 9 +- src/pages/course/contentSettings/index.vue | 3 +- src/pages/expSystem/backstage/addModel.vue | 3 +- src/pages/expSystem/backstage/sourceModel.vue | 3 +- src/pages/information/addarticle/index.vue | 6 +- src/pages/information/contentManage/index.vue | 170 +- src/pages/information/list/index.vue | 148 +- src/pages/match/add/index.vue | 9 +- src/pages/match/manage/index.vue | 3 +- src/pages/match/manage/matchInfo.vue | 3 +- src/pages/match/manage/matchProgress.vue | 447 ++-- src/pages/match/manage/matchRank.vue | 3 +- src/pages/match/manage/notice.vue | 266 +- src/pages/project/add/index.vue | 9 +- src/pages/setting/list/index.vue | 168 +- src/pages/setting/list/info.vue | 2175 +++++++++-------- src/pages/station/preview/index.vue | 3 +- vue.config.js | 3 +- 29 files changed, 2642 insertions(+), 2215 deletions(-) diff --git a/public/index.html b/public/index.html index 2a0608a..7b9845e 100644 --- a/public/index.html +++ b/public/index.html @@ -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); })(); diff --git a/src/pages/achievement/edit/index.vue b/src/pages/achievement/edit/index.vue index 1b3445d..8a9f735 100644 --- a/src/pages/achievement/edit/index.vue +++ b/src/pages/achievement/edit/index.vue @@ -1,325 +1,415 @@ diff --git a/src/pages/achievement/show/index.vue b/src/pages/achievement/show/index.vue index b8a0b74..04f1466 100644 --- a/src/pages/achievement/show/index.vue +++ b/src/pages/achievement/show/index.vue @@ -156,12 +156,7 @@
- - {{index+1}}. {{item.userAnswer}} - - - {{index+1}}. 未填写 - + {{index+1}}. {{item.userAnswer || '未填写'}}
{ e.assessmentPoint += `${i + 1}.${n.name}` e.referenceAnswer += `${i + 1}.${n.ruleAnswer}` + if (!n.userAnswer) n.userAnswer = '未填写' e.answer += `${i + 1}.${n.userAnswer}` }) }) diff --git a/src/pages/activity/details/index.vue b/src/pages/activity/details/index.vue index 1273fa9..e4ea5ec 100644 --- a/src/pages/activity/details/index.vue +++ b/src/pages/activity/details/index.vue @@ -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() diff --git a/src/pages/activity/list/index.vue b/src/pages/activity/list/index.vue index 07d8107..ffcd7c4 100644 --- a/src/pages/activity/list/index.vue +++ b/src/pages/activity/list/index.vue @@ -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() diff --git a/src/pages/activity/manage/add/index.vue b/src/pages/activity/manage/add/index.vue index d3da267..cd63a25 100644 --- a/src/pages/activity/manage/add/index.vue +++ b/src/pages/activity/manage/add/index.vue @@ -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(() => { diff --git a/src/pages/activity/manage/manage/index.vue b/src/pages/activity/manage/manage/index.vue index 2209275..8d4b72c 100644 --- a/src/pages/activity/manage/manage/index.vue +++ b/src/pages/activity/manage/manage/index.vue @@ -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) diff --git a/src/pages/activity/manage/manage/matchProgress.vue b/src/pages/activity/manage/manage/matchProgress.vue index c138368..060f45c 100644 --- a/src/pages/activity/manage/manage/matchProgress.vue +++ b/src/pages/activity/manage/manage/matchProgress.vue @@ -1,219 +1,253 @@ diff --git a/src/pages/activity/manage/manage/notice.vue b/src/pages/activity/manage/manage/notice.vue index a532ee3..a867b02 100644 --- a/src/pages/activity/manage/manage/notice.vue +++ b/src/pages/activity/manage/manage/notice.vue @@ -1,47 +1,70 @@ \ No newline at end of file diff --git a/src/pages/assessment/add/index.vue b/src/pages/assessment/add/index.vue index 7422587..a4a4cd4 100644 --- a/src/pages/assessment/add/index.vue +++ b/src/pages/assessment/add/index.vue @@ -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(() => { diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue index 1ee6a36..d4efe8b 100644 --- a/src/pages/assessment/list/index.vue +++ b/src/pages/assessment/list/index.vue @@ -470,7 +470,8 @@ export default { }, finish (row) { this.$confirm("确定要提前结束吗?", "提示", { - type: "warning" + type: "warning", + closeOnClickModal: false }).then(() => { let data = { id: row.id, diff --git a/src/pages/course/add/index.vue b/src/pages/course/add/index.vue index 69e7b2c..09858ff 100644 --- a/src/pages/course/add/index.vue +++ b/src/pages/course/add/index.vue @@ -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(() => { diff --git a/src/pages/course/contentSettings/index.vue b/src/pages/course/contentSettings/index.vue index a2ca798..c542941 100644 --- a/src/pages/course/contentSettings/index.vue +++ b/src/pages/course/contentSettings/index.vue @@ -449,7 +449,8 @@ export default { // 已经移动了顺序 if (this.moved) { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { - type: 'warning' + type: 'warning', + closeOnClickModal: false }).then(() => { this.saveSort() this.moved = false diff --git a/src/pages/expSystem/backstage/addModel.vue b/src/pages/expSystem/backstage/addModel.vue index 4ba4b5d..6cdd08b 100644 --- a/src/pages/expSystem/backstage/addModel.vue +++ b/src/pages/expSystem/backstage/addModel.vue @@ -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() diff --git a/src/pages/expSystem/backstage/sourceModel.vue b/src/pages/expSystem/backstage/sourceModel.vue index 7f5e157..bd7c112 100644 --- a/src/pages/expSystem/backstage/sourceModel.vue +++ b/src/pages/expSystem/backstage/sourceModel.vue @@ -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 => { diff --git a/src/pages/information/addarticle/index.vue b/src/pages/information/addarticle/index.vue index 54211f7..04153e3 100644 --- a/src/pages/information/addarticle/index.vue +++ b/src/pages/information/addarticle/index.vue @@ -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(() => { diff --git a/src/pages/information/contentManage/index.vue b/src/pages/information/contentManage/index.vue index 083bc53..bcda3b1 100644 --- a/src/pages/information/contentManage/index.vue +++ b/src/pages/information/contentManage/index.vue @@ -2,10 +2,19 @@
- +
@@ -16,96 +25,97 @@ import ContentList from "./contentList"; import Setting from '@/setting' import { mapActions } from "vuex"; export default { - name: "contentManage", - components: { - menuTree, - ContentList - }, - data() { - return { - menuList: [], - columnId: "", - ids: [] - }; - }, - mounted() { - this.getMenuData(); - }, - methods: { - ...mapActions("info", [ - "setColumnId" - ]), - getMenuData() { - this.$get(this.api.queryAllColumns, { - platformId: Setting.platformId, - page: 1, - size: 1000 - }).then(res => { - this.menuList = res.columnTree - const storeId = this.$store.state.info.columnId - console.log("🚀 ~ file: index.vue ~ line 46 ~ getMenuData ~ storeId", storeId) - if (this.menuList.length) { - this.getId(this.menuList) - this.columnId = this.menuList[0].id - if (!storeId) { - 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) - }) + name: "contentManage", + components: { + menuTree, + ContentList + }, + data () { + return { + menuList: [], + columnId: "", + ids: [] + }; + }, + mounted () { + this.getMenuData(); + }, + methods: { + ...mapActions("info", [ + "setColumnId" + ]), + getMenuData () { + this.$get(this.api.queryAllColumns, { + platformId: Setting.platformId, + page: 1, + size: 1000 + }).then(res => { + this.menuList = res.columnTree + const storeId = this.$store.state.info.columnId + console.log("🚀 ~ file: index.vue ~ line 46 ~ getMenuData ~ storeId", storeId) + if (this.menuList.length) { + this.getId(this.menuList) + this.columnId = this.menuList[0].id + if (!storeId) { + this.setColumnId(this.columnId) } 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) + } } + } }; \ No newline at end of file diff --git a/src/pages/information/list/index.vue b/src/pages/information/list/index.vue index fa76230..073ccd7 100644 --- a/src/pages/information/list/index.vue +++ b/src/pages/information/list/index.vue @@ -1,13 +1,19 @@ \ No newline at end of file diff --git a/src/pages/match/add/index.vue b/src/pages/match/add/index.vue index de0f19d..aa9b240 100644 --- a/src/pages/match/add/index.vue +++ b/src/pages/match/add/index.vue @@ -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(() => { diff --git a/src/pages/match/manage/index.vue b/src/pages/match/manage/index.vue index 78df934..925c99c 100644 --- a/src/pages/match/manage/index.vue +++ b/src/pages/match/manage/index.vue @@ -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) diff --git a/src/pages/match/manage/matchInfo.vue b/src/pages/match/manage/matchInfo.vue index ccddd58..e419083 100644 --- a/src/pages/match/manage/matchInfo.vue +++ b/src/pages/match/manage/matchInfo.vue @@ -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('移除成功') diff --git a/src/pages/match/manage/matchProgress.vue b/src/pages/match/manage/matchProgress.vue index 5adc7eb..030a633 100644 --- a/src/pages/match/manage/matchProgress.vue +++ b/src/pages/match/manage/matchProgress.vue @@ -1,223 +1,260 @@ diff --git a/src/pages/match/manage/matchRank.vue b/src/pages/match/manage/matchRank.vue index 876c7cd..a23658c 100644 --- a/src/pages/match/manage/matchRank.vue +++ b/src/pages/match/manage/matchRank.vue @@ -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(() => { }) : diff --git a/src/pages/match/manage/notice.vue b/src/pages/match/manage/notice.vue index fac2f4f..6d79de0 100644 --- a/src/pages/match/manage/notice.vue +++ b/src/pages/match/manage/notice.vue @@ -1,48 +1,74 @@ \ No newline at end of file diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue index 9da6606..ab012a1 100644 --- a/src/pages/project/add/index.vue +++ b/src/pages/project/add/index.vue @@ -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(() => { diff --git a/src/pages/setting/list/index.vue b/src/pages/setting/list/index.vue index d0b3b65..dee0384 100644 --- a/src/pages/setting/list/index.vue +++ b/src/pages/setting/list/index.vue @@ -1,128 +1,140 @@ \ No newline at end of file diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue index 9408131..b43706d 100644 --- a/src/pages/station/preview/index.vue +++ b/src/pages/station/preview/index.vue @@ -933,7 +933,8 @@ export default { this.$confirm('是否要继续上次的实验?', '提示', { confirmButtonText: '是', cancelButtonText: '否', - type: 'success' + type: 'success', + closeOnClickModal: false }).then(() => { this.curProject = projectId this.toSub() diff --git a/vue.config.js b/vue.config.js index e9d6080..79a5e4d 100644 --- a/vue.config.js +++ b/vue.config.js @@ -15,5 +15,6 @@ module.exports = { assetsDir: Setting.assetsDir, devServer: { port: 8081 // 固定端口 - } + }, + productionSourceMap: false, } \ No newline at end of file