index.vue 3.09 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 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 38 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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
<template>
	<div class="dustbin">
		<div class="eibs-dustbin">
			<div class="dustbin-core" slot="reference" @click="dustbinDialogShow">
				<i class="el-icon-delete"></i>
			</div>
		</div>
		<!-- <el-dialog :visible.sync="dialogVisible" title="垃圾桶" width="90%" > -->
       	<m-infsea :model="model"  ref="infsea" />
		<!-- </el-dialog> -->

    	<nodeStatusDialog ref="nodeStatus"  :activities="activities"/>
	</div>
</template>
<script>
import infsea from './infsea.vue'
import commonFunctions from "~/mixin/commonFunctions.js";
import Api from '~/service/Api';
import nodeStatusDialog from './nodeStatusDialog.vue'
export default {
  components: {
    "m-infsea": infsea,
    nodeStatusDialog,
  },
  provide() {
    return {
      root: this
    };
	},
  data() {
    return {
      model:{
          trncorco: {
            ownref: '', //  Reference		.trncorco.ownref
            inidatfro: new Date(), //  Date of entry of Transaction		.trncorco.inidatfro
            inidattil: new Date(), //  Date of entry of Transaction until		.trncorco.inidattil
            trnstm: '', //  List of transaction sfor display		.trncorco.trnstm
            dflg: '', //  国内证标志		.trncorco.dflg
            selinr: {},
          },
          atp: {
            cod: '', //  Transaction Type 		.atp.cod
          },
          atptxt: '', //  Transaction Text		.atptxt
          usrcon: '', //  User		.usrcon
          bchcon: '', //  Branch		.bchcon
          channel: [], // .channel
          relflg: [],
          relflg2: '',
          orderntf:'',
          yptntf:'',
          remark:'',
          confirmType:'',
          codeLev:'',
      },
          activities:[],
          nodeStatusVisible:false,
       dialogVisible: true
    };
  },
  methods: {
    dustbinDialogShow() {
        this.dialogVisible = true;
        if(this.$refs.infsea){
          this.$refs.infsea.handleSearch();
        }   
    },
    async onNodeStatus(index, row) {
			this.$refs.nodeStatus.nodeStatusVisible = true;
			let params = {
				queinr: row.inr
			}
			let res = await Api.post("/public/quesel/getAllOreList", params);
			if (res.respCode == SUCCESS) {
				this.activities = res.data;
      }
		},
  },

  mounted() {
   const that = this;
		const dom = this.$el.querySelector('.eibs-dustbin');
    const minTop = 60,
      maxTop = document.body.clientHeight - dom.offsetHeight - 40;
    dom.onmousedown = e => {
      const disY = e.clientY - dom.offsetTop;
      document.onmousemove = function(e) {
        let top = e.clientY - disY;
        if (top > maxTop) {
          top = maxTop;
        } else if (top < minTop) {
          top = minTop;
        }
        dom.style.top = top + "px";
      };
      document.onmouseup = function(e) {
        document.onmousemove = null;
        document.onmouseup = null;
      };
    };
  }
};
</script>
<style scoped lang="less">
.eibs-dustbin {
  z-index: 1000;
  user-select: auto;
  width: 32px;
  height: 68px;
  position: fixed;
  bottom: 10px;
  right: 0;
}
.dustbin-core {
  background: var(--error-color);
  border-radius: 4px;
  width: 28px;
  padding: 6px;
  color: #fff;
  cursor: pointer;
}
</style>