index.vue 11.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
          <div v-if="currentTool === 'tool-caculate'">
            <calculator ref="calculator" />
          </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>
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
          <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-search'">
            <highvalue ref="highvalue" />
          </div>
          <div v-if="currentTool === 'tool-telexCode'">
            <telexCode ref="telexCode" />
          </div>
67 68 69 70 71 72 73 74 75 76 77 78
          <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
79 80 81
          <div v-if="currentTool === 'tool-businessoffer'">
            <businessoffer ref="businessoffer" />
          </div>
82 83 84 85 86 87 88 89 90 91 92 93
          <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-innerAccountBal'">
            <innerAccountBal ref="innerAccountBal" />
          </div>
          <!-- <div v-if="currentTool === 'tool-txSerialNo'">
              <txSerialNo ref="txSerialNo"/>
          </div>-->
潘际乾 committed
94 95 96
          <div v-if="currentTool === 'cms'" style="height: 100%;">
            <cms></cms>
          </div>
97 98 99 100 101 102 103 104
        </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
105
    <el-container>
潘际乾 committed
106
      <el-aside width="240px" style="background-color: white">
潘际乾 committed
107 108
        <sideMenu></sideMenu>
      </el-aside>
109
      <div style="width: 0.5px;background-color: #1561e0;opacity: 0.2;"></div>
110 111
      <el-main class="m-app-main">
        <tagViews></tagViews>
112
        <div style="height: 0.5px;background-color: #1561e0;opacity: 0.2;"></div>
潘际乾 committed
113
        <business></business>
114
        <toolbars @openTool="handleChooseTool"></toolbars>
潘际乾 committed
115
      </el-main>
fukai committed
116
    </el-container>
潘际乾 committed
117
  </el-container>
fukai committed
118 119 120
</template>

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

潘际乾 committed
128 129
import cms from "~/components/Cms"
import calculator from "~/widget/Calculator"
130 131 132 133 134 135
import account from "~/widget/Account"
import swiftcode from "~/widget/SwiftCode"
import finishedtask from "~/widget/Business"
import feetype from "~/widget/Fee"
import sendMessageQuery from "~/widget/MsgSent"
import receiveMessageQuery from "~/widget/MsgReceived"
潘际乾 committed
136

fukai committed
137
export default {
潘际乾 committed
138
  name: "Layout",
139 140 141 142 143 144
  components: { 
    headerCom, 
    sideMenu, 
    tagViews, 
    business, 
    toolbars, 
145
    calculator,
潘际乾 committed
146
    cms,
147 148 149 150 151 152
    account,
    swiftcode,
    finishedtask,
    feetype,
    sendMessageQuery,
    receiveMessageQuery,
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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
    '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
245
    },
246
  }
潘际乾 committed
247
};
fukai committed
248 249 250
</script>

<style>
潘际乾 committed
251
.m-app-main {
潘际乾 committed
252
  background-color: var(--bgcolor);
潘际乾 committed
253 254 255 256 257
  padding: 0;
  position: relative;
  height: 100%;
  box-sizing: border-box;
  margin-right: 10px;
潘际乾 committed
258 259 260
  flex: 1;
  display: flex;
  flex-direction: column;
潘际乾 committed
261
}
262 263 264
.el-aside {
  height: 100%;
  transition: width 300ms;
潘际乾 committed
265 266
  /* overflow: hidden; */
  overflow: unset;
潘际乾 committed
267
  /* padding-bottom: 68px; */
268 269
  box-sizing: border-box;
}
270

jianglong committed
271 272 273 274 275 276 277 278 279 280



@media screen and (min-width: 2561px) {
    
   .el-aside {
     width: 240px!important;
    }
}

jianglong committed
281
@media screen and (min-width: 1921px) and (max-width: 2560px) {
jianglong committed
282 283
   
    .el-aside {
284
     width: 220px!important;
jianglong committed
285 286 287 288 289 290
    }
}

@media screen and (min-width: 1441px) and (max-width: 1920px) {
   
    .el-aside {
291
     width: 200px!important;
jianglong committed
292 293 294 295 296 297
    }
}

@media screen and (min-width: 1200px) and (max-width: 1440px) {
   
    .el-aside {
298
      width: 190px!important;
jianglong committed
299 300 301 302 303 304
    }
}

@media screen and (max-width: 1199px) {
   
    .el-aside {
305
      width: 170px!important;
jianglong committed
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
.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;
jianglong committed
333
  background-color: #1561e0;
334
  /* border:0px; */
jianglong committed
335
  border: 1px solid #1561e0;
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 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
}
.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
423
</style>