优化接口参数类型及UI显示细节
This commit is contained in:
parent
dfda574ca2
commit
648ceef0e6
@ -199,7 +199,7 @@ export interface DyUserForm extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 封禁天数
|
* 封禁天数
|
||||||
*/
|
*/
|
||||||
banDays?: number;
|
banDays?: number | string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 经度
|
* 经度
|
||||||
|
@ -65,7 +65,7 @@ export const delNotebook = (id: string | number | Array<string | number>) => {
|
|||||||
* 查询标签
|
* 查询标签
|
||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
export const tagall = (): AxiosPromise<NotebookVO> => {
|
export const tagall = () => {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/tag/all',
|
url: '/manage/tag/all',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
@ -75,7 +75,7 @@ export const tagall = (): AxiosPromise<NotebookVO> => {
|
|||||||
* 查询景点
|
* 查询景点
|
||||||
* @param query
|
* @param query
|
||||||
*/
|
*/
|
||||||
export const contentall = (query?: NotebookQuery): AxiosPromise<NotebookVO> => {
|
export const contentall = (query?: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/content/all',
|
url: '/manage/content/all',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -77,7 +77,7 @@ export const getRegionTree = (query?: RouteForm) => {
|
|||||||
* 住宿下拉列表
|
* 住宿下拉列表
|
||||||
* @param query
|
* @param query
|
||||||
*/
|
*/
|
||||||
export const hotelall = (query?: RouteForm) => {
|
export const hotelall = (query?: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/hotel/all',
|
url: '/manage/hotel/all',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -1,28 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-upload
|
<el-upload v-if="type === 'url'" :action="upload.url" :before-upload="handleBeforeUpload"
|
||||||
v-if="type === 'url'"
|
:on-success="handleUploadSuccess" :on-error="handleUploadError" class="editor-img-uploader" name="file"
|
||||||
:action="upload.url"
|
:show-file-list="false" :headers="upload.headers">
|
||||||
:before-upload="handleBeforeUpload"
|
|
||||||
:on-success="handleUploadSuccess"
|
|
||||||
:on-error="handleUploadError"
|
|
||||||
class="editor-img-uploader"
|
|
||||||
name="file"
|
|
||||||
:show-file-list="false"
|
|
||||||
:headers="upload.headers"
|
|
||||||
>
|
|
||||||
<i ref="uploadRef"></i>
|
<i ref="uploadRef"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="editor">
|
<div class="editor">
|
||||||
<quill-editor
|
<quill-editor ref="quillEditorRef" v-model:content="content" content-type="html" :options="options" :style="styles"
|
||||||
ref="quillEditorRef"
|
@text-change="(e: any) => $emit('update:modelValue', content)" />
|
||||||
v-model:content="content"
|
|
||||||
content-type="html"
|
|
||||||
:options="options"
|
|
||||||
:style="styles"
|
|
||||||
@text-change="(e: any) => $emit('update:modelValue', content)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -102,6 +88,7 @@ const styles = computed(() => {
|
|||||||
if (props.height) {
|
if (props.height) {
|
||||||
style.height = `${props.height}px`;
|
style.height = `${props.height}px`;
|
||||||
}
|
}
|
||||||
|
style.width = '1000px';
|
||||||
return style;
|
return style;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -166,77 +153,96 @@ const handleUploadError = (err: any) => {
|
|||||||
.editor-img-uploader {
|
.editor-img-uploader {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor,
|
.editor,
|
||||||
.ql-toolbar {
|
.ql-toolbar {
|
||||||
white-space: pre-wrap !important;
|
white-space: pre-wrap !important;
|
||||||
line-height: normal !important;
|
line-height: normal !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quill-img {
|
.quill-img {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-tooltip[data-mode='link']::before {
|
.ql-snow .ql-tooltip[data-mode='link']::before {
|
||||||
content: '请输入链接地址:';
|
content: '请输入链接地址:';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
|
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
content: '保存';
|
content: '保存';
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-tooltip[data-mode='video']::before {
|
.ql-snow .ql-tooltip[data-mode='video']::before {
|
||||||
content: '请输入视频地址:';
|
content: '请输入视频地址:';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
|
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
|
||||||
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
|
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
|
||||||
content: '14px';
|
content: '14px';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='small']::before,
|
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='small']::before,
|
||||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='small']::before {
|
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='small']::before {
|
||||||
content: '10px';
|
content: '10px';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='large']::before,
|
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='large']::before,
|
||||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='large']::before {
|
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='large']::before {
|
||||||
content: '18px';
|
content: '18px';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='huge']::before,
|
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='huge']::before,
|
||||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='huge']::before {
|
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='huge']::before {
|
||||||
content: '32px';
|
content: '32px';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
|
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
|
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
|
||||||
content: '文本';
|
content: '文本';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='1']::before,
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='1']::before,
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before {
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before {
|
||||||
content: '标题1';
|
content: '标题1';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='2']::before,
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='2']::before,
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before {
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before {
|
||||||
content: '标题2';
|
content: '标题2';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='3']::before,
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='3']::before,
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='3']::before {
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='3']::before {
|
||||||
content: '标题3';
|
content: '标题3';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='4']::before,
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='4']::before,
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='4']::before {
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='4']::before {
|
||||||
content: '标题4';
|
content: '标题4';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='5']::before,
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='5']::before,
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='5']::before {
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='5']::before {
|
||||||
content: '标题5';
|
content: '标题5';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='6']::before,
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='6']::before,
|
||||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='6']::before {
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='6']::before {
|
||||||
content: '标题6';
|
content: '标题6';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
|
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
|
||||||
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
|
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
|
||||||
content: '标准字体';
|
content: '标准字体';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='serif']::before,
|
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='serif']::before,
|
||||||
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='serif']::before {
|
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='serif']::before {
|
||||||
content: '衬线字体';
|
content: '衬线字体';
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='monospace']::before,
|
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='monospace']::before,
|
||||||
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='monospace']::before {
|
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='monospace']::before {
|
||||||
content: '等宽字体';
|
content: '等宽字体';
|
||||||
|
@ -7,8 +7,11 @@
|
|||||||
<!-- <el-table-column label="ID" align="center" prop="id" v-if="props.parentName != 'dyUser'" /> -->
|
<!-- <el-table-column label="ID" align="center" prop="id" v-if="props.parentName != 'dyUser'" /> -->
|
||||||
<el-table-column label="笔记标题" align="center" prop="title" width="180px" />
|
<el-table-column label="笔记标题" align="center" prop="title" width="180px" />
|
||||||
<el-table-column label="笔记封面" align="center" prop="" width="80px" />
|
<el-table-column label="笔记封面" align="center" prop="" width="80px" />
|
||||||
<el-table-column label="笔记类别" align="center" prop="" width="80px" />
|
<el-table-column label="标记地点" align="center" prop="location">
|
||||||
<el-table-column label="标记地点" align="center" prop="location" width="180px" />
|
<template #default="scope">
|
||||||
|
<span>{{ formatlocation(scope.row.location) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="标签" align="center" prop="">
|
<el-table-column label="标签" align="center" prop="">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ formatTag(scope.row.tagId.toString()) }}</span>
|
<span>{{ formatTag(scope.row.tagId.toString()) }}</span>
|
||||||
@ -54,8 +57,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination v-show="total > 0" id="table_page" :total="total" v-model:page="queryParams.pageNum"
|
|
||||||
v-model:limit="queryParams.pageSize" @pagination="getTableList" />
|
|
||||||
<!-- 笔记详情弹层 -->
|
<!-- 笔记详情弹层 -->
|
||||||
<el-dialog title="笔记详情" v-model="noteDetail.visible" width="500px" append-to-body>
|
<el-dialog title="笔记详情" v-model="noteDetail.visible" width="500px" append-to-body>
|
||||||
<div>
|
<div>
|
||||||
@ -88,6 +89,9 @@
|
|||||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||||
import { string } from 'vue-types';
|
import { string } from 'vue-types';
|
||||||
import { listByTagIdNotebook } from '@/api/manage/scenic';
|
import { listByTagIdNotebook } from '@/api/manage/scenic';
|
||||||
|
import { tagall,contentall } from '@/api/manage/notebook';
|
||||||
|
import { hotelall } from '@/api/manage/route';
|
||||||
|
|
||||||
|
|
||||||
//导入父组件传递的值
|
//导入父组件传递的值
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -107,10 +111,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: () => ''
|
default: () => ''
|
||||||
},
|
},
|
||||||
sys_user_tagOptions: {
|
// sys_user_tagOptions: {
|
||||||
type: Array,
|
// type: Array,
|
||||||
default: () => []
|
// default: () => []
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@ -153,14 +157,16 @@ const handleComment = async (row: any) => {
|
|||||||
}
|
}
|
||||||
// 监听父组件传递的tagIds,当tagIds发生变化时,重新获取数据
|
// 监听父组件传递的tagIds,当tagIds发生变化时,重新获取数据
|
||||||
watch(
|
watch(
|
||||||
() => props.noteBookTagIds,
|
() => props.articleList,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
console.log(newVal);
|
console.log(newVal);
|
||||||
queryParams.tagIds = newVal;
|
queryParams.tagIds = newVal;
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
//获取数据
|
//获取数据
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
getTableList();
|
// getTableList();
|
||||||
|
getTag();
|
||||||
|
getContent();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -186,14 +192,8 @@ const handleDelete = (row: any) => {
|
|||||||
*/
|
*/
|
||||||
const formatTag = (tagId: string | null) => {
|
const formatTag = (tagId: string | null) => {
|
||||||
let tagString = '';
|
let tagString = '';
|
||||||
// for (let i = 0; i < props.sys_user_tagOptions.length; i++) {
|
for (let i = 0; i < sys_user_tagOptions.value.length; i++) {
|
||||||
// const element:any = props.sys_user_tagOptions[i];
|
const element:any = sys_user_tagOptions.value[i];
|
||||||
// if (tagId?.includes(element.id)) {
|
|
||||||
// tagString += ',' + element.title;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
for (let i = 0; i < props.sys_user_tagOptions.length; i++) {
|
|
||||||
const element:any = props.sys_user_tagOptions[i];
|
|
||||||
if (tagId!=null) {
|
if (tagId!=null) {
|
||||||
let filteredArray = tagId.split(',').filter((item) => item==element.id);
|
let filteredArray = tagId.split(',').filter((item) => item==element.id);
|
||||||
if (filteredArray.length>0) {
|
if (filteredArray.length>0) {
|
||||||
@ -203,6 +203,36 @@ const formatTag = (tagId: string | null) => {
|
|||||||
}
|
}
|
||||||
return tagString.substring(1);
|
return tagString.substring(1);
|
||||||
};
|
};
|
||||||
|
const sys_user_contentOptions = ref([]); //标签库
|
||||||
|
// 获取地点
|
||||||
|
const getContent = async () => {
|
||||||
|
const res = await contentall({ status: 2 });
|
||||||
|
const arr = await hotelall({ status: 1 });
|
||||||
|
sys_user_contentOptions.value = res.concat(arr); //地点
|
||||||
|
};
|
||||||
|
// 获取标签
|
||||||
|
const sys_user_tagOptions=ref([]);//
|
||||||
|
const getTag = async () => {
|
||||||
|
const res = await tagall();
|
||||||
|
Object.assign(sys_user_tagOptions.value,res);
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 标记地点格式化
|
||||||
|
*/
|
||||||
|
const formatlocation = (tagId: string | null) => {
|
||||||
|
let tagString = '';
|
||||||
|
let arrlist = tagId?.split(',').map(Number);
|
||||||
|
for (let i = 0; i < sys_user_contentOptions.value.length; i++) {
|
||||||
|
const element = sys_user_contentOptions.value[i];
|
||||||
|
for (let j = 0; j < arrlist.length; j++) {
|
||||||
|
const conten = arrlist[j];
|
||||||
|
if (conten == element.id) {
|
||||||
|
tagString += ',' + element.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tagString.substring(1);
|
||||||
|
};
|
||||||
// 导入父组件定义的函数
|
// 导入父组件定义的函数
|
||||||
const emit = defineEmits(['hideDialog', 'handleUpdate', 'handleDelete']);
|
const emit = defineEmits(['hideDialog', 'handleUpdate', 'handleDelete']);
|
||||||
</script>
|
</script>
|
||||||
|
@ -40,7 +40,12 @@
|
|||||||
<el-table v-loading="loading" :height="autoTableHeight" border :data="articleList"
|
<el-table v-loading="loading" :height="autoTableHeight" border :data="articleList"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
<el-table-column label="ID" align="center" prop="id" v-if="true" width="180px" />
|
<!-- <el-table-column label="ID" align="center" prop="id" v-if="true" width="180px" /> -->
|
||||||
|
<el-table-column fixed label="序号" align="center" width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="标题" align="center" prop="title" />
|
<el-table-column label="标题" align="center" prop="title" />
|
||||||
<el-table-column label="内容" align="center" prop="content" width="80px">
|
<el-table-column label="内容" align="center" prop="content" width="80px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -58,7 +63,7 @@
|
|||||||
<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="success">审核中</el-tag>
|
<el-tag v-if="scope.row.status == 1" type="success">审核中</el-tag>
|
||||||
<el-tag v-if="scope.row.status == 2" 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="updateTime" width="120">
|
<el-table-column label="更新时间" align="center" prop="updateTime" width="120">
|
||||||
@ -69,9 +74,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" v-if="scope.row.status == 0" @click="updateRow(scope.row,'2')"
|
<el-button link type="primary" v-if="scope.row.status == 0" @click="updateRow(scope.row,1)"
|
||||||
v-hasPermi="['manage:article:edit']">发布</el-button>
|
v-hasPermi="['manage:article:edit']">发布</el-button>
|
||||||
<el-button link type="primary" v-if="scope.row.status == 2" @click="updateRow(scope.row,'0')"
|
<el-button link type="primary" v-if="scope.row.status == 2" @click="updateRow(scope.row,0)"
|
||||||
v-hasPermi="['manage:article:edit']">撤销发布</el-button>
|
v-hasPermi="['manage:article:edit']">撤销发布</el-button>
|
||||||
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0">
|
<el-tooltip content="编辑" placement="top" v-if="scope.row.status == 0">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)"
|
<el-button link type="primary" @click="handleUpdate(scope.row)"
|
||||||
@ -88,7 +93,7 @@
|
|||||||
<pagination id="table_page" v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
<pagination id="table_page" v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
<!-- 添加或修改文章对话框 -->
|
<!-- 添加或修改文章对话框 -->
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="700px" append-to-body>
|
<el-dialog :title="dialog.title" v-model="dialog.visible" :width="dialogWidth" append-to-body>
|
||||||
<el-form ref="articleFormRef" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="articleFormRef" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="文章标题" prop="title">
|
<el-form-item label="文章标题" prop="title">
|
||||||
<el-input v-model="form.title" placeholder="请输入文章标题" />
|
<el-input v-model="form.title" placeholder="请输入文章标题" />
|
||||||
@ -131,7 +136,7 @@
|
|||||||
import { listTag,tagAll } from '@/api/manage/tag';
|
import { listTag,tagAll } from '@/api/manage/tag';
|
||||||
import { listArticle, getArticle, delArticle, addArticle, updateArticle } from '@/api/manage/article';
|
import { listArticle, getArticle, delArticle, addArticle, updateArticle } from '@/api/manage/article';
|
||||||
import { ArticleVO, ArticleQuery, ArticleForm } from '@/api/manage/article/types';
|
import { ArticleVO, ArticleQuery, ArticleForm } from '@/api/manage/article/types';
|
||||||
|
const dialogWidth=ref(window.innerWidth*0.6+'px');
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const sys_user_tagOptions = ref([]); //标签库
|
const sys_user_tagOptions = ref([]); //标签库
|
||||||
const autoTableHeight = ref<number>(750);
|
const autoTableHeight = ref<number>(750);
|
||||||
@ -286,11 +291,12 @@ const handleUpdate = async (row?:any) => {
|
|||||||
* @param row 发布,撤销发布
|
* @param row 发布,撤销发布
|
||||||
* @param type
|
* @param type
|
||||||
*/
|
*/
|
||||||
const updateRow = async (row: any, type: string) => {
|
const updateRow = async (row: any, type: number) => {
|
||||||
await proxy?.$modal.confirm('是否确认' + (type == '0' ? '撤销发布' : '发布') + '名称为"' + row.title + '"的数据项?');
|
await proxy?.$modal.confirm('是否确认' + (type == 0 ? '撤销发布' : '发布') + '名称为"' + row.title + '"的数据项?');
|
||||||
row.status = type;
|
Object.assign(form.value, row);
|
||||||
|
form.value.status = type;
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
await updateArticle(row).finally(() => (buttonLoading.value = false));
|
await updateArticle(form.value).finally(() => (buttonLoading.value = false));
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<el-table-column label="状态" align="center" prop="" width="90px">
|
<el-table-column label="状态" align="center" prop="" width="90px">
|
||||||
<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="success">已上架</el-tag>
|
<el-tag v-if="scope.row.status == 1" 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="180px">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px">
|
||||||
|
@ -48,13 +48,22 @@
|
|||||||
<el-table :height="autoTableHeight" v-loading="loading" :data="dyUserList" @selection-change="handleSelectionChange"
|
<el-table :height="autoTableHeight" v-loading="loading" :data="dyUserList" @selection-change="handleSelectionChange"
|
||||||
style="width: 100%" border>
|
style="width: 100%" border>
|
||||||
<!-- <el-table-column fixed type="selection" width="55" align="center" /> -->
|
<!-- <el-table-column fixed type="selection" width="55" align="center" /> -->
|
||||||
<el-table-column fixed label="用户ID" align="center" prop="id" />
|
<el-table-column fixed label="序号" align="center" width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column fixed label="用户ID" align="center" prop="id" /> -->
|
||||||
<el-table-column fixed label="帐号状态" align="center" prop="status">
|
<el-table-column fixed label="帐号状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="dy_user_status" :value="scope.row.status" />
|
<dict-tag :options="dy_user_status" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed label="会员等级" align="center" prop="levelName" />
|
<el-table-column fixed label="会员等级" align="center" prop="levelId">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ levelList.find(item => item.id === scope.row.levelId)?.levelName }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column fixed label="昵称" align="center" prop="nickName" />
|
<el-table-column fixed label="昵称" align="center" prop="nickName" />
|
||||||
<el-table-column label="用户性别" align="center" prop="sex">
|
<el-table-column label="用户性别" align="center" prop="sex">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -134,7 +143,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="80" label="处理方式" align="center" prop="">
|
<el-table-column width="80" label="处理方式" align="center" prop="">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="dy_user_status" :value="scope.row.status" />
|
<dict-tag v-if="scope.row.status!=0" :options="dy_user_status" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="150" label="封禁理由" align="center" prop="reason" show-overflow-tooltip>
|
<el-table-column width="150" label="封禁理由" align="center" prop="reason" show-overflow-tooltip>
|
||||||
@ -142,9 +151,9 @@
|
|||||||
<dict-tag :options="dy_user_ban_mode" :value="scope.row.reason" />
|
<dict-tag :options="dy_user_ban_mode" :value="scope.row.reason" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="80" label="封禁天数" align="center" prop="banDays">
|
<el-table-column width="80" label="封禁天数" align="center" prop="">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="dy_user_ban_days" :value="scope.row.banDays" />
|
<dict-tag v-if="scope.row.banDays!='0'" :options="dy_user_ban_days" :value="scope.row.banDays" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="90" label="操作人" align="center" prop="" />
|
<el-table-column width="90" label="操作人" align="center" prop="" />
|
||||||
@ -173,8 +182,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="处理方式" prop="status">
|
<el-form-item label="处理方式" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio v-for="dict in dy_user_status" :key="dict.value" :label="dict.label"
|
<el-radio v-for="dict in dy_user_status" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"
|
||||||
:value="parseInt(dict.value)">{{ dict.label }}</el-radio>
|
v-show="dict.value != '0'">{{ dict.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="处理天数" prop="banDays">
|
<el-form-item label="处理天数" prop="banDays">
|
||||||
@ -514,8 +523,8 @@ const handleStatus = async (row: DyUserVO) => {
|
|||||||
await proxy?.$modal.confirm('是否确认解封用户昵称为"' + row.nickName + '"的数据项?')
|
await proxy?.$modal.confirm('是否确认解封用户昵称为"' + row.nickName + '"的数据项?')
|
||||||
Object.assign(form.value, row);
|
Object.assign(form.value, row);
|
||||||
form.value.status = 0;
|
form.value.status = 0;
|
||||||
form.value.reason = null;
|
form.value.reason = '';
|
||||||
form.value.banDays=null
|
form.value.banDays='0';
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await updateDyUser(form.value).finally(() => (loading.value = false));
|
await updateDyUser(form.value).finally(() => (loading.value = false));
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
<el-form-item label="发布状态" prop="status">
|
<el-form-item label="发布状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" class="inputWidth" placeholder="请选择发布状态" clearable
|
<el-select v-model="queryParams.status" class="inputWidth" placeholder="请选择发布状态" clearable
|
||||||
@keyup.enter="handleQuery">
|
@keyup.enter="handleQuery">
|
||||||
<el-option label="已发布" :value="1" />
|
|
||||||
<el-option label="未发布" :value="0" />
|
<el-option label="未发布" :value="0" />
|
||||||
|
<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>
|
||||||
@ -41,8 +42,9 @@
|
|||||||
<el-table-column label="排序" align="center" prop="shor" />
|
<el-table-column label="排序" align="center" prop="shor" />
|
||||||
<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 == 1" type="success">已发布</el-tag>
|
<el-tag v-if="scope.row.status == 0" type="info">未发布</el-tag>
|
||||||
<el-tag v-else type="info">未发布</el-tag>
|
<el-tag v-else-if="scope.row.status == 1" type="success">审核中</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.status == 1" type="primary">已发布</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建者" align="center" prop="createName" />
|
<el-table-column label="创建者" align="center" prop="createName" />
|
||||||
@ -244,7 +246,7 @@ const submitForm = () => {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: IpImageVO) => {
|
const handleDelete = async (row?: IpImageVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
const _ids = row?.id || ids.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除IP形象编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
|
await proxy?.$modal.confirm('是否确认删除IP形象为"' + row.ipName + '"的数据项?').finally(() => loading.value = false);
|
||||||
await delIpImage(_ids);
|
await delIpImage(_ids);
|
||||||
proxy?.$modal.msgSuccess("删除成功");
|
proxy?.$modal.msgSuccess("删除成功");
|
||||||
await getList();
|
await getList();
|
||||||
|
@ -37,7 +37,8 @@
|
|||||||
</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 == 0 ? '未发布' : '已发布' }}</span>
|
<el-tag v-if="scope.row.status == 0" type="info">未发布</el-tag>
|
||||||
|
<el-tag v-if="scope.row.status == 1" type="primary">已发布</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建者" align="center" prop="createName" />
|
<el-table-column label="创建者" align="center" prop="createName" />
|
||||||
|
@ -53,7 +53,8 @@
|
|||||||
<!-- 0-未上架 1-已上架 -->
|
<!-- 0-未上架 1-已上架 -->
|
||||||
<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 == 1 ? '已上架' : '未上架'}}</span>
|
<el-tag v-if="scope.row.status == 0" type="info">未上架</el-tag>
|
||||||
|
<el-tag v-if="scope.row.status == 1" type="primary">已上架</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建者" align="center" prop="updateByName" />
|
<el-table-column label="创建者" align="center" prop="updateByName" />
|
||||||
|
@ -71,7 +71,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订单号" align="center" prop="orderNumber" />
|
<el-table-column label="订单号" align="center" prop="orderNumber" />
|
||||||
<el-table-column label="来源" align="center" prop="source" width="80px" />
|
<el-table-column label="来源" align="center" prop="source" width="80px">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="dy_order_source" :value="scope.row.source" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="商品名称" align="center" prop="productName" />
|
<el-table-column label="商品名称" align="center" prop="productName" />
|
||||||
<el-table-column label="商品图片" align="center" prop="productImageUrl" width="100">
|
<el-table-column label="商品图片" align="center" prop="productImageUrl" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -86,7 +90,9 @@
|
|||||||
<el-table-column label="供应商" align="center" prop="vendorId" />
|
<el-table-column label="供应商" align="center" prop="vendorId" />
|
||||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="dy_order_status" :value="scope.row.orderStatus" />
|
<!-- <dict-tag :options="dy_order_status" :value="scope.row.orderStatus" /> -->
|
||||||
|
<el-tag v-if="scope.row.orderStatus == 0" type="info">未发货</el-tag>
|
||||||
|
<el-tag v-if="scope.row.orderStatus == 1" type="primary">已发货</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物流名称" align="center" prop="logisticsName" />
|
<el-table-column label="物流名称" align="center" prop="logisticsName" />
|
||||||
@ -94,8 +100,8 @@
|
|||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" v-if="scope.row.orderStatus == 0" v-hasPermi="['manage:orders:edit']"
|
<el-button link type="primary" v-if="scope.row.orderStatus == 0" v-hasPermi="['manage:orders:edit']"
|
||||||
@click="handleOrderStatus(scope.row,'1')">发货</el-button>
|
@click="handleOrderStatus(scope.row,1)">发货</el-button>
|
||||||
<el-button link type="primary" @click="handleOrderStatus(scope.row,'0')" v-if="scope.row.orderStatus == 1"
|
<el-button link type="primary" @click="handleOrderStatus(scope.row,0)" v-if="scope.row.orderStatus == 1"
|
||||||
v-hasPermi="['manage:orders:edit']">撤销发货</el-button>
|
v-hasPermi="['manage:orders:edit']">撤销发货</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -267,9 +273,10 @@ const handleAdd = () => {
|
|||||||
*/
|
*/
|
||||||
const handleOrderStatus = async (row: OrdersVO,type:string|number) => {
|
const handleOrderStatus = async (row: OrdersVO,type:string|number) => {
|
||||||
await proxy?.$modal.confirm('是否确认' + (type == '0' ? '撤销发货' : '发货') + '商品名称为"' + row.productName + '"的数据项?');
|
await proxy?.$modal.confirm('是否确认' + (type == '0' ? '撤销发货' : '发货') + '商品名称为"' + row.productName + '"的数据项?');
|
||||||
row.orderStatus = type;
|
Object.assign(form.value, row);
|
||||||
|
form.value.orderStatus = type;
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
await updateOrders(row).finally(() => (buttonLoading.value = false));
|
await updateOrders(form.value).finally(() => (buttonLoading.value = false));
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,12 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" border :height="autoTableHeight" :data="productList"
|
<el-table v-loading="loading" border :height="autoTableHeight" :data="productList"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column label="商品ID" align="center" prop="id" v-if="true" width="180px" />
|
<!-- <el-table-column label="商品ID" align="center" prop="id" v-if="true" width="180px" /> -->
|
||||||
|
<el-table-column fixed label="序号" align="center" width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="商品名称" align="center" prop="productName" />
|
<el-table-column label="商品名称" align="center" prop="productName" />
|
||||||
<el-table-column label="商品类别" align="center" prop="categoryId">
|
<el-table-column label="商品类别" align="center" prop="categoryId">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -48,7 +53,9 @@
|
|||||||
<el-table-column label="排序" align="center" prop="sortNum" />
|
<el-table-column label="排序" align="center" prop="sortNum" />
|
||||||
<el-table-column label="商品状态" align="center" prop="status">
|
<el-table-column label="商品状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="sys_shelf_status" :value="scope.row.status" />
|
<!-- <dict-tag :options="sys_shelf_status" :value="scope.row.status" /> -->
|
||||||
|
<el-tag v-if="scope.row.status == 0" type="info">未上架</el-tag>
|
||||||
|
<el-tag v-if="scope.row.status == 1" type="primary">已上架</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="供应商" align="center" prop="vendorId">
|
<el-table-column label="供应商" align="center" prop="vendorId">
|
||||||
|
@ -133,7 +133,7 @@ const productCategoryFormRef = ref<ElFormInstance>();
|
|||||||
const wishParams = reactive({
|
const wishParams = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
id: undefined,
|
productCategoryId: undefined,
|
||||||
})
|
})
|
||||||
const dialog = reactive<DialogOption>({
|
const dialog = reactive<DialogOption>({
|
||||||
visible: false,
|
visible: false,
|
||||||
@ -274,7 +274,7 @@ const handleMakeWish = async (row: ProductCategoryVO) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
wishParams.id= row.id;
|
wishParams.productCategoryId= row.id;
|
||||||
getWishUserList();
|
getWishUserList();
|
||||||
makeWish.visible = true;
|
makeWish.visible = true;
|
||||||
}
|
}
|
||||||
|
@ -130,9 +130,9 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <span>{{ scope.row.status == 0 ? '未发布' : scope.row.status == 1 ? '审核中' : scope.row.status == 2 ? '已发布' : '草稿' }}</span> -->
|
<!-- <span>{{ scope.row.status == 0 ? '未发布' : scope.row.status == 1 ? '审核中' : scope.row.status == 2 ? '已发布' : '草稿' }}</span> -->
|
||||||
<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="success">审核中</el-tag>
|
||||||
<el-tag v-if="scope.row.status == 2" type="success">已发布</el-tag>
|
<el-tag v-if="scope.row.status == 2" type="primary">已发布</el-tag>
|
||||||
<el-tag v-if="scope.row.status == 3" type="danger">草稿</el-tag>
|
<el-tag v-if="scope.row.status == 3" type="warning">草稿</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作人" align="center" prop="updateByName" width="120px" />
|
<el-table-column label="操作人" align="center" prop="updateByName" width="120px" />
|
||||||
@ -226,7 +226,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="标签" prop="tagId_copy">
|
<el-form-item label="标签" prop="tagId_copy">
|
||||||
<el-select class="inputWidth" v-model="form.tagId_copy" multiple filterable placeholder="请选择标签" clearable>
|
<el-select class="inputWidth" v-model="form.tagId_copy" multiple filterable placeholder="请选择标签" clearable
|
||||||
|
@visible-change="getTagList">
|
||||||
<el-option v-for="dict in sys_user_tagOptions" :key="dict.id" :label="dict.title"
|
<el-option v-for="dict in sys_user_tagOptions" :key="dict.id" :label="dict.title"
|
||||||
:value="String(dict.id)" />
|
:value="String(dict.id)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -602,6 +603,11 @@ const getTag = async () => {
|
|||||||
const res = await tagAll();
|
const res = await tagAll();
|
||||||
sys_user_tagOptions.value = res; //标签库
|
sys_user_tagOptions.value = res; //标签库
|
||||||
};
|
};
|
||||||
|
const getTagList = async (visible: boolean) => {
|
||||||
|
if (visible) {
|
||||||
|
getTag(); //标签库
|
||||||
|
}
|
||||||
|
}
|
||||||
//输入位置,搜索位置
|
//输入位置,搜索位置
|
||||||
const performSearch = async (text) => {
|
const performSearch = async (text) => {
|
||||||
// 这里简单模拟延迟,模拟真实的异步请求耗时
|
// 这里简单模拟延迟,模拟真实的异步请求耗时
|
||||||
@ -618,8 +624,6 @@ const performSearch = async (text) => {
|
|||||||
jsonp(`https://apis.map.qq.com/ws/geocoder/v1/?address=${text}&key=${'6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO'}&output=jsonp`, {}).then((data) => {
|
jsonp(`https://apis.map.qq.com/ws/geocoder/v1/?address=${text}&key=${'6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO'}&output=jsonp`, {}).then((data) => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data.status == 0) {
|
if (data.status == 0) {
|
||||||
center.value.lat = data.result.location.lat;
|
|
||||||
center.value.lng = data.result.location.lng;
|
|
||||||
form.value.address =
|
form.value.address =
|
||||||
data.result.address_components.province +
|
data.result.address_components.province +
|
||||||
data.result.address_components.city +
|
data.result.address_components.city +
|
||||||
@ -633,6 +637,7 @@ const performSearch = async (text) => {
|
|||||||
|
|
||||||
// form.value.province = data.result.address_components.province;
|
// form.value.province = data.result.address_components.province;
|
||||||
// form.value.city = data.result.address_components.city;
|
// form.value.city = data.result.address_components.city;
|
||||||
|
center.value = { lat: data.result.location.lat, lng: data.result.location.lng };
|
||||||
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
||||||
} else if (data.status == 348) {
|
} else if (data.status == 348) {
|
||||||
//地址信息不明确,需弹出提示
|
//地址信息不明确,需弹出提示
|
||||||
@ -662,8 +667,7 @@ const onClick = (e: any) => {
|
|||||||
// form.value.city = data.result.address_component.city;
|
// form.value.city = data.result.address_component.city;
|
||||||
form.value.region = data.result.ad_info.adcode; //行政区划编码
|
form.value.region = data.result.ad_info.adcode; //行政区划编码
|
||||||
form.value.regionCode = data.result.ad_info.adcode; //行政区划编码
|
form.value.regionCode = data.result.ad_info.adcode; //行政区划编码
|
||||||
center.value.lat = data.result.location.lat;
|
center.value = { lat: data.result.location.lat, lng: data.result.location.lng };
|
||||||
center.value.lng = data.result.location.lng;
|
|
||||||
searchLocation.value = data.result.formatted_addresses.recommend;
|
searchLocation.value = data.result.formatted_addresses.recommend;
|
||||||
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
||||||
}
|
}
|
||||||
@ -853,7 +857,8 @@ const submitForm = async (type: string) => {
|
|||||||
if (form.value.id) {
|
if (form.value.id) {
|
||||||
await updateArticle(form.value).finally(() => (buttonLoading.value = false));
|
await updateArticle(form.value).finally(() => (buttonLoading.value = false));
|
||||||
} else {
|
} else {
|
||||||
await addArticle(form.value).finally(() => (buttonLoading.value = false));
|
let res = await addArticle(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
form.value.id = res.msg;
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
// dialog.visible = false;
|
// dialog.visible = false;
|
||||||
|
@ -52,7 +52,9 @@
|
|||||||
</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">
|
||||||
<dict-tag :options="dy_user_level_status" :value="scope.row.status" />
|
<!-- <dict-tag :options="dy_user_level_status" :value="scope.row.status" /> -->
|
||||||
|
<el-tag v-if="scope.row.status == 0" type="info">未发布</el-tag>
|
||||||
|
<el-tag v-if="scope.row.status == 1" type="primary">已发布</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="等级名称" align="center" prop="levelName" />
|
<!-- <el-table-column label="等级名称" align="center" prop="levelName" />
|
||||||
|
Loading…
Reference in New Issue
Block a user