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') {
this.$refs.cropper.getCropBlob(data => {
compress(data, 1).then(res => {
debugger
that.$emit('upload', res)
})
})

@ -6,7 +6,7 @@ const isDev = process.env.NODE_ENV === 'development' // 开发环境
const isPro = url.includes('huorantech.cn') //正式服
let jumpPath = `${location.origin}/judgmentPoint`
let sandPath = `${location.origin}/sandbox` // 沙盘地址
let sandPath = `https://izhixinyun.com/sandbox` // 沙盘地址
let host = `${location.origin}/`
if (isDev) {
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.51:9000/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'
jumpPath = 'https://judgment.huorantech.cn/'
}

@ -1,7 +1,6 @@
import Setting from "@/setting";
const host = Setting.apiBaseURL
const uploadURL = Setting.uploadURL
const { uploadURL, jumpPath, apiBaseURL: host } = Setting
export default {
@ -16,7 +15,7 @@ export default {
// 阿里云文件/视频管理
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`, // 新增学生前:校验手机号或者邮箱
checkWorkNumOrAccount: `occupationlab/occupationlab/architecture/checkWorkNumOrAccount`, // 新增/编辑学生前:校验学号或者学生账号
@ -94,8 +93,8 @@ export default {
editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理
copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理
// 判分点
getBcJudgmentPoint: `judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
getLcJudgmentPoint: `judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
getBcJudgmentPoint: `${jumpPath}judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
getLcJudgmentPoint: `${jumpPath}judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
addProjectJudgment: `occupationlab/occupationlab/projectJudgment/addProjectJudgment`, // 添加项目管理、判分点中间表
updateProjectJudgment: `occupationlab/occupationlab/projectJudgment/updateProjectJudgment`, // 判分点中间表批量更新
deleteProjectJudgment: `occupationlab/occupationlab/projectJudgment/deleteProjectJudgment`, // 判分点中间表批量删除

@ -199,93 +199,7 @@ export default {
{ title: 'Some class', value: 'class-name' }
],
//为内容模板插件提供预置模板
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>
`
}
],
templates: [],
// content_security_policy: "https://cdn.tiny.cloud/1/rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda/tinymce/6/tinymce.min.js",
// extended_valid_elements:'script[src]',
//

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

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

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

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

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

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

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

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

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

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

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

@ -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 }) => {
whetherToPublish ?
this.$confirm('排名已经发布,是否直接覆盖?', '提示', {
type: 'success'
type: 'success',
closeOnClickModal: false
}).then(() => {
this.publishSubmit()
}).catch(() => { }) :

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

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

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

@ -99,7 +99,7 @@
<template slot-scope="scope">
<el-button type="text"
@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>
</template>
</el-table-column>

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

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

@ -3,32 +3,42 @@
<div class="left">
<div class="inner">
<div class="text-center">
<img :src="$store.state.avatar" class="avatar" />
<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>
<img :src="$store.state.avatar"
class="avatar" />
<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>
</div>
<ul class="menu">
<li v-for="item in typeList" :key="item.index" :class="{active: item.index == active}">
<li v-for="item in typeList"
:key="item.index"
:class="{active: item.index == active}">
{{ item.title }}
</li>
</ul>
</div>
</div>
<div class="right">
<info ref="info" @updateStatus="updateStatus"></info>
<info ref="info"
@updateStatus="updateStatus"></info>
</div>
</div>
</template>
<script>
import Setting from '@/setting'
import { mapState,mapMutations } from 'vuex'
import { mapState, mapMutations } from 'vuex'
import info from './info'
import util from '@/libs/util'
export default {
data() {
data () {
return {
token: sessionStorage.getItem('token'),
typeList: [
@ -48,30 +58,31 @@ export default {
]),
},
// ,
beforeRouteLeave(to, from, next) {
if(this.edited){
beforeRouteLeave (to, from, next) {
if (this.edited) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.$refs.info.save()
next(false)
}).catch(() => {
next(false)
})
}else{
} else {
next()
}
},
mounted() {
mounted () {
},
methods: {
changeAvatar(res) {
changeAvatar (res) {
this.$store.commit('userAvatar', {
avatar: res.message
})
},
updateStatus(status){
updateStatus (status) {
this.edited = status
}
}
@ -79,7 +90,7 @@ export default {
</script>
<style lang="scss" scoped>
.wrap{
.wrap {
display: flex;
width: 1280px;
margin: 0 auto;
@ -87,35 +98,35 @@ export default {
.text-center {
text-align: center;
}
.left{
.left {
margin-right: 12px;
background-color: #fff;
box-shadow: 2px 0px 6px 0px #EEEEEE;
.inner{
box-shadow: 2px 0px 6px 0px #eeeeee;
.inner {
width: 170px;
padding: 20px 0;
}
.avatar{
.avatar {
width: 80px;
height: 80px;
border-radius: 50%;
}
.menu{
.menu {
margin-top: 32px;
li{
li {
padding: 0 20px;
color: #303133;
font-size: 14px;
line-height: 38px;
cursor: pointer;
&.active{
&.active {
color: #fff;
background-color: #9278ff;
}
}
}
}
.right{
.right {
flex: 1;
}
}

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

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

@ -16,7 +16,7 @@
<div v-if="active == 'task'">
<p class="tips">账号admin;密码huoran@2023</p>
<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>
</div>
<taskLog v-if="active == 'taskLog'"></taskLog>

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

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

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

@ -1,6 +1,7 @@
<template>
<div class="wrap">
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
@ -18,35 +19,57 @@
</el-form-item>
-->
<el-form-item label="省份">
<el-select v-model="form.provinces" 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 v-model="form.provinces"
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-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="城市">
<el-select v-model="form.city" clearable 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 v-model="form.city"
clearable
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-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="来源">
<el-select v-model="form.platformId" clearable placeholder="请选择来源" @change="initData">
<el-option
v-for="item in platformList"
<el-select v-model="form.platformId"
clearable
placeholder="请选择来源"
@change="initData">
<el-option v-for="item in platformList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
: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 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>
@ -60,16 +83,19 @@
</el-row>
<el-row>
<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 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-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="自定义">
<el-date-picker
v-model="form.date"
<el-date-picker v-model="form.date"
align="right"
unlink-panels
type="daterange"
@ -77,13 +103,15 @@
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
clearable
></el-date-picker>
clearable></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<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-col>
</el-row>
@ -93,37 +121,89 @@
</div>
</el-card>
<el-card shadow="hover" class="card">
<el-card shadow="hover"
class="card">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>用户列表</span>
</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>
<el-table :data="userData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" v-loading="loading" row-key="userId">
<el-table-column type="selection" width="55" 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">
<el-table :data="userData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
v-loading="loading"
row-key="userId">
<el-table-column type="selection"
width="55"
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">
<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>
<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 background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="totals">
</el-pagination>
</div>
</el-card>
@ -134,7 +214,7 @@
import Setting from '@/setting'
export default {
name: 'user',
data() {
data () {
return {
platformId: Setting.platformId,
searchTimer: null,
@ -147,7 +227,7 @@ export default {
schoolId: '',
accountRole: '',
keyword: '',
date:'',
date: '',
startTime: '',
endTime: '',
month: ''
@ -169,12 +249,12 @@ export default {
value: 4
}],
countryList: [{
name:'中国'
name: '中国'
}],
provinceList: this.$store.state.provinceList,
cityList: [],
schoolList: [],
userData:[],
userData: [],
dateList: [{
id: '',
name: '不限'
@ -217,37 +297,37 @@ export default {
};
},
watch: {
'form.keyword': function(val) {
'form.keyword': function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
},500)
}, 500)
},
'form.month': function(val){
if(val){
'form.month': function (val) {
if (val) {
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 = [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){
'form.date': function (val) {
if (val && val.length) {
this.form.startTime = val[0]
this.form.endTime = val[1]
}else{
} else {
this.form.startTime = ''
this.form.endTime = ''
}
this.initData()
}
},
mounted() {
mounted () {
this.getData()
this.getSchoolData();
},
methods: {
getData() {
getData () {
let data = {
countries: this.form.countries,
provinceId: this.form.provinces,
@ -288,95 +368,95 @@ export default {
this.loading = false
})
},
initData(){
initData () {
this.page = 1
this.getData()
},
//
clearprovince(){
clearprovince () {
this.form.city = '',
this.form.schoolId = ''
},
//
getCity(){
getCity () {
this.clearprovince()
this.getCityData()
this.page = 1
this.getData()
},
getCityData(){
getCityData () {
let data = {
provinceId: this.form.provinces
}
this.$get(this.api.queryCity,data).then(res => {
this.$get(this.api.queryCity, data).then(res => {
this.cityList = res.list
}).catch(res => {})
}).catch(res => { })
},
//
clearcity(){
clearcity () {
this.form.schoolId = ''
},
// /
getSchool(){
getSchool () {
this.clearcity()
this.getSchoolData()
this.page = 1
this.getData()
},
getSchoolData(){
getSchoolData () {
let data = {
provinceId: "",
cityId: ""
}
this.$get(this.api.querySchoolData,data).then(res => {
this.$get(this.api.querySchoolData, data).then(res => {
this.schoolList = res.list
}).catch(res => {})
}).catch(res => { })
},
currentChange(val) {
currentChange (val) {
this.page = val
this.$router.push(`user?page=${val}`)
this.getData()
},
toDetail(row, detail){
toDetail (row, detail) {
this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`)
},
handleDelete(row) {
handleDelete (row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.delUserAccounts, row.userIds).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => {})
}).catch(() => {})
}).catch(res => { })
}).catch(() => { })
},
resetPassword(row){
resetPassword (row) {
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
}).then(() => {
this.$get(this.api.resetPwd,{
this.$get(this.api.resetPwd, {
newPwd: Setting.initialPassword,
userId: row.userId,
}).then(res => {
if(res.message == 'success'){
if (res.message == 'success') {
this.$message.success('重置成功')
}else{
} else {
this.$message.error('重置失败')
}
}).catch(res => {})
}).catch(() => {})
}).catch(res => { })
}).catch(() => { })
},
//
switchUser(val,row) {
switchUser (val, row) {
this.$get(this.api.updateAccountAllEnable, {
id: row.userId,
isEnable: val,
phone: row.phone
}).then(res => {
this.$message.success(val ? '启用成功' : '禁用成功')
}).catch(res => {})
}).catch(res => { })
},
//
switchOff(val,row) {
switchOff (val, row) {
//
if (val) {
//
@ -385,7 +465,8 @@ export default {
}).catch((res) => {
//
this.$confirm(res.message, '提示', {
type: 'info'
type: 'info',
closeOnClickModal: false
}).then(() => {
this.switchUser(val, row)
}).catch(() => {
@ -397,19 +478,19 @@ export default {
this.switchUser(val, row)
}
},
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val;
},
delAllSelection() {
if(this.multipleSelection.length){
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.$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('删除成功')
@ -418,8 +499,8 @@ export default {
}).catch(res => {
})
}).catch(() => {})
}else{
}).catch(() => { })
} else {
this.$message.error('请先选择客户 !')
}
},
@ -434,7 +515,7 @@ export default {
.card {
min-height: calc(100vh - 380px);
}
.el-form-item{
.el-form-item {
margin-bottom: 0;
/deep/.el-radio {
width: 87px;
@ -443,7 +524,7 @@ export default {
padding-left: 0;
}
}
.el-radio.is-bordered+.el-radio.is-bordered{
.el-radio.is-bordered + .el-radio.is-bordered {
margin-left: 0;
}
}

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