bug修复
This commit is contained in:
parent
d5467bb89c
commit
5ced818619
@ -242,9 +242,15 @@ const resetQuery = () => {
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: HotelVO[]) => {
|
||||
console.log(selection, 'selection');
|
||||
// multiple.value = !selection.length;
|
||||
let result = selection.some((item: any) => {
|
||||
return item.status === 1;
|
||||
});
|
||||
multiple.value = result;
|
||||
console.log(result, multiple.value);
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
|
@ -63,18 +63,25 @@
|
||||
<el-table-column label="发布状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.status == 0" type="info">未发布</el-tag>
|
||||
<el-tag v-if="scope.row.status == 1" type="success">审核中</el-tag>
|
||||
<el-tag v-if="scope.row.status == 2" type="primary">已发布</el-tag>
|
||||
<el-tag v-if="scope.row.status == 1" type="warning">草稿</el-tag>
|
||||
<el-tag v-if="scope.row.status == 2" type="success">审核中</el-tag>
|
||||
<el-tag v-if="scope.row.status == 3" type="primary">已发布</el-tag>
|
||||
</template>
|
||||
</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" width="160px">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button v-hasPermi="['system:Route:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button v-hasPermi="['system:Route:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
<el-button v-if="scope.row.status != 3" v-hasPermi="['system:Route:edit']" link type="primary" @click="handleUpdate(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button v-if="scope.row.status != 3" v-hasPermi="['system:Route:remove']" link type="primary" @click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button v-if="scope.row.status != 3" v-hasPermi="['system:Route:remove']" link type="primary" @click="handleDelete(scope.row)"
|
||||
>发布</el-button
|
||||
>
|
||||
<el-button v-if="scope.row.status == 3" v-hasPermi="['system:Route:remove']" link type="primary" @click="handleDelete(scope.row)"
|
||||
>撤销发布</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -155,8 +162,8 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="yulanform">预 览</el-button>
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm('0')">存 草 稿</el-button>
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm('1')">提 交</el-button>
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm('1')">存 草 稿</el-button>
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm('0')">提 交</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@ -543,7 +550,10 @@ const submitForm = (type) => {
|
||||
await addRoute(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
if (type == 1) {
|
||||
} else {
|
||||
dialog.visible = false;
|
||||
}
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user