已删除4个文件
已修改8个文件
988 ■■■■ 文件已修改
src/api/model/sche/model/index.ts 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/model/sche/suggest/suggestSnapshotRecord.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ai/questionparamsetting/QuestionParamSettingForm.vue 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ai/questionparamsetting/index.vue 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ai/questiontemplate/QuestionTemplateForm.vue 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ai/questiontemplate/index.vue 274 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/model/sche/snapshotConf/det/configDetForm.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/model/sche/snapshotConf/det/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/model/sche/snapshotConf/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/model/sche/suggest/index.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/model/sche/suggest/suggestOperationRecord.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/model/sche/suggest/suggestSnapshot.vue 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/model/sche/model/index.ts
@@ -94,8 +94,32 @@
  predictItemList.value = await PredictItemApi.getMmPredictItemList({
    status: CommonEnabled.ENABLE
  })
  predictItemList.value = predictItemList.value.filter(e => e.outPuts && e.outPuts.length > 0);
  const allPredictItemList = []
  const predictAllItemList = predictItemList.value;
  if (predictAllItemList && predictAllItemList.length > 0) {
    // 过滤掉本身
    predictAllItemList.filter(e => e.id !== id).forEach(item => {
      allPredictItemList.push(
        {
          value: item.id,
          label:  item.itemname,
          predictlength: item.predictlength,
          moduleid: item.moduleid,
          children: item.outPuts?.map(e => {
            return {
              value: e.id,
              label: e.resultName
            }
          })
        }
      )
    })
  }
  const normalItemList = []
  const predictNormalItemList = predictItemList.value.filter(e => e.itemtypename === 'NormalItem' && e.outPuts && e.outPuts.length > 0);
  const predictNormalItemList = predictItemList.value.filter(e => e.itemtypename === 'NormalItem');
  if (predictNormalItemList && predictNormalItemList.length > 0) {
    // 过滤掉本身
    predictNormalItemList.filter(e => e.id !== id).forEach(item => {
@@ -132,7 +156,7 @@
    })
  }
  const predictMergeItemList = predictItemList.value.filter(e => e.itemtypename === 'MergeItem' && e.outPuts && e.outPuts.length > 0);
  const predictMergeItemList = predictItemList.value.filter(e => e.itemtypename === 'MergeItem');
  const mergeItemList = []
  if (predictMergeItemList && predictMergeItemList.length > 0) {
    // 过滤掉本身
@@ -165,6 +189,7 @@
    'DATAPOINT':pointList,
    'NormalItem': normalItemList,
    'MergeItem': mergeItemList,
    'allPredictItemList': allPredictItemList,
    'PLAN': planList,
    'IND': indList,
    'IND_ASCII': indList,
src/api/model/sche/suggest/suggestSnapshotRecord.ts
@@ -2,8 +2,8 @@
import request from "@/config/axios";
// 列表
export const getList = (id) => {
  return request.get({ url: '/model/suggest/snapshot/record/list?operationId=' + id })
export const getList = (suggestId) => {
  return request.get({ url: '/model/suggest/snapshot/record/list?suggestId=' + suggestId })
}
// 图表
src/views/ai/questionparamsetting/QuestionParamSettingForm.vue
文件已删除
src/views/ai/questionparamsetting/index.vue
文件已删除
src/views/ai/questiontemplate/QuestionTemplateForm.vue
文件已删除
src/views/ai/questiontemplate/index.vue
文件已删除
src/views/model/sche/snapshotConf/det/configDetForm.vue
@@ -22,9 +22,9 @@
        </el-col>
        <el-col :span="12">
          <el-form-item label="数据编号" prop="dataNo">
            <el-select-v2 v-if="formData.dataType === 'PREDICT_ITEM_N' || formData.dataType === 'PREDICT_ITEM_L' || formData.dataType === 'PREDICT_ITEM_CUR'"
            <el-select-v2 v-if="formData.dataType === 'PREDICT_ITEM_N' || formData.dataType === 'PREDICT_ITEM_L' || formData.dataType === 'PREDICT_ITEM_C'"
              v-model="formData.dataNo"
              :options="modelparamListMap['NormalItem'] || []"
              :options="modelparamListMap['allPredictItemList'] || []"
              placeholder="请选择"
              :props="{value:'value',label:'label',options:'children'}"
              clearable
@@ -48,7 +48,7 @@
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="数据名称" prop="dataName">
            <el-input v-model="formData.dataName" placeholder="" disabled/>
            <el-input v-model="formData.dataName" placeholder=""/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
@@ -66,6 +66,18 @@
        <el-col :span="12">
          <el-form-item label="排序" prop="sort">
            <el-input v-model="formData.sort" placeholder=""/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="上限" prop="limitH">
            <el-input-number v-model="formData.limitH" placeholder=""/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="下限" prop="limitL">
            <el-input-number v-model="formData.limitL" placeholder=""/>
          </el-form-item>
        </el-col>
      </el-row>
@@ -129,6 +141,8 @@
    dataNo: undefined,
    leftLength: undefined,
    rightLength: undefined,
    limitH: undefined,
    limitL: undefined,
    sort: undefined,
    ext1: undefined,
    ext2: undefined,
@@ -142,6 +156,8 @@
    dataNo: [{required: true, message: '不能为空', trigger: 'blur'}],
    leftLength: [{required: true, message: '不能为空', trigger: 'blur'}],
    rightLength: [{required: true, message: '不能为空', trigger: 'blur'}],
    limitH: [{required: true, message: '不能为空', trigger: 'blur'}],
    limitL: [{required: true, message: '不能为空', trigger: 'blur'}],
  })
  const formRef = ref() // 表单 Ref
@@ -203,6 +219,8 @@
      dataNo: undefined,
      leftLength: undefined,
      rightLength: undefined,
      limitH: undefined,
      limitL: undefined,
      sort: undefined,
      ext1: undefined,
      ext2: undefined,
@@ -219,8 +237,8 @@
  }
  const changeDataNo = (value) => {
    let dataName = undefined;
    if (formData.value.dataType === 'PREDICT_ITEM_N' || formData.value.dataType === 'PREDICT_ITEM_L' || formData.value.dataType === 'PREDICT_ITEM_CUR') {
      for (let item of modelparamListMap.value['NormalItem']) {
    if (formData.value.dataType === 'PREDICT_ITEM_N' || formData.value.dataType === 'PREDICT_ITEM_L' || formData.value.dataType === 'PREDICT_ITEM_C') {
      for (let item of modelparamListMap.value['allPredictItemList']) {
        dataName = item.children?.find(e => e.value === value)?.label;
        if (dataName != undefined) {
          break
src/views/model/sche/snapshotConf/det/index.vue
@@ -69,6 +69,8 @@
        <el-table-column prop="dataNo" label="数据编号"/>
        <el-table-column prop="leftLength" label="左侧长度(min)" width="80"/>
        <el-table-column prop="rightLength" label="右侧长度(min)" width="80"/>
        <el-table-column prop="limitH" label="上限" width="80"/>
        <el-table-column prop="limitL" label="下限" width="80"/>
        <el-table-column prop="sort" label="排序" width="80"/>
<!--        <el-table-column prop="ext1" label="拓展字段1"/>-->
<!--        <el-table-column prop="ext2" label="拓展字段2"/>-->
src/views/model/sche/snapshotConf/index.vue
@@ -77,7 +77,8 @@
    <!-- 分页 -->
    <Pagination
      v-model:limit="queryParams.limit"
      v-model:page="queryParams.page"
      v-model:page="queryParams.pageNo"
      v-model:pageSize="queryParams.pageSize"
      :total="total"
      @pagination="getList"
    />
@@ -104,10 +105,12 @@
const loading = ref(true) // 列表的加载中
const total = ref(0) // 列表的总页数
const pageSize = ref(10)
const list = ref([]) // 字典表格数据
const queryParams = reactive({
  page: 1,
  pageNo: 1,
  limit: 10,
  pageSize: 10,
  title: '',
  modelId: ''
})
src/views/model/sche/suggest/index.vue
@@ -81,7 +81,7 @@
<!--      <el-table-column label="持续时长" align="center" min-width="100" fixed="right">-->
<!--      <el-table-column label="调整开始时间" align="center" min-width="100" fixed="right">-->
<!--      <el-table-column label="调整结束时间" align="center" min-width="100" fixed="right">-->
      <el-table-column label="调度时间" align="center" prop="scheduleTime" min-width="100" fixed="right"/>
      <el-table-column label="调度时间" align="center" prop="scheduleTime" min-width="100"/>
      <el-table-column label="状态" align="center" prop="status" min-width="100">
        <template #default="scope">
          <span v-if="scope.row.status === 0">未处理</span>
@@ -93,16 +93,30 @@
<!--      <el-table-column label="处理人" align="center" min-width="100" fixed="right">-->
<!--      <el-table-column label="处理时间" align="center" min-width="100" fixed="right">-->
<!--      <el-table-column label="创建时间" align="center" min-width="100" fixed="right">-->
      <el-table-column label="详情" align="center" min-width="100" fixed="right">
      <el-table-column label="操作" align="center" min-width="100">
        <template #default="scope">
          <el-button
            link
            type="primary"
            @click="openForm(scope.row.modelId ,scope.row.scheduleTime)"
          >
            调度历史
          </el-button>
          <div class="flex items-center justify-center">
            <el-button
              link
              type="primary"
              @click="openForm(scope.row.modelId ,scope.row.scheduleTime)"
            >
              操作历史
            </el-button>
            <el-button
              link
              type="primary"
              @click="openSnapshot(scope.row.id)"
            >
              快照
            </el-button>
          </div>
        </template>
<!--        <el-table-column label="快照" align="center" min-width="100" fixed="right">-->
<!--          <template #default="scope">-->
<!--            -->
<!--          </template>-->
<!--        </el-table-column>-->
      </el-table-column>
    </el-table>
    <!-- 分页 -->
@@ -116,11 +130,15 @@
  <!-- 表单弹窗:添加/修改 -->
  <SuggestOperationRecord ref="formRef" @success="getList" />
  <!-- 快照弹窗 -->
  <SuggestSnapshot ref="suggestSnapshotRef" />
</template>
<script lang="ts" setup>
  import * as ScheduleSuggestApi from '@/api/model/sche/suggest'
  import SuggestOperationRecord from './suggestOperationRecord.vue'
  import SuggestSnapshot from './suggestSnapshot.vue'
  import {ref} from "vue";
  defineOptions({name: 'ScheduleSuggest'})
@@ -178,4 +196,11 @@
  onMounted(async () => {
    await getList()
  })
  /** 快照 */
  const suggestSnapshotRef = ref()
  const openSnapshot = (suggestId?: string) => {
    console.log(suggestId)
    suggestSnapshotRef.value.open(suggestId)
  }
</script>
src/views/model/sche/suggest/suggestOperationRecord.vue
@@ -50,18 +50,6 @@
          align="center"
          min-width="150"
        />
        <el-table-column label="快照" align="center" min-width="100" fixed="right">
          <template #default="scope">
            <el-button
              link
              type="primary"
              @click="openSnapshot(scope.row.id)"
              v-if="scope.row.operate=='采纳建议'"
            >
              快照
            </el-button>
          </template>
        </el-table-column>
      </el-table>
      <!-- 分页 -->
      <Pagination
src/views/model/sche/suggest/suggestSnapshot.vue
@@ -40,19 +40,20 @@
  const loading = ref(false)
  const open = async (id: string) => {
  const open = async (suggestId: string) => {
    visible.value = true
    await getDataList(id)
    await getDataList(suggestId)
  }
  defineExpose({ open })
  /** 获取数据列表 */
  const getDataList = async (id: string) => {
  const getDataList = async (suggestId: string) => {
    try {
      const res = await suggestSnapshotApi.getList(id)
      const res = await suggestSnapshotApi.getList(suggestId)
      dataList.value = res
      selectedData.value = [] // 清空已选项
      refreshCharts()
    } catch (error) {
      console.error(error)
      message.error('获取数据列表失败')
@@ -112,6 +113,98 @@
      if (!chartInfo) return chart
      const markLineData = []
      if (chartInfo.data?.limitH !== null) {
        markLineData.push({
          yAxis: chartInfo.data?.limitH, // 上限
          label: {
            show: true,
            formatter: '上限',
            position: 'insideStartTop',
            color: '#FF9A3D'
          },
          lineStyle: {
            color: '#FF9A3D',
            type: 'dashed'
          },
        })
      }
      if (chartInfo.data?.limitL !== null) {
        markLineData.push({
          yAxis: chartInfo.data?.limitL, // 下限
          label: {
            show: true,
            formatter: '下限',
            position: 'insideStartBottom',
            color: '#00C2FF'
          },
          lineStyle: {
            color: '#00C2FF',
            type: 'dashed'
          },
        })
      }
      if (chartInfo.data?.scheduleTime !== null) {
        markLineData.push({
          xAxis: chartInfo.data?.scheduleTime, // 真实数据分割线
          label: {
            show: true,
            formatter: '建\n议\n时\n间',
            position: 'insideEndBottom',
            color: '#5DFF9E',
            rotate: 0
          },
          lineStyle: {
            color: '#5DFF9E',
          },
        })
      }
      // 采纳
      if (chartInfo.data?.status === 1) {
        markLineData.push({
          xAxis: chartInfo.data?.handleTime,
          label: {
            show: true,
            formatter: '采\n纳\n时\n间',
            position: 'insideEndBottom',
            color: '#2196F3',
            rotate: 0
          },
          lineStyle: {
            color: '#2196F3',
          },
        })
      }
      // 忽略
      if (chartInfo.data?.status === 2) {
        markLineData.push({
          xAxis: chartInfo.data?.handleTime,
          label: {
            show: true,
            formatter: '忽\n略\n时\n间',
            position: 'insideEndBottom',
            color: '#999999',
            rotate: 0
          },
          lineStyle: {
            color: '#999999',
          },
        })
      }
      // 冲顶触底时间
      if (chartInfo.data?.overLimitTimes?.length > 0) {
        chartInfo.data?.overLimitTimes.forEach(overLimitTime => {
          markLineData.push({
            xAxis: overLimitTime,
            lineStyle: {
              color: '#ff0000',
            },
          })
        })
      }
      const option = {
        title: {
          text: chartInfo.name,
@@ -125,13 +218,26 @@
        series: [{
          type: 'line',
          data: chartInfo.data?.dataList || [],
          lineStyle: { color: '#5B8FF9', width: 1 }
          lineStyle: { color: '#5B8FF9', width: 1 },
          markLine: {
            silent: true,
            symbol: ['none', 'none'],
            lineStyle: {
              type: 'solid',
              width: 1,
              color: '#95E6FF',
            },
            label: {
              show: false,
            },
            data: markLineData,
          },
        }]
      }
      chart.setOption(option)
      return chart
    }).filter(Boolean) as echarts.ECharts[]
    })
  }
</script>