Showing
4 changed files
with
34 additions
and
14 deletions
1 | <div :style="{'height':'380px','padding':'6px'}"> | 1 | <div :style="{'height':'380px','padding':'6px'}"> |
2 | - <slot name="title"> | ||
3 | - <div style="text-align: left;margin-bottom: 10px;padding-left: 10px;">对比分析场景</div> | ||
4 | - </slot> | 2 | + <div style="text-align: left;margin-bottom: 10px;padding-left: 10px;font-weight: bold"> |
3 | + <slot name="title"> | ||
4 | + 对比分析场景 | ||
5 | + </slot> | ||
6 | + </div> | ||
7 | + | ||
5 | 8 | ||
6 | <el-row :gutter="5"> | 9 | <el-row :gutter="5"> |
7 | <el-col :span="4"> | 10 | <el-col :span="4"> |
8 | - <div style="display: flex;flex-wrap: wrap;width: 100%"> | 11 | + <div style="display: flex;flex-wrap: wrap;width: 100%;padding-left: 10px;"> |
9 | <slot name="lineName"> | 12 | <slot name="lineName"> |
10 | 分析名称 | 13 | 分析名称 |
11 | </slot> | 14 | </slot> |
@@ -139,12 +139,12 @@ | @@ -139,12 +139,12 @@ | ||
139 | <div class="title"> | 139 | <div class="title"> |
140 | <i class="iconfont icon-liebiaomoshi"/> 资产信息 | 140 | <i class="iconfont icon-liebiaomoshi"/> 资产信息 |
141 | 141 | ||
142 | - <el-dropdown size="mini" split-button @click="assetsAdd('bastion',`新建${icon['bastion'].name}资产`)" style="margin-left: 20px"> | 142 | + <el-dropdown v-if="Object.keys(icon).length > 0" size="mini" split-button @click="assetsAdd('bastion',`新建${icon['bastion'].name}资产`)" style="margin-left: 20px"> |
143 | <i class="icon el-icon-plus"/>添加{{icon['bastion'].name}} | 143 | <i class="icon el-icon-plus"/>添加{{icon['bastion'].name}} |
144 | <template #dropdown> | 144 | <template #dropdown> |
145 | <div style="max-height: 300px;overflow-y: auto"> | 145 | <div style="max-height: 300px;overflow-y: auto"> |
146 | <el-dropdown-menu> | 146 | <el-dropdown-menu> |
147 | - <el-dropdown-item v-for="(v,k) in icon" @click="assetsAdd(k,`新建${icon[k].name}资产`)"> | 147 | + <el-dropdown-item v-for="(v,k) in icon" @click="assetsAdd(k,`新建${v.name}资产`)"> |
148 | 添加{{v.name}} | 148 | 添加{{v.name}} |
149 | </el-dropdown-item> | 149 | </el-dropdown-item> |
150 | </el-dropdown-menu> | 150 | </el-dropdown-menu> |
@@ -371,6 +371,7 @@ export default { | @@ -371,6 +371,7 @@ export default { | ||
371 | } | 371 | } |
372 | } | 372 | } |
373 | let saveAnalysis = () => { | 373 | let saveAnalysis = () => { |
374 | + | ||
374 | let formVal = form.value; | 375 | let formVal = form.value; |
375 | let parentName = formVal.parentName; | 376 | let parentName = formVal.parentName; |
376 | let parentId = formVal.parentId; | 377 | let parentId = formVal.parentId; |
@@ -426,9 +427,29 @@ export default { | @@ -426,9 +427,29 @@ export default { | ||
426 | proxy.$http.post(url, addParam, function (res) { | 427 | proxy.$http.post(url, addParam, function (res) { |
427 | if (res && res.success) { | 428 | if (res && res.success) { |
428 | proxy.$global.showMsg("添加成功!"); | 429 | proxy.$global.showMsg("添加成功!"); |
429 | - setTimeout(function () { | ||
430 | - window.top.location.href = window.top.location.origin + "/#/analysis/index" | ||
431 | - }, 1500) | 430 | + |
431 | + onReset(); | ||
432 | + // 清空数据 | ||
433 | + form.value = { | ||
434 | + parentId: '', | ||
435 | + parentName: '', | ||
436 | + desc: '', | ||
437 | + scene: { | ||
438 | + name: '', | ||
439 | + desc: '', | ||
440 | + sort: 1, | ||
441 | + timeScope: '', | ||
442 | + frequency: '', | ||
443 | + }, | ||
444 | + resourceList: [] | ||
445 | + } | ||
446 | + // 已选择列表 | ||
447 | + tabFirstList.value = []; | ||
448 | + // 关闭谈画框 | ||
449 | + showDialogForm(false); | ||
450 | + | ||
451 | + // window.top.location.href = window.top.location.origin + "/#/analysis/view/id=105" | ||
452 | + window.top.location.href = window.top.location.origin + '/#/' + res.str; | ||
432 | } | 453 | } |
433 | }); | 454 | }); |
434 | } | 455 | } |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <div v-for="(item,index) in childArr"> | 3 | <div v-for="(item,index) in childArr"> |
4 | <analysis-line :legend="lineChart[item.node.id].legend" :xAxis="lineChart[item.node.id].xAxis" :series="lineChart[item.node.id].series"> | 4 | <analysis-line :legend="lineChart[item.node.id].legend" :xAxis="lineChart[item.node.id].xAxis" :series="lineChart[item.node.id].series"> |
5 | <template #title="scope" > | 5 | <template #title="scope" > |
6 | - {{ index == 0 ? item.node.configName : '' }} | 6 | + {{ index == 0 ? parentInfo.configName : '' }} |
7 | </template> | 7 | </template> |
8 | <template #lineName="scope"> | 8 | <template #lineName="scope"> |
9 | {{ item.node.configName }} | 9 | {{ item.node.configName }} |
@@ -23,10 +23,6 @@ | @@ -23,10 +23,6 @@ | ||
23 | </template> | 23 | </template> |
24 | </analysis-line> | 24 | </analysis-line> |
25 | <el-divider content-position="left"> | 25 | <el-divider content-position="left"> |
26 | - <!--<div> | ||
27 | - <i class="iconfont icon-liebiaomoshi"></i> | ||
28 | - <span style="margin-left: 5px">查询条件</span> | ||
29 | - </div>--> | ||
30 | </el-divider> | 26 | </el-divider> |
31 | </div> | 27 | </div> |
32 | </div> | 28 | </div> |
-
Please register or login to post a comment