allen 2 éve
szülő
commit
23d5d07b02
1 módosított fájl, 41 hozzáadás és 5 törlés
  1. 41 5
      src/views/extract/subTask/index.vue

+ 41 - 5
src/views/extract/subTask/index.vue

@@ -27,7 +27,7 @@
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button
-                v-show="scope.row.status >= 1"
+                v-show="scope.row.type == 1 && scope.row.status >= 1"
                 size="mini"
                 type="text"
                 icon="el-icon-warning-outline"
@@ -43,7 +43,15 @@
                 v-hasPermi="['extract:subTask:edit']"
               >审核</el-button>
               <el-button
-                v-show="scope.row.status == 3"
+                v-show="scope.row.type == 2 && scope.row.status == 0"
+                size="mini"
+                type="text"
+                icon="el-icon-warning-outline"
+                @click="createClass(scope.row)"
+                v-hasPermi="['extract:subTask:edit']"
+              >构建</el-button>
+              <el-button
+                v-show="scope.row.type == 1 && scope.row.status == 3"
                 size="mini"
                 type="text"
                 icon="el-icon-warning-outline"
@@ -51,13 +59,21 @@
                 v-hasPermi="['extract:subTask:edit']"
               >查看抽取结果</el-button>
               <el-button
-                v-show="scope.row.status == 4"
+                v-show="scope.row.type == 1 && scope.row.status == 4"
                 size="mini"
                 type="text"
                 icon="el-icon-finished"
                 @click="handleViewLog(scope.row)"
                 v-hasPermi="['extract:subTask:edit']"
               >查看日志</el-button>
+              <el-button
+                v-show="scope.row.type == 2 && scope.row.status == 3"
+                size="mini"
+                type="text"
+                icon="el-icon-warning-outline"
+                @click="viewResult2(scope.row)"
+                v-hasPermi="['extract:subTask:edit']"
+              >查看构建结果</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -119,6 +135,10 @@
       <!-- <TripletInfo :subTask="subTask" :subTaskOpen.sync="tripletInfoOpen" @closeInfo="closeInfo"></TripletInfo> -->
       <IndexV2 :subTask="subTask" @closeInfo="closeInfo" :readonly="tripletInfoReadOnly"/>
     </el-dialog>
+    <el-dialog :title="createInfoOpenTitle" v-if="createInfoOpen" :visible.sync="createInfoOpen" width="80%" append-to-body destroy-on-close :close-on-click-modal="false">
+      <!-- <CreateInfo :subTask="subTask" :subTaskOpen.sync="createInfoOpen" @closeInfo="closeInfo"></CreateInfo> -->
+      <classCreateV :subTask="subTask" @closeInfo="closeInfo" :readonly="createInfoReadOnly"/>
+    </el-dialog>
     <el-dialog title="分句结果" v-if="viewSentenceOpen" :visible.sync="viewSentenceOpen" width="80%" append-to-body destroy-on-close :close-on-click-modal="false">
       <p v-for="sentence in sentenceList" :key="sentence.id">
          {{ sentence.id }}. {{ sentence.text }}
@@ -132,10 +152,11 @@ import { listSubTask, getSubTask, delSubTask, addSubTask, updateSubTask } from "
 import { getSentence } from "@/api/extract/result";
 import TripletInfo from '@/views/extract/info';
 import IndexV2 from '@/views/extract/info/indexV2';
+import classCreateV from '@/views/extract/info/classCreateV';
 export default {
   name: "SubTask",
   dicts: ['extract_sub_task_status', 'extract_sub_task_list'],
-  components: { TripletInfo,IndexV2 },
+  components: { TripletInfo,IndexV2,classCreateV },
   props: {
     task: {
       type: Object,
@@ -183,10 +204,13 @@ export default {
       },
       tripletInfoOpenTitle: "",
       tripletInfoOpen: false,
+      createInfoOpenTitle: "",
+      createInfoOpen: false,
       subTask: {},
       viewSentenceOpen: false,
       sentenceList: [],
       tripletInfoReadOnly: false,
+      createInfoReadOnly: false,
     };
   },
   created() {
@@ -306,12 +330,19 @@ export default {
       this.tripletInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
       this.subTask = row
     },
+    createClass(row){
+      this.createInfoReadOnly = false
+      this.createInfoOpen = true
+      this.createtInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
+      this.subTask = row
+    },
     handleViewLog(row){
       this.$alert(row.log, '日志', {
         confirmButtonText: '确定',
       });
     },
     closeInfo(){
+      this.createInfoOpen = false
       this.tripletInfoOpen = false
       this.tripletInfoOpenTitle = ''
       this.subTask = {}
@@ -324,11 +355,16 @@ export default {
       })
     },
     viewResult(row){
-      debugger
       this.tripletInfoReadOnly = true
       this.tripletInfoOpen = true
       this.tripletInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
       this.subTask = row
+    },
+    viewResult2(row){
+      this.createInfoReadOnly = true
+      this.createInfoOpen = true
+      this.createtInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
+      this.subTask = row
     }
   }
 };