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