Commit a438ec19 authored by zhengke's avatar zhengke

优化字号 查询 编辑

parent 6f0439ab
......@@ -220,13 +220,6 @@ const setImgs = async () => {
close()
}
if(imgType.value==2){
let width = handleImageElement.value.width
let height = handleImageElement.value.height
let maxWidth = VIEWPORT_SIZE,maxHeight = VIEWPORT_VER_SIZE.Value, viewportRatio = slidesStore.viewportRatio
if(viewportRatio<1){
maxWidth = VIEWPORT_VER_SIZE.Value
maxHeight = VIEWPORT_SIZE.Value
}
if(activeName.value=='1'||activeName.value=='3' || activeName.value == '4'){
let tempSize = downloadInfo
if(activeName.value != '4') tempSize = await FileService.getImageSizeWithoutDownloading(propsDatas.value.src)
......@@ -313,6 +306,8 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
imageFile.value = {}
}else if(activeName.value!='3'){
imgUrl.value = ''
}else if(activeName.value!='4'){
spiderImgUrl.value = ''
}
}
......
......@@ -36,10 +36,10 @@
</span>
<span class="selectTextInput">
<el-autocomplete
v-model="richTextAttrs.fontsize"
v-model="fontsize"
:fetch-suggestions="(queryString: string, cb: any)=>querySearchFont(queryString,cb,'fontsize')"
class="inline-input w-50"
placeholder="例:14px"
placeholder="字号"
@select="handleSelect('fontsize')"
@blur="handleSelect('fontsize')"
@keyup.enter="handleSelect('fontsize')">
......@@ -532,6 +532,7 @@ const lineHeight = ref<number>()
const wordSpace = ref<number>()
const paragraphSpace = ref<number>()
const fontsize = ref<string>('20')
const fontSizeOptions = [
'12px', '14px', '16px', '18px', '20px', '22px', '24px', '28px', '32px',
'36px', '40px', '44px', '48px', '54px', '60px', '66px', '72px', '76px',
......@@ -539,9 +540,10 @@ const fontSizeOptions = [
]
const fontSizes = ref<Array>([])
for(let i=0;i<fontSizeOptions.length;i++){
let value = fontSizeOptions[i].split('px')
let obj = {
label: fontSizeOptions[i],
value: fontSizeOptions[i],
label: value[0],
value: value[0],
}
fontSizes.value.push(obj)
}
......@@ -581,7 +583,7 @@ interface RestaurantItem {
const handleSelect = (font:string) => {
let value
if(font=='fontsize') {
value = richTextAttrs.value.fontsize
value = fontsize.value+'px'
emitRichTextCommand('fontsize', value as string)
}else if(font=='lineHeight'){
value = lineHeight.value
......@@ -659,7 +661,11 @@ const emitBatchRichTextCommand = (action: RichTextAction[]) => {
const link = ref('')
const linkPopoverVisible = ref(false)
watch(richTextAttrs, () => linkPopoverVisible.value = false)
watch(richTextAttrs, () => {
linkPopoverVisible.value = false
let value = richTextAttrs.value.fontsize.split('px')
fontsize.value = value[0]
})
const openLinkPopover = () => {
link.value = richTextAttrs.value.link
......
......@@ -179,6 +179,9 @@
loading.value = false;
RefreshLoading.value = false;
} catch (error) {
ElMessage.error({
message:'数据加载异常,请刷新页面'
})
loading.value = false;
RefreshLoading.value = false;
}
......
......@@ -172,6 +172,9 @@
loading.value = false;
RefreshLoading.value = false;
} catch (error) {
ElMessage.error({
message:'数据加载异常,请刷新页面'
})
loading.value = false;
RefreshLoading.value = false;
}
......
......@@ -178,6 +178,7 @@ const editorFileHandler = (item:any)=>{
searchData.value.sellId = item.FileId;
searchData.value.sellTempId = item.TempId;
searchData.value.TemplateType = item.FileType;
searchData.value.ParentFileId = 0
if(item.IsDownload==0) searchData.value.noExportPermission = true
else searchData.value.noExportPermission = false
if(item.IsView==0) searchData.value.noCopyPermission = true
......
......@@ -240,6 +240,9 @@
loading.value = false;
RefreshLoading.value = false;
} catch (error) {
ElMessage.error({
message:'数据加载异常,请刷新页面'
})
loading.value = false;
RefreshLoading.value = false;
}
......
......@@ -72,6 +72,8 @@ const lastKeyword = ref('')
const searchData = ref({} as any);
searchData.value = inject(injectKeyTemplate);
const showRightContent = ref(0)
const loggedder = ref('')
loggedder.value = userInfo.value.emName
const searchHandler = ()=>{
if(loading.value) return
......@@ -121,7 +123,9 @@ const editorFileHandler = (item:any)=>{
searchData.value.sellId = item.FileId;
searchData.value.sellTempId = item.TempId;
searchData.value.TemplateType = item.FileType;
searchData.value.ParentFileId = item.FolderId
if(loggedder.value!=row.CreateName){
searchData.value.ParentFileId = 0
}else searchData.value.ParentFileId = item.FolderId
SalesEditorStore.setSalesEditor(2);
marketStore.setMarket(false);
}
......
......@@ -64,7 +64,7 @@
<template #default="scope">
<span class="row items-center">
<span class="q-pr-sm q-pt-xs pointer" v-if="scope.row.FileType&&datas.loggedder==scope.row.CreateName&&currentMenu!=-1">
<el-tooltip effect="dark">
<el-tooltip effect="dark" v-if="scope.row.UpdateStatus">
<template #content>
<span v-if="scope.row.UpdateStatus==1||scope.row.UpdateStatus==2">
{{scope.row.UpdateStatus==1?'同步中':scope.row.UpdateStatus==2?'同步成功':'同步失败'}}
......@@ -246,7 +246,6 @@ import CopyFile from "./CopyFile.vue";
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708337830000_43.png",
adsImg:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png",
folderImg: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png",
});
const SalesEditorStore = useSellTemplateStore();
const marketStore = useScreenStore();
......@@ -623,9 +622,7 @@ import CopyFile from "./CopyFile.vue";
else searchData.value.noExportPermission = false
if(row.IsView==0) searchData.value.noCopyPermission = true
else searchData.value.noCopyPermission = false
}else{
searchData.value.ParentFileId = row.ParentFileId;
}
}else searchData.value.ParentFileId = row.ParentFileId;
SalesEditorStore.setSalesEditor(2);
marketStore.setMarket(false);
} else {
......
......@@ -259,6 +259,9 @@ const querySearchHandler = async () => {
loading.value = false;
RefreshLoading.value = false;
} catch (error) {
ElMessage.error({
message:'数据加载异常,请刷新页面'
})
loading.value = false;
RefreshLoading.value = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment