|
|
@@ -117,12 +117,23 @@
|
|
|
</el-tooltip>
|
|
|
|
|
|
<!-- 停止按钮 -->
|
|
|
- <el-tooltip content="停止" placement="top">
|
|
|
- <el-button link type="warning" size="small" @click="handleStop(scope.row)" v-hasPermi="['system:config:remove']">
|
|
|
- <el-icon><VideoPause /></el-icon>
|
|
|
- 停止
|
|
|
- </el-button>
|
|
|
- </el-tooltip>
|
|
|
+ <!-- 动态:停止 或 开始 按钮 -->
|
|
|
+ <template v-if="scope.row.enabled">
|
|
|
+ <!-- 已启用,显示:停止按钮 -->
|
|
|
+ <el-tooltip content="停止" placement="top">
|
|
|
+ <el-button link type="warning" size="small" @click="handleStop(scope.row)" v-hasPermi="['system:config:remove']">
|
|
|
+ <el-icon><VideoPause /></el-icon> 停止
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <!-- 已禁用,显示:开始按钮 -->
|
|
|
+ <el-tooltip content="开始" placement="top">
|
|
|
+ <el-button link type="success" size="small" @click="handleStart(scope.row)" v-hasPermi="['system:config:add']">
|
|
|
+ <el-icon><VideoPlay /></el-icon> 开始
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
|
|
|
<!-- 删除按钮 -->
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
@@ -216,7 +227,8 @@ import {
|
|
|
selectTemplateTourList,
|
|
|
updateScheduleConfig,
|
|
|
deleteScheduleConfig,
|
|
|
- stopScheduleConfig
|
|
|
+ stopScheduleConfig,
|
|
|
+ startScheduleConfig
|
|
|
} from '@/api/system/business/config';
|
|
|
import { selectAllCreationSchemesAllList } from '@/api/system/business/scheme';
|
|
|
import { ConfigVO, ConfigQuery, ConfigForm } from '@/api/system/business/config/types';
|
|
|
@@ -393,6 +405,14 @@ const handleStop = async (row?: ConfigVO) => {
|
|
|
await getList();
|
|
|
};
|
|
|
|
|
|
+const handleStart = async (row?: ConfigVO) => {
|
|
|
+ const _ids = row?.id || ids.value;
|
|
|
+ await proxy?.$modal.confirm('是否开启排期配置,编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
|
|
+ await startScheduleConfig(row.configId);
|
|
|
+ proxy?.$modal.msgSuccess('操作成功');
|
|
|
+ await getList();
|
|
|
+};
|
|
|
+
|
|
|
/** 导出按钮操作 */
|
|
|
const handleExport = () => {
|
|
|
proxy?.download(
|