|
@@ -2,7 +2,7 @@
|
|
<el-card shadow="nover" class="page page-wrapper">
|
|
<el-card shadow="nover" class="page page-wrapper">
|
|
<el-form :model="tableData.param" ref="queryRef" inline>
|
|
<el-form :model="tableData.param" ref="queryRef" inline>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button @click="onOpenEdit(queryRef)">
|
|
|
|
|
|
+ <el-button @click="onOpenEdit('')">
|
|
<el-icon>
|
|
<el-icon>
|
|
<ele-Plus />
|
|
<ele-Plus />
|
|
</el-icon>
|
|
</el-icon>
|
|
@@ -16,7 +16,7 @@
|
|
</el-button> -->
|
|
</el-button> -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-table :data="tableData.data" style="width: 100%" @selection-change="handleSelectionChange" v-loading="tableData.loading">
|
|
|
|
|
|
+ <el-table :data="tableData.data" style="width: 100%" v-loading="tableData.loading">
|
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
<el-table-column label="序号" align="center" prop="id" width="100" />
|
|
<el-table-column label="序号" align="center" prop="id" width="100" />
|
|
<el-table-column label="标题" prop="title" show-overflow-tooltip />
|
|
<el-table-column label="标题" prop="title" show-overflow-tooltip />
|
|
@@ -30,11 +30,13 @@
|
|
<el-table-column prop="status" label="状态" width="80" align="center" >
|
|
<el-table-column prop="status" label="状态" width="80" align="center" >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-tag type="success" size="small" v-if="scope.row.status == 1">启用</el-tag>
|
|
<el-tag type="success" size="small" v-if="scope.row.status == 1">启用</el-tag>
|
|
- <el-tag type="info" size="small" v-else>禁用</el-tag>
|
|
|
|
|
|
+ <el-tag type="info" size="small" v-if="scope.row.status == 2">禁用</el-tag>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="220" align="center" fixed="right">
|
|
<el-table-column label="操作" width="220" align="center" fixed="right">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
|
+ <el-button size="small" text type="info" v-if="scope.row.status === 1" @click="setStatus(scope.row, 2)">禁用</el-button>
|
|
|
|
+ <el-button size="small" text type="primary" v-else @click="setStatus(scope.row, 1)">启用</el-button>
|
|
<el-button size="small" text type="primary" @click="onOpenRecord(scope.row)">执行</el-button>
|
|
<el-button size="small" text type="primary" @click="onOpenRecord(scope.row)">执行</el-button>
|
|
<el-button size="small" text type="primary" @click="onOpenPolicyRecord(scope.row)">策略</el-button>
|
|
<el-button size="small" text type="primary" @click="onOpenPolicyRecord(scope.row)">策略</el-button>
|
|
<el-button size="small" text type="warning" @click="onOpenEdit(scope.row)">修改</el-button>
|
|
<el-button size="small" text type="warning" @click="onOpenEdit(scope.row)">修改</el-button>
|
|
@@ -100,6 +102,15 @@ const onOpenPolicyRecord = async (row: any) => {
|
|
window.open(url);
|
|
window.open(url);
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const setStatus = (row: any, status: number) => {
|
|
|
|
+ api.setStatus({
|
|
|
|
+ id: row.id,
|
|
|
|
+ status: status
|
|
|
|
+ }).then(() => {
|
|
|
|
+ ElMessage.success('操作成功');
|
|
|
|
+ updeteList();
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
|
|
const updeteList = ( ) => {
|
|
const updeteList = ( ) => {
|
|
if(tableData.value.param.pageNum !== 1) tableData.value.param.pageNum = 1;
|
|
if(tableData.value.param.pageNum !== 1) tableData.value.param.pageNum = 1;
|