From e7d382efc71d1a738a6a7c52d0978d6fdb077a8a Mon Sep 17 00:00:00 2001
From: liuwh <964324856@qq.com>
Date: Sat, 14 Sep 2024 17:34:02 +0800
Subject: [PATCH] 提交

---
 gz-wxparty/pages/myRegisterList/index.js |  105 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 100 insertions(+), 5 deletions(-)

diff --git a/gz-wxparty/pages/myRegisterList/index.js b/gz-wxparty/pages/myRegisterList/index.js
index f6d2055..be40cdc 100644
--- a/gz-wxparty/pages/myRegisterList/index.js
+++ b/gz-wxparty/pages/myRegisterList/index.js
@@ -12,6 +12,17 @@
   })
 }
 
+function getfilesApi(param) {
+  return $$.request({
+    url: 'fileInfo/listByMainIdAndType',
+    type: 'get',
+    submitData: param || {},
+    service: 'sys'
+  })
+}
+
+
+
 Page({
 
   /**
@@ -19,6 +30,7 @@
    */
   data: {
     imgUrl: $$.url.img,
+    fileUrl: $$.baseUrl + $$.url.fileShowUrl,
     search: {
       page: 1,
       size: 10,
@@ -57,6 +69,7 @@
 
   // 关闭筛选框
   addClosePopup() {
+    console.log('111', 11);
     this.setData({
       showModal: false
     })
@@ -133,7 +146,9 @@
           ...i,
           plaintiffNames: i.plaintiffList.length > 0 ? i.plaintiffList.map(i => i.trueName).join('、') : '-',
           defendantNames: i.defendantList.length > 0 ? i.defendantList.map(i => i.trueName).join('、') : '-',
-          show: index === 0 ? true : false
+          show: index === 0 ? true : false,
+          newAgreeContent: i.agreeContent ? i.agreeContent?.length > 75 ? i.agreeContent.slice(0, 75) + '...' : i.agreeContent : '',
+          agreeContentShow: i.agreeContent?.length > 75 ? true : false,
         })),
         total: res.data.totalElements || 0
       });
@@ -147,12 +162,92 @@
     }
   },
 
+  // 前往查看
+  AiModalClick(e) {
+    let item = e.currentTarget.dataset.item;
+    wx.navigateTo({
+      url: '../../pages/AIAide/index?caseDes=' + item.caseDes + '&caseClaim=' + item.caseClaim + '&caseId=' + item.caseId
+    });
+    this.setData({
+      AiModal: false
+    })
+  },
+
+  // 展示协议要点
+  agreeContentClick(e) {
+    let item = e.currentTarget.dataset.item;
+    this.setData({
+      showData: {
+        visible: true,
+        title: item.agreeContent
+      }
+    })
+  },
+  // 关闭协议要点
+  agreeContentClosePopup(e) {
+    this.setData({
+      showData: {
+        visible: false,
+        title: ''
+      }
+    })
+  },
+
+  // 查看协议文书
+  async agreeClick(e) {
+    let item = e.currentTarget.dataset.item;
+    $$.showLoading();
+
+    const res = await getfilesApi({
+      mainId: item.id,
+      ownerType: '22_00018-302',
+    });
+    $$.hideLoading();
+    if (res.type) {
+      let data = res.data || [];
+      if (data?.length === 0) {
+        $$.showToast({
+          title: '暂无协议文书',
+          duration: 1000
+        });
+      }
+      wx.previewImage({
+        current: `${this.data.fileUrl}${data[0].showUrl}`,
+        urls: data.map(item => `${this.data.fileUrl}${item.showUrl}`) // 需要预览的图片http链接列表
+      });
+    }
+  },
+
+  // 评价
+  evaluate(e) {
+    let id = e.currentTarget.dataset.id;
+    wx.navigateTo({
+      url: '../../pages/evaluate/index?id=' + id
+    });
+  },
+
+  // 关闭AI弹窗
+  // addClosePopup() {
+  //   this.setData({
+  //     AiModal: false
+  //   })
+  // },
+
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad(options) {
+  onLoad(options) {},
+
+  onShow() {
     this.pageQuery(this.data.search)
-  },
-
-
+    // let AICase = wx.getStorageSync('AICase') || '';
+    // if (AICase) {
+    //   this.setData({
+    //     AiModal: AICase
+    //   })
+    //   wx.removeStorage({
+    //     key: 'AICase'
+    //   })
+    // }
+  }
 })
\ No newline at end of file

--
Gitblit v1.8.0