Przeglądaj źródła

受控文件仅查阅时禁止复制

shenqilong 1 rok temu
rodzic
commit
75ab6765a5

+ 6 - 1
src/business/platform/file/attachment/editFile/editor.vue

@@ -20,6 +20,10 @@ export default {
         operation_status: {
             type: String,
             default: ''
+        },
+        copy: {
+            type: Boolean,
+            default: false
         }
     },
     data () {
@@ -88,7 +92,8 @@ export default {
                         print: this.operation_status !== 'fileTraining',
                         edit: this.operation_status !== 'fileTraining',
                         fillForms: this.operation_status !== 'fileTraining',
-                        review: this.operation_status !== 'fileTraining'
+                        review: this.operation_status !== 'fileTraining',
+                        copy: this.copy
                     },
                     url: option.url
                 },

+ 5 - 1
src/business/platform/file/attachment/editFile/fView.vue

@@ -8,7 +8,7 @@
 -->
 <template>
     <div>
-        <editor ref="editor" :option="option" :operation_status="operation_status" @updateFile="updateFile" @hadLoadedFile="hadLoadedFile" />
+        <editor ref="editor" :option="option" :operation_status="operation_status" :copy="copy" @updateFile="updateFile" @hadLoadedFile="hadLoadedFile" />
     </div>
 </template>
 
@@ -28,6 +28,10 @@ export default {
         operation_status: {
             type: String,
             default: ''
+        },
+        copy: {
+            type: Boolean,
+            default: false
         }
     },
     data () {

+ 1 - 8
src/views/component/fileTraining/index.vue

@@ -162,9 +162,9 @@
                 ><fView
                     v-if="refresh"
                     ref="fvView"
-                    :class="updateShow?'':'nocopy'"
                     :option-file="optionFile"
                     :operation_status="operation_status"
+                    :copy="updateShow"
                     @hadLoadedFile="hadLoadedFile"
                 /></el-col>
             </el-row>
@@ -797,13 +797,6 @@ export default {
 //     display: inline-block;
 //     margin-left: 60px;
 // }
-.nocopy{
-    user-select:none;
-    -moz-user-select:none;
-    -webkit-user-select:none;
-    -ms-user-select:none;
-    -khtml-user-select:none;
-}
 
 </style>