Merge branch 'main' of http://129.211.33.98:3210/hjq/mart-admin
This commit is contained in:
commit
ddacd5f546
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 19 KiB |
@ -151,7 +151,7 @@ export const useThemeConfig = defineStore('themeConfig', {
|
|||||||
// 默认全局组件大小,可选值"<large|'default'|small>",默认 'large'
|
// 默认全局组件大小,可选值"<large|'default'|small>",默认 'large'
|
||||||
globalComponentSize: 'large',
|
globalComponentSize: 'large',
|
||||||
// 网站logo
|
// 网站logo
|
||||||
logoMini: '@/assets/logo.png',
|
logoMini: '',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
|
@ -35,6 +35,7 @@ const getArticleDetailById = async(id:number) => {
|
|||||||
let res = await artApi.getArticleDetail(id);
|
let res = await artApi.getArticleDetail(id);
|
||||||
if(res?.success) {
|
if(res?.success) {
|
||||||
state.data = res.data;
|
state.data = res.data;
|
||||||
|
if(res.data.title) document.title = res.data.title;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('获取文章详情失败');
|
ElMessage.error('获取文章详情失败');
|
||||||
|
@ -300,7 +300,6 @@ const getTableData = async() => {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
} finally {
|
} finally {
|
||||||
state.tableData.param.moduleName = '';
|
|
||||||
state.tableData.loading = false;
|
state.tableData.loading = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -328,9 +327,11 @@ const jpgFormatter = (row: any) => {
|
|||||||
// } else {
|
// } else {
|
||||||
// newPath = row.path.replaceAll('\\\\', '/')
|
// newPath = row.path.replaceAll('\\\\', '/')
|
||||||
// }
|
// }
|
||||||
newPath = newPath.includes('://')?newPath : newPath;
|
// newPath = newPath?.includes('://')?newPath : newPath;
|
||||||
|
if(!newPath) return;
|
||||||
return `${newPath}`;
|
let index = newPath?.indexOf('?');
|
||||||
|
return newPath?.includes('://') ? newPath.substring(0,(!index||index===-1) ? newPath.length : index) : encodeURI(newPath.startsWith('/') ? newPath : ('/'+newPath));
|
||||||
|
// return `${newPath}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 日期格式化
|
// 日期格式化
|
||||||
@ -382,7 +383,7 @@ const getPhotoDetail = async (id: number) => {
|
|||||||
if (res?.success) {
|
if (res?.success) {
|
||||||
state.formData.fileList.push({ url: jpgFormatter(res) });
|
state.formData.fileList.push({ url: jpgFormatter(res) });
|
||||||
Object.assign(state.formData, res.data);
|
Object.assign(state.formData, res.data);
|
||||||
state.formData.path = res.data.path;
|
state.formData.path = res.data?.path;
|
||||||
uploadDisabled.value = true;
|
uploadDisabled.value = true;
|
||||||
state.formData.loading = false;
|
state.formData.loading = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="serviceName" align="center" label="作品类型" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="serviceName" align="center" label="作品类型" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="number" align="center" label="排序" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="createtime" align="center" label="时间" :formatter="dateFormatter" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="createtime" align="center" label="时间" :formatter="dateFormatter" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -89,8 +90,8 @@
|
|||||||
<el-row :gutter="35">
|
<el-row :gutter="35">
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||||
<el-form-item label="作品类型:" prop="serviceName">
|
<el-form-item label="作品类型:" prop="serviceName">
|
||||||
<el-select size="default" v-model="state.recommend.form.serviceName" placeholder="请选择作品类型" clearable filterable>
|
<el-select size="default" v-model="state.recommend.specialIndex" placeholder="请选择作品类型" clearable filterable @change="handleSelectService">
|
||||||
<el-option v-for="(item,index) in state.special.data" :key="index" :label="item.name" :value="item.name"></el-option>
|
<el-option v-for="(item,index) in state.special.data" :key="index" :label="item.name" :value="index"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -213,7 +214,8 @@ const state = reactive<any>({
|
|||||||
ordHide: false,
|
ordHide: false,
|
||||||
effFile: {},
|
effFile: {},
|
||||||
effHide: false
|
effHide: false
|
||||||
}
|
},
|
||||||
|
specialIndex: ''
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -275,6 +277,13 @@ const getTableData = async() => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 作品类型选择
|
||||||
|
const handleSelectService = (index:any) => {
|
||||||
|
state.recommend.form.serviceName = state.special.data[index].name;
|
||||||
|
state.recommend.form.serviceId = state.special.data[index].id;
|
||||||
|
console.log(index);
|
||||||
|
}
|
||||||
|
|
||||||
// 修改排序号
|
// 修改排序号
|
||||||
const reviewRecommend = (row:any) => {
|
const reviewRecommend = (row:any) => {
|
||||||
ElMessageBox.prompt('排序号','编辑',{
|
ElMessageBox.prompt('排序号','编辑',{
|
||||||
@ -324,8 +333,10 @@ const reset = () =>{
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
serviceName: '',
|
serviceName: '',
|
||||||
|
serviceId: '',
|
||||||
isBackend: 1
|
isBackend: 1
|
||||||
}
|
}
|
||||||
|
state.recommend.specialIndex = '';
|
||||||
getTableData();
|
getTableData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,6 +345,7 @@ const closeDialog = () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
state.recommend.show = false;
|
state.recommend.show = false;
|
||||||
state.recommend.form = {};
|
state.recommend.form = {};
|
||||||
|
state.recommend.specialIndex = '';
|
||||||
handleOrdRemove();
|
handleOrdRemove();
|
||||||
handleEffRemove();
|
handleEffRemove();
|
||||||
}, 300)
|
}, 300)
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
<el-table-column align="center" type="index" label="序号" width="100"/>
|
<el-table-column align="center" type="index" label="序号" width="100"/>
|
||||||
<el-table-column align="center" prop="name" label="作品">
|
<el-table-column align="center" prop="name" label="作品">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image :src="scope.row.path" lazy
|
<el-image :src="getImagePath(scope.row.path)" lazy
|
||||||
preview-teleported="true" :preview-src-list="[scope.row.path]"/>
|
preview-teleported="true" :preview-src-list="[getImagePath(scope.row.path)]"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="phone" label="发布者" show-overflow-tooltip></el-table-column> -->
|
<!-- <el-table-column prop="phone" label="发布者" show-overflow-tooltip></el-table-column> -->
|
||||||
@ -167,6 +167,13 @@ const reset = () =>{
|
|||||||
|
|
||||||
const replayFormRef = ref();
|
const replayFormRef = ref();
|
||||||
|
|
||||||
|
// 图片格式化
|
||||||
|
const getImagePath = (path: string) =>{
|
||||||
|
if(!path) return;
|
||||||
|
let index = path?.indexOf('?');
|
||||||
|
return path?.includes('://') ? path.substring(0,(!index||index===-1) ? path.length : index) : encodeURI(path);
|
||||||
|
}
|
||||||
|
|
||||||
// 发布
|
// 发布
|
||||||
const toPublic = (row: any) => {
|
const toPublic = (row: any) => {
|
||||||
ElMessageBox.confirm('确定要发布该作品吗?', '提示', {
|
ElMessageBox.confirm('确定要发布该作品吗?', '提示', {
|
||||||
|
@ -255,7 +255,7 @@ const state = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 图片基本路径
|
// 图片基本路径
|
||||||
const viteUrl = import.meta.env.DEV ? 'http://8.138.171.103/pixel/' : import.meta.env.VITE_API_URL;
|
const viteUrl = import.meta.env.DEV ? 'http://8.138.171.103/pixel/' : (import.meta.env.VITE_API_URL+'pixel/');
|
||||||
|
|
||||||
// 引入 api 请求接口
|
// 引入 api 请求接口
|
||||||
const photoApi = photosApi();
|
const photoApi = photosApi();
|
||||||
|
Loading…
Reference in New Issue
Block a user