Authored by 王涛

Merge branch 'master-500-dev-lushangqing' into 'master-500-dev'

背景组件、圆环百分比组件、进度条组件、系统信息组件增加标题及边框样式



See merge request !36
@@ -18,6 +18,14 @@ export const monitorBgBorder = { @@ -18,6 +18,14 @@ export const monitorBgBorder = {
18 placeholder: '', 18 placeholder: '',
19 value: '背景', 19 value: '背景',
20 }, 20 },
  21 + {
  22 + type: 'custom-upload',
  23 + label: '标题图标',
  24 + name: 'titleIcon',
  25 + required: false,
  26 + placeholder: '',
  27 + value: require("../../../../../../../assets/images/monitor/capacityAnalysis/icon-plat-info.png"),
  28 + },
21 [{ 29 [{
22 name: '标题设置', 30 name: '标题设置',
23 list: [ 31 list: [
@@ -42,8 +42,82 @@ export const monitorCustomPiePercentageCard = { @@ -42,8 +42,82 @@ export const monitorCustomPiePercentageCard = {
42 ], 42 ],
43 value: 'row' 43 value: 'row'
44 }, 44 },
  45 + {
  46 + type: 'custom-upload',
  47 + label: '标题图标',
  48 + name: 'imageAdress',
  49 + required: false,
  50 + placeholder: '',
  51 + value: '',
  52 + },
45 [ 53 [
46 { 54 {
  55 + name: '标题设置',
  56 + list: [
  57 + {
  58 + type: 'el-switch',
  59 + label: '是否有标题',
  60 + name: 'isTitle',
  61 + required: false,
  62 + placeholder: '',
  63 + value: true,
  64 + },
  65 + {
  66 + type: 'el-input-text',
  67 + label: '标题名称',
  68 + name: 'titleName',
  69 + required: false,
  70 + placeholder: '',
  71 + value: 'vmware-80.12.89.77',
  72 + },
  73 +
  74 + {
  75 + type: 'el-select',
  76 + label: '字体位置',
  77 + name: 'textAlign',
  78 + required: false,
  79 + placeholder: '',
  80 + selectOptions: [
  81 + {code: 'center', name: '居中'},
  82 + {code: 'left', name: '左对齐'},
  83 + {code: 'right', name: '右对齐'},
  84 + ],
  85 + value: 'left'
  86 + },
  87 +
  88 + {
  89 + type: 'el-input-number',
  90 + label: '字体大小',
  91 + name: 'titleFontSize',
  92 + required: false,
  93 + placeholder: '',
  94 + value: '18'
  95 + },
  96 + {
  97 + type: 'vue-color',
  98 + label: '字体颜色',
  99 + name: 'titleColor',
  100 + required: false,
  101 + placeholder: '',
  102 + value: '#666'
  103 + },
  104 + {
  105 + type: 'el-select',
  106 + label: '字体粗细',
  107 + name: 'titleFontWeight',
  108 + required: false,
  109 + placeholder: '',
  110 + selectOptions: [
  111 + {code: 'normal', name: '正常'},
  112 + {code: 'bold', name: '粗体'},
  113 + {code: 'bolder', name: '特粗体'},
  114 + {code: 'lighter', name: '细体'}
  115 + ],
  116 + value: 'normal'
  117 + },
  118 + ]
  119 + },
  120 + {
47 name: '进度条设置', 121 name: '进度条设置',
48 list: [ 122 list: [
49 { 123 {
@@ -31,6 +31,30 @@ export const monitorProgressInformation = { @@ -31,6 +31,30 @@ export const monitorProgressInformation = {
31 value: '' 31 value: ''
32 }, 32 },
33 { 33 {
  34 + type: 'el-switch',
  35 + label: '加边框',
  36 + name: 'isBorder',
  37 + required: false,
  38 + placeholder: '',
  39 + value: true
  40 + },
  41 + {
  42 + type: 'el-switch',
  43 + label: '加描边',
  44 + name: 'isShadow',
  45 + required: false,
  46 + placeholder: '',
  47 + value: true
  48 + },
  49 + {
  50 + type: 'vue-color',
  51 + label: '边框颜色',
  52 + name: 'borderColor',
  53 + required: false,
  54 + placeholder: '',
  55 + value: 'rgba(151, 151, 151, 0.13)',
  56 + },
  57 + {
34 type: 'el-select', 58 type: 'el-select',
35 label: '显示', 59 label: '显示',
36 name: 'flexFlow', 60 name: 'flexFlow',
@@ -50,6 +50,14 @@ export const monitorSystemInformation = { @@ -50,6 +50,14 @@ export const monitorSystemInformation = {
50 placeholder: '', 50 placeholder: '',
51 value: require("../../../../../../../assets/images/monitor/capacityAnalysis/icon-sys-info.png"), 51 value: require("../../../../../../../assets/images/monitor/capacityAnalysis/icon-sys-info.png"),
52 }, 52 },
  53 + {
  54 + type: 'custom-upload',
  55 + label: '信息图片',
  56 + name: 'infoImageAdress',
  57 + required: false,
  58 + placeholder: '',
  59 + value: require("../../../../../../../assets/images/monitor/capacityAnalysis/aliyun.png"),
  60 + },
53 [ 61 [
54 { 62 {
55 name: '标题设置', 63 name: '标题设置',
@@ -68,7 +76,7 @@ export const monitorSystemInformation = { @@ -68,7 +76,7 @@ export const monitorSystemInformation = {
68 name: 'titleName', 76 name: 'titleName',
69 required: false, 77 required: false,
70 placeholder: '', 78 placeholder: '',
71 - value: '系统信息', 79 + value: '虚拟化容量汇总信息',
72 }, 80 },
73 81
74 { 82 {
@@ -258,7 +266,7 @@ export const monitorSystemInformation = { @@ -258,7 +266,7 @@ export const monitorSystemInformation = {
258 name: 'width', 266 name: 'width',
259 required: false, 267 required: false,
260 placeholder: '该容器在1920px大屏中的宽度', 268 placeholder: '该容器在1920px大屏中的宽度',
261 - value: 795, 269 + value: 1890,
262 }, 270 },
263 { 271 {
264 type: 'el-input-number', 272 type: 'el-input-number',
@@ -266,7 +274,7 @@ export const monitorSystemInformation = { @@ -266,7 +274,7 @@ export const monitorSystemInformation = {
266 name: 'height', 274 name: 'height',
267 required: false, 275 required: false,
268 placeholder: '该容器在1080px大屏中的高度', 276 placeholder: '该容器在1080px大屏中的高度',
269 - value: 158, 277 + value: 190,
270 }, 278 },
271 ], 279 ],
272 } 280 }
1 <template> 1 <template>
2 <div class="basicInformation-container" :style="styleObj"> 2 <div class="basicInformation-container" :style="styleObj">
3 - <div class="info-title" :style="titleStyle">{{optionsSetUp.titleName}}</div>  
4 -  
5 - 3 + <div class="info-title" :style="titleStyle">
  4 + <img :src="imgStyle.titleIcon" alt="" class="icon-title">
  5 + {{optionsSetUp.titleName}}
  6 + </div>
6 </div> 7 </div>
7 </template> 8 </template>
8 9
@@ -46,13 +47,20 @@ export default { @@ -46,13 +47,20 @@ export default {
46 }, 47 },
47 titleStyle(){ 48 titleStyle(){
48 return{ 49 return{
49 - 'display':this.transStyle.isTitle?'block':'none', 50 + 'display':this.transStyle.isTitle?'flex':'none',
50 'text-align':this.transStyle.textAlign, 51 'text-align':this.transStyle.textAlign,
  52 + 'justify-content':this.transStyle.textAlign=='left'?'start':this.transStyle.textAlign=='center'?'center':'flex-end',
51 'font-size':this.transStyle.titleFontSize+'px', 53 'font-size':this.transStyle.titleFontSize+'px',
52 color: this.transStyle.titleColor, 54 color: this.transStyle.titleColor,
53 'font-weight': this.transStyle.titleFontWeight 55 'font-weight': this.transStyle.titleFontWeight
54 } 56 }
55 - } 57 + },
  58 + //图片样式
  59 + imgStyle(){
  60 + return{
  61 + titleIcon:this.transStyle.titleIcon
  62 + }
  63 + },
56 64
57 65
58 }, 66 },
@@ -107,5 +115,10 @@ export default { @@ -107,5 +115,10 @@ export default {
107 <style scoped lang="scss"> 115 <style scoped lang="scss">
108 .info-title{ 116 .info-title{
109 padding:5px; 117 padding:5px;
  118 + display: flex;
  119 + align-items: center;
  120 +}
  121 +.icon-title{
  122 + margin-right:5px;
110 } 123 }
111 </style> 124 </style>
1 <template> 1 <template>
2 - <div :style="styleObj" class="percentContainer">  
3 - <div class="percent-item" :style="percentItemStyle" v-for="item in percentData">  
4 - <v-chart :options="item.options" autoresize/>  
5 - <div class="chart-title" :style="titleStyle">{{ item.name }}</div> 2 + <div :style="styleObj" class="">
  3 + <div class="percent-title" :style="titleStyle">
  4 + <img :src="imgStyle.imageAdress" alt="" class="icon-title">
  5 + {{ optionsSetup.titleName }}
6 </div> 6 </div>
  7 + <div class="percentContainer" :style="flexStyle">
  8 + <div class="percent-item" :style="percentItemStyle" v-for="item in percentData">
  9 + <v-chart :options="item.options" autoresize/>
  10 + <div class="chart-title" :style="subTitleStyle">{{ item.name }}</div>
  11 + </div>
  12 + </div>
  13 +
7 </div> 14 </div>
8 </template> 15 </template>
9 16
@@ -127,9 +134,14 @@ export default { @@ -127,9 +134,14 @@ export default {
127 left: this.optionsStyle.left + "px", 134 left: this.optionsStyle.left + "px",
128 top: this.optionsStyle.top + "px", 135 top: this.optionsStyle.top + "px",
129 background: this.optionsSetup.background, 136 background: this.optionsSetup.background,
130 - 'flex-flow':this.optionsSetup.flexFlow  
131 }; 137 };
132 }, 138 },
  139 + flexStyle(){
  140 + return{
  141 + 'flex-flow':this.optionsSetup.flexFlow
  142 +
  143 + }
  144 + },
133 //环形图样式 145 //环形图样式
134 percentItemStyle(){ 146 percentItemStyle(){
135 let length=this.percentData.length; 147 let length=this.percentData.length;
@@ -141,14 +153,31 @@ export default { @@ -141,14 +153,31 @@ export default {
141 height: width + "px", 153 height: width + "px",
142 } 154 }
143 }, 155 },
144 - //下标题样式 156 + //标题样式设置
145 titleStyle(){ 157 titleStyle(){
146 return{ 158 return{
  159 + 'display':this.optionsSetup.isTitle?'flex':'none',
  160 + 'text-align':this.optionsSetup.textAlign,
  161 + 'justify-content':this.optionsSetup.textAlign=='left'?'start':this.optionsSetup.textAlign=='center'?'center':'flex-end',
  162 + 'font-size':this.optionsSetup.titleFontSize+'px',
  163 + color: this.optionsSetup.titleColor,
  164 + 'font-weight': this.optionsSetup.titleFontWeight
  165 + }
  166 + },
  167 + //下标题样式
  168 + subTitleStyle(){
  169 + return{
147 'font-size':this.optionsSetup.textFontSize+'px', 170 'font-size':this.optionsSetup.textFontSize+'px',
148 color: this.optionsSetup.textColor, 171 color: this.optionsSetup.textColor,
149 'font-weight': this.optionsSetup.textFontWeight 172 'font-weight': this.optionsSetup.textFontWeight
150 } 173 }
151 - } 174 + },
  175 + //图片样式
  176 + imgStyle(){
  177 + return{
  178 + imageAdress:this.optionsSetup.imageAdress,
  179 + }
  180 + },
152 181
153 }, 182 },
154 watch: { 183 watch: {
@@ -419,4 +448,13 @@ export default { @@ -419,4 +448,13 @@ export default {
419 right:0; 448 right:0;
420 bottom:20px;*/ 449 bottom:20px;*/
421 } 450 }
  451 +.percent-title{
  452 + padding:5px;
  453 + width: 100%;
  454 + display: flex;
  455 + align-items: center;
  456 +}
  457 +.icon-title{
  458 + margin-right:5px;
  459 +}
422 </style> 460 </style>
@@ -67,7 +67,9 @@ export default { @@ -67,7 +67,9 @@ export default {
67 //横排竖排 排版设置 67 //横排竖排 排版设置
68 itemStyle(){ 68 itemStyle(){
69 return{ 69 return{
70 - width:this.optionsSetup.flexFlow=='column'?'100%':'auto' 70 + width:this.optionsSetup.flexFlow=='column'?'100%':'auto',
  71 + 'border':this.optionsSetup.isBorder?'0.5px solid '+this.optionsSetup.borderColor:'none',
  72 + 'box-shadow':this.optionsSetup.isShadow?'0px 3px 12px '+this.optionsSetup.borderColor:'none'
71 } 73 }
72 }, 74 },
73 //标题样式设置 75 //标题样式设置
@@ -183,7 +185,7 @@ export default { @@ -183,7 +185,7 @@ export default {
183 185
184 <style scoped lang="scss"> 186 <style scoped lang="scss">
185 .progressContainer{ 187 .progressContainer{
186 - box-sizing: content-box; 188 + //box-sizing: content-box;
187 display: flex; 189 display: flex;
188 align-items: center; 190 align-items: center;
189 justify-content: space-around; 191 justify-content: space-around;
@@ -192,7 +194,12 @@ export default { @@ -192,7 +194,12 @@ export default {
192 font-size: 14px; 194 font-size: 14px;
193 text-align: left; 195 text-align: left;
194 flex:1; 196 flex:1;
195 - margin:10px 20px; 197 + padding:10px 20px;
  198 + border:1px solid #ccc;
  199 + display: flex;
  200 + flex-flow: column;
  201 + justify-content: space-around;
  202 +
196 } 203 }
197 .progress-title-proposal{ 204 .progress-title-proposal{
198 margin-top:20px; 205 margin-top:20px;
@@ -5,6 +5,9 @@ @@ -5,6 +5,9 @@
5 {{ optionsSetup.titleName }} 5 {{ optionsSetup.titleName }}
6 </div> 6 </div>
7 <div class="systemContainer" :style="containerStyle"> 7 <div class="systemContainer" :style="containerStyle">
  8 + <div class="system-item system-item-img">
  9 + <img :src="imgStyle.infoImageAdress" alt="">
  10 + </div>
8 <div class="system-item" :style="itemStyle" v-for="item in systemData"> 11 <div class="system-item" :style="itemStyle" v-for="item in systemData">
9 <div class="system-img"><img :src="'/src/assets/images/monitor/capacityAnalysis/'+item.code+'.png'" alt=""></div> 12 <div class="system-img"><img :src="'/src/assets/images/monitor/capacityAnalysis/'+item.code+'.png'" alt=""></div>
10 <div class="system-info" :style="titleProposalStyle"> 13 <div class="system-info" :style="titleProposalStyle">
@@ -51,7 +54,8 @@ export default { @@ -51,7 +54,8 @@ export default {
51 //图片样式 54 //图片样式
52 imgStyle(){ 55 imgStyle(){
53 return{ 56 return{
54 - imageAdress:this.optionsSetup.imageAdress 57 + imageAdress:this.optionsSetup.imageAdress,
  58 + infoImageAdress:this.optionsSetup.infoImageAdress
55 } 59 }
56 }, 60 },
57 //横排竖排样式 61 //横排竖排样式
@@ -83,6 +87,7 @@ export default { @@ -83,6 +87,7 @@ export default {
83 return{ 87 return{
84 'display':this.optionsSetup.isTitle?'flex':'none', 88 'display':this.optionsSetup.isTitle?'flex':'none',
85 'text-align':this.optionsSetup.textAlign, 89 'text-align':this.optionsSetup.textAlign,
  90 + 'justify-content':this.optionsSetup.textAlign=='left'?'start':this.optionsSetup.textAlign=='center'?'center':'flex-end',
86 'font-size':this.optionsSetup.titleFontSize+'px', 91 'font-size':this.optionsSetup.titleFontSize+'px',
87 color: this.optionsSetup.titleColor, 92 color: this.optionsSetup.titleColor,
88 'font-weight': this.optionsSetup.titleFontWeight 93 'font-weight': this.optionsSetup.titleFontWeight
@@ -201,6 +206,7 @@ export default { @@ -201,6 +206,7 @@ export default {
201 width: 100%; 206 width: 100%;
202 display: flex; 207 display: flex;
203 align-items: center; 208 align-items: center;
  209 + margin-bottom: 10px;
204 } 210 }
205 .icon-title{ 211 .icon-title{
206 margin-right:5px; 212 margin-right:5px;
@@ -210,7 +216,7 @@ export default { @@ -210,7 +216,7 @@ export default {
210 margin:10px 20px; 216 margin:10px 20px;
211 } 217 }
212 .system-info{ 218 .system-info{
213 - padding:10px 5px; 219 + padding:20px 5px 10px;
214 display: flex; 220 display: flex;
215 align-items: center; 221 align-items: center;
216 justify-content: center; 222 justify-content: center;