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

dev_review
yujialong 9 months ago
parent f7a27f7e30
commit 539f1f95cc
  1. 1
      src/components/img-upload/Cropper.vue
  2. 4
      src/setting.js
  3. 9
      src/utils/api.js
  4. 88
      src/utils/editor.js
  5. 6
      src/views/course/AddCurriculum.vue
  6. 3
      src/views/course/contentSettings.vue
  7. 3
      src/views/customer/AddCustomer.vue
  8. 3
      src/views/information/addArticle/index.vue
  9. 115
      src/views/information/columnManage/index.vue
  10. 30
      src/views/information/contentManage/index.vue
  11. 34
      src/views/information/list/index.vue
  12. 9
      src/views/match/add/index.vue
  13. 2
      src/views/match/add/step1.vue
  14. 3
      src/views/match/manage/index.vue
  15. 127
      src/views/match/manage/matchProgress.vue
  16. 3
      src/views/match/manage/matchRank.vue
  17. 94
      src/views/match/manage/notice.vue
  18. 13
      src/views/parnerOperation/learnMg.vue
  19. 9
      src/views/parnerOperation/schemeSet.vue
  20. 2
      src/views/serve/Configure.vue
  21. 3
      src/views/serve/addModel.vue
  22. 3
      src/views/serve/projectAdd.vue
  23. 57
      src/views/setting/index.vue
  24. 3
      src/views/setting/info.vue
  25. 10
      src/views/shop/addProduct/index.vue
  26. 2
      src/views/system/index.vue
  27. 6
      src/views/system/manageLog.vue
  28. 6
      src/views/theoreticalCourse/add/index.vue
  29. 3
      src/views/theoreticalCourse/contentSettings/index.vue
  30. 261
      src/views/user/User.vue
  31. 3
      vue.config.js

@ -148,6 +148,7 @@ export default {
if (type === 'blob') { if (type === 'blob') {
this.$refs.cropper.getCropBlob(data => { this.$refs.cropper.getCropBlob(data => {
compress(data, 1).then(res => { compress(data, 1).then(res => {
debugger
that.$emit('upload', res) that.$emit('upload', res)
}) })
}) })

@ -6,7 +6,7 @@ const isDev = process.env.NODE_ENV === 'development' // 开发环境
const isPro = url.includes('huorantech.cn') //正式服 const isPro = url.includes('huorantech.cn') //正式服
let jumpPath = `${location.origin}/judgmentPoint` let jumpPath = `${location.origin}/judgmentPoint`
let sandPath = `${location.origin}/sandbox` // 沙盘地址 let sandPath = `https://izhixinyun.com/sandbox` // 沙盘地址
let host = `${location.origin}/` let host = `${location.origin}/`
if (isDev) { if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
@ -16,7 +16,7 @@ if (isDev) {
host = 'http://192.168.31.217:9000/'// 榕 host = 'http://192.168.31.217:9000/'// 榕
// host = 'http://192.168.31.51:9000/'// 赓 // host = 'http://192.168.31.51:9000/'// 赓
} else if (isPro) { } else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/' jumpPath = 'https://judgment.huorantech.cn/'
} }

@ -1,7 +1,6 @@
import Setting from "@/setting"; import Setting from "@/setting";
const host = Setting.apiBaseURL const { uploadURL, jumpPath, apiBaseURL: host } = Setting
const uploadURL = Setting.uploadURL
export default { export default {
@ -16,7 +15,7 @@ export default {
// 阿里云文件/视频管理 // 阿里云文件/视频管理
getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证 getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证
staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板 staffTemplate: `https://occupationlab.com/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板
checkEmailOrPhone: `occupationlab/occupationlab/architecture/checkEmailOrPhone`, // 新增学生前:校验手机号或者邮箱 checkEmailOrPhone: `occupationlab/occupationlab/architecture/checkEmailOrPhone`, // 新增学生前:校验手机号或者邮箱
checkWorkNumOrAccount: `occupationlab/occupationlab/architecture/checkWorkNumOrAccount`, // 新增/编辑学生前:校验学号或者学生账号 checkWorkNumOrAccount: `occupationlab/occupationlab/architecture/checkWorkNumOrAccount`, // 新增/编辑学生前:校验学号或者学生账号
@ -94,8 +93,8 @@ export default {
editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理 editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理
copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理 copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理
// 判分点 // 判分点
getBcJudgmentPoint: `judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页) getBcJudgmentPoint: `${jumpPath}judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
getLcJudgmentPoint: `judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页) getLcJudgmentPoint: `${jumpPath}judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
addProjectJudgment: `occupationlab/occupationlab/projectJudgment/addProjectJudgment`, // 添加项目管理、判分点中间表 addProjectJudgment: `occupationlab/occupationlab/projectJudgment/addProjectJudgment`, // 添加项目管理、判分点中间表
updateProjectJudgment: `occupationlab/occupationlab/projectJudgment/updateProjectJudgment`, // 判分点中间表批量更新 updateProjectJudgment: `occupationlab/occupationlab/projectJudgment/updateProjectJudgment`, // 判分点中间表批量更新
deleteProjectJudgment: `occupationlab/occupationlab/projectJudgment/deleteProjectJudgment`, // 判分点中间表批量删除 deleteProjectJudgment: `occupationlab/occupationlab/projectJudgment/deleteProjectJudgment`, // 判分点中间表批量删除

@ -199,93 +199,7 @@ export default {
{ title: 'Some class', value: 'class-name' } { title: 'Some class', value: 'class-name' }
], ],
//为内容模板插件提供预置模板 //为内容模板插件提供预置模板
templates: [ templates: [],
{ title: '中文文章模板1', description: '图片文字流', content: `
<div class="tiny-wrap">
<div class="block">
<div class="fl">
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
<div class="texts">
<p>S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机
</p>
</div>
</div>
<div class="block">
<div class="fr">
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
<div>
<p>集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地</p>
<p>S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度</p>
</div>
</div>
</div>
`
},
{ title: '英文文章模板1', description: '图片文字流', content: `
<div class="tiny-wrap">
<div class="block en-block">
<div class="fr">
<img class="pic" src="images/default.png"/>
<p class="img-des">Picture description</p>
</div>
<div>
<p>One of the major barriers to treating pain effectively is rooted in providers fear of killing their patients. This includes caregivers who may be family or friends. In a 2014 study I led of nonprofessional hospice caregivers, we found that the majority of pain medication errors caregivers made involved administering less than the prescribed dose, which makes it difficult for patients to achieve optimal pain relief.</p>
<p>Meanwhile, more than 11 million Americans  often family members or friends provide unpaid care for people with Alzheimer's or other dementias, according to calculations by the Alzheimers Association. In 2021, caregivers for people with Alzheimers or other dementias provided an estimated 16 billion hours of unpaid care valued at nearly $272 billion.My father took her to the emergency room. A doctor found a severe knee infection and took her into surgery. She was hospitalized for two weeks, followed by two months of rehabilitation at a skilled nursing facility.</p>
<p>If you heated the salt on your kitchen table up to 801 C (1,474 F), it would melt, and youd have molten salt. However, for making and storing energy, not just any salt will do. Scientists are exploring different combinations of salts to get the exact properties needed to cool and fuel a nuclear power reactor efficiently for decades. These properties include lower melting temperatures, the right consistency, and the ability to absorb high amounts of heat, among others.</p>
<div class="quote">We used experimental results to validate our simulation. At the same time, the simulation results provided us more details about which salts to study further. They work with each other. Jicheng Guo, chemical engineer at Argonne National Laboratory</div>
<p>Which molten salt blueprints will deliver the desired traits for a nuclear reactor? The potential variations are nearly endless. The study set out to determine whether computer simulations driven by machine learning could guide and refine real-world experiments at the Advanced Photon Source (APS), a DOE Office of Science user facility at Argonne. The results were recently published in the journal Physical Review B.</p>
<p>We used experimental results from the APS to validate our simulation. At the same time, the simulation results provided us more details about which salts to study further. They work with each other, said Jicheng Guo, a chemical engineer at Argonne and the papers lead author. This allows us to study multiple compositions at the same time.</p>
</div>
</div>
</div>
`
},
{ title: '新闻模板', description: '', content: `
<div class="tiny-wrap">
<div class="block" style="margin-bottom: 70px;">
<div class="fr">
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
<div>
<p style="text-indent: 2em">S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度</p>
<div class="quote">
Here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation.
</div>
</div>
</div>
<div class="block">
<div class="img-wrap">
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
<div class="texts">
<h6 class="tiny-title">小标题</h6>
<p style="text-indent: 2em">S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键
</p>
</div>
</div>
</div>
`
},
{ title: '图片描述', description: '', content: `
<div class="tiny-wrap">
<div class="block">
<div class="img-wrap">
<img class="pic" src="images/default.png"/>
<p class="img-des">图片描述</p>
</div>
</div>
</div>
`
}
],
// content_security_policy: "https://cdn.tiny.cloud/1/rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda/tinymce/6/tinymce.min.js", // content_security_policy: "https://cdn.tiny.cloud/1/rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda/tinymce/6/tinymce.min.js",
// extended_valid_elements:'script[src]', // extended_valid_elements:'script[src]',
// //

@ -1042,7 +1042,8 @@ export default {
!fromBack ? this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", { !fromBack ? this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success", type: "success",
confirmButtonText: "马上设置", confirmButtonText: "马上设置",
cancelButtonText: "稍后操作" cancelButtonText: "稍后操作",
closeOnClickModal: false
}).then(() => { }).then(() => {
this.$router.push(`/contentSettings?cid=${res.cid}`); this.$router.push(`/contentSettings?cid=${res.cid}`);
}).catch(() => { }).catch(() => {
@ -1064,7 +1065,8 @@ export default {
// //
if ((id && updateTime > 2) || (!id && updateTime)) { if ((id && updateTime > 2) || (!id && updateTime)) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.saveAdd(1) this.saveAdd(1)
}).catch(() => { }).catch(() => {

@ -462,7 +462,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

@ -1331,7 +1331,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.saveAdd(i) this.saveAdd(i)
}).catch(() => { }).catch(() => {

@ -204,7 +204,8 @@ export default {
}, },
goback () { goback () {
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", { this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning" type: "warning",
closeOnClickModal: false
}) })
.then(() => { .then(() => {
this.back(); this.back();

@ -3,35 +3,65 @@
<div class="page"> <div class="page">
<div class="btn-wrap"> <div class="btn-wrap">
<template v-if="sorting"> <template v-if="sorting">
<el-button class="action-btn" type="primary" round @click="cancelSort">取消</el-button> <el-button class="action-btn"
<el-button class="action-btn" type="primary" round @click="sortSubmit">保存</el-button> type="primary"
round
@click="cancelSort">取消</el-button>
<el-button class="action-btn"
type="primary"
round
@click="sortSubmit">保存</el-button>
</template> </template>
<template v-if="!sorting"> <template v-if="!sorting">
<el-button v-auth="'栏目管理:更改排序'" class="action-btn" type="primary" round @click="openSort">更改排序 <el-button v-auth="'栏目管理:更改排序'"
class="action-btn"
type="primary"
round
@click="openSort">更改排序
</el-button> </el-button>
<el-button v-auth="'栏目管理:添加栏目'" class="action-btn" type="primary" round @click="handleColumn(false, 0, 0)">添加栏目 <el-button v-auth="'栏目管理:添加栏目'"
class="action-btn"
type="primary"
round
@click="handleColumn(false, 0, 0)">添加栏目
</el-button> </el-button>
</template> </template>
</div> </div>
<div class="page-content" style="padding-top: 24px; margin-top: 24px"> <div class="page-content"
style="padding-top: 24px; margin-top: 24px">
<div class="el-table"> <div class="el-table">
<div class="list"> <div class="list">
<div class="thead"> <div class="thead">
<span>栏目名称</span> <span>栏目名称</span>
<span><em :class="{hide: sorting}" style="font-style: normal">操作</em></span> <span><em :class="{hide: sorting}"
style="font-style: normal">操作</em></span>
</div> </div>
</div> </div>
<el-tree :data="list" node-key="id" default-expand-all :draggable="sorting" :allow-drop="allowDrop"> <el-tree :data="list"
<span class="custom-tree-node" slot-scope="{ node, data }"> node-key="id"
default-expand-all
:draggable="sorting"
:allow-drop="allowDrop">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span class="name">{{ data.name }}</span> <span class="name">{{ data.name }}</span>
<span class="action" v-show="!sorting"> <span class="action"
<el-button v-auth="'栏目管理:编辑'" type="text" @click.stop="handleColumn(data)">编辑</el-button> v-show="!sorting">
<el-divider v-auth="'栏目管理:编辑'" direction="vertical"></el-divider> <el-button v-auth="'栏目管理:编辑'"
type="text"
@click.stop="handleColumn(data)">编辑</el-button>
<el-divider v-auth="'栏目管理:编辑'"
direction="vertical"></el-divider>
<template v-if="node.level < 4"> <template v-if="node.level < 4">
<el-button v-auth="'栏目管理:新增'" type="text" @click.stop="handleColumn(data, data.id, data.level + 1)">新增</el-button> <el-button v-auth="'栏目管理:新增'"
<el-divider v-auth="'栏目管理:新增'" direction="vertical"></el-divider> type="text"
@click.stop="handleColumn(data, data.id, data.level + 1)">新增</el-button>
<el-divider v-auth="'栏目管理:新增'"
direction="vertical"></el-divider>
</template> </template>
<el-button v-auth="'栏目管理:删除'" type="text" @click.stop="delData(data)">删除</el-button> <el-button v-auth="'栏目管理:删除'"
type="text"
@click.stop="delData(data)">删除</el-button>
</span> </span>
</span> </span>
</el-tree> </el-tree>
@ -39,16 +69,22 @@
</div> </div>
</div> </div>
<el-dialog :title="!curRow.id ? '添加栏目' : '编辑栏目'" :visible.sync="columnVisible" width="400px" <el-dialog :title="!curRow.id ? '添加栏目' : '编辑栏目'"
:close-on-click-modal="false" @close="closeColumn"> :visible.sync="columnVisible"
width="400px"
:close-on-click-modal="false"
@close="closeColumn">
<el-form> <el-form>
<el-form-item> <el-form-item>
<el-input placeholder="栏目名称" v-model="curRow.name"></el-input> <el-input placeholder="栏目名称"
v-model="curRow.name"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="columnVisible = false"> </el-button> <el-button @click="columnVisible = false"> </el-button>
<el-button type="primary" @click="columnSubmit"> </el-button> <el-button type="primary"
@click="columnSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -59,7 +95,7 @@ import util from "@/libs/util";
import Setting from '@/setting' import Setting from '@/setting'
export default { export default {
name: "columnManage", name: "columnManage",
data() { data () {
return { return {
activeName: "first", activeName: "first",
tabs: { tabs: {
@ -84,13 +120,14 @@ export default {
level: 0 level: 0
}; };
}, },
mounted() { mounted () {
this.getData(); this.getData();
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave (to, from, next) {
if (JSON.stringify(this.originList) !== JSON.stringify(this.list)) { if (JSON.stringify(this.originList) !== JSON.stringify(this.list)) {
this.$confirm("确定返回?排序尚未保存。", "提示", { this.$confirm("确定返回?排序尚未保存。", "提示", {
type: "warning" type: "warning",
closeOnClickModal: false
}) })
.then(() => { .then(() => {
next(); next();
@ -102,7 +139,7 @@ export default {
} }
}, },
methods: { methods: {
getData() { getData () {
this.$get(this.api.queryAllColumns, { this.$get(this.api.queryAllColumns, {
school: 0 school: 0
}).then(({ columnTree }) => { }).then(({ columnTree }) => {
@ -112,7 +149,7 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
delData(row) { delData (row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning" type: "warning"
}) })
@ -126,7 +163,7 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
handleColumn(row, parentId, level) { handleColumn (row, parentId, level) {
this.columnVisible = true this.columnVisible = true
if (row) { if (row) {
this.curRow = JSON.parse(JSON.stringify(row)) this.curRow = JSON.parse(JSON.stringify(row))
@ -141,7 +178,7 @@ export default {
} }
}, },
// list // list
handleList(data, parent = {}) { handleList (data, parent = {}) {
data.map((n, i) => { data.map((n, i) => {
n.parentId = parent.id || 0 n.parentId = parent.id || 0
n.level = this.level n.level = this.level
@ -154,7 +191,7 @@ export default {
} }
}) })
}, },
sortSubmit() { sortSubmit () {
this.level = 0 this.level = 0
let list = JSON.parse(JSON.stringify(this.list)) let list = JSON.parse(JSON.stringify(this.list))
this.handleList(list) this.handleList(list)
@ -167,7 +204,7 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
columnSubmit() { columnSubmit () {
const row = this.curRow const row = this.curRow
if (!row.name) return util.warningMsg("请填写栏目名称"); if (!row.name) return util.warningMsg("请填写栏目名称");
if (this.curRow.id) { if (this.curRow.id) {
@ -186,25 +223,25 @@ export default {
}); });
} }
}, },
cancelSort() { cancelSort () {
this.sorting = false; this.sorting = false;
this.list = JSON.parse(JSON.stringify(this.originList)); this.list = JSON.parse(JSON.stringify(this.originList));
this.sortObj.destroy(); this.sortObj.destroy();
}, },
openSort() { openSort () {
this.sorting = true; this.sorting = true;
}, },
handleSelectionChange(val) { handleSelectionChange (val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange(val) { handleCurrentChange (val) {
this.pageNo = val; this.pageNo = val;
this.getData(); this.getData();
}, },
closeColumn() { closeColumn () {
this.curRow = {} this.curRow = {}
}, },
allowDrop(draggingNode, dropNode, type) { allowDrop (draggingNode, dropNode, type) {
console.log("🚀 ~ file: index.vue ~ line 207 ~ allowDrop ~ draggingNode, dropNode, type", draggingNode, dropNode.level, type) console.log("🚀 ~ file: index.vue ~ line 207 ~ allowDrop ~ draggingNode, dropNode, type", draggingNode, dropNode.level, type)
if (dropNode.level == 4 && draggingNode.childNodes.length == 0) { if (dropNode.level == 4 && draggingNode.childNodes.length == 0) {
return type !== "inner"; return type !== "inner";
@ -242,7 +279,7 @@ export default {
&:first-child { &:first-child {
padding-left: 23.5vw; padding-left: 23.5vw;
@media(max-width: 1270px) { @media (max-width: 1270px) {
padding-left: 25.5%; padding-left: 25.5%;
} }
} }
@ -257,14 +294,14 @@ export default {
/deep/ .el-tree { /deep/ .el-tree {
.el-tree-node__expand-icon { .el-tree-node__expand-icon {
margin-left: 22.5vw; margin-left: 22.5vw;
@media(max-width: 1270px) { @media (max-width: 1270px) {
margin-left: 23.5%; margin-left: 23.5%;
} }
} }
.el-tree-node__content { .el-tree-node__content {
padding: 5px; padding: 5px;
border-bottom: 0.0625rem solid #EBEEF5; border-bottom: 0.0625rem solid #ebeef5;
} }
} }
@ -283,7 +320,7 @@ export default {
.action { .action {
width: 8.5vw; width: 8.5vw;
text-align: left; text-align: left;
@media(max-width: 1270px) { @media (max-width: 1270px) {
width: 16%; width: 16%;
} }
} }

@ -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>
@ -20,7 +29,7 @@ export default {
menuTree, menuTree,
ContentList ContentList
}, },
data() { data () {
return { return {
menuList: [], menuList: [],
activeName: this.$store.state.columnId, activeName: this.$store.state.columnId,
@ -29,11 +38,11 @@ export default {
curId: '' curId: ''
}; };
}, },
mounted() { mounted () {
this.getMenuData(); this.getMenuData();
}, },
methods: { methods: {
getMenuData() { getMenuData () {
this.$get(this.api.queryAllColumns, { this.$get(this.api.queryAllColumns, {
school: 0 school: 0
}).then(res => { }).then(res => {
@ -55,23 +64,24 @@ export default {
}); });
}, },
// id便 // id便
getId(data) { getId (data) {
data.map(e => { data.map(e => {
this.ids.push(e.id) this.ids.push(e.id)
e.children.length && this.getId(e.children) e.children.length && this.getId(e.children)
}) })
}, },
setColumnId(id) { setColumnId (id) {
this.columnId = id this.columnId = id
this.$store.commit('setColumnId', id) this.$store.commit('setColumnId', id)
}, },
handleSelect(key) { handleSelect (key) {
const { content } = this.$refs const { content } = this.$refs
const { list, originList } = content const { list, originList } = content
// //
if (JSON.stringify(list) !== JSON.stringify(originList)) { if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', { this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
content.sortSubmit() content.sortSubmit()
this.setColumnId(key.id) this.setColumnId(key.id)
@ -91,7 +101,7 @@ export default {
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;
} }

@ -2,11 +2,17 @@
<!-- 资讯管理 --> <!-- 资讯管理 -->
<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>
<li :class="{active: tabsName == 2}"
@click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
</ul> </ul>
<columnManage class="flex-1" ref="content1" v-if="tabsName == 1" /> <columnManage class="flex-1"
<ContentManage class="flex-1" ref="content2" v-if="tabsName == 2" /> ref="content1"
v-if="tabsName == 1" />
<ContentManage class="flex-1"
ref="content2"
v-if="tabsName == 2" />
</div> </div>
</template> </template>
@ -18,23 +24,23 @@ export default {
ColumnManage, ColumnManage,
ContentManage ContentManage
}, },
data() { data () {
return { return {
tabsName: this.$store.state.tabId tabsName: this.$store.state.tabId
}; };
}, },
// //
beforeRouteLeave(to, from, next) { beforeRouteLeave (to, from, next) {
this.routeLeave(next, true) this.routeLeave(next, true)
}, },
methods: { methods: {
switchTab(id) { switchTab (id) {
this.tabsName = id this.tabsName = id
this.$store.commit('setInfoTab', id) this.$store.commit('setInfoTab', id)
this.$store.commit('setColumnId', '') this.$store.commit('setColumnId', '')
}, },
// //
routeLeave(fn, param) { routeLeave (fn, param) {
const tab = this.tabsName const tab = this.tabsName
let content = this.$refs['content' + tab] let content = this.$refs['content' + tab]
if (tab == 2) content = content.$refs.content if (tab == 2) content = content.$refs.content
@ -42,7 +48,8 @@ export default {
// //
if (JSON.stringify(list) !== JSON.stringify(originList)) { if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了${tab == 1 ? '栏目' : '文章'}排序,是否保存更改?`, '提示', { this.$confirm(`您已更改了${tab == 1 ? '栏目' : '文章'}排序,是否保存更改?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
content.sortSubmit() content.sortSubmit()
fn(param) fn(param)
@ -54,11 +61,11 @@ export default {
} }
}, },
// tab // tab
handleClick(id) { handleClick (id) {
this.routeLeave(this.switchTab, id) this.routeLeave(this.switchTab, id)
} }
}, },
mounted() { mounted () {
} }
}; };
@ -82,8 +89,9 @@ export default {
i { i {
margin-right: 5px; margin-right: 5px;
} }
&:hover, &.active { &:hover,
color: #9278FF; &.active {
color: #9278ff;
} }
} }
} }

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

@ -679,7 +679,7 @@ export default {
this.$parent.showLoad() this.$parent.showLoad()
delete form.publishStatus delete form.publishStatus
if (status === 1) form.publishStatus = 1 if (status === 1) form.publishStatus = 1
form.ztOpen = status ? 0 : 1 // form.ztOpen = form.id ? form.ztOpen : (status ? 0 : 1) //
form.releaseType = releaseType form.releaseType = releaseType
form.id = this.$route.query.id form.id = this.$route.query.id
if (form.id) { if (form.id) {

@ -91,7 +91,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)

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

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

@ -376,11 +376,11 @@ export default {
// //
if (this.updateTime) { if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', { this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.submit(this.form.isRelease, next) this.submit(this.form.isRelease, next)
}).catch(() => { }).catch(() => {
console.log(55)
next() next()
}) })
} else { } else {
@ -473,7 +473,8 @@ export default {
const list = this.classifications const list = this.classifications
if (list.find(e => e.edit && e.classificationName)) { if (list.find(e => e.edit && e.classificationName)) {
this.$confirm('所填写内容暂未保存,是否保存?', '提示', { this.$confirm('所填写内容暂未保存,是否保存?', '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
list.map(e => { list.map(e => {
e.edit && e.classificationName && this.submitClass(e, 0) e.edit && e.classificationName && this.submitClass(e, 0)
@ -548,7 +549,8 @@ export default {
const list = this.labels const list = this.labels
if (list.find(e => e.edit && e.labelName)) { if (list.find(e => e.edit && e.labelName)) {
this.$confirm('所填写内容暂未保存,是否保存?', '提示', { this.$confirm('所填写内容暂未保存,是否保存?', '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
list.map(e => { list.map(e => {
e.edit && e.labelName && this.submitLabel(e, 0) e.edit && e.labelName && this.submitLabel(e, 0)
@ -664,7 +666,8 @@ export default {
// //
if (this.updateTime) { if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', { this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.submit(this.form.isRelease) this.submit(this.form.isRelease)
}).catch(() => { }).catch(() => {

@ -355,7 +355,8 @@ export default {
// //
if (this.updateTime) { if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', { this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.submit(this.form.isRelease, next) this.submit(this.form.isRelease, next)
}).catch(() => { }).catch(() => {
@ -450,7 +451,8 @@ export default {
const list = this.classifications const list = this.classifications
if (list.find(e => e.edit && e.classificationName)) { if (list.find(e => e.edit && e.classificationName)) {
this.$confirm('所填写内容暂未保存,是否保存?', '提示', { this.$confirm('所填写内容暂未保存,是否保存?', '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
list.map(e => { list.map(e => {
e.edit && e.classificationName && this.submitClass(e, 0) e.edit && e.classificationName && this.submitClass(e, 0)
@ -578,7 +580,8 @@ export default {
// //
if (this.updateTime) { if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', { this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.submit(this.form.isRelease) this.submit(this.form.isRelease)
}).catch(() => { }).catch(() => {

@ -99,7 +99,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="toBackstage(scope.row)" @click="toBackstage(scope.row)"
v-if="scope.row.systemId !== '11'" v-if="scope.row.systemId !== '11' && scope.row.systemId !== '12'"
v-auth="'/configure:系统后台进入'">进入</el-button> v-auth="'/configure:系统后台进入'">进入</el-button>
</template> </template>
</el-table-column> </el-table-column>

@ -194,7 +194,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()

@ -870,7 +870,8 @@ export default {
// //
if (this.updateTime) { if (this.updateTime) {
this.$confirm('编辑的内容未保存,是否保存?', "提示", { this.$confirm('编辑的内容未保存,是否保存?', "提示", {
type: "warning" type: "warning",
closeOnClickModal: false
}).then(() => { }).then(() => {
this.handleSubmit(this.projectManage.state) this.handleSubmit(this.projectManage.state)
}).catch(() => { }).catch(() => {

@ -3,32 +3,42 @@
<div class="left"> <div class="left">
<div class="inner"> <div class="inner">
<div class="text-center"> <div class="text-center">
<img :src="$store.state.avatar" class="avatar" /> <img :src="$store.state.avatar"
<el-upload :headers="{token}" :action="this.api.updateUserAvatars" 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}"
:action="this.api.updateUserAvatars"
name="file"
:limit="10"
:show-file-list="false"
:on-success="changeAvatar">
<el-button type="text"
size="small">点击更换头像</el-button>
</el-upload> </el-upload>
</div> </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"
:key="item.index"
:class="{active: item.index == active}">
{{ item.title }} {{ item.title }}
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<info ref="info" @updateStatus="updateStatus"></info> <info ref="info"
@updateStatus="updateStatus"></info>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Setting from '@/setting' import Setting from '@/setting'
import { mapState,mapMutations } from 'vuex' import { mapState, mapMutations } 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: sessionStorage.getItem('token'), token: sessionStorage.getItem('token'),
typeList: [ typeList: [
@ -48,30 +58,31 @@ export default {
]), ]),
}, },
// , // ,
beforeRouteLeave(to, from, next) { beforeRouteLeave (to, from, next) {
if(this.edited){ if (this.edited) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', { this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.$refs.info.save() this.$refs.info.save()
next(false) next(false)
}).catch(() => { }).catch(() => {
next(false) next(false)
}) })
}else{ } else {
next() next()
} }
}, },
mounted() { mounted () {
}, },
methods: { methods: {
changeAvatar(res) { changeAvatar (res) {
this.$store.commit('userAvatar', { this.$store.commit('userAvatar', {
avatar: res.message avatar: res.message
}) })
}, },
updateStatus(status){ updateStatus (status) {
this.edited = status this.edited = status
} }
} }
@ -79,7 +90,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap{ .wrap {
display: flex; display: flex;
width: 1280px; width: 1280px;
margin: 0 auto; margin: 0 auto;
@ -87,35 +98,35 @@ export default {
.text-center { .text-center {
text-align: center; text-align: center;
} }
.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: #9278ff; background-color: #9278ff;
} }
} }
} }
} }
.right{ .right {
flex: 1; flex: 1;
} }
} }

@ -545,7 +545,8 @@ export default {
// //
unbind() { unbind() {
this.$confirm('确定要解绑该手机号吗?', '提示', { this.$confirm('确定要解绑该手机号吗?', '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.$get(this.api.unbindMobilePhone).then(res => { this.$get(this.api.unbindMobilePhone).then(res => {
this.$message.success('解绑成功') this.$message.success('解绑成功')

@ -890,7 +890,8 @@ export default {
// //
if (this.updateTime) { if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', { this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.submit(this.form.state, next) this.submit(this.form.state, next)
}).catch(() => { }).catch(() => {
@ -1188,7 +1189,8 @@ export default {
const list = this.labels const list = this.labels
if (list.find(e => e.edit && e.tagsName)) { if (list.find(e => e.edit && e.tagsName)) {
this.$confirm('所填写内容暂未保存,是否保存?', '提示', { this.$confirm('所填写内容暂未保存,是否保存?', '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
list.map(e => { list.map(e => {
e.edit && e.tagsName && this.submitLabel(e, 0) e.edit && e.tagsName && this.submitLabel(e, 0)
@ -1287,7 +1289,8 @@ export default {
const list = this.classifications const list = this.classifications
if (list.find(e => e.edit && e.typeName)) { if (list.find(e => e.edit && e.typeName)) {
this.$confirm('所填写内容暂未保存,是否保存?', '提示', { this.$confirm('所填写内容暂未保存,是否保存?', '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
list.map(e => { list.map(e => {
e.edit && e.typeName && this.submitClass(e, 0) e.edit && e.typeName && this.submitClass(e, 0)
@ -1584,6 +1587,7 @@ export default {
type: 'warning', type: 'warning',
confirmButtonText: '是', confirmButtonText: '是',
cancelButtonText: '否', cancelButtonText: '否',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.submit(this.form.mall.state) this.submit(this.form.mall.state)
}).catch(() => { }).catch(() => {

@ -16,7 +16,7 @@
<div v-if="active == 'task'"> <div v-if="active == 'task'">
<p class="tips">账号admin;密码huoran@2023</p> <p class="tips">账号admin;密码huoran@2023</p>
<iframe class="frame" <iframe class="frame"
:src="isPro ? 'https://huorantech.cn/xxl-job-admin/' : 'http://121.37.12.51:8001/xxl-job-admin/'" :src="isPro ? 'https://xxl.huorantech.cn/xxl-job-admin/' : 'http://121.37.12.51:8001/xxl-job-admin/'"
frameborder="0"></iframe> frameborder="0"></iframe>
</div> </div>
<taskLog v-if="active == 'taskLog'"></taskLog> <taskLog v-if="active == 'taskLog'"></taskLog>

@ -152,7 +152,8 @@ export default {
add () { add () {
if (this.listData.find(e => e.draft)) { if (this.listData.find(e => e.draft)) {
this.$confirm("当前有未发布的版本,是否要新增版本?", "提示", { this.$confirm("当前有未发布的版本,是否要新增版本?", "提示", {
type: "warning" type: "warning",
closeOnClickModal: false
}).then(() => { }).then(() => {
this.$router.push(`/addLog?platformId=${this.platformId}`) this.$router.push(`/addLog?platformId=${this.platformId}`)
}).catch(() => { }) }).catch(() => { })
@ -201,7 +202,8 @@ export default {
const logId = row.logId const logId = row.logId
if (row.draft && !val) { if (row.draft && !val) {
this.$confirm('是否要发布该日志?', '提示', { this.$confirm('是否要发布该日志?', '提示', {
type: 'success' type: 'success',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.changeStatus(logId, val, 0) this.changeStatus(logId, val, 0)
}).catch(() => { }).catch(() => {

@ -511,7 +511,8 @@ export default {
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", { this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success", type: "success",
confirmButtonText: "马上设置", confirmButtonText: "马上设置",
cancelButtonText: "稍后操作" cancelButtonText: "稍后操作",
closeOnClickModal: false
}).then(() => { }).then(() => {
this.$router.replace(`/setTheoreticalCourse?id=${courseId}`); this.$router.replace(`/setTheoreticalCourse?id=${courseId}`);
}).catch(() => { }).catch(() => {
@ -534,7 +535,8 @@ export default {
// //
if ((id && updateTime > 2) || (!id && updateTime)) { if ((id && updateTime > 2) || (!id && updateTime)) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.save() this.save()
}).catch(() => { }).catch(() => {

@ -441,7 +441,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

@ -1,6 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
@ -18,35 +19,57 @@
</el-form-item> </el-form-item>
--> -->
<el-form-item label="省份"> <el-form-item label="省份">
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity" @clear="clearprovince()"> <el-select v-model="form.provinces"
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> clearable
placeholder="请选择省份"
@change="getCity"
@clear="clearprovince()">
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="城市"> <el-form-item label="城市">
<el-select v-model="form.city" clearable placeholder="请选择城市" <el-select v-model="form.city"
:disabled="form.provinces ? false : true" @clear="clearcity()" @change="initData"> clearable
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> placeholder="请选择城市"
:disabled="form.provinces ? false : true"
@clear="clearcity()"
@change="initData">
<el-option v-for="(item,index) in cityList"
:key="index"
:label="item.cityName"
:value="item.cityId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="来源"> <el-form-item label="来源">
<el-select v-model="form.platformId" clearable placeholder="请选择来源" @change="initData"> <el-select v-model="form.platformId"
<el-option clearable
v-for="item in platformList" placeholder="请选择来源"
@change="initData">
<el-option v-for="item in platformList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"></el-option>
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="学校"> <el-form-item label="学校">
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校" @change="initData"> <el-select v-model="form.schoolId"
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> clearable
filterable
placeholder="请选择学校"
@change="initData">
<el-option v-for="(item,index) in schoolList"
:key="index"
:label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -60,16 +83,19 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="创建时间" class="userRadio"> <el-form-item label="创建时间"
class="userRadio">
<el-radio-group v-model="form.month"> <el-radio-group v-model="form.month">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{item.name}}</el-radio> <el-radio v-for="(item,index) in dateList"
:key="index"
:label="item.id"
border>{{item.name}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="自定义"> <el-form-item label="自定义">
<el-date-picker <el-date-picker v-model="form.date"
v-model="form.date"
align="right" align="right"
unlink-panels unlink-panels
type="daterange" type="daterange"
@ -77,13 +103,15 @@
end-placeholder="结束日期" end-placeholder="结束日期"
format="yyyy-MM-dd" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
clearable clearable></el-date-picker>
></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="支持手机号,姓名" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input> <el-input placeholder="支持手机号,姓名"
prefix-icon="el-icon-search"
v-model="form.keyword"
clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -93,37 +121,89 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="card"> <el-card shadow="hover"
class="card">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>用户列表</span> <span>用户列表</span>
</div> </div>
<div> <div>
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> <el-button type="primary"
round
@click="delAllSelection"
v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="userData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" v-loading="loading" row-key="userId"> <el-table :data="userData"
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> class="table"
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> ref="table"
<el-table-column prop="userName" label="姓名" align="center"></el-table-column> stripe
<el-table-column prop="phone" label="手机号" align="center"></el-table-column> header-align="center"
<el-table-column prop="schoolName" label="学校" align="center"></el-table-column> @selection-change="handleSelectionChange"
<el-table-column prop="platformName" label="来源" align="center"></el-table-column> v-loading="loading"
<el-table-column prop="createTime" label="创建时间" width="150" align="center"></el-table-column> row-key="userId">
<el-table-column prop="logInNumber" label="登录次数" align="center"></el-table-column> <el-table-column type="selection"
<el-table-column prop="lastLoginTime" label="最近登录时间" align="center"></el-table-column> width="55"
<el-table-column label="操作" width="300" align="center"> align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center"></el-table-column>
<el-table-column prop="userName"
label="姓名"
align="center"></el-table-column>
<el-table-column prop="phone"
label="手机号"
align="center"></el-table-column>
<el-table-column prop="schoolName"
label="学校"
align="center"></el-table-column>
<el-table-column prop="platformName"
label="来源"
align="center"></el-table-column>
<el-table-column prop="createTime"
label="创建时间"
width="150"
align="center"></el-table-column>
<el-table-column prop="logInNumber"
label="登录次数"
align="center"></el-table-column>
<el-table-column prop="lastLoginTime"
label="最近登录时间"
align="center"></el-table-column>
<el-table-column label="操作"
width="300"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="toDetail(scope.row, 1)" v-auth>查看</el-button> <el-button type="text"
<el-button v-if="scope.row.userId!==1" type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> @click="toDetail(scope.row, 1)"
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button> v-auth>查看</el-button>
<el-switch v-if="scope.row.userId!==1" v-model="scope.row.isEnable" :active-value="1" :inactive-value="0" style="margin: 0 10px 0 5px" :active-text="scope.row.isEnable ? '启用' : '禁用'" @change="switchOff($event,scope.row,scope.$index)" v-auth="'/user:启用'"></el-switch> <el-button v-if="scope.row.userId!==1"
type="text"
@click="handleDelete(scope.row)"
v-auth>删除</el-button>
<el-button type="text"
@click="resetPassword(scope.row)"
v-auth>重置密码</el-button>
<el-switch v-if="scope.row.userId!==1"
v-model="scope.row.isEnable"
:active-value="1"
:inactive-value="0"
style="margin: 0 10px 0 5px"
:active-text="scope.row.isEnable ? '启用' : '禁用'"
@change="switchOff($event,scope.row,scope.$index)"
v-auth="'/user:启用'"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="totals"> <el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="totals">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
@ -134,7 +214,7 @@
import Setting from '@/setting' import Setting from '@/setting'
export default { export default {
name: 'user', name: 'user',
data() { data () {
return { return {
platformId: Setting.platformId, platformId: Setting.platformId,
searchTimer: null, searchTimer: null,
@ -147,7 +227,7 @@ export default {
schoolId: '', schoolId: '',
accountRole: '', accountRole: '',
keyword: '', keyword: '',
date:'', date: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
month: '' month: ''
@ -169,12 +249,12 @@ export default {
value: 4 value: 4
}], }],
countryList: [{ countryList: [{
name:'中国' name: '中国'
}], }],
provinceList: this.$store.state.provinceList, provinceList: this.$store.state.provinceList,
cityList: [], cityList: [],
schoolList: [], schoolList: [],
userData:[], userData: [],
dateList: [{ dateList: [{
id: '', id: '',
name: '不限' name: '不限'
@ -217,37 +297,37 @@ export default {
}; };
}, },
watch: { watch: {
'form.keyword': function(val) { 'form.keyword': function (val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData() this.initData()
},500) }, 500)
}, },
'form.month': function(val){ 'form.month': function (val) {
if(val){ if (val) {
let unit = 24 * 60 * 60 * 1000 let unit = 24 * 60 * 60 * 1000
this.form.date = [this.formatDate('yyyy-MM-dd',new Date(new Date().getTime() - unit * 30 * val)),this.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + unit))] this.form.date = [this.formatDate('yyyy-MM-dd', new Date(new Date().getTime() - unit * 30 * val)), this.formatDate('yyyy-MM-dd', new Date(new Date().getTime() + unit))]
}else{ } else {
this.form.date = [] this.form.date = []
} }
}, },
'form.date': function(val){ 'form.date': function (val) {
if(val && val.length){ if (val && val.length) {
this.form.startTime = val[0] this.form.startTime = val[0]
this.form.endTime = val[1] this.form.endTime = val[1]
}else{ } else {
this.form.startTime = '' this.form.startTime = ''
this.form.endTime = '' this.form.endTime = ''
} }
this.initData() this.initData()
} }
}, },
mounted() { mounted () {
this.getData() this.getData()
this.getSchoolData(); this.getSchoolData();
}, },
methods: { methods: {
getData() { getData () {
let data = { let data = {
countries: this.form.countries, countries: this.form.countries,
provinceId: this.form.provinces, provinceId: this.form.provinces,
@ -288,95 +368,95 @@ export default {
this.loading = false this.loading = false
}) })
}, },
initData(){ initData () {
this.page = 1 this.page = 1
this.getData() this.getData()
}, },
// //
clearprovince(){ clearprovince () {
this.form.city = '', this.form.city = '',
this.form.schoolId = '' this.form.schoolId = ''
}, },
// //
getCity(){ getCity () {
this.clearprovince() this.clearprovince()
this.getCityData() this.getCityData()
this.page = 1 this.page = 1
this.getData() this.getData()
}, },
getCityData(){ getCityData () {
let data = { let data = {
provinceId: this.form.provinces provinceId: this.form.provinces
} }
this.$get(this.api.queryCity,data).then(res => { this.$get(this.api.queryCity, data).then(res => {
this.cityList = res.list this.cityList = res.list
}).catch(res => {}) }).catch(res => { })
}, },
// //
clearcity(){ clearcity () {
this.form.schoolId = '' this.form.schoolId = ''
}, },
// / // /
getSchool(){ getSchool () {
this.clearcity() this.clearcity()
this.getSchoolData() this.getSchoolData()
this.page = 1 this.page = 1
this.getData() this.getData()
}, },
getSchoolData(){ getSchoolData () {
let data = { let data = {
provinceId: "", provinceId: "",
cityId: "" cityId: ""
} }
this.$get(this.api.querySchoolData,data).then(res => { this.$get(this.api.querySchoolData, data).then(res => {
this.schoolList = res.list this.schoolList = res.list
}).catch(res => {}) }).catch(res => { })
}, },
currentChange(val) { currentChange (val) {
this.page = val this.page = val
this.$router.push(`user?page=${val}`) this.$router.push(`user?page=${val}`)
this.getData() this.getData()
}, },
toDetail(row, detail){ toDetail (row, detail) {
this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`) this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`)
}, },
handleDelete(row) { handleDelete (row) {
this.$confirm('确定要删除吗?', '提示', { this.$confirm('确定要删除吗?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$post(this.api.delUserAccounts, row.userIds).then(res => { this.$post(this.api.delUserAccounts, row.userIds).then(res => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}) }).catch(res => { })
}).catch(() => {}) }).catch(() => { })
}, },
resetPassword(row){ resetPassword (row) {
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', { this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
}).then(() => { }).then(() => {
this.$get(this.api.resetPwd,{ this.$get(this.api.resetPwd, {
newPwd: Setting.initialPassword, newPwd: Setting.initialPassword,
userId: row.userId, userId: row.userId,
}).then(res => { }).then(res => {
if(res.message == 'success'){ if (res.message == 'success') {
this.$message.success('重置成功') this.$message.success('重置成功')
}else{ } else {
this.$message.error('重置失败') this.$message.error('重置失败')
} }
}).catch(res => {}) }).catch(res => { })
}).catch(() => {}) }).catch(() => { })
}, },
// //
switchUser(val,row) { switchUser (val, row) {
this.$get(this.api.updateAccountAllEnable, { this.$get(this.api.updateAccountAllEnable, {
id: row.userId, id: row.userId,
isEnable: val, isEnable: val,
phone: row.phone phone: row.phone
}).then(res => { }).then(res => {
this.$message.success(val ? '启用成功' : '禁用成功') this.$message.success(val ? '启用成功' : '禁用成功')
}).catch(res => {}) }).catch(res => { })
}, },
// //
switchOff(val,row) { switchOff (val, row) {
// //
if (val) { if (val) {
// //
@ -385,7 +465,8 @@ export default {
}).catch((res) => { }).catch((res) => {
// //
this.$confirm(res.message, '提示', { this.$confirm(res.message, '提示', {
type: 'info' type: 'info',
closeOnClickModal: false
}).then(() => { }).then(() => {
this.switchUser(val, row) this.switchUser(val, row)
}).catch(() => { }).catch(() => {
@ -397,19 +478,19 @@ export default {
this.switchUser(val, row) this.switchUser(val, row)
} }
}, },
handleSelectionChange(val) { handleSelectionChange (val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
delAllSelection() { delAllSelection () {
if(this.multipleSelection.length){ if (this.multipleSelection.length) {
let delList = this.multipleSelection.map(e => e.userId); let delList = this.multipleSelection.map(e => e.userId);
this.$confirm('确定要删除选中用户吗?', '提示', { this.$confirm('确定要删除选中用户吗?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$post(this.api.delUserAccounts,delList).then(res => { this.$post(this.api.delUserAccounts, delList).then(res => {
if(delList.length == this.userData.length){ if (delList.length == this.userData.length) {
if(this.page > 1){ if (this.page > 1) {
this.page = this.page-1 this.page = this.page - 1
} }
} }
this.$message.success('删除成功') this.$message.success('删除成功')
@ -418,8 +499,8 @@ export default {
}).catch(res => { }).catch(res => {
}) })
}).catch(() => {}) }).catch(() => { })
}else{ } else {
this.$message.error('请先选择客户 !') this.$message.error('请先选择客户 !')
} }
}, },
@ -434,7 +515,7 @@ export default {
.card { .card {
min-height: calc(100vh - 380px); min-height: calc(100vh - 380px);
} }
.el-form-item{ .el-form-item {
margin-bottom: 0; margin-bottom: 0;
/deep/.el-radio { /deep/.el-radio {
width: 87px; width: 87px;
@ -443,7 +524,7 @@ export default {
padding-left: 0; padding-left: 0;
} }
} }
.el-radio.is-bordered+.el-radio.is-bordered{ .el-radio.is-bordered + .el-radio.is-bordered {
margin-left: 0; margin-left: 0;
} }
} }

@ -22,5 +22,6 @@ module.exports = {
// '@': resolve('src'), // '@': resolve('src'),
// } // }
// } // }
} },
productionSourceMap: false,
}; };
Loading…
Cancel
Save