浏览代码

Merge branch 'product' of http://1.116.113.26:8088/zhuliu/xiaoshi_system into product

zhuliu 1 年之前
父节点
当前提交
fe260f53c7

+ 1 - 1
src/views/components/drawer/Field.vue

@@ -12,7 +12,7 @@
               <el-button type="primary" size="small" @click="handleAdd">新增</el-button>
             </el-form-item>
           </el-form>
-          <el-button class="margin-right_20" type="success" size="small" @click="handleImport">导入</el-button>
+          <!-- <el-button class="margin-right_20" type="success" size="small" @click="handleImport">导入</el-button> -->
         </el-header>
         <el-main class="project-field-main">
           <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">

+ 23 - 16
src/views/layout/mixins/index.js

@@ -11,15 +11,22 @@ export const webSocket = {
         console.log('WebSocket连接成功')
       }
       webSocket.onmessage = async (e) => {
-        if(e.data.indexOf('{') == -1){
+        if (e.data.indexOf('{') == -1) {
           return false
-      }
+        }
         const { code, data, message } = JSON.parse(e.data)
+
+        if (code == 903 || code == 600) {
+          if (data.complete) {
+            this.$message.success(`导入完成`)
+          } else {
+          }
+        }
         // 603导出专利完成605导出PDF完成
-        if(code == 903 || code == 600|| code == 603|| code == 605){
+        if (code == 603 || code == 605) {
           if (data.complete) {
-              this.$message.success(`导入完成`)
-          }else{
+            this.$message.success(`导出完成`)
+          } else {
           }
         }
       }
@@ -33,45 +40,45 @@ export const webSocket = {
   }
 }
 
-export const commonData={
+export const commonData = {
   mounted() {
     // this.DictMessage()
     // this.getUserInfo()
     // this.getScenario()
   },
-  methods:{
+  methods: {
     //获取个人信息
     getUserInfo() {
       this.$api.getUserInfo().then(response => {
         localStorage.tenant = response.data.tenantId
         this.$store.commit('SET_USERINFO', response.data)
-        
+
       })
     },
     //获取字典项
     DictMessage() {
       this.$api.getOsSystemDict([]).then(response => {
-        this.$store.commit("SET_DictMessage",response.data)
+        this.$store.commit("SET_DictMessage", response.data)
       })
     },
     //获取应用场景
-    getScenario(){
+    getScenario() {
       this.$api.getScenario().then(response => {
-        this.$store.commit("SET_Scenario",response.data.data)
+        this.$store.commit("SET_Scenario", response.data.data)
       })
     },
     //获取调查类型
-    getMatter(){
+    getMatter() {
       this.$api.getMatter([]).then(response => {
-        this.$store.commit("SET_Matter",response.data.data)
+        this.$store.commit("SET_Matter", response.data.data)
       })
     },
     //获取权限
-    getPermissionList(){
+    getPermissionList() {
       var code = "e424f3cc4f8138f0f68bef092b92212f;6a8d3f4d1d5f11eda41c00163e2f0200"
-      this.$api.getPermissionList({code:code}).then(response=>{
+      this.$api.getPermissionList({ code: code }).then(response => {
         this.$store.commit('SET_PERMISSION', response.data)
-      }).catch(error=>{
+      }).catch(error => {
         this.$store.commit('SET_PERMISSION', [])
       })
     },

+ 5 - 2
src/views/project/patentCollection/components/export/components/patent.vue

@@ -55,7 +55,7 @@ export default {
       field: [],
       // 按钮Loading
       btnLoading: false,
-      rightSelect:[],
+      rightSelect: [],
     }
   },
   async mounted() {
@@ -64,7 +64,10 @@ export default {
   methods: {
     // 获取栏位数据
     async getList() {
-      this.field = await this.$commonJS.getCustomField('patent', { projectId: this.projectId, taskId: this.taskId })
+      let field = await this.$commonJS.getCustomField('patent', { projectId: this.projectId, taskId: this.taskId })
+      this.field = field.filter(item => {
+        return item.name
+      })
     },
     // 导出
     handleExport() {