Parcourir la source

Merge branch 'dev-rmd2' of Rmengdi/LQBZ_web into master

www il y a 3 mois
Parent
commit
a27aa2fc78

+ 1 - 1
.env.development

@@ -5,4 +5,4 @@ ENV = 'development'
 # 开发环境
 VUE_APP_BASE_API ='/api'
 
-VUE_APP_BASE_API_target ='http://localhost:8080'
+VUE_APP_BASE_API_target ='http://localhost:9099'

+ 5 - 5
src/api/als/ERManage.js

@@ -2,25 +2,25 @@ import { get, post } from '@/http/index'
 
 //查询所有三元组
 export const getERList = async () => {
-  return await get('/kgqa/relation/getAllTriples/')
+  return await get('/kgqa/relation/getAllTriples')
 }
 
 //查询数据库中目前已经有的关系
 export const getAllRelationClass = async () => {
-  return await get('/kgqa/relation/getAllRelationClass/')
+  return await get('/kgqa/relation/getAllRelationClass')
 }
 
 // 新增关系
 export const addRelation = async (data) => {
-  return await post('/kgqa/relation/Add/', data)
+  return await post('/kgqa/relation/Add', data)
 }
 
 //修改关系
 export const updateRelation = async (data) => {
-  return await post('/kgqa/relation/Update/', data)
+  return await post('/kgqa/relation/Update', data)
 }
 
 //删除关系
 export const deleteRelation = async (data) => {
-  return await post('/kgqa/relation/Delete/', data)
+  return await post('/kgqa/relation/Delete', data)
 }

+ 6 - 6
src/api/als/entityManage.js

@@ -2,30 +2,30 @@ import { get, post } from '@/http/index'
 
 //查询所有实体
 export const getEntityList = async () => {
-  return await get('/kgqa/entity/getAllEntities/')
+  return await get('/kgqa/entity/getAllEntities')
 }
 
 //	获取图数据库中的所有实体类名称
 export const getAllEntityClass = async () => {
-  return await get('/kgqa/entity/getAllEntityClass/')
+  return await get('/kgqa/entity/getAllEntityClass')
 }
 
 // 新增实体结点
 export const addEntity = async (data) => {
-  return await post('/kgqa/entity/add/', data)
+  return await post('/kgqa/entity/add', data)
 }
 
 //修改实体结点
 export const updateEntity = async (data) => {
-  return await post('/kgqa/entity/update/', data)
+  return await post('/kgqa/entity/update', data)
 }
 
 //查询实体结点
 export const checkEntity = async (data) => {
-  return await post('/kgqa/entity/Check/', data)
+  return await post('/kgqa/entity/Check', data)
 }
 
 //删除实体结点
 export const deleteEntity = async (data) => {
-  return await post('/kgqa/entity/delete/', data)
+  return await post('/kgqa/entity/delete', data)
 }

+ 5 - 0
src/api/als/faultStatistics.js

@@ -43,3 +43,8 @@ export const exportFaultStatisticsExcel = async (data) => {
 export const getFaultStatisticsListAll = async (data) => {
   return await post('/als/faultStatistics/listAll', data)
 }
+
+// 同步
+export const getSync = async (data) => {
+  return await get('/extra/statistics', data)
+}

+ 68 - 13
src/api/als/knowledgeExtraction.js

@@ -1,21 +1,76 @@
-import { post } from '@/http/index'
+import { get, post, deletes, put } from '@/http/index'
 
-// 查询知识抽取列表
-export const getknowledgeExtraction = async (data) => {
-  // return await post('/kgqa/ask/', data)
+// 查看抽取任务列表
+export const getTaskList = async (data) => {
+  return await get('/als/kGraphTask/list', data)
 }
 
-// 新增知识抽取
-export const addknowledgeExtraction = async (data) => {
-  return await post('/kgqa/api/upload', data)
+// 新增任务
+export const addTask = async (data) => {
+  return await post('/als/kGraphTask', data)
 }
 
-// 修改知识抽取
-export const updateknowledgeExtraction = async (data) => {
-  // return await put('/als/lifePrediction', data)
+// 修改任务
+export const updateTask = async (data) => {
+  return await put('/als/kGraphTask', data)
 }
 
-// 删除知识抽取
-export const removeknowledgeExtraction = async (id) => {
-  // return await deletes('/als/lifePrediction/' + id)
+// 删除任务
+export const removeTask = async (id) => {
+  return await deletes('/als/kGraphTask/' + id)
+}
+
+// 获取文件信息
+export const getTaskInfo = async (id) => {
+  return await get('/als/kGraphTask/' + id)
+}
+
+// 执行知识图谱的类型
+export const taskPro = async (data) => {
+  return await post('/als/kGraphTask/pro', data)
+}
+
+// 获取分句列表
+export const getClauseList = async (data) => {
+  return await get('/als/kGraphClause/list', data)
+}
+
+// 获取分句详细信息
+export const getClauseInfo = async (id) => {
+  return await get('/als/kGraphClause/' + id)
+}
+
+// 删除分句
+export const removeClause = async (id) => {
+  return await deletes('/als/kGraphClause/' + id)
+}
+
+// 修改分句
+export const updateClause = async (data) => {
+  return await put('/als/kGraphClause', data)
+}
+
+// 获取抽取列表
+export const getExtractList = async (data) => {
+  return await get('/als/kGraphEntity/list', data)
+}
+
+// 修改抽取结果
+export const updateExtractInfo = async (data) => {
+  return await put('/als/kGraphEntity', data)
+}
+
+// 删除抽取结果
+export const removeExtractInfo = async (id) => {
+  return await deletes('/als/kGraphEntity/' + id)
+}
+
+// 新增实体关系
+export const addER = async (data) => {
+  return await post('/als/kGraphEntity', data)
+}
+
+// 获取图谱可视化
+export const getVisually = async (data) => {
+  return await post('/kgqa/ossId/show', data)
 }

+ 7 - 0
src/layout/components/NavBar/MenuItem.vue

@@ -29,3 +29,10 @@ export default {
   methods: {}
 }
 </script>
+
+<style lang="scss" scoped>
+.childMenu {
+  max-height: 500px;
+  overflow: hidden;
+}
+</style>

+ 15 - 0
src/layout/components/NavBar/index.scss

@@ -203,6 +203,9 @@
   text-align: center;
   ul {
     min-width: 130px;
+    max-height: 500px;
+    overflow: scroll;
+    
     // width: 150px !important;
     background: rgb(15, 79, 99) !important;
     border-radius: 0 !important;
@@ -234,6 +237,18 @@
       }
     }
   }
+  ::-webkit-scrollbar{
+    display: none;
+  }
+  ::-moz-scrollbar{
+    display: none;
+  }
+  ::-ms-scrollbar{
+    display: none;
+  }
+  ::-o-scrollbar{
+    display: none;
+  }
 }
 
 .nav-bar-menu .el-menu {

+ 1 - 1
src/layout/components/NavBar/index.vue

@@ -40,6 +40,6 @@ export default {
 }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 @import './index.scss';
 </style>

+ 0 - 1
src/layout/components/NavBar/menu.vue

@@ -24,7 +24,6 @@ export default {
   }
 }
 </script>
-<style></style>
 <style lang="scss" scoped>
 .el-menu-demo {
   display: flex;

+ 37 - 0
src/router/modules/system.js

@@ -254,6 +254,43 @@ export default [
           title: '文件管理'
         }
       },
+      {
+        name: 'KnowledgeExtraction',
+        path: '/knowledgeGraph/knowledgeExtraction',
+        component: () => import('@/views/als/knowledgeExtraction/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '知识抽取'
+        }
+      },
+      {
+        name: 'ExtractList',
+        path: '/knowledgeGraph/extractList',
+        component: () => import('@/views/als/knowledgeExtraction/extractList.vue'),
+        name: 'ExtractList',
+        meta: {
+          parent: 'BasicData',
+          title: '抽取列表'
+        }
+      },
+      {
+        name: 'EntityManage',
+        path: '/knowledgeGraph/entityManage',
+        component: () => import('@/views/als/knowledgeManage/entityManage/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '实体管理'
+        }
+      },
+      {
+        name: 'ERManage',
+        path: '/knowledgeGraph/ERManage',
+        component: () => import('@/views/als/knowledgeManage/ERManage/index.vue'),
+        meta: {
+          parent: 'BasicData',
+          title: '实体关系管理'
+        }
+      },
       // {
       //   name: 'TrainingData',
       //   path: '/dataManage/trainingData',

+ 43 - 9
src/views/als/faultDiagnosis/index.vue

@@ -43,6 +43,10 @@
       <el-dialog title="执行进度" :visible.sync="progressVisible" width="800px">
         <el-progress :text-inside="true" :stroke-width="24" :percentage="percentage" status="success"></el-progress>
       </el-dialog>
+      <el-dialog title="结果展示" :visible.sync="resultShowVisible" :before-close="resultShowDialogClose" width="800px">
+        <div style="margin: 10px 0px">{{ resultShowData.result }}</div>
+        <el-image style="width: 500px" :src="resultShowData.ossId" :preview-src-list="[resultShowData.ossId]"></el-image>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -69,6 +73,7 @@ export default {
       dialogVisible: false,
       resultVisible: false,
       progressVisible: false,
+      resultShowVisible: false,
       keyWordData: '',
       aircaftModelIdList: [],
       currentNodeKey: '',
@@ -135,7 +140,7 @@ export default {
               }
             },
             {
-              name: '查看结果',
+              name: '查看',
               type: 'text',
               round: false,
               plain: false,
@@ -204,8 +209,20 @@ export default {
           }
         },
         {
-          prop: 'resultContent',
-          label: '结果'
+          button: true,
+          label: '操作',
+          width: '240px',
+          group: [
+            {
+              name: '查看结果',
+              type: 'text',
+              round: false,
+              plain: false,
+              onClick: (row, index, scope) => {
+                this.checkRelustShow(row)
+              }
+            }
+          ]
         }
       ],
       resultOptions: {
@@ -239,7 +256,11 @@ export default {
       currentSortieNo: '',
       partsData: [],
       allAirConfig: [],
-      percentage: 0
+      percentage: 0,
+      resultShowData: {
+        ossId: '',
+        result: ''
+      }
     }
   },
   watch: {
@@ -385,6 +406,14 @@ export default {
       }
     },
 
+    resultShowDialogClose() {
+      this.resultShowVisible = true
+      this.resultShowData = {
+        ossId: '',
+        result: ''
+      }
+    },
+
     submit() {
       this.beginExecute()
     },
@@ -399,6 +428,11 @@ export default {
       this.resultVisible = true
     },
 
+    checkRelustShow(row) {
+      this.resultShowData = row.resultContent
+      this.resultShowVisible = true
+    },
+
     async beginExecute() {
       this.progressVisible = true
 
@@ -421,11 +455,11 @@ export default {
             type: 'success',
             message: '执行成功!'
           })
-
-          const result = res.data
-          this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
-            confirmButtonText: '确定'
-          })
+          this.resultShowData = res.data
+          this.resultShowVisible = true
+          // this.$alert(`故障诊断结果为:${result}`, '故障诊断结果', {
+          //   confirmButtonText: '确定'
+          // })
           this.getFaultDiagnosisAPI({ sortieNo: this.currentSortieNo })
           this.handleClose()
         }

+ 28 - 2
src/views/als/faultStatistics/index.vue

@@ -6,6 +6,7 @@
           <div class="view-carrierFlightMission-FlightMission-btn-box" style="width: 24%">
             <el-button type="success" @click="openDialog()" :disabled="currentNode && currentNode.type == 0">新增</el-button>
             <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
+            <el-button type="danger" @click="handleSync" :disabled="currentNode && currentNode.type == 0">同步</el-button>
             <el-dropdown split-button type="primary" style="margin-left: 10px" trigger="click" @command="handleExport">
               更多
               <el-dropdown-menu slot="dropdown">
@@ -373,7 +374,7 @@
 </template>
 
 <script>
-import { getFaultStatistics, getFaultStatisticsListAll, getAircaftTypeAndModelTree, addFaultStatistics, updateFaultStatistics, removeFaultStatistics, downLoadFaultStatistics, exportFaultStatisticsExcel } from '@/api/als/faultStatistics'
+import { getSync, getFaultStatistics, getFaultStatisticsListAll, getAircaftTypeAndModelTree, addFaultStatistics, updateFaultStatistics, removeFaultStatistics, downLoadFaultStatistics, exportFaultStatisticsExcel } from '@/api/als/faultStatistics'
 import { deepClone, debounce } from '@/utils/index'
 import ImportDialog from './importDialog/index.vue'
 import EchartsVue from './echarts.vue'
@@ -774,7 +775,8 @@ export default {
         installationTime: [{ required: true, message: '故障件装本机工作时次不能为空', trigger: 'blur' }],
         totalWorkTime: [{ required: true, message: '故障件总工作时次不能为空', trigger: 'blur' }]
       },
-      debounceFn: debounce(this.fetch, 500)
+      debounceFn: debounce(this.fetch, 500),
+      loading: null
     }
   },
   watch: {
@@ -1037,6 +1039,30 @@ export default {
         })
         .catch(() => {})
     },
+
+    // 同步
+    async handleSync() {
+      this.loading = this.$loading({
+        lock: true,
+        text: '正在同步数据,请稍候...',
+        spinner: 'el-icon-loading'
+        // background: 'rgba(0, 0, 0, 0.7)'
+      })
+      try {
+        const { code } = await getSync()
+        if (code === 200) {
+          this.loading.close()
+          this.$message({
+            type: 'success',
+            message: '同步成功!'
+          })
+          this.getFaultStatisticsAPI()
+        }
+      } catch (error) {
+        this.loading.close()
+      }
+    },
+
     //更多按钮
     handleExport(type) {
       this[type]()

+ 1 - 1
src/views/als/flightData/index.vue

@@ -53,7 +53,7 @@
           <el-row>
             <el-col :span="12">
               <el-form-item label="上传飞参数据" label-width="110px" prop="ossId">
-                <FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx']" />
+                <FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['xls', 'xlsx', 'csv']" />
               </el-form-item>
             </el-col>
             <el-col :span="12">

+ 31 - 31
src/views/als/intelligentQA/index.vue

@@ -193,37 +193,37 @@ export default {
           answer: '正在解析您的问题,请稍后......'
         })
         this.questionInput = ''
-        // const { code, data } = await handlerAsk(sendInput)
-        const { code, data } = {
-          code: 200,
-          msg: '',
-          data: {
-            user_id: 'user',
-            answer: '解决办法为:更换电池或遥控器',
-            file_name: '排故手册',
-            ossID: '227701077942149120', //pdf
-            // ossID: '227692224508796928', //word
-            graph: {
-              data: [
-                { name: '202310150010', category: 'HMC' },
-                { name: '电视', category: '成品' },
-                { name: '电视遥控器失灵', category: '故障描述' },
-                { name: '家用电器', category: '系统' },
-                { name: '更换电池或遥控器', category: '维修策略' }
-              ],
-              links: [
-                { source: '202310150010', target: '电视', value: '成品' },
-                { source: '202310150010', target: '电视遥控器失灵', value: '故障描述' },
-                { source: '202310150010', target: '家用电器', value: '系统' },
-                { source: '202310150010', target: '更换电池或遥控器', value: '维修策略' }
-              ]
-            }
-          }
-        }
+        const { code, data } = await handlerAsk(sendInput)
+        // const { code, data } = {
+        //   code: 200,
+        //   msg: '',
+        //   data: {
+        //     user_id: 'user',
+        //     answer: '解决办法为:更换电池或遥控器',
+        //     file_name: '排故手册',
+        //     ossID: '227701077942149120', //pdf
+        //     // ossID: '227692224508796928', //word
+        //     graph: {
+        //       data: [
+        //         { name: '202310150010', category: 'HMC' },
+        //         { name: '电视', category: '成品' },
+        //         { name: '电视遥控器失灵', category: '故障描述' },
+        //         { name: '家用电器', category: '系统' },
+        //         { name: '更换电池或遥控器', category: '维修策略' }
+        //       ],
+        //       links: [
+        //         { source: '202310150010', target: '电视', value: '成品' },
+        //         { source: '202310150010', target: '电视遥控器失灵', value: '故障描述' },
+        //         { source: '202310150010', target: '家用电器', value: '系统' },
+        //         { source: '202310150010', target: '更换电池或遥控器', value: '维修策略' }
+        //       ]
+        //     }
+        //   }
+        // }
 
         if (code == 200) {
-          // const newData = this.handleData(JSON.parse(data))
-          const newData = this.handleData(data)
+          const newData = this.handleData(JSON.parse(data))
+          // const newData = this.handleData(data)
           this.chatInfo.pop()
           this.chatInfo.push(newData)
           // this.getHistoryAll()
@@ -238,8 +238,8 @@ export default {
 
     handleData(data) {
       if (data.graph) {
-        // const graphData = eval('(' + data.graph + ')')
-        // data.graph = graphData
+        const graphData = eval('(' + data.graph + ')')
+        data.graph = graphData
         const categories = []
         data.graph.data.forEach((node) => {
           const flag = categories.find((item) => {

+ 105 - 107
src/views/als/knowledgeExtraction/extractList.vue

@@ -1,45 +1,47 @@
 <template>
   <div class="view-table-content">
     <div style="width: 100%">
-      <div class="view-dataType-title">
-        <div class="view-dataType-title-btn">
-          <el-button type="success" @click="openDialog()">上传文件</el-button>
-          <el-button type="warning" @click="remove(tableCheckItems)" :disabled="tableCheckItems.length == 0">删除</el-button>
-        </div>
-        <div class="view-dataType-title-search">
-          <el-input placeholder="请输入名称" v-model="keyWordData" class="input1">
-            <el-button slot="append" icon="el-icon-search" @click="searchClick"></el-button>
-          </el-input>
-        </div>
+      <div style="width: 80%; margin-left: 10%">
+        <!-- 分句、抽取、审核、入库 -->
+        <el-steps :active="active" finish-status="success" process-status="finish">
+          <!-- 需要判断分句中、抽取中、。。。。 -->
+          <el-step title="分句"></el-step>
+          <el-step title="抽取"></el-step>
+          <el-step title="审核"></el-step>
+          <el-step title="入库"></el-step>
+        </el-steps>
+      </div>
+      <div class="view-dataType-title-btn" style="float: right; margin: 10px">
+        <el-button v-if="active === 0" type="primary">返 回</el-button>
+        <el-button style="margin-right: 300px" v-if="active === 0" type="warning" @click="handleClause">分 句</el-button>
+        <el-button v-if="active === 1" type="warning" @click="handleExtract">抽 取</el-button>
+        <div style="clear: both"></div>
       </div>
       <div class="view-dataType-table">
-        <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
+        <div v-if="active === 0" style="width: 500px; margin: 50px 0px 0px 300px">
+          <el-form ref="taskFormRef" disabled :model="taskForm" label-width="80px">
+            <el-form-item label="任务名称" prop="taskName">
+              <el-input v-model="taskForm.taskName" />
+            </el-form-item>
+            <el-form-item label="抽取文件" prop="fileName">
+              <el-input v-model="taskForm.fileName" />
+            </el-form-item>
+          </el-form>
+        </div>
+
+        <LTable ref="table" v-if="active === 1" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="clauseColumns" :dataSource="clauseTableData" :options="clauseOptions" :pagination="clauseTableRequset"></LTable>
       </div>
       <!-- 添加或修改模型信息对话框 -->
-      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
-        <el-form ref="form" :model="form" label-width="80px">
-          <!-- <el-form-item label="文件名称" prop="fileName">
-            <el-input v-model="form.fileName" placeholder="请输入文件名称" />
+      <el-dialog :title="clauseDialogTitle" :visible.sync="clauseDialogVisible" width="600px" :before-close="handleClauseClose">
+        <el-form ref="clauseFormRef" :model="clauseForm" label-width="80px">
+          <el-form-item label="内容" prop="content">
+            <el-input type="textarea" :rows="2" v-model="clauseForm.content" />
           </el-form-item>
-          <el-form-item label="文件类型" prop="fileType">
-            <el-select v-model="form.fileType" placeholder="请选择文件类型">
-              <el-option v-for="item in fileTypeList" :key="item.key" :label="item.name" :value="item.key" />
-            </el-select>
-          </el-form-item> -->
-          <el-form-item label="选择抽取文件" label-width="100px" prop="file">
-            <el-select v-model="form.file" placeholder="请选择文件" @change="handleFile">
-              <el-option v-for="item in fileList" :key="item.ossId" :label="item.fileName" :value="item.ossId" />
-            </el-select>
-            <!-- <FileUpload v-model="form.ossId" :limit="1" :fileSize="500" :fileType="['docx', 'doc', 'pdf', 'txt']" /> -->
-          </el-form-item>
-          <!-- <el-form-item label="备注" prop="remarks">
-            <el-input type="textarea" :rows="2" v-model="form.remarks" placeholder="请输入备注" />
-          </el-form-item> -->
         </el-form>
 
         <span slot="footer" class="dialog-footer">
-          <el-button @click="handleClose">取 消</el-button>
-          <el-button type="primary" @click="submit">确 定</el-button>
+          <el-button @click="handleClauseClose">取 消</el-button>
+          <el-button type="primary" @click="clauseSubmit">确 定</el-button>
         </span>
       </el-dialog>
     </div>
@@ -47,7 +49,7 @@
 </template>
 
 <script>
-import { getknowledgeExtraction, addknowledgeExtraction, updateknowledgeExtraction, removeknowledgeExtraction } from '@/api/als/knowledgeExtraction'
+import { getTaskListAPI, addTaskAPI, getTaskInfoAPI, getClauseListAPI, updateClauseAPI, removeClauseAPI } from '@/api/als/knowledgeExtraction'
 import { getAtlasFile } from '@/api/als/atlasFile'
 import { getOssIdDataAPI } from '@/api/als/algorithm'
 import { deepClone, debounce } from '@/utils/index'
@@ -61,67 +63,61 @@ export default {
     return {
       dialogTitle: '新增',
       dialogVisible: false,
+      clauseDialogTitle: '编辑',
+      clauseDialogVisible: false,
       keyWordData: '',
       searchValue: '',
-      columns: [
+      clauseColumns: [
         {
-          prop: 'file',
-          label: '文件'
+          prop: 'content',
+          label: '内容'
         },
         {
           prop: 'status',
-          label: '文件名称'
+          label: '状态',
+          width: '240px',
+          render: (h, params) => {
+            return h('span', { class: 'success-state' }, '已分句')
+          }
         },
-        // {
-        //   prop: 'fileType',
-        //   label: '文件类型'
-        // },
-        // {
-        //   prop: 'ossId',
-        //   label: '文件编号'
-        // },
-        // {
-        //   prop: 'remarks',
-        //   label: '备注'
-        // },
         {
           button: true,
           label: '操作',
           width: '240px',
           group: [
             {
-              name: '查看抽取结果',
+              name: '编辑',
+              type: 'text',
+              round: false,
+              plain: false,
+              onClick: (row, index, scope) => {
+                this.clauseHandUpdate(row)
+              }
+            },
+            {
+              name: '删除',
               type: 'text',
               round: false,
               plain: false,
               onClick: (row, index, scope) => {
-                this.checkExtractList(row)
+                this.clauseRemove([row])
               }
             }
-            // {
-            //   name: '删除',
-            //   type: 'text',
-            //   round: false,
-            //   plain: false,
-            //   onClick: (row, index, scope) => {
-            //     this.remove([row])
-            //   }
-            // }
           ]
         }
       ],
-      options: {
+      clauseOptions: {
         stripe: true, // 斑马纹
-        mutiSelect: true, // 多选框
-        index: false, // 显示序号, 多选则 mutiSelect
+        mutiSelect: false, // 多选框
+        index: true, // 显示序号, 多选则 mutiSelect
         loading: false, // 表格动画
         initTable: false, // 是否一挂载就加载数据
         border: true,
-        height: 'calc(100vh - 300px)'
+        height: 'calc(100vh - 335px)'
       },
       tableCheckItems: [],
-      tableData: [],
-      tableRequset: {
+      clauseTableData: [{ content: 'XXXXXXXXX水水水水水水水' }, { content: 'mmmmmmmmmmmAAAAAAAAAAA' }],
+      clauseTableRequset: {
         total: 0,
         pageIndex: 1,
         pageSize: 10,
@@ -133,12 +129,21 @@ export default {
       },
       debounceFn: debounce(this.fetch, 500),
       fileList: [],
-      extractId: ''
+      extractId: '',
+      active: 0,
+      taskForm: {
+        id: '',
+        taskName: '任务名称',
+        fileName: '抽取文件'
+      },
+      clauseForm: {
+        content: ''
+      }
     }
   },
   watch: {
     keyWord() {
-      this.tableRequset.pageIndex = 1
+      this.clauseTableRequset.pageIndex = 1
       this.debounceFn()
     }
   },
@@ -171,12 +176,12 @@ export default {
     async getknowledgeExtractionAPI(params) {
       if (this.$refs.table) this.$refs.table.clearSelection()
       const { keyWord } = this
-      const { pageSize, pageIndex } = this.tableRequset
+      const { pageSize, pageIndex } = this.clauseTableRequset
       const {
         data: { list, total }
       } = await getknowledgeExtraction({ pageSize, pageNum: pageIndex, ...params })
-      this.tableData = list
-      this.tableRequset.total = total
+      this.clauseTableData = list
+      this.clauseTableRequset.total = total
     },
 
     fetch() {
@@ -187,24 +192,9 @@ export default {
       this.getknowledgeExtractionAPI({ name: keyWordData })
     },
 
-    async addknowledgeExtractionAPI() {
-      try {
-        delete this.form.aircaftModelName
-        const { code } = await addknowledgeExtraction({ ...this.form })
-        if (code === 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          this.handleClose()
-          this.getknowledgeExtractionAPI()
-        }
-      } catch (error) {}
-    },
-
     async updateknowledgeExtractionAPI() {
       try {
-        const { code } = await updateknowledgeExtraction({ ...this.form })
+        const { code } = await updateknowledgeExtraction({ ...this.clauseForm })
         if (code === 200) {
           this.$message({
             type: 'success',
@@ -218,36 +208,44 @@ export default {
 
     openDialog() {
       this.dialogTitle = '新增'
-      this.dialogVisible = true
+      this.clauseDialogVisible = true
     },
 
     handleClose() {
-      this.dialogVisible = false
-      this.form = {
+      this.taskForm = {
         id: '',
-        fileName: '',
-        fileType: '',
-        ossId: '',
-        status: '',
-        remarks: ''
+        taskName: '',
+        fileName: ''
       }
     },
 
-    handUpdate(row) {
-      this.dialogTitle = '编辑'
-      this.form = deepClone(row)
-      this.dialogVisible = true
+    handleClauseClose() {
+      this.clauseDialogVisible = false
+      this.clauseForm = {
+        content: ''
+      }
     },
 
-    submit() {
-      switch (this.dialogTitle) {
-        case '编辑':
-          this.updateknowledgeExtractionAPI()
+    handleClause() {
+      // 调用分句接口
+      this.active = 1
+    },
 
-          break
-        case '新增':
-          this.addknowledgeExtractionAPI()
+    handleExtract() {
+      // 调用抽取
+      this.active = 2
+    },
+
+    clauseHandUpdate(row) {
+      this.clauseDialogTitle = '编辑'
+      this.clauseForm = deepClone(row)
+      this.clauseDialogVisible = true
+    },
 
+    clauseSubmit() {
+      switch (this.clauseDialogTitle) {
+        case '编辑':
+          // this.updateknowledgeExtractionAPI()
           break
       }
     },
@@ -256,8 +254,8 @@ export default {
       this.tableCheckItems = val
     },
 
-    remove(row) {
-      this.$confirm('是否删除该模型', '提示', {
+    clauseRemove(row) {
+      this.$confirm('是否删除该数据', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'

Fichier diff supprimé car celui-ci est trop grand
+ 892 - 86
src/views/als/knowledgeExtraction/index.vue


+ 1 - 1
src/views/als/knowledgeManage/entityManage/index.vue

@@ -42,7 +42,7 @@ import { getEntityList, getAllEntityClass, addEntity, updateEntity, deleteEntity
 import { deepClone, debounce } from '@/utils/index'
 
 export default {
-  name: 'AtlasFile',
+  name: 'EntityManage',
   components: {},
   data() {
     // 这里存放数据

+ 120 - 20
src/views/als/lifePrediction/index.vue

@@ -21,13 +21,26 @@
         <LTable ref="table" @selection-change="selection" :defaultFetch="false" :fetch="fetch" :columns="columns" :dataSource="tableData" :options="options" :pagination="tableRequset"></LTable>
       </div>
       <!-- 添加或修改退化评估对话框 -->
-      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
-        <el-form ref="form" :model="form" label-width="80px">
+      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%" :before-close="handleClose">
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
           <el-form-item label="编目" prop="aircraftId">
             <el-select v-model="form.aircraftId" placeholder="请选择编目" @change="changeAircraftId(form.aircraftId)" disabled>
               <el-option v-for="item in aircaftCatalogAll" :key="item.aircaftCatalogId" :label="item.aircaftCatalogCode" :value="item.aircaftCatalogId"> </el-option>
             </el-select>
           </el-form-item>
+          <el-form-item label="架次号" prop="sortieNo">
+            <LTable
+              ref="sortieNoTableRef"
+              :defaultFetch="false"
+              :fetch="sortieNoFetch"
+              @selection-change="sortieNoSelection"
+              class="single-select-table"
+              :columns="sortieNoColumns"
+              :dataSource="sortieNoList"
+              :options="sortieNoOptions"
+              :pagination="SortieNoTableRequset"
+            ></LTable>
+          </el-form-item>
           <el-form-item label="部件" prop="partId">
             <treeselect noOptionsText="该机型暂无构型信息,请在构型管理中添加" :value="form.partId" :normalizer="normalizer" :options="partsData" :show-count="true" placeholder="请选择部件" @select="partIdSelect" />
           </el-form-item>
@@ -41,8 +54,8 @@
       <el-dialog title="执行进度" :visible.sync="progressVisible" width="800px" :before-close="handleClose">
         <el-progress :text-inside="true" :stroke-width="24" :percentage="percentage" status="success"></el-progress>
       </el-dialog>
-      <el-dialog title="结果展示" :visible.sync="resultVisible" width="800px">
-        展示结果
+      <el-dialog title="结果展示" :visible.sync="resultVisible" width="50%">
+        <el-image style="width: 500px" :src="resultUrl" :preview-src-list="[resultUrl]"></el-image>
         <span slot="footer" class="dialog-footer">
           <el-button @click="resultVisible = false">取 消</el-button>
           <el-button type="primary" @click="resultVisible = false">确 定</el-button>
@@ -62,6 +75,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import { getAirConfiguration } from '@/api/als/airConfiguration'
 import { handleTree } from '../utils/common'
 import { executeEvaluation } from '@/api/als/algorithm'
+import { getDataImport } from '@/api/als/dataImport'
 
 export default {
   name: 'LifePrediction',
@@ -125,17 +139,13 @@ export default {
           prop: 'status',
           label: '状态'
         },
-        {
-          prop: 'resultContent',
-          label: '结果'
-        },
         {
           button: true,
           label: '操作',
           width: '240px',
           group: [
             {
-              name: '查看',
+              name: '查看结果',
               type: 'text',
               round: false,
               plain: false,
@@ -172,6 +182,44 @@ export default {
         pageSize: 10,
         searchValue: ''
       },
+      sortieNoColumns: [
+        {
+          prop: 'sortieNo',
+          label: '架次号'
+        },
+        {
+          prop: 'source',
+          label: '数据来源',
+          render: (h, params) => {
+            if (params.row.source == 1) {
+              return h('span', { class: 'success-state' }, '飞参数据')
+            } else {
+              return h('span', { class: 'success-state' }, 'MDC数据')
+            }
+          }
+        },
+        {
+          prop: 'ossId',
+          label: '文件Id'
+        }
+      ],
+      sortieNoOptions: {
+        stripe: true, // 斑马纹
+        mutiSelect: true, // 多选框
+        index: true, // 显示序号, 多选则 mutiSelect
+        loading: false, // 表格动画
+        initTable: false, // 是否一挂载就加载数据
+        border: true,
+        height: '250px'
+      },
+      SortieNoTableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      },
+      sortieNoList: [],
+      sortieNoCheckItems: [],
       form: {
         id: '',
         aircraftId: '',
@@ -182,12 +230,23 @@ export default {
         model: '',
         methodType: '',
         status: '',
-        resultContent: ''
+        resultContent: '',
+        ossIds: []
       },
       debounceFn: debounce(this.fetch, 500),
       aircaftCatalogAll: [],
       percentage: 0,
-      partsData: []
+      partsData: [],
+      // executeForm: {
+      //   sortieNo: '',
+      //   aircraftId: '',
+      //   partId: ''
+      // },
+      rules: {
+        aircraftId: [{ required: true, message: '编目不能为空', trigger: 'change' }],
+        partId: [{ required: true, message: '部件不能为空', trigger: 'change' }]
+      },
+      resultUrl: ''
     }
   },
   watch: {
@@ -266,8 +325,30 @@ export default {
       this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
     },
 
+    sortieNoFetch() {
+      this.getAirDataAPI({ aircraftId: this.currentNode.id })
+    },
+
+    async sortieNoSelection(val) {
+      this.sortieNoCheckItems = val
+    },
+
+    async getAirDataAPI(params) {
+      this.sortieNoCheckItems = []
+      try {
+        if (this.$refs.sortieNoTableRef) this.$refs.sortieNoTableRef.clearSelection()
+        const { keyWord } = this
+        const { pageSize, pageIndex } = this.SortieNoTableRequset
+        const {
+          data: { list, total }
+        } = await getDataImport({ pageSize, pageNum: pageIndex, ...params, source: 1 })
+        this.sortieNoList = list
+        this.SortieNoTableRequset.total = total
+      } catch (error) {}
+    },
+
     async searchClick() {
-      this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList })
+      this.getLifePredictionAPI({ aircraftId: this.aircaftModelIdList, name: this.keyWordData })
     },
 
     treeNodeClick(data) {
@@ -282,7 +363,9 @@ export default {
 
     openDialog() {
       const aircraftType = this.currentNode.parentId
+      this.form.aircraftId = this.currentNode.id
       this.getAirConfigurationAPI({ aircraftType })
+      this.getAirDataAPI({ aircraftId: this.currentNode.id })
       this.dialogTitle = '新增'
       this.dialogVisible = true
     },
@@ -311,14 +394,27 @@ export default {
         model: '',
         methodType: '',
         status: '',
-        resultContent: ''
+        resultContent: '',
+        ossIds: []
       }
     },
     checkResult(row) {
       // this.form = deepClone(row)
+      this.resultUrl = row.resultContent
       this.resultVisible = true
     },
     async beginExecute() {
+      this.sortieNoCheckItems.forEach((item) => {
+        this.form.ossIds.push(item.ossId)
+      })
+      console.log('333', this.form)
+      if (this.sortieNoCheckItems.length == 0) {
+        this.$message({
+          type: 'success',
+          message: '请选择架次号!'
+        })
+        return
+      }
       this.progressVisible = true
 
       let myTimer = setInterval(() => {
@@ -363,13 +459,17 @@ export default {
     },
 
     submit() {
-      switch (this.dialogTitle) {
-        case '编辑':
-          break
-        case '新增':
-          this.beginExecute()
-          break
-      }
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          switch (this.dialogTitle) {
+            case '编辑':
+              break
+            case '新增':
+              this.beginExecute()
+              break
+          }
+        }
+      })
     },
 
     selection(val) {

+ 1 - 1
src/views/als/model/index.vue

@@ -297,7 +297,7 @@ export default {
     },
 
     async searchClick() {
-      this.getModelAPI({ name: keyWordData })
+      this.getModelAPI({ name: this.keyWordData })
     },
 
     async addModelAPI() {

+ 13 - 1
src/views/als/utils/enum-data.js

@@ -10,8 +10,20 @@ export const agloModelList = [
   { key: '6', name: '退化评估' }
 ]
 
+// 抽取状态
+export const extractStatus = [
+  { key: '0', name: '待分句', colorType: 'info-state' },
+  { key: '1', name: '分句中', colorType: 'info-state' },
+  { key: '2', name: '待抽取', colorType: 'warning-state' },
+  { key: '3', name: '抽取中', colorType: 'warning-state' },
+  { key: '4', name: '审核中', colorType: 'danger-state' },
+  { key: '5', name: '入库中', colorType: 'danger-state' },
+  { key: '6', name: '已入库', colorType: 'success-state' }
+]
+
 const enumData = {
-  agloModelList
+  agloModelList,
+  extractStatus
 }
 
 // 第一种方法: 集体导出 并注入到全局变量

+ 2 - 2
src/views/basicData/dataAircraftCataloging/index.vue

@@ -184,10 +184,10 @@ export default {
       const { keyWord } = this
       const { pageSize, pageIndex } = this.tableRequset
       const {
-        data: { list, totalCount }
+        data: { list, total }
       } = await getAircaftCatalog({ pageSize, pageIndex, keyWord, ...params })
       this.tableData = list
-      this.tableRequset.total = totalCount
+      this.tableRequset.total = total
     },
 
     fetch() {

+ 5 - 5
src/views/carrierStandard/carrierComputationalModel/index.vue

@@ -31,11 +31,11 @@
         </el-table-column>
         <el-table-column label="操作" align="center" width="300">
           <template slot-scope="scope">
-            <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
-            <el-button @click="remove(scope.row)" type="text" size="small">删除</el-button>
-            <el-button :disabled="scope.row.status == 1" @click="updateState(scope.row, '启用')" type="text" size="small">启用</el-button>
-            <el-button :disabled="scope.row.status == 0" @click="updateState(scope.row, '禁用')" type="text" size="small">禁用</el-button>
-            <el-button @click="openDrawer(scope.row)" type="text" size="small">历史版本</el-button>
+            <el-button :disabled="scope.row.isEdit == 0" @click="edit(scope.row)" type="text" size="small">编辑</el-button>
+            <el-button :disabled="scope.row.isEdit == 0" @click="remove(scope.row)" type="text" size="small">删除</el-button>
+            <el-button :disabled="scope.row.status == 1 || scope.row.isEdit == 0" @click="updateState(scope.row, '启用')" type="text" size="small">启用</el-button>
+            <el-button :disabled="scope.row.status == 0 || scope.row.isEdit == 0" @click="updateState(scope.row, '禁用')" type="text" size="small">禁用</el-button>
+            <el-button :disabled="scope.row.isEdit == 0" @click="openDrawer(scope.row)" type="text" size="small">历史版本</el-button>
           </template>
         </el-table-column>
       </el-table>

+ 2 - 2
src/views/carrierStandard/carrierListShipping/components/compile/index.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="view-CarrierListMachineryPreparation-c">
     <div class="view-CarrierListMachineryPreparation-box">
-      <div class="view-CarrierListMachineryPreparation-box-left">
+      <!-- <div class="view-CarrierListMachineryPreparation-box-left">
         <el-radio-group v-model="summarizing">
           <el-radio-button label="汇总数据"></el-radio-button>
           <el-radio-button label="原数据"></el-radio-button>
         </el-radio-group>
-      </div>
+      </div> -->
 
       <div class="view-CarrierListMachineryPreparation-box-right">
         <MissionDetail :detail="detail" />

+ 17 - 6
src/views/home/index.vue

@@ -29,10 +29,10 @@
       </el-col>
     </el-row>
     <el-row>
-      <el-col :span="24" style="margin-bottom: 15px">
+      <el-col :span="24" style="margin-bottom: 65px">
         <Card title="维修状态">
           <template slot="content">
-            <LTable ref="maintainTable" :defaultFetch="true" :columns="maintainColumns" :dataSource="maintainTableData" :options="maintainOptions" :fetch="maintainFetchTableData" class="tabl-box" />
+            <LTable ref="maintainTable" :defaultFetch="true" :columns="maintainColumns" :dataSource="maintainTableData" :options="maintainOptions" :fetch="maintainFetchTableData" :pagination="tableRequset" class="tabl-box" />
           </template>
         </Card>
       </el-col>
@@ -90,7 +90,7 @@
 
 <script>
 import { getHomeLastMission, getAviationList, getHomeAviationProject, getHomeAviationAmount, getHomeAviationMoney } from '@/api/home'
-import { getFaultStatisticsListAll } from '@/api/als/faultStatistics'
+import { getFaultStatisticsListAll, getFaultStatistics } from '@/api/als/faultStatistics'
 import { getAircaftCatalogAll } from '@/api/als/aircraft'
 
 import * as echarts from 'echarts'
@@ -119,7 +119,13 @@ export default {
       bottomCenterOptions,
       bottomRightOptions,
       imgUrl: require('@/assets/images/飞机.png'),
-      aircaftCatalogAll: []
+      aircaftCatalogAll: [],
+      tableRequset: {
+        total: 0,
+        pageIndex: 1,
+        pageSize: 10,
+        searchValue: ''
+      }
     }
   },
   mounted() {
@@ -149,8 +155,13 @@ export default {
       this.fetchIndexAnalysis()
     },
     async maintainFetchTableData() {
-      const { data } = await getFaultStatisticsListAll({})
-      this.maintainTableData = data.filter((item) => {
+      const { pageSize, pageIndex } = this.tableRequset
+      const {
+        data: { list, total }
+      } = await getFaultStatistics({ pageSize, pageIndex })
+      // const { data } = await getFaultStatisticsListAll({})
+      this.tableRequset.total = total
+      this.maintainTableData = list.filter((item) => {
         return item.repairStatus !== '已完成'
       })
       // this.getAircaftCatalogAllAPI()

+ 1 - 1
vue.config.js

@@ -16,7 +16,7 @@ module.exports = defineConfig({
         }
       },
       ['/api/kgqa']: {
-        target: 'http://192.168.0.103:8000',
+        target: 'http://192.168.0.106:7073',
         ws: false,
         changeOrigin: true,
         pathRewrite: {

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff