|
|
|
@ -32,7 +32,8 @@ |
|
|
|
|
:data="list" |
|
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
|
<el-table-column type="selection" |
|
|
|
|
width="55" /> |
|
|
|
|
width="55" |
|
|
|
|
:selectable="handleDisable" /> |
|
|
|
|
<el-table-column label="序号" |
|
|
|
|
type="index" |
|
|
|
|
width="60" |
|
|
|
@ -49,17 +50,20 @@ |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="toDetail(row, true)" |
|
|
|
|
size="small">查看</el-button> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="toDetail(row)" |
|
|
|
|
size="small">编辑</el-button> |
|
|
|
|
<el-popconfirm title="确定删除这条策略吗?" |
|
|
|
|
@confirm.stop="handleDelete([row.strategyId])"> |
|
|
|
|
<template #reference> |
|
|
|
|
<el-button type="text" |
|
|
|
|
size="small">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-popconfirm> |
|
|
|
|
</template></el-table-column> |
|
|
|
|
<template v-if="!row.builtIn"> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="toDetail(row)" |
|
|
|
|
size="small">编辑</el-button> |
|
|
|
|
<el-popconfirm title="确定删除这条策略吗?" |
|
|
|
|
@confirm.stop="handleDelete([row.strategyId])"> |
|
|
|
|
<template #reference> |
|
|
|
|
<el-button type="text" |
|
|
|
|
size="small">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-popconfirm> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<el-pagination v-model:currentPage="currentPage" |
|
|
|
|
v-model:pageSize="pageSize" |
|
|
|
@ -129,6 +133,13 @@ const initList = async () => { |
|
|
|
|
watch(keyWord, initList); |
|
|
|
|
onMounted(getList); |
|
|
|
|
|
|
|
|
|
// 多选框条件 |
|
|
|
|
const handleDisable = (row: Record<string, any>) => { |
|
|
|
|
// 内置数据禁用 |
|
|
|
|
if (row.builtIn) return false; |
|
|
|
|
return true; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 多选 |
|
|
|
|
const handleSelectionChange = (val: Record<string, any>[]) => { |
|
|
|
|
multipleSelection.value = val; |
|
|
|
|