修复 稿件预览
This commit is contained in:
parent
7b3dbb71ca
commit
0828d7376b
|
|
@ -59,8 +59,6 @@ public class FileTypeUtils {
|
|||
* @param content 附件内容
|
||||
*/
|
||||
public static void writeAttachment(HttpServletResponse response, String filename, byte[] content) throws IOException {
|
||||
System.out.println("filename@@"+filename);
|
||||
System.out.println("filename@@length"+content.length);
|
||||
// 设置 header 和 contentType
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8"));
|
||||
String contentType = getMineType(content, filename);
|
||||
|
|
|
|||
|
|
@ -102,7 +102,26 @@
|
|||
size="large"
|
||||
style="min-width: 280px;width: 100%"
|
||||
/>
|
||||
|
||||
<div v-if="that.propInfo[tmp.key].groupType === '1'">
|
||||
<div
|
||||
style="display: flex;align-items: center; margin-left: 10px; width: 220px">
|
||||
<el-row>
|
||||
<el-col span="4">
|
||||
<div>占比</div>
|
||||
</el-col>
|
||||
<el-col span="14">
|
||||
<el-input-number
|
||||
:min="-1" :max="100"
|
||||
v-model="that.propInfo[tmp.key].dataInfo[0].ratio"
|
||||
@change="changeData(0,tmp.key)"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col span="4">
|
||||
<div> %</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-button
|
||||
v-if="that.propInfo[tmp.key].canChange"
|
||||
@click="deleteList(that.propInfo[tmp.key],index)">
|
||||
|
|
|
|||
|
|
@ -102,7 +102,26 @@
|
|||
size="large"
|
||||
style="min-width: 280px;width: 100%"
|
||||
/>
|
||||
|
||||
<div v-if="that.propInfo[tmp.key].groupType === '1'">
|
||||
<div
|
||||
style="display: flex;align-items: center; margin-left: 10px; width: 220px">
|
||||
<el-row>
|
||||
<el-col span="4">
|
||||
<div>占比</div>
|
||||
</el-col>
|
||||
<el-col span="14">
|
||||
<el-input-number
|
||||
:min="-1" :max="100"
|
||||
v-model="that.propInfo[tmp.key].dataInfo[0].ratio"
|
||||
@change="changeData(0,tmp.key)"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col span="4">
|
||||
<div> %</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-button
|
||||
v-if="that.propInfo[tmp.key].canChange"
|
||||
@click="deleteList(that.propInfo[tmp.key],index)">
|
||||
|
|
@ -599,13 +618,6 @@ const changeType = () => {
|
|||
previewByDraftDesignId(that.draftDesignId, that.propInfo)
|
||||
}
|
||||
const getPropInfo = () => {
|
||||
let draftDesignInfo = {};
|
||||
for (let i = 0; i < that.draftDesignList.length; i++) {
|
||||
if (that.draftDesignList[i].id === that.draftDesignId) {
|
||||
draftDesignInfo = that.draftDesignList[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (that.changeCount > 0) {
|
||||
return new Promise((resolve) => {
|
||||
draftDesignEditRef.value.init(false, that.pageConfig, that.data, that.propInfo).then(() => {
|
||||
|
|
@ -613,14 +625,12 @@ const getPropInfo = () => {
|
|||
// 成功后再获取图片
|
||||
draftDesignEditRef.value.toPngUrl((url) => {
|
||||
that.previewData = url
|
||||
|
||||
const info = draftDesignEditRef.value.getPropInfo();
|
||||
resolve({
|
||||
draftDesignData: draftDesignEditRef.value.getJson(),
|
||||
propOrderByList: info.propOrderByList,
|
||||
// 设计稿id
|
||||
draftDesignId: that.draftDesignId,
|
||||
draftDesignInfo: draftDesignInfo,
|
||||
previewImage: that.previewData,
|
||||
propInfo: that.propInfo
|
||||
})
|
||||
|
|
@ -643,7 +653,6 @@ const getPropInfo = () => {
|
|||
propOrderByList: info.propOrderByList,
|
||||
// 设计稿id
|
||||
draftDesignId: that.draftDesignId,
|
||||
draftDesignInfo: draftDesignInfo,
|
||||
previewImage: that.previewData,
|
||||
propInfo: that.propInfo
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue