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. 447
      src/views/information/columnManage/index.vue
  10. 162
      src/views/information/contentManage/index.vue
  11. 144
      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. 447
      src/views/match/manage/matchProgress.vue
  16. 3
      src/views/match/manage/matchRank.vue
  17. 266
      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. 159
      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. 879
      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();

@ -1,220 +1,257 @@
<template> <template>
<div> <div>
<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"
</template> round
<template v-if="!sorting"> @click="cancelSort">取消</el-button>
<el-button v-auth="'栏目管理:更改排序'" class="action-btn" type="primary" round @click="openSort">更改排序 <el-button class="action-btn"
</el-button> type="primary"
<el-button v-auth="'栏目管理:添加栏目'" class="action-btn" type="primary" round @click="handleColumn(false, 0, 0)">添加栏目 round
</el-button> @click="sortSubmit">保存</el-button>
</template> </template>
<template v-if="!sorting">
<el-button v-auth="'栏目管理:更改排序'"
class="action-btn"
type="primary"
round
@click="openSort">更改排序
</el-button>
<el-button v-auth="'栏目管理:添加栏目'"
class="action-btn"
type="primary"
round
@click="handleColumn(false, 0, 0)">添加栏目
</el-button>
</template>
</div>
<div class="page-content"
style="padding-top: 24px; margin-top: 24px">
<div class="el-table">
<div class="list">
<div class="thead">
<span>栏目名称</span>
<span><em :class="{hide: sorting}"
style="font-style: normal">操作</em></span>
</div> </div>
<div class="page-content" style="padding-top: 24px; margin-top: 24px"> </div>
<div class="el-table"> <el-tree :data="list"
<div class="list"> node-key="id"
<div class="thead"> default-expand-all
<span>栏目名称</span> :draggable="sorting"
<span><em :class="{hide: sorting}" style="font-style: normal">操作</em></span> :allow-drop="allowDrop">
</div> <span class="custom-tree-node"
</div> slot-scope="{ node, data }">
<el-tree :data="list" node-key="id" default-expand-all :draggable="sorting" :allow-drop="allowDrop"> <span class="name">{{ data.name }}</span>
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="action"
<span class="name">{{ data.name }}</span> v-show="!sorting">
<span class="action" v-show="!sorting"> <el-button v-auth="'栏目管理:编辑'"
<el-button v-auth="'栏目管理:编辑'" type="text" @click.stop="handleColumn(data)">编辑</el-button> type="text"
<el-divider v-auth="'栏目管理:编辑'" direction="vertical"></el-divider> @click.stop="handleColumn(data)">编辑</el-button>
<template v-if="node.level < 4"> <el-divider v-auth="'栏目管理:编辑'"
<el-button v-auth="'栏目管理:新增'" type="text" @click.stop="handleColumn(data, data.id, data.level + 1)">新增</el-button> direction="vertical"></el-divider>
<el-divider v-auth="'栏目管理:新增'" direction="vertical"></el-divider> <template v-if="node.level < 4">
</template> <el-button v-auth="'栏目管理:新增'"
<el-button v-auth="'栏目管理:删除'" type="text" @click.stop="delData(data)">删除</el-button> type="text"
</span> @click.stop="handleColumn(data, data.id, data.level + 1)">新增</el-button>
</span> <el-divider v-auth="'栏目管理:新增'"
</el-tree> direction="vertical"></el-divider>
</div> </template>
</div> <el-button v-auth="'栏目管理:删除'"
</div> type="text"
@click.stop="delData(data)">删除</el-button>
<el-dialog :title="!curRow.id ? '添加栏目' : '编辑栏目'" :visible.sync="columnVisible" width="400px" </span>
:close-on-click-modal="false" @close="closeColumn">
<el-form>
<el-form-item>
<el-input placeholder="栏目名称" v-model="curRow.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="columnVisible = false"> </el-button>
<el-button type="primary" @click="columnSubmit"> </el-button>
</span> </span>
</el-dialog> </el-tree>
</div>
</div>
</div> </div>
<el-dialog :title="!curRow.id ? '添加栏目' : '编辑栏目'"
:visible.sync="columnVisible"
width="400px"
:close-on-click-modal="false"
@close="closeColumn">
<el-form>
<el-form-item>
<el-input placeholder="栏目名称"
v-model="curRow.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button @click="columnVisible = false"> </el-button>
<el-button type="primary"
@click="columnSubmit"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
import util from "@/libs/util"; 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: {
first: "栏目管理" first: "栏目管理"
}, },
name: this.$store.state.name, name: this.$store.state.name,
originList: [], originList: [],
list: [], list: [],
multipleSelection: [], multipleSelection: [],
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
columnVisible: false, columnVisible: false,
curRow: {}, curRow: {},
sortObj: null, sortObj: null,
sorting: false, sorting: false,
parentId: '', parentId: '',
isAddType: false, isAddType: false,
defaultProps: { defaultProps: {
label: "name" label: "name"
}, },
level: 0 level: 0
}; };
},
mounted () {
this.getData();
},
beforeRouteLeave (to, from, next) {
if (JSON.stringify(this.originList) !== JSON.stringify(this.list)) {
this.$confirm("确定返回?排序尚未保存。", "提示", {
type: "warning",
closeOnClickModal: false
})
.then(() => {
next();
})
.catch(() => {
});
} else {
next();
}
},
methods: {
getData () {
this.$get(this.api.queryAllColumns, {
school: 0
}).then(({ columnTree }) => {
this.list = columnTree
this.originList = JSON.parse(JSON.stringify(this.list));
this.total = columnTree.length
}).catch(res => {
});
}, },
mounted() { delData (row) {
this.getData(); this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteColumn}/${row.id}`).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {
});
}, },
beforeRouteLeave(to, from, next) { handleColumn (row, parentId, level) {
if (JSON.stringify(this.originList) !== JSON.stringify(this.list)) { this.columnVisible = true
this.$confirm("确定返回?排序尚未保存。", "提示", { if (row) {
type: "warning" this.curRow = JSON.parse(JSON.stringify(row))
}) }
.then(() => { if (typeof parentId === 'number') {
next(); this.curRow = {
}) parentId,
.catch(() => { level,
}); name: '',
} else { platformId: Setting.platformId
next();
} }
}
}, },
methods: { // list
getData() { handleList (data, parent = {}) {
this.$get(this.api.queryAllColumns, { data.map((n, i) => {
school: 0 n.parentId = parent.id || 0
}).then(({ columnTree }) => { n.level = this.level
this.list = columnTree n.sort = i
this.originList = JSON.parse(JSON.stringify(this.list)); if (n.children.length) {
this.total = columnTree.length this.level++
}).catch(res => { this.handleList(n.children, n)
}); } else {
}, this.level = 0
delData(row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteColumn}/${row.id}`).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {
});
},
handleColumn(row, parentId, level) {
this.columnVisible = true
if (row) {
this.curRow = JSON.parse(JSON.stringify(row))
}
if (typeof parentId === 'number') {
this.curRow = {
parentId,
level,
name: '',
platformId: Setting.platformId
}
}
},
// list
handleList(data, parent = {}) {
data.map((n, i) => {
n.parentId = parent.id || 0
n.level = this.level
n.sort = i
if (n.children.length) {
this.level++
this.handleList(n.children, n)
} else {
this.level = 0
}
})
},
sortSubmit() {
this.level = 0
let list = JSON.parse(JSON.stringify(this.list))
this.handleList(list)
this.$post(this.api.columnReorder, {
columnTree: list
}).then(res => {
util.successMsg("保存成功");
this.sorting = false;
this.getData();
}).catch(res => {
});
},
columnSubmit() {
const row = this.curRow
if (!row.name) return util.warningMsg("请填写栏目名称");
if (this.curRow.id) {
this.$put(this.api.editColumn, row).then(res => {
util.successMsg("修改成功");
this.columnVisible = false;
this.getData();
}).catch(res => {
});
} else {
this.$post(this.api.addColumn, row).then(res => {
util.successMsg("添加成功");
this.columnVisible = false;
this.getData();
}).catch(res => {
});
}
},
cancelSort() {
this.sorting = false;
this.list = JSON.parse(JSON.stringify(this.originList));
this.sortObj.destroy();
},
openSort() {
this.sorting = true;
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
},
closeColumn() {
this.curRow = {}
},
allowDrop(draggingNode, dropNode, type) {
console.log("🚀 ~ file: index.vue ~ line 207 ~ allowDrop ~ draggingNode, dropNode, type", draggingNode, dropNode.level, type)
if (dropNode.level == 4 && draggingNode.childNodes.length == 0) {
return type !== "inner";
} else if ((draggingNode.childNodes.length > 0 && dropNode.level == 4) || (draggingNode.childNodes.length > 0 && type == "inner")) {
return false;
} else {
return true;
}
} }
})
},
sortSubmit () {
this.level = 0
let list = JSON.parse(JSON.stringify(this.list))
this.handleList(list)
this.$post(this.api.columnReorder, {
columnTree: list
}).then(res => {
util.successMsg("保存成功");
this.sorting = false;
this.getData();
}).catch(res => {
});
},
columnSubmit () {
const row = this.curRow
if (!row.name) return util.warningMsg("请填写栏目名称");
if (this.curRow.id) {
this.$put(this.api.editColumn, row).then(res => {
util.successMsg("修改成功");
this.columnVisible = false;
this.getData();
}).catch(res => {
});
} else {
this.$post(this.api.addColumn, row).then(res => {
util.successMsg("添加成功");
this.columnVisible = false;
this.getData();
}).catch(res => {
});
}
},
cancelSort () {
this.sorting = false;
this.list = JSON.parse(JSON.stringify(this.originList));
this.sortObj.destroy();
},
openSort () {
this.sorting = true;
},
handleSelectionChange (val) {
this.multipleSelection = val;
},
handleCurrentChange (val) {
this.pageNo = val;
this.getData();
},
closeColumn () {
this.curRow = {}
},
allowDrop (draggingNode, dropNode, type) {
console.log("🚀 ~ file: index.vue ~ line 207 ~ allowDrop ~ draggingNode, dropNode, type", draggingNode, dropNode.level, type)
if (dropNode.level == 4 && draggingNode.childNodes.length == 0) {
return type !== "inner";
} else if ((draggingNode.childNodes.length > 0 && dropNode.level == 4) || (draggingNode.childNodes.length > 0 && type == "inner")) {
return false;
} else {
return true;
}
} }
}
}; };
</script> </script>
@ -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>
@ -15,92 +24,93 @@ import menuTree from '@/components/menuTree'
import ContentList from "./contentList"; import ContentList from "./contentList";
import Setting from '@/setting' import Setting from '@/setting'
export default { export default {
name: "contentManage", name: "contentManage",
components: { components: {
menuTree, menuTree,
ContentList ContentList
}, },
data() { data () {
return { return {
menuList: [], menuList: [],
activeName: this.$store.state.columnId, activeName: this.$store.state.columnId,
columnId: "", columnId: "",
ids: [], ids: [],
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 => {
this.menuList = res.columnTree this.menuList = res.columnTree
const storeId = this.$store.state.columnId const storeId = this.$store.state.columnId
if (this.menuList.length) { if (this.menuList.length) {
this.getId(this.menuList) this.getId(this.menuList)
this.columnId = this.menuList[0].id this.columnId = this.menuList[0].id
if (!storeId) { if (!storeId) {
this.$store.commit('setColumnId', this.columnId) this.$store.commit('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)
})
},
setColumnId(id) {
this.columnId = id
this.$store.commit('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.setColumnId(key.id)
}).catch(() => {
this.setColumnId(key.id)
})
} else { } else {
this.setColumnId(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)
})
},
setColumnId (id) {
this.columnId = id
this.$store.commit('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.setColumnId(key.id)
}).catch(() => {
this.setColumnId(key.id)
})
} else {
this.setColumnId(key.id)
}
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.menu-con { .menu-con {
width: 210px; width: 210px;
height: calc(100vh - 250px); height: calc(100vh - 250px);
border-right: solid 1px #e6e6e6; border-right: solid 1px #e6e6e6;
background-color: #F2F6FC; background-color: #f2f6fc;
/deep/.el-tree-node__content { /deep/.el-tree-node__content {
height: 50px; height: 50px;
} }
} }
.right { .right {
flex: 1; flex: 1;
} }
/deep/.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content { /deep/.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
color: #fff; color: #fff;
background-color: #9278ff; background-color: #9278ff;
} }
</style> </style>

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

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

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

@ -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(() => {

@ -1,121 +1,132 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="left"> <div class="left">
<div class="inner"> <div class="inner">
<div class="text-center"> <div class="text-center">
<img :src="$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}"
</el-upload> :action="this.api.updateUserAvatars"
</div> name="file"
:limit="10"
<ul class="menu"> :show-file-list="false"
<li v-for="item in typeList" :key="item.index" :class="{active: item.index == active}"> :on-success="changeAvatar">
{{ item.title }} <el-button type="text"
</li> size="small">点击更换头像</el-button>
</ul> </el-upload>
</div>
</div>
<div class="right">
<info ref="info" @updateStatus="updateStatus"></info>
</div> </div>
<ul class="menu">
<li v-for="item in typeList"
:key="item.index"
:class="{active: item.index == active}">
{{ item.title }}
</li>
</ul>
</div>
</div> </div>
<div class="right">
<info ref="info"
@updateStatus="updateStatus"></info>
</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: [
{ {
index: '1', index: '1',
title: '用户信息' title: '用户信息'
}
],
active: '1',
edited: false
};
},
components: { info },
computed: {
...mapState('user', [
'avatar'
]),
},
// ,
beforeRouteLeave(to, from, next) {
if(this.edited){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.$refs.info.save()
next(false)
}).catch(() => {
next(false)
})
}else{
next()
} }
],
active: '1',
edited: false
};
},
components: { info },
computed: {
...mapState('user', [
'avatar'
]),
},
// ,
beforeRouteLeave (to, from, next) {
if (this.edited) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.$refs.info.save()
next(false)
}).catch(() => {
next(false)
})
} else {
next()
}
},
mounted () {
},
methods: {
changeAvatar (res) {
this.$store.commit('userAvatar', {
avatar: res.message
})
}, },
mounted() { updateStatus (status) {
this.edited = status
},
methods: {
changeAvatar(res) {
this.$store.commit('userAvatar', {
avatar: res.message
})
},
updateStatus(status){
this.edited = status
}
} }
}
}; };
</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;
background-color: #f3f6fa; background-color: #f3f6fa;
.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,429 +1,510 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
<div> class="mgb20">
<div class="flex-center mgb20"> <div>
<p class="hr_tag"></p> <div class="flex-center mgb20">
<span>筛选</span> <p class="hr_tag"></p>
</div> <span>筛选</span>
<div style="overflow: auto;"> </div>
<el-form label-width="80px"> <div style="overflow: auto;">
<el-row> <el-form label-width="80px">
<el-col :span="5"> <el-row>
<!-- <el-col :span="5">
<!--
<el-form-item label="国家"> <el-form-item label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家"> <el-select v-model="form.countries" clearable placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select> </el-select>
</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
</el-select> placeholder="请选择省份"
</el-form-item> @change="getCity"
</el-col> @clear="clearprovince()">
<el-col :span="5"> <el-option v-for="(item,index) in provinceList"
<el-form-item label="城市"> :key="index"
<el-select v-model="form.city" clearable placeholder="请选择城市" :label="item.provinceName"
:disabled="form.provinces ? false : true" @clear="clearcity()" @change="initData"> :value="item.provinceId"></el-option>
<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.city"
<el-select v-model="form.platformId" clearable placeholder="请选择来源" @change="initData"> clearable
<el-option placeholder="请选择城市"
v-for="item in platformList" :disabled="form.provinces ? false : true"
:key="item.value" @clear="clearcity()"
:label="item.label" @change="initData">
:value="item.value" <el-option v-for="(item,index) in cityList"
></el-option> :key="index"
</el-select> :label="item.cityName"
</el-form-item> :value="item.cityId"></el-option>
</el-col> </el-select>
<el-col :span="5"> </el-form-item>
<el-form-item label="学校"> </el-col>
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校" @change="initData"> <el-col :span="5">
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> <el-form-item label="来源">
</el-select> <el-select v-model="form.platformId"
</el-form-item> clearable
</el-col> placeholder="请选择来源"
<!-- <el-col :span="5"> @change="initData">
<el-option v-for="item in platformList"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="学校">
<el-select v-model="form.schoolId"
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-form-item>
</el-col>
<!-- <el-col :span="5">
<el-form-item label="角色"> <el-form-item label="角色">
<el-select v-model="form.accountRole" clearable placeholder="请选择角色" @change="initData"> <el-select v-model="form.accountRole" clearable placeholder="请选择角色" @change="initData">
<el-option v-for="(item,index) in accountRoleList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item,index) in accountRoleList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
</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="创建时间"
<el-radio-group v-model="form.month"> class="userRadio">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{item.name}}</el-radio> <el-radio-group v-model="form.month">
</el-radio-group> <el-radio v-for="(item,index) in dateList"
</el-form-item> :key="index"
</el-col> :label="item.id"
<el-col :span="6"> border>{{item.name}}</el-radio>
<el-form-item label="自定义"> </el-radio-group>
<el-date-picker </el-form-item>
v-model="form.date" </el-col>
align="right" <el-col :span="6">
unlink-panels <el-form-item label="自定义">
type="daterange" <el-date-picker v-model="form.date"
start-placeholder="开始日期" align="right"
end-placeholder="结束日期" unlink-panels
format="yyyy-MM-dd" type="daterange"
value-format="yyyy-MM-dd" start-placeholder="开始日期"
clearable end-placeholder="结束日期"
></el-date-picker> format="yyyy-MM-dd"
</el-form-item> value-format="yyyy-MM-dd"
</el-col> clearable></el-date-picker>
<el-col :span="6"> </el-form-item>
<el-form-item> </el-col>
<el-input placeholder="支持手机号,姓名" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input> <el-col :span="6">
</el-form-item> <el-form-item>
</el-col> <el-input placeholder="支持手机号,姓名"
</el-row> prefix-icon="el-icon-search"
v-model="form.keyword"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="card"> <el-card shadow="hover"
<div class="flex-between mgb20"> class="card">
<div class="flex-center"> <div class="flex-between mgb20">
<p class="hr_tag"></p> <div class="flex-center">
<span>用户列表</span> <p class="hr_tag"></p>
</div> <span>用户列表</span>
<div> </div>
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> <div>
</div> <el-button type="primary"
</div> round
<el-table :data="userData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" v-loading="loading" row-key="userId"> @click="delAllSelection"
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> v-auth>批量删除</el-button>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> </div>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column> </div>
<el-table-column prop="phone" label="手机号" align="center"></el-table-column> <el-table :data="userData"
<el-table-column prop="schoolName" label="学校" align="center"></el-table-column> class="table"
<el-table-column prop="platformName" label="来源" align="center"></el-table-column> ref="table"
<el-table-column prop="createTime" label="创建时间" width="150" align="center"></el-table-column> stripe
<el-table-column prop="logInNumber" label="登录次数" align="center"></el-table-column> header-align="center"
<el-table-column prop="lastLoginTime" label="最近登录时间" align="center"></el-table-column> @selection-change="handleSelectionChange"
<el-table-column label="操作" width="300" align="center"> v-loading="loading"
<template slot-scope="scope"> row-key="userId">
<el-button type="text" @click="toDetail(scope.row, 1)" v-auth>查看</el-button> <el-table-column type="selection"
<el-button v-if="scope.row.userId!==1" type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> width="55"
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button> align="center"
<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> :reserve-selection="true"></el-table-column>
</template> <el-table-column type="index"
</el-table-column> width="100"
</el-table> label="序号"
<div class="pagination"> align="center"></el-table-column>
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="totals"> <el-table-column prop="userName"
</el-pagination> label="姓名"
</div> align="center"></el-table-column>
</el-card> <el-table-column prop="phone"
</div> 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">
<el-button type="text"
@click="toDetail(scope.row, 1)"
v-auth>查看</el-button>
<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>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="totals">
</el-pagination>
</div>
</el-card>
</div>
</template> </template>
<script> <script>
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,
form: { form: {
name: '', name: '',
countries: '中国', countries: '中国',
provinces: '', provinces: '',
city: '', city: '',
platformId: '', platformId: '',
schoolId: '', schoolId: '',
accountRole: '', accountRole: '',
keyword: '', keyword: '',
date:'', date: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
month: '' month: ''
}, },
accountRoleList: [{ accountRoleList: [{
name: '超级管理员', name: '超级管理员',
value: 1 value: 1
}, },
{ {
name: '管理员', name: '管理员',
value: 13 value: 13
}, },
{ {
name: '教师', name: '教师',
value: 14 value: 14
}, },
{ {
name: '学生', name: '学生',
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: '不限'
}, },
{ {
id: 3, id: 3,
name: '3个月内' name: '3个月内'
}, },
{ {
id: 6, id: 6,
name: '6个月内' name: '6个月内'
}, },
{ {
id: 9, id: 9,
name: '9个月内' name: '9个月内'
}, },
{ {
id: 12, id: 12,
name: '1年内' name: '1年内'
}], }],
platformList: [ platformList: [
{ {
value: '', value: '',
label: '不限' label: '不限'
},
{
value: 1,
label: '职站'
},
{
value: 2,
label: '数据前瞻'
},
],
page: +this.$route.query.page || 1,
pageSize: 10,
totals: 0,
multipleSelection: [],
loading: false
};
},
watch: {
'form.keyword': function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
},500)
}, },
'form.month': function(val){ {
if(val){ value: 1,
let unit = 24 * 60 * 60 * 1000 label: '职站'
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{
this.form.date = []
}
}, },
'form.date': function(val){ {
if(val && val.length){ value: 2,
this.form.startTime = val[0] label: '数据前瞻'
this.form.endTime = val[1] },
}else{ ],
this.form.startTime = '' page: +this.$route.query.page || 1,
this.form.endTime = '' pageSize: 10,
} totals: 0,
this.initData() multipleSelection: [],
} loading: false
};
},
watch: {
'form.keyword': function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}, },
mounted() { 'form.month': function (val) {
this.getData() if (val) {
this.getSchoolData(); 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))]
} else {
this.form.date = []
}
}, },
methods: { 'form.date': function (val) {
getData() { if (val && val.length) {
let data = { this.form.startTime = val[0]
countries: this.form.countries, this.form.endTime = val[1]
provinceId: this.form.provinces, } else {
cityId: this.form.city, this.form.startTime = ''
platformId: this.form.platformId, this.form.endTime = ''
schoolId: this.form.schoolId, }
month: this.form.month, this.initData()
creationTime: this.form.startTime, }
endTime: this.form.endTime, },
roleId: this.form.accountRole, mounted () {
searchContent: this.form.keyword, this.getData()
pageNum: this.page, this.getSchoolData();
pageSize: this.pageSize },
} methods: {
this.loading = true getData () {
this.$post(this.api.queryUserInfoList, data).then(({ page, total }) => { let data = {
const promises = [] countries: this.form.countries,
page.map(e => { provinceId: this.form.provinces,
promises.push(new Promise((resolve, reject) => { cityId: this.form.city,
// platformId: this.form.platformId,
this.$get(this.api.viewUserDetailsforNakadai, { userId: e.userId }).then(({ result }) => { schoolId: this.form.schoolId,
const platList = result.bindingPlatformAndUserList month: this.form.month,
// 1->0-> creationTime: this.form.startTime,
e.isEnable = platList.find(e => e.isEnable) ? 1 : 0 endTime: this.form.endTime,
e.userIds = platList.map(e => e.userId) // userId roleId: this.form.accountRole,
resolve() searchContent: this.form.keyword,
}).catch((res) => { pageNum: this.page,
reject() pageSize: this.pageSize
}) }
})) this.loading = true
}) this.$post(this.api.queryUserInfoList, data).then(({ page, total }) => {
Promise.all(promises).then(_ => { const promises = []
this.userData = page page.map(e => {
this.totals = total promises.push(new Promise((resolve, reject) => {
this.loading = false //
}) this.$get(this.api.viewUserDetailsforNakadai, { userId: e.userId }).then(({ result }) => {
}).catch(res => { const platList = result.bindingPlatformAndUserList
this.loading = false // 1->0->
}) e.isEnable = platList.find(e => e.isEnable) ? 1 : 0
}, e.userIds = platList.map(e => e.userId) // userId
initData(){ resolve()
this.page = 1
this.getData()
},
//
clearprovince(){
this.form.city = '',
this.form.schoolId = ''
},
//
getCity(){
this.clearprovince()
this.getCityData()
this.page = 1
this.getData()
},
getCityData(){
let data = {
provinceId: this.form.provinces
}
this.$get(this.api.queryCity,data).then(res => {
this.cityList = res.list
}).catch(res => {})
},
//
clearcity(){
this.form.schoolId = ''
},
// /
getSchool(){
this.clearcity()
this.getSchoolData()
this.page = 1
this.getData()
},
getSchoolData(){
let data = {
provinceId: "",
cityId: ""
}
this.$get(this.api.querySchoolData,data).then(res => {
this.schoolList = res.list
}).catch(res => {})
},
currentChange(val) {
this.page = val
this.$router.push(`user?page=${val}`)
this.getData()
},
toDetail(row, detail){
this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`)
},
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.delUserAccounts, row.userIds).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => {})
}).catch(() => {})
},
resetPassword(row){
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
}).then(() => {
this.$get(this.api.resetPwd,{
newPwd: Setting.initialPassword,
userId: row.userId,
}).then(res => {
if(res.message == 'success'){
this.$message.success('重置成功')
}else{
this.$message.error('重置失败')
}
}).catch(res => {})
}).catch(() => {})
},
//
switchUser(val,row) {
this.$get(this.api.updateAccountAllEnable, {
id: row.userId,
isEnable: val,
phone: row.phone
}).then(res => {
this.$message.success(val ? '启用成功' : '禁用成功')
}).catch(res => {})
},
//
switchOff(val,row) {
//
if (val) {
//
this.$post(`${this.api.oneClickEnableVerification}?accountId=${row.accountId}`).then(({ result }) => {
this.switchUser(val, row)
}).catch((res) => { }).catch((res) => {
// reject()
this.$confirm(res.message, '提示', {
type: 'info'
}).then(() => {
this.switchUser(val, row)
}).catch(() => {
//
row.isEnable = 0
})
}) })
}))
})
Promise.all(promises).then(_ => {
this.userData = page
this.totals = total
this.loading = false
})
}).catch(res => {
this.loading = false
})
},
initData () {
this.page = 1
this.getData()
},
//
clearprovince () {
this.form.city = '',
this.form.schoolId = ''
},
//
getCity () {
this.clearprovince()
this.getCityData()
this.page = 1
this.getData()
},
getCityData () {
let data = {
provinceId: this.form.provinces
}
this.$get(this.api.queryCity, data).then(res => {
this.cityList = res.list
}).catch(res => { })
},
//
clearcity () {
this.form.schoolId = ''
},
// /
getSchool () {
this.clearcity()
this.getSchoolData()
this.page = 1
this.getData()
},
getSchoolData () {
let data = {
provinceId: "",
cityId: ""
}
this.$get(this.api.querySchoolData, data).then(res => {
this.schoolList = res.list
}).catch(res => { })
},
currentChange (val) {
this.page = val
this.$router.push(`user?page=${val}`)
this.getData()
},
toDetail (row, detail) {
this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`)
},
handleDelete (row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.delUserAccounts, row.userIds).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => { })
}).catch(() => { })
},
resetPassword (row) {
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
}).then(() => {
this.$get(this.api.resetPwd, {
newPwd: Setting.initialPassword,
userId: row.userId,
}).then(res => {
if (res.message == 'success') {
this.$message.success('重置成功')
} else { } else {
this.switchUser(val, row) this.$message.error('重置失败')
} }
}, }).catch(res => { })
handleSelectionChange(val) { }).catch(() => { })
this.multipleSelection = val; },
}, //
delAllSelection() { switchUser (val, row) {
if(this.multipleSelection.length){ this.$get(this.api.updateAccountAllEnable, {
let delList = this.multipleSelection.map(e => e.userId); id: row.userId,
this.$confirm('确定要删除选中用户吗?', '提示', { isEnable: val,
type: 'warning' phone: row.phone
}).then(() => { }).then(res => {
this.$post(this.api.delUserAccounts,delList).then(res => { this.$message.success(val ? '启用成功' : '禁用成功')
if(delList.length == this.userData.length){ }).catch(res => { })
if(this.page > 1){ },
this.page = this.page-1 //
} switchOff (val, row) {
} //
this.$message.success('删除成功') if (val) {
this.$refs.table.clearSelection() //
this.getData() this.$post(`${this.api.oneClickEnableVerification}?accountId=${row.accountId}`).then(({ result }) => {
}).catch(res => { this.switchUser(val, row)
}).catch((res) => {
}) //
}).catch(() => {}) this.$confirm(res.message, '提示', {
}else{ type: 'info',
this.$message.error('请先选择客户 !') closeOnClickModal: false
}).then(() => {
this.switchUser(val, row)
}).catch(() => {
//
row.isEnable = 0
})
})
} else {
this.switchUser(val, row)
}
},
handleSelectionChange (val) {
this.multipleSelection = val;
},
delAllSelection () {
if (this.multipleSelection.length) {
let delList = this.multipleSelection.map(e => e.userId);
this.$confirm('确定要删除选中用户吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.delUserAccounts, delList).then(res => {
if (delList.length == this.userData.length) {
if (this.page > 1) {
this.page = this.page - 1
}
} }
}, this.$message.success('删除成功')
} this.$refs.table.clearSelection()
this.getData()
}).catch(res => {
})
}).catch(() => { })
} else {
this.$message.error('请先选择客户 !')
}
},
}
}; };
</script> </script>
@ -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