qymljy 8 mesi fa
parent
commit
ae280e75a2

+ 5 - 2
src/HManagement/notice/pate/index.vue

@@ -3,7 +3,7 @@
     <list ref="list">
       <add v-if="tool.checkAuth($route.name,'insert')" slot="add" @addClick="addClick" style="margin-bottom:10px"></add>
       <template v-if="tool.checkAuth($route.name,'delete')" v-slot:del="scope">
-        <ondel class="inline-16" :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()"></ondel>
+        <ondel class="inline-16" :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()" @onDel="onDel"></ondel>
       </template>
       <template v-if="tool.checkAuth($route.name,'update')" v-slot:edit="scope">
         <edit class="inline-16" :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()" @onEdit="onEdit"></edit>
@@ -30,6 +30,9 @@ export default {
     addClick () {
       this.$refs.list.addPate()
     },
+    onDel(index){
+      this.$refs.list.pateList.splice(index,1)
+    },
     onEdit (data) {
       this.$refs.list.cellClick(data)
     }
@@ -38,4 +41,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 19 - 14
src/HManagement/notice/pate/modules/del.vue

@@ -13,20 +13,25 @@ export default {
   props:['data'],
   methods:{
     deleteRow () {
-      var that = this
-      this.$api.requested({
-        // "classname": "webmanage.saletool.notice.noticeclass",
-        // "method": "delete",
-        "id":"20221101094703",
-        "content": {
-          "sat_notice_classids":[this.data.sat_notice_classid]
-        }
-      }).then((res)=>{
-        this.tool.showMessage(res)
-        that.$emit('onSuccess')
-      }).catch((err) => {
-        console.log(err)
-      })
+      if (this.data.classname == '' && this.data.sat_notice_classid == 0){
+        this.$emit('onDel',this.data.index)
+      }else {
+        var that = this
+        this.$api.requested({
+          // "classname": "webmanage.saletool.notice.noticeclass",
+          // "method": "delete",
+          "id":"20221101094703",
+          "content": {
+            "sat_notice_classids":[this.data.sat_notice_classid]
+          }
+        }).then((res)=>{
+          this.tool.showMessage(res)
+          that.$emit('onSuccess')
+        }).catch((err) => {
+          console.log(err)
+        })
+      }
+
     },
   }
 }

+ 57 - 7
src/SManagement/archives/components/FileList.vue

@@ -9,13 +9,63 @@
       @mouseleave="isIconShowIndex = 10000000000"
       @click="fileClick(item)"
       @dblclick="filesClick(item)">
-        <div class="image">
-          <el-image
-              style="width: 100%; height: 100%"
-              :src="item.cover || require('../../../assets/file_icons/unknow.png')"
-              fit="fill">
-          </el-image>
-        </div>
+      <div class="image">
+        <el-image
+            style="width: 100%; height: 100%"
+            :src="item.cover"
+            fit="fill">
+          <div slot="error" class="image-slot">
+            <el-image
+                v-if="item.postfix === 'FOLDER' || item.postfix === 'folder'"
+                style="width: 100%; height: 100%"
+                :src="require('../../../assets/file_icons/folder.png')"
+                fit="fill">
+            </el-image>
+            <el-image
+                v-else-if="item.postfix === 'PPT' || item.postfix === 'ppt' || item.postfix === 'PPTX' || item.postfix === 'pptx'"
+                style="width: 100%; height: 100%"
+                :src="require('../../../assets/file_icons/PPT.png')"
+                fit="fill">
+            </el-image>
+            <el-image
+                v-else-if="item.postfix === 'PNG' || item.postfix === 'png' || item.postfix === 'JPG' || item.postfix === 'jpg' || item.postfix === 'JPEG' || item.postfix === 'jpeg'"
+                style="width: 100%; height: 100%"
+                :src="require('../../../assets/file_icons/image.png')"
+                fit="fill">
+            </el-image>
+            <el-image
+                v-else-if="item.postfix === 'XLS' || item.postfix === 'xls' || item.postfix === 'XLSX' || item.postfix === 'xlsx'"
+                style="width: 100%; height: 100%"
+                :src="require('../../../assets/file_icons/excel.png')"
+                fit="fill">
+            </el-image>
+            <el-image
+                v-else-if="item.postfix === 'MP4' || item.postfix === 'mp4' || item.postfix === 'AVI' || item.postfix === 'avi'"
+                style="width: 100%; height: 100%"
+                :src="require('../../../assets/file_icons/video.png')"
+                fit="fill">
+            </el-image>
+            <el-image
+                v-else-if="item.postfix === 'DOC' || item.postfix === 'doc' || item.postfix === 'DOCX' || item.postfix === 'docx'"
+                style="width: 100%; height: 100%"
+                :src="require('../../../assets/file_icons/word.png')"
+                fit="fill">
+            </el-image>
+            <el-image
+                v-else-if="item.postfix === 'PDF' || item.postfix === 'pdf'"
+                style="width: 100%; height: 100%"
+                :src="require('../../../assets/file_icons/PDF.png')"
+                fit="fill">
+            </el-image>
+            <el-image
+                v-else
+                style="width: 100%; height: 100%"
+                :src="require('../../../assets/file_icons/unknow.png')"
+                fit="fill">
+            </el-image>
+          </div>
+        </el-image>
+      </div>
         <el-tooltip class="item" effect="dark" :content="item.document" placement="top">
           <p class="text">{{item.document}}</p>
         </el-tooltip>

+ 2 - 2
src/SManagement/submitedit_details/index.vue

@@ -66,7 +66,7 @@ export default {
           }
       },
       itemStyle: {
-        itemWidth:366,
+        itemWidth:466,
         margin: 16,
         img: {
           width:29,
@@ -102,7 +102,7 @@ export default {
       let res = await this.$api.requested(this.param)
       this.detailData = res.data
       console.log('2222',this.detailData);
-      
+
       //删除未提报记录明细
       this.deteleNoSubmit()
       this.detailData.attinfos = this.fileType.fileList(this.detailData.attinfos)

+ 4 - 4
src/SManagement/submitedit_one/index.vue

@@ -90,14 +90,14 @@ export default {
       let res = await this.$api.requested(this.param)
       this.oneData = res.data
       console.log(res);
-      
+
       this.total = res.total
       console.log(this.oneData);
-      
+
     },
     pageChange (n) {
       this.param.content.pageNumber = n
-      this.getSubmitEditAction() 
+      this.getSubmitEditAction()
     },
     timeChange(time) {
       this.param.content.where.begdate = time[0]
@@ -138,4 +138,4 @@ export default {
   top: 50%;
   transform: translate(-50%,-50%);
 }
-</style>
+</style>

+ 2 - 2
src/router/SManagement.js

@@ -83,7 +83,7 @@ const SManagement = [{
   children: [
     {
       path: '/submiteditmag_detail_one',
-      name: 'submiteditmag',
+      name: 'submitedit',
       meta: {
         title: '提报详情',
         ast_nav: true,
@@ -274,4 +274,4 @@ const SManagement = [{
   ]
 },
 ]
-export default SManagement
+export default SManagement