提交 aed38b94 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 6b7e8343
<template>
<div class="dialog-box">
<div class="dialog-cont">
<div class="close el-icon-circle-close" @click="$emit('dialogClose')"></div>
<div class="title">提示</div>
<div class="conts">
<div class="text">
您确定要进入案例背景选择界面吗?如果进入当前的操作记录可能丢失。
</div>
</div>
<div class="btn-box">
<div class="btn" @click="$emit('dialogClose')">取消</div>
<div class="btn" @click="$router.push({ path: '/' })">确定</div>
</div>
<!-- <img :src="data.url" alt=""> -->
<!-- <slot name="btn"></slot> -->
</div>
</div>
</template>
<script>
export default {
props: {
data: {
type: Object
}
}
}
</script>
<style lang="scss" scoped>
.btn-box{
width: 160px;
display: flex;
margin: 0 auto;
padding: 20px 0;
.btn{
cursor: pointer;
&:nth-child(1){
width: 60px;
height: 32px;
border-radius: 4px;
border: 1px solid #999999;
text-align: center;
line-height: 32px;
font-size: 14px;
color: #999999;
}
&:nth-child(2){
width: 60px;
height: 32px;
background: linear-gradient(312deg, rgba(192, 21, 64, 0.67) 0%, #C01540 100%);
border-radius: 4px;
color: #fff;
text-align: center;
line-height: 32px;
font-size: 14px;
margin-left: auto;
}
}
}
.dialog-box{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: rgba(0,0,0,.3);
z-index: 999;
.dialog-cont{
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
width: 480px;
// height: 264px;
background: #FFFFFF;
border-radius: 5px;
text-align: center;
.title{
max-width: 250px;
margin: 0 auto;
font-size: 18px;
color: #222222;
line-height: 20px;
padding: 20px 0;
font-weight: bold;
text-align: center;
}
.conts{
width: 440px;
border-top: 1px solid #f1f1f1;
border-bottom: 1px solid #f1f1f1;
margin: 0 auto;
padding: 40px 0;
.text{
text-align: left;
width: 300px;
height: 40px;
font-size: 14px;
color: #262626;
line-height: 20px;
margin: 0 auto;
}
}
}
}
.close{
cursor: pointer;
position: absolute;
top: 10px;
right: -50px;
font-size: 30px;
color: #fff;
}
</style>
import { uploadFile } from '@/api/common'
// import { uploadFile } from '@/api/common'
export default class MyUploadAdapter {
constructor(loader) {
......@@ -17,16 +17,16 @@ export default class MyUploadAdapter {
}
_sendRequest(resolve, reject, file) {
uploadFile({ file })
.then(response => {
if (response.success) {
resolve({ default: response.url })
} else {
return reject(response.message)
}
})
.catch(response => {
return reject(response.message)
})
// uploadFile({ file })
// .then(response => {
// if (response.success) {
// resolve({ default: response.url })
// } else {
// return reject(response.message)
// }
// })
// .catch(response => {
// return reject(response.message)
// })
}
}
......@@ -62,7 +62,9 @@ export default {
api
.updatePassword(this.ruleForm)
.then(response => {
this.$message({ message: '密码修改成功', type: 'success' })
if (response.code === 0) {
this.$message({ message: '密码修改成功', type: 'success' })
}
// 重置表单
this.$refs.ruleForm.resetFields()
})
......
......@@ -19,7 +19,7 @@
<div class="btn" v-else @click="intoForm">进入此用户群</div>
<div class="right-btn">
<div class="btn" @click="isCurrentCardShow = !isCurrentCardShow">当前案例背景</div>
<div class="btn" @click="goPage('/caseSelection')">切换案例背景</div>
<div class="btn" @click="isCaseDialogs = true">切换案例背景</div>
<div class="current-card">
<currentCard v-if="isCurrentCardShow" :data="cardData"/>
</div>
......@@ -33,10 +33,12 @@
<div class="dialogs-btn" @click="dialogEvent">确定</div>
</template>
</dialogs>
<caseDialogs v-if="isCaseDialogs" @dialogClose="caseDialogClose"></caseDialogs>
</app-container>
</template>
<script>
import caseDialogs from '@/components/caseDialog'
import AppContainer from '@/components/AppContainer'
import dialogs from '@/components/dialog'
import item from './components/item.vue'
......@@ -50,10 +52,12 @@ export default {
item,
currentCard,
formRadio,
dialogs
dialogs,
caseDialogs
},
data() {
return {
isCaseDialogs: false,
isCurrentCardShow: false,
isFormShow: false,
list: [],
......@@ -71,6 +75,9 @@ export default {
this.getCaseList()
},
methods: {
caseDialogClose() {
this.isCaseDialogs = false
},
dialogClose() {
this.isDialog = false
},
......
......@@ -32,7 +32,7 @@
<div class="btn" @click="stepConfirm">确定</div>
<div class="right-btn">
<div class="btn" @click="isCurrentCardShow = !isCurrentCardShow">当前案例背景</div>
<div class="btn" @click="goPage('/caseSelection')">切换案例背景</div>
<div class="btn" @click="isCaseDialogs = true">切换案例背景</div>
<div class="current-card">
<currentCard v-if="isCurrentCardShow" :data="cardData"/>
</div>
......@@ -55,11 +55,13 @@
</div>
</template>
</dialogs>
<caseDialogs v-if="isCaseDialogs" @dialogClose="caseDialogClose"></caseDialogs>
</app-container>
</div>
</template>
<script>
import caseDialogs from '@/components/caseDialog'
import AppContainer from '@/components/AppContainer'
import currentCard from '../groupAnalysis/components/currentCard'
import step1 from './components/step1'
......@@ -73,10 +75,12 @@ export default {
currentCard,
step1,
step2,
dialogs
dialogs,
caseDialogs
},
data() {
return {
isCaseDialogs: false,
isCurrentCardShow: false,
active: 0,
stepShow: true,
......@@ -101,6 +105,9 @@ export default {
this.getCaseList()
},
methods: {
caseDialogClose() {
this.isCaseDialogs = false
},
diaEvent() {
if (this.active === 0) {
this.active = 1
......
......@@ -36,6 +36,9 @@ httpRequest.interceptors.request.use(
httpRequest.interceptors.response.use(
function(response) {
const { data } = response
if (parseInt(data.code) === 1) {
return Message.error(data.msg)
}
if (data.code) {
if (data.code === 4001) {
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论