Jelajahi Sumber

营销物料根目录ID

zhaoxiaohai 2 tahun lalu
induk
melakukan
17fc3b482c
1 mengubah file dengan 24 tambahan dan 25 penghapusan
  1. 24 25
      src/HManagement/archvies_mag/modules/add.vue

+ 24 - 25
src/HManagement/archvies_mag/modules/add.vue

@@ -11,8 +11,7 @@
       </scopeOfauth>
       <div class="dialog-footer">
         <el-button size="small" @click="dialogFolderVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="createFolderComplete(folder)"
-          class="normal-btn-width btn-warning">确 定</el-button>
+        <el-button size="small" type="warning" @click="createFolderComplete(folder)" class="normal-btn-width btn-warning">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -21,55 +20,55 @@
 <script>
 import scopeOfauth from '@/components/scopeOfAuthority/index.vue'
 export default {
-  components: {
+  components:{
     scopeOfauth,
   },
-  data() {
+  data () {
     return {
-      dialogFolderVisible: false,
-      defaultData: {},
-      folder: {
-        document: ''
+      dialogFolderVisible:false,
+      defaultData:{},
+      folder:{
+        document:''
       },
-      attachmentid: null,
-      params: {
+      attachmentid:null,
+      params:{
         "classname": "system.attachment.MediaCenter",
         "method": "createFolder",
         "content": {
           "foldername": "文件夹名称",
-          "parentid": ''
+          "parentid":  ''
         }
       }
     }
   },
-  methods: {
-    createFolder() { },
-    // 获取保存授权范围数据
-    onChecked(param) {
+  methods:{
+    createFolder () {},
+     // 获取保存授权范围数据
+    onChecked (param) {
       this.authData = param
     },
-    async createFolderComplete(folder) {
-      let id = this.$route.query.id ? this.$route.query.id : JSON.parse(sessionStorage.getItem("folderid")).salematerialfolderid
+    async createFolderComplete (folder) {
+      let id = this.$route.query.id?this.$route.query.id:JSON.parse(sessionStorage.getItem("folderid")).salematerialfolderid
       this.params.content.parentid = id
       this.params.content.foldername = folder.document
       const res = await this.$api.requested(this.params)
       this.$emit('onSuccess')
-      this.tool.showMessage(res, () => { this.dialogFolderVisible = false })
-      res.code === 1 ? this.insertCoursewareauth(res.data.attachmentid) : ''
+      this.tool.showMessage(res,()=>{this.dialogFolderVisible = false})
+      res.code === 1?this.insertCoursewareauth(res.data.attachmentid):''
     },
     // 新增授权范围
-    async insertCoursewareauth(attachmentid) {
+    async insertCoursewareauth (attachmentid) {
       this.authData.attachmentid = attachmentid
       const res = await this.$api.requested({
         "classname": "webmanage.saletool.salematerial.salematerialAuth",
         "method": "insertOrUpdate",
         "content": this.authData
       })
-      res.code === 0 ? this.$notify({
-        title: '失败',
-        message: res.data,
-        type: 'error'
-      }) : ''
+      res.code === 0?this.$notify({
+        title:'失败',
+        message:res.data,
+        type:'error'
+      }):''
     },
   }
 }