Przeglądaj źródła

banner图片 bug修改,email

asd26269546 2 lat temu
rodzic
commit
0cbfb824a0

BIN
src/assets/images/banner1.png


+ 6 - 0
src/router/index.js

@@ -318,6 +318,12 @@ const routes = [{
 				name: '邮件详情',
 				component: () => import('../views/email/mailDtl.vue')
 			},
+			{
+				path: 'write',
+				name: '写邮件',
+				component: () => import('../views/email/write.vue')
+			},
+
 			
 		]
 	},

+ 3 - 5
src/views/email/inbox.vue

@@ -104,11 +104,9 @@ const onClickLeft = () => {
 
 const onClickRight = () => {
 	proxy.$router.push({
-		path: 'procureListAdd',
-		query: {
-			ids: JSON.stringify(ids),
-		},
-	})
+		path: 'write',
+		query: {},
+	}) 
 }
 
 const toDtl = (row) => {

+ 53 - 2
src/views/email/mailDtl.vue

@@ -30,11 +30,11 @@
             <li>
                 <span class="label">附&nbsp;&nbsp;&nbsp;件</span>
                 <span class="value">{{mailData.sendDate}}</span>
-            </li>
+            </li> 
         </ul>
         <div class="content" v-html="mailData.content"></div>
         <div class="flie-list">
-            <div class="title">附件列表</div>
+            <div class="title">附 件</div>
             <div class="list">
                 <div class="item" v-for="i in mailData.messageAttachmentList" :key="i.id">
                     <div class="icon">
@@ -95,6 +95,57 @@ onMounted(() => {
             font-size: 16px;
             font-weight: 500;
         }
+        .flie-list{
+            padding: 0 12px;
+            .title{
+                padding: 20px 0 12px;
+                font-size: 16px;
+                font-weight: 500;
+            }
+            .list{
+                .item{
+                    display: flex;
+                    align-items: center;
+                    padding: 12px 0;
+                    border-bottom: 1px solid #ddd;
+                    .icon{
+                        width: 40px;
+                        height: 40px;
+                        border-radius: 50%;
+                        background: #f5f5f5;
+                        display: flex;
+                        align-items: center;
+                        justify-content: center;
+                        i{
+                            font-size: 20px;
+                            color: #999;
+                        }
+                    }
+                    .text{
+                        flex: 1;
+                        padding: 0 12px;
+                        .name{
+                            font-size: 14px;
+                            color: #333;
+                        }
+                        .size{
+                            font-size: 12px;
+                            color: #999;
+                        }
+                    }
+                    .btn{
+                        width: 80px;
+                        height: 32px;
+                        line-height: 32px;
+                        text-align: center;
+                        border-radius: 16px;
+                        background: #f5f5f5;
+                        color: #999;
+                        font-size: 12px;
+                    }
+                }
+            }
+        }
         ul{
             padding: 0 12px 8px;
             border-bottom: 1px solid #ddd;

+ 337 - 0
src/views/email/write.vue

@@ -0,0 +1,337 @@
+<template>
+	<div class="write">
+		<van-nav-bar
+			title="写邮件"
+			left-text=""
+			left-arrow
+			@click-left="onClickLeft"
+			right-text="发送"
+			@click-right="onClickRight"
+		>
+		</van-nav-bar>
+		<div class="write-letters">
+			<div class="chaosong-box">
+				<div class="chaosong">
+					<div class="label">收件人:</div>
+					<ul style="border-bottom: none">
+						<li v-for="(i, index) in formData.to" :key="i.address">
+							{{ i.address }}
+							<van-icon
+								@click="formData.to.splice(index, 1)"
+								name="cross"
+							/>
+						</li>
+						<input
+							placeholder="请输入邮箱"
+							@keydown.enter="shoujianEnter('to')"
+							type="text"
+							v-model="formData.toInput"
+						/>
+					</ul>
+					<div class="more" @click="ccOrbccType = true" v-if="!ccOrbccType">
+						抄送/密送
+					</div>
+				</div>
+			</div>
+			<div class="chaosong-box" v-if="ccOrbccType">
+				<div class="chaosong">
+					<div class="label">抄送</div>
+					<ul style="border-bottom: none">
+						<li v-for="(i, index) in formData.cc" :key="i.address">
+							{{ i.address }}
+							<van-icon
+								@click="formData.to.splice(index, 1)"
+								name="cross"
+							/>
+						</li>
+						<input
+							placeholder="请输入邮箱"
+							@keydown.enter="shoujianEnter('cc')"
+							type="text"
+							v-model="formData.ccInput"
+						/>
+					</ul>
+				</div>
+			</div>
+			<div class="chaosong-box" v-if="ccOrbccType">
+				<div class="chaosong">
+					<div class="label">密送</div>
+					<ul style="border-bottom: none">
+						<li v-for="(i, index) in formData.bcc" :key="i.address">
+							{{ i.address }}
+							<van-icon
+								@click="formData.to.splice(index, 1)"
+								name="cross"
+							/>
+						</li>
+						<input
+							placeholder="请输入邮箱"
+							@keydown.enter="shoujianEnter('bcc')"
+							type="text"
+							v-model="formData.bccInput"
+						/>
+					</ul>
+				</div>
+			</div>
+		</div>
+		<div class="sender"  @click="showPicker = true">
+			<div class="label">
+				发件人
+			</div>
+			<div class="center-text">
+                {{selectMailData.text || selectMailData.receiveHost || '请选择邮箱'}}
+            </div>
+            <div class="right-box right-text more">
+                <i class="iconfont icon-iconm_xialan1"></i>
+            </div>
+		</div>
+		<van-popup v-model:show="showPicker" round position="bottom">
+            <van-picker
+                :columns="columns"
+                @cancel="showPicker = false"
+                @confirm="onConfirm"
+            />
+        </van-popup>
+		<div class="subject">
+			<div class="label">主题</div>
+			<input
+				placeholder="请输入主题"
+				type="text"
+				v-model="formData.subject"
+			/>
+		</div>
+		<div class="content">
+			
+			<textarea
+				placeholder="请输入正文"
+				type="text"
+				rows='4'
+				v-model="formData.content"
+			/>
+		</div>
+	</div>
+</template>
+<script setup>
+import { ref, getCurrentInstance, onMounted } from 'vue'
+import commonList from '@/components/common-list.vue'
+import { useRoute } from 'vue-router'
+import { getUserInfo } from '@/utils/auth'
+const loading = ref(false)
+const router = useRoute()
+const proxy = getCurrentInstance().proxy
+const shoujianModal = ref(false)
+const searchListData2 = ref([])
+const ccOrbccType = ref(false)
+const onClickLeft = () => {
+	proxy.$router.go(-1)
+}
+
+let formData = ref({
+	to: [],
+	mailboxId: '',
+	type: 1,
+	cc:[],
+	bcc:[],
+	replyTo:[],
+	subject:null,
+	content:'',
+	fileList:[],
+	toInput:null,
+	ccInput:null,
+	bccInput:null,
+})
+const showPicker = ref(false)
+let columns = ref([])
+let selectMailData = ref({})
+const onConfirm = ({ selectedOptions }) => {
+    showPicker.value = false;
+    selectMailData.value = selectedOptions[0];
+	formData.value.mailboxId = selectedOptions[0].id
+	formData.value.type = selectedOptions[0].type
+};
+const getUserEmailList = () => {
+    proxy.post('/mailInfo/getUserEmailList',{
+        id:getUserInfo().userId
+    }).then(res => {
+        columns.value = res.data.map(item => {
+            return {
+                ...item,
+                text:item.receiveHost,
+                value:item.id
+            }
+        })
+        if(res.data.length > 0) {
+            selectMailData.value = res.data[0]
+			formData.value.mailboxId = res.data[0].id
+			formData.value.type = res.data[0].type
+        }
+        console.log(columns)
+    })
+}
+getUserEmailList()
+
+const shoujianEnter = (type) => {
+	
+	var patt = /^([a-zA-Z\d])(\w|\-)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/
+	formData.value[type + 'Input'].search(patt)
+	if (formData.value[type + 'Input'].search(patt) == 0) {
+		formData.value[type].push({
+			address:formData.value[type + 'Input'],
+			personal:null,
+		})
+		formData.value[type + 'Input'] = null
+	} else {
+		formData.value[type + 'Input'] = null
+	}
+    console.log(formData.value)
+}
+
+
+let mailData = ref({})
+
+const getMessageDetail = () => {
+	proxy
+		.post('/mailService/getMessageDetail', {
+			messageId: router.query.id,
+			type: router.query.type,
+		})
+		.then((res) => {
+			console.log(res)
+			mailData.value = res.data
+		})
+}
+
+const onClickRight = () => {
+	console.log(formData.value)
+	proxy
+		.post('/mailService/sendMail', {
+			...formData.value,
+		})
+		.then((res) => {
+			console.log(res)
+			if (res.code == 200) {
+				proxy.$toast.success('发送成功')
+				proxy.$router.go(-1)
+			} else {
+				proxy.$toast.fail(res.msg)
+			}
+		})
+}
+
+onMounted(() => {
+	console.log(router)
+})
+</script>
+<style lang="scss">
+.write {
+	background: #fff;
+	.content{
+		padding: 20px 12px;
+		textarea{
+			width: 100%;
+			border: none;
+			outline: none;
+			resize: none;
+		}
+	}
+	.subject{
+		height: 50px;
+		line-height: 50px;
+		display: flex;
+		padding: 0 12px;
+		border-bottom: 1px solid #ddd;
+		.label{
+			width: 60px;
+		}
+		input{
+			flex: 1;
+			border: none;
+			outline: none;
+		}
+	}
+	.sender{
+		height: 50px;
+		line-height: 50px;
+		display: flex;
+		justify-content: space-between;
+		padding: 0 12px;
+		.center-text{
+			flex: 1;
+		}
+		.label{
+			width: 60px;
+		}
+	}
+	.write-letters {
+		.chaosong {
+			padding: 0 12px;
+			line-height: 50px;
+			border-bottom: 1px solid #ddd;
+			position: relative;
+			display: flex;
+			.more{
+				width: 78px;
+				text-align: center;
+				line-height: 52px;
+				color:#999999;
+				position: absolute;
+				right: 0;
+				top: 0;
+
+			}
+			.add {
+				float: right;
+				i {
+					color: #487cff;
+				}
+			}
+			input {
+				height: 34px;
+				background: none;
+				width: 120px;
+				padding: 0 2px;
+				border: none;
+				font-size: 12px;
+				z-index: 1000;
+				float: left;
+			}
+			.label{
+				width: 60px;
+			}
+			ul {
+				position: relative;
+				width: calc(100% - 60px);
+				padding: 8px 0;
+				line-height: 28px;
+				.add {
+					position: absolute;
+					right: 12px;
+					top: 12px;
+					font-size: 20px;
+					i {
+						color: #487cff;
+					}
+				}
+				li {
+					margin: 4px 4px 4px 10px;
+					height: 28px;
+					
+					display: block;
+					float: left;
+					color: #333333;
+					background: #ddd;
+					text-align: center;
+					padding: 0 10px;
+					line-height: 28px;
+					border-radius: 14px;
+					font-size: 12px;
+					font-weight: 400;
+				}
+			}
+		}
+		position: relative;
+
+		
+	}
+}
+</style>

+ 13 - 2
src/views/login.vue

@@ -28,6 +28,7 @@
 				placeholder="请输入密码"
 				:rules="[{ required: true, message: '请填写密码' }]"
 			/>
+			
 			<van-form @submit="onSubmit">
 				<van-cell-group inset>
 					
@@ -37,12 +38,18 @@
 						提交
 					</van-button>
 				</div>
+				<div class="check-warp" style="text-align:left;justify-content:left;">
+					<div class="check-icon-warp">
+						<van-checkbox icon-size="16px" v-model="rememberMe"></van-checkbox>
+					</div>
+					记住密码
+				</div>
 			</van-form>
 		</div>
 		<div class="login-btn">
 			<div class="check-warp">
 				<div class="check-icon-warp">
-					<van-checkbox icon-size="16px" v-model="rememberMe"></van-checkbox>
+					<van-checkbox icon-size="16px" v-model="clause"></van-checkbox>
 				</div>
 				{{ $t('login.agreement.text') }}
 				<span>{{ $t('login.agreement.clause') }}</span>
@@ -80,6 +87,10 @@
 	}
 	.login-btn{
 		font-size: 12px;
+		position: fixed;
+		bottom: 50px;
+		left: 0;
+		right: 0;
 	}
 	.van-cell{
 		border: 5px;
@@ -124,6 +135,7 @@ const loginForm = ref({
 	uuid: '',
 })
 const rememberMe = ref(false)
+const clause = ref(false)
 
 const radioChange = () => {
 	console.log(loginForm.rememberMe)
@@ -131,7 +143,6 @@ const radioChange = () => {
 };
 
 const onSubmit = () => {
-	
 	proxy.post('login', loginForm.value,'post',{tenantId:loginForm.value.tenantId}).then((res) => {
 		console.log(res)
 		if(res.code == 200) {

+ 7 - 1
src/views/working/index.vue

@@ -1,7 +1,9 @@
 <template>
   <div class="working">
     <van-swipe class="my-swipe" indicator-color="white">
-      <van-swipe-item @click="toWinfaster">官网</van-swipe-item>
+      <van-swipe-item @click="toWinfaster">
+        <img src="../../assets/images/banner1.png" alt="">
+      </van-swipe-item>
       <van-swipe-item>2</van-swipe-item>
 
     </van-swipe>
@@ -88,6 +90,10 @@ const handleGo = (type) => {
       height: 150px;
       text-align: center;
       line-height: 150px;
+      img{
+        width: 100%;
+        height: 100%;
+      }        
     }
   }
   .card {