contextMenu.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <div>
  3. <myContextMenu @operateDirectory="getMethod"></myContextMenu>
  4. <contrast ref="contrast"></contrast>
  5. <!-- 批注 -->
  6. <annotation ref="annotation"></annotation>
  7. </div>
  8. </template>
  9. <script>
  10. import {mapGetters} from 'vuex'
  11. import contrast from '@/views/components/dialog/menuDialog/contrast.vue'
  12. import annotation from '@/views/components/dialog/menuDialog/annotation.vue'
  13. export default {
  14. components: {
  15. contrast,
  16. annotation,
  17. },
  18. props: {},
  19. data() {
  20. return {
  21. };
  22. },
  23. watch: {},
  24. computed: {
  25. ...mapGetters(["highlight"])
  26. },
  27. created() {},
  28. mounted() {
  29. window.selectMark = this.selectMark
  30. },
  31. methods: {
  32. //点击图标回显数据
  33. selectMark(id, selectType) {
  34. var Id = id.substring(1,id.length)
  35. if (selectType=='p') {//批注
  36. var index = this.piZhuContrastList.findIndex(item => {
  37. if (item.id == Id) {
  38. // 清空currentSelectObj,否则Id与id同时存在
  39. this.$store.commit("SET_PATENT_INDEX", item)
  40. }
  41. return item.id == Id
  42. })
  43. if (index != -1) {
  44. }
  45. } else if (selectType == 'c') {//对比
  46. let a=this.highlight.contrastList.find(item => {
  47. return item.id==Id
  48. })
  49. a.column = a.fieldName
  50. a.text = a.evidenceText
  51. this.$store.commit("SET_PATENT_INDEX", a)
  52. this.contrast()
  53. } else if (selectType == 'o') {
  54. }
  55. },
  56. getMethod(type){
  57. if(this[type]){
  58. this[type]()
  59. }
  60. },
  61. //波浪线
  62. wave(){
  63. console.log('波浪线')
  64. },
  65. //下划线
  66. underscore(){
  67. console.log('下划线')
  68. },
  69. //高亮
  70. addHighlight(){
  71. console.log('高亮')
  72. },
  73. //批注
  74. mark(){
  75. console.log('批注')
  76. this.$refs.annotation.open()
  77. },
  78. //修改颜色
  79. changeColor(){
  80. console.log('修改颜色')
  81. },
  82. //对比
  83. contrast(){
  84. console.log('对比')
  85. this.$refs.contrast.open()
  86. },
  87. //删除批注
  88. deleteMark(){
  89. console.log('删除')
  90. },
  91. },
  92. };
  93. </script>
  94. <style lang="scss" scoped>
  95. </style>