| | |
| | | 重置 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | @click="enable" |
| | | v-hasPermi="['sche:scheme:update']" |
| | | >启用 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | @click="disable" |
| | | v-hasPermi="['sche:scheme:update']" |
| | | >禁用 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="openForm('create')" |
| | |
| | | |
| | | <!-- 列表 --> |
| | | <ContentWrap> |
| | | <el-table v-loading="loading" :data="list"> |
| | | <el-table v-loading="loading" :data="list" @selection-change="selectionChangeHandle"> |
| | | <el-table-column type="selection" header-align="center" align="center" fixed="left" width="50"/> |
| | | <el-table-column label="方案编号" align="center" prop="code" min-width="100"/> |
| | | <el-table-column label="方案名称" header-align="center" align="left" prop="name" min-width="100"/> |
| | | <el-table-column label="触发方式" align="center" prop="triggerMethod" min-width="100"> |
| | |
| | | import * as ScheduleSchemeApi from '@/api/model/sche/scheme' |
| | | import ScheduleSchemeForm from './ScheduleSchemeForm.vue' |
| | | import RecordList from './record/index.vue' |
| | | import * as DaPoint from "@/api/data/da/point"; |
| | | import {reactive} from "vue"; |
| | | import {InfraJobStatusEnum} from "@/utils/constants"; |
| | | |
| | | defineOptions({name: 'ScheduleScheme'}) |
| | | |
| | |
| | | recordRef.value.open(id) |
| | | } |
| | | |
| | | let dataListSelections = reactive([]) |
| | | // 多选 |
| | | function selectionChangeHandle (val) { |
| | | dataListSelections = val |
| | | } |
| | | // 启用 |
| | | async function enable() { |
| | | let ids = dataListSelections.map(item => { |
| | | return item.id |
| | | }) |
| | | // 二次确认 |
| | | await message.confirm('是否确认要启用所选调度方案?') |
| | | await ScheduleSchemeApi.enable(ids) |
| | | message.success(t('common.enableSuccess')) |
| | | await getList() |
| | | } |
| | | // 禁用 |
| | | async function disable(){ |
| | | let ids = dataListSelections.map(item => { |
| | | return item.id |
| | | }) |
| | | // 二次确认 |
| | | await message.confirm('确认要禁用所选调度方案?') |
| | | await ScheduleSchemeApi.disable(ids) |
| | | message.success(t('common.disableSuccess')) |
| | | await getList() |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | | onMounted(async () => { |
| | | await getList() |