移除未使用引用
This commit is contained in:
parent
bacc55df0b
commit
845f0aca95
@ -7,10 +7,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { useFullscreen } from '@vueuse/core'
|
import { useFullscreen } from '@vueuse/core'
|
||||||
|
|
||||||
const { isFullscreen, enter, exit, toggle } = useFullscreen();
|
const { isFullscreen, enter, exit, toggle } = useFullscreen()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang="scss" scoped>
|
||||||
.screenfull-svg {
|
.screenfull-svg {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@ -16,8 +16,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ElMessage } from "element-plus";
|
|
||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const size = computed(() => store.getters.size);
|
const size = computed(() => store.getters.size);
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|||||||
@ -83,8 +83,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import variables from '@/assets/styles/variables.module.scss'
|
import variables from '@/assets/styles/variables.module.scss'
|
||||||
import originElementPlus from 'element-plus/theme-chalk/index.css'
|
import originElementPlus from 'element-plus/theme-chalk/index.css'
|
||||||
import axios from 'axios'
|
|
||||||
import { ElLoading, ElMessage } from 'element-plus'
|
|
||||||
import { useDynamicTitle } from '@/utils/dynamicTitle'
|
import { useDynamicTitle } from '@/utils/dynamicTitle'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|||||||
@ -14,29 +14,17 @@
|
|||||||
>
|
>
|
||||||
{{ tag.title }}
|
{{ tag.title }}
|
||||||
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
|
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
|
||||||
<close class="el-icon-close" style="width: 1em; height: 1em;vertical-align: middle;" />
|
<close class="el-icon-close" style="width: 1em; height: 1em; vertical-align: middle" />
|
||||||
</span>
|
</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</scroll-pane>
|
</scroll-pane>
|
||||||
<ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
|
<ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
|
||||||
<li @click="refreshSelectedTag(selectedTag)">
|
<li @click="refreshSelectedTag(selectedTag)"><refresh-right style="width: 1em; height: 1em" /> 刷新页面</li>
|
||||||
<refresh-right style="width: 1em; height: 1em;" /> 刷新页面
|
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><close style="width: 1em; height: 1em" /> 关闭当前</li>
|
||||||
</li>
|
<li @click="closeOthersTags"><circle-close style="width: 1em; height: 1em" /> 关闭其他</li>
|
||||||
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">
|
<li v-if="!isFirstView()" @click="closeLeftTags"><back style="width: 1em; height: 1em" /> 关闭左侧</li>
|
||||||
<close style="width: 1em; height: 1em;" /> 关闭当前
|
<li v-if="!isLastView()" @click="closeRightTags"><right style="width: 1em; height: 1em" /> 关闭右侧</li>
|
||||||
</li>
|
<li @click="closeAllTags(selectedTag)"><circle-close style="width: 1em; height: 1em" /> 全部关闭</li>
|
||||||
<li @click="closeOthersTags">
|
|
||||||
<circle-close style="width: 1em; height: 1em;" /> 关闭其他
|
|
||||||
</li>
|
|
||||||
<li v-if="!isFirstView()" @click="closeLeftTags">
|
|
||||||
<back style="width: 1em; height: 1em;" /> 关闭左侧
|
|
||||||
</li>
|
|
||||||
<li v-if="!isLastView()" @click="closeRightTags">
|
|
||||||
<right style="width: 1em; height: 1em;" /> 关闭右侧
|
|
||||||
</li>
|
|
||||||
<li @click="closeAllTags(selectedTag)">
|
|
||||||
<circle-close style="width: 1em; height: 1em;" /> 全部关闭
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -45,21 +33,21 @@
|
|||||||
import ScrollPane from './ScrollPane'
|
import ScrollPane from './ScrollPane'
|
||||||
import { getNormalPath } from '@/utils/ruoyi'
|
import { getNormalPath } from '@/utils/ruoyi'
|
||||||
|
|
||||||
const visible = ref(false);
|
const visible = ref(false)
|
||||||
const top = ref(0);
|
const top = ref(0)
|
||||||
const left = ref(0);
|
const left = ref(0)
|
||||||
const selectedTag = ref({});
|
const selectedTag = ref({})
|
||||||
const affixTags = ref([]);
|
const affixTags = ref([])
|
||||||
const scrollPaneRef = ref(null);
|
const scrollPaneRef = ref(null)
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance()
|
||||||
const store = useStore();
|
const store = useStore()
|
||||||
const route = useRoute();
|
const route = useRoute()
|
||||||
const router = useRouter();
|
const router = useRouter()
|
||||||
|
|
||||||
const visitedViews = computed(() => store.state.tagsView.visitedViews);
|
const visitedViews = computed(() => store.state.tagsView.visitedViews)
|
||||||
const routes = computed(() => store.state.permission.routes);
|
const routes = computed(() => store.state.permission.routes)
|
||||||
const theme = computed(() => store.state.settings.theme);
|
const theme = computed(() => store.state.settings.theme)
|
||||||
|
|
||||||
watch(route, () => {
|
watch(route, () => {
|
||||||
addTags()
|
addTags()
|
||||||
@ -81,11 +69,11 @@ function isActive(r) {
|
|||||||
return r.path === route.path
|
return r.path === route.path
|
||||||
}
|
}
|
||||||
function activeStyle(tag) {
|
function activeStyle(tag) {
|
||||||
if (!isActive(tag)) return {};
|
if (!isActive(tag)) return {}
|
||||||
return {
|
return {
|
||||||
"background-color": theme.value,
|
'background-color': theme.value,
|
||||||
"border-color": theme.value
|
'border-color': theme.value,
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
function isAffix(tag) {
|
function isAffix(tag) {
|
||||||
return tag.meta && tag.meta.affix
|
return tag.meta && tag.meta.affix
|
||||||
@ -106,14 +94,14 @@ function isLastView() {
|
|||||||
}
|
}
|
||||||
function filterAffixTags(routes, basePath = '') {
|
function filterAffixTags(routes, basePath = '') {
|
||||||
let tags = []
|
let tags = []
|
||||||
routes.forEach(route => {
|
routes.forEach((route) => {
|
||||||
if (route.meta && route.meta.affix) {
|
if (route.meta && route.meta.affix) {
|
||||||
const tagPath = getNormalPath(basePath + '/' + route.path)
|
const tagPath = getNormalPath(basePath + '/' + route.path)
|
||||||
tags.push({
|
tags.push({
|
||||||
fullPath: tagPath,
|
fullPath: tagPath,
|
||||||
path: tagPath,
|
path: tagPath,
|
||||||
name: route.name,
|
name: route.name,
|
||||||
meta: { ...route.meta }
|
meta: { ...route.meta },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (route.children) {
|
if (route.children) {
|
||||||
@ -126,8 +114,8 @@ function filterAffixTags(routes, basePath = '') {
|
|||||||
return tags
|
return tags
|
||||||
}
|
}
|
||||||
function initTags() {
|
function initTags() {
|
||||||
const res = filterAffixTags(routes.value);
|
const res = filterAffixTags(routes.value)
|
||||||
affixTags.value = res;
|
affixTags.value = res
|
||||||
for (const tag of res) {
|
for (const tag of res) {
|
||||||
// Must have tag name
|
// Must have tag name
|
||||||
if (tag.name) {
|
if (tag.name) {
|
||||||
@ -146,7 +134,7 @@ function moveToCurrentTag() {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
for (const r of visitedViews.value) {
|
for (const r of visitedViews.value) {
|
||||||
if (r.path === route.path) {
|
if (r.path === route.path) {
|
||||||
scrollPaneRef.value.moveToTarget(r);
|
scrollPaneRef.value.moveToTarget(r)
|
||||||
// when query is different then update
|
// when query is different then update
|
||||||
if (r.fullPath !== route.fullPath) {
|
if (r.fullPath !== route.fullPath) {
|
||||||
store.dispatch('tagsView/updateVisitedView', route)
|
store.dispatch('tagsView/updateVisitedView', route)
|
||||||
@ -156,7 +144,7 @@ function moveToCurrentTag() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function refreshSelectedTag(view) {
|
function refreshSelectedTag(view) {
|
||||||
proxy.$tab.refreshPage(view);
|
proxy.$tab.refreshPage(view)
|
||||||
console.log(view)
|
console.log(view)
|
||||||
}
|
}
|
||||||
function closeSelectedTag(view) {
|
function closeSelectedTag(view) {
|
||||||
@ -167,28 +155,28 @@ function closeSelectedTag(view) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function closeRightTags() {
|
function closeRightTags() {
|
||||||
proxy.$tab.closeRightPage(selectedTag.value).then(visitedViews => {
|
proxy.$tab.closeRightPage(selectedTag.value).then((visitedViews) => {
|
||||||
if (!visitedViews.find(i => i.fullPath === route.fullPath)) {
|
if (!visitedViews.find((i) => i.fullPath === route.fullPath)) {
|
||||||
toLastView(visitedViews)
|
toLastView(visitedViews)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function closeLeftTags() {
|
function closeLeftTags() {
|
||||||
proxy.$tab.closeLeftPage(selectedTag.value).then(visitedViews => {
|
proxy.$tab.closeLeftPage(selectedTag.value).then((visitedViews) => {
|
||||||
if (!visitedViews.find(i => i.fullPath === route.fullPath)) {
|
if (!visitedViews.find((i) => i.fullPath === route.fullPath)) {
|
||||||
toLastView(visitedViews)
|
toLastView(visitedViews)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function closeOthersTags() {
|
function closeOthersTags() {
|
||||||
router.push(selectedTag.value).catch(() => { });
|
router.push(selectedTag.value).catch(() => {})
|
||||||
proxy.$tab.closeOtherPage(selectedTag.value).then(() => {
|
proxy.$tab.closeOtherPage(selectedTag.value).then(() => {
|
||||||
moveToCurrentTag()
|
moveToCurrentTag()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function closeAllTags(view) {
|
function closeAllTags(view) {
|
||||||
proxy.$tab.closeAllPage().then(({ visitedViews }) => {
|
proxy.$tab.closeAllPage().then(({ visitedViews }) => {
|
||||||
if (affixTags.value.some(tag => tag.path === route.path)) {
|
if (affixTags.value.some((tag) => tag.path === route.path)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
toLastView(visitedViews, view)
|
toLastView(visitedViews, view)
|
||||||
@ -234,7 +222,7 @@ function handleScroll() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang="scss" scoped>
|
||||||
.tags-view-container {
|
.tags-view-container {
|
||||||
height: 34px;
|
height: 34px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -266,7 +254,7 @@ function handleScroll() {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border-color: #42b983;
|
border-color: #42b983;
|
||||||
&::before {
|
&::before {
|
||||||
content: "";
|
content: '';
|
||||||
background: #fff;
|
background: #fff;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 8px;
|
width: 8px;
|
||||||
|
|||||||
@ -1,9 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row>
|
<el-form class="mt10" ref="formRef" :model="form" label-width="110px" :rules="rules">
|
||||||
<el-form class="mt10" ref="formRef" :model="form" label-width="110px" :rules="rules" style="width:600px">
|
<el-form-item
|
||||||
<el-form-item v-for="(domain, index) in form.toEmails" :prop="'toEmails.' + index + '.value'" :label="'收件邮箱' + (index === 0 ? '': index)"
|
v-for="(domain, index) in form.toEmails"
|
||||||
|
:prop="'toEmails.' + index + '.value'"
|
||||||
|
:label="'收件邮箱' + (index === 0 ? '' : index)"
|
||||||
:key="domain.key"
|
:key="domain.key"
|
||||||
:rules="[{ required: true, message: '邮箱不能为空', trigger: 'blur' }, { message: '请输入正确的邮箱地址', trigger: ['blur', 'change'], type: 'email', }]">
|
:rules="[
|
||||||
|
{ required: true, message: '邮箱不能为空', trigger: 'blur' },
|
||||||
|
{ message: '请输入正确的邮箱地址', trigger: ['blur', 'change'], type: 'email' },
|
||||||
|
]"
|
||||||
|
>
|
||||||
<el-input v-model="domain.value" style="width: 300px"></el-input>
|
<el-input v-model="domain.value" style="width: 300px"></el-input>
|
||||||
<el-button class="ml10" @click="addDomain" icon="plus" />
|
<el-button class="ml10" @click="addDomain" icon="plus" />
|
||||||
<el-button class="ml10" @click.prevent="removeDomain(domain)" icon="minus" />
|
<el-button class="ml10" @click.prevent="removeDomain(domain)" icon="minus" />
|
||||||
@ -18,19 +24,16 @@
|
|||||||
<el-switch v-model="form.sendMe" active-text="是" inactive-text="否"></el-switch>
|
<el-switch v-model="form.sendMe" active-text="是" inactive-text="否"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<UploadFile v-model="form.fileUrl" :limit="5" :fileSize="15" :data="{ 'fileDir' : 'email', 'uploadType': 1}" column="fileUrl"
|
<UploadFile v-model="form.fileUrl" :limit="5" :fileSize="15" :data="{ fileDir: 'email', uploadType: 1 }" />
|
||||||
@input="uploadSuccess" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="formSubmit">发送邮件</el-button>
|
<el-button type="primary" @click="formSubmit">发送邮件</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
|
||||||
</template>
|
</template>
|
||||||
<script setup name="sendEmail">
|
<script setup name="sendEmail">
|
||||||
import { sendEmail } from '@/api/common'
|
import { sendEmail } from '@/api/common'
|
||||||
import Editor from '@/components/Editor'
|
import Editor from '@/components/Editor'
|
||||||
import { getCurrentInstance, reactive, ref, toRefs } from 'vue-demi'
|
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {
|
form: {
|
||||||
@ -42,14 +45,13 @@ const data = reactive({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
uploadActionUrl: import.meta.env.VITE_APP_BASE_API + '/common/uploadFile',
|
|
||||||
rules: {
|
rules: {
|
||||||
subject: [{ required: true, message: '主题不能为空', trigger: 'blur' }],
|
subject: [{ required: true, message: '主题不能为空', trigger: 'blur' }],
|
||||||
content: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
|
content: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const { form, rules, uploadActionUrl } = toRefs(data)
|
const { form, rules } = toRefs(data)
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const formRef = ref(null)
|
const formRef = ref(null)
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
@ -69,10 +71,6 @@ function reset() {
|
|||||||
}
|
}
|
||||||
proxy.resetForm('formRef')
|
proxy.resetForm('formRef')
|
||||||
}
|
}
|
||||||
// 上传成功
|
|
||||||
function uploadSuccess(columnName, filelist) {
|
|
||||||
form.value[columnName] = filelist
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交
|
* 提交
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user