拼图
This commit is contained in:
parent
cae7bcf062
commit
3e9f45c99e
@ -65,10 +65,33 @@ export const delMkJigsaw = (id: string | number | Array<string | number>) => {
|
|||||||
* 商品下拉列表
|
* 商品下拉列表
|
||||||
* @param query
|
* @param query
|
||||||
*/
|
*/
|
||||||
export const productall = (query: Array<string | number>) => {
|
export const productall = (query?: MkJigsawQuery): AxiosPromise<MkJigsawVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/product/all',
|
url: '/manage/product/all',
|
||||||
method: 'gte',
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 碎片统计
|
||||||
|
* @param query
|
||||||
|
*/
|
||||||
|
export const mkJigsawDetaillist = (query?: MkJigsawQuery): AxiosPromise<MkJigsawVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/manage/mkJigsawDetail/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品类别集合
|
||||||
|
* @param query
|
||||||
|
*/
|
||||||
|
export const productCategoryall = (query?: MkJigsawQuery): AxiosPromise<MkJigsawVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/manage/productCategory/all',
|
||||||
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -72,9 +72,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="发布状态" align="center" prop="status" width="100px">
|
<el-table-column label="发布状态" align="center" prop="status" width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.status == 1" type="primary">审核中</el-tag>
|
|
||||||
<el-tag v-if="scope.row.status == 2" type="success">发布</el-tag>
|
|
||||||
<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 == 2" type="success">审核中</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" prop="publishTime" />
|
<el-table-column label="发布时间" align="center" prop="publishTime" />
|
||||||
@ -83,15 +84,28 @@
|
|||||||
<el-table-column label="操作时间" align="center" prop="updateTime" width="180px" />
|
<el-table-column label="操作时间" align="center" prop="updateTime" width="180px" />
|
||||||
<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">
|
||||||
<el-tooltip content="编辑" placement="top">
|
<el-button
|
||||||
<el-button v-hasPermi="['system:article:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
v-if="scope.row.status == 0 || scope.row.status == 1"
|
||||||
</el-tooltip>
|
v-hasPermi="['system:article:edit']"
|
||||||
<!-- <el-tooltip content="发布" placement="top">-->
|
link
|
||||||
<!-- <el-button v-hasPermi="['system:article:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>-->
|
type="primary"
|
||||||
<!-- </el-tooltip>-->
|
@click="handleUpdate(scope.row)"
|
||||||
<el-tooltip content="删除" placement="top">
|
>编辑</el-button
|
||||||
<el-button v-hasPermi="['system:article:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
>
|
||||||
</el-tooltip>
|
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:article:edit']" link type="primary" @click="handleUpdate(scope.row)"
|
||||||
|
>发布</el-button
|
||||||
|
>
|
||||||
|
<el-button v-if="scope.row.status == 3" v-hasPermi="['system:article:edit']" link type="primary" @click="handleUpdate(scope.row)"
|
||||||
|
>撤销发布</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.status == 0 || scope.row.status == 1"
|
||||||
|
v-hasPermi="['system:article:remove']"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -238,9 +252,10 @@ 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([
|
||||||
{ value: 3, label: '已发布' },
|
{ label: '已发布', value: 3 },
|
||||||
{ value: 0, label: '未发布' },
|
{ label: '审核中', value: 2 },
|
||||||
{ value: 1, label: '草稿' }
|
{ label: '未发布', value: 0 },
|
||||||
|
{ label: '草稿', value: 1 }
|
||||||
]);
|
]);
|
||||||
const activityFormRef = ref<ElFormInstance>();
|
const activityFormRef = ref<ElFormInstance>();
|
||||||
const getMapValue = (value: any) => {
|
const getMapValue = (value: any) => {
|
||||||
|
@ -40,7 +40,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品ID" align="center" prop="productId" />
|
<el-table-column label="商品ID" align="center" prop="productId" />
|
||||||
<el-table-column label="商品名称" align="center" prop="productName" />
|
<el-table-column label="商品名称" align="center" prop="productName" />
|
||||||
<el-table-column label="商品类别" align="center" prop="productCategory" />
|
<el-table-column label="商品类别" align="center" prop="productCategory">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ goodsleibiesave(scope.row.productCategory) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="商品图片" align="center" prop="productImage" />
|
<el-table-column label="商品图片" align="center" prop="productImage" />
|
||||||
<el-table-column label="活动时间" align="center" prop="startDate" width="180">
|
<el-table-column label="活动时间" align="center" prop="startDate" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -53,29 +57,28 @@
|
|||||||
<el-table-column label="实际得奖人数" align="center" prop="awardCount" />
|
<el-table-column label="实际得奖人数" align="center" prop="awardCount" />
|
||||||
<el-table-column label="拼图碎片获得人数" align="center" prop="awardCount">
|
<el-table-column label="拼图碎片获得人数" align="center" prop="awardCount">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" link>查看详情</el-button>
|
<el-button type="primary" link @click="imagesui(scope.row)">查看详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="拼图详情" align="center" prop="awardCount">
|
<el-table-column label="拼图详情" align="center" prop="awardCount">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" link>查看详情</el-button>
|
<el-button type="primary" link @click="handleUpdate(scope.row, 1)">查看详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="发布状态" align="center" prop="status">
|
<el-table-column label="发布状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.status }}</span>
|
<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="success">审核中</el-tag>
|
||||||
|
<el-tag v-if="scope.row.status == 2" type="primary">已发布</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建人" align="center" prop="awardCount" />
|
<el-table-column label="创建人" align="center" prop="awardCount" />
|
||||||
<el-table-column label="创建时间" align="center" prop="awardCount" />
|
<el-table-column label="创建时间" align="center" prop="awardCount" />
|
||||||
<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="120px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button v-hasPermi="['manage:mkJigsaw:edit']" link type="primary" @click="handleUpdate(scope.row, 2)">编辑</el-button>
|
||||||
<el-button v-hasPermi="['manage:mkJigsaw:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
<el-button v-hasPermi="['manage:mkJigsaw:remove']" link type="primary" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button v-hasPermi="['manage:mkJigsaw:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -94,11 +97,33 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择商品" prop="productId">
|
<el-form-item label="选择商品" prop="productId">
|
||||||
<el-input v-model="form.productId" placeholder="请选择商品" style="width: 300px" />
|
<el-select v-model="form.productId" placeholder="请选择商品" style="width: 300px" @change="goodssave">
|
||||||
|
<el-option v-for="item in imagegoodsoptions" :key="item.id" :label="item.productName" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动时间" prop="startDate">
|
<el-form-item>
|
||||||
<el-date-picker v-model="form.startDate" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择活动开始时间">
|
<el-table :data="goodsdata" border style="width: 100%">
|
||||||
</el-date-picker>
|
<el-table-column prop="id" label="商品ID" width="180" />
|
||||||
|
<el-table-column prop="productName" label="商品名称" width="180" />
|
||||||
|
<el-table-column prop="categoryId" label="商品类别">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ goodsleibiesave(scope.row.categoryId) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="" label="商品图片" />
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动时间" prop="startDate" style="width: 500px">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="value2"
|
||||||
|
type="datetimerange"
|
||||||
|
start-placeholder="选择开始时间"
|
||||||
|
end-placeholder="选择结束时间"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
date-format="YYYY/MM/DD ddd"
|
||||||
|
time-format="A hh:mm:ss"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设置拼图数量" prop="jigsawConfigCount">
|
<el-form-item label="设置拼图数量" prop="jigsawConfigCount">
|
||||||
<el-input v-model="form.jigsawConfigCount" placeholder="请输入拼图配置数量" style="width: 300px" disabled />
|
<el-input v-model="form.jigsawConfigCount" placeholder="请输入拼图配置数量" style="width: 300px" disabled />
|
||||||
@ -126,11 +151,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 拼图碎片获得人数-->
|
||||||
|
<el-dialog v-model="imagedialog.visible" :title="imagedialog.title" width="50%" append-to-body>
|
||||||
|
<el-table :data="imagelistdata" border style="width: 100%">
|
||||||
|
<el-table-column prop="name" label="名称" width="180" />
|
||||||
|
<el-table-column prop="probability" label="设置概率/人数" width="180" />
|
||||||
|
<el-table-column prop="joinCount" label="获得人数" />
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="MkJigsaw" lang="ts">
|
<script setup name="MkJigsaw" lang="ts">
|
||||||
import { listMkJigsaw, getMkJigsaw, delMkJigsaw, addMkJigsaw, updateMkJigsaw } from '@/api/manage/mkJigsaw';
|
import {
|
||||||
|
listMkJigsaw,
|
||||||
|
getMkJigsaw,
|
||||||
|
delMkJigsaw,
|
||||||
|
addMkJigsaw,
|
||||||
|
updateMkJigsaw,
|
||||||
|
productall,
|
||||||
|
mkJigsawDetaillist,
|
||||||
|
productCategoryall
|
||||||
|
} from '@/api/manage/mkJigsaw';
|
||||||
import { MkJigsawVO, MkJigsawQuery, MkJigsawForm } from '@/api/manage/mkJigsaw/types';
|
import { MkJigsawVO, MkJigsawQuery, MkJigsawForm } from '@/api/manage/mkJigsaw/types';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@ -144,14 +186,27 @@ const ids = ref<Array<string | number>>([]);
|
|||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
const value2 = ref('');
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const mkJigsawFormRef = ref<ElFormInstance>();
|
const mkJigsawFormRef = ref<ElFormInstance>();
|
||||||
|
const imagegoodsoptions = ref([]);
|
||||||
|
const goodsdata = ref([]);
|
||||||
|
const imagelistdata = ref([]);
|
||||||
|
const goodleibielist = ref([]);
|
||||||
const dialog = reactive<DialogOption>({
|
const dialog = reactive<DialogOption>({
|
||||||
visible: false,
|
visible: false,
|
||||||
title: ''
|
title: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const mksave = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '拼图详情'
|
||||||
|
});
|
||||||
|
const imagedialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '拼图碎片获得人数'
|
||||||
|
});
|
||||||
|
const mktype = ref('');
|
||||||
const numlist = ref([
|
const numlist = ref([
|
||||||
{ value: '1', label: '片数1' },
|
{ value: '1', label: '片数1' },
|
||||||
{ value: '2', label: '片数2' },
|
{ value: '2', label: '片数2' },
|
||||||
@ -271,21 +326,55 @@ const handleSelectionChange = (selection: MkJigsawVO[]) => {
|
|||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
reset();
|
reset();
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
|
goodsdata.value = [];
|
||||||
|
value2.value = [];
|
||||||
|
numlistdata.value = [
|
||||||
|
{ probability: '', name: '片数1' },
|
||||||
|
{ probability: '', name: '片数2' },
|
||||||
|
{ probability: '', name: '片数3' },
|
||||||
|
{ probability: '', name: '片数4' },
|
||||||
|
{ probability: '', name: '片数5' },
|
||||||
|
{ probability: '', name: '片数6' },
|
||||||
|
{ probability: '', name: '片数7' },
|
||||||
|
{ probability: '', name: '片数8' },
|
||||||
|
{ probability: '', name: '片数9' }
|
||||||
|
];
|
||||||
dialog.title = '添加拼图任务';
|
dialog.title = '添加拼图任务';
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: MkJigsawVO) => {
|
const handleUpdate = async (row?: MkJigsawVO, type) => {
|
||||||
reset();
|
reset();
|
||||||
|
mktype.value = type;
|
||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
const res = await getMkJigsaw(_id);
|
const res = await getMkJigsaw(_id);
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
|
numlistdata.value = form.value.jigsawDetailList;
|
||||||
|
goodsdata.value = [];
|
||||||
|
const foundObject = findObjectById(imagegoodsoptions.value, form.value.productId);
|
||||||
|
console.log(foundObject);
|
||||||
|
goodsdata.value.push(foundObject);
|
||||||
|
if (form.value.startDate && form.value.endDate) {
|
||||||
|
value2.value = [form.value.startDate, form.value.endDate];
|
||||||
|
// form.value.endDate = value2.value[1];
|
||||||
|
}
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '修改拼图任务';
|
dialog.title = '修改拼图任务';
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
|
console.log(value2.value);
|
||||||
|
if (value2.value.length > 0) {
|
||||||
|
form.value.startDate = value2.value[0];
|
||||||
|
form.value.endDate = value2.value[1];
|
||||||
|
}
|
||||||
|
form.value.jigsawDetailList = numlistdata.value;
|
||||||
|
form.value.productName = goodsdata.value[0].productName;
|
||||||
|
form.value.productCategory = goodsdata.value[0].categoryId;
|
||||||
|
|
||||||
|
// console.log(goodsdata.value,form.value);
|
||||||
|
// form.value.controlJigsawIndex = parseFloat(form.value.controlJigsawIndex);
|
||||||
mkJigsawFormRef.value?.validate(async (valid: boolean) => {
|
mkJigsawFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
@ -321,7 +410,7 @@ const handleExport = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
const selectnumlist = () => {
|
const selectnumlist = () => {
|
||||||
numlistdata.value = ([
|
numlistdata.value = [
|
||||||
{ probability: '', name: '片数1' },
|
{ probability: '', name: '片数1' },
|
||||||
{ probability: '', name: '片数2' },
|
{ probability: '', name: '片数2' },
|
||||||
{ probability: '', name: '片数3' },
|
{ probability: '', name: '片数3' },
|
||||||
@ -331,13 +420,57 @@ const selectnumlist = () => {
|
|||||||
{ probability: '', name: '片数7' },
|
{ probability: '', name: '片数7' },
|
||||||
{ probability: '', name: '片数8' },
|
{ probability: '', name: '片数8' },
|
||||||
{ probability: '', name: '片数9' }
|
{ probability: '', name: '片数9' }
|
||||||
]);
|
];
|
||||||
console.log(form.value.controlJigsawIndex);
|
console.log(form.value.controlJigsawIndex);
|
||||||
numlistdata.value = numlistdata.value.filter((i) => i.name !== form.value.controlJigsawIndex);
|
numlistdata.value = numlistdata.value.filter((i) => i.name !== form.value.controlJigsawIndex);
|
||||||
};
|
};
|
||||||
|
/*商品列表*/
|
||||||
|
const getproductall = async () => {
|
||||||
|
const res = await productall();
|
||||||
|
console.log(res);
|
||||||
|
imagegoodsoptions.value = res.data;
|
||||||
|
};
|
||||||
|
//选中商品
|
||||||
|
const goodssave = () => {
|
||||||
|
goodsdata.value = [];
|
||||||
|
const foundObject = findObjectById(imagegoodsoptions.value, form.value.productId);
|
||||||
|
console.log(foundObject);
|
||||||
|
goodsdata.value.push(foundObject);
|
||||||
|
};
|
||||||
|
const findObjectById = (array, id) => {
|
||||||
|
for (let i = 0; i < array.length; i++) {
|
||||||
|
if (array[i].id === id) {
|
||||||
|
return array[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
//碎片获取
|
||||||
|
const imagesui = async (row) => {
|
||||||
|
imagedialog.visible = true;
|
||||||
|
console.log(row);
|
||||||
|
const res = await mkJigsawDetaillist({ jigsawId: row.id });
|
||||||
|
console.log(res);
|
||||||
|
imagelistdata.value = res.data;
|
||||||
|
};
|
||||||
|
const goodleibie = async () => {
|
||||||
|
const res = await productCategoryall();
|
||||||
|
goodleibielist.value = res.data;
|
||||||
|
};
|
||||||
|
const goodsleibiesave = (id) => {
|
||||||
|
for (let i = 0; i < goodleibielist.value.length; i++) {
|
||||||
|
console.log(goodleibielist.value[i].id);
|
||||||
|
if (goodleibielist.value[i].id === id) {
|
||||||
|
return goodleibielist.value[i].category;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
|
getproductall();
|
||||||
|
goodleibie();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="笔记标题" prop="id">
|
<el-form-item label="笔记标题" prop="id">
|
||||||
<el-input v-model="queryParams.id" placeholder="请输入笔记标题" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.title" placeholder="请输入笔记标题" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发布人" prop="title">
|
<el-form-item label="发布人" prop="title">
|
||||||
<el-input v-model="queryParams.title" placeholder="请输入发布人" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.title" placeholder="请输入发布人" clearable @keyup.enter="handleQuery" />
|
||||||
|
@ -91,10 +91,10 @@
|
|||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:Route:remove']" link type="primary" @click="handleDelete(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="handleDelete(scope.row)"
|
<el-button v-if="scope.row.status == 3" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row)"
|
||||||
>撤销发布</el-button
|
>撤销发布</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@ -530,7 +530,7 @@ const handleUpdate = async (row?: RouteVO) => {
|
|||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
bookrouteDetailsList.value = form.value.routeDetailsList;
|
bookrouteDetailsList.value = form.value.routeDetailsList;
|
||||||
tagvalue.value =form.value.tagId==''?'': form.value.tagId.split(',');
|
tagvalue.value = form.value.tagId == '' ? '' : form.value.tagId.split(',');
|
||||||
treevalue.value = JSON.parse(form.value.region);
|
treevalue.value = JSON.parse(form.value.region);
|
||||||
dialog.title = '修改路线';
|
dialog.title = '修改路线';
|
||||||
};
|
};
|
||||||
@ -666,6 +666,18 @@ const yulanform = () => {
|
|||||||
const yulanquxiao = () => {
|
const yulanquxiao = () => {
|
||||||
yulandialog.visible = false;
|
yulandialog.visible = false;
|
||||||
};
|
};
|
||||||
|
const savelistrow = async (row) => {
|
||||||
|
reset();
|
||||||
|
// tagvalue.value=[]
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
const res = await getRoute(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
form.value.status = Number(res.data.status == 3 ? 0 : 2);
|
||||||
|
console.log(form.value);
|
||||||
|
await updateRoute(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
//查看详情
|
//查看详情
|
||||||
const linkontent = async (row?: RouteVO) => {
|
const linkontent = async (row?: RouteVO) => {
|
||||||
// reset();
|
// reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user