Explorar o código

新手指引结束后的动画

zhuliu hai 1 ano
pai
achega
55b6c34737

+ 1 - 1
src/views/home/components/echarts/index.vue

@@ -47,7 +47,7 @@ export default {
 <style lang="scss" scoped>
 .home_echarts{
     width: 100%;
-    height: 350px;
+    height: 400px;
     display: flex;
     flex: 1;
     align-items: center;

+ 3 - 3
src/views/home/index.vue

@@ -39,7 +39,7 @@
           <div>
             <el-link :underline="false" class="elLink">
               <span>
-                <i class="iconfont icon-tubiao- plus margin-right_10"></i>
+                <i class="iconfont icon-tubiao- font-size_20 margin-right_10"></i>
                 <i class="iconfont icon-youxiang"></i>
               </span>
             </el-link>
@@ -62,7 +62,7 @@
             <el-link :underline="false" class="elLink">实时动态</el-link>
           </div>
           <div class="elLink">
-            <i class="iconfont icon-xinxi plus"></i>
+            <i class="iconfont icon-xinxi font-size_20"></i>
           </div>
         </div>
       </div>
@@ -303,7 +303,7 @@ export default {
         i {
           font-size: 16px;
         }
-        .plus{
+        .font-size_20{
           font-size: 20px;
         }
       }

+ 37 - 1
src/views/layout/components/guide.js

@@ -306,6 +306,7 @@ export const guide = {
                     //     localStorage.firstRoute = JSON.stringify(arr)
                     //     drivers.destroy();
                     // },
+               
                     onDestroyed:()=>{
                         if(userinfo){
                             if(arr[userinfo.id]){
@@ -313,11 +314,46 @@ export const guide = {
                                 localStorage.firstRoute = JSON.stringify(arr)  
                             }
                         }
-                        drivers.destroy();
+                        drivers.destroy(); 
+                        this.animate()
+                        
                     }
                 })
                 drivers.drive()
             })
+        },
+        animate(){
+            const guid = document.querySelector('.help-guid')
+            const PLUS_SIZE = 30;
+            const body = document.body
+            const box = document.createElement('div')
+            box.className = 'plus'
+            box.innerHTML = '<div class="plus-icon"></div>'
+
+            const rect = {
+                left:body.clientWidth/2,
+                top:body.clientHeight/2
+            }
+            const left = rect.left - (PLUS_SIZE/2)
+            const top = rect.top - PLUS_SIZE
+
+            const guidRect = guid.getBoundingClientRect();
+            const x = guidRect.left - (PLUS_SIZE/2) - left
+            const y = guidRect.top - PLUS_SIZE - top
+
+            box.style.setProperty('--left',`${left}px`)
+            box.style.setProperty('--top',`${top}px`)
+            box.style.setProperty('--x',`${x}px`)
+            box.style.setProperty('--y',`${y}px`)
+
+            box.addEventListener('animationend',()=>{
+                box.remove()
+            })
+            document.body.appendChild(box)
+            // svg.onclick = (e) =>{
+            //     console.log(e)
+                
+            // }
         }
     }
   }

+ 54 - 1
src/views/layout/components/help.vue

@@ -7,7 +7,7 @@
             </span>
             <span>意见反馈</span>
         </div>
-        <div @click="guide">
+        <div @click="guide" class="help-guid">
             <span>
                 <i class="iconfont icon-xinshouzhiyin"></i>
             </span>
@@ -104,6 +104,59 @@ export default {
   },
 };
 </script>
+<style lang="scss">
+@keyframes moveX {
+  to{
+    transform: translateX(var(--x));
+  }
+}
+@keyframes moveY {
+  to{
+    transform: translateY(var(--y));
+  }
+}
+.plus{
+  position:fixed;
+  top:var(--top);
+  left: var(--left);
+  width: 30px;
+  height: 30px;
+  border-radius: 50%;
+  cursor: pointer;
+  z-index: 99999999;
+  animation: moveY .8s cubic-bezier(0.5,-0.5,1,1);
+}
+.plus-icon{
+  height: 100%;
+  width: 100%;
+  background-color: #5151e7;
+  border-radius: 50%;
+  z-index: 99999999;
+  animation: moveX .8s linear;
+}
+// .plus-icon::before{
+//   content: '';
+//   position: absolute;
+//   left: 50%;
+//   top: 3;
+//   width: 4px;
+//   height: 24px;
+//   margin-left: -2px;
+//   background-color: #fff;
+//   border-radius: 8px;
+// }
+// .plus-icon::after{
+//   content: '';
+//   position: absolute;
+//   left: 3px;
+//   top: 50%;
+//   width: 24px;
+//   height: 4px;
+//   margin-top: -2px;
+//   background-color: #fff;
+//   border-radius: 8px;
+// }
+</style>
 <style lang="scss" scoped>
 .help{
     background: white;

+ 9 - 1
src/views/patentMining/components/dialog/addAndEditProject.vue

@@ -80,7 +80,7 @@
                   <el-form-item label="事件:">
                     <mySelectButton size='large' style="width:100%" @click="addEvent">
                       <div style="width:100%">
-                        <el-select style="width:100%" v-model="form.eventId" @change="changeEvent" filterable remote
+                        <el-select style="width:100%" v-model="form.eventId" @change="changeEvent" filterable remote :disabled="eventList.disabled"
                           clearable placeholder="请选择" :loading="eventList.loading" v-SelectLazyLoading="loadEvent"
                           :remote-method="remoteEvent">
                           <el-option v-for="item in eventList.data" :key="item.id" :label="item.name" :value="item.id">
@@ -683,6 +683,14 @@ export default {
         }
         this.title = '编辑专利挖掘项目'
       } else {
+        this.eventList.disabled = false
+        if(this.form.eventId){
+          this.eventList.disabled = true
+          this.eventList.data.push({
+            id:this.form.eventId,
+            name:this.form.eventName,
+          })
+        }
         this.title = '新增专利挖掘项目'
       }
       this.getPermissionPersonnel()

+ 8 - 1
src/views/patentMining/components/viewIndex.vue

@@ -66,7 +66,8 @@ export default {
     isOperate: '',
     matterId:{},
     scenarioId:{},
-    eventName:''
+    eventName:'',
+    eventId:''
   },
   data() {
     return {
@@ -305,6 +306,12 @@ export default {
     },
     //创建项目按钮,添加其他企业专利数据库
     handleAdd() {
+      var form = {
+        matterIds:this.matterId || [],
+        scenarioIds:this.scenarioId || [],
+        eventName:this.eventName,
+        eventId:this.eventId
+      }
       this.$refs.addAndEditProject.open()
     },
     // 创建项目按钮下拉菜单内容

+ 15 - 4
src/views/report/components/dialog/addAndEditReport.vue

@@ -133,7 +133,7 @@
                 <el-form-item label="事件:">
                   <mySelectButton size='large' style="width:100%" @click="addEvent">
                     <div style="width:100%">
-                      <el-select style="width:100%" v-model="form.eventId" @change="changeEvent" filterable remote
+                      <el-select style="width:100%" v-model="form.eventId" @change="changeEvent" filterable remote :disabled="eventList.disabled"
                         clearable placeholder="请选择" :loading="eventList.loading" v-SelectLazyLoading="loadEvent"
                         :remote-method="remoteEvent">
                         <el-option v-for="item in eventList.data" :key="item.id" :label="item.name" :value="item.id">
@@ -596,12 +596,23 @@ export default {
           a = '查看'
         }
       } else {
-        this.$set(this.form, 'matterIds', [])
+        this.$set(this.form, 'matterIds',form.matterId)
+        this.form.scenarioIds = form.scenarioId
         this.$set(this.form, 'systemFileList', [])
         this.$set(this.form, 'fileGuids', [])
+        this.eventList.disabled  =false
+        if(this.form.eventId){
+          this.eventList.disabled = true
+          this.eventList.data.push(
+            {
+              id:form.eventId,
+              name:form.eventName
+            }
+          )
+        }
         a = '创建'
       }
-      
+
       var reportType = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.reportType })[0].dictChildLabel
       this.title = a + reportType + '报告'
       // 负责人
@@ -881,7 +892,7 @@ export default {
      //清空组件缓存数据
     clear() {
       // 清空事件相关
-      this.form.eventIds = []
+      this.form.eventId = []
       this.eventList.queryParams.current = 1
       this.eventList.name = ''
       this.eventList.data = []

+ 17 - 10
src/views/report/components/index.vue

@@ -24,7 +24,7 @@
               <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-menu slot="dropdown" style="margin-top:0px" v-if="dictMessage.REPORT_TYPE && dictMessage.REPORT_TYPE.length>0">
                 <!-- 遍历按钮 -->
                 <el-dropdown-item
                   v-for="item in dictMessage.REPORT_TYPE.filter(item => !['6'].includes(item.dictChildValue))"
@@ -75,7 +75,8 @@ export default {
     isOperate: '',
     matterId:{},
     scenarioId:{},
-    eventName:''
+    eventName:'',
+    eventId:'',
   },
   data() {
     return {
@@ -297,13 +298,16 @@ export default {
     handleSearchArray(obj) {
       switch (obj.label) {
         case '报告类型':
-          let dict = this.dictMessage.REPORT_TYPE.filter(item => !['6'].includes(item.dictChildValue))
-          obj.options = dict.map(item => {
-            return {
-              label: item.dictChildLabel,
-              value: item.dictChildValue,
-            }
-          })
+          if(this.dictMessage.REPORT_TYPE && this.dictMessage.REPORT_TYPE.length>0){
+            let dict = this.dictMessage.REPORT_TYPE.filter(item => !['6'].includes(item.dictChildValue))
+            obj.options = dict.map(item => {
+              return {
+                label: item.dictChildLabel,
+                value: item.dictChildValue,
+              }
+            })
+          }
+          
           break;
         case '报告状态':
           obj.options = [
@@ -454,7 +458,10 @@ export default {
     handleAnalyse(id) {
       var form = {
         reportType: id,
-        scenarioList: []
+        eventId:this.eventId,
+        eventName:this.eventName,
+        matterId:this.matterId || [],
+        scenarioId:this.scenarioId || [],
       }
       this.$refs.ReportForm.open(form)
     },