LAPTOP-FO2T5SIU\35838 10 月之前
父節點
當前提交
ee5bdc8287
共有 4 個文件被更改,包括 92 次插入11 次删除
  1. 28 0
      js_sdk/http.js
  2. 13 2
      pages/index/index.vue
  3. 1 1
      pages/subPackages/minePages/myActivities.vue
  4. 50 8
      pages/subPackages/toread/index.vue

+ 28 - 0
js_sdk/http.js

@@ -310,6 +310,25 @@ export function readList(e) {
         '/wx/workPaneController/readList',
         e, {})
 }
+
+export function readListAll(e) {
+    return $http.post(
+        '/wx/workPaneController/readListAll',
+        e, {})
+}
+
+export function getReadSizeByTypes(e) {
+    return $http.post(
+        '/wx/workPaneController/getReadSizeByTypes',
+        e, {})
+}
+
+// 阅读待阅
+export function userRead(e) {
+    return $http.post(
+        '/wx/workPaneController/userRead',
+        e, {})
+}
 // handleList?
 export function findCompanyTags(e) {
     return $http.post(
@@ -1062,9 +1081,18 @@ export function parkSystemMsgReadAdd(data) {
     )
 }
 
+// 服务评价
 export function parkServiceEvaluationAdd(data) {
     return $http.post(
         '/wx/parkServiceEvaluation/add',
         data, {}
     )
 }
+
+// 合同详情
+export function getContractById(data) {
+    return $http.post(
+        '/wx/ParkContractManageController/getById',
+        data, {}
+    )
+}

+ 13 - 2
pages/index/index.vue

@@ -36,7 +36,7 @@
             <span style="color: #666666; font-size: 3.5vw"
               >需处理待阅<span
                 style="color: #22b565; font-weight: 600; margin-left: 0.5vw"
-                >12</span
+                >{{ readSize }}</span
               ></span
             >
           </div>
@@ -71,12 +71,13 @@
 </template>
 <script>
 // import {demo} from "@/js_sdk/http"
-import { getUserPower, getUserLocalStorageInfo } from "@/js_sdk/http";
+import { getUserPower, getUserLocalStorageInfo, getReadSizeByTypes } from "@/js_sdk/http";
 import EnterpriseSide from "./components/enterpriseSide.vue";
 export default {
   components: { EnterpriseSide },
   data() {
     return {
+      readSize: 0,
       userType: false,
       mapList: [
         // {
@@ -214,6 +215,7 @@ export default {
   },
   onShow() {
     this.getUserPower();
+    this.getReadSize()
   },
   onLoad(e) {
     // uni.$on("userType", (userType) => {
@@ -223,6 +225,15 @@ export default {
     // });
   },
   methods: {
+    getReadSize(){
+      const data = {
+        userId: getUserLocalStorageInfo().userId,
+        types: '1'
+      }
+      getReadSizeByTypes(data).then(res=>{
+        this.readSize = res
+      })
+    },
     toMsgPage(e) {
       uni.navigateTo({
         url: e,

+ 1 - 1
pages/subPackages/minePages/myActivities.vue

@@ -35,7 +35,7 @@ export default {
         {name:'年度小艾杯篮球赛开始啦',time:'2021-1-21  13:00',type:'已结束'},
       ],
       search: {
-        // companyId: getUserLocalStorageInfo().userId,
+        companyId: getUserLocalStorageInfo().userId,
         pageNum: 1,
         pageSize: 10
 

+ 50 - 8
pages/subPackages/toread/index.vue

@@ -2,7 +2,7 @@
   <div class="secureselftest">
      <div class="toReadItem" v-for="item in msgList" @tap="showDialog(item)" >
           <div class="readTitle">【{{item.type}}】</div>
-          <div class="readInfo">{{item.info}}</div>
+          <div class="readInfo">{{item.title}}</div>
           <div class="readTime">2024-04-25  09:00</div>
      </div>
     <van-dialog
@@ -16,19 +16,19 @@
         width="640rpx"
     >
       <div class="dialogBox">
-        <div class="dialogInfoTitle">XXXXSSSSSXX企业名称XXXX企业的合同即将到期,请尽快续约。</div>
+        <div class="dialogInfoTitle">{{ title }}</div>
         <div class="dialogInfo">
           <div class="infoRow">
             <span class="infoTitle">合同编号:</span>
-            <span class="infoMsg">HT20240514</span>
+            <span class="infoMsg">{{ contractForm.contractNo }}</span>
           </div>
           <div class="infoRow">
             <span class="infoTitle">关联载体:</span>
-            <span class="infoMsg"></span>
+            <span class="infoMsg">{{ contractForm.houseName }}</span>
           </div>
           <div class="infoRow">
             <span class="infoTitle">合同起止日期:</span>
-            <span class="infoMsg">2023/01/01 ~ 2024/12/30</span>
+            <span class="infoMsg">{{ contractForm.startDate }} ~ {{contractForm.endDate}}</span>
           </div>
         </div>
       </div>
@@ -37,23 +37,65 @@
 </template>
 
 <script>
+import { getUserLocalStorageInfo, readListAll, userRead, getContractById } from "@/js_sdk/http.js"
+
 export default {
+  onShow(){
+    this.getList()
+  },
   data(){
     return{
       msgList:[
-        {type:'合同到期提醒',info:'xxxxsssSSXX企业名称XXXX企业的合同即将到期请尽快续约.'}
+        // {type:'合同到期提醒',info:'xxxxsssSSXX企业名称XXXX企业的合同即将到期请尽快续约.'}
       ],
-      show:false
+      show:false,
+      id: '',
+      contractForm: {
+
+      },
+      title: ''
     }
   },
   methods:{
+    getList(){
+      this.msgList = []
+      const data = {
+        userId: getUserLocalStorageInfo().userId,
+        types: '1'
+      }
+      readListAll(data).then(res=>{
+        res.forEach(item=>{
+          const json = this.getItemJson(item)
+          this.msgList.push(json)
+        })
+      })
+    },
+    getItemJson(item){
+      item.type = item.readType == '1' ? '合同到期提醒' : '未知'
+      return item;
+    },
     showDialog(item){
       if (item.type === '合同到期提醒'){
         this.show = true
+        this.title = item.title
+        this.id = item.id
+        const data = {
+          id: item.routeParam.replace('id=','')
+        }
+        getContractById(data).then(res=>{
+          this.contractForm = res
+        })
       }
     },
     confirm(){
-
+      const data = {
+        id:this.id,
+        userId: getUserLocalStorageInfo().userId
+      }
+      userRead(data).then(res=>{
+        this.show = false
+        this.getList()
+      })
     }
   }
 }