Merge branch 'dev' of https://git.yfgame.vip/r/hangtag into dev

This commit is contained in:
Mrking 2024-09-12 12:55:21 +08:00
commit 20f13d7f5b
6 changed files with 29 additions and 12 deletions

View File

@ -69,6 +69,11 @@ public class FileTypeUtils {
response.setHeader("Content-Range", String.valueOf(content.length - 1));
response.setHeader("Accept-Ranges", "bytes");
}
if (contentType.startsWith("image/")) {
// 设置缓存
response.setHeader("Cache-Control", "max-age=604800");
response.setHeader("Pragma", "public");
}
// 输出附件
IoUtil.write(response.getOutputStream(), false, content);
}

View File

@ -84,7 +84,7 @@ export function createVitePlugins() {
viteCompression({
verbose: true, // 是否在控制台输出压缩结果
disable: false, // 是否禁用
threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b
threshold: 5120, // 体积大于 threshold 才会被压缩,单位 b
algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw']
ext: '.gz', // 生成的压缩包后缀
deleteOriginFile: false //压缩后是否删除源文件

View File

@ -241,7 +241,7 @@ const that = reactive({
draftDesignList: [],
draftDesignId: '',
reView: false,
currentZoom: 1,
currentZoom: 6,
changeCount: 0,
previewUrl: "",
ingredientInfoList: [],
@ -434,11 +434,10 @@ const loadConfig = (config: object, propData = {}) => {
// true, conf.pageConfig, conf.data, test
draftDesignEditRef.value.init(false, that.pageConfig, that.data, that.propInfo)
queryUseLabel();
//
setTimeout(()=>{
that.currentZoom = 6;
loading.value = false
},800)
showPng();
},100)
}
const queryUseLabel = (label) => {
@ -499,17 +498,15 @@ const showPng = () => {
loading.value = true
setTimeout(() => {
draftDesignEditRef.value.toPngUrl((url) => {
console.log("url",url)
that.previewUrl = url
const info = draftDesignEditRef.value.getPropInfo();
that.propInfo = {
...info.propDefault,
...that.propInfo || {}
};
that.propOrderByList = info.propOrderByList;
setTimeout(() => {
submit();
}, 100)
submit();
loading.value = false;
}, {
widthScale: that.currentZoom,

View File

@ -18,7 +18,7 @@
"位置信息配置为节点的位置信息。如添加了3个配置数据这时会依次添加到对应位置上。从而实现动态属性配置。"
</el-alert>
<el-form>
<el-row>
<el-row style="min-width: 900px">
<el-col :span="6" :xs="12">
<el-form-item label="组名称">
<el-input v-model="that.configInfo.groupName" placeholder="请输入组名称"/>

View File

@ -14,7 +14,7 @@
:style="svgStyle"
>
<image
:href="hrefBase64 || cellInfo.style.shape.href" x="0" y="0"
:href="this.hrefBase64 || cellInfo.style.shape.href" x="0" y="0"
style="width: 100%;height: 100%;"
:stroke="cellInfo.style.shape.strokeColor"
:stroke-width="cellInfo.style.shape.strokeWidth"
@ -110,6 +110,7 @@ export default defineComponent({
fillColor: '#000000', //
fillOpacity: '', //
href: '',
hrefBase64: null,
opacity: '', //
strokeDashoffset: '', // 线
strokeLinecap: undefined, // 线"round" | "butt" | "square" | "inherit" | undefined
@ -255,10 +256,13 @@ export default defineComponent({
text: {}
}
}, info)
if(this.cellInfo.style.shape.href){
convertImageToBase64(this.cellInfo.style.shape.href).then((res)=>{
console.log("convertImageToBase64",this.cellInfo.style.shape.href,res)
// @ts-ignore
this.hrefBase64 = res
// this.cellInfo.style.shape.hrefBase64 = res
})
}
setTimeout(() => {

View File

@ -1487,6 +1487,7 @@ const submitProp = (data) => {
newNode.attr('body/scaling', 'none')
data.cellIds.push(newNode.id)
graph.addNode(newNode)
}
removeGroup(data.groupId);
data.maxSize = Math.min(data.pointList.length, data.maxSize)
@ -1508,14 +1509,24 @@ const removeEmptyGroup = () => {
}
let delIndex = []
let allKey = []
for (let i = 0; i < that.pageConfig.propList.length; i++) {
if(!propGroupIdList.includes(that.pageConfig.propList[i].groupId)){
delIndex.push(i)
continue;
}
allKey.push(that.pageConfig.propList[i].groupId)
}
for (let i = 0; i < delIndex.length; i++) {
that.pageConfig.propList.splice(delIndex[i], 1)
}
let newArr = []
for (let i = 0; i < that.pageConfig.propOrderByList.length; i++) {
if(allKey.includes(that.pageConfig.propOrderByList[i].key)){
newArr.push(that.pageConfig.propOrderByList[i])
}
}
that.pageConfig.propOrderByList = newArr
}
const orderByPropList = () => {