duanshenglang 1 week ago
parent
commit
c3b784bbd5
2 changed files with 13 additions and 13 deletions
  1. 6 6
      lottery/clientSop.html
  2. 7 7
      lottery/groupSop.html

+ 6 - 6
lottery/clientSop.html

@@ -144,7 +144,7 @@
         <el-tab-pane label="执行中" name="playing">
           <div class="tag_list">
             <el-tag style="margin-right: 10px;" :type="item.type" effect="plain" v-for="(item, index) in executeData"
-              :key="index" @click="getSop(item)">{{item.sopName}}</el-tag>
+              :key="index" @click="getSop(item, 0)">{{item.sopName}}</el-tag>
           </div>
           <div class="content">
             <div class="sop_content">
@@ -243,7 +243,7 @@
         <el-tab-pane label="已完成" name="ending">
           <div class="tag_list">
             <el-tag style="margin-right: 10px;" :type="item.type" effect="plain" v-for="(item, index) in executeData"
-              :key="index" @click="getSop(item)">{{item.sopName}}</el-tag>
+              :key="index" @click="getSop(item, 1)">{{item.sopName}}</el-tag>
           </div>
           <div class="content">
             <div class="sop_content">
@@ -379,7 +379,7 @@
       }
       // this.memberId = "woU17nDAAAd2m75dFfnjeg_x_egmMkIQ"
       // this.externalUserId = "wmU17nDAAARtlDBF2x_WFHAM5i360zAg"
-      // this.executeSopList()
+      // this.executeSopList(0)
     },
     methods: {
       getAuth () {
@@ -429,7 +429,7 @@
                   if (res.err_msg == "getCurExternalContact:ok") {
                     console.log('invoke成功:', res.userId);
                     that.externalUserId = res.userId
-                    that.executeSopList()
+                    that.executeSopList(0)
                   } else {
                     //错误处理
                     console.log('invoke失败:', res)
@@ -472,7 +472,7 @@
         if (!this.externalUserId) {
           return
         }
-        fetch(this.httpUrl + `/scrm/v1/wxcp-sop/p/executeSopList?externalUserId=${this.externalUserId}&memberId=${this.memberId}&bId=${this.bId}&status=${status || 0}`)
+        fetch(this.httpUrl + `/scrm/v1/wxcp-sop/p/executeSopList?externalUserId=${this.externalUserId}&memberId=${this.memberId}&bId=${this.bId}&status=${status}`)
           .then(res => {
             return res.json()
           }).then(result => {
@@ -506,7 +506,7 @@
       },
       // 获取sop内容
       getSopHistoryList (item, status) {
-        fetch(this.httpUrl + `/scrm/v1/wxcp-sop/p/executeSopHistoryList?clientId=${item.clientId}&memberId=${this.memberId}&sopId=${item.sopId}&status=${status || 0}`)
+        fetch(this.httpUrl + `/scrm/v1/wxcp-sop/p/executeSopHistoryList?clientId=${item.clientId}&memberId=${this.memberId}&sopId=${item.sopId}&status=${status}`)
           .then(res => {
             return res.json()
           }).then(result => {

+ 7 - 7
lottery/groupSop.html

@@ -144,7 +144,7 @@
         <el-tab-pane label="执行中" name="playing">
           <div class="tag_list">
             <el-tag style="margin-right: 10px;" :type="item.type" effect="plain" v-for="(item, index) in executeData"
-              :key="index" @click="getSop(item)">{{item.sopName}}</el-tag>
+              :key="index" @click="getSop(item, 0)">{{item.sopName}}</el-tag>
           </div>
           <div class="content">
             <div class="sop_content">
@@ -243,7 +243,7 @@
         <el-tab-pane label="已完成" name="ending">
           <div class="tag_list">
             <el-tag style="margin-right: 10px;" :type="item.type" effect="plain" v-for="(item, index) in executeData"
-              :key="index" @click="getSop(item)">{{item.sopName}}</el-tag>
+              :key="index" @click="getSop(item, 1)">{{item.sopName}}</el-tag>
           </div>
           <div class="content">
             <div class="sop_content">
@@ -379,7 +379,7 @@
       }
       // this.memberId = "woU17nDAAAnoSca19vZVKiNEKdc9tyYQ"
       // this.externalUserId = "wmU17nDAAAGT2PF6G8PUHdSx2DY1ljpg"
-      // this.executeSopList()
+      // this.executeSopList(0)
     },
     methods: {
       getAuth () {
@@ -428,7 +428,7 @@
                 }, function(res) {
                   if (res.err_msg == "getCurExternalChat:ok") {
                     that.externalUserId = res.chatId
-                    that.executeSopList()
+                    that.executeSopList(0)
                   } else {
                     //错误处理
                     console.log('invoke失败:', res)
@@ -471,7 +471,7 @@
         if (!this.externalUserId) {
           return
         }
-        fetch(this.httpUrl + `/scrm/v1/wxcp-group-sop/p/executeSopList?chatId=${this.externalUserId}&memberId=${this.memberId}&bId=${this.bId}&status=${status || 0}`)
+        fetch(this.httpUrl + `/scrm/v1/wxcp-group-sop/p/executeSopList?chatId=${this.externalUserId}&memberId=${this.memberId}&bId=${this.bId}&status=${status}`)
           .then(res => {
             return res.json()
           }).then(result => {
@@ -505,7 +505,7 @@
       },
       // 获取sop内容
       getSopHistoryList (item, status) {
-        fetch(this.httpUrl + `/scrm/v1/wxcp-group-sop/p/executeSopHistoryList?groupId=${item.groupId}&memberId=${this.memberId}&sopId=${item.sopId}&status=${status || 0}`)
+        fetch(this.httpUrl + `/scrm/v1/wxcp-group-sop/p/executeSopHistoryList?groupId=${item.groupId}&memberId=${this.memberId}&sopId=${item.sopId}&status=${status}`)
           .then(res => {
             return res.json()
           }).then(result => {
@@ -917,7 +917,7 @@
           }).then(result => {
             let { data, code, msg } = result
             if (code === 1) {
-              this.getSopHistoryList(this.sopItem)
+              this.getSopHistoryList(this.sopItem, this.activeName === 'playing' ? 0 : 1)
             } else {
               this.$message({
                 message: msg,