浏览代码

后管主页

huangjn 3 年之前
父节点
当前提交
04dc4625c2
共有 2 个文件被更改,包括 142 次插入7 次删除
  1. 9 0
      src/api/news/news.js
  2. 133 7
      src/views/wel/index.vue

+ 9 - 0
src/api/news/news.js

@@ -77,3 +77,12 @@ export const queryOpinionDetails = (params) => {
     params
   })
 }
+
+//工单详情
+export const isIgnore = (params) => {
+  return request({
+    url: '/api/blade-business/businessUserOpinion/isIgnore',
+    method: 'post',
+    params
+  })
+}

+ 133 - 7
src/views/wel/index.vue

@@ -118,17 +118,40 @@
         </el-carousel>
         <span slot="footer" class="dialog-footer">
           <el-button @click="imgVisible = false">取 消</el-button>
-          <el-button type="primary" @click="submissionProgress">前 往 处 理</el-button>
+          <el-button type="primary" @click="toDisposeView">处 理</el-button>
         </span>
       </el-dialog>
 
+      <el-dialog
+        :visible.sync="dialogVisible"
+        width="600px"
+        append-to-body
+        :close-on-click-modal="false"
+      >
+        <div class="flex jc-al-c">
+        <span class="mg-r-20 titl-font" style="font-size: 16px;margin-right:20px;width:180px;text-align:right;font-weight: 900;">提交进度</span>
+          <el-select v-model="curRow.currentLink" placeholder="请选择" @change="operationMethods">
+            <el-option label="进入人工预处理环境" :value="2"/>
+            <el-option label="已解决" :value="3"/>
+          </el-select>
+        </div>
+        <div style="margin-top:40px;" class="flex jc-al-c" v-show="operation.show">
+          <span style="font-size: 16px;margin-right:20px;width:180px;text-align:right;font-weight: 900;">*预计处理截止时间</span>
+          <el-date-picker v-model="operation.manageTime" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择日期" :picker-options="setDateRange"/>
+        </div>
+        <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submissionProgress">确 定</el-button>
+      </span>
+      </el-dialog>
+
     </div>
   </div>
 </template>
 <script>
 // 引入统计图
 import { Area, Column, Pie } from '@antv/g2plot';
-import { queryBusinessUserOpinion, queryBusinessUserOpinionAll, queryProjectUserAmount, queryProjectPfx, queryOpinionTypeAmount, queryOpinionDetails } from '@/api/news/news.js';
+import { queryBusinessUserOpinion, queryBusinessUserOpinionAll, queryProjectUserAmount, queryProjectPfx, queryOpinionTypeAmount, queryOpinionDetails, isIgnore, manageUserOperationStatus } from '@/api/news/news.js';
 export default {
   data () {
     return {
@@ -143,22 +166,98 @@ export default {
       projectList:[],
       projectId:'',
       imgVisible:false,
+      dialogVisible: false,
       curNew:{},
+      curRow:{},
+      operation: {
+        manageTime: '',
+        show: false
+      },
       pieObj:null,
       pfxAmount: 0
     }
   },
   methods: {
-    submissionProgress(){
-      this.$router.push({
+    setDateRange: {
+      disabledDate: time => {
+        return time.getTime() < Date.now() - 8.64e7
+      }
+    },
+    operationMethods () {
+      this.operation.show = this.curRow.currentLink == 2;
+      if (!this.operation.show) {
+        this.operation.manageTime = '';
+      }
+    },
+    toDisposeView(){
+      this.dialogVisible = true;
+    },
+    async submissionProgress(){
+      if (this.curRow.currentLink == 2) {
+        if (this.operation.manageTime) {
+          await this.manageUserOperationStatus({
+            currentLinkId: this.curRow.currentLinkId,
+            currentLink: this.curRow.currentLink,
+            newNumber: this.curRow.newNumber,
+            userOpinionId: this.curRow.userOpinionId,
+            manageTime: this.operation.manageTime
+          })
+        } else {
+          this.$message({
+            type: 'error',
+            message: '请设置预计处理截止时间'
+          })
+        }
+      } else {
+        await this.manageUserOperationStatus({
+          currentLinkId: this.curRow.currentLinkId,
+          currentLink: this.curRow.currentLink,
+          newNumber: this.curRow.newNumber,
+          userOpinionId: this.curRow.userOpinionId
+        })
+      }
+      /*this.$router.push({
         path: '/news/news'
-      })
+      })*/
+    },
+    async manageUserOperationStatus (da) {//业务人员提交环节操作
+      const { data: res } = await manageUserOperationStatus(da)
+      if (res.code == 200) {
+        this.dialogVisible = false
+        this.imgVisible = false;
+        this.$message({
+          type: 'success',
+          message: '提交成功!'
+        })
+        //重新刷新列表
+        if(!da.manageTime){
+          //说明是直接结束,对应列表删除
+          let index1 = -1, index2 = -1;
+          this.collapseData1.forEach((vo,index) => {
+            if(vo.userOpinionId == da.userOpinionId){
+              index1 = index;
+            }
+          });
+          this.collapseData2.forEach((vo,index) => {
+            if(vo.userOpinionId == da.userOpinionId){
+              index2 = index;
+            }
+          });
+          if(index1 > -1){
+            this.collapseData1.splice(index1, 1);
+          }
+          if(index2 > -1){
+            this.collapseData2.splice(index2, 1);
+          }
+        }
+      }
     },
     async openPreview(row){
       const { data : res } = await queryOpinionDetails({userOpinionId : row.userOpinionId});
       if(res.code == 200){
         this.curNew = res.data;
       }
+      this.curRow = row;
       this.imgVisible = true;
     },
     selectProjectOpinion(){
@@ -215,10 +314,37 @@ export default {
       }
     },
     ignore (key) {
-      this.collapseData1.splice(this.collapseData1.indexOf(this.collapseData1[key]), 1)
+      this.isIgnore(this.collapseData1[key].userOpinionId);
+      this.collapseData1.splice(this.collapseData1.indexOf(this.collapseData1[key]), 1);
+      if(this.collapseData2.length > 0){
+        let removeIndex = -1;
+        this.collapseData2.forEach((vo,index) => {
+          if(this.collapseData1[key].userOpinionId = vo.userOpinionId){
+            removeIndex = index;
+          }
+        });
+        if(removeIndex > -1){
+          this.collapseData2.splice(removeIndex, 1);
+        }
+      }
     },
     ignore2 (key) {
-      this.collapseData2.splice(this.collapseData2.indexOf(this.collapseData2[key]), 1)
+      this.isIgnore(this.collapseData2[key].userOpinionId);
+      this.collapseData2.splice(this.collapseData2.indexOf(this.collapseData2[key]), 1);
+      if(this.collapseData1.length > 0){
+        let removeIndex = -1;
+        this.collapseData1.forEach((vo,index) => {
+          if(this.collapseData2[key].userOpinionId = vo.userOpinionId){
+            removeIndex = index;
+          }
+        });
+        if(removeIndex > -1){
+          this.collapseData1.splice(removeIndex, 1);
+        }
+      }
+    },
+    async isIgnore(userOpinionId){
+      const {data : res} = await isIgnore({userOpinionId : userOpinionId});
     },
     async LineV () {
       await this.queryProjectPfx();