修改源邮件配置

This commit is contained in:
龙运模 2024-09-20 23:40:36 +08:00
parent 8e7f8f9bc9
commit 691140a13d
5 changed files with 57 additions and 12 deletions

View File

@ -32,6 +32,13 @@ export default {
post: async function (data) {
return await http.post(this.url, data);
},
},
configInfo:{
url: `${config.API_URL}/email.source.config.info`,
name: "源邮件获取数据同步模式",
post: async function (data) {
return await http.post(this.url, data);
},
}
},
k3:{

View File

@ -176,14 +176,17 @@
if (command == "clearCache") {
this.$confirm('清除缓存会将系统初始化,包括登录状态、主题、语言设置等,是否继续?', '警告', {
type: 'warning',
}).then(() => {
}).then(async () => {
const loading = this.$loading()
const res = await this.$API.system.user.logout.post();
if (res.code == 200) {
this.$TOOL.data.clear()
this.$router.replace({ path: '/login' })
this.$router.replace({path: '/login'});
setTimeout(() => {
loading.close()
location.reload()
}, 1000)
}
}).catch(() => {
//
})
@ -194,8 +197,11 @@
type: 'warning',
confirmButtonText: '退出',
confirmButtonClass: 'el-button--danger'
}).then(() => {
this.$router.replace({ path: '/login' });
}).then(async () => {
const res = await this.$API.system.user.logout.post();
if(res.code == 200){
this.$router.replace({path: '/login'});
}
}).catch(() => {
//退
})

View File

@ -46,7 +46,7 @@
<div class="btnItem">
<el-button type="danger" v-auth="'repairDelete'" :disabled="selection.length>0?false:true" plain icon="el-icon-delete" :size="size" @click="deleteEmailDetail"></el-button>
<el-button type="primary" v-auth="'mailBodyInfo'" plain :size="size" @click="seeEmail">查看原邮件</el-button>
<el-dropdown placement="bottom-start">
<el-dropdown placement="bottom-start" v-if="!is_auto_repair">
<el-button type="primary" v-auth="'repairConfirm'" :size="size">确认维保 <el-icon class="el-icon--right"><el-icon-ArrowDown/></el-icon></el-button>
<template #dropdown>
<el-dropdown-menu>
@ -55,6 +55,7 @@
</el-dropdown-menu>
</template>
</el-dropdown>
<el-button type="primary" disabled v-if="is_auto_repair" v-auth="'repairConfirm'" :size="size">自动同步</el-button>
</div>
</div>
</div>
@ -198,6 +199,7 @@ export default {
refreshShow:false,
syncText:"",
is_auto_repair:"", //
emailId:'',
searchShow:false,
searchData:{},
@ -269,6 +271,7 @@ export default {
},
mounted() {
this.getData();
this.getEmailConfig();
},
methods: {
customIndexMethod(index){
@ -280,6 +283,13 @@ export default {
return 'all-disabled'
}
},
async getEmailConfig() {
const res = await this.$API.setup.mail.configInfo.post();
if(res.code == 200){
this.is_auto_repair = res.data.is_auto_repair;
console.log(res.data)
}
},
async getData() {
this.listLoading = true;
const res = await this.$API.orders.order.mail.list.get(this.listParams);

View File

@ -96,8 +96,7 @@ export default {
flowList:[
{name:'新建/导入/同步邮件',left:false,right:true},
{name:'提交维保',left:true,right:true},
{name:'审核',left:true,right:true},
{name:'下发维保',left:true,right:false},
{name:'审核',left:true,right:false},
],
dialog: {
save: false,

View File

@ -8,6 +8,18 @@
<el-switch v-model="mail.active_status" :size="size"></el-switch>
</div>
</div>
<div class="headerBox">
<div class="boxItem">
<div class="name">维修数据同步模式</div>
<div class="boxView">
<el-radio-group :size="size" v-model="mail.is_auto_repair">
<el-radio :value="false">手动同步</el-radio>
<el-radio :value="true">自动同步</el-radio>
</el-radio-group>
</div>
</div>
<div class="msg">邮件数据同步到维保库的模式选择自动时无需在邮件明细操作反之则需手动同步</div>
</div>
<div class="mailMain">
<div class="title">获取数据源邮件地址</div>
<div class="item">
@ -48,6 +60,7 @@ export default {
loading:false,
mail:{
active_status:false,
is_auto_repair:true,
alias:'',
email:'',
client_id:'',
@ -97,6 +110,16 @@ export default {
margin-right: 10px;
}
}
.boxItem{
display: flex;align-items: center;
.boxView{
margin-left: 15px;
}
}
.msg{
color: var(--el-text-color-placeholder);
margin: 10px 0 20px 0;
}
}
.mailMain{
border-top: 1px solid #e8e8e8;