index.vue 10.1 KB
Newer Older
fukai committed
1
<template>
潘际乾 committed
2 3 4 5 6 7
  <el-container
    style="background-color: #e8e8e8; margin: 0; padding-bottom: 8px"
  >
    <el-header style="padding: 0">
      <headerCom></headerCom>
    </el-header>
liushikai committed
8
    <!-- <div style="height: 8px"></div> -->
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
    <vue-draggable-resizable
      v-if="dragShow"
      :w="size.w"
      :h="size.h"
      :x="250"
      :y="100"
      class="m-draggable"
      :parent="true"
      :disable-user-select="false"
      :draggable="true"
      :drag-cancel="'.'+ dragStyle"
    >
      <div
        :class="{'m-enable-draggable-header': true,'m-enable-draggable-header-min': dragStatus == 0}"
      >
        <div class="m-draggable-header">
          <span class="m-tool-title">{{toolTitle}}</span>
          <i class="el-icon-minus" v-show="dragStatus !== 0" @click="changeSize(0)"></i>
          <i class="el-icon-copy-document" v-show="dragStatus !== 1" @click="changeSize(1)"></i>
          <i class="el-icon-full-screen" v-show="dragStatus !== 2" @click="changeSize(2)"></i>
          <i class="el-icon-close" @click="closeDraggable"></i>
        </div>
      </div>
      <div
        style="margin:-15px -10px -15px -10px;  border: 1px solid #f7fbfd; height: 15px;  
            width: 1000; background-color:#f7fbfd; z-index: -1 !important;"
        v-show="dragStatus !== 0"
      ></div>
      <div :draggable="false" :class="dragStyle" v-show="dragStatus !== 0">
潘际乾 committed
38
        <m-undisabled style="height: 100%;">
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
          <div v-if="currentTool === 'tool-caculate'">
            <calculator ref="calculator" />
          </div>
          <div v-if="currentTool === 'tool-search'">
            <highvalue ref="highvalue" />
          </div>
          <div v-if="currentTool === 'tool-telexCode'">
            <telexCode ref="telexCode" />
          </div>
          <div v-if="currentTool === 'tool-account'">
            <account ref="account" />
          </div>
          <div v-if="currentTool === 'tool-swiftcode'">
            <swiftcode ref="swiftcode" />
          </div>
          <div v-if="currentTool === 'tool-finishedtask'">
            <finishedtask ref="finishedtask" />
          </div>
          <div v-if="currentTool === 'tool-exchangerate'">
            <exchangerate ref="exchangerate" />
          </div>
          <div v-if="currentTool === 'tool-forwardexchangerate'">
            <forwardexchangerate ref="forwardexchangerate" />
          </div>
          <div v-if="currentTool === 'tool-holiday'">
            <holiday ref="holiday" />
          </div>
          <div v-if="currentTool === 'tool-interestrate'">
            <interestrate ref="interestrate" />
          </div>
潘际乾 committed
69 70 71
          <div v-if="currentTool === 'tool-businessoffer'">
            <businessoffer ref="businessoffer" />
          </div>
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
          <div v-if="currentTool === 'tool-vatinvoic'">
            <vatinvoic ref="vatinvoic" />
          </div>
          <div v-if="currentTool === 'tool-accttradedetails'">
            <accttradedetails ref="accttradedetails" />
          </div>
          <div v-if="currentTool === 'tool-feetype'">
            <feetype ref="feetype" />
          </div>
          <div v-if="currentTool === 'tool-sendMessageQuery'">
            <sendMessageQuery ref="sendMessageQuery" />
          </div>
          <div v-if="currentTool === 'tool-receiveMessageQuery'">
            <receiveMessageQuery ref="receiveMessageQuery" />
          </div>
          <div v-if="currentTool === 'tool-innerAccountBal'">
            <innerAccountBal ref="innerAccountBal" />
          </div>
          <!-- <div v-if="currentTool === 'tool-txSerialNo'">
              <txSerialNo ref="txSerialNo"/>
          </div>-->
潘际乾 committed
93 94 95
          <div v-if="currentTool === 'cms'" style="height: 100%;">
            <cms></cms>
          </div>
96 97 98 99 100 101 102 103
        </m-undisabled>
      </div>
      <div
        class="m-enable-draggable-header"
        style="height:11px; padding:0px; margin-top:0px; margin-bottom=0px;"
        v-show="dragStatus !== 0"
      ></div>
    </vue-draggable-resizable>
潘际乾 committed
104
    <el-container>
潘际乾 committed
105
      <el-aside width="240px" style="background-color: white">
潘际乾 committed
106 107
        <sideMenu></sideMenu>
      </el-aside>
liushikai committed
108
      <div style="width: 2px"></div>
109 110
      <el-main class="m-app-main">
        <tagViews></tagViews>
liushikai committed
111
        <div style="height: 2px"></div>
潘际乾 committed
112
        <business></business>
113
        <toolbars @openTool="handleChooseTool"></toolbars>
潘际乾 committed
114
      </el-main>
fukai committed
115
    </el-container>
潘际乾 committed
116
  </el-container>
fukai committed
117 118 119
</template>

<script>
潘际乾 committed
120 121
import headerCom from "./Header";
import sideMenu from "./SideMenu";
潘际乾 committed
122
import tagViews from "./components/TagsView";
潘际乾 committed
123
import business from "../Business";
潘际乾 committed
124
import toolbars from "~/components/Toolbars";
125 126
import VueDraggableResizable from 'vue-draggable-resizable'

潘际乾 committed
127 128
import cms from "~/components/Cms"
import calculator from "~/widget/Calculator"
潘际乾 committed
129

fukai committed
130
export default {
潘际乾 committed
131
  name: "Layout",
132 133
  components: { headerCom, sideMenu, tagViews, business, toolbars, 
    calculator,
潘际乾 committed
134
    cms,
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
    'vue-draggable-resizable': VueDraggableResizable,
  },
  data(){
    return {
      isShow: false,
      currentTool: '',
      toolTitle: '',
      size: {
        w: 800,
        h: 477,
      },
      dragStyle: 'm-draggable-content',
      dragShow: false,
      dragStatus: 1 // 0 最小化 1 中等 2 最大化
    }
  },
  methods:{
    getIsShow(data) {
      this.isShow = data
      console.log(this.isShow)
    },
    handleChooseTool(e) {
      this.dragShow = true
      this.currentTool = e.target.id
      this.changeSize(1)
      // 显示工具栏标题
      if (this.currentTool === 'tool-caculate') {
        this.toolTitle = "计算器";
      } else if (this.currentTool === 'tool-search') {
        this.toolTitle = "大额支付行号查询";
      } else if (this.currentTool === 'tool-telexCode') {
        this.toolTitle = "电报码查询";
      } else if (this.currentTool === 'tool-account') {
        this.toolTitle = "账户查询";
      } else if (this.currentTool === 'tool-swiftcode') {
        this.toolTitle = "SwiftCode查询";
      } else if (this.currentTool === 'tool-finishedtask') {
        this.toolTitle = "业务查询";
      } else if (this.currentTool === 'tool-exchangerate') {
        this.toolTitle = "即期牌价查询";
      } else if (this.currentTool === 'tool-holiday') {
        this.toolTitle = "节假日查询";
      } else if (this.currentTool === 'tool-interestrate') {
        this.toolTitle = "利率查询";
      } else if (this.currentTool === 'tool-vatinvoic') {
        this.toolTitle = "增值税发票查询";
      } else if (this.currentTool === 'tool-accttradedetails') {
        this.toolTitle = "账户交易明细查询";
      } else if (this.currentTool === 'tool-forwardexchangerate') {
        this.toolTitle = "远期牌价查询";
      } else if (this.currentTool === 'tool-feetype') {
        this.toolTitle = "费用查询";
      } else if (this.currentTool === 'tool-txSerialNo') {
        this.toolTitle = "交易流水号查询";
      } else if (this.currentTool === 'tool-sendMessageQuery') {
        this.toolTitle="发报查询";
        this.sendMessageQuery = "发报查询";
      } else if (this.currentTool === 'tool-receiveMessageQuery') {
        this.toolTitle="收报查询";
        this.receiveMessageQuery = "收报查询";
      } else if (this.currentTool === 'tool-innerAccountBal') {
        this.toolTitle = "内部户可用余额查询";
      }

    },
    closeDraggable() {
      this.dragShow = false
      this.currentTool = ''
    },
    changeSize(tag) {
      this.dragStatus = tag

      if (this.dragStatus == 0) {
        this.size = {
          w: 250,
          h: 20,
        }
      }
      if (this.dragStatus == 2) {
        this.size = {
          w: 1200,
          h: 777,
        }
        this.dragStyle = 'm-draggable-content-large'
      }
      if (this.dragStatus == 1) {
        this.size = {
          w: 800,
          h: 477,
        }
        this.dragStyle = 'm-draggable-content'
      }
潘际乾 committed
227
    },
228
  }
潘际乾 committed
229
};
fukai committed
230 231 232
</script>

<style>
潘际乾 committed
233
.m-app-main {
潘际乾 committed
234
  background-color: var(--bgcolor);
潘际乾 committed
235 236 237 238 239
  padding: 0;
  position: relative;
  height: 100%;
  box-sizing: border-box;
  margin-right: 10px;
潘际乾 committed
240 241 242
  flex: 1;
  display: flex;
  flex-direction: column;
潘际乾 committed
243
}
244 245 246
.el-aside {
  height: 100%;
  transition: width 300ms;
潘际乾 committed
247 248
  /* overflow: hidden; */
  overflow: unset;
潘际乾 committed
249
  /* padding-bottom: 68px; */
250 251
  box-sizing: border-box;
}
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366

.m-draggable {
  border-radius: 2px;
  border: 1px solid #ccc;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  z-index: 10000 !important;
  position: absolute;
  top: 0;
  /* left: 200px; */
  padding: 10px;
  background-color: #f7fbfd;
}

.m-draggable-header {
  height: 26px;
  width: 100%;
  text-align: right;
}
.m-enable-draggable-header {
  margin: -10px;
  height: 35px;
  width: 1000;
  padding: 10px 20px 10px 20px;
  z-index: 10000 !important;
  background-color: #409eff;
  /* border:0px; */
  border: 1px solid #409eff;
}
.m-draggable-content {
  height: 420px;
  overflow-y: auto;
}
.m-draggable-content-large {
  height: 720px;
  overflow-y: auto;
}
.m-draggable-header .el-icon-minus {
  cursor: pointer;
  color: #fff;
}
.m-enable-draggable-header-min {
  padding: 10px 20px 0 20px;
}
.m-enable-draggable-header .el-icon-close {
  cursor: pointer;
  color: #fff;
}
.m-enable-draggable-header .el-icon-full-screen {
  cursor: pointer;
  color: #fff;
}
.m-enable-draggable-header .el-icon-copy-document {
  cursor: pointer;
  color: #fff;
}
.m-toolbar {
  position: fixed;
  top: 200px;
  right: 0;
  z-index: 10000;
}

.m-toolbar-core {
  background: var(--themecolor);
  border-radius: 4px;
  width: 12px;
  padding: 8px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.m-toolbar-detail {
  padding: 0px;
  font-size: 12px;
  position: absolute;
  top: -20px;
  right: 32px;
  width: 150px;
  z-index: 10000;
}

.m-toolbar-detail ul {
  margin-left: 5px;
  margin-right: 5px;
  padding: 0;
  padding: 5px 0;
  border-radius: 2px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  background: #fff;
  cursor: pointer;
}

.m-toolbar-detail li {
  list-style: none;
  padding: 8px 15px;
}

.m-toolbar-detail li:hover {
  background: var(--themecolor);
  color: #fff;
}

.m-toolbar .m-toolbar-detail {
  display: none;
}
.m-tool-title {
  color: #fff;
  text-align: left;
  float: left;
}
.m-toolbar:hover .m-toolbar-detail {
  display: block;
}
潘际乾 committed
367
</style>