index.vue 11.2 KB
Newer Older
fukai committed
1
<template>
潘际乾 committed
2
  <el-container
yangxiaolei committed
3 4
    style="background-color: #e8e8e8;height: 100%;
    position: relative; margin: 0; padding-bottom: 8px"
潘际乾 committed
5 6 7 8
  >
    <el-header style="padding: 0">
      <headerCom></headerCom>
    </el-header>
liushikai committed
9
    <!-- <div style="height: 8px"></div> -->
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 38
    <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
39
        <m-undisabled style="height: 100%;">
40 41 42 43 44 45 46 47 48 49 50 51
          <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>
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
          <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>
68 69 70 71 72 73 74 75 76 77 78 79
          <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
80 81 82
          <div v-if="currentTool === 'tool-businessoffer'">
            <businessoffer ref="businessoffer" />
          </div>
83 84 85 86 87 88 89 90 91 92 93 94
          <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
95 96 97
          <div v-if="currentTool === 'cms'" style="height: 100%;">
            <cms></cms>
          </div>
98 99 100 101 102 103 104 105
        </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>
yangxiaolei committed
106 107
    <el-container style="height: 100%;
    position: relative;">
潘际乾 committed
108
      <el-aside width="240px" style="background-color: white">
潘际乾 committed
109 110
        <sideMenu></sideMenu>
      </el-aside>
yangxiaolei committed
111
      <div style="width: 0.5px;background-color: #B31C2A;opacity: 0.2;"></div>
112 113
      <el-main class="m-app-main">
        <tagViews></tagViews>
yangxiaolei committed
114
        <div style="height: 0.5px;background-color: #B31C2A;opacity: 0.2;"></div>
潘际乾 committed
115
        <business></business>
116
        <toolbars @openTool="handleChooseTool"></toolbars>
潘际乾 committed
117
      </el-main>
fukai committed
118
    </el-container>
潘际乾 committed
119
  </el-container>
fukai committed
120 121 122
</template>

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

潘际乾 committed
130 131
import cms from "~/components/Cms"
import calculator from "~/widget/Calculator"
132 133 134 135 136 137
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
138

fukai committed
139
export default {
潘际乾 committed
140
  name: "Layout",
141 142 143 144
  components: { 
    headerCom, 
    sideMenu, 
    tagViews, 
145
    business,
146
    toolbars, 
147
    calculator,
潘际乾 committed
148
    cms,
149 150 151 152 153 154
    account,
    swiftcode,
    finishedtask,
    feetype,
    sendMessageQuery,
    receiveMessageQuery,
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 245 246
    '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
247
    },
248
  }
潘际乾 committed
249
};
fukai committed
250 251 252
</script>

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

jianglong committed
273 274 275 276 277 278 279 280 281 282



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

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

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

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

@media screen and (max-width: 1199px) {
   
    .el-aside {
307
      width: 170px!important;
jianglong committed
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
.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;
yangxiaolei committed
335
  background-color: #B31C2A;
336
  /* border:0px; */
yangxiaolei committed
337
  border: 1px solid #B31C2A;
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 423 424
}
.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
425
</style>