Browse Source

不能复制

yuwandanmian 2 years ago
parent
commit
6392a73dd2

+ 4 - 1
src/views/allcase/caseViews.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="MyDiv">
+  <div id="MyDiv" :class="{'nocopy': $route.query.status }">
     <div class="header">
       <el-button @click="getback">返回</el-button>
     </div>
@@ -418,6 +418,9 @@ export default {
   margin: 0;
   padding: 0 !important;
 }
+.nocopy {
+  user-select: none;
+}
 .header {
   margin: 10px 20px;
   text-align: right;

+ 4 - 1
src/views/data/query/details.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="MyDiv">
+  <div id="MyDiv" :class="{'nocopy': $route.query.status }">
     <div class="header">
       <el-button type="success" v-if="!ifFile" @click="funEdit">编辑</el-button>
       <el-button type="warning" v-if="ifFile" @click="funNext">保存</el-button>
@@ -1571,6 +1571,9 @@ export default {
   margin: 0;
   padding: 0;
 }
+.nocopy {
+  user-select: none;
+}
 .header {
   margin: 15px 20px;
   text-align: right;

+ 2 - 1
src/views/searchSystem/components/BLSearch.vue

@@ -520,7 +520,8 @@ export default {
       this.storageSet("formData1", JSON.stringify(this.formData1));
       this.storageSet("choice", JSON.stringify(this.choice));
       this.storageSet("getData", val);
-      this.goto("/caseViews");
+      // status = 1 代表不能复制文本
+      this.$router.push({ path: '/caseViews', query: { status: 1} })
     },
     funCeal() {
       this.$refs.multipleTable.clearSelection();

+ 2 - 1
src/views/searchSystem/components/CaseHomeSearch.vue

@@ -666,7 +666,8 @@ export default {
     funGoto(val) {
       this.storageSet('getData', val);
       // this.goto('/details');
-      this.$router.push('/details');
+      // status = 1 代表不能复制文本
+      this.$router.push({ path: '/details', query: { status: 1 }});
 
     },
     funBlur() {

+ 1 - 0
src/views/searchSystem/index.vue

@@ -46,6 +46,7 @@ export default {
 	margin:0 auto
 }
 .box {
+  user-select: none;
   padding: 16px;
   .box_wrapper {
     padding: 16px;