zhaoxiaohai преди 2 години
родител
ревизия
791f986ff3
променени са 1 файла, в които са добавени 18 реда и са изтрити 18 реда
  1. 18 18
      src/SManagement/archives_upload/index.vue

+ 18 - 18
src/SManagement/archives_upload/index.vue

@@ -2,22 +2,22 @@
   <div class="upload">
     <!--头部操作-->
     <Header>
-      <save slot="save" @btnClick="save()" v-if="tool.checkAuth($route.name,'update')"></save>
+      <save slot="save" @btnClick="save()"></save>
     </Header>
     <!--标题 分类-->
-    <Set ref="set" v-if="tool.checkAuth($route.name,'read')"></Set>
+    <Set ref="set"></Set>
     <!--文件列表-->
-    <file-list :attinfos="uploadCacheData.attinfos" v-if="uploadType == '1' || uploadType == '2' && tool.checkAuth($route.name,'read')">
-      <upload slot="upload" @onSuccess="onSuccess" target="archives" :classType="uploadType" v-if="tool.checkAuth($route.name,'update')"></upload>
+    <file-list :attinfos="uploadCacheData.attinfos" v-if="uploadType == '1' || uploadType == '2'">
+      <upload slot="upload" @onSuccess="onSuccess" target="archives" :classType="uploadType"></upload>
       <template v-slot:delete="scope">
-        <delete1 :data="scope.data" v-if="tool.checkAuth($route.name,'delete')"></delete1>
+        <delete1 :data="scope.data"></delete1>
       </template>
       <template v-slot:download="scope">
-        <download :data="scope.data" v-if="tool.checkAuth($route.name,'download')"></download>
+        <download :data="scope.data"></download>
       </template>
     </file-list>
     <!--富文本-->
-    <file-text ref="text" v-if="uploadType == '3'&& tool.checkAuth($route.name,'update')">
+    <file-text ref="text" v-if="uploadType == '3'">
       <Editor ref="editor" slot="editor" :content="cacheInfo.content.content" :id="uploadCacheData.sat_sharematerialid">
       </Editor>
     </file-text>
@@ -37,11 +37,11 @@ import delete1 from '@/SManagement/archives_upload/components/delete'
 import download from '@/SManagement/archives_upload/components/download'
 import Editor from '@/components/my-editor/Editor'
 
-import {weAtob,weBtoa} from "@/utils/weapp-jwt"
+import { weAtob, weBtoa } from "@/utils/weapp-jwt"
 import removeFile from '@/utils/removeFile'
 export default {
   name: 'index',
-  data () {
+  data() {
     return {
       //新增请求配置
       cacheInfo: {
@@ -55,7 +55,7 @@ export default {
           "canfiledownload": 1,
           "content": "",
           "sat_sharematerialid": 0,
-          "type":''
+          "type": ''
         }
       },
       //上传的初始数据
@@ -81,15 +81,15 @@ export default {
   },
   watch: {
   },
-  created () {
+  created() {
     this.getFileCache()
   },
-  beforeDestroy () {
+  beforeDestroy() {
     this.removeAllData()
   },
   methods: {
     //保存
-    save () {
+    save() {
       this.$refs.set.$refs.form.validate((val) => {
         var that = this
         if (val) {
@@ -129,7 +129,7 @@ export default {
       })
     },
     //获取上传数据模板
-    getFileCache () {
+    getFileCache() {
       this.$api.requested(this.cacheInfo).then(res => {
         this.uploadCacheData = res.data
         this.create_sat_sharematerialid = this.uploadCacheData.sat_sharematerialid
@@ -139,7 +139,7 @@ export default {
       })
     },
     //走编辑逻辑
-    isEditFile () {
+    isEditFile() {
       if (this.$route.params.data) {
         let data = JSON.parse(this.$route.params.data)
         this.cacheInfo.content.sat_sharematerialid = data.sat_sharematerialid
@@ -155,7 +155,7 @@ export default {
       }
     },
     //文件上传成功
-    onSuccess (id) {
+    onSuccess(id) {
       let param = {
         "classname": "system.attachment.Attachment",
         "method": "createFileLink",
@@ -182,7 +182,7 @@ export default {
 
     },
     //退出后对数据进行销毁
-    async removeAllData () {
+    async removeAllData() {
       if (this.$route.params.data) {
         this.uploadCacheData.status = "新建"
         this.uploadCacheData.sat_sharematerialid = this.create_sat_sharematerialid
@@ -203,7 +203,7 @@ export default {
       }
     },
     //重置所有数据
-    reSetAllData () {
+    reSetAllData() {
       this.cacheInfo.content.title = ''
       this.cacheInfo.content.sat_sharematerial_classid = ''
       this.$refs.editor.html = ''