| | |
| | | :data="displayTableData" |
| | | highlight-current-row |
| | | > |
| | | <!-- <el-table-column type="expand" fixed="left"> |
| | | <template #default="scope"> |
| | | <div class="px-4"> |
| | | <h3 class="mb-2">页面参数</h3> |
| | | <JsonEditor currentMode="view" :modelValue="scope.row.args" /> |
| | | </div> |
| | | </template> |
| | | </el-table-column> --> |
| | | <!-- <el-table-column prop="id" label="id" width="130" fixed="left" show-overflow-tooltip> </el-table-column> --> |
| | | |
| | | <el-table-column prop="title" label="标题" width="300" fixed="left" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column prop="prompt" label="提示词" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column prop="prompt" label="提示词" width="300" show-overflow-tooltip> </el-table-column> |
| | | |
| | | <el-table-column label="创建人" prop="creator" width="100" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column label="创建时间" prop="create_time" width="105" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column label="更新时间" prop="update_time" width="105" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column label="发布状态" prop="published" width="85" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ supervisorPublishedMap[scope.row.published] }} |
| | | <el-tag :type="scope.row.published === SupervisorPublished.Y ? 'primary' : 'info'">{{ |
| | | supervisorPublishedMap[scope.row.published] |
| | | }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | <el-table-column label="操作" width="200" fixed="right" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <div class="space-x-3 items-center flex"> |
| | | <el-tooltip effect="dark" content="SQL编辑" placement="top"> |
| | | <i class="ywifont ywicon-sql !text-[14px] text-blue-400 cursor-pointer" @click="editSqlClick(scope.row)"></i> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="AMIS低代码编辑" placement="top"> |
| | | <i class="ywifont ywicon-didaima !text-[21px] text-blue-400 cursor-pointer" @click="gotoAmisPage(scope.row)"></i> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="数据对接" placement="top"> |
| | | <i class="ywifont ywicon-sjdj !text-[17px] text-blue-400 cursor-pointer" @click="editSqlClick(scope.row)"></i> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip effect="dark" content="对话测试" placement="top"> |
| | | <i class="ywifont ywicon-ceshi !text-[20px] text-blue-400 cursor-pointer" @click="openChatTest(scope.row)"></i> |
| | | </el-tooltip> |
| | |
| | | <el-dialog |
| | | :destroy-on-close="true" |
| | | v-model="moduleDialogIsShow" |
| | | width="400" |
| | | width="300" |
| | | :close-on-click-modal="false" |
| | | @closed="closeModuleDialog" |
| | | > |
| | |
| | | </template> |
| | | </el-dialog> |
| | | </AHMContainer> |
| | | <SqlAmisEdit v-else :supervisor="sqlEditMapSupervisor" @backLastPage="backLastPage" @updatePublished="updatePublishedById"></SqlAmisEdit> |
| | | <SqlAmisEdit |
| | | v-else |
| | | :supervisor="sqlEditMapSupervisor" |
| | | @backLastPage="backLastPage" |
| | | @updatePublished="updatePublishedById" |
| | | ></SqlAmisEdit> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | import { useCompRef } from '/@/utils/types'; |
| | | import { convertListToTree } from '/@/utils/util'; |
| | | |
| | | import axios, { CancelTokenSource } from 'axios'; |
| | | import * as supervisorGroupApi from '/@/api/supervisorAdmin/supervisorGroup'; |
| | | import LeftTreeByMgr from '/@/components/tree/leftTreeByMgr.vue'; |
| | | import AHMContainer from '/@/components/layout/AHMContainer.vue'; |
| | | import LeftTreeByMgr from '/@/components/tree/leftTreeByMgr.vue'; |
| | | import { useUpdateData } from '/@/hooks/useUpdateData'; |
| | | |
| | | //#region ====================== 左侧树数据,tree init ====================== |
| | | const leftTreeRef = ref(null); |
| | | const leftTreeRef = useCompRef(LeftTreeByMgr); |
| | | const treeLoading = ref(false); |
| | | const listData = ref([]); |
| | | const currentListID = computed(() => currentNode.value?.id); |
| | |
| | | ElMessage.success('删除成功!'); |
| | | const foundIndex = listData.value.findIndex((item) => row.id === item.id); |
| | | listData.value.splice(foundIndex, 1); |
| | | if(listData.value.length>0){ |
| | | currentNode.value = listData.value[foundIndex]; |
| | | if (listData.value.length > 0) { |
| | | handleClickNode(listData.value[foundIndex]); |
| | | } |
| | | }); |
| | | }; |
| | |
| | | const newNode = { |
| | | ...moduleDialogFormValue.value, |
| | | id: res.group_id, |
| | | parent:moduleDialogFormValue.value.parent_id |
| | | } |
| | | Reflect.deleteProperty(newNode,'parent_id'); |
| | | parent: moduleDialogFormValue.value.parent_id, |
| | | }; |
| | | Reflect.deleteProperty(newNode, 'parent_id'); |
| | | listData.value.push(newNode); |
| | | currentNode.value = newNode; |
| | | handleClickNode(newNode); |
| | | moduleDialogIsShow.value = false; |
| | | ElMessage.success('添加页面分组成功'); |
| | | } |
| | |
| | | |
| | | const backLastPage = () => { |
| | | supervisorMgrShow.value = true; |
| | | nextTick(() => { |
| | | leftTreeRef.value?.treeRef.setCurrentKey(currentListID.value); |
| | | }); |
| | | }; |
| | | //#endregion |
| | | |
| | |
| | | |
| | | nextTick(() => { |
| | | chatRef.value.clear(); |
| | | chatRef.value.autoSend(row.prompt); |
| | | setTimeout(() => { |
| | | chatRef.value.autoSend(row.prompt); |
| | | }, 30); |
| | | }); |
| | | }; |
| | | |
| | |
| | | }, |
| | | }); |
| | | |
| | | const questionAi = async (text) => { |
| | | const questionAi = async (text, sourceObj: { source: CancelTokenSource }) => { |
| | | const currentSource = axios.CancelToken.source(); |
| | | sourceObj.source = currentSource; |
| | | const res = await checkSupervisorValidate( |
| | | { |
| | | id: chatTestMapRow.value.id, |
| | |
| | | }, |
| | | { |
| | | loading: false, |
| | | cancelToken: currentSource.token, |
| | | } |
| | | ); |
| | | return res; |
| | |
| | | useUpdateData({ |
| | | event: 'supervisor.publish', |
| | | updateFun({ id, published }) { |
| | | |
| | | updatePublishedById(id, published); |
| | | }, |
| | | }); |