问题列表修改

This commit is contained in:
pengjunchao 2026-07-19 20:35:33 +08:00
parent 582c9ff550
commit 3572fe2c11
8 changed files with 148 additions and 58 deletions

View File

@ -76,6 +76,7 @@
"predictionData": "预测数据", "predictionData": "预测数据",
"reanalysisData": "再分析数据", "reanalysisData": "再分析数据",
"publicMeteorologicalData": "公开气象数据", "publicMeteorologicalData": "公开气象数据",
"associateMeteorologicalData": "关联气象数据",
"timeSeriesChangeChart": "时序变化展示图", "timeSeriesChangeChart": "时序变化展示图",
"averageWindSpeed": "平均风速", "averageWindSpeed": "平均风速",
"maximumWindSpeed": "最大风速", "maximumWindSpeed": "最大风速",

View File

@ -90,7 +90,7 @@ export class X6Graph {
this.menuElement = document.createElement('div'); this.menuElement = document.createElement('div');
this.menuElement.style.cssText = ` this.menuElement.style.cssText = `
position: absolute; position: absolute;
width: 100px; width: 120px;
background: white; background: white;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; border-radius: 4px;
@ -101,7 +101,7 @@ export class X6Graph {
font-family: sans-serif; font-family: sans-serif;
`; `;
// 1. 新增“配置”菜单项 // 1. 配置同步字段:新增“配置”菜单项
const configItem = document.createElement('div'); const configItem = document.createElement('div');
configItem.style.cssText = ` configItem.style.cssText = `
padding: 6px 12px; padding: 6px 12px;
@ -109,7 +109,7 @@ export class X6Graph {
font-size: 14px; font-size: 14px;
border-bottom: 1px solid #f0f0f0; /* 分隔线,区分两个选项 */ border-bottom: 1px solid #f0f0f0; /* 分隔线,区分两个选项 */
`; `;
configItem.textContent = '配置'; configItem.textContent = '配置同步字段';
configItem.addEventListener('click', () => { configItem.addEventListener('click', () => {
const nodeId = this.menuElement?.getAttribute('data-node-id'); const nodeId = this.menuElement?.getAttribute('data-node-id');
if (nodeId) { if (nodeId) {
@ -195,7 +195,36 @@ export class X6Graph {
configItem.style.background = 'white'; configItem.style.background = 'white';
}); });
// 2. 原有“删除”菜单项(保持不变,调整顺序在配置项下方) // 2. 配置同步数量
const syncNumItem = document.createElement('div');
syncNumItem.style.cssText = `
padding: 6px 12px;
cursor: pointer;
font-size: 14px;
border-bottom: 1px solid #f0f0f0; /* 分隔线,区分两个选项 */
`;
syncNumItem.textContent = '配置同步数量';
syncNumItem.addEventListener('click', () => {
const nodeId = this.menuElement?.getAttribute('data-node-id');
if (nodeId) {
const graph = this.getGraph();
const targetNode = graph.getCellById(nodeId) as Node;
const nodeLevel = targetNode.getData().level;
// TODO配置同步数量逻辑
}
this.hideMenu();
});
// 配置同步数量菜单悬停效果
syncNumItem.addEventListener('mouseenter', () => {
syncNumItem.style.background = '#f0f0f0';
});
syncNumItem.addEventListener('mouseleave', () => {
syncNumItem.style.background = 'white';
});
// 3. 原有“删除”菜单项(保持不变,调整顺序在配置项下方)
const deleteItem = document.createElement('div'); const deleteItem = document.createElement('div');
deleteItem.style.cssText = ` deleteItem.style.cssText = `
padding: 6px 12px; padding: 6px 12px;
@ -230,6 +259,7 @@ export class X6Graph {
// 3. 将两个菜单项添加到菜单容器(配置项在上,删除项在下) // 3. 将两个菜单项添加到菜单容器(配置项在上,删除项在下)
this.menuElement.appendChild(configItem); this.menuElement.appendChild(configItem);
this.menuElement.appendChild(syncNumItem);
this.menuElement.appendChild(deleteItem); this.menuElement.appendChild(deleteItem);
document.body.appendChild(this.menuElement); document.body.appendChild(this.menuElement);
} }

View File

@ -969,6 +969,7 @@ getStations();
<el-input v-if="form.useMetType === 4" value="ncep" /> <el-input v-if="form.useMetType === 4" value="ncep" />
<el-input v-if="form.useMetType === 5" value="fnl" /> <el-input v-if="form.useMetType === 5" value="fnl" />
<el-input v-if="form.useMetType === 6" value="t1h" /> <el-input v-if="form.useMetType === 6" value="t1h" />
<el-input v-if="form.useMetType === 7" value="GFS" />
</el-form-item> </el-form-item>
<el-form-item :label="t('startTime')"> <el-form-item :label="t('startTime')">
@ -1116,6 +1117,7 @@ getStations();
<ElOption label="ncep" :value="4" /> <ElOption label="ncep" :value="4" />
<ElOption label="fnl" :value="5" /> <ElOption label="fnl" :value="5" />
<ElOption label="t1h" :value="6" /> <ElOption label="t1h" :value="6" />
<ElOption label="GFS" :value="7" />
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem :label="t('creationTime')"> <ElFormItem :label="t('creationTime')">
@ -1160,7 +1162,7 @@ getStations();
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn :label="t('dataSource')"> <ElTableColumn :label="t('dataSource')">
<!-- 1-盘古模型2-graphcast3-cra404-ncep,5-fnl,6-t1h --> <!-- 1-盘古模型2-graphcast3-cra404-ncep,5-fnl,6-t1h7-GFS -->
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.useMetType === 1"> <div v-if="scope.row.useMetType === 1">
盘古模型 盘古模型
@ -1180,6 +1182,9 @@ getStations();
<div v-if="scope.row.useMetType === 6"> <div v-if="scope.row.useMetType === 6">
t1h t1h
</div> </div>
<div v-if="scope.row.useMetType === 7">
GFS
</div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="timeConsuming" :label="t('timeConsuming')" > <ElTableColumn prop="timeConsuming" :label="t('timeConsuming')" >
@ -1287,6 +1292,7 @@ getStations();
<ElOption label="ncep" :value="4" /> <ElOption label="ncep" :value="4" />
<ElOption label="fnl" :value="5" /> <ElOption label="fnl" :value="5" />
<ElOption label="t1h" :value="6" /> <ElOption label="t1h" :value="6" />
<ElOption label="GFS" :value="7" />
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>

View File

@ -47,13 +47,14 @@ watch(drawerVisible, (newValue) => {
// //
function handleSendData(params: any) { function handleSendData(params: any) {
console.log('选中的回放数据,需要传至gis --->', params); console.log('选中的回放数据,需要传至gis --->', params);
EventBusTool.getEventBus().publish('playData', {
key: 'show',
});
delete params.key delete params.key
delete params.endTime delete params.endTime
playbackSearchData(params, false, (res) => { playbackSearchData(params, false, (res) => {
console.log(res); console.log(res);
//
EventBusTool.getEventBus().publish('playData', {
key: 'show',
});
if (params.timeBatch) { if (params.timeBatch) {
timeBatch.value = params.timeBatch; timeBatch.value = params.timeBatch;
} }
@ -236,6 +237,9 @@ onMounted(() => {
<el-tab-pane :label="t('publicMeteorologicalData')" name="公开气象数据"> <el-tab-pane :label="t('publicMeteorologicalData')" name="公开气象数据">
<tab2 v-if="tabActive === '公开气象数据'" type="gkqx" @playback="handleSendData" @preview="weatherPreviewHandle" /> <tab2 v-if="tabActive === '公开气象数据'" type="gkqx" @playback="handleSendData" @preview="weatherPreviewHandle" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="t('associateMeteorologicalData')" name="关联气象数据">
建设中...
</el-tab-pane>
</el-tabs> </el-tabs>
</Dialog> </Dialog>
<el-drawer v-model="lineChartVisible" direction="btt" modal-class="custom-modal" :show-close="false" :modal="false"> <el-drawer v-model="lineChartVisible" direction="btt" modal-class="custom-modal" :show-close="false" :modal="false">

View File

@ -1,11 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import type { TableInstance, UploadInstance, UploadProps, UploadRawFile } from 'element-plus'; import {ElButton, ElOption, TableInstance, UploadInstance, UploadProps, UploadRawFile} from 'element-plus';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { ElLoading, ElMessage, ElMessageBox, ElNotification, genFileId } from 'element-plus'; import { ElLoading, ElMessage, ElMessageBox, ElNotification, genFileId } from 'element-plus';
import SparkMD5 from 'spark-md5'; import SparkMD5 from 'spark-md5';
import { set } from 'vue'; // Vue set import { set } from 'vue'; // Vue set
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { add, deleteData, edit, getData, getTaskLog, resume } from '@/utils/axios/tqyb/task'; import { add, deleteData, edit, getData, getTaskLog, resume, pinToTopOrUnpin } from '@/utils/axios/tqyb/task';
import log from '../log/index.vue'; import log from '../log/index.vue';
const emit = defineEmits(['playback']); const emit = defineEmits(['playback']);
@ -37,6 +37,20 @@ const form = ref<any>({});
/* 任务列表搜索表单 */ /* 任务列表搜索表单 */
const searchForm = reactive({}); const searchForm = reactive({});
interface OptionItem {
label: string;
value: number;
}
const taskStatusList = ref<OptionItem[]>([
// -101234
{ label: '执行失败', value: -1 },
{ label: '未开始', value: 0 },
{ label: '等待中', value: 1 },
{ label: '运行中', value: 2 },
{ label: '已完成', value: 3 },
{ label: '任务检查未通过', value: 4 },
]);
function search() { function search() {
console.log('搜索条件:', searchForm); console.log('搜索条件:', searchForm);
getList(); getList();
@ -59,6 +73,16 @@ function getList() {
}); });
} }
//
const pinToTopTask = (row: any) => {
pinToTopOrUnpin({ id: row.id }, (res) => {
if (res.code === 200) {
ElMessage.success('操作成功!');
getList();
}
});
};
function start(task: any) { function start(task: any) {
console.log('开始运行', task); console.log('开始运行', task);
@ -131,13 +155,12 @@ function saveConfigForm() {
duration: 1800, duration: 1800,
}); });
} }
const loading = ElLoading.service({ // const loading = ElLoading.service({
background: 'rgba(0, 0, 0, 0.7)', // background: 'rgba(0, 0, 0, 0.7)',
fullscreen: true, // fullscreen: true,
text: 'Loading...', // text: 'Loading...',
target: document.querySelector('.base-layout'), // target: document.querySelector('.base-layout'),
// });
});
if (configType.value === 'add') { if (configType.value === 'add') {
const addForm = new FormData(); const addForm = new FormData();
@ -153,7 +176,7 @@ function saveConfigForm() {
addForm.append('dataSources', configForm.value.dataSources); addForm.append('dataSources', configForm.value.dataSources);
add(addForm, () => { add(addForm, () => {
loading.close(); // loading.close();
ElNotification({ ElNotification({
title: 'Tips', title: 'Tips',
message: 'Added successfully', message: 'Added successfully',
@ -187,7 +210,7 @@ function saveConfigForm() {
editForm.append('leadTime', configForm.value.leadTime); editForm.append('leadTime', configForm.value.leadTime);
editForm.append('dataSources', configForm.value.dataSources); editForm.append('dataSources', configForm.value.dataSources);
edit(editForm, () => { edit(editForm, () => {
loading.close(); // loading.close();
ElNotification({ ElNotification({
title: 'Tips', title: 'Tips',
message: 'Saved successfully', message: 'Saved successfully',
@ -461,10 +484,7 @@ getList();
</ElFormItem> </ElFormItem>
<ElFormItem :label="t('taskStatus')"> <ElFormItem :label="t('taskStatus')">
<ElSelect v-model="searchForm.taskStatus" :placeholder="t('pleaseSelect')" clearable class="custom-select"> <ElSelect v-model="searchForm.taskStatus" :placeholder="t('pleaseSelect')" clearable class="custom-select">
<ElOption label="未开始" :value="0" /> <ElOption v-for="item in taskStatusList" :key="item.value" :label="item.label" :value="item.value" />
<ElOption label="运行中" :value="1" />
<ElOption label="已完成" :value="2" />
<ElOption label="运行失败" :value="-1" />
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem :label="t('predictionDate')"> <ElFormItem :label="t('predictionDate')">
@ -484,19 +504,12 @@ getList();
<ElTableColumn prop="taskName" :label="t('taskName')" /> <ElTableColumn prop="taskName" :label="t('taskName')" />
<ElTableColumn :label="t('taskStatus')"> <ElTableColumn :label="t('taskStatus')">
<template #default="scope"> <template #default="scope">
<!-- 任务状态0-未开始1-运行中2-已完成 --> <div v-if="scope.row.taskStatus === -1" style="color:#f42a2a;">执行失败</div>
<div v-if="scope.row.taskStatus === 2" style="color:#01E3C6;"> <div v-if="scope.row.taskStatus === 0" style="color:#f42a2a;">未开始</div>
{{ '已完成' }} <div v-if="scope.row.taskStatus === 1" style="color:#ffcb40;">等待中</div>
</div> <div v-if="scope.row.taskStatus === 2" style="color:#ffcb40;">运行中</div>
<div v-else-if="scope.row.taskStatus === 1" style="color:#22CE3D;"> <div v-if="scope.row.taskStatus === 3" style="color:#2af442;">已完成</div>
{{ '运行中' }} <div v-if="scope.row.taskStatus === 4" style="color:#f42a2a;">任务检查未通过</div>
</div>
<div v-else-if="scope.row.taskStatus === -1" style="color:red;">
{{ '运行失败' }}
</div>
<div v-else style="color:#F1C13D;">
{{ '未开始' }}
</div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="model" :label="t('predictionModel')"> <ElTableColumn prop="model" :label="t('predictionModel')">
@ -541,14 +554,22 @@ getList();
</div> </div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="creator" :label="t('creator')"> <!--<ElTableColumn prop="creator" :label="t('creator')">
<template #default="scope"> <template #default="scope">
{{ scope.row.createBy || '暂无信息' }} {{ scope.row.createBy || '暂无信息' }}
</template> </template>
</ElTableColumn> </ElTableColumn>-->
<ElTableColumn prop="createTime" :label="t('creationTime')" width="220" /> <ElTableColumn prop="createTime" :label="t('creationTime')" width="220" />
<ElTableColumn :label="t('operation')" width="280"> <ElTableColumn :label="t('operation')" width="280">
<template #default="scope"> <template #default="scope">
<ElButton v-if="scope.row.taskStatus === 1" type="text" class="table-btn" @click="pinToTopTask(scope)">
{{ true ? t('pinToTop') : t('unpin') }}
</ElButton>
<ElButton v-else type="text" style="color:#588589;cursor:no-drop">
{{ true ? t('pinToTop') : t('unpin') }}
</ElButton>
<!-- -1执行失败0未开始1等待中2运行中3已完成4任务检查未通过-->
<!--任务处于等待中运行中状态时不能编辑和删除处于未开始已完成检查未通过时可以删除处于已完成状态时也不能编辑-->
<ElButton v-if="scope.row.taskStatus === 0 || scope.row.taskStatus === -1" type="text" class="custom-text-btn" <ElButton v-if="scope.row.taskStatus === 0 || scope.row.taskStatus === -1" type="text" class="custom-text-btn"
@click="start(scope.row, scope.$index)"> @click="start(scope.row, scope.$index)">
{{ t('start') }} {{ t('start') }}
@ -560,14 +581,16 @@ getList();
{{ t('operationLog') }} {{ t('operationLog') }}
</ElButton> </ElButton>
<ElButton v-if="scope.row.taskStatus === 2 || scope.row.taskStatus === 1" type="text" <ElButton v-if="scope.row.taskStatus !== 1 && scope.row.taskStatus !== 2 && scope.row.taskStatus !== 3" type="text" class="custom-text-btn" @click="editTask(scope.row, scope.$index)">
style="color:#588589;cursor:no-drop">
{{ t('edit') }} {{ t('edit') }}
</ElButton> </ElButton>
<ElButton v-else type="text" class="custom-text-btn" @click="editTask(scope.row, scope.$index)"> <ElButton v-else type="text" style="color:#588589;cursor:no-drop">
{{ t('edit') }} {{ t('edit') }}
</ElButton> </ElButton>
<ElButton type="text" class="custom-text-btn" @click="deleteTask(scope.row)"> <ElButton v-if="scope.row.taskStatus == 0 || scope.row.taskStatus === 3 || scope.row.taskStatus === 4" type="text" class="custom-text-btn" @click="deleteTask(scope.row)">
{{ t('delete') }}
</ElButton>
<ElButton v-else type="text" style="color:#588589;cursor:no-drop">
{{ t('delete') }} {{ t('delete') }}
</ElButton> </ElButton>
</template> </template>

View File

@ -44,6 +44,11 @@ function search() {
// //
const timeBatchList = ref<any>([]); const timeBatchList = ref<any>([]);
const timeBatch = ref<any>(null); const timeBatch = ref<any>(null);
const dataSourceList = ref([
{ label: 'T1H', value: 6 },
{ label: 'GFS', value: 7 },
]);
const xxxxxxxxxxxxx = ref('');
// //
const searchSelectValue = ref<any>(null); const searchSelectValue = ref<any>(null);
@ -342,13 +347,13 @@ getList();
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="model" :label="t('fileSize')"> <!--<ElTableColumn prop="model" :label="t('fileSize')">
<template #default="scope"> <template #default="scope">
<div> <div>
{{ scope.row?.fileSize ? (`${scope.row?.fileSize || ''}M`) : t('noInformation') }} {{ scope.row?.fileSize ? (`${scope.row?.fileSize || ''}M`) : t('noInformation') }}
</div> </div>
</template> </template>
</ElTableColumn> </ElTableColumn>-->
<ElTableColumn prop="time" width="200" :label="t('startTime')"> <ElTableColumn prop="time" width="200" :label="t('startTime')">
<template #default="scope"> <template #default="scope">
<div> <div>
@ -392,7 +397,11 @@ getList();
style="width: 240px;margin-right: 10px;" /> style="width: 240px;margin-right: 10px;" />
<!-- 时间选择 --> <!-- 时间选择 -->
<div style="width: 460px;display: flex;margin-right: 10px"> <div style="width: 760px;display: flex;margin-right: 10px">
<ElSelect v-if="type === 'gkqx'" v-model="xxxxxxxxxxxxx" placeholder="选择数据源" filterable
style="width: 160px;margin-right: 10px">
<ElOption v-for="v in dataSourceList" :label="v.label" :value="v.value" />
</ElSelect>
<ElSelect v-if="type === 'gkqx'" v-model="timeBatch" placeholder="请选择批次" filterable <ElSelect v-if="type === 'gkqx'" v-model="timeBatch" placeholder="请选择批次" filterable
style="width: 200px;margin-right: 10px"> style="width: 200px;margin-right: 10px">
<ElOption v-for="v in timeBatchList" :label="v" :value="v" /> <ElOption v-for="v in timeBatchList" :label="v" :value="v" />
@ -411,13 +420,13 @@ getList();
<!-- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" :limit="1" :on-exceed="handleExceed" --> <!-- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" :limit="1" :on-exceed="handleExceed" -->
<!-- :auto-upload="false"> --> <!-- :auto-upload="false"> -->
<!-- <template #trigger> --> <!-- <template #trigger> -->
<el-button v-if="propsWithDefaults.type === 'zfx'" type="primary" class="custom-btn" @click="handleClick"> <!--<el-button v-if="propsWithDefaults.type === 'zfx'" type="primary" class="custom-btn" @click="handleClick">-->
<SvgIcon name="import" width="30" height="20" style="font-weight:bold;margin-right: 1px;" /> <!-- <SvgIcon name="import" width="30" height="20" style="font-weight:bold;margin-right: 1px;" />-->
{{ t('import') }} <!-- {{ t('import') }}-->
</el-button> <!--</el-button>-->
<el-select-v2 v-if="propsWithDefaults.type === 'zfx'" v-model="fileDatasource" :options="selectOption" <!--<el-select-v2 v-if="propsWithDefaults.type === 'zfx'" v-model="fileDatasource" :options="selectOption"-->
placeholder="选择数据源" style="width: 240px;margin-right: 10px;" /> <!-- placeholder="选择数据源" style="width: 240px;margin-right: 10px;" />-->
<input ref="fileInput" type="file" style="display: none" @change="handleFileChange"> <!--<input ref="fileInput" type="file" style="display: none" @change="handleFileChange">-->
<!-- </template> --> <!-- </template> -->
<!-- </el-upload> --> <!-- </el-upload> -->
</div> </div>

View File

@ -950,7 +950,7 @@ onMounted(() => {
@pagination="handlePagination" @pagination="handlePagination"
> >
<template #operate="{ scope }"> <template #operate="{ scope }">
<ElButton v-if="scope.row.taskStatus === 1" type="text" class="table-btn" @click="pinToTopTask(scope)"> <ElButton v-if="scope.taskStatus === 1" type="text" class="table-btn" @click="pinToTopTask(scope)">
{{ true ? t('pinToTop') : t('unpin') }} {{ true ? t('pinToTop') : t('unpin') }}
</ElButton> </ElButton>
<ElButton v-else type="text" style="color:#588589;cursor:no-drop"> <ElButton v-else type="text" style="color:#588589;cursor:no-drop">
@ -958,31 +958,31 @@ onMounted(() => {
</ElButton> </ElButton>
<!-- -1执行失败0未开始1等待中2运行中3已完成4任务检查未通过--> <!-- -1执行失败0未开始1等待中2运行中3已完成4任务检查未通过-->
<!--任务处于等待中运行中状态时不能编辑和删除处于未开始已完成检查未通过时可以删除处于已完成状态时也不能编辑--> <!--任务处于等待中运行中状态时不能编辑和删除处于未开始已完成检查未通过时可以删除处于已完成状态时也不能编辑-->
<ElButton v-if="scope.row.taskStatus === 0" type="text" class="table-btn" @click="runTaskId(scope)"> <ElButton v-if="scope.taskStatus === 0" type="text" class="table-btn" @click="runTaskId(scope)">
{{ t('start') }} {{ t('start') }}
</ElButton> </ElButton>
<ElButton v-else type="text" style="color:#588589;cursor:no-drop"> <ElButton v-else type="text" style="color:#588589;cursor:no-drop">
{{ t('start') }} {{ t('start') }}
</ElButton> </ElButton>
<ElButton v-if="scope.row.taskStatus === 2" type="text" class="table-btn" @click="viewTask(scope)"> <ElButton v-if="scope.taskStatus === 2" type="text" class="table-btn" @click="viewTask(scope)">
{{ t('view') }} {{ t('view') }}
</ElButton> </ElButton>
<ElButton v-else type="text" style="color:#588589;cursor:no-drop"> <ElButton v-else type="text" style="color:#588589;cursor:no-drop">
{{ t('view') }} {{ t('view') }}
</ElButton> </ElButton>
<ElButton v-if="scope.row.taskStatus !== 1 && scope.row.taskStatus !== 2 && scope.row.taskStatus !== 3" type="text" class="table-btn" @click="editTask(scope)"> <ElButton v-if="scope.taskStatus !== 1 && scope.taskStatus !== 2 && scope.taskStatus !== 3" type="text" class="table-btn" @click="editTask(scope)">
{{ t('edit') }} {{ t('edit') }}
</ElButton> </ElButton>
<ElButton v-else type="text" style="color:#588589;cursor:no-drop"> <ElButton v-else type="text" style="color:#588589;cursor:no-drop">
{{ t('edit') }} {{ t('edit') }}
</ElButton> </ElButton>
<ElButton v-if="scope.row.taskStatus == 0 || scope.row.taskStatus === 3 || scope.row.taskStatus === 4" type="text" class="table-btn" @click="deleteTask(scope)"> <ElButton v-if="scope.taskStatus == 0 || scope.taskStatus === 3 || scope.taskStatus === 4" type="text" class="table-btn" @click="deleteTask(scope)">
{{ t('delete') }} {{ t('delete') }}
</ElButton> </ElButton>
<ElButton v-else type="text" style="color:#588589;cursor:no-drop"> <ElButton v-else type="text" style="color:#588589;cursor:no-drop">
{{ t('delete') }} {{ t('delete') }}
</ElButton> </ElButton>
<!--<ElButton v-if="scope.row.taskStatus === 0" type="text" class="table-btn" @click="listUpload"> <!--<ElButton v-if="scope.taskStatus === 0" type="text" class="table-btn" @click="listUpload">
{{ t('upload') }} {{ t('upload') }}
</ElButton> </ElButton>
<ElButton v-else type="text" style="color:#588589;cursor:no-drop"> <ElButton v-else type="text" style="color:#588589;cursor:no-drop">

View File

@ -48,6 +48,23 @@ export async function deleteData(params: any, callback?: (data: any) => void): P
} }
} }
/**
* @method
* @param {string} [params.id] - id
* @returns {Promise<any>}
*/
export async function pinToTopOrUnpin(params: {
id: string;
}, callback?: (data: any) => void): Promise<any> {
const response = await request({
url: `${serverIp}${baseURL}/source/pppppppppppppppp`,
method: 'GET',
params,
});
// 执行回调(如果存在)
callback?.(response);
}
/** /**
* *
* @param {any} data - * @param {any} data -