|
@@ -21,7 +21,7 @@
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
<el-button v-hasPermi="['system:plugin:remove']" type="primary" plain icon="Delete" :disabled="multiple"
|
|
<el-button v-hasPermi="['system:plugin:remove']" type="primary" plain icon="Delete" :disabled="multiple"
|
|
|
- @click="handleLoadPlugin">
|
|
|
|
|
|
|
+ @click="handlePluginStart(null)">
|
|
|
启动插件
|
|
启动插件
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -49,12 +49,14 @@
|
|
|
<el-table-column label="运行状态" align="center" prop="state">
|
|
<el-table-column label="运行状态" align="center" prop="state">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-tag type="primary" v-if="scope.row.state==='STARTED'">启用</el-tag>
|
|
<el-tag type="primary" v-if="scope.row.state==='STARTED'">启用</el-tag>
|
|
|
- <el-tag type="danger" v-if="scope.row.state==='DISABLED'">停用</el-tag>
|
|
|
|
|
|
|
+ <el-tag type="warning" v-if="scope.row.state==='DISABLED'">未运行</el-tag>
|
|
|
|
|
+ <el-tag type="danger" v-if="scope.row.state==='STOPPED'">停用</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-button v-if="scope.row.state==='DISABLED'" v-hasPermi="['system:plugin:start']" link type="primary"
|
|
|
|
|
|
|
+ <el-button v-if="scope.row.state==='DISABLED' || scope.row.state==='STOPPED'"
|
|
|
|
|
+ v-hasPermi="['system:plugin:start']" link type="primary"
|
|
|
@click="handlePluginStart(scope.row)">
|
|
@click="handlePluginStart(scope.row)">
|
|
|
启动
|
|
启动
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -294,7 +296,7 @@ const handleLoadPlugin = async () => {
|
|
|
|
|
|
|
|
/** 插件【启动】操作 */
|
|
/** 插件【启动】操作 */
|
|
|
const handlePluginStart = async (row) => {
|
|
const handlePluginStart = async (row) => {
|
|
|
- const pluginIds = row?.id || ids.value;
|
|
|
|
|
|
|
+ const pluginIds = row?.id || ids.value.join(',');
|
|
|
await proxy.$modal.confirm('确认【启动】所选择的插件吗?');
|
|
await proxy.$modal.confirm('确认【启动】所选择的插件吗?');
|
|
|
pluginStart(pluginIds).then((response) => {
|
|
pluginStart(pluginIds).then((response) => {
|
|
|
getList();
|
|
getList();
|
|
@@ -305,13 +307,12 @@ const handlePluginStart = async (row) => {
|
|
|
/** 插件【停止】操作 */
|
|
/** 插件【停止】操作 */
|
|
|
const handlePluginStop = async (row) => {
|
|
const handlePluginStop = async (row) => {
|
|
|
const pluginIds = row?.id || ids.value;
|
|
const pluginIds = row?.id || ids.value;
|
|
|
- const [err] = await to(proxy.$modal.confirm('是否【停止】所选择的插件"' + pluginIds + '"?'));
|
|
|
|
|
- if (!err) {
|
|
|
|
|
- pluginStop(pluginIds).then((response) => {
|
|
|
|
|
- getList();
|
|
|
|
|
- proxy.$modal.msgSuccess('停止成功');
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ proxy.$modal.confirm('是否【停止】所选择的插件"' + pluginIds + '"?')
|
|
|
|
|
+ .then(() => pluginStop(pluginIds))
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ getList();
|
|
|
|
|
+ proxy.$modal.msgSuccess('停止成功');
|
|
|
|
|
+ });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
function handleDelete() {
|
|
function handleDelete() {
|