Commit bcb6e572 by liuyong

修改画布

1 parent 71e76f0c
Showing with 12 additions and 11 deletions
......@@ -141,9 +141,9 @@
<div class="dialog_form_item3">
<div class="dialog_form_item_title">图标设置:</div>
<div style="">
<div>
<img :src="selectGraphSrc" alt="" />
<div style="text-align: left;margin-bottom: 10px;">
<img :style="{'width': selectGraphSrc.length>0?'80px':0, height: selectGraphSrc.length>0?'40px':0}" :src="selectGraphSrc" alt="" />
</div>
<div style="display: flex;">
<el-button type="primary" @click="openGraphDialog">图形选择</el-button>
......@@ -192,7 +192,7 @@
:close-on-click-modal="false"
width="60%">
<div style="height: 400px;display: flex;align-items: center;">
<div style="width: 20%;height: 100%;border-left: 1px solid #000;border-top: 1px solid #000;border-bottom: 1px solid #000;overflow: auto;text-align: center;">
<div style="width: 20%;height: 100%;border-left: 1px solid #ccc;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;overflow: auto;text-align: center;">
<div :style="{ 'cursor': 'pointer', 'padding': '4px', 'background-color': nameIndex == index ? 'rgb(13,134,127)' : '#fff', 'color': nameIndex == index ? '#fff' : '#000' }"
v-for="(item, index) in search_select1"
:key="item.belongId"
......@@ -200,15 +200,15 @@
{{ item.name }}
</div>
</div>
<div style="width: 80%;height: 100%;border: 1px solid #000;overflow: auto;text-align: left;">
<div :style="{ 'display': 'inline-block','margin': '10px','border': graphIndex == index ? '2px solid #0D867F' : 'none','padding': '8px', 'border-radius': '6px' }"
<div style="width: 80%;height: 100%;border: 1px solid #ccc;overflow: auto;text-align: left;">
<div :style="{ 'display': 'inline-block','margin': '10px', 'border': graphIndex == index ? '2px solid #0D867F' : 'none','padding': '8px', 'border-radius': '6px' }"
v-for="(item, index) in graphList" :key="item.graphId">
<img @click="clickGraph(index)" class="tu_biao_icon" :src="'data:image/svg+xml;base64,'+item.icon" alt="" />
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="save_graph">保存</el-button>
<el-button class="greenButton" @click="save_graph">确定</el-button>
<el-button @click="closeGraphDialog">取消</el-button>
</span>
</el-dialog>
......@@ -678,10 +678,10 @@ export default {
const rect = svgDocument.getElementsByTagName('rect')[0];
const ellipse = svgDocument.getElementsByTagName('ellipse')[0];
const svgTag = svgDocument.getElementsByTagName('svg')[0];
const svgWidth = svgTag.getAttribute('width');
const svgHeight = svgTag.getAttribute('height');
item['width'] = svgWidth;
item['height'] = svgHeight;
const svgWidth = Number(svgTag.getAttribute('width').split('px')[0])/2;
const svgHeight = Number(svgTag.getAttribute('height').split('px')[0])/2;
item['width'] = svgWidth + 'px';
item['height'] = svgHeight + 'px';
if(path) {
path.setAttribute('fill', item.color);
......@@ -1019,7 +1019,8 @@ export default {
display: flex;
}
.tu_biao_icon{
width: 100%;
max-width: 80px;
max-height: 40px;
cursor: pointer;
}
.dialog_form_item3_content1{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!