ソースを参照

Merge remote-tracking branch 'origin/master'

ljz 1 ヶ月 前
コミット
4da3a41787

+ 20 - 7
src/api/xjc-integratedmachine/environment/ai-career.js

@@ -7,18 +7,30 @@ export function getHotOccupationList(data) {
         params : data
     })
 }
-export function getCareerChatRecordList(data) {
+
+export function getOccupationByKeyword(data) {
     return request({
-        url: '/ai/career/chat/record/list',
+        url: '/integratedmachine/tsytj/occupation/getOccupationByKeyword',
+        method: 'post',
+        data : data
+    })
+}
+
+// 聊天历史
+export function getCareerOccupationList(data) {
+    return request({
+        url: '/ai/career/occupation/list',
         method: 'get',
         params : data
     })
 }
-export function getOccupationByKeyword(data) {
+
+// 聊天记录
+export function getCareerChatRecordList(data) {
     return request({
-        url: '/integratedmachine/tsytj/occupation/getOccupationByKeyword',
-        method: 'post',
-        data : data
+        url: '/ai/career/chat/record/list',
+        method: 'get',
+        params : data
     })
 }
 
@@ -38,4 +50,5 @@ export function getQuestionBankList(data) {
         method: 'get',
         params : data
     })
-}
+}
+

+ 37 - 0
src/api/xjc-integratedmachine/environment/common.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+
+// 获取对比实体
+export function getCompareList(data) {
+    return request({
+        url: '/integratedmachine/smo/compare/list',
+        method: 'get',
+        params : data
+    })
+}
+
+// 添加对比
+export function addCompare(data) {
+    return request({
+        url: '/integratedmachine/smo/compare/add',
+        method: 'post',
+        data : data
+    })
+}
+
+// 删除对比
+export function removeBybusinessId(data) {
+    return request({
+        url: '/integratedmachine/smo/compare/removeBybusinessId',
+        method: 'post',
+        data : data
+    })
+}
+
+// 获取对比数量
+export function getCompareSize(data) {
+    return request({
+        url: '/integratedmachine/smo/compare/size',
+        method: 'get',
+        params : data
+    })
+}

+ 17 - 0
src/api/xjc-integratedmachine/plan/careeplan.js

@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+
+export function careerplan(data) {
+    return request({
+        url: '/integratedmachine/careerplan/careerplan',
+        method: 'post',
+        data : data
+    })
+}
+export function doSaveCareerplan(data) {
+    return request({
+        url: '/integratedmachine/careerplan/doSaveCareerplan',
+        method: 'post',
+        data : data
+    })
+}
+

+ 19 - 18
src/views/xjc-integratedmachine/environment/ai_interview/ai_career_interview.vue

@@ -13,7 +13,7 @@
                                     @input="byKeyword"
                             >
                                 <template #suffix>
-                                    <span style="font-size: 38px;color: #444040;margin-left: 37px;">
+                                    <span style="font-size: 38px;color: #444040;margin-left: 37px;cursor: pointer" @click="clearInput">
                                       X
                                     </span>
                                 </template>
@@ -47,21 +47,9 @@
                         <div class="hot-search">
                             <div class="title">历史查询:</div>
                             <div class="content">
-                                <div class="search-item">计算机软件工程技术人员</div>
-                                <div class="search-item">教师</div>
-                                <div class="search-item">心理咨询师</div>
-                                <div class="search-item">实施运维工程师</div>
-                                <div class="search-item">计算机软件工程技术人员</div>
-                                <div class="search-item">计算机软件工程技术人员</div>
-                                <div class="search-item">计算机软件工程技术人员</div>
-                                <div class="search-item">计算机软件工程技术人员</div>
-                                <div class="search-item">教师</div>
-                                <div class="search-item">心理咨询师</div>
-                                <div class="search-item">实施运维工程师</div>
-                                <div class="search-item">计算机软件工程技术人员</div>
-                                <div class="search-item">计算机软件工程技术人员</div>
-                                <div class="search-item">计算机软件工程技术人员</div>
-                                <div class="search-item">计算机软件工程技术人员</div>
+                                <div class="search-item" v-for="(item, index) in occupationHistoryList" :key="index" @click="hotToChatPage(item)">
+                                    {{item.occupationName}}
+                                </div>
                             </div>
                         </div>
                     </div>
@@ -79,7 +67,7 @@
     import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
     import Drag_component from "@/views/xjc-integratedmachine/components/drag_component.vue";
     const headinfo = ref({})
-    import {getOccupationByKeyword, getHotOccupationList} from "@/api/xjc-integratedmachine/environment/ai-career.js";
+    import {getOccupationByKeyword, getHotOccupationList, getCareerOccupationList} from "@/api/xjc-integratedmachine/environment/ai-career.js";
 
     const router = useRouter()
 
@@ -91,7 +79,8 @@
     const occupationList = ref([])
     // 热门职业列表
     let hotOccupationList = ref([])
-
+    // 历史对话职业
+    let occupationHistoryList = ref([])
 
     function setHeadinfo(){
         headinfo.value = {
@@ -104,6 +93,11 @@
         }
     }
 
+    // 清除输入框
+    function clearInput(){
+        form.value.name = '';
+    }
+
     // 定义一个函数,用于将关键词变为红色
     function highlightKeywords(text, keywords) {
         // 遍历关键词列表
@@ -171,9 +165,16 @@
         })
     }
 
+    function getChatOccupationHistoryList(){
+        getCareerOccupationList().then(resp => {
+            occupationHistoryList.value = resp.rows
+        })
+    }
+
     onMounted(() => {
         setHeadinfo()
         getHotOccupation()
+        getChatOccupationHistoryList()
     })
 
 </script>

+ 94 - 22
src/views/xjc-integratedmachine/environment/ai_interview/ai_career_interview_chat.vue

@@ -9,7 +9,7 @@
                 <p>访谈时你可以提出以下问题:</p>
             </div>
             <div class="question-list">
-                <p class="question-list-item" v-for="(item, index) in questionBankList" :key="index" @click="quickSendMsg(item)">
+                <p class="question-list-item" v-for="(item, index) in questionBankList" :key="index" @click="sendRequest(item.question)">
                     {{index+1}}.{{item.question}}
                 </p>
             </div>
@@ -50,8 +50,9 @@
                                         <div v-show="expandIndexList.includes(index)" v-html="item.content"  class="content-text"></div>
                                     </div>
                                 </div>
-                                <div style="margin: 4px">
-                                    <el-text>{{item.createTime}}</el-text>
+                                <div style="margin: 4px;display: flex;align-items: center">
+                                    <p><el-text>{{item.createTime}}</el-text></p>
+                                    <p style="margin-left: 1vw"><el-text>数据来源于AI,仅供参考</el-text></p>
                                 </div>
                             </div>
                             <div v-if="index !== chatRecordList.length-1">
@@ -74,17 +75,30 @@
                     </div>
                 </div>
             </div>
+            <div class="question-tip-box" ref="questionTipBoxRef" v-if="showQuestionTipBoxFlag">
+                <div>
+                    <div style="display: flex;justify-content: space-between;align-items: center">
+                        <div class="tip-title">你可以选择以下问题</div>
+                        <div>X</div>
+                    </div>
+                    <div style="display: flex;align-items: center;flex-wrap: wrap">
+                        <div class="tip-item" v-for="(item, index) in questionBankByKeywordList" :key="index" @click="tipSendRequest(item.question)">
+                            {{index+1}}.{{item.question}}
+                        </div>
+                    </div>
+                </div>
+            </div>
             <div class="input-component">
                 <div class="input-search">
                     <el-input
                             v-model="inputMessage"
                             style="width: 1220px;height: 84px"
-                            type="textarea"
                             placeholder="请输入消息"
+                            @input="getQuestionBankByKeyword"
                             @keyup.enter="sendMessage"
                     >
                         <template #suffix>
-                                    <span style="font-size: 38px;color: #444040;margin-left: 37px;">
+                                    <span style="font-size: 38px;color: #444040;margin-left: 37px;cursor: pointer" @click="clearInput">
                                       X
                                     </span>
                         </template>
@@ -147,9 +161,14 @@
     // 播放按钮状态
     let playActiveIndex = ref(0)
     let playButtonFlag = ref(false)
-    // 推荐问题
+    // 左侧推荐问题
     let questionBankList = ref([])
+    // 关键词提示问题
+    let questionBankByKeywordList = ref([])
 
+    // 显示提示
+    let showQuestionTipBoxFlag = ref(false)
+    // 提示信息
     const HELLO_MSG = '你是谁?'
     // 查看所有聊天记录
     function list() {
@@ -184,19 +203,20 @@
         })
     }
 
+    // 第一次聊天发送消息
     function sayHi() {
- /*       const botMsg = {
-            isUser: true,
-            content: '',
-            isTyping: false
-        }
-        chatRecordList.value.push(botMsg);*/
-
         sendRequest(HELLO_MSG)
     }
 
-    function quickSendMsg(item){
-        sendRequest(item.question);
+    // 清除输入框
+    function clearInput(){
+        inputMessage.value = '';
+    }
+
+    // 在关键词搜索页点击发送问题
+    function tipSendRequest(content){
+        sendRequest(content);
+        showQuestionTipBoxFlag.value = false
     }
 
     const sendMessage = () => {
@@ -755,22 +775,42 @@
         router.go(-1)
     }
 
-    function getQuestionBank(){
+    function getRecommendQuestionBank(){
         let form = {
             type: 1,
-            isRecommend: 1
+            isRecommend: 1,
+            pageNum: 1,
+            pageSize: 10000
         }
         getQuestionBankList(form).then(resp => {
             questionBankList.value = resp.rows
         })
     }
 
+    function getQuestionBankByKeyword(){
+        let form = {
+            type: 1,
+            pageNum: 1,
+            pageSize: 10000,
+            keyword: inputMessage.value
+        }
+        getQuestionBankList(form).then(resp => {
+            if(resp.rows && resp.rows.length >0){
+                showQuestionTipBoxFlag.value = true
+                questionBankByKeywordList.value = resp.rows
+            }else{
+                showQuestionTipBoxFlag.value = false
+            }
+
+        })
+    }
+
     onMounted(()=>{
         nextTick(()=>{
             initSpeechRecognition();
             initSpeechSynthesis();
             list();
-            getQuestionBank();
+            getRecommendQuestionBank();
         })
 
     })
@@ -987,7 +1027,7 @@
             }
 
             ::v-deep .el-input__wrapper {
-                background: #E2E2E2;
+                background-color: #F5F9FA;;
                 box-shadow: none;
                 height: 84px;
                 width: 1220px;
@@ -1009,7 +1049,7 @@
     }
     .iat-box-default{
         position: absolute;
-        right: 10vw;
+        right: 97px;
         top:50vh;
         display: flex;
         justify-content: center;
@@ -1027,7 +1067,39 @@
             width: 150px;
         }
     }
-    .iat-box-active{
-
+    .question-tip-box{
+        width: 1346px;
+        height: 100px;
+        overflow: auto;
+        z-index: 10;
+        position: absolute;
+        right: 68px;
+        bottom: 100px;
+
+        .tip-title{
+            font-weight: 400;
+            font-size: 24px;
+            color: #000000;
+            line-height: 40px;
+            text-align: left;
+            font-style: normal;
+            text-transform: none;
+        }
+        .tip-item{
+            height: 41px;
+            background: #E9FBFF;
+            border-radius: 35px 35px 35px 35px;
+            border: 1px solid #8CE349;
+            padding: 0 20px;
+            font-weight: 400;
+            font-size: 24px;
+            color: #7D7C7C;
+            line-height: 40px;
+            text-align: left;
+            font-style: normal;
+            text-transform: none;
+            cursor: pointer;
+        }
     }
+
 </style>

ファイルの差分が大きいため隠しています
+ 285 - 0
src/views/xjc-integratedmachine/plan/develop_career_plan1.vue


+ 18 - 3
src/views/xjc-integratedmachine/plan/index.vue

@@ -1,11 +1,26 @@
 <template>
     规划管理首页
+
+    <el-button @click="jumpTo('/xjc-integratedmachine/plan/develop_career_plan1')">制定生涯规划书</el-button>
+    <el-button>目标管理</el-button>
+    <el-button>时间管理</el-button>
+    <el-button>自控测评力</el-button>
+    <el-button>生涯成熟度复测</el-button>
+
+
 </template>
 
-<script>
-    export default {
-        name: "index"
+<script setup>
+    const router = useRouter()
+    function jumpTo(path) {
+        router.push({
+            path: path,
+        })
     }
+
+
+
+
 </script>
 
 <style scoped>