Explorar o código

消息区初步完成

zhangh %!s(int64=3) %!d(string=hai) anos
pai
achega
7d3c140eae
Modificáronse 3 ficheiros con 273 adicións e 152 borrados
  1. 28 0
      src/api/news/news.js
  2. 1 1
      src/views/certificate/managements/see.vue
  3. 244 151
      src/views/news/news.vue

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

@@ -0,0 +1,28 @@
+import request from '@/router/axios';
+
+export const queryBusinessUserOpinionList = (params) => {
+    return request({
+        url: '/api/blade-business/businessUserOpinion/queryBusinessUserOpinionList',
+        method: 'get',
+        params
+    })
+}
+
+//业务人员提交环节操作
+export const manageUserOperationStatus = (data) => {
+    return request({
+        url: '/api/blade-business/businessUserOpinion/manageUserOperationStatus',
+        method: 'post',
+        data
+    })
+}
+
+
+//所有工单处理列表
+export const queryBusinessUserOpinionListAll = (params) => {
+    return request({
+        url: '/api/blade-business/businessUserOpinion/queryBusinessUserOpinionListAll',
+        method: 'get',
+        params
+    })
+}

+ 1 - 1
src/views/certificate/managements/see.vue

@@ -57,7 +57,7 @@
           :key='key'
         >
           <div class="flexBetween ">
-            <div class="flexItemsC">姓名:{{item.createUser}}</div>
+            <div class="flexItemsC">姓名:{{item.certificateUserName}}</div>
             <div class="flexStar flexItemsC">签名图片:
               <img
                 style="height:40px;"

+ 244 - 151
src/views/news/news.vue

@@ -1,171 +1,264 @@
 <template>
-<basic-container>
-  <el-menu :default-active="activeIndex" mode="horizontal">
-    <el-menu-item index="1">我的消息</el-menu-item>
-    <el-menu-item index="2">所有消息</el-menu-item>
-  </el-menu>
-  <avue-crud :data="data" :option="option" :table-loading="showLoading" :page.sync="page" :permission="permissionList">
-    <template slot="picture" slot-scope="scope" >
-      <el-button size="small" @click="openPreview(scope)">图片</el-button>
-    </template>
-    <template slot="cz" slot-scope="scope" >
-      <el-button size="small" @click="changeProgres(scope.row)">提交进度</el-button>
-    </template>
-    <template slot="state" slot-scope="scope" >
-      <div class="icon-font">
-        <i class="el-icon-success text-success" v-if="scope.row.state == 1"></i>
-        <i class="el-icon-warning text-warning" v-if="scope.row.state == 2"></i>
+  <basic-container>
+    <el-menu
+      :default-active="activeIndex"
+      mode="horizontal"
+      @select="handleSelect"
+    >
+      <el-menu-item index="1">我的消息</el-menu-item>
+      <el-menu-item index="2">所有消息</el-menu-item>
+    </el-menu>
+    <avue-crud
+      :data="data"
+      :option="option"
+      :table-loading="showLoading"
+      :page.sync="page"
+      :permission="permissionList"
+      @size-change="sizeChange"
+      @current-change="currentChange"
+    >
+      <template
+        slot="imageUrl"
+        slot-scope="scope"
+      >
+        <el-button
+          v-if="scope.row.imageUrl.length>0"
+          size="small"
+          @click="openPreview(scope.row.imageUrl,scope.$index)"
+        >图片</el-button>
+      </template>
+      <!-- 操作 -->
+      <template
+        slot="cz"
+        slot-scope="scope"
+      >
+        <el-button
+          size="small"
+          @click="changeProgres(scope.row)"
+        >提交进度</el-button>
+      </template>
+      <!-- 处理状态 -->
+      <template
+        slot="isCurrent"
+        slot-scope="scope"
+      >
+        <div class="icon-font">
+          <i
+            class="el-icon-success text-success"
+            v-if="scope.row.isCurrent"
+          ></i>
+          <i
+            class="el-icon-warning text-warning"
+            v-if="!scope.row.isCurrent"
+          ></i>
+        </div>
+      </template>
+    </avue-crud>
+    <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">提交进度</span>
+        <el-select
+          v-model="curRow.currentLinkId"
+          placeholder="请选择"
+        >
+          <el-option
+            label="已解决"
+            :value="3"
+          ></el-option>
+          <el-option
+            label="进入人工预处理环境"
+            :value="2"
+          ></el-option>
+        </el-select>
       </div>
-    </template>
-  </avue-crud>
-  <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">提交进度</span>
-      <el-select v-model="progres" placeholder="请选择">
-        <el-option label="已解决" :value="1"></el-option>
-        <el-option label="进入人工预处理环境" :value="2"></el-option>
-      </el-select>
-    </div>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="dialogVisible = false">取 消</el-button>
-      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
-    </span>
-  </el-dialog>
-</basic-container>
+      <span
+        slot="footer"
+        class="dialog-footer"
+      >
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="SubmissionProgress"
+        >确 定</el-button>
+      </span>
+    </el-dialog>
+  </basic-container>
 </template>
 
 <script>
-  import {mapGetters} from "vuex";
-  export default {
-    data() {
-      return {
-        activeIndex:"1",
-        curRow:{},
-        dialogVisible:false,
-        progres:1,
-
-        page:{
-          total:1,
-          currentPage: 1
-        },
-        showLoading:false,
-        data: [
+import { queryBusinessUserOpinionList, manageUserOperationStatus, queryBusinessUserOpinionListAll } from "@/api/news/news.js";
+import { mapGetters } from "vuex";
+export default {
+  data () {
+    return {
+      activeIndex: "1",
+      curRow: {},
+      dialogVisible: false,
+      page: {
+        total: 1,
+        currentPage: 1,
+        pageSize: 10
+      },
+      showLoading: false,
+      data: [],
+      option: {
+        border: true,
+        align: 'center',
+        menuAlign: 'center',
+        menu: false,
+        column: [
+          {
+            label: '时间',
+            prop: 'createTime',
+          },
+          {
+            label: '剩余反馈用户时间(分钟)',
+            prop: 'timeRemaining'
+          },
+          {
+            label: '项目',
+            prop: 'projectName',
+          },
+          {
+            label: '合同段',
+            prop: 'contractName',
+          },
+          {
+            label: '消息类型',
+            prop: 'problemType',
+          },
+          {
+            label: '问题描述',
+            prop: 'opinionContent',
+          },
           {
-            time:'2022-05-26 16:20:30',
-            remainingTime:'80',
-            project:'项目',
-            contract:'合同段',
-            newType:'消息类型',
-            describe:'问题描述',
-            picture:[
-              {url:'https://img.alicdn.com/tfs/TB1uevcCrj1gK0jSZFuXXcrHpXa-1880-640.jpg'},
-              {url:'https://img.alicdn.com/tfs/TB1v28TC8v0gK0jSZKbXXbK2FXa-1880-640.jpg'},
-            ],
-            state:1,
-          }, {
-            time:'2022-05-26 16:20:31',
-            remainingTime:'79',
-            project:'项目',
-            contract:'合同段',
-            newType:'消息类型',
-            describe:'问题描述',
-            picture:[
-              {url:'https://img.alicdn.com/tfs/TB1uevcCrj1gK0jSZFuXXcrHpXa-1880-640.jpg'},
-              {url:'https://img.alicdn.com/tfs/TB1v28TC8v0gK0jSZKbXXbK2FXa-1880-640.jpg'},
-            ],
-            state:2,
-          }
-        ],
-        option:{
-          border:true,
-          align:'center',
-          menuAlign:'center',
-          menu:false,
-          column:[
-            {
-              label:'时间',
-              prop:'time',
-            },
-            {
-              label:'剩余反馈用户时间(分钟)',
-              prop:'remainingTime'
-            },
-            {
-              label:'项目',
-              prop:'project',
-            },
-            {
-              label:'合同段',
-              prop:'contract',
-            },
-            {
-              label:'消息类型',
-              prop:'newType',
-            },
-            {
-              label:'问题描述',
-              prop:'describe',
-            },
-            {
-              label:'图片',
-              prop:'picture',
-              slot:true,
-            },
-            {
-              label:'操作',
-              prop:'cz',
-              slot:true,
-            },
-            {
-              label:'处理状态',
-              prop:'state',
-              slot:true,
-            },
-          ]
-         }
+            label: '图片',
+            prop: 'imageUrl',
+            slot: true,
+          },
+          {
+            label: '操作',
+            prop: 'cz',
+            slot: true,
+          },
+          {
+            label: '处理状态',
+            prop: 'isCurrent',
+            slot: true,
+          },
+        ]
+      }
+    };
+  },
+  computed: {
+    ...mapGetters(["userInfo"]),
+    permissionList () {
+      return {
+        addBtn: false,
+        viewBtn: false,
+        delBtn: false,
+        editBtn: false
       };
     },
-    computed: {
-      ...mapGetters(["userInfo"]),
-
-      permissionList() {
-        return {
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          editBtn: false
-        };
-      },
-    },
-    created() {
-      this.init();
-      //console.log(this.userInfo)
+  },
+  created () {
+    this.init();
+    //console.log(this.userInfo)
+  },
+  methods: {
+    init () {
+      this.queryBusinessUserOpinionList()
     },
-    methods: {
-      init(){
-
-      },
-      openPreview(scope,index=0){
-        this.$ImagePreview(scope.row.picture, index,{
+    openPreview (imageUrl, index) {
+      let imageUrls = []
+      imageUrl.forEach(val => {
+        imageUrls.push({ url: val })
+      });
+      this.$ImagePreview(imageUrls, index, {
         closeOnClickModal: true,
         // beforeClose:()=>{
         //   this.$message.success('关闭回调')
         // }
       });
-      },
-      changeProgres(row){
-        this.curRow = row;
-        this.dialogVisible = true;
+    },
+    changeProgres (row) {
+      this.curRow = { ...row }
+      this.dialogVisible = true;
+    },
+    handleSelect (key) {//消息分类菜单激活回调
+      this.activeIndex = key
+    },
+    async SubmissionProgress () {//提交进度弹框保存按钮事件
+      await this.manageUserOperationStatus({
+        currentLinkId: this.curRow.currentLinkId,
+        newNumber: this.curRow.newNumber,
+        userOpinionId: this.curRow.userOpinionId
+      })
+    },
+    //#region 分页
+    currentChange (val) {
+      this.page.currentPage = val
+      this.queryBusinessUserOpinionList()
+    },
+    sizeChange (val) {
+      this.page.pageSize = val
+      this.queryBusinessUserOpinionList()
+    },
+    async queryBusinessUserOpinionList () {//获取分配给当前登录用户的工单记录
+      const { data: res } = await queryBusinessUserOpinionList({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })
+      console.log(res);
+      if (res.code == 200) {
+        this.data = res.data.records
+        this.page.total = res.data.total
+      }
+    },
+    async manageUserOperationStatus (da) {//业务人员提交环节操作
+      const { data: res } = await manageUserOperationStatus(da)
+      console.log(res);
+      if (res.code == 200) {
+        this.dialogVisible = false
+      }
+    },
+    async queryBusinessUserOpinionListAll () {//所有工单处理列表
+      const { data: res } = await queryBusinessUserOpinionListAll({
+        current: this.page.currentPage,
+        size: this.page.pageSize
+      })
+      console.log(res);
+      if (res.code == 200) {
+        this.data = res.data.records
+        this.page.total = res.data.total
+      }
+    }
+    //#endregion
+  },
+  watch: {
+    'activeIndex' (value) {
+      this.page.currentPage = 1
+      this.page.pageSize = 10
+      if (value == 1) {
+        this.queryBusinessUserOpinionList()
+      } else {
+        this.queryBusinessUserOpinionListAll()
       }
     }
-  };
+  }
+};
 </script>
 
 <style scoped lang="scss">
-  .icon-font[class^="icon-"]{
-    font-size: 26px !important;
-  }
-  .titl-font{
-    font-size: 32px;
-  }
+.icon-font[class^="icon-"] {
+  font-size: 26px !important;
+}
+.titl-font {
+  font-size: 32px;
+}
 </style>