禅道bug修复

This commit is contained in:
BianLzhaoMin 2025-09-16 10:43:08 +08:00
parent 36fa9090ba
commit a2fe7564d5
12 changed files with 223 additions and 117 deletions

View File

@ -1,13 +1,28 @@
<template>
<el-image
:src="src1"
fit="cover"
:style="`width:${realWidth};height:${realHeight};border-radius: ${borderRadius}px;`"
>
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
<div>
<el-image
:src="src1"
fit="cover"
:style="`width:${realWidth};height:${realHeight};border-radius: ${borderRadius}px;`"
v-if="!isShowMask"
>
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
<el-image
:src="src1"
v-else
fit="cover"
:preview-src-list="realSrcList"
:style="`width:${realWidth};height:${realHeight};border-radius: ${borderRadius}px;`"
>
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
</div>
</template>
<script>
@ -36,6 +51,10 @@ export default {
type: [Number, String],
default: 0,
},
isShowMask: {
type: Boolean,
default: false,
},
},
computed: {
realSrc() {

View File

@ -94,7 +94,7 @@ export const constantRoutes = [
children: [
// 产品中心
{
path: 'productCenter',
path: 'ProductCenter',
component: () =>
import('@/views/publicService/productCenter/index.vue'),
name: 'ProductCenter',
@ -123,7 +123,7 @@ export const constantRoutes = [
path: 'commonCom',
component: () =>
import('@/views/publicService/commonCom/index.vue'),
name: 'commonCom',
name: 'CommonCom',
},
// 宣传物料
{

View File

@ -85,7 +85,6 @@
<el-select
clearable
filterable
multiple
style="width: 100%"
placeholder="请选择类型"
@change="handleProductIdChange"
@ -167,7 +166,7 @@ export default {
cover: [], //
version: '', //
productName: '', //
productId: '', //
productId: [], //
description: '', //
},
//
@ -236,12 +235,9 @@ export default {
typeId, //
version, //
typeName, //
productName: productName.substring(
0,
productName.length - 1,
), //
productName, //
description,
productId: productId.join(','),
productId,
}
const formData = new FormData()
const fileMsg = []
@ -305,11 +301,15 @@ export default {
// ID
handleTypeIdChange(value) {
this.addAndEditForm.typeName = this.dict.type.tb_product_type.find(
(item) => item.value === value,
).label
this.addAndEditForm.productId = ''
if (value) {
this.addAndEditForm.typeName =
this.dict.type.tb_product_type.find(
(item) => item.value === value,
).label
this.getProductList(value)
this.getProductList(value)
}
},
//
@ -321,15 +321,23 @@ export default {
// ID
handleProductIdChange(value) {
this.addAndEditForm.productName = ''
if (value.length > 0) {
{
value.forEach((item) => {
this.addAndEditForm.productName +=
this.productList.find((j) => item == j.id).name +
','
})
}
// this.addAndEditForm.productName = ''
// if (value.length > 0) {
// {
// value.forEach((item) => {
// this.addAndEditForm.productName +=
// this.productList.find((j) => item == j.id).name +
// ','
// })
// }
// }
if (value) {
this.addAndEditForm.productName = this.productList.find(
(j) => value == j.id,
).name
} else {
this.addAndEditForm.productName = ''
}
},
@ -353,7 +361,8 @@ export default {
typeId: typeId + '',
version,
typeName,
productId: productIds.map((e) => e * 1),
// productId: productIds.map((e) => e * 1),
productId: productIds * 1,
description,
productName,
file: files

View File

@ -100,10 +100,16 @@
:prop="column.prop"
:label="column.label"
v-for="column in columns"
show-overflow-tooltip
>
<template slot-scope="scope">
<template v-if="column.prop === 'file'">
{{ scope.row.files[0].originalName }}
<!-- {{ scope.row.files[0].originalName }} -->
<span v-if="scope.row.files.length > 0">
{{ scope.row.files[0].originalName }}
</span>
<span v-else> / </span>
</template>
<template v-if="column.prop === 'fileType'">
<el-tag size="mini" type="primary">

View File

@ -349,7 +349,6 @@ export default {
},
//
async handleSave() {
console.log(this.addAndEditForm, '基本信息表单')
this.$message.closeAll()
try {
// 1.
@ -375,48 +374,51 @@ export default {
let errorCaseIndex = ''
//
this.editableTabs.forEach((tab, tabIndex) => {
if (!isValid) return //
//
requiredFields.forEach((field) => {
if (!isValid) return
if (this.editableTabs.length > 0) {
this.editableTabs.forEach((tab, tabIndex) => {
if (!isValid) return //
const value = tab.formInfo[field.key]
// undefinednull
if (
value === '' ||
value === undefined ||
value === null
) {
//
requiredFields.forEach((field) => {
if (!isValid) return
const value = tab.formInfo[field.key]
// undefinednull
if (
value === '' ||
value === undefined ||
value === null
) {
isValid = false
errorCaseIndex = tabIndex
errorMessage = `案例${tabIndex + 1}${
field.name
}为必填项`
}
// 0
else if (
field.key === 'caseSort' &&
(isNaN(value) || value === '')
) {
isValid = false
errorCaseIndex = tabIndex
errorMessage = `案例${tabIndex + 1}${
field.name
}必须为有效数字`
}
})
//
if (isValid && tab.formInfo.caseImage.length === 0) {
isValid = false
errorMessage = `案例${
tabIndex + 1
}请至少上传一张案例图片`
errorCaseIndex = tabIndex
errorMessage = `案例${tabIndex + 1}${
field.name
}为必填项`
}
// 0
else if (
field.key === 'caseSort' &&
(isNaN(value) || value === '')
) {
isValid = false
errorCaseIndex = tabIndex
errorMessage = `案例${tabIndex + 1}${
field.name
}必须为有效数字`
}
})
//
if (isValid && tab.formInfo.caseImage.length === 0) {
isValid = false
errorMessage = `案例${
tabIndex + 1
}请至少上传一张案例图片`
errorCaseIndex = tabIndex
}
})
}
//
if (!isValid) {
@ -439,7 +441,15 @@ export default {
//
const formData = new FormData()
const filesTypes = []
const { cover } = this.addAndEditForm
const {
cover,
name, //
typeId, //
typeName, //
linkUrl, //
isAccess, // 访
introduction, //
} = this.addAndEditForm
cover.forEach((item) => {
if (!item.id) {
formData.append('files', item.raw)
@ -447,8 +457,15 @@ export default {
}
})
const addAndEditFormParams = this.addAndEditForm
delete addAndEditFormParams.cover
const addAndEditFormParams = {
name, //
typeId, //
typeName, //
linkUrl, //
isAccess, // 访
introduction, //
}
for (const key in addAndEditFormParams) {
formData.append(key, addAndEditFormParams[key])
}
@ -491,9 +508,9 @@ export default {
this.$emit('closeDialog', true)
}
} catch (error) {
console.log(error, 'error')
// console.log(error, 'error')
//
this.$message.error('请完善所有必填项后再保存')
// this.$message.error('')
}
},
// Tab
@ -517,10 +534,10 @@ export default {
// Tab
handleRemoveTab(removeTabName) {
// Tab
if (this.editableTabs.length <= 1) {
this.$message.warning('至少保留一个案例')
return
}
// if (this.editableTabs.length <= 1) {
// this.$message.warning('')
// return
// }
// Tab
const removeIndex = this.editableTabs.findIndex(
@ -536,22 +553,31 @@ export default {
this.editableTabs.splice(removeIndex, 1)
// TabTab
if (removeTabName === this.currentTab) {
if (
removeTabName === this.currentTab &&
this.editableTabs.length > 0
) {
this.currentTab = this.editableTabs[0].name
}
// Tab Tab1
if (this.currentTabIndex >= removeIndex) {
if (
this.currentTabIndex >= removeIndex &&
this.editableTabs.length > 0
) {
this.currentTab =
this.editableTabs[this.currentTabIndex - 1].name
}
//
this.editableTabs.forEach((tab, index) => {
tab.title = `案例${index + 1}`
tab.name = (index + 1).toString()
tab.formInfo.caseSort = index + 1
})
if (this.editableTabs.length > 0) {
this.editableTabs.forEach((tab, index) => {
tab.title = `案例${index + 1}`
tab.name = (index + 1).toString()
tab.formInfo.caseSort = index + 1
})
}
},
// TabTab
handleTabClick() {

View File

@ -17,7 +17,8 @@
<h2 class="welcome-title">欢迎登录公共服务平台</h2>
<!-- 登录方式切换 -->
<div class="login-type-switch">
<!-- 9.16 暂时关闭验证码登录 -->
<!-- <div class="login-type-switch">
<span
:class="['switch-item', { active: loginType === 1 }]"
@click="switchLoginType(1)"
@ -31,7 +32,7 @@
>
验证码登录
</span>
</div>
</div> -->
<!-- 登录表单 -->
<el-form

View File

@ -65,28 +65,28 @@ export default {
},
data() {
return {
activeNav: 'productCenter', //
activeNav: 'ProductCenter', //
userAvatarUrl: this.userAvatar,
internalSearchKeyword: this.searchKeyword,
navItems: [
{
label: '产品中心',
routePath: 'productCenter',
routePath: 'ProductCenter',
icon: require('../../../assets/images/productCenter/products.png'),
},
{
label: '公共组件',
routePath: 'commonCom',
routePath: 'CommonCom',
icon: require('../../../assets/images/productCenter/components.png'),
},
{
label: '宣传物料',
routePath: 'proMaterials',
routePath: 'ProMaterials',
icon: require('../../../assets/images/productCenter/materials.png'),
},
{
label: '文档中心',
routePath: 'docCenter',
routePath: 'DocCenter',
icon: require('../../../assets/images/productCenter/docs.png'),
},
],
@ -103,7 +103,9 @@ export default {
methods: {
handleNavClick(item) {
this.activeNav = item.routePath
this.$router.push(item.routePath)
this.$router.push({
name: item.routePath,
})
},
handleSearch() {
// 使internalSearchKeyword

View File

@ -111,7 +111,7 @@ export default {
},
scrollDuration: {
type: Number,
default: 30, //
default: 50, // -
},
scrollDirection: {
type: String,
@ -133,6 +133,8 @@ export default {
isTransitioning: false,
transitionStart: 0,
transitionProgress: 0,
//
currentScrollPosition: 0,
}
},
@ -171,6 +173,7 @@ export default {
methods: {
getItemWidth() {
if (this.$refs.cardWrapper) {
// 4
this.itemWidth = (this.$refs.cardWrapper.clientWidth - 30) / 4
}
},
@ -217,15 +220,23 @@ export default {
let newPosition
if (this.scrollDirection === 'left') {
// - 使
newPosition = normalizedProgress * this.totalScrollWidth
// - 使
newPosition =
(this.startPosition +
normalizedProgress * this.totalScrollWidth) %
this.totalScrollWidth
} else {
// - 使
newPosition = (1 - normalizedProgress) * this.totalScrollWidth
// - 使
newPosition =
(this.startPosition +
(1 - normalizedProgress) * this.totalScrollWidth) %
this.totalScrollWidth
}
//
this.$refs.cardWrapper.scrollLeft = newPosition
//
this.currentScrollPosition = newPosition
//
this.animationId = requestAnimationFrame(this.smoothScroll)
@ -248,8 +259,9 @@ export default {
cancelAnimationFrame(this.animationId)
}
//
//
this.startPosition = this.$refs.cardWrapper.scrollLeft || 0
this.currentScrollPosition = this.startPosition
//
this.animationId = requestAnimationFrame(this.smoothScroll)
@ -282,6 +294,8 @@ export default {
//
this.$refs.cardWrapper.style.scrollBehavior = 'smooth'
this.$refs.cardWrapper.scrollLeft = newPosition
//
this.currentScrollPosition = newPosition
//
setTimeout(() => {
@ -307,6 +321,8 @@ export default {
//
this.$refs.cardWrapper.style.scrollBehavior = 'smooth'
this.$refs.cardWrapper.scrollLeft = newPosition
//
this.currentScrollPosition = newPosition
//
setTimeout(() => {
@ -419,6 +435,8 @@ export default {
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
min-width: calc(25% - 45px);
width: calc(25% - 45px);
flex: 0 0 calc(25% - 45px);
&:hover {
transform: translateY(-5px);

View File

@ -32,6 +32,7 @@
:height="160"
:width="320"
:src1="j.url"
:isShowMask="true"
/>
</el-carousel-item>
</el-carousel>
@ -87,7 +88,7 @@ export default {
currentIndex: 0, // 1
transitionDuration: '0.5s', //
timer: null, //
interval: 10000, // (ms)
interval: 5000, // (ms)
}
},
computed: {
@ -103,8 +104,10 @@ export default {
},
},
mounted() {
//
this.startAutoPlay()
//
if (this.cardList.length > 1) {
this.startAutoPlay()
}
// //
const container = this.$el.querySelector('.carousel-wrapper')
@ -125,6 +128,10 @@ export default {
methods: {
//
startAutoPlay() {
//
if (this.cardList.length <= 1) {
return
}
this.stopAutoPlay() //
this.timer = setInterval(() => {
this.nextSlide() //
@ -141,6 +148,11 @@ export default {
// -
nextSlide() {
//
if (this.cardList.length <= 1) {
return
}
//
if (this.currentIndex === this.cardList.length) {
this.transitionDuration = '0.5s'
@ -159,6 +171,11 @@ export default {
// -
prevSlide() {
//
if (this.cardList.length <= 1) {
return
}
//
if (this.currentIndex === 1) {
this.transitionDuration = '0.5s'

View File

@ -25,6 +25,7 @@
:borderRadius="10"
:width="itemWidth"
:src1="item.linkImage"
:isShowMask="true"
/>
</div>
<div
@ -297,9 +298,11 @@ export default {
cursor: pointer;
transition: all 0.2s ease;
font-size: 14px;
color: #666;
color: #000;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
font-family: 'PingFang SC', sans-serif;
// font-weight: 600;
}
.category-item:hover {

View File

@ -22,6 +22,7 @@
:height="160"
:width="320"
:src1="j.url"
:isShowMask="true"
/>
</el-carousel-item>
</el-carousel>
@ -183,19 +184,15 @@ export default {
color: #333333;
}
div {
height: 90px;
// height: 90px;
font-size: 14px;
color: #333333;
line-height: 1.8;
//
display: -webkit-box;
-webkit-line-clamp: 2 !important;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
white-space: normal;
display: -webkit-box; /* 将元素作为弹性伸缩盒子模型显示 */
-webkit-box-orient: vertical; /* 设置伸缩盒子的子元素排列方式为垂直排列 */
-webkit-line-clamp: 2; /* 限制显示的行数为4行 */
overflow: hidden; /* 超出部分隐藏 */
}
}

View File

@ -14,10 +14,17 @@
<div class="product-content">
<div class="product-image">
<el-image
<!-- <el-image
fit="cover"
:src="productDetail.linkImage"
style="width: 480px; height: 270px"
/> -->
<ImagePreview
:height="270"
:width="480"
:isShowMask="true"
:src1="productDetail.linkImage"
/>
</div>
@ -57,6 +64,7 @@
cardTitle="产品案例"
:productId="productId"
:cardList="productCases"
v-if="productCases && productCases.length > 0"
/>
<DialogModel
@ -100,8 +108,8 @@ export default {
dialogConfig: {
outerTitle: '查看',
outerVisible: false,
outerWidth: '90%',
minHeight: '90vh',
// outerWidth: '90%',
// minHeight: '90vh',
},
productId: '',
lookFile: 'http://192.168.0.14:8012/onlinePreview?url=',
@ -901,7 +909,7 @@ export default {
}
.preview-docs {
width: 100%;
// width: 100%;
height: 79vh;
}
</style>