SimilarListDrag.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <div
  3. v-if="searchType ==='standard'&& similarList.length > 0&&isShow"
  4. class="similarBox clearfix"
  5. id="dragModalWrap"
  6. >
  7. <div class="tabTitle" id="dragModalTitle" @mousedown="dragAdd($event)" @mouseup="dragDel">
  8. 相似词数据
  9. </div>
  10. <div class="tableBox">
  11. <table class="similarTable">
  12. <tr>
  13. <td>序号</td>
  14. <td>术语</td>
  15. <td>归属</td>
  16. </tr>
  17. <tr v-for="(item,index) in similarList" :key="item.conceptId">
  18. <td>{{index+1}}</td>
  19. <td>{{item.name}}</td>
  20. <td>{{item.isConceptRemark}}</td>
  21. </tr>
  22. </table>
  23. </div>
  24. <div class="closeTableBox"
  25. >
  26. <span class="closeTable" @click="closeTable">关闭</span>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. import utils from '@api/utils.js';
  32. export default {
  33. name: "SimilarListDrag",
  34. props: ["searchType","similarList","isShow"],
  35. data() {
  36. return{
  37. }
  38. },
  39. methods: {
  40. dragAdd(ev){
  41. utils.dragBox('dragModalWrap','dragModalTitle','add')
  42. },
  43. dragDel(){
  44. utils.dragBox('dragModalWrap','dragModalTitle','del')
  45. },
  46. closeTable(){
  47. this.similarList = []
  48. },
  49. }
  50. }
  51. </script>
  52. <style lang="less" scoped>
  53. .similarBox {
  54. position: fixed;
  55. background: #fff;
  56. width: 400px;
  57. max-height: 280px;
  58. top: 350px;
  59. // border: 1px solid #000;
  60. z-index: 10;
  61. left: 660px;
  62. // top: 0;
  63. box-shadow:0 0 12px #ccc;
  64. }
  65. .tabTitle {
  66. width: 100%;
  67. height: 40px;
  68. line-height: 40px;
  69. font-size: 16px;
  70. font-weight: bold;
  71. cursor: move;
  72. }
  73. .closeTableBox{
  74. position: relative;
  75. height: 35px;
  76. }
  77. .closeTable {
  78. position: absolute;
  79. display: inline-block;
  80. width: 40px;
  81. height: 24px;
  82. line-height: 24px;
  83. border-radius: 5px;
  84. cursor: pointer;
  85. border: 1px solid #000;
  86. box-sizing: border-box;
  87. right: 30px;
  88. top: 5px;
  89. }
  90. .tableBox {
  91. max-height: 200px;
  92. overflow: auto;
  93. padding: 0 30px;
  94. }
  95. .similarTable{
  96. width: 100%;
  97. border-collapse: collapse;
  98. >tr{
  99. height: 30px;
  100. text-align: center;
  101. border: 1px solid #000;
  102. td{
  103. border: 1px solid #000;
  104. width: 135px;
  105. position: relative;
  106. }
  107. }
  108. }
  109. </style>