修改上传地址

main
suixy 1 month ago
parent c53bbc2b5f
commit 4f6423a988

@ -0,0 +1,63 @@
<template>
<div>
<div class="title">
<span contenteditable="true" @blur="edit('title', $event)">
{{ data.title }}
</span>
</div>
<div class="divider"></div>
<div class="value">
<span contenteditable="true" @blur="edit('value', $event)">
{{ data.value }}
</span>
</div>
</div>
</template>
<script>
export default {
name: "El1",
props: ['data'],
data() {
return {};
},
mounted() {
},
methods: {
edit(key, e) {
this.$props.data[key] = e.target.innerText
},
}
}
</script>
<style scoped>
.title {
margin-top: 5vw;
width: 100%;
text-align: center;
font-size: 1.9vw;
letter-spacing: 2px;
font-weight: 600;
color: #000;
}
.divider {
width: 4vw;
height: 4px;
background: #3372FE;
border-radius: 999px;
margin: 10px auto;
}
.value {
width: 62vw;
margin: 2vw auto 4vw auto;
text-align: left;
font-size: 1vw;
line-height: 2vw;
letter-spacing: 0.1vw;
color: #000;
text-indent: 2em;
}
</style>

@ -0,0 +1,218 @@
<template>
<div>
<div class="title">
<span contenteditable="true" @blur="edit('title', $event)">
{{ data.title }}
</span>
</div>
<div class="divider"></div>
<div style="height:35.4vw;">
<div class="swiper hero-swiper mySwiper">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,k) in data.list" :key="k">
<UploadEl :data="item" field="img"/>
<div class="slide-bg">
<div class="slide-title" contenteditable="true" @blur="edit1('title', k, $event)">
{{ item.title }}
</div>
<div class="slide-value" contenteditable="true" @blur="edit1('value', k, $event)">
{{ item.value }}
</div>
</div>
</div>
<div class="swiper-slide">
<div style="width:100%;height:100%;"
@click="addImg">
<i class="el-icon-circle-plus" style="font-size: 3vw; line-height: 22vw"></i>
</div>
</div>
</div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</div>
</div>
</template>
<script>
import Swiper from 'swiper'
import UploadEl from "@/components/editEl/uploadEl.vue";
import {Autoplay, Navigation} from "swiper/modules";
Swiper.use([
Navigation,
Autoplay
])
let swiper = null
export default {
name: "El1",
components: {UploadEl},
props: ['data'],
data() {
return {
show: true,
};
},
mounted() {
this.initSwiper()
},
methods: {
addImg() {
// this.show = false;
this.$props.data.list.push({
title: '请输入',
value: '请输入',
img: ''
});
this.$nextTick(() => {
this.initSwiper()
swiper.slideTo(this.$props.data.list.length - 1);
// this.show = true;
// this.$nextTick(() => {
// setTimeout(() => {
// this.$refs.carousel1.setActiveItem(this.$props.data.list.length - 1);
// }, 10)
// })
})
},
initSwiper() {
if (swiper) {
swiper.destroy(true, true);
swiper = null;
}
swiper = new Swiper(".mySwiper", {
loop: this.data.list.length > 2,
centeredSlides: true,
slidesPerView: "auto",
spaceBetween: -24,
speed: 450,
grabCursor: true,
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
},
edit(key, e) {
this.$props.data[key] = e.target.innerText
},
edit1(key, index, e) {
this.$props.data.list[index][key] = e.target.innerText
},
}
}
</script>
<style scoped>
.hero-swiper {
width: 100%;
height: 22vw;
overflow: visible;
margin-top: 2vw;
}
.hero-swiper .swiper-wrapper {
align-items: center;
}
.hero-swiper .swiper-slide {
width: 60vw;
height: 21.25vw;
display: flex;
align-items: center;
justify-content: center;
transform: scale(0.6);
transition: transform 300ms ease, opacity 300ms ease;
opacity: 0.55;
position: relative;
.slide-bg {
display: none;
position: absolute;
width: 100%;
height: 8vw;
background-color: #0002;
bottom: 0;
.slide-title {
position: absolute;
top: 1vw;
left: 2vw;
font-size: 1.6vw;
line-height: 2vw;
font-weight: 600;
color: #fff;
}
.slide-value {
position: absolute;
text-align: left;
top: 3.2vw;
left: 2vw;
font-size: 1vw;
font-weight: 600;
width: calc(100% - 4vw);
color: #fff;
text-indent: 2em;
height: 4vw;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
line-height: 2vw;
}
}
}
.hero-swiper .swiper-slide-active {
transform: scale(1);
opacity: 1;
z-index: 2;
.slide-bg {
display: inline-block;
}
}
.hero-swiper .swiper-slide img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
border-radius: 8px;
box-shadow: 0 18px 48px rgba(20, 24, 31, 0.22);
}
@media (max-width: 720px) {
.hero-swiper {
height: 280px;
}
.hero-swiper .swiper-slide {
width: 76vw;
}
}
.title {
margin-top: 5vw;
width: 100%;
text-align: center;
font-size: 1.9vw;
letter-spacing: 2px;
font-weight: 600;
color: #000;
}
.divider {
width: 4vw;
height: 4px;
background: #3372FE;
border-radius: 999px;
margin: 10px auto;
}
</style>

@ -0,0 +1,178 @@
<template>
<div>
<div class="title">
<span contenteditable="true" @blur="edit('title', $event)">
{{ data.title }}
</span>
</div>
<div class="divider"></div>
<div class="list">
<div class="item" v-for=" (i,k) in data.list">
<i class="del el-icon-circle-close" @click="data.list.splice(k, 1);"></i>
<div class="img1">
<div class="img">
<UploadEl :data="i" field="img"/>
</div>
</div>
<div class="title1" contenteditable="true" @blur="edit1('value', k,$event)">{{ i.title }}</div>
<i class="el-icon-right icon" @click="setLink(i,k)"></i>
</div>
<div class="item">
<div style="width:100%;height:100%;"
@click="data.list.push({title:'设备名',img: '',toLink: []})">
<i class="el-icon-circle-plus" style="font-size: 3vw; line-height: 16.7vw"></i>
</div>
</div>
</div>
<el-dialog
title="跳转到"
:visible.sync="linkDialogVisible"
width="50%">
<el-cascader
style="width:40vw"
@change="pageChange"
size="small"
v-model="linkDialogForm.toLink"
:props="{checkStrictly: true, value: 'id', label: 'name', children: 'list'}"
:options="productData"></el-cascader>
<span slot="footer" class="dialog-footer">
<el-button @click="linkDialogVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import UploadEl from "@/components/editEl/uploadEl.vue";
import {getHwWeb} from "@/api/hwWeb";
export default {
name: "El1",
components: {UploadEl},
props: ['data'],
data() {
return {
productData: [],
linkDialogVisible: false,
index: -1,
linkDialogForm: {}
};
},
mounted() {
getHwWeb(7).then(res => {
this.productData = JSON.parse(res?.data?.webJsonString || '{}').productList || []
})
},
methods: {
edit(key, e) {
this.$props.data[key] = e.target.innerText
},
edit1(key, index, e) {
this.$props.data.list[index][key] = e.target.innerText
},
setLink(e, index) {
this.linkDialogVisible = true
this.linkDialogForm = e || {}
this.index = index
console.log(e)
},
pageChange(e) {
this.linkDialogForm.toLink = e
this.$props.data.list[this.index].toLink = e
},
}
}
</script>
<style scoped>
.title {
margin-top: 5vw;
width: 100%;
text-align: center;
font-size: 1.9vw;
letter-spacing: 2px;
font-weight: 600;
color: #000;
}
.divider {
width: 4vw;
height: 4px;
background: #3372FE;
border-radius: 999px;
margin: 10px auto;
}
.list {
width: 62vw;
margin: 3vw auto 0;
.item {
margin-right: 3vw;
width: calc(50% - 3vw);
display: inline-block;
margin-bottom: 1.4vw;
vertical-align: top;
position: relative;
&:hover {
.img1 {
.img {
transform: scale(1.2);
}
}
.icon {
right: 0;
}
}
.img1 {
overflow: hidden;
width: 100%;
height: calc((90vw * 0.33 - 3vw) * 1080 / 1920);
.img {
transition: all .5s;
width: 100%;
height: 100%;
}
}
.title1 {
margin-top: 1vw;
font-size: 1.3vw;
padding-left: 2vw;
position: relative;
text-align: left;
&::before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 2px;
height: 100%;
background: blue;
}
}
.icon {
font-size: 1.3vw;
position: absolute;
right: 2vw;
bottom: 1vw;
transform: translateY(50%);
transition: all .5s;
cursor: pointer;
}
&:nth-child(2n) {
margin-right: 0%;
}
}
}
</style>

@ -7,7 +7,7 @@
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img style=" width: 100%;height: 100%;object-fit: contain" v-if="data && data[field||'icon']"
<img style="width: 100%;height: 100%;object-fit: contain" v-if="data && data[field||'icon']"
:src="data[field||'icon']"
class="avatar">
<i v-else style="width: 100%;height: 100%;font-size: 2vw" class="el-icon-plus avatar-uploader-icon"></i>
@ -16,7 +16,10 @@
</template>
<script>
export default {
props: ['data', 'field'],
props: [
'data',
'field'
],
data() {
return {
imageUrl: process.env.VUE_APP_BASE_API + "/common/upload",

@ -10,6 +10,7 @@
{{ i.title }}
</div>
<div class="newsImage">
{{ i.img }}
<UploadEl :data="i" field="img" style="width: 100%;height: 100%"/>
</div>
<div class="newsInfo" contenteditable="true" @blur="edit1('info', k,$event)">

@ -26,7 +26,8 @@
</el-button>
</div>
<div class="container">
<div class="component" v-for="(i,k) in components">
<div class="component" v-for="(i,k) in components"
:style="{backgroundColor: (k % 2 ===0 ? '#fff':'#F5F8FE'),display: 'flow-root'}">
<i class="del el-icon-circle-close" @click="components.splice(k, 1);"></i>
<i class="up el-icon-top" @click="moveUp(k);"></i>
<i class="down el-icon-bottom" @click="moveDown(k);"></i>
@ -49,6 +50,9 @@
<EditEl15 v-if="i.type === 15" :data="i.value"/>
<EditEl16 v-if="i.type === 16" :data="i.value"/>
<EditEl17 v-if="i.type === 17" :data="i.value"/>
<IndustrySolutionsEl1 v-if="i.type === 'industrySolutionsEl1'" :data="i.value"/>
<IndustrySolutionsEl2 v-if="i.type === 'industrySolutionsEl2'" :data="i.value"/>
<IndustrySolutionsEl3 v-if="i.type === 'industrySolutionsEl3'" :data="i.value"/>
</div>
<div class="addItem">
<div style="width:100%;height:100%;" @click="add">
@ -61,101 +65,116 @@
:visible.sync="addEl"
width="80%">
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem('carousel')">
大图轮播图
<div style="width: 100%;height: 100%" @click="addItem('industrySolutionsEl1')">
行业方案标题文本
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem('carousel1')">
小图轮播图
<div style="width: 100%;height: 100%" @click="addItem('industrySolutionsEl2')">
行业方案案例轮播图
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem('industrySolutionsEl3')">
行业方案产品展示
</div>
</el-card>
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem('carousel')">-->
<!-- 大图轮播图-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem('carousel1')">-->
<!-- 小图轮播图-->
<!-- </div>-->
<!-- </el-card>-->
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(1)">
图标 +文字+内容横铺4个
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(2)">
左标题+内容右图片
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(3)">
左图标右标题+内容一行2个
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(4)">
左大图右标题+内容一行2个
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(5)">
上标题+下图片
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(6)">
上标题+内容下图片
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(7)">
图标标题内容一行3个
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(8)">
左图右列表
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(9)">
上图下内容一行4个
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(10)">
一行3张图
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(11)">
图标标题内容一行3个(大图)
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(12)">
产品特点+图片
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(13)">
产品参数
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(14)">
资料下载
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(15)">
产品banner
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(16)">
产品参数(多设备对比)
</div>
</el-card>
<el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">
<div style="width: 100%;height: 100%" @click="addItem(17)">
配套产品
</div>
</el-card>
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(1)">-->
<!-- 图标 +文字+内容横铺4个-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(2)">-->
<!-- 左标题+内容右图片-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(3)">-->
<!-- 左图标右标题+内容一行2个-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(4)">-->
<!-- 左大图右标题+内容一行2个-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(5)">-->
<!-- 上标题+下图片-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(6)">-->
<!-- 上标题+内容下图片-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(7)">-->
<!-- 图标标题内容一行3个-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(8)">-->
<!-- 左图右列表-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(9)">-->
<!-- 上图下内容一行4个-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(10)">-->
<!-- 一行3张图-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(11)">-->
<!-- 图标标题内容一行3个(大图)-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(12)">-->
<!-- 产品特点+图片-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(13)">-->
<!-- 产品参数-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(14)">-->
<!-- 资料下载-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(15)">-->
<!-- 产品banner-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(16)">-->
<!-- 产品参数(多设备对比)-->
<!-- </div>-->
<!-- </el-card>-->
<!-- <el-card shadow="hover" style="width: 200px;display: inline-block;height:70px">-->
<!-- <div style="width: 100%;height: 100%" @click="addItem(17)">-->
<!-- 配套产品-->
<!-- </div>-->
<!-- </el-card>-->
<span slot="footer" class="dialog-footer">
<el-button @click="addEl = false"> </el-button>
</span>
@ -185,6 +204,9 @@ import EditEl14 from "@/components/editEl/editEl14.vue";
import EditEl15 from "@/components/editEl/editEl15.vue";
import EditEl16 from "@/components/editEl/editEl16.vue";
import EditEl17 from "@/components/editEl/editEl17.vue";
import IndustrySolutionsEl1 from "@/components/editEl/industrySolutionsEl/el1.vue";
import IndustrySolutionsEl2 from "@/components/editEl/industrySolutionsEl/el2.vue";
import IndustrySolutionsEl3 from "@/components/editEl/industrySolutionsEl/el3.vue";
export default {
components: {
@ -206,7 +228,10 @@ export default {
EditEl14,
EditEl15,
EditEl16,
EditEl17
EditEl17,
IndustrySolutionsEl1,
IndustrySolutionsEl2,
IndustrySolutionsEl3,
},
data() {
return {
@ -440,6 +465,39 @@ export default {
]
},
},
{
type: 'industrySolutionsEl1',
value: {
title: '行业案例',
value: '行业案例简介'
},
},
{
type: 'industrySolutionsEl2',
value: {
title: '经典案例',
list: [
{
img: 'http://1.13.177.47:6699/profile/upload/2026/05/08/3-2轮胎工厂_20260508172723A018.png',
title: '案例名称',
value: '案例介绍'
}
]
},
},
{
type: 'industrySolutionsEl3',
value: {
title: '配套产品',
list: [
{
img: 'http://1.13.177.47:6699/profile/upload/2026/05/08/3-2轮胎工厂_20260508172723A018.png',
title: '产品名称',
toLink: []
}
]
},
},
],
components: [],
}
@ -500,15 +558,15 @@ export default {
moveUp(k) {
if (k > 0) {
const item = this.components[k]
this.components.splice(k, 1) //
this.components.splice(k - 1, 0, item) //
this.components.splice(k, 1)
this.components.splice(k - 1, 0, item)
}
},
moveDown(k) {
if (k < this.components.length - 1) {
const item = this.components[k]
this.components.splice(k, 1) //
this.components.splice(k + 1, 0, item) //
this.components.splice(k, 1)
this.components.splice(k + 1, 0, item)
}
},
}
@ -539,7 +597,7 @@ export default {
}
.container {
width: 90%;
width: 100%;
text-align: left;
margin: 0 auto;
}

Loading…
Cancel
Save