allen 2 жил өмнө
parent
commit
fa96fed8fe

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 789 - 2
package-lock.json


+ 7 - 0
package.json

@@ -37,7 +37,13 @@
   },
   "dependencies": {
     "@riophae/vue-treeselect": "0.4.0",
+    "@wangeditor/editor": "^5.1.23",
+    "@wangeditor/editor-for-vue": "^1.0.2",
     "@ztree/ztree_v3": "^3.5.48",
+    "@tiptap/core": "^2.0.2",
+    "@tiptap/extension-highlight": "^2.0.0-beta.218",
+    "@tiptap/vue-2": "^2.0.0-beta.218",
+    "@tiptap/starter-kit": "^2.0.2",
     "ant-design-vue": "1.7.8",
     "axios": "0.24.0",
     "clipboard": "2.0.8",
@@ -59,6 +65,7 @@
     "quill": "1.3.7",
     "screenfull": "5.0.2",
     "sortablejs": "1.10.2",
+    "tiptap": "^1.32.2",
     "v-contextmenu": "^2.9.0",
     "vcolorpicker": "^1.1.0",
     "vue": "2.6.12",

+ 52 - 0
src/api/extract/result.js

@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+// 查询抽取结果信息列表
+export function listResult(query) {
+  return request({
+    url: '/extract/result/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询抽取结果信息详细
+export function getResult(id) {
+  return request({
+    url: '/extract/result/' + id,
+    method: 'get'
+  })
+}
+
+// 新增抽取结果信息
+export function addResult(data) {
+  return request({
+    url: '/extract/result',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改抽取结果信息
+export function updateResult(data) {
+  return request({
+    url: '/extract/result',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除抽取结果信息
+export function delResult(id) {
+  return request({
+    url: '/extract/result/' + id,
+    method: 'delete'
+  })
+}
+
+// 根据子任务id查询抽取结果
+export function getResultBySubTaskId(id) {
+  return request({
+    url: '/extract/result/getResultBySubTaskId/' + id,
+    method: 'get'
+  })
+}

+ 3 - 2
src/api/extract/subTask.js

@@ -43,9 +43,10 @@ export function delSubTask(id) {
   })
 }
 
-export function approveSubTask(id, status) {
+export function approveSubTask(id, status, extractResult) {
   return request({
     url: `/extract/subTask/approve/${id}/${status}`,
-    method: 'get'
+    method: 'post',
+    data: extractResult
   })
 }

+ 44 - 0
src/api/repair/encyclopedia.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询维修百科列表
+export function listEncyclopedia(query) {
+  return request({
+    url: '/repair/encyclopedia/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询维修百科详细
+export function getEncyclopedia(id) {
+  return request({
+    url: '/repair/encyclopedia/' + id,
+    method: 'get'
+  })
+}
+
+// 新增维修百科
+export function addEncyclopedia(data) {
+  return request({
+    url: '/repair/encyclopedia',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改维修百科
+export function updateEncyclopedia(data) {
+  return request({
+    url: '/repair/encyclopedia',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除维修百科
+export function delEncyclopedia(id) {
+  return request({
+    url: '/repair/encyclopedia/' + id,
+    method: 'delete'
+  })
+}

+ 44 - 0
src/api/repair/noun.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询维修百科列表
+export function listNoun(query) {
+  return request({
+    url: '/repair/noun/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询维修百科详细
+export function getNoun(id) {
+  return request({
+    url: '/repair/noun/' + id,
+    method: 'get'
+  })
+}
+
+// 新增维修百科
+export function addNoun(data) {
+  return request({
+    url: '/repair/noun',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改维修百科
+export function updateNoun(data) {
+  return request({
+    url: '/repair/noun',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除维修百科
+export function delNoun(id) {
+  return request({
+    url: '/repair/noun/' + id,
+    method: 'delete'
+  })
+}

+ 1 - 1
src/api/showInfo/breakdown.js

@@ -99,4 +99,4 @@ export function getBreakdownSchedule(query) {
     method: 'get',
     params: query,
   })
-}
+}

+ 18 - 0
src/assets/styles/ruoyi.scss

@@ -329,3 +329,21 @@
 .el-table th.el-table__cell {
 	background-color: transparent
 }
+
+.el-link.el-link--default {
+	color: #bfcbd9;
+}
+
+.el-upload__tip {
+	color: #bfcbd9;
+}
+
+.el-input__inner {
+	color: #bfcbd9;
+}
+.el-button--default {
+	color: #bfcbd9;
+}
+.el-select-dropdown__item {
+	color: #bfcbd9;
+}

+ 27 - 3
src/views/extract/info/index.vue

@@ -50,13 +50,13 @@
       </el-table-column>
     </el-table>
 
-    <pagination
+    <!-- <pagination
       v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
-    />
+    /> -->
 
     <!-- 添加或修改三元组信息对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -81,6 +81,7 @@
 
 <script>
 import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/extract/info";
+import { listResult } from "@/api/extract/result";
 import { approveSubTask } from "@/api/extract/subTask";
 
 export default {
@@ -125,6 +126,8 @@ export default {
       rules: {
         subTaskId: [{ required: true, message: "子任务id不能为空", trigger: "blur" }],
       },
+      extractResult: {},
+      extractResultJson: {},
     };
   },
   created() {
@@ -139,6 +142,12 @@ export default {
         this.total = response.total;
         this.loading = false;
       });
+      listResult(this.queryParams).then(resp =>{
+        console.info(resp)
+        this.extractResult = resp.rows[0]
+        this.extractResultJson = JSON.parse(resp.rows[0].result)
+        console.info(this.extractResult)
+      })
     },
     // 取消按钮
     cancel() {
@@ -233,7 +242,22 @@ export default {
       );
     },
     handleApprove(status) {
-      approveSubTask(this.subTask.id, status).then(resp => {
+      // approveSubTask(this.subTask.id, status).then(resp => {
+      //   let message;
+      //   if (status == 2){
+      //     message = '审批成功'
+      //   } else {
+      //     message = '驳回成功'
+      //   }
+      //   this.$message({
+      //     message,
+      //     type: 'success'
+      //   });
+      //   this.$emit("closeInfo")
+      // })
+      // .catch(() => {});
+        this.extractResult.result = JSON.stringify(this.extractResultJson)
+        approveSubTask(this.subTask.id, status, this.extractResult).then(resp => {
         let message;
         if (status == 2){
           message = '审批成功'

+ 496 - 0
src/views/extract/info/indexV2.vue

@@ -0,0 +1,496 @@
+<template>
+  <div v-if="editor" :loading="loading">
+    <el-row>
+      <span style="float: right;">
+        <el-col :span="1.5">
+          <el-button type="primary" plain icon="el-icon-check" size="mini" @click="handleApprove('2')"  :loading="loading">审批</el-button>
+        </el-col>
+        <el-col :span="1.5" >
+          <el-button type="primary" plain icon="el-icon-close" size="mini" @click="handleApprove('5')" :loading="loading">驳回</el-button>
+        </el-col>
+      </span>
+    </el-row>
+    <el-row>
+      <el-col :span="12">
+        <el-card style="margin:10px">
+          <el-button @click="highlight_new_h" :class="{
+            'is-active': editor.isActive('highlight', { color: '#ff5d5d' }),
+          }">
+            主体
+          </el-button>
+          <el-button @click="highlight_new_t" :class="{
+            'is-active': editor.isActive('highlight', { color: '#119525' }),
+          }">
+            客体
+          </el-button>
+          <el-button @click="editor.chain().focus().unsetHighlight().run()" :disabled="!editor.isActive('highlight')">
+            取消标记
+          </el-button>
+
+          <el-select v-model="selectedRelationId" placeholder="请选择关系" @change="handleSelectRelation">
+            <el-option v-for="relation in relations" :label="relation.name" :value="relation.id"
+              :key="relation.id"></el-option>
+            <el-option v-if="showAddRelationOption" :label="'添加关系'" :value="-1"></el-option>
+          </el-select>
+          <el-dialog :visible.sync="dialogVisible" append-to-body>
+            <el-input v-model="newRelationName" placeholder="请输入关系名称"></el-input>
+            <div slot="footer">
+              <el-button @click="dialogVisible = false">取消</el-button>
+              <el-button type="primary" @click="handleAddRelation">确定</el-button>
+            </div>
+          </el-dialog>
+          <el-button type="primary" @click="summit" style="margin-left:20px">标记</el-button>
+          <bubble-menu :editor="editor" :tippy-options="{ duration: 100 }" v-if="editor">
+            <el-button @click="highlight_new_h" style="color: '#ff5d5d'">
+              主体
+            </el-button>
+            <el-button @click="highlight_new_t">
+              客体
+            </el-button>
+            <!-- <button @click="highlight_new_h" style="backgrand-color:red" :class="{
+                    'is-active': editor.isActive('highlight', { color: '#ff5d5d' }),
+                }">
+                    主体
+                </button>
+                <button @click="highlight_new_t" :class="{
+                    'is-active': editor.isActive('highlight', { color: '#119525' }),
+                }">
+                    客体
+                </button> -->
+          </bubble-menu>
+          <editor-content :editor="editor" />
+        </el-card>
+      </el-col>
+      <el-col :span="12">
+        <el-card style="margin:10px">
+          <el-table :data="input.knowledgeList" style="width: 100%">
+            <el-table-column prop="start" label="主体" width="180" />
+            <el-table-column prop="end" label="客体" width="180" />
+            <el-table-column prop="relation" label="关系" />
+            <el-table-column prop="" label="操作" min-width="180" align="center">
+              <template slot-scope="scope">
+                <el-button @click="handleDelete(scope.$index)" class="btn-text-red" type="danger" size="mini"
+                  icon="el-icon-delete">删除
+                </el-button>
+                <el-button @click="handleSearch(scope.$index)" type="primary" size="mini" icon="el-icon-search">查找
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <!-- <div class="block" style="margin-top: 15px">
+                <el-pagination align="center" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[1, 5, 10, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next, jumper" :total="input.knowledgeList.length">
+                </el-pagination>
+            </div> -->
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+  
+<script>
+import { getResultBySubTaskId, updateResult } from "@/api/extract/result";
+import { approveSubTask } from "@/api/extract/subTask";
+
+import Highlight from "@tiptap/extension-highlight";
+import { Editor, EditorContent, BubbleMenu } from "@tiptap/vue-2";
+import StarterKit from "@tiptap/starter-kit";
+import relationsData from "./relations.json";
+export default {
+  name: "ExtractResult",
+  components: {
+    EditorContent,
+    BubbleMenu,
+  },
+  props:{
+    subTask: {
+      type: Object,
+    },
+  },
+
+  data() {
+    return {
+      loading: false,
+      result:{},
+      input: {
+      },
+      spo: {
+        sentenceId: -1,
+        sentence: "",
+        start: "",
+        end: "",
+        relation: "",
+        startPosition: [],
+        endPosition: [],
+      },
+      currentPage: 1, // 当前页码
+      total: 20, // 总条数
+      pageSize: 5, // 每页的数据条数
+      lengths: [],
+      counter: 0,
+      text: "",
+      hColor: "#ff5d5d",
+      tColor: "#119525",
+      editor: null,
+      selectedRelationId: "",
+      selectedRelationId: null,
+      dialogVisible: false,
+      newRelationName: "",
+      spo_list: [],
+      relations: relationsData,
+      startSentenceId: 114514,
+      endSentenceId: 114514,
+    };
+  },
+  created() {
+    this.getResult()
+  },
+
+  computed: {
+    showAddRelationOption() {
+      // 如果已经有添加关系的选项,则不显示
+      return !this.relations.some((r) => r.id === -1);
+    },
+  },
+
+  mounted() {
+
+  },
+  methods: {
+    getResult(){
+      this.loading = true
+      getResultBySubTaskId(this.subTask.id).then(response => {
+        this.input = JSON.parse(response.data.result)
+        this.result = response.data
+        this.createEditor()
+        this.loading = false
+      });
+    },
+    createEditor(){
+      this.editor = new Editor({
+        extensions: [Highlight.configure({ multicolor: true }), StarterKit],
+        content: this.input.sentenceList.map((item) => item.text + '<br>').join(""),
+      });
+      this.lengths = this.getSentenceStartPositions(this.input);
+      for (let re in this.input.knowledgeList) {
+        this.highlight_h(
+          this.lengths[this.input.knowledgeList[re].sentenceId] +
+          1 +
+          this.input.knowledgeList[re].startPosition[0],
+          this.lengths[this.input.knowledgeList[re].sentenceId] +
+          1 +
+          this.input.knowledgeList[re].startPosition[1]
+        );
+        this.highlight_t(
+          this.lengths[this.input.knowledgeList[re].sentenceId] +
+          1 +
+          this.input.knowledgeList[re].endPosition[0],
+          this.lengths[this.input.knowledgeList[re].sentenceId] +
+          1 +
+          this.input.knowledgeList[re].endPosition[1]
+        );
+      }
+    },
+    //每页条数改变时触发 选择一页显示多少行
+    handleSizeChange(val) {
+      this.currentPage = 1;
+      this.pageSize = val;
+    },
+    //当前页改变时触发 跳转其他页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+    },
+    highlight_h(from, to) {
+      this.editor.commands.setTextSelection({ from: from, to: to });
+      const docNode = this.editor.state.doc;
+      var flag = 0;
+      if (docNode.content.content[0].content.content.length == 1) {
+        this.editor.chain().focus().toggleHighlight({ color: "#ff5d5d" }).run();
+      } else {
+        docNode.descendants((node, pos) => {
+          if (pos <= from && pos + node.nodeSize >= to) {
+            if (node.marks.length > 0) {
+              flag = 1;
+            }
+          }
+        });
+        if (flag == 0) {
+          this.editor
+            .chain()
+            .focus()
+            .toggleHighlight({ color: "#ff5d5d" })
+            .run();
+        }
+      }
+    },
+    highlight_t(from, to) {
+      this.editor.commands.setTextSelection({ from: from, to: to });
+      const docNode = this.editor.state.doc;
+      var flag = 0;
+      if (docNode.content.content[0].content.content.length == 1) {
+        this.editor.chain().focus().toggleHighlight({ color: "#119525" }).run();
+      } else {
+        docNode.descendants((node, pos) => {
+          if (pos <= from && pos + node.nodeSize >= to) {
+            if (node.marks.length > 0) {
+              flag = 1;
+            }
+          }
+        });
+        if (flag == 0) {
+          this.editor
+            .chain()
+            .focus()
+            .toggleHighlight({ color: "#119525" })
+            .run();
+        }
+      }
+    },
+
+    highlight_new_h() {
+      // 获取当前选中的内容及其所在的位置
+      const selection = this.editor.view.state.selection;
+
+      // 获取选中内容的起始位置
+      const from = selection.from;
+
+      // 获取选中内容的结束位置
+      const to = selection.to;
+
+      const text = this.editor.view.state.doc.textBetween(from, to, "\n");
+      this.spo.start = text;
+      const {
+        sentenceIndex: a,
+        sentenceStartPosition: b,
+        sentenceEndPosition: c,
+      } = this.getPosition(this.lengths, from - 1, to - 1);
+      this.startSentenceId = a;
+      this.spo.startPosition = [b, c];
+
+      var flag = 0;
+      const docNode = this.editor.state.doc;
+      if (docNode.content.content[0].content.content.length == 1) {
+        this.editor.chain().focus().toggleHighlight({ color: "#ff5d5d" }).run();
+      } else {
+        docNode.descendants((node, pos) => {
+          if (pos <= from && pos + node.nodeSize >= to) {
+            if (node.marks.length > 0) {
+              flag = 1;
+            }
+          }
+        });
+        if (flag == 0) {
+          this.editor
+            .chain()
+            .focus()
+            .toggleHighlight({ color: "#ff5d5d" })
+            .run();
+        }
+      }
+    },
+
+    highlight_new_t() {
+      // 获取当前选中的内容及其所在的位置
+      const selection = this.editor.view.state.selection;
+
+      // 获取选中内容的起始位置
+      const from = selection.from;
+
+      // 获取选中内容的结束位置
+      const to = selection.to;
+
+      const text = this.editor.view.state.doc.textBetween(from, to, "\n");
+      this.spo.end = text;
+      const {
+        sentenceIndex: a,
+        sentenceStartPosition: b,
+        sentenceEndPosition: c,
+      } = this.getPosition(this.lengths, from - 1, to - 1);
+      this.endSentenceId = a;
+      this.spo.endPosition = [b, c];
+      var flag = 0;
+      const docNode = this.editor.state.doc;
+      if (docNode.content.content[0].content.content.length == 1) {
+        this.editor.chain().focus().toggleHighlight({ color: "#119525" }).run();
+      } else {
+        docNode.descendants((node, pos) => {
+          if (pos <= from && pos + node.nodeSize >= to) {
+            if (node.marks.length > 0) {
+              flag = 1;
+            }
+          }
+        });
+        if (flag == 0) {
+          this.editor
+            .chain()
+            .focus()
+            .toggleHighlight({ color: "#119525" })
+            .run();
+        } else {
+          this.editor
+            .chain()
+            .focus()
+            .toggleHighlight({ color: "#ff5d5d" })
+            .run();
+        }
+      }
+    },
+    summit() {
+      if (this.startSentenceId == this.endSentenceId) {
+        var id = this.startSentenceId;
+      }
+
+      if (this.selectedRelationId == null) {
+        this.handleError();
+      } else {
+        this.spo.relation = this.relations[this.selectedRelationId - 1].name;
+        if (this.spo.start != "" && this.spo.end != "") {
+          this.spo.sentenceId = id;
+          this.spo.sentence = this.input.sentenceList[id].text;
+          this.input.knowledgeList.push(this.spo);
+          this.spo = {
+            sentenceId: 114514,
+            sentence: "",
+            start: "",
+            end: "",
+            relation: "",
+            startPosition: [],
+            endPosition: [],
+          };
+        } else {
+          this.handleError();
+        }
+      }
+
+      //this.editor.chain().focus().unsetHighlight().run()
+    },
+    handleSelectRelation(value) {
+      if (value === -1) {
+        this.dialogVisible = true;
+      }
+    },
+    handleAddRelation() {
+      const maxId = Math.max(...this.relations.map((r) => r.id));
+      const newId = maxId + 1;
+      const newRelation = { id: newId, name: this.newRelationName };
+      this.relations.push(newRelation);
+      this.selectedRelationId = newId;
+      this.dialogVisible = false;
+      setRelations(this.relations);
+      this.newRelationName = "";
+    },
+    getSentenceStartPositions(json) {
+      const sentenceList = json.sentenceList;
+      const lengths = [];
+
+      let currentPosition = 0;
+
+      for (let i = 0; i < sentenceList.length; i++) {
+        lengths.push(currentPosition);
+        currentPosition += sentenceList[i].text.length;
+      }
+
+      return lengths;
+    },
+    handleDelete(index) {
+      this.input.knowledgeList.splice(index, 1);
+    },
+    handleError() {
+      this.$message.error(`标注内容不全`);
+    },
+    handleSearch(index) {
+      var num = (this.currentPage - 1) * this.pageSize + index;
+      var start =
+        this.lengths[this.input.knowledgeList[num].sentenceId] +
+        1 +
+        this.input.knowledgeList[num].startPosition[0];
+      var end =
+        this.lengths[this.input.knowledgeList[num].sentenceId] +
+        1 +
+        this.input.knowledgeList[num].startPosition[1];
+      this.editor.commands.setTextSelection({ from: start, to: end });
+      this.editor.chain().focus();
+    },
+
+    getPosition(lengths, start, end) {
+      // 获取start所在句子的索引
+      let sentenceIndex = 0;
+      let sum = 0;
+      for (let i = 0; i < lengths.length; i++) {
+        sum += lengths[i];
+        if (start < sum) {
+          sentenceIndex = i;
+          break;
+        }
+      }
+      // 计算start和end在句子中的位置
+      const sentenceStartPosition = start - sum + lengths[sentenceIndex];
+      const sentenceEndPosition = end - sum + lengths[sentenceIndex];
+      sentenceIndex -= 1;
+
+      // 获取start和end所在句子的startPosition和endPosition
+      //const sentence = this.input.sentenceList[sentenceIndex];
+      //const startPosition = sentence.knowledgeList[0].startPosition[sentenceStartPosition];
+      //const endPosition = sentence.knowledgeList[0].endPosition[sentenceEndPosition];
+
+      return { sentenceIndex, sentenceStartPosition, sentenceEndPosition };
+    },
+    handleApprove(status) {
+      this.loading = true
+      this.result.result = JSON.stringify(this.input)
+      approveSubTask(this.subTask.id, status, this.result).then(resp => {
+        let message;
+        if (status == 2){
+          message = '审批成功'
+        } else {
+          message = '驳回成功'
+        }
+        this.$message({
+          message,
+          type: 'success'
+        });
+        this.loading = false
+        this.$emit("closeInfo")
+      })
+      .catch(() => {});
+    },
+  },
+
+  beforeUnmount() {
+    this.editor.destroy();
+  },
+};
+</script>
+<style>
+.wrapper {
+  display: flex;
+  flex-direction: row;
+}
+
+.left-card {
+  margin-right: 20px;
+}
+
+.right-card {
+  margin-left: 20px;
+}
+
+.editor-content {
+  min-width: 35em;
+  display: block;
+  text-align: unset;
+  border-radius: 20px;
+  padding: 1rem;
+  /* border: 1px solid rgba(0, 0, 0, 0.363); */
+}
+</style>
+<style scoped>
+.button {
+  background-color: aqua;
+}
+
+.el-card {
+  color: #e7e7e7
+}
+</style>

+ 21 - 0
src/views/extract/info/relations.json

@@ -0,0 +1,21 @@
+[
+{"id": 1, "name": "故障现象"},
+{"id": 2, "name": "故障原因"},
+{"id": 3, "name": "解决方法"},
+{"id": 4, "name": "关联"},
+{"id": 5, "name": "等级"},
+{"id": 6, "name": "归属"},
+{"id": 7, "name": "包含"},
+{"id": 8, "name": "驱动"},
+{"id": 9, "name": "固定于"},
+{"id": 10, "name": "被驱动"},
+{"id": 11, "name": "部件故障"},
+{"id": 12, "name": "机型故障"},
+{"id": 13, "name": "过程故障"},
+{"id": 14, "name": "地域故障"},
+{"id": 15, "name": "人员故障"},
+{"id": 16, "name": "维修对象"},
+{"id": 17, "name": "检测对象"},
+{"id": 18, "name": "诱发(导致)"},
+{"id": 19, "name": "等同"}
+]

+ 258 - 0
src/views/extract/result/index.vue

@@ -0,0 +1,258 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="子任务id" prop="subTaskId">
+        <el-input
+          v-model="queryParams.subTaskId"
+          placeholder="请输入子任务id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['extract:result:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['extract:result:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['extract:result:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['extract:result:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="resultList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="编号" align="center" prop="id" />
+      <el-table-column label="子任务id" align="center" prop="subTaskId" />
+      <el-table-column label="抽取结果集" align="center" prop="result" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['extract:result:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['extract:result:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改抽取结果信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="子任务id" prop="subTaskId">
+          <el-input v-model="form.subTaskId" placeholder="请输入子任务id" />
+        </el-form-item>
+        <el-form-item label="抽取结果集" prop="result">
+          <el-input v-model="form.result" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listResult, getResult, delResult, addResult, updateResult } from "@/api/extract/result";
+
+export default {
+  name: "Result",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 抽取结果信息表格数据
+      resultList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        subTaskId: null,
+        result: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        subTaskId: [
+          { required: true, message: "子任务id不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询抽取结果信息列表 */
+    getList() {
+      this.loading = true;
+      listResult(this.queryParams).then(response => {
+        this.resultList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        subTaskId: null,
+        result: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加抽取结果信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getResult(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改抽取结果信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateResult(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addResult(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除抽取结果信息编号为"' + ids + '"的数据项?').then(function() {
+        return delResult(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('extract/result/export', {
+        ...this.queryParams
+      }, `result_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container">
+  <div>
     <el-container>
       <el-header>
         <el-steps :active="parseInt(task.status)" simple direction finish-status="wait" process-status="finish">
@@ -100,7 +100,8 @@
       </div>
     </el-dialog>
     <el-dialog :title="tripletInfoOpenTitle" v-if="tripletInfoOpen" :visible.sync="tripletInfoOpen" width="80%" append-to-body destroy-on-close :close-on-click-modal="false">
-      <TripletInfo :subTask="subTask" :subTaskOpen.sync="tripletInfoOpen" @closeInfo="closeInfo"></TripletInfo>
+      <!-- <TripletInfo :subTask="subTask" :subTaskOpen.sync="tripletInfoOpen" @closeInfo="closeInfo"></TripletInfo> -->
+      <IndexV2 :subTask="subTask" @closeInfo="closeInfo" />
     </el-dialog>
   </div>
 </template>
@@ -108,11 +109,11 @@
 <script>
 import { listSubTask, getSubTask, delSubTask, addSubTask, updateSubTask } from "@/api/extract/subTask";
 import TripletInfo from '@/views/extract/info';
-
+import IndexV2 from '@/views/extract/info/indexV2';
 export default {
   name: "SubTask",
   dicts: ['extract_sub_task_status', 'extract_sub_task_list'],
-  components: { TripletInfo },
+  components: { TripletInfo,IndexV2 },
   props: { 
     task: {
       type: Object,
@@ -292,4 +293,10 @@ export default {
     }
   }
 };
-</script>
+</script>
+<style scoped>
+.el-dialog__body {
+  padding: 0px
+}
+
+</style>

+ 0 - 2
src/views/index.vue

@@ -144,7 +144,6 @@
       search(){
         this.loadingAircraftStatus = true
         getAircraftStatus(this.form).then(resp => {
-          console.info("getAircraftStatus",resp)
           this.airCraftList = resp.rows;
           this.airCraftTotal = resp.total;
           this.loadingAircraftStatus = false;
@@ -181,7 +180,6 @@
             row.countDown = 30-Math.round((new Date()- new Date(row.discoveryDate))/24/60/60/1000)
           }
           this.breakdownList = resp.rows;
-          console.info(this.breakdownList);
           this.breakdownTotal = resp.total;
           this.loadingBreakdownList = false;
         })

+ 68 - 26
src/views/knowledge/test/index.vue

@@ -1,50 +1,87 @@
 <template>
-    <div>
-        <ul ref="list"  style="color:#fff">
-            <li v-for="item in visibleItems" :key="item.id">{{ item.text }}</li>
-        </ul>
-    </div>
+    <el-card>
+        <el-row>故障进度</el-row>
+        <el-table :data="visibleItems" style="background-color: transparent">
+            <el-table-column label="机号" align="center" prop="airNumber" />
+            <el-table-column label="机型" align="center" prop="airplaneModel" />
+            <el-table-column label="专业" align="center" prop="major" />
+            <el-table-column label="发现日期" align="center" prop="discoveryDate" />
+            <el-table-column label="倒计时时间" align="center" prop="countDown">
+                <template slot-scope="scope">
+                    <span v-if="!scope.row ||scope.row.countDown > 15" style="color:green"> {{ scope.row ? scope.row.countDown : '' }} </span>
+                    <span v-else-if="scope.row.countDown < 0" style="color:red"> {{ scope.row.countDown }} </span>
+                    <span v-else style="color:yellow"> {{ scope.row.countDown }} </span>
+                </template>
+            </el-table-column>
+        </el-table>
+    </el-card>
 </template>
   
 <script>
 export default {
+    name: "BreakdownSchedule",
     data() {
         return {
-            items: [
-                { id: 1, text: 'Item 1' },
-                { id: 2, text: 'Item 2' },
-                { id: 3, text: 'Item 3' },
-                { id: 4, text: 'Item 4' },
-                { id: 5, text: 'Item 5' },
-                { id: 6, text: 'Item 6' },
-                { id: 7, text: 'Item 7' },
-                { id: 8, text: 'Item 8' },
-                { id: 9, text: 'Item 9' },
-                { id: 10, text: 'Item 10' }
-            ],
             startIndex: 0,
-            numItems: 5,
+            numItems: 3,
+            breakdownList:[
+                {
+                    airNumber:1,
+                    airplaneModel:1,
+                    major:1,
+                    discoveryDate:"2023-04-01",
+                    countDown:1,
+                },
+                {
+                    airNumber:2,
+                    airplaneModel:2,
+                    major:2,
+                    discoveryDate:"2023-04-01",
+                    countDown:2,
+                },
+                {
+                    airNumber:3,
+                    airplaneModel:3,
+                    major:3,
+                    discoveryDate:"2023-04-01",
+                    countDown:3,
+                },
+                {
+                    airNumber:4,
+                    airplaneModel:4,
+                    major:4,
+                    discoveryDate:"2023-04-01",
+                    countDown:4,
+                },
+                {
+                    airNumber:5,
+                    airplaneModel:5,
+                    major:5,
+                    discoveryDate:"2023-04-01",
+                    countDown:5,
+                },
+            ],
         }
     },
     computed: {
         visibleItems() {
             let v = [];
-            let itemsLength = this.items.length
-            for(let i = 0; i < this.numItems; i++) {
-                if((i+this.startIndex) < itemsLength){
-                    v.push(this.items[i+this.startIndex])
+            let itemsLength = this.breakdownList.length
+            for (let i = 0; i < this.numItems; i++) {
+                if ((i + this.startIndex) < itemsLength) {
+                    v.push(this.breakdownList[i + this.startIndex])
                 } else {
-                    v.push(this.items[i+this.startIndex-itemsLength])
+                    v.push(this.breakdownList[i + this.startIndex - itemsLength])
                 }
             }
             return v
-            
+
         }
     },
     mounted() {
         this.interval = setInterval(() => {
             this.startIndex++
-            if(this.startIndex >= this.items.length){
+            if (this.startIndex >= this.breakdownList.length) {
                 this.startIndex = 0
             }
         }, 3000)
@@ -53,4 +90,9 @@ export default {
         clearInterval(this.interval)
     }
 }
-</script>
+</script>
+<style scoped>
+.el-table {
+    color:red
+}
+</style>

+ 127 - 0
src/views/repair/encyclopedia/edit.vue

@@ -0,0 +1,127 @@
+<template>
+  <div style="width: 1100px; margin: auto;">
+    <el-row>
+      标题:&nbsp;&nbsp;&nbsp;&nbsp;<el-input v-model="editForm.title" placeholder="请输入标题" style="width:60%"></el-input>
+    </el-row>
+    <el-row>
+      描述:&nbsp;&nbsp;&nbsp;&nbsp;<el-input v-model="editForm.desc" placeholder="请输入描述" style="width:60%"></el-input>
+    </el-row>
+    <div style="border: 1px solid #ccc; margin-top: 10px">
+      <!-- 工具栏 -->
+      <Toolbar style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" />
+      <!-- 编辑器 -->
+      <Editor style="height: 750px; overflow-y: hidden" :defaultConfig="editorConfig" v-model="editForm.text" @onChange="onChange"
+        @onCreated="onCreated" />
+    </div>
+    <div class="button-container">
+      <el-button type="primary" @click="submitForm">确 认</el-button>
+      <el-button @click="back">取 消</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { addEncyclopedia, updateEncyclopedia } from "@/api/repair/encyclopedia";
+import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
+import { getToken } from '@/utils/auth'
+export default {
+  name: "MyEditor",
+  components: { Editor, Toolbar },
+  props:{
+    form: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      title: "",
+      desc: '',
+      editor: null,
+      editForm: this.form,
+      toolbarConfig: {
+        // toolbarKeys: [ /* 显示哪些菜单,如何排序、分组 */ ],
+        // excludeKeys: [ /* 隐藏哪些菜单 */ ],
+      },
+      editorConfig: {
+        placeholder: "请输入内容...",
+        // autoFocus: false,
+
+        // 所有的菜单配置,都要在 MENU_CONF 属性下
+        MENU_CONF: {
+          uploadImage: {
+            fieldName: 'file',
+            server: 'http://localhost:11082/common/wangEditorUpload',
+            headers: {
+              Authorization: getToken(),
+            }
+          },
+        },
+      },
+    };
+  },
+  methods: {
+    onCreated(editor) {
+      this.editor = Object.seal(editor); // 【注意】一定要用 Object.seal() 否则会报错
+    },
+    onChange(editor) {
+      // console.log("onChange", editor.getHtml()); // onChange 时获取编辑器最新内容
+    },
+    getEditorText() {
+      const editor = this.editor;
+      if (editor == null) return;
+
+      // console.log(editor.getText()); // 执行 editor API
+    },
+    printEditorHtml() {
+      const editor = this.editor;
+      if (editor == null) return;
+
+      // console.log(editor.getHtml()); // 执行 editor API
+    },
+    submitForm() {
+      if (this.editForm.id != null) {
+        updateEncyclopedia(this.editForm).then(response => {
+          this.$modal.msgSuccess("修改成功");
+          this.$emit('close',true)
+        });
+      } else {
+        addEncyclopedia(this.editForm).then(response => {
+          this.$modal.msgSuccess("新增成功");
+          this.$emit('close',true)
+        });
+      }
+    },
+    back(){
+      this.$emit('close',false)
+    },
+  },
+  mounted() {
+    // 模拟 ajax 请求,异步渲染编辑器
+    // setTimeout(() => {
+    //   this.html = "<p>Ajax 异步设置内容 HTML</p>";
+    // }, 1500);
+  },
+  beforeDestroy() {
+    const editor = this.editor;
+    if (editor == null) return;
+    editor.destroy(); // 组件销毁时,及时销毁 editor ,重要!!!
+  },
+}
+</script>
+
+
+<style scoped>
+.button-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100px;
+  /* 设置高度为视口的100%,以便在垂直方向上居中 */
+}
+
+.el-row {
+  color: #fff;
+}
+</style>
+<style src="@wangeditor/editor/dist/css/style.css"></style>

+ 271 - 0
src/views/repair/encyclopedia/index.vue

@@ -0,0 +1,271 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="标题" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="描述" prop="desc">
+        <el-input
+          v-model="queryParams.desc"
+          placeholder="请输入描述"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['repair:encyclopedia:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['repair:encyclopedia:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['repair:encyclopedia:remove']"
+        >删除</el-button>
+      </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['repair:encyclopedia:export']"
+        >导出</el-button>
+      </el-col> -->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="encyclopediaList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" align="center" prop="id" />
+      <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="描述" align="center" prop="desc" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="openViewPage(scope.row)"
+            v-hasPermi="['repair:encyclopedia:edit']"
+          >预览</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['repair:encyclopedia:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['repair:encyclopedia:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改维修百科对话框 -->
+    <el-dialog :title="title" v-if="open" :visible.sync="open" width="1200px" append-to-body>
+      <Edite :form="form" @close="cancel" @submitForm="submitForm"></Edite>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listEncyclopedia, getEncyclopedia, delEncyclopedia, addEncyclopedia, updateEncyclopedia } from "@/api/repair/encyclopedia";
+import Edite from './edit.vue'
+export default {
+  name: "Encyclopedia",
+  components: { Edite },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 维修百科表格数据
+      encyclopediaList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        title: null,
+        desc: null,
+        text: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询维修百科列表 */
+    getList() {
+      this.loading = true;
+      listEncyclopedia(this.queryParams).then(response => {
+        this.encyclopediaList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel(isReload) {
+      this.open = false;
+      this.reset();
+      if(isReload){
+        this.getList();
+      }
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        title: null,
+        desc: null,
+        text: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加维修百科";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getEncyclopedia(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改维修百科";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateEncyclopedia(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addEncyclopedia(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除维修百科编号为"' + ids + '"的数据项?').then(function() {
+        return delEncyclopedia(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('repair/encyclopedia/export', {
+        ...this.queryParams
+      }, `encyclopedia_${new Date().getTime()}.xlsx`)
+    },
+    openViewPage(row){
+      let params = {
+        id: row.id
+      }
+      this.$router.push({ path: '/repair/view/encyclopedia', query: params });
+    },
+  }
+};
+</script>

+ 38 - 0
src/views/repair/encyclopedia/view.vue

@@ -0,0 +1,38 @@
+<template>
+  <div style="background-color: rgba(255,255,255,0.7);width: 1100px;margin: auto;min-height: calc(100vh - 84px)" ref="view">
+    <h1 style="padding: 20px;text-align: center;"> {{ title }} </h1>
+    <span v-html="text" />
+  </div>
+</template>
+
+<script>
+import { getEncyclopedia } from "@/api/repair/encyclopedia";
+export default {
+  props: {
+    id: {
+      type: Number,
+    },
+  },
+  data() {
+    return {
+      title:'',
+      text:'',
+    };
+  },
+  created() {
+    this.getEncyclopedia();
+  },
+  mounted() {
+  },
+
+  methods: {
+    getEncyclopedia() {
+      let id = this.id ? this.id : this.$route.query.id;
+      getEncyclopedia(id).then((resp) => {
+        this.text = resp.data.text
+        this.title = resp.data.title
+      });
+    },
+  },
+};
+</script>

+ 128 - 0
src/views/repair/noun/edit/index.vue

@@ -0,0 +1,128 @@
+<template>
+  <div style="
+    width: 1200px;
+    margin: auto;
+">
+    <!-- <div>
+      <button @click="printEditorHtml">print html</button>
+      <button @click="getEditorText">print text</button>
+    </div> -->
+    <el-row>
+      标题:&nbsp;&nbsp;&nbsp;&nbsp;<el-input v-model="title" placeholder="请输入标题" style="width:60%"></el-input>
+    </el-row>
+    <el-row>
+      描述:&nbsp;&nbsp;&nbsp;&nbsp;<el-input v-model="desc" placeholder="请输入描述" style="width:60%"></el-input>
+    </el-row>
+    
+    
+    <div style="border: 1px solid #ccc; margin-top: 10px">
+      <!-- 工具栏 -->
+      <Toolbar
+        style="border-bottom: 1px solid #ccc"
+        :editor="editor"
+        :defaultConfig="toolbarConfig"
+      />
+      <!-- 编辑器 -->
+      <Editor
+        style="height: 900px; overflow-y: hidden"
+        :defaultConfig="editorConfig"
+        v-model="html"
+        @onChange="onChange"
+        @onCreated="onCreated"
+      />
+    </div>
+    <div class="button-container">
+      <el-button type="primary" @click="getEditorText">确 认</el-button>
+      <el-button @click="getEditorText">取 消</el-button>
+    </div>
+
+    <!-- <div style="margin-top: 10px">
+      <textarea
+        v-model="html"
+        readonly
+        style="width: 100%; height: 200px; outline: none"
+      ></textarea>
+    </div> -->
+  </div>
+</template>
+
+<script>
+import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
+import { getToken } from '@/utils/auth'
+export default {
+  name: "MyEditor",
+  components: { Editor, Toolbar },
+  data() {
+    return {
+      title:"",
+      desc:'',
+      editor: null,
+      html: "<p>hello&nbsp;world</p>",
+      toolbarConfig: {
+        // toolbarKeys: [ /* 显示哪些菜单,如何排序、分组 */ ],
+        // excludeKeys: [ /* 隐藏哪些菜单 */ ],
+      },
+      editorConfig: {
+        placeholder: "请输入内容...",
+        // autoFocus: false,
+
+        // 所有的菜单配置,都要在 MENU_CONF 属性下
+        MENU_CONF: {
+          uploadImage:{
+            fieldName: 'file',
+            server: 'http://localhost:11082/common/wangEditorUpload',
+            headers: {
+              Authorization: getToken(),
+            }
+          },
+        },
+      },
+    };
+  },
+  methods: {
+    onCreated(editor) {
+      this.editor = Object.seal(editor); // 【注意】一定要用 Object.seal() 否则会报错
+    },
+    onChange(editor) {
+      console.log("onChange", editor.getHtml()); // onChange 时获取编辑器最新内容
+    },
+    getEditorText() {
+      const editor = this.editor;
+      if (editor == null) return;
+
+      console.log(editor.getText()); // 执行 editor API
+    },
+    printEditorHtml() {
+      const editor = this.editor;
+      if (editor == null) return;
+
+      console.log(editor.getHtml()); // 执行 editor API
+    },
+  },
+  mounted() {
+    // 模拟 ajax 请求,异步渲染编辑器
+    // setTimeout(() => {
+    //   this.html = "<p>Ajax 异步设置内容 HTML</p>";
+    // }, 1500);
+  },
+  beforeDestroy() {
+    const editor = this.editor;
+    if (editor == null) return;
+    editor.destroy(); // 组件销毁时,及时销毁 editor ,重要!!!
+  },
+};
+</script>
+
+
+<style scoped>
+.button-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100px; /* 设置高度为视口的100%,以便在垂直方向上居中 */
+}
+.el-row {
+  color: #fff;
+}
+</style>
+<style src="@wangeditor/editor/dist/css/style.css"></style>

+ 104 - 12
src/views/searchV2/breakdown/base.vue

@@ -1,15 +1,107 @@
 <template>
     <div class="app-container">
-        <el-tabs v-model="activeName" @tab-click="handleClick">
-            <el-tab-pane label="用户管理" name="first">故障查询</el-tab-pane>
-            <el-tab-pane label="配置管理" name="second">关键词查询</el-tab-pane>
-            <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
-            <el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
-        </el-tabs>
+      <el-form
+        :model="queryParams"
+        ref="queryForm"
+        size="small"
+        :inline="true"
+        label-width="68px"
+      >
+        <el-form-item :label="name1" prop="firstName" >
+          <el-input
+            v-model="queryParams.firstName"
+            placeholder="请输入"
+            clearable
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item :label="name2" prop="secondName">
+          <el-input
+            v-model="queryParams.secondName"
+            placeholder="请输入"
+            clearable
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
+            >搜索</el-button
+          >
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <Graph ref="charts" :chartList="chartData" />
     </div>
-</template>
-<script>
-export default {
-    
-}
-</script>
+  </template>
+  
+  <script>
+  import Graph from "@/components/Echarts/graph";
+  import { getGraphByEntiry } from "@/api/knowledge/search";
+  
+  export default {
+    name: "GranphSearch",
+    dicts: ["graph_search_length"],
+    components: { Graph },
+    props:{
+      name1: {
+        type: String,
+        required: true
+      },
+      name2: {
+        type: String,
+        required: true
+      }
+    },
+    data() {
+      return {
+        queryParams: {
+          firstName: "",
+          secondName: "",
+          length: "0",
+        },
+        chartData: {
+          seriesData:[],
+          linksData:[],
+        },
+      };
+    },
+    methods: {
+      handleQuery() {
+        if(this.queryParams.firstName == this.queryParams.secondName){
+          this.$message.error('不能查询自己的关联');
+          return
+        }
+        getGraphByEntiry(this.queryParams).then((resp) => {
+          let respData = resp.data
+          let seriesData = []
+          let linksData = []
+          for(let item of respData.data){
+            seriesData.push(
+              {name: item.name}
+            )
+          }
+          for(let link of respData.links){
+            linksData.push(
+              {
+                source: link.fromName,
+                target: link.toName,
+                label: {
+                  show: true, // 是否显示line的文字
+                  formatter: link.name // line的文字
+                },
+              }
+            )
+          }
+          this.chartData = {
+            seriesData,
+            linksData,
+          }       
+        });
+      },
+      resetQuery() {
+        this.resetForm("queryForm");
+      },
+    },
+  };
+  </script>
+  

+ 29 - 96
src/views/searchV2/breakdown/index.vue

@@ -1,97 +1,30 @@
 <template>
-    <div class="app-container">
-      <el-form
-        :model="queryParams"
-        ref="queryForm"
-        size="small"
-        :inline="true"
-        label-width="68px"
-      >
-        <el-form-item label="故障1" prop="firstName" >
-          <el-input
-            v-model="queryParams.firstName"
-            placeholder="请输入"
-            clearable
-            @keyup.enter.native="handleQuery"
-          />
-        </el-form-item>
-        <el-form-item label="故障2" prop="secondName">
-          <el-input
-            v-model="queryParams.secondName"
-            placeholder="请输入"
-            clearable
-            @keyup.enter.native="handleQuery"
-          />
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
-            >搜索</el-button
-          >
-          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-        </el-form-item>
-      </el-form>
-      <Graph ref="charts" :chartList="chartData" />
-    </div>
-  </template>
-  
-  <script>
-  import Graph from "@/components/Echarts/graph";
-  import { getGraphByEntiry } from "@/api/knowledge/search";
-  
-  export default {
-    name: "GranphSearch",
-    dicts: ["graph_search_length"],
-    components: { Graph },
-    data() {
-      return {
-        queryParams: {
-          firstName: "",
-          secondName: "",
-          length: "0",
-        },
-        chartData: {
-          seriesData:[],
-          linksData:[],
-        },
-      };
-    },
-    methods: {
-      handleQuery() {
-        if(this.queryParams.firstName == this.queryParams.secondName){
-          this.$message.error('不能查询自己的关联');
-          return
-        }
-        getGraphByEntiry(this.queryParams).then((resp) => {
-          let respData = resp.data
-          let seriesData = []
-          let linksData = []
-          for(let item of respData.data){
-            seriesData.push(
-              {name: item.name}
-            )
-          }
-          for(let link of respData.links){
-            linksData.push(
-              {
-                source: link.fromName,
-                target: link.toName,
-                label: {
-                  show: true, // 是否显示line的文字
-                  formatter: link.name // line的文字
-                },
-              }
-            )
-          }
-          this.chartData = {
-            seriesData,
-            linksData,
-          }       
-        });
-      },
-      resetQuery() {
-        this.resetForm("queryForm");
-      },
-    },
-  };
-  </script>
-  
+  <div class="app-container">
+      <el-tabs v-model="activeName" @tab-click="handleClick" >
+          <el-tab-pane label="故障~故障" name="first">
+            <Sbreakdown name1="故障" name2 ="故障"/>
+          </el-tab-pane>
+          <el-tab-pane label="故障~部件" name="second">
+            <Sbreakdown name1="故障" name2 ="部件"/>
+          </el-tab-pane>
+          <el-tab-pane label="部件~部件" name="third">
+            <Sbreakdown name1="部件" name2 ="部件"/>
+          </el-tab-pane>
+      </el-tabs>
+  </div>
+</template>
+<script>
+import Sbreakdown from '@/views/searchV2/breakdown/base'
+export default {
+  name: "SearchBreakdown",
+  components:{Sbreakdown},
+  data() {
+    return {
+      activeName: 'first'
+    }
+  },
+  methods: {
+    handleClick(tab, event){}
+  }
+}
+</script>

+ 20 - 0
src/views/searchV2/question/index.vue

@@ -0,0 +1,20 @@
+<template>
+    <div>
+
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            
+        }
+    },
+    created(){
+        alert('未完成。。。')
+    },
+    methods:{
+
+    }
+}
+</script>

+ 29 - 12
src/views/showInfo/breakdown/index.vue

@@ -9,10 +9,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="大练基地" prop="base">
+      <el-form-item label="基地" prop="base">
         <el-input
           v-model="queryParams.base"
-          placeholder="请输入大练基地"
+          placeholder="请输入基地"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -121,6 +121,14 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="故障责任" prop="duty">
+        <el-input
+          v-model="queryParams.duty"
+          placeholder="请输入故障责任"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="故换件名称" prop="replaceUnitName">
         <el-input
           v-model="queryParams.replaceUnitName"
@@ -220,7 +228,7 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="序号" align="center" prop="id" />
       <el-table-column label="战区" align="center" prop="warZone" />
-      <el-table-column label="大练基地" align="center" prop="base" />
+      <el-table-column label="基地" align="center" prop="base" />
       <el-table-column label="师" align="center" prop="division" />
       <el-table-column label="旅团" align="center" prop="brigade" />
       <el-table-column label="机型" align="center" prop="airplaneModel" />
@@ -235,14 +243,20 @@
       <el-table-column label="故障描述" align="center" prop="describe" />
       <el-table-column label="故障原因" align="center" prop="reason" />
       <el-table-column label="故障件名称" align="center" prop="breakdownUnitName" />
-      <el-table-column label="故障件型" align="center" prop="breakdownUnitType" />
+      <el-table-column label="故障件型" align="center" prop="breakdownUnitType" />
       <el-table-column label="故障件号码" align="center" prop="breakdownUnitNumber" />
       <el-table-column label="故障件所属系统" align="center" prop="unitSystem" />
       <el-table-column label="故障后果" align="center" prop="consequence" />
+      <el-table-column label="故障责任" align="center" prop="duty" />
       <el-table-column label="故换件名称" align="center" prop="replaceUnitName" />
       <el-table-column label="故换件型别" align="center" prop="replaceUnitType" />
       <el-table-column label="故换件号码" align="center" prop="replaceUnitNumber" />
       <el-table-column label="排除方法" align="center" prop="method" />
+      <el-table-column label="修复日期" align="center" prop="repairedDate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.repairedDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -355,13 +369,13 @@
             <el-form-item label="故障件名称" prop="breakdownUnitName">
           <el-input v-model="form.breakdownUnitName" placeholder="请输入故障件名称" />
         </el-form-item>
-           
+
           </el-col>
           <el-col :span="12">
             <el-form-item label="故障件号码" prop="breakdownUnitNumber">
           <el-input v-model="form.breakdownUnitNumber" placeholder="请输入故障件号码" />
         </el-form-item>
-            
+
           </el-col>
         </el-row>
         <el-row>
@@ -369,13 +383,13 @@
             <el-form-item label="故障件所属系统" prop="unitSystem">
           <el-input v-model="form.unitSystem" placeholder="请输入故障件所属系统" />
         </el-form-item>
-            
+
           </el-col>
           <el-col :span="12">
             <el-form-item label="故障后果" prop="consequence">
           <el-input v-model="form.consequence" placeholder="请输入故障后果" />
         </el-form-item>
-            
+
           </el-col>
         </el-row>
         <el-row>
@@ -383,13 +397,13 @@
             <el-form-item label="故换件名称" prop="replaceUnitName">
           <el-input v-model="form.replaceUnitName" placeholder="请输入故换件名称" />
         </el-form-item>
-            
+
           </el-col>
           <el-col :span="12">
             <el-form-item label="故换件号码" prop="replaceUnitNumber">
           <el-input v-model="form.replaceUnitNumber" placeholder="请输入故换件号码" />
         </el-form-item>
-            
+
           </el-col>
         </el-row>
         <el-row>
@@ -397,7 +411,7 @@
             <el-form-item label="排除方法" prop="method">
           <el-input v-model="form.method" placeholder="请输入排除方法" type="textarea"/>
         </el-form-item>
-            
+
           </el-col>
           <el-col :span="12">
             <el-form-item label="修复日期" prop="repairedDate">
@@ -412,7 +426,7 @@
         </el-row>
 
 
-        
+
 
 
 
@@ -524,10 +538,12 @@ export default {
         breakdownUnitNumber: null,
         unitSystem: null,
         consequence: null,
+        duty: null,
         replaceUnitName: null,
         replaceUnitType: null,
         replaceUnitNumber: null,
         method: null,
+        repairedDate: null,
       },
       // 表单参数
       form: {},
@@ -588,6 +604,7 @@ export default {
         breakdownUnitNumber: null,
         unitSystem: null,
         consequence: null,
+        duty: null,
         replaceUnitName: null,
         replaceUnitType: null,
         replaceUnitNumber: null,

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно