登录页面样式修改
This commit is contained in:
parent
956e25ef01
commit
faa5c97def
@ -4,7 +4,7 @@ NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://192.168.0.172:48080'
|
VITE_BASE_URL='http://192.168.0.74:48080'
|
||||||
# VITE_BASE_URL='http://192.168.0.189:48080'
|
# VITE_BASE_URL='http://192.168.0.189:48080'
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB |
BIN
src/assets/login-bg.png
Normal file
BIN
src/assets/login-bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 MiB |
Binary file not shown.
Before Width: | Height: | Size: 29 KiB |
@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
:class="prefixCls"
|
:class="prefixCls"
|
||||||
class="relative h-[100%] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px lt-xl:px-10px"
|
class="relative h-[100%] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px lt-xl:px-10px login-page"
|
||||||
>
|
>
|
||||||
<div class="relative mx-auto h-full flex">
|
<div class="relative mx-auto h-full flex">
|
||||||
<div
|
<div
|
||||||
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden overflow-x-hidden overflow-y-auto`"
|
:class="`${prefixCls}__left flex-1 bg-opacity-20 relative p-30px lt-xl:hidden overflow-x-hidden overflow-y-auto`"
|
||||||
>
|
>
|
||||||
<!-- 左上角的 logo + 系统标题 -->
|
<!-- 左上角的 logo + 系统标题 -->
|
||||||
<div class="relative flex items-center text-white">
|
<!-- <div class="relative flex items-center text-white">
|
||||||
<img alt="" class="mr-10px h-48px w-48px" src="@/assets/imgs/logo.png" />
|
<img alt="" class="mr-10px h-48px w-48px" src="@/assets/imgs/logo.png" />
|
||||||
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
|
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
|
||||||
</div>
|
</div> -->
|
||||||
<!-- 左边的背景图 + 欢迎语 -->
|
<!-- 左边的背景图 + 欢迎语 -->
|
||||||
<div class="h-[calc(100%-60px)] flex items-center justify-center">
|
<!-- <div class="h-[calc(100%-60px)] flex items-center justify-center">
|
||||||
<TransitionGroup
|
<TransitionGroup
|
||||||
appear
|
appear
|
||||||
enter-active-class="animate__animated animate__bounceInLeft"
|
enter-active-class="animate__animated animate__bounceInLeft"
|
||||||
@ -25,25 +25,25 @@
|
|||||||
{{ t('login.message') }}
|
{{ t('login.message') }}
|
||||||
</div>
|
</div>
|
||||||
</TransitionGroup>
|
</TransitionGroup>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px overflow-x-hidden overflow-y-auto"
|
class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px overflow-x-hidden overflow-y-auto"
|
||||||
>
|
>
|
||||||
<!-- 右上角的主题、语言选择 -->
|
<!-- 右上角的主题、语言选择 -->
|
||||||
<div
|
<!-- <div
|
||||||
class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end"
|
class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end"
|
||||||
style="color: var(--el-text-color-primary);"
|
style="color: var(--el-text-color-primary)"
|
||||||
>
|
>
|
||||||
<div class="flex items-center at-2xl:hidden at-xl:hidden">
|
<div class="flex items-center at-2xl:hidden at-xl:hidden">
|
||||||
<img alt="" class="mr-10px h-48px w-48px" src="@/assets/imgs/logo.png" />
|
<img alt="" class="mr-10px h-48px w-48px" src="@/assets/imgs/logo.png" />
|
||||||
<span class="text-20px font-bold" >{{ underlineToHump(appStore.getTitle) }}</span>
|
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-end space-x-10px h-48px">
|
<div class="flex items-center justify-end space-x-10px h-48px">
|
||||||
<ThemeSwitch />
|
<ThemeSwitch />
|
||||||
<LocaleDropdown />
|
<LocaleDropdown />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<!-- 右边的登录界面 -->
|
<!-- 右边的登录界面 -->
|
||||||
<Transition appear enter-active-class="animate__animated animate__bounceInRight">
|
<Transition appear enter-active-class="animate__animated animate__bounceInRight">
|
||||||
<div
|
<div
|
||||||
@ -106,7 +106,7 @@ $prefix-cls: #{$namespace}-login;
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.dark .login-form {
|
.dark .login-form {
|
||||||
.el-divider__text {
|
.el-divider__text {
|
||||||
background-color: var(--login-bg-color);
|
background-color: var(--login-bg-color);
|
||||||
@ -116,4 +116,16 @@ $prefix-cls: #{$namespace}-login;
|
|||||||
background-color: var(--login-bg-color);
|
background-color: var(--login-bg-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.login-page {
|
||||||
|
background-image: url('@/assets/login-bg.png');
|
||||||
|
/* 让背景图片覆盖整个元素 */
|
||||||
|
background-size: cover;
|
||||||
|
/* 让背景图片居中显示 */
|
||||||
|
background-position: center;
|
||||||
|
/* 禁止背景图片重复 */
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
/* 设置元素的宽度和高度为视口的宽度和高度 */
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -4,18 +4,19 @@
|
|||||||
ref="formLogin"
|
ref="formLogin"
|
||||||
:model="loginData.loginForm"
|
:model="loginData.loginForm"
|
||||||
:rules="LoginRules"
|
:rules="LoginRules"
|
||||||
class="login-form"
|
|
||||||
label-position="top"
|
label-position="top"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
size="large"
|
size="large"
|
||||||
>
|
>
|
||||||
<el-row style="margin-right: -10px; margin-left: -10px">
|
<el-row>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<LoginFormTitle style="width: 100%" />
|
<LoginFormTitle style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<div class="login-form">
|
||||||
|
<div class="login-tip">欢迎登录</div>
|
||||||
|
<el-col :span="24">
|
||||||
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
|
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginData.loginForm.tenantName"
|
v-model="loginData.loginForm.tenantName"
|
||||||
@ -26,7 +27,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24">
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginData.loginForm.username"
|
v-model="loginData.loginForm.username"
|
||||||
@ -35,7 +36,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24">
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginData.loginForm.password"
|
v-model="loginData.loginForm.password"
|
||||||
@ -47,10 +48,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col
|
<el-col :span="24" style="margin-top: -10px; margin-bottom: 20px">
|
||||||
:span="24"
|
|
||||||
style="padding-right: 10px; padding-left: 10px; margin-top: -20px; margin-bottom: -20px"
|
|
||||||
>
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-row justify="space-between" style="width: 100%">
|
<el-row justify="space-between" style="width: 100%">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -58,13 +56,17 @@
|
|||||||
{{ t('login.remember') }}
|
{{ t('login.remember') }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!--
|
||||||
|
忘记密码
|
||||||
<el-col :offset="6" :span="12">
|
<el-col :offset="6" :span="12">
|
||||||
<el-link style="float: right" type="primary">{{ t('login.forgetPassword') }}</el-link>
|
<el-link style="float: right" type="primary">{{
|
||||||
</el-col>
|
t('login.forgetPassword')
|
||||||
|
}}</el-link>
|
||||||
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<XButton
|
<XButton
|
||||||
:loading="loginLoading"
|
:loading="loginLoading"
|
||||||
@ -82,7 +84,9 @@
|
|||||||
mode="pop"
|
mode="pop"
|
||||||
@success="handleLogin"
|
@success="handleLogin"
|
||||||
/>
|
/>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
</div>
|
||||||
|
<!--
|
||||||
|
<el-col :span="24" >
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-row :gutter="5" justify="space-between" style="width: 100%">
|
<el-row :gutter="5" justify="space-between" style="width: 100%">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -110,7 +114,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider content-position="center">{{ t('login.otherLogin') }}</el-divider>
|
<el-divider content-position="center">{{ t('login.otherLogin') }}</el-divider>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" >
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="w-[100%] flex justify-between">
|
<div class="w-[100%] flex justify-between">
|
||||||
<Icon
|
<Icon
|
||||||
@ -126,7 +130,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider content-position="center">萌新必读</el-divider>
|
<el-divider content-position="center">萌新必读</el-divider>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" >
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="w-[100%] flex justify-between">
|
<div class="w-[100%] flex justify-between">
|
||||||
<el-link href="https://doc.iocoder.cn/" target="_blank">📚开发指南</el-link>
|
<el-link href="https://doc.iocoder.cn/" target="_blank">📚开发指南</el-link>
|
||||||
@ -139,7 +143,7 @@
|
|||||||
</el-link>
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
@ -352,4 +356,26 @@ onMounted(() => {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 40px 42px 32px 42px;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
.login-tip {
|
||||||
|
margin-bottom: 28px;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #0d162a;
|
||||||
|
line-height: 22px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<h2 class="enter-x mb-3 text-center text-2xl font-bold xl:text-center xl:text-3xl">
|
<h2 class="form-title">
|
||||||
{{ getFormTitle }}
|
<!-- {{ getFormTitle }} -->
|
||||||
|
RCS智能设备调度系统
|
||||||
</h2>
|
</h2>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -24,3 +25,11 @@ const getFormTitle = computed(() => {
|
|||||||
return titleObj[unref(getLoginState)]
|
return titleObj[unref(getLoginState)]
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.form-title {
|
||||||
|
color: #34335b;
|
||||||
|
font-size: 44px;
|
||||||
|
line-height: 62px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -180,7 +180,6 @@ const submit = async (formEl) => {
|
|||||||
form.value.dataJson = ''
|
form.value.dataJson = ''
|
||||||
} else if (form.value.type === 2) {
|
} else if (form.value.type === 2) {
|
||||||
//库位点 类型为数组
|
//库位点 类型为数组
|
||||||
|
|
||||||
let list = []
|
let list = []
|
||||||
for (let index = 0; index < form.value.layersNumber; index++) {
|
for (let index = 0; index < form.value.layersNumber; index++) {
|
||||||
let item = {
|
let item = {
|
||||||
@ -240,7 +239,7 @@ const submit = async (formEl) => {
|
|||||||
const equipmentList = ref([]) //用过的设备列表
|
const equipmentList = ref([]) //用过的设备列表
|
||||||
const open = (item, list) => {
|
const open = (item, list) => {
|
||||||
form.value = item
|
form.value = item
|
||||||
form.value.layersNumber = item.dataList.length || ''
|
form.value.layersNumber = item.dataList?.length || ''
|
||||||
form.value.deviceId = item?.deviceId || item?.dataObj?.id || ''
|
form.value.deviceId = item?.deviceId || item?.dataObj?.id || ''
|
||||||
form.value.positionMapId = props.positionMapId
|
form.value.positionMapId = props.positionMapId
|
||||||
equipmentList.value = list
|
equipmentList.value = list
|
||||||
@ -254,30 +253,52 @@ const open = (item, list) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//类型改变
|
//类型改变
|
||||||
const typeChange = () => {
|
const typeChange = (type) => {
|
||||||
if (form.value.type === 1 || form.value.type === 5 || form.value.type === 6) {
|
form.value.dataJson = null
|
||||||
form.value.layersNumber = undefined
|
form.value.dataObj = {}
|
||||||
form.value.dataJson = ''
|
form.value.dataList = []
|
||||||
}
|
if (type === 1) {
|
||||||
|
form.value.layersNumber = null
|
||||||
if (form.value.type !== 2 && form.value.type !== 4) {
|
form.value.direction = null
|
||||||
form.value.direction = undefined
|
form.value.inDirection = null
|
||||||
form.value.inDirection = undefined
|
form.value.outDirection = null
|
||||||
form.value.outDirection = undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
if (form.value.type === 1) {
|
|
||||||
form.value.locationDeep = 10
|
|
||||||
form.value.locationWide = 10
|
|
||||||
}
|
|
||||||
|
|
||||||
if (form.value.type === 5 || form.value.type === 6) {
|
|
||||||
form.value.locationDeep = 30
|
|
||||||
form.value.locationWide = 30
|
|
||||||
}
|
|
||||||
|
|
||||||
if (form.value.type !== 2) {
|
|
||||||
form.value.locationNumber = null
|
form.value.locationNumber = null
|
||||||
|
form.value.locationDeep = 50
|
||||||
|
form.value.locationWide = 50
|
||||||
|
form.value.locationDeepPx = 10
|
||||||
|
form.value.locationWidePx = 10
|
||||||
|
} else if (type === 2) {
|
||||||
|
form.value.locationNumber = 1
|
||||||
|
} else if (type === 3) {
|
||||||
|
form.value.direction = null
|
||||||
|
form.value.inDirection = null
|
||||||
|
form.value.outDirection = null
|
||||||
|
form.value.locationNumber = null
|
||||||
|
} else if (type === 4) {
|
||||||
|
form.value.direction = null
|
||||||
|
form.value.inDirection = null
|
||||||
|
form.value.outDirection = null
|
||||||
|
form.value.locationNumber = null
|
||||||
|
} else if (type === 5) {
|
||||||
|
form.value.layersNumber = null
|
||||||
|
form.value.direction = null
|
||||||
|
form.value.inDirection = null
|
||||||
|
form.value.outDirection = null
|
||||||
|
form.value.locationNumber = null
|
||||||
|
form.value.locationDeep = 150
|
||||||
|
form.value.locationWide = 150
|
||||||
|
form.value.locationDeepPx = 30
|
||||||
|
form.value.locationWidePx = 30
|
||||||
|
} else if (type === 6) {
|
||||||
|
form.value.layersNumber = null
|
||||||
|
form.value.direction = null
|
||||||
|
form.value.inDirection = null
|
||||||
|
form.value.outDirection = null
|
||||||
|
form.value.locationNumber = null
|
||||||
|
form.value.locationDeep = 150
|
||||||
|
form.value.locationWide = 150
|
||||||
|
form.value.locationDeepPx = 30
|
||||||
|
form.value.locationWidePx = 30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//设备切换
|
//设备切换
|
||||||
|
@ -82,5 +82,6 @@ const emit = defineEmits(['textFormSuccess'])
|
|||||||
box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
|
box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
|
||||||
padding: 18px 20px 0 20px;
|
padding: 18px 20px 0 20px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
z-index: 999;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -331,9 +331,15 @@
|
|||||||
border: state.currentItemIndex === index ? '1px dashed #000' : 'none'
|
border: state.currentItemIndex === index ? '1px dashed #000' : 'none'
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
|
class="node-text"
|
||||||
v-if="item.type === 7 && item.layerSelectionShow"
|
v-if="item.type === 7 && item.layerSelectionShow"
|
||||||
:style="{
|
:style="{
|
||||||
|
position: 'absolute',
|
||||||
|
left: item.locationX + 'px',
|
||||||
|
top: item.locationY + 'px',
|
||||||
color: item.fontColor,
|
color: item.fontColor,
|
||||||
fontSize: item.fontSize + 'px',
|
fontSize: item.fontSize + 'px',
|
||||||
fontFamily: item.fontFamily,
|
fontFamily: item.fontFamily,
|
||||||
@ -342,8 +348,6 @@
|
|||||||
>
|
>
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
|
||||||
</div>
|
|
||||||
</VueDragResizeRotate>
|
</VueDragResizeRotate>
|
||||||
|
|
||||||
<div v-if="imgBgObj.width && imgBgObj.height">
|
<div v-if="imgBgObj.width && imgBgObj.height">
|
||||||
@ -604,13 +608,15 @@ const resizeEnd = (locationX, locationY, w, h, item, index) => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
let x = Number(locationX) + Number(item.locationWidePx) / 2
|
let x = Number(locationX) + Number(item.locationWidePx) / 2
|
||||||
let y = Number(locationY) + Number(item.locationDeepPx) / 2
|
let y = Number(locationY) + Number(item.locationDeepPx) / 2
|
||||||
|
let actualPoint = disposeEventPoint(x, y)
|
||||||
|
|
||||||
state.allMapPointInfo[index].locationX = x
|
state.allMapPointInfo[index].locationX = x
|
||||||
state.allMapPointInfo[index].locationY = y
|
state.allMapPointInfo[index].locationY = y
|
||||||
state.allMapPointInfo[index].locationWidePx = w
|
state.allMapPointInfo[index].locationWidePx = w
|
||||||
state.allMapPointInfo[index].locationDeepPx = h
|
state.allMapPointInfo[index].locationDeepPx = h
|
||||||
addEditHistory()
|
state.allMapPointInfo[index].actualLocationX = actualPoint.actualLocationX
|
||||||
|
state.allMapPointInfo[index].actualLocationY = actualPoint.actualLocationY
|
||||||
|
//更改路线里的
|
||||||
state.mapRouteList.forEach((route) => {
|
state.mapRouteList.forEach((route) => {
|
||||||
if (item.id === route.startingPointId) {
|
if (item.id === route.startingPointId) {
|
||||||
route.startPointX = x
|
route.startPointX = x
|
||||||
@ -629,6 +635,7 @@ const resizeEnd = (locationX, locationY, w, h, item, index) => {
|
|||||||
route.actualEndPointY = actualPoint.actualLocationY
|
route.actualEndPointY = actualPoint.actualLocationY
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
addEditHistory()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -641,9 +648,8 @@ const dragEnd = (locationX, locationY, item, index) => {
|
|||||||
let actualPoint = disposeEventPoint(x, y)
|
let actualPoint = disposeEventPoint(x, y)
|
||||||
state.allMapPointInfo[index].locationX = x
|
state.allMapPointInfo[index].locationX = x
|
||||||
state.allMapPointInfo[index].locationY = y
|
state.allMapPointInfo[index].locationY = y
|
||||||
state.allMapPointInfo[index].actualStartPointX = actualPoint.actualLocationX
|
state.allMapPointInfo[index].actualLocationX = actualPoint.actualLocationX
|
||||||
state.allMapPointInfo[index].actualStartPointY = actualPoint.actualLocationY
|
state.allMapPointInfo[index].actualLocationY = actualPoint.actualLocationY
|
||||||
addEditHistory()
|
|
||||||
//更改路线里的
|
//更改路线里的
|
||||||
state.mapRouteList.forEach((route) => {
|
state.mapRouteList.forEach((route) => {
|
||||||
if (item.id === route.startingPointId) {
|
if (item.id === route.startingPointId) {
|
||||||
@ -663,6 +669,7 @@ const dragEnd = (locationX, locationY, item, index) => {
|
|||||||
route.actualEndPointY = actualPoint.actualLocationY
|
route.actualEndPointY = actualPoint.actualLocationY
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
addEditHistory()
|
||||||
}
|
}
|
||||||
// 旋转
|
// 旋转
|
||||||
const rotateEnd = (angle, item, index) => {
|
const rotateEnd = (angle, item, index) => {
|
||||||
@ -684,11 +691,9 @@ const activatedHandle = (item, index) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//节点编辑
|
//节点编辑
|
||||||
if (toolbarSwitchType.value === 'editNode') {
|
if (toolbarSwitchType.value === 'editNode' && item.type !== 7) {
|
||||||
let list = state.allMapPointInfo.filter((item) => item.type === 3)
|
let list = state.allMapPointInfo.filter((item) => item.type === 3)
|
||||||
editNodePropertiesRef.value.open(JSON.parse(JSON.stringify(item)), list)
|
editNodePropertiesRef.value.open(JSON.parse(JSON.stringify(item)), list)
|
||||||
//取消监听键盘事件
|
|
||||||
window.removeEventListener('keydown', handleKeyDown)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//非选中
|
//非选中
|
||||||
@ -810,7 +815,7 @@ const handleInputEnd = () => {
|
|||||||
angle: 0, //旋转角度
|
angle: 0, //旋转角度
|
||||||
draggable: true, //是否可以拖动
|
draggable: true, //是否可以拖动
|
||||||
resizable: false, //是否可以调整大小
|
resizable: false, //是否可以调整大小
|
||||||
rotatable: false, //是否可以旋转
|
rotatable: true, //是否可以旋转
|
||||||
lockAspectRatio: true, //是否锁定比例
|
lockAspectRatio: true, //是否锁定比例
|
||||||
mapImageUrl: '', //图片
|
mapImageUrl: '', //图片
|
||||||
text: state.inputBoxValue, //文字内容
|
text: state.inputBoxValue, //文字内容
|
||||||
@ -850,8 +855,6 @@ const submitNodeSuccess = (form) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
addEditHistory()
|
addEditHistory()
|
||||||
//重新监听键盘事件
|
|
||||||
window.addEventListener('keydown', handleKeyDown)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//工具栏点击
|
//工具栏点击
|
||||||
@ -1170,6 +1173,8 @@ const toolbarClick = async (item) => {
|
|||||||
break
|
break
|
||||||
case 'move':
|
case 'move':
|
||||||
//移动
|
//移动
|
||||||
|
moveForm.locationX = state.allMapPointInfo[state.currentItemIndex].locationX
|
||||||
|
moveForm.locationY = state.allMapPointInfo[state.currentItemIndex].locationY
|
||||||
break
|
break
|
||||||
case 'revolve':
|
case 'revolve':
|
||||||
break
|
break
|
||||||
@ -1310,10 +1315,29 @@ const toolbarClick = async (item) => {
|
|||||||
//复制
|
//复制
|
||||||
const replicationNode = () => {
|
const replicationNode = () => {
|
||||||
let copyMapItem = state.allMapPointInfo[state.currentItemIndex]
|
let copyMapItem = state.allMapPointInfo[state.currentItemIndex]
|
||||||
|
|
||||||
|
if (copyMapItem.type === 3) {
|
||||||
|
message.warning('设备不能复制!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let locationX = Number(copyMapItem.locationX) + 20
|
let locationX = Number(copyMapItem.locationX) + 20
|
||||||
let locationY = Number(copyMapItem.locationY) + 20
|
let locationY = Number(copyMapItem.locationY) + 20
|
||||||
let actualPoint = disposeEventPoint(locationX, locationY)
|
let actualPoint = disposeEventPoint(locationX, locationY)
|
||||||
|
if (copyMapItem.dataList.length > 0) {
|
||||||
|
copyMapItem.dataList.forEach((item) => {
|
||||||
|
delete item.id
|
||||||
|
delete item.locationNo
|
||||||
|
delete item.mapItemId
|
||||||
|
})
|
||||||
|
copyMapItem.dataJson = JSON.stringify(copyMapItem.dataList)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (copyMapItem.dataObj && JSON.stringify(copyMapItem.dataObj) !== '{}') {
|
||||||
|
delete copyMapItem.dataObj.id
|
||||||
|
delete copyMapItem.dataObj.positionMapItemId
|
||||||
|
copyMapItem.dataJson = JSON.stringify(copyMapItem.dataObj)
|
||||||
|
}
|
||||||
state.copyMapItem = {
|
state.copyMapItem = {
|
||||||
positionMapId: copyMapItem.positionMapId,
|
positionMapId: copyMapItem.positionMapId,
|
||||||
locationX: locationX,
|
locationX: locationX,
|
||||||
@ -1774,8 +1798,6 @@ const handleEditRoute = (item, index) => {
|
|||||||
state.currentDragTarget.index = index
|
state.currentDragTarget.index = index
|
||||||
state.selectedCurve = item
|
state.selectedCurve = item
|
||||||
editMapRouteDialogRef.value.open(JSON.parse(JSON.stringify(item)))
|
editMapRouteDialogRef.value.open(JSON.parse(JSON.stringify(item)))
|
||||||
//取消监听键盘事件
|
|
||||||
window.removeEventListener('keydown', handleKeyDown)
|
|
||||||
}
|
}
|
||||||
//单击 选中
|
//单击 选中
|
||||||
const handleChooseRoute = (item, index) => {
|
const handleChooseRoute = (item, index) => {
|
||||||
@ -1826,7 +1848,6 @@ const editMapRouteDialogSubmit = (form) => {
|
|||||||
})
|
})
|
||||||
//增加一条历史记录
|
//增加一条历史记录
|
||||||
addEditHistory() //重新监听键盘事件
|
addEditHistory() //重新监听键盘事件
|
||||||
window.addEventListener('keydown', handleKeyDown)
|
|
||||||
}
|
}
|
||||||
//测距相关
|
//测距相关
|
||||||
// 计算两点之间的距离
|
// 计算两点之间的距离
|
||||||
@ -2049,6 +2070,7 @@ const saveNodeList = async () => {
|
|||||||
item.dataObj.fontColor = item.fontColor
|
item.dataObj.fontColor = item.fontColor
|
||||||
item.dataObj.fontType = item.fontType
|
item.dataObj.fontType = item.fontType
|
||||||
item.dataObj.fontFamily = item.fontFamily
|
item.dataObj.fontFamily = item.fontFamily
|
||||||
|
item.dataObj.fontSize = item.fontSize
|
||||||
item.dataObj.rotatable = item.rotatable
|
item.dataObj.rotatable = item.rotatable
|
||||||
item.dataObj.angle = item.angle
|
item.dataObj.angle = item.angle
|
||||||
//dataJson数据
|
//dataJson数据
|
||||||
@ -2063,7 +2085,6 @@ const saveMapRoute = async () => {
|
|||||||
}
|
}
|
||||||
//筛选图层
|
//筛选图层
|
||||||
const layerSelectionSuccess = (typeList) => {
|
const layerSelectionSuccess = (typeList) => {
|
||||||
console.log(typeList)
|
|
||||||
state.allMapPointInfo.forEach((item) => {
|
state.allMapPointInfo.forEach((item) => {
|
||||||
// 如果 type 存在于第一个数组中,则将 layerSelectionShow 设置为 false
|
// 如果 type 存在于第一个数组中,则将 layerSelectionShow 设置为 false
|
||||||
if (typeList.includes(item.type)) {
|
if (typeList.includes(item.type)) {
|
||||||
@ -2326,6 +2347,10 @@ onUnmounted(() => {
|
|||||||
.right-tool-active {
|
.right-tool-active {
|
||||||
background: #ebf1ff !important;
|
background: #ebf1ff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.node-text {
|
||||||
|
white-space: nowrap; /* 防止文字自动换行 */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.drop-down-menu {
|
.drop-down-menu {
|
||||||
|
Loading…
Reference in New Issue
Block a user