Commit 745591f8 authored by 黄奎's avatar 黄奎

111

parents 9bc9541a 2e29e609
export const domainManager = () => { export const domainManager = () => {
const locationName = window.location.hostname const locationName = window.location.hostname
const obj = { const obj = {
domainUrl: locationName.indexOf('oytour') !== -1 ? "https://reborn.oytour.com/api/common/post" : "http://192.168.10.214/api/common/post", domainUrl: locationName.indexOf('oytour') !== -1 ? "https://reborn.oytour.com/api/common/post" : "http://192.168.5.46/api/common/post",
//上传站点 //上传站点
UploadUrl: locationName.indexOf('oytour') !== -1 ? "https://upload.oytour.com" : "http://192.168.5.46:8120", UploadUrl: locationName.indexOf('oytour') !== -1 ? "https://upload.oytour.com" : "http://192.168.5.46:8120",
//文件站点 //文件站点
ViittoFileUrl: locationName.indexOf('oytour') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.10.214:8130', ViittoFileUrl: locationName.indexOf('oytour') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.5.46:8130',
// 通知erp // 通知erp
notificationUrl: locationName.indexOf('oytour') !== -1 ? "http://yx.oytour.com" : "http://localhost:8081", notificationUrl: locationName.indexOf('oytour') !== -1 ? "http://yx.oytour.com" : "http://localhost:8081",
// 文件下载地址
DownloadUrl: locationName.indexOf('oytour') !== -1 ? "https://reborn.oytour.com" : "http://192.168.5.46",
} }
return obj return obj
} }
\ No newline at end of file
<template> <template>
<el-dialog v-model="show" title="邀请成员" style="width:744px;" @close="closed" class="bold-head q-pa-none"> <el-dialog v-model="show" title="邀请成员" style="width:744px;" @close="closed" class="bold-head q-pa-none">
<div class="row" style="height: 440px;"> <div class="row" style="min-height: 440px;">
<div class="q-pa-md full-height" style="width:164px; border-right: 1px solid #f1f2f4;"> <div class="q-pa-md full-height" style="width:164px; border-right: 1px solid #f1f2f4;">
<el-menu class="no-border md-menu" :default-active="currentMenu"> <el-menu class="no-border md-menu" :default-active="currentMenu">
<el-menu-item index="1" @click="currentMenu = '1'">邀请成员</el-menu-item> <el-menu-item index="1" @click="currentMenu = '1'">邀请成员</el-menu-item>
...@@ -75,6 +75,44 @@ ...@@ -75,6 +75,44 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-model="dialogVisible" title="导入成员名单提示" width="500" @close="closeUploadRes">
<div class="row">
<div>
<el-alert show-icon title="人员总数" type="info" :closable="false">
<i class="el-icon-coin"></i>
<span>{{UploadResults.totalNum}}</span>
</el-alert>
</div>
<div class="q-px-md">
<el-alert show-icon title="成功人数" type="success" :closable="false">
<i class="el-icon-coin"></i>
<span>{{UploadResults.successNum}}</span>
</el-alert>
</div>
<div>
<el-alert show-icon title="失败人数" type="warning" :closable="false">
<i class="el-icon-coin"></i>
<span class="row">
<span>{{UploadResults.failNum}}</span>
<span class="col text-primary row items-center cusor-pointer q-ml-md"
@click="goDownload(1)">
<IconToBottom size="16" class="q-mr-sm"></IconToBottom>
<span>下载失败数据</span>
</span>
</span>
</el-alert>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
<!-- <el-button type="primary" @click="dialogVisible = false">
确定
</el-button> -->
</div>
</template>
</el-dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -87,6 +125,7 @@ import { ElMessage } from "element-plus" ...@@ -87,6 +125,7 @@ import { ElMessage } from "element-plus"
import { storeToRefs } from "pinia" import { storeToRefs } from "pinia"
import { ref, unref } from "vue" import { ref, unref } from "vue"
import { domainManager } from '@/utils/domainManager' import { domainManager } from '@/utils/domainManager'
import { ElAlert } from 'element-plus';
const props = defineProps({ const props = defineProps({
showType: { showType: {
...@@ -107,11 +146,20 @@ const popoverRef = ref() ...@@ -107,11 +146,20 @@ const popoverRef = ref()
const copyLoading = ref(false) const copyLoading = ref(false)
const useUser = useUserStore() const useUser = useUserStore()
const { userInfo } = storeToRefs(useUser) const { userInfo } = storeToRefs(useUser)
const dialogVisible = ref(false)
const UploadResults = ref({} as any)
const closeUploadRes = () => {
UploadResults.value = {}
}
const closed = () => { const closed = () => {
emit('close') emit('close')
} }
const goDownload = (type:any) =>{
if(type==1) window.open(UploadResults.value.DownloadUrl)
else window.open(UploadResults.value.DownloadUrl)
}
//导入文件地址 //导入文件地址
const getUploadActionUrl=()=>{ const getUploadActionUrl=()=>{
let uid=userInfo.value.id; let uid=userInfo.value.id;
...@@ -120,11 +168,16 @@ const getUploadActionUrl=()=>{ ...@@ -120,11 +168,16 @@ const getUploadActionUrl=()=>{
} }
const handleAvatarSuccess=async (res:any)=>{ const handleAvatarSuccess=async (res:any)=>{
if(res.resultCode==0){
UploadResults.value = res.data
UploadResults.value.DownloadUrl = domainManager().DownloadUrl.replace("common","file")+`${res.data.failUrl}`
}
console.log("handleAvatarSuccess_res",res); console.log("handleAvatarSuccess_res",res);
} }
const beforeAvatarUpload=async (res:any)=>{ const beforeAvatarUpload=async (res:any)=>{
console.log("beforeAvatarUpload_res",res); console.log("beforeAvatarUpload_res",res);
dialogVisible.value = true
} }
const copyInviteUrlHandler = async (e: MouseEvent) => { const copyInviteUrlHandler = async (e: MouseEvent) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment