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

View File

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

View File

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

View File

@ -72,15 +72,15 @@
<el-table-column label="发布状态" align="center" prop="status"> <el-table-column label="发布状态" align="center" prop="status">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.status == 0" type="info">未发布</el-tag> <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 == 1" type="warning">审核中</el-tag>
<el-tag v-if="scope.row.status == 2" type="success">审核中</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 == 3" type="primary">草稿</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" fixed="right">
<template #default="scope"> <template #default="scope">
<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:edit']" v-hasPermi="['system:Route:edit']"
link link
type="primary" type="primary"
@ -88,7 +88,7 @@
>编辑</el-button >编辑</el-button
> >
<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']" v-hasPermi="['system:Route:remove']"
link link
type="primary" 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 v-if="scope.row.status == 0" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row)"
>发布</el-button >发布</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 >撤销发布</el-button
> >
</template> </template>
@ -181,7 +181,7 @@
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="yulanform"> </el-button> <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 :loading="buttonLoading" type="primary" @click="submitForm('0')"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
@ -310,10 +310,10 @@ const treevalue = ref('');
const hotelallvalue = ref(''); const hotelallvalue = ref('');
const note_publish_list = ref([ const note_publish_list = ref([
{ label: '已发布', value: 3 },
{ label: '审核中', value: 2 },
{ label: '未发布', value: 0 }, { label: '未发布', value: 0 },
{ label: '草稿', value: 1 } { label: '审核中', value: 1 },
{ label: '已发布', value: 2 },
{ label: '草稿', value: 3 }
]); ]);
const regiontree = ref([]); const regiontree = ref([]);
const props = { multiple: true, value: 'id' }; const props = { multiple: true, value: 'id' };
@ -687,10 +687,10 @@ const savelistrow = async (row, type) => {
const _id = row?.id || ids.value[0]; const _id = row?.id || ids.value[0];
const res = await getRoute(_id); const res = await getRoute(_id);
Object.assign(form.value, res.data); Object.assign(form.value, res.data);
form.value.status = type == 1 ? 2 : 0; form.value.status = row.status == 0 ? 1 : 0;
const test = type == 1 ? '发布' : '撤销发布'; const test = type == 0 ? '发布' : '撤销发布';
const _ids = row?.title || ids.value; 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)); await updateRoute(form.value).finally(() => (buttonLoading.value = false));
proxy?.$modal.msgSuccess(test + '成功'); proxy?.$modal.msgSuccess(test + '成功');
await getList(); await getList();