zhuliu 1 éve
szülő
commit
854a6f7089

+ 9 - 0
src/api/newApi/importAndExport.js

@@ -68,5 +68,14 @@ export default {
     refreshPatent(data) {
         return axios.post('/xiaoshi/patent/refreshPatent', data)
     },
+
+    /**
+     * 查询任务的错误信息
+     * @param {*} data 
+     * @returns 
+     */
+    getPatentImportLog(data){
+        return axios.post("/xiaoshi/importTask/getPatentImportLog", data);
+    },
     
 }

+ 84 - 0
src/views/components/import/task/components/dialog/errorMessage.vue

@@ -0,0 +1,84 @@
+<template>
+  <div>
+    <el-dialog
+      title="错误日志"
+      :visible.sync="visible"
+      width="500px"
+      :before-close="handleClose"
+      :append-to-body="true" 
+      :close-on-click-modal="false"
+    >
+        <div style="height:calc(100vh - 250px);overflow:auto" v-infinite-scroll="load" class="errorMessage1">
+            <div v-for="(item,index) in tableData" :key="index" class='errorMessage'>
+                <span style="color:blue">{{item.patentNo}}</span>
+                <span>{{item.errorName}}</span>
+            </div>
+        </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  props: {},
+  data() {
+    return {
+        tableData:[],
+        visible:false,
+        queryParams:{
+            size:10,
+            current:0
+        },
+        total:1
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {},
+  methods: {
+    open(taskId){
+        this.tableData = []
+        this.queryParams={
+            size:10,
+            current:0,
+            taskId:taskId
+        }
+        this.visible = true
+    },
+    handleClose(){
+        this.visible = false
+    },
+    load(){
+        if(this.total<=this.tableData.length){
+            return 
+        }
+        this.queryParams.current += 1
+        this.$api.getPatentImportLog(this.queryParams).then(response=>{
+            if(response.code == 200){
+                var data = response.data.data
+                this.tableData = this.tableData.concat(data)
+                this.total = response.data.total
+            }
+        }).catch(error=>{
+            this.total = 0
+        })
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.errorMessage{
+    font-size: 16px;
+    margin: 5px;
+}
+.errorMessage1:empty{
+    text-align: center;
+}
+.errorMessage1:empty::after{
+    content:'暂无数据';
+    color:#909399;
+   
+}
+</style>

+ 52 - 7
src/views/components/import/task/components/index.vue

@@ -18,8 +18,9 @@
           <el-table-column v-for="item in columnList.filter(item => !item.ifHidden)" :key="item.value" :label="item.name"
             :prop="item.value" :min-width="item.value == 'percentage' ? '200' : '100'" align="center" :sortable="item.ifSort?'custom':false">
             <template slot-scope="scope">
-              <div v-if="item.value == 'type'"
-                v-html="$commonJS.getColumnData(scope.row, item, null, { data: importType })">
+              <div v-if="item.value == 'type'">
+                <span v-html="$commonJS.getColumnData(scope.row, item, null, { data: importType })"></span>
+                <span style="margin-left:10px"><el-button type="text" size="small" @click="checkDetail(scope.row)">查看{{scope.row.fileGuid?'文件信息':'导入内容'}}</el-button></span>
               </div>
               <div v-else-if="item.value == 'state'"
                 v-html="$commonJS.getColumnData(scope.row, item, null, { data: state })">
@@ -45,12 +46,12 @@
                         <i class="el-icon-document"></i>
                         </el-tooltip>  
                     </el-link> -->
-                <el-link class="margin-left_10" type="primary" @click.native="handleDownload(scope.row)"
+                <!-- <el-link class="margin-left_10" type="primary" @click.native="handleDownload(scope.row)"
                   v-if="(scope.row.fileGuid && (scope.row.state !== 0 || scope.row.state !== 1))">
                   <el-tooltip class="item" effect="dark" content="下载" placement="top">
                     <i class="iconfont icon-xiazai"></i>
                   </el-tooltip>
-                </el-link>
+                </el-link> -->
 
                 <el-link class="margin-left_10" type="primary" @click="updateImportTaskState(scope.row, 4)"
                   v-if="scope.row.state == 1 || scope.row.state == 0">
@@ -64,18 +65,25 @@
                     <i class="iconfont icon-zanting1"></i>
                   </el-tooltip>
                 </el-link>
-                <el-link class="margin-left_10" type="primary" v-if="scope.row.taskType == 1"
+                <!-- <el-link class="margin-left_10" type="primary" v-if="scope.row.taskType == 1"
                   @click="updateLog(scope.row)">
                   <el-tooltip class="item" effect="dark" content="更新记录" placement="top">
                     <i class="iconfont icon-banbengengxinjilu" style="font-size:18px"></i>
                   </el-tooltip>
-                </el-link>
+                </el-link> -->
                 <el-link class="margin-left_10" type="danger" @click.native="updateImportTaskState(scope.row, 5)"
                   v-if="(scope.row.state != 2 && scope.row.state != 5) || scope.row.taskType == 1">
                   <el-tooltip class="item" effect="dark" content="取消" placement="top">
                     <i class="iconfont icon-quxiaorenwu1"></i>
                   </el-tooltip>
                 </el-link>
+
+                <el-link class="margin-left_10" type="primary" @click.native="errorMessage(scope.row, 5)">
+                  <el-tooltip class="item" effect="dark" content="错误日志" placement="top">
+                    <i class="iconfont icon-banbengengxinjilu"></i>
+                  </el-tooltip>
+                </el-link>
+                
               </div>
             </template>
           </el-table-column>
@@ -86,14 +94,20 @@
           @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
       </el-footer>
     </el-container>
+
+
+    <errorMessage ref="errorMessage"></errorMessage>
   </div>
 </template>
 
 <script>
 import { mapGetters } from "vuex";
 import { downLoad2 } from '@/utils'
+import errorMessage from './dialog/errorMessage.vue';
 export default {
-  components: {},
+  components: {
+    errorMessage
+  },
   props: {
     importToId: '',
     importToType: null,
@@ -356,6 +370,37 @@ export default {
     details() {
 
     },
+    //错误日志
+    errorMessage(row){
+      this.$refs.errorMessage.open(row.id)
+    },
+    //查看检索式或者文件
+    checkDetail(row){
+      var title = ''
+      var content = ''
+      if(row.fileGuid){
+        title = '查看文件信息'
+        content = '文件名称:'+row.systemFile?.originalName
+        this.$confirm(content, title, {
+          confirmButtonText: '下载',
+          cancelButtonText: '关闭',
+          dangerouslyUseHTMLString: true,
+        }) .then(() => {
+            this.handleDownload(row)
+            this.$message.info('正在下载中...')
+          })
+          .catch(action => {
+           
+          });
+      }else{
+        title = '查看导入信息'
+        content=row.searchCondition
+        this.$alert(content,title, {
+          dangerouslyUseHTMLString: true
+        });
+      }
+ 
+    },
     //下载附件
     handleDownload(row) {
       downLoad2(row.fileGuid)