Ver código fonte

feat: 待回复增加getAllTodo()

AlieLee 3 anos atrás
pai
commit
fe52672349
2 arquivos alterados com 22 adições e 2 exclusões
  1. 0 1
      src/utils/axios.ts
  2. 22 1
      src/views/demandmanage/editor.vue

+ 0 - 1
src/utils/axios.ts

@@ -16,7 +16,6 @@ axios.interceptors.request.use((config: any) => {
   const params = { user_id, pd, person_id }
   Object.assign(params, project_id ? { project_id } : {})
   // 运维系统需要额外的参数
-  console.log(config)
   if (config.url && config.url.includes('EMS_SaaS_Web')) {
     Object.assign(params, {
       puser: {

+ 22 - 1
src/views/demandmanage/editor.vue

@@ -10,7 +10,7 @@
           :placeholder="'请选择'"
           hideClear
         />
-        <div class="waitReply">待回复需求 <b v-text="pageCount">5</b> 条</div>
+        <div class="waitReply">待回复需求 <b v-text="allTodo.count">5</b> 条</div>
       </div>
       <div class="topRight">
         <Input placeholder="主题、编码" @clear="pressEnter" iconType="search" v-model="matchingCond" @pressEnter="pressEnter"/>
@@ -72,6 +72,10 @@ export default {
   },
   data () {
     return {
+      allTodo: {
+        data: [],
+        count: 0
+      },
       handleDetail: {
         user: true,
         type: '详情'
@@ -187,6 +191,7 @@ export default {
     async DetailConfirm (detail) {
       await this.$axios.post(this.$api.demandAnswer, detail)
       this.getTableData()
+      this.getAllTodo()
     },
     // 触发 新增需求弹窗
     addDemand () {
@@ -329,6 +334,7 @@ export default {
         ]
       }
       this.getTableData()
+      this.getAllTodo()
     },
     // 搜索回车查询
     pressEnter () {
@@ -383,6 +389,20 @@ export default {
         this.pageCount = data.count
         this.tableData = this.toTableData(data.data)
       })
+    },
+    // 获取全部待回复含有论证中
+    getAllTodo () {
+      this.$axios.post(this.$api.demandQueryTodo, {
+        creatorCond: 0,
+        matchingCond: '',
+        productCond: [1, 2, 3],
+        stateCond: [],
+        size: 20,
+        current: 1,
+        orders: []
+      }).then((res) => {
+        this.allTodo = res.data
+      })
     }
   },
   computed: {
@@ -425,6 +445,7 @@ export default {
       //   size: 'min'
       // })
       this.getTableData()
+      this.getAllTodo()
     })
   },
   beforeDestroy () {