Browse Source

2022-7-22

codeMan 3 years ago
parent
commit
f19b3304c7

+ 3 - 13
src/SManagement/archives/index.vue

@@ -4,7 +4,7 @@
     <bread-crumbs :tempFileData="tempFileData" @BreadCrumbsChange="BreadCrumbsChange">
     </bread-crumbs>
     <div class="header-panl">
-      <search @searchActive="searchActive" @clearData="clearData"></search>
+      <search @searchActive="searchActive" @clearData="clearData" ref="search"></search>
       <!--切换最热最新-->
       <hot-new-control @sortTypeChange="sortTypeChange" v-if="tool.checkAuth($route.name, 'read')"></hot-new-control>
     </div>
@@ -57,9 +57,6 @@ export default {
         id: null,
       }],
       fileData: [],
-      allFileData: [],
-      //当前选择的文件类型
-      isType: 'all',
       //当前所在文件夹位置
       currentFileIndex: 0,
       //文件信息面板是否显示
@@ -92,8 +89,7 @@ export default {
       let res = await this.$api.requested(this.params)
       this.total = res.total
       this.params.content.sort = res.sort
-      this.allFileData = this.fileType.fileList(res.data)
-      this.fileData = this.filterFileData(this.allFileData, this.isType)
+      this.fileData = this.fileType.fileList(res.data)
     },
     pageChange(n) {
       this.params.content.pageNumber = n
@@ -125,6 +121,7 @@ export default {
       this.params.content.parentid = index
       this.tempFileData.splice(this.tempFileData.indexOf(this.tempFileData.find(item => item.id == index)) + 1)
       this.params.content.pageNumber = 1
+      this.$refs.search.clearData()
       this.getFileList()
     },
     //修改收藏状态
@@ -140,13 +137,6 @@ export default {
       this.getFileList()
       this.currentFileIndex = 0
     },
-    //数据过滤
-    filterFileData(file, type) {
-      if (type == 'all') return file
-      return file.filter(item => {
-        return item.fileType == type
-      })
-    }
   }
 }
 </script>

+ 0 - 1
src/SManagement/archives_sc/index.vue

@@ -97,7 +97,6 @@ export default {
   },
   created () {
     this.getFileData()
-    this.getSelectList()
   },
   methods: {
     //获取列表数据

+ 4 - 19
src/SManagement/archives_upload/index.vue

@@ -146,25 +146,10 @@ export default {
           //判断所属ID是否为初始ID
           if (this.cacheInfo.content.sat_sharematerial_classid == '9999' + JSON.parse(window.sessionStorage.getItem("active_account")).userid) return this.$message.error('请选择素材分类');
           this.$api.requested(this.cacheInfo).then(res => {
-            let param = {
-              "classname": "webmanage.saletool.sharematerial.sharematerial",
-              "method": "audit",
-              "content": {
-                "sat_sharematerialid": res.data.sat_sharematerialid,
-                "type": 1
-              }
-            }
-            this.$api.requested(param).then(res => {
-              if (res.code == 1) {
-                this.uploadCacheData.status = '完成'
-                this.$notify({
-                  title: '提示',
-                  message: '操作成功',
-                  type: 'success'
-                })
-                this.insertCoursewareauth();
-                this.$router.go(-1)
-              }
+            this.tool.showMessage(res,() => {
+              this.uploadCacheData.status = '完成'
+              this.insertCoursewareauth()
+              this.$router.go(-1)
             })
           })
         } else {

+ 2 - 1
src/SManagement/archivesmag/index.vue

@@ -5,7 +5,7 @@
                   @BreadCrumbsChange="BreadCrumbsChange"></bread-crumbs>
     <div class="header-panl">
       <!--类型选择面板-->
-      <search @searchActive="searchActive" @clearData="clearData"></search>
+      <search @searchActive="searchActive" @clearData="clearData" ref="search"></search>
       <!--切换最热最新-->
       <hot-new-control :sortType= 'params.content.where.sorttype'
                        @sortTypeChange="sortTypeChange" v-if="tool.checkAuth($route.name,'read')"></hot-new-control>
@@ -120,6 +120,7 @@ export default {
       this.params.content.parentid = index
       this.params.content.pageNumber = 1
       this.tempFileData.splice(this.tempFileData.indexOf(this.tempFileData.find(item => item.id == index)) + 1)
+      this.$refs.search.clearData()
       this.getFileList()  
           
     },

+ 17 - 12
src/SManagement/submitedit_details/components/SubmiteditAction.vue

@@ -86,18 +86,23 @@ export default {
     },
     async save() {
       //新增
-      if (this.param.content.content == "" && this.detailData.istextrequired == 1) return this.$notify({
-        title: '提示',
-        message: '请编辑内容',
-        type: 'warning'
-      })
-      if (this.upload_panl.attinfos.length == 0 && this.detailData.isattrequired == 1) return this.$notify({
-        title: '提示',
-        message: '请上传附件',
-        type: 'warning'
-      })
-
-      this.param.content.sat_submiteditmodelid = this.upload_panl.sat_submiteditmodelid
+      return console.log(this.param.content);
+      
+      if (this.param.content.content == '' && this.detailData.istextrequired == 1) {
+        return this.$notify({
+          title: '提示',
+          message: '请编辑内容',
+          type: 'warning'
+        })
+      }
+      if (this.upload_panl.attinfos.length == 0 && this.detailData.isattrequired == 1) {
+        return this.$notify({
+          title: '提示',
+          message: '请上传附件',
+          type: 'warning'
+        })
+      }
+      this.param.content.sat_submiteditmodelid =  this.upload_panl.sat_submiteditmodelid
       this.param.content.sat_submiteditid = this.editData ? this.editData.sat_submiteditid : this.upload_panl.sat_submiteditid
 
       if (this.editData) {

+ 1 - 0
src/components/search/index.vue

@@ -33,6 +33,7 @@ export default {
     },
     clearData() {
       this.$emit('clearData')
+      this.search = ''
     }
   },
   beforeDestroy() {

+ 1 - 1
src/components/socketMessage/index.vue

@@ -79,9 +79,9 @@
           console.log("连接错误")
       },
       getMessage: function (msg) {
+        console.log(JSON.parse(msg.data))
         this.panelIsShow = true
         this.list = [JSON.parse(msg.data).message]
-        this.total = this.total + 1
       },
       send: function (type,val,timsubjectid) {
       },

+ 1 - 0
src/views/message/components/list.vue

@@ -138,4 +138,5 @@ export default {
   flex-direction: column;
   align-items: center;
 }
+
 </style>

+ 52 - 16
src/views/message/index.vue

@@ -4,10 +4,15 @@
       <el-col :span="12">
         <div class="left">
           <div class="select">
-            <div @click="selectFun('系统')"
-              :style="currentItem==0 ? 'background:#3874F6;color:#ffffff' : 'border:1px solid #cccccc'">系统消息</div>
-            <div @click="selectFun('应用')"
-              :style="currentItem==1 ? 'background:#3874F6;color:#ffffff' : 'border:1px solid #cccccc'">应用消息</div>
+            <div class="select_left">
+              <div @click="selectFun('系统')"
+                :style="currentItem==0 ? 'background:#3874F6;color:#ffffff' : 'border:1px solid #cccccc'">系统消息</div>
+              <div @click="selectFun('应用')"
+                :style="currentItem==1 ? 'background:#3874F6;color:#ffffff' : 'border:1px solid #cccccc'">应用消息</div>
+            </div>
+            <div class="select_right">
+              <div class="all-read" @click="allRead">全部阅读</div>
+            </div>
           </div>
           <list :list="list" @messageItemClick="messageItemClick"></list>
           <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber"
@@ -16,7 +21,7 @@
         </div>
       </el-col>
       <el-col :span="12">
-        <div class="right">
+        <div class="right" v-if="message">
           <p class="title">{{message.title}}</p>
           <p class="info">
             <span>发布于:{{message.createdate}} | {{message.type}}</span>
@@ -48,7 +53,10 @@ export default {
           "nocache": true,
           "pageNumber": 1,
           "pageSize": 10,
-          "type": ''
+          "type": '',
+          "where": {
+
+          }
         }
       },
       list: '',
@@ -69,12 +77,13 @@ export default {
       this.param.content.type = this.currentItem == 0 ? '系统' : '应用'
       let res = await this.$api.requested(this.param)
       this.list = res.data
-      this.messageItemClick(this.list[0])
-      this.total = res.total
       console.log(this.list);
       
+      if(this.list[0]) this.messageItemClick(this.list[0])
+      this.total = res.total
     },
     selectFun (data) {
+      this.message = ''
       this.param.content.pageNumber = 1
       this.currentItem = data == '系统' ? 0 : 1
       this.getMessageList()
@@ -92,8 +101,13 @@ export default {
             "messageid":data.messageid
         }
       })
+      console.log(res);
+      
       data.isread = 1
       this.message = res.data
+    },
+    allRead() {
+
     }
   },
 };
@@ -105,42 +119,58 @@ export default {
 }
 .message {
   width: 100%;
-  min-height: 100%;
   margin: 0 auto;
   position: relative;
 }
 .message .left {
+  min-height: calc(100vh - 99px);
   position: relative;
   padding: 20px 0 60px 0;
   box-shadow: 1px 0px 0px 1px #DDDDDD;
-  border-radius: 4px 4px 4px 4px;
   background: #ffffff;
 }
 .message .select {
-  width: 200px;
+  width: 100%;
   height: 36px;
   border-radius: 4px;
   display: flex;
   justify-content: space-between;
-  line-height: 36px;
+  padding: 0 16px;
+}
+.message .select .select_left {
+  display: flex;
+  justify-content: space-between;
   font-size: 14px;
   margin-left: 16px;
 }
-.message .select div {
-  width: 50%;
+.message .select .select_left div {
   height: 34px;
   text-align: center;
   cursor: pointer;
+  padding: 8px 22px;
   transition: background 0.2s ease-in-out;
 }
-.message .select div:first-child {
+.message .select .select_left div:first-child {
   border-top-left-radius: 4px;
   border-bottom-left-radius: 4px;
 }
-.message .select div:last-child {
+.message .select .select_left div:last-child {
   border-top-right-radius: 4px;
   border-bottom-right-radius: 4px;
 }
+.message .select .select_right .all-read {
+  background: #FFFFFF;
+  border-radius: 4px 4px 4px 4px;
+  border: 1px solid #CCCCCC;
+  padding: 8px 22px;
+  font-size: 14px;
+  font-weight: 400;
+  color: #666666;
+  cursor: pointer;
+}
+.message .select .select_right .all-read:hover {
+  color: #3874F6;
+}
 .message .right {
   padding: 20px 16px;
 }
@@ -173,4 +203,10 @@ export default {
   right: 16px;
   bottom: 0;
 }
+/deep/.el-empty {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%,-50%);
+}
 </style>