Parcourir la source

解决可视化不展示图片问题及显示栏位管理问题

zhuliu il y a 2 ans
Parent
commit
e4c8334d29

+ 3 - 1
RMS-FrontEnd/src/api/index.js

@@ -5,6 +5,7 @@ import patent from './patent';
 import permission from './permission';
 import product from './product';
 import matters from './matters';
+import task from './task'
 
 export default {
   ...report,
@@ -12,5 +13,6 @@ export default {
   ...patent,
   ...permission,
   ...product,
-  ...matters
+  ...matters,
+  ...task
 }

+ 13 - 0
RMS-FrontEnd/src/api/patent.js

@@ -42,4 +42,17 @@ export default{
    editPatentInstruction(data) {
     return axios.post('/v2/patent/instruction/edit', data)
   },
+
+    /**
+   * 获取用户设置字段
+   */
+     getUserSettingField(params) {
+      return axios.get('/v2/patent/field/setting', { params })
+    },
+    /**
+     * 更新用户设置字段
+     */
+    updateUserSettingField(data) {
+      return axios.post('/v2/patent/field/setting', data)
+    }
 }

+ 26 - 0
RMS-FrontEnd/src/api/task.js

@@ -0,0 +1,26 @@
+import axios from '@/utils/axios'
+
+export default {
+  /**
+   * 获取任务列表
+   */
+  getTaskList(params) {
+    return axios.get('/v2/task/list', { params })
+  },
+  /**
+   * 获取队列
+   */
+  getQueueList(params) {
+    return axios.get('/v2/task/queue', { params })
+  },
+  /**
+   * 删除任务
+   */
+  deleteTask(params) {
+    return axios({
+      url: '/v2/task/delete',
+      method: 'post',
+      params: params
+    })
+  }
+}

+ 6 - 6
RMS-FrontEnd/src/views/product/components/jsMind/components/mind.vue

@@ -453,8 +453,8 @@ export default {
       }else if (modelInfo.type == 1) {
         return `
                 <div class="model-edit-card" >
-                  <div class="img" onclick="showImage('${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url: ""}')">
-                    <img style="width:100%;height:100%" src="${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url: ""}" onerror="this.src='https://p26.toutiaoimg.com/origin/pgc-image/cafb19c6ccac41a3a03fb83826e66534?from=pc';" alt="图片不存在" :preview-src-list="[${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url : ""}]"></img>
+                  <div class="img" onclick="showImage('${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url: ""}')">
+                    <img style="width:100%;height:100%" src="${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url: ""}" onerror="this.src='https://p26.toutiaoimg.com/origin/pgc-image/cafb19c6ccac41a3a03fb83826e66534?from=pc';" alt="图片不存在" :preview-src-list="[${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url : ""}]"></img>
                   </div>
                   <div class="patent">
                     <p class="model-title-p"><span>${modelInfo.productCategoryName}</span></p>
@@ -467,8 +467,8 @@ export default {
       } else if (modelInfo.type == 2) {
         return `
                 <div class="model-edit-card">
-                  <div class="img" onclick="showImage('${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url: ""}')">
-                    <img style="width:100%;height:100%" src="${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url: ""}" onerror="this.src='https://p26.toutiaoimg.com/origin/pgc-image/cafb19c6ccac41a3a03fb83826e66534?from=pc';"  alt="" :preview-src-list="[${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url: "" }]"></img>
+                  <div class="img" onclick="showImage('${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url: ""}')">
+                    <img style="width:100%;height:100%" src="${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url: ""}" onerror="this.src='https://p26.toutiaoimg.com/origin/pgc-image/cafb19c6ccac41a3a03fb83826e66534?from=pc';"  alt="" :preview-src-list="[${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url: "" }]"></img>
                   </div>
                   <div class="patent">
                       <p class="model-title-p"><span>${ modelInfo.productName}</span></p>
@@ -482,8 +482,8 @@ export default {
       } else {
         return `
                 <div class="model-edit-card">
-                  <div class="img" onclick="showImage('${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url: ""}')">
-                    <img style="width:100%;height:100%" src="${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url : ""}" onerror="this.src='https://p26.toutiaoimg.com/origin/pgc-image/cafb19c6ccac41a3a03fb83826e66534?from=pc';" alt="图片不存在" :preview-src-list="[${ modelInfo.pictures.length > 0? this.$p + modelInfo.pictures[0].url: ""}]"></img>
+                  <div class="img" onclick="showImage('${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url: ""}')">
+                    <img style="width:100%;height:100%" src="${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url : ""}" onerror="this.src='https://p26.toutiaoimg.com/origin/pgc-image/cafb19c6ccac41a3a03fb83826e66534?from=pc';" alt="图片不存在" :preview-src-list="[${ modelInfo.pictures.length > 0? this.$p2 + modelInfo.pictures[0].url: ""}]"></img>
                   </div>
                     <div  class="patent">
                             <p class="model-title-p"><span>${ modelInfo.structureName}</span></p>

+ 3 - 3
RMS-FrontEnd/src/views/product/components/product.vue

@@ -2,9 +2,9 @@
   <div style="padding: 20px;background: white;height: 100%;">
     <div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 20px;">
       <div>
-        <el-input v-model.trim="queryParams.productCategoryName" size="small" placeholder="请输入类别名称" style="width: 200px;margin-right: 10px;"></el-input>
-        <el-input v-model.trim="queryParams.productName" size="small" placeholder="请输入产品名称" style="width: 200px;margin-right: 10px;"></el-input>
-        <el-input v-model.trim="queryParams.companyName" size="small" placeholder="请输入产品所属公司名称" style="width: 200px;margin-right: 10px;"></el-input>
+        <el-input v-model="queryParams.productCategoryName" size="small" placeholder="请输入类别名称" style="width: 200px;margin-right: 10px;"></el-input>
+        <el-input v-model="queryParams.productName" size="small" placeholder="请输入产品名称" style="width: 200px;margin-right: 10px;"></el-input>
+        <el-input v-model="queryParams.companyName" size="small" placeholder="请输入产品所属公司名称" style="width: 200px;margin-right: 10px;"></el-input>
           <el-button type="primary" size="small" @click="getList2">查询</el-button>
           <el-button type="primary" size="small" @click="handleAdd" v-if="$permission('/workspace/product/addCategory')">新增类别</el-button>
           <el-dropdown @command="handleCommandAdd">

+ 26 - 5
RMS-FrontEnd/src/views/product/components/relatedPatents/components/import/SystemTask.vue

@@ -116,7 +116,8 @@ export default {
         1: '专利导入',
         2: '专利导出',
         3: '说明书导入',
-      }
+      },
+      webSocket1:null
     }
   },
   computed: {
@@ -136,13 +137,33 @@ export default {
     // this.queryParams.type = this.form
     this.getList()
    this.getQueueList()
-    this.initTask()
-    
+    // this.initTask()
+    this.connectWebSocket(this.userinfo.id)
   },
   methods: {
+    connectWebSocket(userId) {
+      this.webSocket1 = new WebSocket(`ws://139.224.24.90:8877/api/v2/ws/` + userId)
+      // this.webSocket1 = new WebSocket(`ws://192.168.1.24:8111/api/quartz/ws/` + userId)
+
+      // Store.commit('SET_WEB_SOCKET', webSocket)
+      this.webSocket1.onopen = () => {
+        console.log('WebSocket连接成功')
+        this.initTask()
+        return true
+      }
+      // webSocket.onmessage = async (e) => {
+      //   console.log(e)
+      // }
+      this.webSocket1.onerror = () => {
+        console.log('WebSocket连接失败')
+      }
+      this.webSocket1.onclose = () => {
+        console.log('WebSocket连接关闭')
+      }
+    },
     initTask() {
-      if(this.webSocket){
-      this.webSocket.onmessage = (e) => {
+      if(this.webSocket1){
+      this.webSocket1.onmessage = (e) => {
         // console.log(e)
         const { code, data, message } = JSON.parse(e.data)
         // console.log(JSON.parse(e.data))

+ 1 - 1
RMS-FrontEnd/src/views/product/components/relatedPatents/components/table.vue

@@ -8,7 +8,7 @@
         已勾选 <b>{{ selectedTotal }}</b> 条
       </div>
       <div style="display: flex;margin-bottom: 20px;" >
-             <el-input v-model.trim="paramsRuleForm.patentNo" size="small" style="width: 450px;" placeholder="请输入专利号进行添加(多个专利号同时添加中间请用符号“|”隔开)"></el-input>
+             <el-input v-model="paramsRuleForm.patentNo" size="small" style="width: 450px;" placeholder="请输入专利号进行添加(多个专利号同时添加中间请用符号“|”隔开)"></el-input>
         <el-tooltip class="item" effect="dark" content="将搜索的专利添加至该产品的相关专利中" placement="top">
           <el-button type="primary" size="small" @click="getListAdd" style="margin-left: 10px;"> 添 加 </el-button>
         </el-tooltip>

+ 1 - 1
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/PatentFeatures.vue

@@ -72,7 +72,7 @@
               </p>
               <el-checkbox-group v-else v-model="checkList" >
                   <el-checkbox :label="scope.row.id" @change="getFunInfo(scope.row,scope)" style="display: flex; align-items: center;">
-                    <el-input type="textarea" style="width:250px" autosize v-model.trim="scope.row.content"> {{scope.row.content.trim()}}</el-input>
+                    <el-input type="textarea" style="width:250px" autosize v-model="scope.row.content"> {{scope.row.content.trim()}}</el-input>
                   </el-checkbox>
                </el-checkbox-group>
             </template>

+ 1 - 1
RMS-FrontEnd/src/views/report/Invalid/InvalidPage/Claims.vue

@@ -66,7 +66,7 @@
                   <el-checkbox-group v-model="checkList" >
 
                       <el-checkbox  :label="scope.row.id" @change="getFunInfo(scope.row,scope)" style="display: flex; align-items: center;">
-                        <el-input type="textarea" style="width:250px" autosize v-model.trim="scope.row.content"> {{scope.row.content.trim()}}</el-input>
+                        <el-input type="textarea" style="width:250px" autosize v-model="scope.row.content"> {{scope.row.content.trim()}}</el-input>
                       </el-checkbox>
 
                   </el-checkbox-group>

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

@@ -47,7 +47,7 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item>
-            <div style="display:flex;justify-content:center" v-if="formData[0].status != '已完成'">
+            <div style="display:flex;justify-content:center" v-if="formData[0].status != '已完成'&& $reportPermission(reportId,[0,1])">
                 <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>

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

@@ -28,11 +28,11 @@
                     <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)">{{ scope.row.status=='进行中'?'编辑':'查看'}}</p>
+                                <p @click="edit(scope.row)">{{ scope.row.status=='进行中'&& $reportPermission(reportId,[0,1])?'编辑':'查看'}}</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="1" v-if="scope.row.status=='进行中'&& $reportPermission(reportId,[0,1])">登记结果</el-dropdown-item>
                                     <el-dropdown-item command="2" v-else>查看结果</el-dropdown-item>
-                                    <el-dropdown-item command="3" divided class="color-red">删除</el-dropdown-item>
+                                    <el-dropdown-item command="3" divided class="color-red" v-if=" $reportPermission(reportId,[0,1])">删除</el-dropdown-item>
                                 </el-dropdown-menu>
                             </el-dropdown>
                         </div>