微调
This commit is contained in:
parent
4a69c4bcfe
commit
294d53379b
@ -151,7 +151,7 @@ export const useThemeConfig = defineStore('themeConfig', {
|
||||
// 默认全局组件大小,可选值"<large|'default'|small>",默认 'large'
|
||||
globalComponentSize: 'large',
|
||||
// 网站logo
|
||||
logoMini: '@/assets/logo.png',
|
||||
logoMini: '',
|
||||
},
|
||||
}),
|
||||
actions: {
|
||||
|
@ -300,7 +300,6 @@ const getTableData = async() => {
|
||||
}
|
||||
} catch (error) {
|
||||
} finally {
|
||||
state.tableData.param.moduleName = '';
|
||||
state.tableData.loading = false;
|
||||
}
|
||||
};
|
||||
@ -328,9 +327,11 @@ const jpgFormatter = (row: any) => {
|
||||
// } else {
|
||||
// newPath = row.path.replaceAll('\\\\', '/')
|
||||
// }
|
||||
newPath = newPath.includes('://')?newPath : newPath;
|
||||
|
||||
return `${newPath}`;
|
||||
// newPath = newPath?.includes('://')?newPath : newPath;
|
||||
if(!newPath) return;
|
||||
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) {
|
||||
state.formData.fileList.push({ url: jpgFormatter(res) });
|
||||
Object.assign(state.formData, res.data);
|
||||
state.formData.path = res.data.path;
|
||||
state.formData.path = res.data?.path;
|
||||
uploadDisabled.value = true;
|
||||
state.formData.loading = false;
|
||||
} else {
|
||||
|
@ -90,8 +90,8 @@
|
||||
<el-row :gutter="35">
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="作品类型:" prop="serviceName">
|
||||
<el-select size="default" v-model="state.recommend.form.serviceName" placeholder="请选择作品类型" clearable filterable>
|
||||
<el-option v-for="(item,index) in state.special.data" :key="index" :label="item.name" :value="item.name"></el-option>
|
||||
<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="index"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -214,7 +214,8 @@ const state = reactive<any>({
|
||||
ordHide: false,
|
||||
effFile: {},
|
||||
effHide: false
|
||||
}
|
||||
},
|
||||
specialIndex: ''
|
||||
}
|
||||
});
|
||||
|
||||
@ -276,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) => {
|
||||
ElMessageBox.prompt('排序号','编辑',{
|
||||
@ -325,8 +333,10 @@ const reset = () =>{
|
||||
current: 1,
|
||||
size: 10,
|
||||
serviceName: '',
|
||||
serviceId: '',
|
||||
isBackend: 1
|
||||
}
|
||||
state.recommend.specialIndex = '';
|
||||
getTableData();
|
||||
}
|
||||
|
||||
@ -335,6 +345,7 @@ const closeDialog = () => {
|
||||
setTimeout(() => {
|
||||
state.recommend.show = false;
|
||||
state.recommend.form = {};
|
||||
state.recommend.specialIndex = '';
|
||||
handleOrdRemove();
|
||||
handleEffRemove();
|
||||
}, 300)
|
||||
|
@ -26,8 +26,8 @@
|
||||
<el-table-column align="center" type="index" label="序号" width="100"/>
|
||||
<el-table-column align="center" prop="name" label="作品">
|
||||
<template #default="scope">
|
||||
<el-image :src="scope.row.path" lazy
|
||||
preview-teleported="true" :preview-src-list="[scope.row.path]"/>
|
||||
<el-image :src="getImagePath(scope.row.path)" lazy
|
||||
preview-teleported="true" :preview-src-list="[getImagePath(scope.row.path)]"/>
|
||||
</template>
|
||||
</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 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) => {
|
||||
ElMessageBox.confirm('确定要发布该作品吗?', '提示', {
|
||||
|
Loading…
Reference in New Issue
Block a user