diff --git a/backend/src/main/java/io/dataease/service/panel/PanelTemplateService.java b/backend/src/main/java/io/dataease/service/panel/PanelTemplateService.java
index 3e9ffdbe02..26756ccad7 100644
--- a/backend/src/main/java/io/dataease/service/panel/PanelTemplateService.java
+++ b/backend/src/main/java/io/dataease/service/panel/PanelTemplateService.java
@@ -80,11 +80,14 @@ public class PanelTemplateService {
exampleDelete.createCriteria().andPidEqualTo(request.getPid()).andNameEqualTo(request.getName());
panelTemplateMapper.deleteByExample(exampleDelete);
}
- //Store static resource into the server
- staticResourceService.saveFilesToServe(request.getStaticResource());
- String snapshotName = "template-" + request.getId() + ".jpeg";
- staticResourceService.saveSingleFileToServe(snapshotName,request.getSnapshot().replace("data:image/jpeg;base64,","") );
- request.setSnapshot("/"+UPLOAD_URL_PREFIX+'/'+snapshotName);
+ if ("template".equals(request.getNodeType())) {
+ //Store static resource into the server
+ staticResourceService.saveFilesToServe(request.getStaticResource());
+ String snapshotName = "template-" + request.getId() + ".jpeg";
+ staticResourceService.saveSingleFileToServe(snapshotName, request.getSnapshot().replace("data:image/jpeg;base64,", ""));
+ request.setSnapshot("/" + UPLOAD_URL_PREFIX + '/' + snapshotName);
+ }
+
panelTemplateMapper.insert(request);
} else {
String nameCheckResult = this.nameCheck(CommonConstants.OPT_TYPE.UPDATE, request.getName(), request.getPid(), request.getId());
diff --git a/frontend/src/components/canvas/components/Editor/EditBar.vue b/frontend/src/components/canvas/components/Editor/EditBar.vue
index 206e4a9b65..d21a22cbf9 100644
--- a/frontend/src/components/canvas/components/Editor/EditBar.vue
+++ b/frontend/src/components/canvas/components/Editor/EditBar.vue
@@ -5,7 +5,7 @@
-
+
@@ -108,6 +108,16 @@ export default {
mounted() {
},
computed: {
+ curComponentTypes() {
+ const types = []
+ this.componentData.forEach(component => {
+ types.push(component.type)
+ })
+ return types
+ },
+ showMultiplexingCheck() {
+ return this.element.type !== 'custom-button' || (this.element.type === 'custom-button' && !this.curComponentTypes.includes('custom-button'))
+ },
showEditPosition() {
if (this.activeModel === 'edit' && !this.linkageAreaShow && !this.batchOptAreaShow) {
const toRight = (this.canvasStyleData.width - this.element.style.left - this.element.style.width) * this.curCanvasScale.scalePointWidth
diff --git a/frontend/src/views/panel/templateMarket/component/TemplateMarketItem.vue b/frontend/src/views/panel/templateMarket/component/TemplateMarketItem.vue
index a9d9d8ce9b..333334b857 100644
--- a/frontend/src/views/panel/templateMarket/component/TemplateMarketItem.vue
+++ b/frontend/src/views/panel/templateMarket/component/TemplateMarketItem.vue
@@ -25,6 +25,9 @@ export default {
},
baseUrl: {
type: String
+ },
+ width: {
+ type: Number
}
},
data() {
@@ -34,6 +37,8 @@ export default {
computed: {
classBackground() {
return {
+ width: this.width + 'px',
+ height: this.width * 0.58 + 'px',
background: `url(${this.thumbnailUrl}) no-repeat`,
'background-size': `100% 100%`
}
@@ -66,12 +71,12 @@ export default {
.testcase-template {
position: relative;
display: inline-block;
- margin: 24px 0 0 0;
+ margin: 0;
box-shadow: 0 0 2px 0 rgba(31,31,31,0.15), 0 1px 2px 0 rgba(31,31,31,0.15);
border: solid 2px #fff;
box-sizing: border-box;
border-radius: 4px;
- height: 256px;
+ width: 100%;
}
.demonstration {
@@ -87,8 +92,6 @@ export default {
.template-img {
background-size: 100% 100%;
- height: 180px;
- width: 318px;
margin: 0 auto;
border: solid 2px #fff;
box-sizing: border-box;
@@ -110,7 +113,10 @@ export default {
position:absolute;
bottom: 5px;
left: 0px;
- width: 318px;
+ width: 100%;
}
+ .bottom-area{
+ height: 75px;
+ }
diff --git a/frontend/src/views/panel/templateMarket/index.vue b/frontend/src/views/panel/templateMarket/index.vue
index c026bf1b49..6e34c31f9f 100644
--- a/frontend/src/views/panel/templateMarket/index.vue
+++ b/frontend/src/views/panel/templateMarket/index.vue
@@ -22,12 +22,13 @@
v-for="(templateItem) in currentMarketTemplateShowList"
v-show="templateItem.showFlag"
:key="templateItem.id"
- style="text-align: center"
+ style="text-align: center;padding: 24px 12px 0 12px"
:style="{width: templateSpan}"
>
@@ -85,7 +86,6 @@ import { groupTree, panelSave } from '@/api/panel/panel'
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
import MarketPreview from '@/views/panel/templateMarket/component/MarketPreview'
import elementResizeDetectorMaker from 'element-resize-detector'
-import { PHONE_REGEX } from '@/utils/validate'
export default {
name: 'TemplateMarket',
@@ -94,6 +94,7 @@ export default {
return {
hasResult: true,
templateMiniWidth: 330,
+ templateCurWidth: 310,
templateSpan: '25%',
previewModel: false,
previewVisible: false,
@@ -155,8 +156,9 @@ export default {
// 监听div变动事件
erd.listenTo(templateMainDom, element => {
_this.$nextTick(() => {
+ const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)
_this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%'
- console.log('templateSpan=' + _this.templateSpan)
+ _this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 32
})
})
},
@@ -260,7 +262,7 @@ export default {
.template-main{
text-align: center;
border-radius: 4px;
- padding-bottom: 24px;
+ padding: 0 12px 24px 12px;
height: calc(100vh - 190px)!important;
overflow-x: hidden;
overflow-y: auto;
diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue
index 2d534cfe58..8b8c47ef42 100644
--- a/frontend/src/views/system/user/index.vue
+++ b/frontend/src/views/system/user/index.vue
@@ -719,8 +719,8 @@ export default {
}
.normal {
- color: #1f2329;
- border: 1px solid #bbbfc4;
+ color: var(----deTextPrimary, #1F2329);
+ border: 1px solid var(--deBorderBase, #BBBFC4);
margin-left: 12px;
}
@@ -755,9 +755,6 @@ export default {
.name-email-search {
width: 240px;
- ::v-deep input {
- border-color: #bbbfc4;
- }
}
.active-btn {