| | |
| | | <template> |
| | | <el-row type="flex"> |
| | | <el-col :style="{width:isCollapse?'0': '280px',position:'relative'}" v-show="!isCollapse"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="指标库管理" :bodyStyle="bodyStyle"> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | modelCode="statistic_index_model" |
| | | :showOpt="true" |
| | | :auth="false"/> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | modelCode="statistic_index_model" |
| | | :showOpt="true" |
| | | :auth="false" |
| | | /> |
| | | </basic-container> |
| | | <img src="~@/assets/image/rectangle.png" alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse"> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse"/> |
| | | <el-col :style="{width:isCollapse? 'calc(100% - 48px)':'calc(100% - 280px)',paddingLeft:isCollapse? 0:'14px'}"> |
| | | <basic-container :title="currentNode ? currentNode.label+'--节点配置' : '节点配置'" :bodyStyle="bodyStyleRight"> |
| | | <IndexNodeSetting ref="modelNodeSetting"/> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container |
| | | :title="currentNode ? currentNode.label + '--节点配置' : '节点配置'" |
| | | :bodyStyle="bodyStyleRight" |
| | | > |
| | | <IndexNodeSetting ref="modelNodeSetting" /> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </template> |
| | | <script> |
| | | import ModelNode from "../modelNode/modelNode"; |
| | | import IndexNodeSetting from "./indexNodeSetting"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from '@/components/shrink/index.vue' |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: {IndexNodeSetting, ModelNode,ShrinkCol}, |
| | | components: { IndexNodeSetting, ModelNode, ShrinkCol }, |
| | | mixins: [mixins], |
| | | created() { |
| | | }, |
| | | created() {}, |
| | | data() { |
| | | return { |
| | | modelData: '', |
| | | modelData: "", |
| | | isCollapse: false, |
| | | bodyStyleRight: {}, |
| | | currentNode: '' |
| | | } |
| | | currentNode: "" |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + 'px'; |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 155 + 'px' |
| | | height: window.innerHeight - 185 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | changeNode: function(node) { |
| | | if (node) { |
| | | this.currentNode = node |
| | | this.currentNode = node; |
| | | } |
| | | this.$refs.modelNodeSetting.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | manageModel: function() { |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | changeModel: function(item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // 点击按钮,切换折叠与展开 |
| | | toggleCollapse() { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |