This commit is contained in:
helen 2024-12-28 13:59:18 +08:00
parent 40b6b8d447
commit 812c6d263f
4 changed files with 38 additions and 50 deletions

View File

@ -86,12 +86,7 @@
<el-table-column label="操作" align="center" width="150px" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<div v-if="scope.row.userZombie == true">
<el-button
v-if="scope.row.status == 0"
v-hasPermi="['system:article:edit']"
link
type="primary"
@click="handleUpdate(scope.row, 1)"
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:article:edit']" link type="primary" @click="handleUpdate(scope.row, 1)"
>编辑</el-button
>
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:article:edit']" link type="primary" @click="saveupdate(scope.row, 0)"
@ -100,12 +95,7 @@
<el-button v-if="scope.row.status == 2" v-hasPermi="['system:article:edit']" link type="primary" @click="saveupdate(scope.row, 2)"
>撤销发布</el-button
>
<el-button
v-if="scope.row.status == 0"
v-hasPermi="['system:article:remove']"
link
type="primary"
@click="handleDelete(scope.row)"
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:article:remove']" link type="primary" @click="handleDelete(scope.row)"
>删除</el-button
>
</div>
@ -206,7 +196,6 @@
<!-- 查看活动流程 -->
<el-dialog v-model="seedialog.visible" :title="seedialog.title" width="60%" append-to-body>
<activitylink :form="form" :listdatatime="listdatatime"></activitylink>
</el-dialog>
<!-- 问答弹窗-->
<el-dialog v-model="wendadialog.visible" title="问答" width="40%" append-to-body>
@ -301,9 +290,9 @@ const publisherAddress = ref({});
const Mapvalue = ref({});
const Mapvaluetwo = ref({});
const note_publish_list = ref([
{ label: '已发布', value: 2 },
{ label: '未发布', value: 0 },
{ label: '审核中', value: 1 },
{ label: '未发布', value: 0 }
{ label: '已发布', value: 2 }
]);
const activityFormRef = ref<ElFormInstance>();
const getMapValue = (value: any) => {

View File

@ -10,8 +10,8 @@
<el-form-item label="发布状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择发布状态" style="width: 200px" @keyup.enter="handleQuery">
<el-option label="未发布" value="0" />
<el-option label="已发布" value="2" />
<el-option label="审核中" value="1" />
<el-option label="已发布" value="2" />
</el-select>
</el-form-item>
<el-form-item>

View File

@ -74,9 +74,9 @@
<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="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>
<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>
<!-- <image-preview :src="scope.row.productImageUrl" /> -->
</template>
@ -85,34 +85,33 @@
<el-table-column label="操作时间" align="center" prop="updateTime" width="200px" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
<template #default="scope">
<div v-if="scope.row.userZombie == true">
<div v-if="scope.row.userZombie == true">
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-if="scope.row.status == 0 || scope.row.status == 3"
v-hasPermi="['manage:notebook:edit']"
link
type="primary"
@click="handleUpdate(scope.row)"
>编辑</el-button
>编辑</el-button
>
<el-button v-if="scope.row.status == 0" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="fabudata(scope.row)"
>发布</el-button
>发布</el-button
>
<el-button v-if="scope.row.status == 3" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="fabudata(scope.row)"
>撤销发布</el-button
<el-button v-if="scope.row.status == 2" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="fabudata(scope.row)"
>撤销发布</el-button
>
<!-- <el-tooltip content="发布" placement="top">-->
<!-- <el-button v-hasPermi="['manage:notebook:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>-->
<!-- </el-tooltip>-->
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-if="scope.row.status == 0 || scope.row.status == 3"
v-hasPermi="['manage:notebook:remove']"
link
type="primary"
@click="handleDelete(scope.row)"
>删除</el-button
>删除</el-button
>
</div>
</template>
</el-table-column>
</el-table>
@ -146,7 +145,7 @@
<div style="display: flex; justify-content: space-between">
<div>
<el-button :loading="buttonLoading" type="primary" @click="yulansave"> </el-button>
<el-button @click="submitForm('1')">存草稿</el-button>
<el-button @click="submitForm('3')">存草稿</el-button>
</div>
<div>
<el-button @click="cancel"> </el-button>
@ -221,10 +220,10 @@ const props = defineProps({
const addressvalue = ref('');
const statusoptions = ref([
{ label: '已发布', value: 3 },
{ label: '审核中', value: 2 },
{ label: '未发布', value: 0 },
{ label: '草稿', value: 1 }
{ label: '审核中', value: 1 },
{ label: '已发布', value: 2 },
{ label: '草稿', value: 3 }
]);
const dialog = reactive<DialogOption>({
visible: false,
@ -342,7 +341,7 @@ const getTag = async () => {
};
const getContent = async () => {
const res = await contentall({ status: 2 });
const arr = await hotelall({ status: 1 });
const arr = await hotelall({ status: 2 });
sys_user_contentOptions.value = res.concat(arr); //
};
@ -412,10 +411,10 @@ const fabudata = async (row?: NotebookVO) => {
const _idtitle = row?.title;
const res = await getNotebook(_id);
Object.assign(form.value, res.data);
form.value.status = row.status == 3 ? 0 : 2;
const text = row.status == 3 ? '撤销发布' : '确认发布';
const textmessage = row.status == 3 ? '撤销发布成功' : '发布成功';
await proxy?.$modal.confirm('是否' + text + '笔记标题为' + _idtitle + '"的数据项?').finally(() => (loading.value = false));
form.value.status = row.status == 2 ? 0 : 1;
const text = row.status == 2 ? '撤销发布' : '确认发布';
const textmessage = row.status == 2 ? '撤销发布成功' : '发布成功';
await proxy?.$modal.confirm('是否' + text + '笔记标题为"' + _idtitle + '"的数据项?').finally(() => (loading.value = false));
await updateNotebook(form.value).finally(() => (buttonLoading.value = false));
proxy?.$modal.msgSuccess(`${textmessage}`);
await getList();

View File

@ -72,15 +72,15 @@
<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="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>
<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" width="160px" fixed="right">
<template #default="scope">
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-if="scope.row.status == 0 || scope.row.status == 3"
v-hasPermi="['system:Route:edit']"
link
type="primary"
@ -88,7 +88,7 @@
>编辑</el-button
>
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-if="scope.row.status == 0 || scope.row.status == 3"
v-hasPermi="['system:Route:remove']"
link
type="primary"
@ -98,7 +98,7 @@
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row)"
>发布</el-button
>
<el-button v-if="scope.row.status == 3" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row)"
<el-button v-if="scope.row.status == 2" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row)"
>撤销发布</el-button
>
</template>
@ -181,7 +181,7 @@
<template #footer>
<div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="yulanform"> </el-button>
<el-button :loading="buttonLoading" type="primary" @click="submitForm('1')"> 稿</el-button>
<el-button :loading="buttonLoading" type="primary" @click="submitForm('3')"> 稿</el-button>
<el-button :loading="buttonLoading" type="primary" @click="submitForm('0')"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
@ -310,10 +310,10 @@ const treevalue = ref('');
const hotelallvalue = ref('');
const note_publish_list = ref([
{ label: '已发布', value: 3 },
{ label: '审核中', value: 2 },
{ label: '未发布', value: 0 },
{ label: '草稿', value: 1 }
{ label: '审核中', value: 1 },
{ label: '已发布', value: 2 },
{ label: '草稿', value: 3 }
]);
const regiontree = ref([]);
const props = { multiple: true, value: 'id' };
@ -687,10 +687,10 @@ const savelistrow = async (row, type) => {
const _id = row?.id || ids.value[0];
const res = await getRoute(_id);
Object.assign(form.value, res.data);
form.value.status = type == 1 ? 2 : 0;
const test = type == 1 ? '发布' : '撤销发布';
form.value.status = row.status == 0 ? 1 : 0;
const test = type == 0 ? '发布' : '撤销发布';
const _ids = row?.title || ids.value;
await proxy?.$modal.confirm('是否确认' + test + '行程标题为' + _ids + '的数据项?').finally(() => (loading.value = false));
await proxy?.$modal.confirm('是否确认' + test + '行程标题为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await updateRoute(form.value).finally(() => (buttonLoading.value = false));
proxy?.$modal.msgSuccess(test + '成功');
await getList();