diff --git a/src/views/manage/activity/index.vue b/src/views/manage/activity/index.vue index 80f1801..64f3a28 100644 --- a/src/views/manage/activity/index.vue +++ b/src/views/manage/activity/index.vue @@ -92,10 +92,10 @@ @click="handleUpdate(scope.row)" >编辑</el-button > - <el-button v-if="scope.row.status == 0" v-hasPermi="['system:article:edit']" link type="primary" @click="handleUpdate(scope.row)" + <el-button v-if="scope.row.status == 0" v-hasPermi="['system:article:edit']" link type="primary" @click="saveupdate(scope.row, 1)" >发布</el-button > - <el-button v-if="scope.row.status == 3" v-hasPermi="['system:article:edit']" link type="primary" @click="handleUpdate(scope.row)" + <el-button v-if="scope.row.status == 3" v-hasPermi="['system:article:edit']" link type="primary" @click="saveupdate(scope.row, 2)" >撤销发布</el-button > <el-button @@ -396,7 +396,21 @@ const handleAdd = () => { listdatatime.value = [{ activityTime: '', planContent: '' }]; dialog.title = '添加活动信息'; }; - +// 发布撤销发布 +const saveupdate = async (row?: ActivityVO, type) => { + const _id = row?.id || ids.value[0]; + const res = await getActivity(_id); + const arr = await activityprocess({ activityId: _id }); + Object.assign(form.value, res.data); + form.value.status = type == 1 ? 2 : 0; + const test = type == 1 ? '发布' : '撤销发布'; + const _ids = row?.activityName || ids.value; + await proxy?.$modal.confirm('是否确认' + test + '活动信息编号为' + _ids + '的数据项?').finally(() => (loading.value = false)); + await updateActivity(form.value).finally(() => (buttonLoading.value = false)); + proxy?.$modal.msgSuccess(test + '成功'); + await getList(); + // await updateActivity(form.value).finally(() => (buttonLoading.value = false)); +}; /** 修改按钮操作 */ const handleUpdate = async (row?: ActivityVO) => { reset(); @@ -446,7 +460,7 @@ const submitForm = () => { /** 删除按钮操作 */ const handleDelete = async (row?: ActivityVO) => { - const _ids = row?.id || ids.value; + const _ids = row?.activityName || ids.value; await proxy?.$modal.confirm('是否确认删除活动信息编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false)); await delActivity(_ids); proxy?.$modal.msgSuccess('删除成功'); diff --git a/src/views/manage/hotel/index.vue b/src/views/manage/hotel/index.vue index fddf3d9..8d49a65 100644 --- a/src/views/manage/hotel/index.vue +++ b/src/views/manage/hotel/index.vue @@ -110,6 +110,7 @@ </el-input> </el-form-item> <tlbs-map + v-if="dialog.visible" ref="map" style="margin-left: 80px" api-key=" @@ -148,6 +149,7 @@ const buttonLoading = ref(false); const loading = ref(true); const showSearch = ref(true); const ids = ref<Array<string | number>>([]); +const idsname = ref([]); const single = ref(true); const multiple = ref(true); const total = ref(0); @@ -250,6 +252,7 @@ const handleSelectionChange = (selection: HotelVO[]) => { multiple.value = result; console.log(result, multiple.value); ids.value = selection.map((item) => item.id); + idsname.value = selection.map((item) => item.name); single.value = selection.length != 1; }; @@ -258,6 +261,8 @@ const handleAdd = () => { reset(); dialog.visible = true; dialog.title = '添加住宿'; + geometries.value = [{ styleId: 'marker', position: { lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 } }]; + center.value = { lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 }; }; /** 修改按钮操作 */ @@ -294,8 +299,9 @@ const submitForm = () => { /** 删除按钮操作 */ const handleDelete = async (row?: HotelVO) => { + console.log(ids.value); const _ids = row?.id || ids.value; - const _idname = row?.name; + const _idname = row?.name || idsname.value; await proxy?.$modal.confirm('是否确认删除商家名称为"' + _idname + '"的数据项?').finally(() => (loading.value = false)); await delHotel(_ids); proxy?.$modal.msgSuccess('删除成功'); @@ -431,5 +437,4 @@ onMounted(() => { getList(); }); </script> -<style scoped> -</style> +<style scoped></style> diff --git a/src/views/manage/noteManage/index.vue b/src/views/manage/noteManage/index.vue index 55f16d0..a2db6f4 100644 --- a/src/views/manage/noteManage/index.vue +++ b/src/views/manage/noteManage/index.vue @@ -297,10 +297,14 @@ watch( */ const formatTag = (tagId: string | null) => { let tagString = ''; + let arrlist = tagId?.split(',').map(Number); for (let i = 0; i < sys_user_tagOptions.value.length; i++) { const element = sys_user_tagOptions.value[i]; - if (tagId?.includes(element.id)) { - tagString += ',' + element.title; + for (let j = 0; j < arrlist.length; j++) { + const conten = arrlist[j]; + if (conten == element.id) { + tagString += ',' + element.title; + } } } return tagString.substring(1); diff --git a/src/views/manage/banned/index.vue b/src/views/manage/report/index.vue similarity index 97% rename from src/views/manage/banned/index.vue rename to src/views/manage/report/index.vue index 39d853d..1ac7c0b 100644 --- a/src/views/manage/banned/index.vue +++ b/src/views/manage/report/index.vue @@ -77,8 +77,13 @@ <el-table-column label="举报人" align="center" prop="informerUserName" /> <el-table-column label="举报时间" align="center" prop="createTime" width="200px" /> <el-table-column label="操作时间" align="center" prop="updateTime" width="200px" /> - <el-table-column label="操作人" align="center" prop="updateByName" width="150px" /> - <el-table-column label="状态" align="center" prop="handLingStatus" /> + <el-table-column label="操作人" align="center" prop="updateName" width="150px" /> + <el-table-column label="状态" align="center" prop="handlingStatus" > + <template #default="scope"> + <el-tag v-if="scope.row.handlingStatus == 0" type="info">未处理</el-tag> + <el-tag v-if="scope.row.handlingStatus == 1" type="warning">已处理</el-tag> + </template> + </el-table-column> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px"> <template #default="scope"> <el-button v-hasPermi="['manage:report:edit']" link type="primary" @click="handleUpdate(scope.row)">封禁</el-button> diff --git a/src/views/manage/route/index.vue b/src/views/manage/route/index.vue index 70b4e25..d61a289 100644 --- a/src/views/manage/route/index.vue +++ b/src/views/manage/route/index.vue @@ -119,13 +119,13 @@ <el-form-item label="路线封面"> <!-- <imageUpload :model-value="form.img" :file-size="20" />--> </el-form-item> - <el-form-item label="路线标签" prop="tagvalue"> + <el-form-item label="路线标签" prop="tagId"> <!-- <el-input v-model="form.province" placeholder="请输入省code" /> --> <el-select v-model="tagvalue" filterable placeholder="请输入要搜索的标签" style="width: 400px" multiple> <el-option v-for="item in sys_user_tagOptions" :key="item.id" :label="item.title" :value="item.id" /> </el-select> </el-form-item> - <el-form-item label="涉及的行政区域" prop="treevalue"> + <el-form-item label="涉及的行政区域" prop="region"> <el-cascader v-model="treevalue" :options="regiontree" :props="props" clearable placeholder="请选择涉及的行政区域" style="width: 400px" /> </el-form-item> <div style="display: flex">