wujingjing
2024-10-09 b0b31b379cfb6e57ffc14b3d8804256df25a1ac3
src/views/project/yw/systemManage/metricAgentMgr/MetricAgentMgr.vue
@@ -27,20 +27,15 @@
               <el-table-column type="expand" fixed="left">
                  <template #default="scope">
                     <div class="ml-16">
                        <h3 >指标页面</h3>
                        <h3>指标页面</h3>
                        <div v-if="scope.row.supervisor">
                           <div class="py-3">页面提示词:<span class="">{{scope.row.supervisor.prompt}}</span></div>
                           <el-table class="w-2/3 " :data="scope.row.supervisor.args" border>
                              <el-table-column prop="name" label="名称" show-overflow-tooltip>
                              </el-table-column>
                              <el-table-column prop="prompt" label="参数提示词" show-overflow-tooltip>
                              </el-table-column>
                              <el-table-column prop="check" label="缺省值" show-overflow-tooltip>
                              </el-table-column>
                           <div class="py-3">
                              页面提示词:<span class="">{{ scope.row.supervisor.prompt }}</span>
                           </div>
                           <el-table class="w-2/3" :data="scope.row.supervisor.args" border>
                              <el-table-column prop="name" label="名称" show-overflow-tooltip> </el-table-column>
                              <el-table-column prop="prompt" label="参数提示词" show-overflow-tooltip> </el-table-column>
                              <el-table-column prop="check" label="缺省值" show-overflow-tooltip> </el-table-column>
                           </el-table>
                        </div>
                     </div>
@@ -68,7 +63,10 @@
                           <i class="ywifont ywicon-tishici !text-[21px] text-blue-400 cursor-pointer" @click="openCopyPrompt(scope.row)"></i>
                        </el-tooltip>
                        <el-tooltip effect="dark" content="查看指标名称" placement="top">
                           <i class="ywifont ywicon-zhibiao !text-[17px] text-blue-400 cursor-pointer" @click="openMetricNameDlg(scope.row)"></i>
                           <i
                              class="ywifont ywicon-zhibiao !text-[17px] text-blue-400 cursor-pointer"
                              @click="openMetricNameDlg(scope.row)"
                           ></i>
                        </el-tooltip>
                        <el-tooltip effect="dark" content="对话测试" placement="top">
@@ -142,7 +140,6 @@
<script setup lang="ts">
import { useDraggable } from '@vueuse/core';
import { deleteCurrentRow } from '/@/utils/util';
import { onMounted, ref } from 'vue';
import { usePageDisplay } from '/@/hooks/usePageDisplay';
@@ -151,19 +148,16 @@
// import { useValidateUniqueness } from '/@/hooks/useValidateUniqueness';
import { ElMessage } from 'element-plus';
import { nextTick } from 'vue';
import OptDlg from './optDlg/OptDlg.vue';
import * as metricApi from '/@/api/metric';
import { checkSupervisorValidate, updatePublishStatus } from '/@/api/supervisorAdmin';
import * as metricApi from '/@/api/metrics';
import { updatePublishStatus } from '/@/api/supervisorAdmin';
import Chat from '/@/components/chat/Chat.vue';
import { gotoRoute } from '/@/utils/route';
import { useCompRef } from '/@/utils/types';
import axios, { CancelTokenSource } from 'axios';
import HMContainer from '/@/components/layout/HMContainer.vue';
import { useUpdateData } from '/@/hooks/useUpdateData';
import { SupervisorPublished, supervisorPublishedMap } from '../../lowCode/sqlAmis/types';
import MetricPrompt from './optDlg/MetricPrompt.vue';
import MetricName from './optDlg/MetricName.vue';
import MetricPrompt from './optDlg/MetricPrompt.vue';
import HMContainer from '/@/components/layout/HMContainer.vue';
//#region ====================== 表格数据,table init ======================
const tableLoading = ref(false);
@@ -174,7 +168,7 @@
   const res = await metricApi.getMetricAgentListByPost();
   allTableData.value = (res.values || []).map((item) => {
      item.create_time = item.create_time?.slice(0, 10);
      return item;
   });
   tableData.value = res?.values ?? [];