Browse Source

可视化等

zhuliu 2 năm trước cách đây
mục cha
commit
14e182ca98

+ 5 - 0
RMS-FrontEnd/src/api/permission.js

@@ -58,4 +58,9 @@ export default{
      getAllTenantList(params) {
       return axios.get('/permission/api/tenant/getTenantList', {params})
   },
+
+   //邀请码注册
+   addByInvitation(params){
+    return axios.get('/permission/api/tenant/addByInvitation',params)
+  }
 }

+ 10 - 0
RMS-FrontEnd/src/api/report.js

@@ -522,4 +522,14 @@ export default {
   removeShare(params){
     return axios.post('/report/api/shareReport/remove',params)
   },
+
+  //获取核心结论
+  getConclusion(params){
+    return axios.post('/report/api/getCronConClusions',params)
+  },
+
+  //报告可视化
+  reportVisual(params){
+    return axios.post('/report/api/report/reportVisual',params)
+  }
 }

+ 1 - 0
RMS-FrontEnd/src/components/Layout/mixins/index.js

@@ -5,6 +5,7 @@ export const webSocket = {
   methods: {
     connectWebSocket(userId) {
       let webSocket = new WebSocket(`ws://139.224.24.90:8872/api/v2/ws/` + userId)
+      // let webSocket = new WebSocket(`ws://139.224.24.90:8885/api/v2/ws/` + userId)
       Store.commit('SET_WEB_SOCKET', webSocket)
       webSocket.onopen = () => {
         console.log('WebSocket连接成功')

+ 10 - 0
RMS-FrontEnd/src/router/index.js

@@ -25,6 +25,15 @@ const routes = [
     component: () => import("../views/login/index.vue")
   },
   {
+    path:'/admin/invite',
+    name:'Invite',
+    meta: {
+      title: '邀请用户',
+      // loginRequest:false
+    },
+    component: () => import("../views/invite/index.vue")
+  },
+  {
     path: "/admin",
     meta:{
       title:'报告管理系统'
@@ -330,6 +339,7 @@ const routes = [
      },
      component: () => import('@/views/components/articles/components/history/components/echarts'),
     },
+    
     ]
   },
   {

+ 142 - 0
RMS-FrontEnd/src/views/invite/index.vue

@@ -0,0 +1,142 @@
+<template>
+    <div style="height:100%" class="register">
+        <el-container class="all">
+            <el-header style="z-index:1">
+                <div class="logo-bar">
+                    <img src="@/assets/logo-3.png" class="logo">
+                </div>
+            </el-header>
+            <el-main class="main">
+                <div class="content">
+                    <div class="title">用户注册</div>
+                     <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px" label-position="left">
+                        <el-form-item label="邀请码">
+                            <el-input v-model="ruleForm.invitation" placeholder="请输入邀请码"></el-input>
+                        </el-form-item>
+                        <el-form-item label="公司名称" prop="name">
+                            <el-input v-model="ruleForm.name" placeholder="请输入公司名称"></el-input>
+                        </el-form-item>
+                        <el-form-item label="联系人" prop="contacts">
+                            <el-input v-model="ruleForm.contacts" placeholder="请输入联系人"></el-input>
+                        </el-form-item>
+                        <el-form-item label="联系人邮箱" prop="email">
+                            <el-input v-model="ruleForm.email" placeholder="请输入联系人邮箱"></el-input>
+                        </el-form-item>
+                        <el-form-item label="联系人地址" prop="address">
+                            <el-input v-model="ruleForm.address" placeholder="请输入联系地址"></el-input>
+                        </el-form-item>
+                        <el-form-item label="管理员账号" prop="username">
+                            <el-input v-model="ruleForm.username" placeholder="请输入管理员账号"></el-input>
+                        </el-form-item>
+                        <el-form-item label="管理员密码" prop="password">
+                            <el-input v-model="ruleForm.password" placeholder="请输入管理员密码"></el-input>
+                        </el-form-item>
+                        <el-form-item >
+                            <!-- <el-button @click="close">取 消</el-button> -->
+                            <el-button type="primary" style="float:right" @click="submit" :loading="btnLoading">注 册</el-button>
+                        </el-form-item>
+                    </el-form>
+                </div>
+               
+            </el-main>
+        </el-container>
+        <div class="vue-particles">
+            <vue-particles color="#dedede" shapeType="star" linesColor="#dedede" hoverMode="grab" clickMode="push" style="height: 100%"></vue-particles>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            btnLoading:false,
+            ruleForm:{},
+            rules: {
+                name: [{ required: true, message: '请输入公司名称', trigger: 'blur' },],
+                contacts:[{ required: true, message: '请输入联系人', trigger: 'blur' },],
+                address: [{ required: true, message: '请输入联系地址', trigger: 'blur' },],
+                username:[{ required: true, message: '请输入管理员账号', trigger: 'blur' },],
+                password:[{ required: true, message: '请输入管理员密码', trigger: 'blur' },],
+                email:[{required:true,message: "请输入邮箱", trigger: "blur"},
+                    {pattern:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9_\.\-])+\.)+([a-zA-Z0-9]{2,4})+$/,
+                    message:'请输入正确的邮箱格式',trigger:'blur'}],
+            },
+        }
+    },
+    mounted(){
+
+    },
+    methods:{
+        submit() {
+            this.$refs.ruleForm.validate((valid) => {
+                if (valid) {
+                    this.btnLoading = true
+                    this.$api.addByInvitation(this.ruleForm).then(response => {
+                        this.$message.success('账号添加成功')
+                        this.btnLoading = false
+                    }).catch(error => {
+                        this.btnLoading = false
+                    })
+                } else {
+                    return false;
+                }
+            });
+        },
+    }
+}
+</script>
+<style>
+.content .el-form-item__label{
+    color:white
+}
+</style>
+<style lang="scss" scoped>
+    .logo {
+        margin-right: 10px;
+        width: 135px;
+        height: 35px;
+      }
+      .logo-bar{
+        padding: 20px;
+      }
+      .content{
+        width: 800px;
+        background: rgb(58, 55, 55);
+        opacity: 0.8;
+        padding: 20px;
+        padding-right:30px;
+        height: 550px;
+        border-radius: 5px;
+        position: absolute;
+        left: 0;
+        right: 0;
+        top: 0;
+        bottom: 0;
+        margin: auto;
+      }
+      .main{
+        z-index: 1;
+      }
+      .register{
+        height: 100%;
+        width: 100%;
+        overflow: hidden;
+        position: relative;
+      }
+      .vue-particles {
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        background: radial-gradient(ellipse at top left, rgba(105, 155, 200, 1) 0%, rgba(181, 197, 216, 1) 57%);
+    }
+    .title{
+        color: white;
+          margin-bottom: 40px;
+          font-weight: 500;
+          font-size: 22px;
+          text-align: center;
+          letter-spacing: 4px;
+    }
+</style>

+ 80 - 21
RMS-FrontEnd/src/views/report/components/CreateReport.vue

@@ -27,17 +27,18 @@
               </el-switch>
             </el-form-item> 
             <el-form-item label="核心结论" v-if="form.status == 3">
-              <el-checkbox-group v-model="form.conclusions">
+              <el-checkbox-group v-model="form.conclusionIds">
                 <el-checkbox v-for="item in conclusion" :key="item.dictChildValue" :label="item.dictChildValue">{{ item.dictChildLabel }}</el-checkbox>
               </el-checkbox-group>
             </el-form-item>
             <el-form-item label="结论论述" v-if="form.status == 3">
-              <el-input v-model="form.conclusionText" type="textarea" placeholder="请输入结论论述"></el-input>
+              <el-input v-model="form.cronConclusion" type="textarea" placeholder="请输入结论论述"></el-input>
             </el-form-item>
             <el-form-item label="后续跟进事项" v-if="form.status == 3">
              <span v-if="form.follows"><span v-for="item in form.follows" :key="item.followUpName" style="margin-right:10px">{{ item.followUpName}}</span></span> 
               <span>
                 <el-popover
+                ref="popover"
                 placement="bottom"
                 @hide="hidePopover"
                 @show="showPopover"
@@ -335,8 +336,8 @@ export default {
         this.rules.personId[0].required = false
         this.rules.clientId[0].required = false
         this.rules.departmentId[0].required = false
+        this.$set(this.form,'conclusionIds',[])
         this.conclusion = this.dictMessage[this.reportAsDicItem[this.form.type]]
-        this.$set(this.form,'conclusions',[])
         this.matterType = 2
       }else{
         this.rules.personId[0].required = true
@@ -680,8 +681,39 @@ export default {
     },
     //获取后续事项
     getMatter(val){
-      this.form.follows = val
       this.matterSign = false
+      try{
+        var keyList={
+          followUpName:'',
+          remark:'',
+          agent:'',
+          assistPerson:'',
+          timeLimit:''
+        }
+        var list = []
+        val.forEach(item=>{
+          var a = false
+          for(let key in keyList){
+            if(item[key] !='' && item[key] != null){
+              a = true
+            }
+          }
+          if(a == true){
+            if(item.followUpName!='') {
+              list.push(item)              
+            }else{
+              throw new Error()
+            }
+          }
+        })
+        this.form.follows = list
+        this.$refs.popover.showPopper = false
+        
+      }catch(e){
+        this.$message.error('后续事项名称不能为空')
+        this.$refs.popover.showPopper = true
+      }  
+      
     },
     // 点击确定跳转并打开新窗口页面
     ifDialog() {
@@ -696,24 +728,51 @@ export default {
           this.loading = false
           if(!this.form.id){
             if(this.form.status == 3){
-              let formData = new FormData()
-              if(this.file){
-                for (var i = 0; i < this.file.length; i++) {
-                  formData.append("files", this.file[i]);
-                }
-              }
-              formData.append('report',JSON.stringify(this.form))
-              this.$api.AddReport(formData).then(response=>{
-                if(response.code == 200){
-                  this.file = []
-                  this.$refs.upload.clearFiles()
-                  this.$message.success('报告创建成功')
-                  this.$emit('getList',true)
-                  this.handleClose()
-                }
-              })
-              return false
+              try{
+                        var keyList={
+                            followUpName:'',
+                            remark:'',
+                            agent:'',
+                            assistPerson:'',
+                            timeLimit:''
+                        }
+                        this.form.follows.forEach(item=>{
+                            var a = false
+                            for(let key in keyList){
+                                if(item[key] !='' && item[key] != null){
+                                    a = true
+                                }
+                            }
+                            if(a == true){
+                                if(item.followUpName!='') {
+                                    
+                                }else{
+                                    throw new Error()
+                                }
+                            }
+                        })
+                        let formData = new FormData()
+                        if(this.file){
+                          for (var i = 0; i < this.file.length; i++) {
+                            formData.append("files", this.file[i]);
+                          }
+                        }
+                        formData.append('report',JSON.stringify(this.form))
+                        this.$api.AddReport(formData).then(response=>{
+                          if(response.code == 200){
+                            this.file = []
+                            this.$refs.upload.clearFiles()
+                            this.$message.success('报告创建成功')
+                            this.$emit('getList',true)
+                            this.handleClose()
+                          }
+                        })
+                    }catch(e){
+                        this.$message.error('后续事项名称不能为空')
+                    }  
+                 return false
             }
+            console.log(1)
             this.$confirm('是否需要审核?', '提示', {
                       confirmButtonText: '是',
                       cancelButtonText: '否',

+ 7 - 0
RMS-FrontEnd/src/views/report/components/Tabel.vue

@@ -26,6 +26,13 @@
       <el-table-column label="负责人" prop="personName" sortable align="center"> </el-table-column>
       <el-table-column label="客户" prop="clientName" sortable align="center"> </el-table-column>
       <el-table-column label="技术/产品" prop="proTec" sortable align="center"> </el-table-column>
+      <el-table-column label="核心结论" prop="conclusions" sortable align="center">
+        <template slot-scope="scope">
+          <div>
+            <span v-for="(item,index) in scope.row.conclusions" :key="index" style="margin:0">{{ item }} <span v-if="index<scope.row.conclusions.length-1">| </span></span>
+          </div>
+        </template>  
+      </el-table-column>
       <el-table-column label="状态" align="center" >
         <template slot-scope="scope">
             <span>{{state[scope.row.status]}}</span>

+ 48 - 38
RMS-FrontEnd/src/views/report/components/matter/addMatter.vue

@@ -47,8 +47,8 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item>
-            <div style="display:flex;justify-content:center">
-                <el-button type="primary" @click="submitForm()" size="small" style="width:100px">保存</el-button>
+            <div style="display:flex;justify-content:center" v-if="formData[0].status == '进行中'">
+                <el-button type="primary" @click="submitForm()" size="small" style="width:100px" :loading="btnLoading">保存</el-button>
                 <el-button  @click="resetForm()" size="small" style="width:100px">取消</el-button>
             </div>
           
@@ -133,8 +133,8 @@
           </template>
         </el-table-column>
       </el-table>
-      <div style="display:flex;justify-content: center;margin-top:20px" v-if="reportId">
-        <el-button type="primary" @click="submitForm1()" size="small" style="width:100px">保存</el-button>
+      <div style="display:flex;justify-content: center;margin-top:20px" v-if="reportId && (sign != false && sign != true)">
+        <el-button type="primary" @click="submitForm1()" size="small" style="width:100px" :loading="btnLoading">保存</el-button>
         <el-button size="small" @click="resetForm()" style="width:100px">取消</el-button>
       </div>
     </div>
@@ -145,6 +145,7 @@ export default {
   props: ["type", "reportId",'sign','row'],
   data() {
     return {
+      btnLoading:false,
       formData: [
         {
           reportId:this.reportId,
@@ -172,7 +173,7 @@ export default {
     },
     sign(val){
       if(val){
-        this.$emit('value',this.formData.filter(item=>{return item.followUpName !=''}))
+        this.$emit('value',this.formData)
       }
     },
   },
@@ -216,22 +217,27 @@ export default {
     submitForm() {
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
+          this.btnLoading = true
           if(this.row){
             this.$api.updateMatters(this.formData).then(response=>{
               if(response.code == 200){
+                this.btnLoading = false
                 this.$message.success('后续跟进事项更新成功')
                 this.resetForm()
               }
             }).catch(error=>{
+              this.btnLoading = false
                 this.$message.error('后续跟进事项更新失败')
             })
           }else{
             this.$api.addMatters(this.formData).then(response=>{
               if(response.code == 200){
+                this.btnLoading = false
                 this.$message.success('后续跟进事项添加成功')
                 this.resetForm()
               }
             }).catch(error=>{
+              this.btnLoading = false
                 this.$message.error('后续跟进事项添加失败')
             })
           }
@@ -242,43 +248,47 @@ export default {
       });
     },
     submitForm1(){
-        var list = []
-        var b = false
-        var keyList={
-          followUpName:'',
-          remark:'',
-          agent:'',
-          assistPerson:'',
-          timeLimit:''
-        }
-        this.formData.forEach(item=>{
-            var a = false
-            for(let key in keyList){
-                if(item[key] !='' ){
-                    a = true
+      try{
+          var list = []
+          var b = false
+          var keyList={
+            followUpName:'',
+            remark:'',
+            agent:'',
+            assistPerson:'',
+            timeLimit:''
+          }
+          this.formData.forEach(item=>{
+              var a = false
+              for(let key in keyList){
+                  if(item[key] !='' && item[key] != null){
+                      a = true
+                  }
+              }
+              if(a == true){
+                if(item.followUpName!='') {
+                      b=true
+                      list.push(item)
+                }else{
+                      b=false
+                      throw new Error()
                 }
-            }
-            if(a == true){
-               if(item.followUpName!='') {
-                    b = true
-                    list.push(item)
-               }else{
-                    b = false
-                    return false
-               }
-            }
-        })
-        if(!b){
-            this.$message.error('名称不能为空')
-            return false
-        }
-        this.$api.addMatters(list).then(response=>{
+              }
+          })
+          this.$api.addMatters(list).then(response=>{
             if(response.code == 200){
+              this.btnLoading = false
+              this.$message.success('后续跟进事项添加成功')
                 this.resetForm()
             }
-        }).catch(error=>{
-            this.$message.error('后续跟进事项添加失败')
-        })
+          }).catch(error=>{
+              this.btnLoading = false
+              this.$message.error('后续跟进事项添加失败')
+          })
+      }catch(e){
+        this.$message.error('后续跟进事项名称不能为空')
+      }
+        
     },
     //取消
     resetForm() {

+ 82 - 19
RMS-FrontEnd/src/views/report/components/matter/remarryMatter.vue

@@ -28,7 +28,7 @@
                     <template slot-scope="scope">
                         <div>
                             <el-dropdown trigger="click" split-button type="primary" size="small" @command="handleCommand1($event,scope.row)" >
-                                <p @click="edit(scope.row)">编辑</p>
+                                <p @click="edit(scope.row)">{{ scope.row.status=='进行中'?'编辑':'查看'}}</p>
                                 <el-dropdown-menu slot="dropdown" class="text-align_center">
                                     <el-dropdown-item command="1" v-if="scope.row.status=='进行中'">登记结果</el-dropdown-item>
                                     <el-dropdown-item command="2" v-else>查看结果</el-dropdown-item>
@@ -62,14 +62,18 @@
         <el-dialog
             title="登记结果"
             :visible.sync="registerVisible"
-            width="1100px"
+            :width="registerForm.type==1?'1100px':'500px'"
             :before-close="closeRegister"
             >
             <div>
+                <div style="display:flex;justify-content:flex-end;margin-bottom:10px">
+                    <el-button type="primary" size="small" v-if="registerForm.type==2" @click="editRegister">{{ registerForm.edit?'保存':'编辑' }}</el-button>
+                </div>
+                
                 <el-form :model="registerForm" label-width="100px">
-                    <el-form-item label="结论" prop="conclusion">
+                    <el-form-item label="结论" prop="conclusion">
                         <el-input
-                            v-if="registerForm.type==1"
+                            v-if="registerForm.type==1 || registerForm.edit == true"
                             v-model="registerForm.conclusion"
                             type="textarea"
                             autocomplete="off"
@@ -77,14 +81,14 @@
                         ></el-input>
                         <span v-else>{{ registerForm.conclusion }}</span>
                     </el-form-item>
-                    <el-form-item label="上传附件">
-                        <div v-if="registerForm.reportFiles" class="upload-file">
-                            <div v-for="item in registerForm.reportFiles" style="margin:0;display:flex;justify-content:space-around;">
+                    <el-form-item label="上传附件">
+                        <div v-if="registerForm.filesVOs" class="upload-file">
+                            <div v-for="item in registerForm.filesVOs" style="margin:0;display:flex;justify-content:space-around;">
                                 <p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis;cursor: pointer">{{item.name?item.name+'.'+item.suffix:item.fileName}}</p> 
                                 <Menu :data="item" @delFile="delFile"></Menu>
                             </div>
                         </div>
-                        <el-upload v-if="registerForm.type==1" ref="upload" class="upload-file" drag action="#" :auto-upload="false" :show-file-list="true" :on-change="onChange" multiple   :on-preview="handlePreview" :on-remove="handleRemove">
+                        <el-upload v-if="registerForm.type==1 || registerForm.edit == true" ref="upload" class="upload-file" drag action="#" :auto-upload="false" :show-file-list="true" :on-change="onChange" multiple   :on-preview="handlePreview" :on-remove="handleRemove">
                             <i :class="!file ? 'el-icon-upload' : 'el-icon-refresh'"></i>
                             <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
                             <div class="el-upload__tip" slot="tip"></div>
@@ -93,9 +97,12 @@
                 </el-form>
                 <addMatter :type="type" :reportId="reportId" :sign="matterSign" @value="getMatter" v-if="registerForm.type==1"></addMatter>
             </div>
-            <div slot="footer" class="dialog-footer">
+            <div slot="footer" class="dialog-footer" v-if="registerForm.type==1 || registerForm.edit == true">
                 <el-button @click="closeRegister">取 消</el-button>
-                <el-button type="primary" @click="submitRegister">确 定</el-button>
+                <el-button type="primary" @click="submitRegister" :loading="btnLoading">确 定</el-button>
+            </div>
+            <div slot="footer" class="dialog-footer" v-else>
+                <el-button @click="closeRegister">关 闭</el-button>
             </div>
         </el-dialog>
     </div>
@@ -111,6 +118,7 @@ export default {
     props:['reportId'],
     data() {
         return {
+            btnLoading:false,
             tableHeight:null,
             title:'',
             dialogVisible:false,
@@ -217,7 +225,15 @@ export default {
             }else{
 
             }
-            this.deleteMatters(ids)
+            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.deleteMatters(ids)
+            }).catch(() => {          
+            });
+            
         },
         //删除事项
         deleteMatters(ids){
@@ -243,13 +259,13 @@ export default {
         },
         //上传附件
         onChange(file, fileList) {
-            if(this.registerForm.reportFiles){
-                var index3 = this.registerForm.reportFiles.findIndex(item=>{
+            if(this.registerForm.filesVOs){
+                var index3 = this.registerForm.filesVOs.findIndex(item=>{
                 return item.name+'.'+item.suffix == file.raw.name
                 })
                 if(index3!=-1){
                 
-                this.Already.push(this.registerForm.reportFiles[index3].name)
+                this.Already.push(this.registerForm.filesVOs[index3].name)
                 var index2 = fileList.reverse().findIndex(item=>{
                     return item.raw.name == file.raw.name
                 })
@@ -332,11 +348,14 @@ export default {
         },
         //移除已保存的文件
         delFile(id){
-            var index = this.registerForm.reportFiles.findIndex(item=>{
+            var index = this.registerForm.filesVOs.findIndex(item=>{
                 return item.id == id
             })
             if(index!=-1){
-                this.registerForm.reportFiles.splice(index,1)
+                this.registerForm.filesVOs.splice(index,1)
+                if(this.registerForm.type == 2 && !this.registerForm.edit){
+                    this.submitRegister()
+                }
             }
         },
         //打开登记结果弹窗
@@ -350,6 +369,9 @@ export default {
         closeRegister(){
             this.type = null
             this.registerForm = {}
+            if(this.registerForm.type==1 || this.registerForm.edit){
+                this.$refs.upload.clearFiles()
+            }
             this.registerVisible = false
         },
         //获取后续事项
@@ -357,11 +379,51 @@ export default {
             this.registerForm.followUps = val
             this.matterSign = false
         },
+        //编辑事项结果
+        editRegister(){
+            this.$set(this.registerForm,'edit',!this.registerForm.edit)
+        },
         //更新后续跟进事项结果
         submitRegister(){
             this.matterSign = true
             this.$nextTick(()=>{
-                let formData = new FormData()
+                this.btnLoading = true
+                if(this.registerForm.followUps && this.registerForm.followUps.length>0){
+                    try{
+                        var keyList={
+                            followUpName:'',
+                            remark:'',
+                            agent:'',
+                            assistPerson:'',
+                            timeLimit:''
+                        }
+                        this.registerForm.followUps.forEach(item=>{
+                            var a = false
+                            for(let key in keyList){
+                                if(item[key] !='' && item[key] != null){
+                                    a = true
+                                }
+                            }
+                            if(a == true){
+                                if(item.followUpName!='') {
+                                    
+                                }else{
+                                    throw new Error()
+                                }
+                            }
+                        })
+                        this.submitRegister1()
+                    }catch(e){
+                        this.$message.error('名称不能为空')
+                    }
+                }else{
+                    this.submitRegister1()
+                } 
+            })
+           
+        },
+        submitRegister1(){
+            let formData = new FormData()
                 if(this.file){
                     for (var i = 0; i < this.file.length; i++) {
                     formData.append("files", this.file[i]);
@@ -371,12 +433,13 @@ export default {
                 formData.append('register',JSON.stringify(this.registerForm))
                 this.$api.register(formData).then(response=>{
                     if(response.code == 200){
+                        this.btnLoading = false
                         this.getList()
                         this.closeRegister()
                     }
+                }).catch(error=>{
+                    this.btnLoading = false
                 })
-            })
-           
         }
     },
 }

+ 134 - 0
RMS-FrontEnd/src/views/report/components/visual/reportVisual.vue

@@ -0,0 +1,134 @@
+<template>
+  <div class="chart" v-if="show" :style="{height: height }">
+    <div v-for="item in chartData.filter(item=>{return item.typeValue!=6})" :key="item.reportType" :id="item.reportType" class="items" :style="{ width }" ></div>
+  </div>
+</template>
+<script>
+
+export default {
+  props: ["data"],
+  data() {
+    return {
+      show: false,
+      chartData: [],
+      fullWidth: document.documentElement.clientWidth,
+      height:document.documentElement.clientHeight,
+      width: 0,
+      reportAsDicItem:{
+        "0":"INVALID_ASSESS",
+        "1":"THIRD_ASSESS",
+        "2":"STABILITY_ASSESS",
+        "3":"FTO_ASSESS",
+        "4":"TORT_ASSESS",
+        "5":"AVOID_ASSESS",
+      },
+    };
+  },
+  watch: {
+    fullWidth() {
+      this.refresh();
+    },
+  },
+  created(){
+    window.addEventListener('resize', this.handleResize)
+  },
+  mounted() {},
+  methods: {
+    handleResize(event) {
+      this.fullWidth = document.documentElement.clientWidth
+    },
+    refresh() {
+      this.show = true;
+      this.width = (this.fullWidth / 3) +20 + 'px'
+      this.height = document.documentElement.clientHeight - 240 +'px'
+      this.$nextTick(() => {
+        this.chartData.forEach((item) => {
+          if(item.typeValue != 6){
+            this.initChart1(item, item.reportType, item.reportType+'('+ item.reportNum +')');
+          }
+          
+        });
+      });
+    },
+    open(data) {
+        console.log(document.documentElement.clientHeight - 200 +'px')
+      this.chartData = data;
+      this.refresh()
+    },
+    initChart(id) {
+      const chartDom = document.getElementById(id);
+      return this.$echarts.init(chartDom);
+    },
+    initChart1(data, key, name) {
+        this.initChart(key).on('click',(params)=>{
+            // console.log(params)
+            this.$emit('params',params.data)
+        })
+      this.initChart(key).setOption(
+         {
+              tooltip: {
+                trigger: "item",
+              },
+              legend: {
+                   
+                    left: 'center',
+                    top:'0'
+                },
+              title: {
+                text: name,
+                bottom: 'center',
+                left: "center",
+                textStyle: {
+                  fontSize: 16,
+                  fontWeight: 999,
+                  fontFamily: "黑体",
+                },
+              },
+              series: [
+                {
+                  name: "",
+                  label: {
+                    show: true,
+                    // position: "center",
+                    formatter:function(data){
+	                  return `${data.name} ${data.value}(${data.percent.toFixed(1)}%)`
+	                }
+                  },
+                  labelLine: {
+	                show: true,
+	              },
+                  type: "pie",
+                  radius: ["40%", "70%"],
+                  data: data.conclusions.map(item=>{
+                    return {value:item.num,name:item.name,type:data.typeValue,conclusionType:item.value}
+                  })
+                },
+              ],
+              emphasis: {
+                    itemStyle: {
+                    shadowBlur: 10,
+                    shadowOffsetX: 0,
+                    shadowColor: 'rgba(0, 0, 0, 0.5)'
+                    }
+                }
+            }
+      );
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.items{
+    height: 320px;
+    background: white;
+    margin:15px;
+    padding:10px;
+}
+.chart{
+    background:#f4f4f4;
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap ;
+    overflow: auto;
+}
+</style>

+ 115 - 35
RMS-FrontEnd/src/views/report/index.vue

@@ -1,48 +1,77 @@
 <template>
-    <div style="background:white;">
+    <div style="background:white;min-width:1100px">
         <div style="height:50px">
-            <div style="display:inline-block;margin-left:20px">
-                <el-dropdown size="medium" style="margin-top:10px;margin-right:20px" v-if="$permission('/pcs/report/add')">
-                <el-button type="primary" size="small" >
-                    创建报告<i class="el-icon-arrow-down el-icon--right"></i>
-                </el-button>
+            <div style="display:inline-block;margin-left:20px;display:flex;justify-content: space-between;align-items:center">
+                <el-dropdown size="small" style="margin-right:20px" v-if="$permission('/pcs/report/add')">
+                  <el-button type="primary" size="small" >
+                      创建报告<i class="el-icon-arrow-down el-icon--right"></i>
+                  </el-button>
                    <el-dropdown-menu slot="dropdown" style="margin-top:0px" v-if="dictMessage.REPORT_TYPE">
                     <!-- 遍历按钮 -->
                       <el-dropdown-item v-for="item in dictMessage.REPORT_TYPE.filter(item=>!['6'].includes(item.dictChildValue))" :key="item.dictChildLabel"  @click.native="handleAnalyse(item.dictChildValue)" v-if="$permission('/pcs/report/add/'+item.permission)">{{item.dictChildLabel}}</el-dropdown-item>
                     </el-dropdown-menu>
                 </el-dropdown>
-
-                <el-input v-model="queryParams.signPatentNo" placeholder="请输入标的专利" style="margin-left:100px; width: 200px;"  size="small"></el-input>
-                <el-button type="primary" @click="getList" style="margin-left: 10px;" size="small">🔍</el-button>
+                <div style="margin-left:20px;height:50px">
+                   <el-form :inline="true" :model="queryParams" style="white-space: nowrap;">
+                      <el-form-item label="标的专利/产品">
+                        <el-input v-model="queryParams.signPatentNo" placeholder="请输入标的专利/产品" size="small" style="width:150px"></el-input>
+                      </el-form-item>
+                      <el-form-item label="报告类型">
+                        <el-select v-model="queryParams.types" multiple clearable size="small" v-if="dictMessage.REPORT_TYPE" style="width:150px">
+                          <el-option v-for="item in dictMessage.REPORT_TYPE.filter(item=>!['6'].includes(item.dictChildValue))" :key="item.dictChildLabel" :label="item.dictChildLabel" :value="item.dictChildValue"></el-option>
+                        </el-select>
+                      </el-form-item>
+                      <el-form-item label="核心结论">
+                        <el-select v-model="queryParams.cronIds" size="small" multiple clearable style="width:150px">
+                          <el-option v-for="item in ConclusionList.filter(item=>{return this.queryParams.types.length>0?this.queryParams.types.indexOf(item.rType.toString()) != -1:item.cTypeId!=''})" :key="item.cType" :label="item.cTypeName" :value="item.cType">
+                            <span style="float: left">{{ item.cTypeName }}</span>
+                            <span style="float: right; color: #8492a6; font-size: 13px;margin-left:10px">{{ item.rTypeName }}</span>
+                          </el-option>
+                        </el-select>
+                      </el-form-item>
+                      <el-form-item>
+                        <el-button type="primary" @click="getList2" style="margin-left: 10px;" size="small">🔍</el-button>
+                      </el-form-item>
+                    </el-form>
+                </div>
+               
+                <div>
+                  <!-- <el-button type="warning" size="small" style="display: inline-block;margin-right: 10px;" @click="handleField">显示栏位管理</el-button> -->
+                  <div style="margin-right: 10px;display: inline-block;">
+                    
+                    <el-button-group style="display:flex;justify-content:flex-start">
+                      <el-button size="small" :type="queryShowType === '2' ? 'primary' : ''"  @click="onChange2('2')" >可视化</el-button>
+                      <el-button :type="queryShowType === '0' ? 'primary' : ''" @click="onChange2('0')" size="small">列表 </el-button>
+                      <el-button :type="queryShowType === '1' ? 'primary' : ''" @click="onChange2('1')" size="small">卡片</el-button>
+                    </el-button-group>
+                  </div>  
+                </div>
+                
             </div>
             <!-- <div> -->
               
             <!-- </div> -->
-         <div class="right">
-          <!-- <el-button type="warning" size="small" style="display: inline-block;margin-right: 10px;" @click="handleField">显示栏位管理</el-button> -->
-          <div style="margin-top: 10px;margin-right: 10px;display: inline-block;">
-            <!-- <el-button size="small" type="primary" @click="reportVisual" style="margin-right:10px">报告可视化</el-button> -->
-            <el-button-group>
-              <el-button :type="queryShowType === '0' ? 'primary' : ''" @click="onChange2('0')" size="small">列表 </el-button>
-              <el-button :type="queryShowType === '1' ? 'primary' : ''" @click="onChange2('1')" size="small">卡片</el-button>
-            </el-button-group>
-          </div>  
-        </div> 
+          
         </div>
  
         <el-main class="workspace-main" v-loading="loading">
-        <component :is="viewType" :data="dataList" :state="state" :group="queryParams.group" :params="queryParams"  @option="handleOption" @sort="handleSort" @getRow="getRow"></component>
-        <div style="text-align: center;">
-          <el-pagination
-              background
-              layout="total,sizes, prev, pager, next, jumper"
-              :current-page.sync="queryParams.current"
-              :page-sizes="pageSize"
-              :page-size.sync="queryParams.size"
-              @current-change="handleCurrentChange"
-              @size-change="handleSizeChange"
-              :total="total">
-          </el-pagination>
+          <div v-if="queryShowType == 2">
+            <Report-Visual ref="reportVisual" @params="getParams"></Report-Visual>
+          </div>
+          <div v-else>
+             <component :is="viewType" :data="dataList" :state="state" :group="queryParams.group" :params="queryParams"  @option="handleOption" @sort="handleSort" @getRow="getRow"></component>
+            <div style="text-align: center;">
+              <el-pagination
+                  background
+                  layout="total,sizes, prev, pager, next, jumper"
+                  :current-page.sync="queryParams.current"
+                  :page-sizes="pageSize"
+                  :page-size.sync="queryParams.size"
+                  @current-change="handleCurrentChange"
+                  @size-change="handleSizeChange"
+                  :total="total">
+              </el-pagination>
+            </div>
         </div>
       </el-main>
       <!-- 弹窗创建报告 -->
@@ -90,6 +119,7 @@ import ProjectFileDrawer from "./components/File.vue";
 import { downLoad2 } from "@/utils";
 
 import shareReport from './components/share/shareReport.vue';
+import ReportVisual from './components/visual/reportVisual.vue';
 export default {
   components: {
     ReportTabel,
@@ -98,7 +128,8 @@ export default {
     ProjectField,
     ReportTemplate,
     ProjectFileDrawer,
-    shareReport
+    shareReport,
+    ReportVisual
   },
   data() {
     return {
@@ -111,11 +142,22 @@ export default {
       viewType: 'ReportTabel',
       // state: ["开卷审核中","创建中", "处理中", "完成","取消开卷","补资料中"],
       queryParams: {
+        cronIds:[],
+        types:[],
         group: [],
         size: 10,
         current: 1,
         signPatentNo:"",
       },
+      reportAsDicItem:{
+        "0":"INVALID_ASSESS",
+        "1":"THIRD_ASSESS",
+        "2":"STABILITY_ASSESS",
+        "3":"FTO_ASSESS",
+        "4":"TORT_ASSESS",
+        "5":"AVOID_ASSESS",
+      },
+      ConclusionList:[],
       pageSize:[10,"全部"],
       total: 0,
       loading: false,
@@ -144,7 +186,6 @@ export default {
         })
       }
       
-
       return a
     },
     state(){
@@ -160,11 +201,23 @@ export default {
       
     }
   },
+  watch:{
+  },
   mounted() {
     this.getList()
+    this.getConclusion()//获取核心结论
   },
   methods: {
-
+    
+    //获取核心结论
+    getConclusion(){
+      this.$api.getConclusion([]).then(response=>{
+        if(response.code == 200){
+          this.ConclusionList = response.data
+        }
+      })
+      
+    },
     handleSizeChange(val) {
       // this.queryParams.size = null
       // this.queryParams.current = null
@@ -500,8 +553,35 @@ export default {
       this.getList()
       this.handleChangeView()
     },
+    getList2(){
+      this.getList()
+      this.reportVisual()
+    },
+    getParams(params){
+      console.log(params)
+      this.queryParams.cronIds=[params.conclusionType]
+      this.queryShowType = '0'
+      this.getList2()
+
+    },
+    reportVisual() {
+      this.$api.reportVisual(this.queryParams).then(response=>{
+            if(response.code == 200){
+              this.$refs.reportVisual.open(response.data)
+            }
+          })
+     },
     onChange2(type) {
       this.queryShowType = type
+      if(type == 2){
+        
+        this.$nextTick(()=>{
+          this.reportVisual()
+          
+        })
+        
+        return false
+      }
       this.queryParams.size = this.queryShowType === '0' ? 10 : 12
       this.onChange()
     },
@@ -541,7 +621,7 @@ export default {
       })
      
     },
-    reportVisual() { },
+   
   },
 }
 </script>

+ 1 - 1
RMS-FrontEnd/src/views/report/reportDetails/components/SelectedPatent.vue

@@ -10,7 +10,7 @@
               </el-tooltip>
             </div>
             <el-button @click="importPatent(reportId,true)" type="primary" size="small" style=" margin-left: 10px;" >导入</el-button>
-            <el-button @click="taskFeil" type="primary" size="small" style="margin-left: 10px;" >任务分配</el-button>
+            <el-button @click="taskFeil" type="primary" size="small" style="margin-left: 10px;" v-if="row.status!=3">任务分配</el-button>
             <!-- <el-button @click="taskWork" type="primary" size="small" style="float: right; margin-left: 10px;" >协同办公</el-button> -->
             <div >
                 <div class="btnSelected" @click="sift" style="width:80px;height:32px;right: 100px;display:flex;justify-content:space-around;border-radius:5px; cursor: pointer; ">

+ 42 - 34
RMS-FrontEnd/src/views/report/reportDetails/components/basicMessage.vue

@@ -1,6 +1,6 @@
 <template>
     <div> 
-        <el-button type="primary" @click="submit" style="float:right" v-if="!noEdit1">提交</el-button>
+        <!-- <el-button type="primary" @click="submit" style="float:right" v-if="!noEdit1">提交</el-button> -->
         <div style="width:500px;margin:0 auto">
             <el-form :model="form" ref="reportForm" label-width="120px">
                 
@@ -50,6 +50,12 @@
                     <div class="el-upload__tip" slot="tip"></div>
                 </el-upload>
                 </el-form-item>
+                <el-form-item label="核心结论:" prop="conclusions" v-if="form.status==3 && form.conclusions && form.conclusions.length>0">
+                  <span v-for="(item,index) in form.conclusions" :key="index" style="margin:0">{{ item }} <span v-if="index<form.conclusions.length-1">| </span></span>
+                </el-form-item>
+                <el-form-item label="核心结论论述:" prop="cronConclusion" v-if="form.status==3 && form.cronConclusion">
+                  <span >{{ form.cronConclusion }} </span>
+                </el-form-item>
                 <el-form-item label="备注:" prop="remark" v-if="form.remark">
                     <span>{{form.remark}}</span>
                 </el-form-item>
@@ -124,42 +130,44 @@ export default {
             })
             if(index!=-1){
                 this.form.reportFiles.splice(index,1)
+                this.submit()
             }
         },
         onChange(file, fileList) {
-      if(this.form.reportFiles){
-        var index3 = this.form.reportFiles.findIndex(item=>{
-          return item.name+'.'+item.suffix == file.raw.name
-        })
-        if(index3!=-1){
-        
-          this.Already.push(this.form.reportFiles[index3].name)
-          var index2 = fileList.reverse().findIndex(item=>{
-            return item.raw.name == file.raw.name
-          })
-          fileList.splice(index2,1)
-        }else{
-          this.inFile(file, fileList)
-        }
-      }else{
-        this.inFile(file, fileList)
-      }
-    this.$nextTick(()=>{
-      var b = ''
-      if(this.Already.length>0){
-        this.Already.forEach(item=>{
-          b = b+item+','
-        })
-        this.$alert('文件'+b+'已存在', '提示', {
-          confirmButtonText: '确定',
-          type:'warning',
-          callback: action => {
-            this.Already = []
+          if(this.form.reportFiles){
+            var index3 = this.form.reportFiles.findIndex(item=>{
+              return item.name+'.'+item.suffix == file.raw.name
+            })
+            if(index3!=-1){
+            
+              this.Already.push(this.form.reportFiles[index3].name)
+              var index2 = fileList.reverse().findIndex(item=>{
+                return item.raw.name == file.raw.name
+              })
+              fileList.splice(index2,1).reverse()
+            }else{
+              this.inFile(file, fileList)
+            }
+          }else{
+            this.inFile(file, fileList)
           }
-        });
-        
-      }
-    })
+        this.$nextTick(()=>{
+          var b = ''
+          if(this.Already.length>0){
+            this.Already.forEach(item=>{
+              b = b+item+','
+            })
+            this.$alert('文件'+b+'已存在', '提示', {
+              confirmButtonText: '确定',
+              type:'warning',
+              callback: action => {
+                this.Already = []
+              }
+            });
+            
+          }
+          this.submit()
+        })
     },
     inFile(file, fileList){
       var index = this.file.findIndex(item=>{
@@ -170,7 +178,7 @@ export default {
         var index2 = fileList.reverse().findIndex(item=>{
           return item.raw.name == file.raw.name
         })
-        fileList.splice(index2,1)
+        fileList.splice(index2,1).reverse()
       }else{
         this.file.push(file.raw) 
       }