Commit a7c95aa5 authored by 罗超's avatar 罗超

Merge branch '1.2.0' of http://gitlab.oytour.com/viitto/pptist into 1.2.0

# Conflicts:
#	src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue
#	src/views/Editor/Toolbar/SlideDesignPanel.vue
parents fbbde361 7ed6e01f
...@@ -90,6 +90,7 @@ const userLoginHandler = async ()=>{ ...@@ -90,6 +90,7 @@ const userLoginHandler = async ()=>{
if(ConfigId>0&&model!=2) await GetTripConfig(ConfigId) if(ConfigId>0&&model!=2) await GetTripConfig(ConfigId)
} catch (error) {} } catch (error) {}
if(userId>0)isFinish.value=true if(userId>0)isFinish.value=true
if(param.ViewSlideshow) { if(param.ViewSlideshow) {
searchData.value.ViewSlideshow = param.ViewSlideshow searchData.value.ViewSlideshow = param.ViewSlideshow
try { try {
...@@ -124,10 +125,13 @@ const sellHistoryTripTemplate = async (sellId:any,LogId:any) => { ...@@ -124,10 +125,13 @@ const sellHistoryTripTemplate = async (sellId:any,LogId:any) => {
let queryMsg let queryMsg
let dataRes let dataRes
if(!LogId){ if(!LogId){
queryMsg = { queryMsg = {
Id: sellId, Id: sellId,
Status: searchData.value.ViewSlideshow==1?1:0 Status: searchData.value.ViewSlideshow==1?1:0
} }
// 行程广告浏览记录
if(queryMsg.Status==0) await ConfigService.SetTripBrowse({FileId: sellId});
dataRes = await ConfigService.sellGetTemplateDetails(queryMsg); dataRes = await ConfigService.sellGetTemplateDetails(queryMsg);
}else{ }else{
queryMsg = { queryMsg = {
...@@ -167,6 +171,7 @@ const sellHistoryTripTemplate = async (sellId:any,LogId:any) => { ...@@ -167,6 +171,7 @@ const sellHistoryTripTemplate = async (sellId:any,LogId:any) => {
ScreenStore.setScreening(true) ScreenStore.setScreening(true)
enterScreeningFromStart enterScreeningFromStart
slidesStore.updateSlideIndex(0) slidesStore.updateSlideIndex(0)
}else{ }else{
loading.value = true loading.value = true
ShareTips.value = dataRes.data.message ShareTips.value = dataRes.data.message
...@@ -176,7 +181,6 @@ const sellHistoryTripTemplate = async (sellId:any,LogId:any) => { ...@@ -176,7 +181,6 @@ const sellHistoryTripTemplate = async (sellId:any,LogId:any) => {
} }
} }
// 销售分享模版数据 // 销售分享模版数据
const sellShareTemplate = async () =>{ const sellShareTemplate = async () =>{
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<IconUpload class="icon" /> <IconUpload class="icon" />
</div> </div>
</div> </div>
<div class="menu-item" v-tooltip="'导出'" @click="setDialogForExport('image')"> <div v-if="!searchData.noExportPermission" class="menu-item" v-tooltip="'导出'" @click="setDialogForExport('image')">
<IconDownload class="icon" /> <IconDownload class="icon" />
</div> </div>
<el-button type="primary" <el-button type="primary"
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</template> </template>
</el-button> </el-button>
<template v-if="model==2"> <template v-if="model==2">
<el-dropdown v-if="searchData.sellId>0" split-button <el-dropdown v-if="searchData.sellId>0&&!searchData.noCopyPermission" split-button
size="small" type="primary" @click="setTemplate(0)"> size="small" type="primary" @click="setTemplate(0)">
保存 保存
<template #dropdown> <template #dropdown>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
<el-button v-if="!searchData.sellId" type="primary" <el-button v-if="!searchData.sellId||(searchData.sellId>0&&searchData.noCopyPermission)" type="primary"
size="small" :loading="datas.loading" size="small" :loading="datas.loading"
style="color: #ffff;margin-left: 10px;" style="color: #ffff;margin-left: 10px;"
@click="setTemplate(0)"> @click="setTemplate(0)">
...@@ -129,6 +129,12 @@ ...@@ -129,6 +129,12 @@
<FullscreenSpin :loading="exporting" tip="正在导入..." /> <FullscreenSpin :loading="exporting" tip="正在导入..." />
<Psd-Upload :visible="psdVisibleStatus" @closed="psdVisibleStatus=false"></Psd-Upload> <Psd-Upload :visible="psdVisibleStatus" @closed="psdVisibleStatus=false"></Psd-Upload>
<CopyFile v-if="isCopyTo"
:details="journeyAdsDetails"
:type="2"
@close="() => {journeyAdsDetails = '';isCopyTo=false;datas.loading = false}"
@success="(type:Number,FolderId:Number)=>SetSellTemplate(type,FolderId)"></CopyFile>
</div> </div>
</template> </template>
...@@ -167,7 +173,7 @@ import { PPTImageElement } from '@/types/slides' ...@@ -167,7 +173,7 @@ import { PPTImageElement } from '@/types/slides'
import AliyunUpload from '@/utils/upload/aliyun' import AliyunUpload from '@/utils/upload/aliyun'
import { ElLoading, ElMessage } from 'element-plus' import { ElLoading, ElMessage } from 'element-plus'
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue' import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
import CopyFile from "@/views/SellTemplate/components/CopyFile.vue";
const mainStore = useMainStore() const mainStore = useMainStore()
const slidesStore = useSlidesStore() const slidesStore = useSlidesStore()
...@@ -208,6 +214,8 @@ const TempIdStore = useScreenStore() ...@@ -208,6 +214,8 @@ const TempIdStore = useScreenStore()
const ConfigIdStore = useScreenStore() const ConfigIdStore = useScreenStore()
const loadingInstance = ref<any>(null) const loadingInstance = ref<any>(null)
const thumbnails = ref<string[]>() const thumbnails = ref<string[]>()
const isCopyTo = ref(false)
const journeyAdsDetails = ref<Object>()
const psdVisibleStatus = ref(false) const psdVisibleStatus = ref(false)
const { market, model, ConfigId, CoverImg, dataLoading, TempId, SourceLoading } = storeToRefs(useScreenStore()) const { market, model, ConfigId, CoverImg, dataLoading, TempId, SourceLoading } = storeToRefs(useScreenStore())
...@@ -275,7 +283,8 @@ const UploadPsdHandler = () => { ...@@ -275,7 +283,8 @@ const UploadPsdHandler = () => {
} }
// 销售新增修改行程、广告 // 销售新增修改行程、广告
const SetSellTemplate = async (type) => { const SetSellTemplate = async (type:Number,FolderId:Number) => {
if(FolderId>=0) datas.loading = true
try { try {
let TempId = 0 let TempId = 0
if(queryObj.value.TempId) TempId = queryObj.value.TempId if(queryObj.value.TempId) TempId = queryObj.value.TempId
...@@ -296,11 +305,15 @@ const SetSellTemplate = async (type) => { ...@@ -296,11 +305,15 @@ const SetSellTemplate = async (type) => {
Title: queryObj.value.Title, Title: queryObj.value.Title,
OWidth: 0, OWidth: 0,
OHeight: 0, OHeight: 0,
FolderId: FolderId>=0?FolderId:searchData.value.ParentFileId
} }
if(queryObj.value.TemplateType==2){ if(queryObj.value.TemplateType==2){
queryMsg.OWidth = queryObj.value.Width queryMsg.OWidth = queryObj.value.Width
queryMsg.OHeight = queryObj.value.Height queryMsg.OHeight = queryObj.value.Height
} }
journeyAdsDetails.value = ''
isCopyTo.value = false
console.log(queryMsg,'------queryMsg销售保存')
let TemplateRes = await ConfigService.sellSetTemplate(queryMsg); let TemplateRes = await ConfigService.sellSetTemplate(queryMsg);
if (TemplateRes.data.resultCode == 1) { if (TemplateRes.data.resultCode == 1) {
ElMessage({ ElMessage({
...@@ -460,7 +473,7 @@ const SetTripTemplateConfig = async () => { ...@@ -460,7 +473,7 @@ const SetTripTemplateConfig = async () => {
// 保存 // 保存
const setTemplate = async (type) =>{ const setTemplate = async (type) =>{
queryObj.value.Title = title.value queryObj.value.Title = title.value
datas.loading = true
if(SourceLoading.value) setNewDatasList(datas.DataSource) if(SourceLoading.value) setNewDatasList(datas.DataSource)
await uploadImageHandler() await uploadImageHandler()
...@@ -526,12 +539,25 @@ const setTemplate = async (type) =>{ ...@@ -526,12 +539,25 @@ const setTemplate = async (type) =>{
queryObj.value.TempData = JSON.stringify(arr) queryObj.value.TempData = JSON.stringify(arr)
if(model.value==1&&userInfo.value.IsEditTripTemplate==1){ if(model.value==1&&userInfo.value.IsEditTripTemplate==1){
datas.loading = true
await SetTripTemplateSlide() await SetTripTemplateSlide()
}else if(ConfigId.value&&model.value!=2){ }else if(ConfigId.value&&model.value!=2){
datas.loading = true
await SetTripTemplateConfig() await SetTripTemplateConfig()
}else if(model.value==2&&SalesEditor.value>0){ }else if(model.value==2&&SalesEditor.value>0){
if(type==1||!searchData.value.sellId){
let obj = {
FileName: queryObj.value.Title,
FileType: queryObj.value.TemplateType,
type: type,
}
journeyAdsDetails.value = obj
isCopyTo.value = true
}else{
datas.loading = true
await SetSellTemplate(type) await SetSellTemplate(type)
} }
}
} }
......
...@@ -60,7 +60,7 @@ import useScreening from '@/hooks/useScreening' ...@@ -60,7 +60,7 @@ import useScreening from '@/hooks/useScreening'
import useLoadSlides from '@/hooks/useLoadSlides' import useLoadSlides from '@/hooks/useLoadSlides'
import { injectKeyDataSource, injectKeyTemplate } from '@/types/injectKey' import { injectKeyDataSource, injectKeyTemplate } from '@/types/injectKey'
import ConfigService from '@/services/ConfigService' import ConfigService from '@/services/ConfigService'
import { getHtmlPlainText } from '@/utils/common' import { getHtmlPlainText, query } from '@/utils/common'
import useEditor from '@/utils/Editor/index' import useEditor from '@/utils/Editor/index'
import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas' import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas'
...@@ -505,9 +505,10 @@ const sellGetTripTemplate = async () =>{ ...@@ -505,9 +505,10 @@ const sellGetTripTemplate = async () =>{
let queryMsg = { let queryMsg = {
Id: Id Id: Id
} }
// 行程广告浏览记录
await ConfigService.SetTripBrowse({FileId: searchData.value.sellId});
let dataRes = await ConfigService.sellGetTemplateDetails(queryMsg); let dataRes = await ConfigService.sellGetTemplateDetails(queryMsg);
if (dataRes.data.resultCode == 1) { if (dataRes.data.resultCode == 1) {
RecordBrowsing()
if(searchData.value.TempId) queryObj.value.TempId = searchData.value.TempId if(searchData.value.TempId) queryObj.value.TempId = searchData.value.TempId
else if(searchData.value.TempId2&&!searchData.value.TempId) queryObj.value.TempId = searchData.value.TempId2 else if(searchData.value.TempId2&&!searchData.value.TempId) queryObj.value.TempId = searchData.value.TempId2
else if(searchData.value.sellTempId) queryObj.value.TempId = searchData.value.sellTempId else if(searchData.value.sellTempId) queryObj.value.TempId = searchData.value.sellTempId
...@@ -551,23 +552,6 @@ const sellGetTripTemplate = async () =>{ ...@@ -551,23 +552,6 @@ const sellGetTripTemplate = async () =>{
} }
} }
/**
* 行程广告浏览记录
*/
const RecordBrowsing = async () => {
try {
let queryMsg = {
FileId: searchData.value.sellId
}
let datasRes = await ConfigService.SetTripBrowse(queryMsg);
if (datasRes.data.resultCode == 1 && datasRes.data.data && datasRes.data.data.TempId) {
}
} catch (error) {
}
}
// 页面被切换时 // 页面被切换时
const thumbnailsRef = ref<InstanceType<typeof Draggable>>() const thumbnailsRef = ref<InstanceType<typeof Draggable>>()
...@@ -755,7 +739,7 @@ const contextmenusThumbnailItem = (): ContextmenuItem[] => { ...@@ -755,7 +739,7 @@ const contextmenusThumbnailItem = (): ContextmenuItem[] => {
] ]
} }
if(searchData.value.sellId&&!searchData.value.TempId) sellGetTripTemplate() if(searchData.value.sellId&&!searchData.value.TempId) sellGetTripTemplate()
GetTripTemplate() if(!query().ViewSlideshow) GetTripTemplate()
</script> </script>
......
...@@ -4,12 +4,13 @@ ...@@ -4,12 +4,13 @@
class="origin-image" class="origin-image"
:style="{ backgroundImage: `url(${handleImageElement.src})` }" :style="{ backgroundImage: `url(${handleImageElement.src})` }"
></div> ></div>
<Button class="full-width-btn" @click="getImgVis()" :style="{'margin-bottom': mode==1?0:''}"><IconTransform class="btn-icon"/> 替换图片</Button>
<Divider v-if="mode==1" /> <Divider v-if="mode==1" />
<div v-if="mode==1" class="row items-center"> <div v-if="mode==1" class="row items-center">
<div class="col">图层名称:</div> <div class="col">图层名称:</div>
<el-input style="width:60%;" v-model="layerName" @input="updateLayerName"></el-input> <el-input style="width:60%;" v-model="layerName" @input="updateLayerName"></el-input>
</div> </div>
<Divider v-if="mode==1" /> <Divider v-if="mode==1" />
<ElementFlip /> <ElementFlip />
...@@ -69,7 +70,6 @@ ...@@ -69,7 +70,6 @@
<FileInput @change="files => replaceImage(files)"> <FileInput @change="files => replaceImage(files)">
<Button class="full-width-btn"><IconTransform class="btn-icon" /> 替换图片</Button> <Button class="full-width-btn"><IconTransform class="btn-icon" /> 替换图片</Button>
</FileInput> --> </FileInput> -->
<Button class="full-width-btn" @click="getImgVis()"><IconTransform class="btn-icon"/> 替换图片</Button>
<Button class="full-width-btn" @click="resetImage()"><IconUndo class="btn-icon" /> 重置样式</Button> <Button class="full-width-btn" @click="resetImage()"><IconUndo class="btn-icon" /> 重置样式</Button>
<Button class="full-width-btn" @click="setBackgroundImage()"><IconTheme class="btn-icon" /> 设为背景</Button> <Button class="full-width-btn" @click="setBackgroundImage()"><IconTheme class="btn-icon" /> 设为背景</Button>
<!-- 上传图片 --> <!-- 上传图片 -->
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<Divider /> <Divider />
<SelectGroup class="row formatFontsBox"> <SelectGroup class="row formatFontsBox">
<span class="selectText">
<el-select v-model="richTextAttrs.fontname" placeholder="" filterable <el-select v-model="richTextAttrs.fontname" placeholder="" filterable
@change="emitRichTextCommand('fontname', richTextAttrs.fontname)"> @change="emitRichTextCommand('fontname', richTextAttrs.fontname)">
<el-option <el-option
...@@ -29,9 +30,22 @@ ...@@ -29,9 +30,22 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
:style="{'font-family':item.reduce!=''?item.reduce:item.label}"
/> />
</el-select> </el-select>
</span>
<span class="selectTextInput">
<el-autocomplete
v-model="richTextAttrs.fontsize"
:fetch-suggestions="(queryString: string, cb: any)=>querySearchFont(queryString,cb,'fontsize')"
class="inline-input w-50"
placeholder="例:14px"
@select="handleSelect('fontsize')"
@blur="handleSelect('fontsize')">
<template #suffix>
<IconAddText />
</template>
</el-autocomplete>
</span>
<!-- <Select <!-- <Select
class="font-select" class="font-select"
style="width: 60%;" style="width: 60%;"
...@@ -44,7 +58,7 @@ ...@@ -44,7 +58,7 @@
<template #icon> <template #icon>
<IconFontSize /> <IconFontSize />
</template> </template>
</Select> --> </Select>
<Select <Select
style="width: 40%;" style="width: 40%;"
:value="richTextAttrs.fontsize" :value="richTextAttrs.fontsize"
...@@ -56,7 +70,7 @@ ...@@ -56,7 +70,7 @@
<template #icon> <template #icon>
<IconAddText /> <IconAddText />
</template> </template>
</Select> </Select> -->
</SelectGroup> </SelectGroup>
<ButtonGroup class="row" passive> <ButtonGroup class="row" passive>
...@@ -277,7 +291,20 @@ ...@@ -277,7 +291,20 @@
<div class="row"> <div class="row">
<div style="width: 40%;">行间距:</div> <div style="width: 40%;">行间距:</div>
<Select style="width: 60%;" <span class="selectText selectTextLH border2">
<el-autocomplete
v-model="lineHeight"
:fetch-suggestions="(queryString: string, cb: any)=>querySearchFont(queryString,cb,'lineHeight')"
class="inline-input w-50"
placeholder="字体行间距"
@select="handleSelect('lineHeight')"
@blur="handleSelect('lineHeight')">
<template #suffix>
<IconRowHeight />
</template>
</el-autocomplete>
</span>
<!-- <Select style="width: 60%;"
:value="lineHeight || 1" :value="lineHeight || 1"
@update:value="value => updateLineHeight(value as number)" @update:value="value => updateLineHeight(value as number)"
:options="lineHeightOptions.map(item => ({ :options="lineHeightOptions.map(item => ({
...@@ -287,11 +314,24 @@ ...@@ -287,11 +314,24 @@
<template #icon> <template #icon>
<IconRowHeight /> <IconRowHeight />
</template> </template>
</Select> </Select> -->
</div> </div>
<div class="row"> <div class="row">
<div style="width: 40%;">段间距:</div> <div style="width: 40%;">段间距:</div>
<Select style="width: 60%;" <span class="selectText selectTextLH border2">
<el-autocomplete
v-model="paragraphSpace"
:fetch-suggestions="(queryString: string, cb: any)=>querySearchFont(queryString,cb,'paragraphSpace')"
class="inline-input w-50"
placeholder="字体段间距"
@select="handleSelect('paragraphSpace')"
@blur="handleSelect('paragraphSpace')">
<template #suffix>
<IconVerticalSpacingBetweenItems />
</template>
</el-autocomplete>
</span>
<!-- <Select style="width: 60%;"
:value="paragraphSpace || 0" :value="paragraphSpace || 0"
@update:value="value => updateParagraphSpace(value as number)" @update:value="value => updateParagraphSpace(value as number)"
:options="paragraphSpaceOptions.map(item => ({ :options="paragraphSpaceOptions.map(item => ({
...@@ -301,11 +341,24 @@ ...@@ -301,11 +341,24 @@
<template #icon> <template #icon>
<IconVerticalSpacingBetweenItems /> <IconVerticalSpacingBetweenItems />
</template> </template>
</Select> </Select> -->
</div> </div>
<div class="row"> <div class="row">
<div style="width: 40%;">字间距:</div> <div style="width: 40%;">字间距:</div>
<Select style="width: 60%;" <span class="selectText selectTextLH border2">
<el-autocomplete
v-model="wordSpace"
:fetch-suggestions="(queryString: string, cb: any)=>querySearchFont(queryString,cb,'wordSpace')"
class="inline-input w-50"
placeholder="字体字间距"
@select="handleSelect('wordSpace')"
@blur="handleSelect('wordSpace')">
<template #suffix>
<IconFullwidth />
</template>
</el-autocomplete>
</span>
<!-- <Select style="width: 60%;"
:value="wordSpace || 0" :value="wordSpace || 0"
@update:value="value => updateWordSpace(value as number)" @update:value="value => updateWordSpace(value as number)"
:options="wordSpaceOptions.map(item => ({ :options="wordSpaceOptions.map(item => ({
...@@ -315,7 +368,7 @@ ...@@ -315,7 +368,7 @@
<template #icon> <template #icon>
<IconFullwidth /> <IconFullwidth />
</template> </template>
</Select> </Select> -->
</div> </div>
<div class="row"> <div class="row">
<div style="width: 40%;">文本框填充:</div> <div style="width: 40%;">文本框填充:</div>
...@@ -479,14 +532,90 @@ const fontSizeOptions = [ ...@@ -479,14 +532,90 @@ const fontSizeOptions = [
'36px', '40px', '44px', '48px', '54px', '60px', '66px', '72px', '76px', '36px', '40px', '44px', '48px', '54px', '60px', '66px', '72px', '76px',
'80px', '88px', '96px', '104px', '112px', '120px', '80px', '88px', '96px', '104px', '112px', '120px',
] ]
const fontSizes = ref<Array>([])
for(let i=0;i<fontSizeOptions.length;i++){
let obj = {
label: fontSizeOptions[i],
value: fontSizeOptions[i],
}
fontSizes.value.push(obj)
}
const lineHeightOptions = [0.9, 1.0, 1.15, 1.2, 1.4, 1.5, 1.8, 2.0, 2.5, 3.0] const lineHeightOptions = [0.9, 1.0, 1.15, 1.2, 1.4, 1.5, 1.8, 2.0, 2.5, 3.0]
const wordSpaceOptions = ref([]) const lineHeights = ref<Array>([])
for(let i=0;i<lineHeightOptions.length;i++){
let obj = {
label: lineHeightOptions[i]+'倍',
value: lineHeightOptions[i],
}
lineHeights.value.push(obj)
}
const wordSpaceOptions = ref([])
for(let i=0;i<31;i++){ for(let i=0;i<31;i++){
wordSpaceOptions.value.push(i) let obj = {
label: `${i}`,
value: i,
}
wordSpaceOptions.value.push(obj)
} }
const paragraphSpaceOptions = [0, 5, 10, 15, 20, 25, 30, 40, 50, 80] const paragraphSpaceOptions = [0, 5, 10, 15, 20, 25, 30, 40, 50, 80]
const paragraphSpaces = ref<Array>([])
for(let i=0;i<paragraphSpaceOptions.length;i++){
let obj = {
label: paragraphSpaceOptions[i]+'px',
value: paragraphSpaceOptions[i],
}
paragraphSpaces.value.push(obj)
}
interface RestaurantItem {
value: string
label: string
}
const handleSelect = (font:string) => {
let value
if(font=='fontsize') {
value = richTextAttrs.value.fontsize
emitRichTextCommand('fontsize', value as string)
}else if(font=='lineHeight'){
value = lineHeight.value
updateLineHeight(value)
}else if(font=='paragraphSpace'){
value = paragraphSpace.value
updateParagraphSpace(value)
}else if(font=='wordSpace'){
value = wordSpace.value
updateWordSpace(value)
}
}
const createFilter = (queryString: string) => {
return (restaurant:RestaurantItem) => {
return (
restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
)
}
}
const querySearchFont = (queryString: string, cb: any, font:string) => {
let results
if(font=='fontsize'){
results = queryString? fontSizes.value.filter(createFilter(queryString))
: fontSizes.value
}else if(font=='lineHeight'){
results = queryString? lineHeights.value.filter(x=>{return x.label.indexOf(queryString)!=-1})
: lineHeights.value
}else if(font=='paragraphSpace'){
results = queryString? paragraphSpaces.value.filter(x=>{return x.label.indexOf(queryString)!=-1})
: paragraphSpaces.value
}else if(font=='wordSpace'){
results = queryString? wordSpaceOptions.value.filter(x=>{return x.label.indexOf(queryString)!=-1})
: wordSpaceOptions.value
}
cb(results)
}
// 设置行高 // 设置行高
const updateLineHeight = (value: number) => { const updateLineHeight = (value: number) => {
...@@ -578,6 +707,33 @@ watch(handleElement, () => { ...@@ -578,6 +707,33 @@ watch(handleElement, () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.selectText.selectTextLH::v-deep(.el-input__wrapper){
border-radius: 2px;
}
.selectTextInput::v-deep(.el-input__wrapper){
border-radius: 0 2px 2px 0;
padding: 1px 10px;
border-left: 0;
}
.selectTextInput{
width: 40%;
position: absolute;
right: 1px;
top: 0;
}
.selectText::v-deep(.el-input__wrapper){
border-radius: 2px 0 0 2px;
padding: 1px 10px;
}
.selectText{
width: 140px;
}
.formatFontsBox{
position: relative;
}
.formatFontsBox::v-deep(.el-input__wrapper):hover{
border: 0;
}
.text-style-panel { .text-style-panel {
user-select: none; user-select: none;
} }
......
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
</div> </div>
<div class="row formatFontsBox"> <div class="row formatFontsBox">
<div style="width: 40%;">字体:</div> <div style="width: 40%;">字体:</div>
<span class="selectText">
<el-select v-model="theme.fontName" placeholder="" filterable style="width: 137px;" <el-select v-model="theme.fontName" placeholder="" filterable style="width: 137px;"
@change="updateTheme({ fontName: theme.fontName })"> @change="updateTheme({ fontName: theme.fontName })">
<el-option <el-option
...@@ -147,9 +148,10 @@ ...@@ -147,9 +148,10 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
:style="{'font-family':item.reduce!=''?item.reduce:item.label}"
/> />
</el-select> </el-select>
</span>
<!-- <Select <!-- <Select
style="width: 60%;" style="width: 60%;"
:value="theme.fontName" :value="theme.fontName"
...@@ -443,6 +445,13 @@ const updateViewportRatio = (value: number) => { ...@@ -443,6 +445,13 @@ const updateViewportRatio = (value: number) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.selectText::v-deep(.el-input__wrapper){
border-radius: 2px;
padding: 1px 10px;
}
.selectText{
width: 140px;
}
.slide-design-panel { .slide-design-panel {
user-select: none; user-select: none;
} }
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
> >
<ExportDialog /> <ExportDialog />
</Modal> </Modal>
<div v-if="model&&model==3" style="position: fixed;left: 0;right: 0;top: 0;bottom: 0; overflow: auto;"> <div v-if="model&&model==3" style="position: fixed;left: 0;right: 0;top: 0;bottom: 0;"
:style="{'overflow':param.w?'':'auto'}">
<div class="export-img-dialog"> <div class="export-img-dialog">
<div class="thumbnails-view" ref="refThumbnails"> <div class="thumbnails-view" ref="refThumbnails">
<div class="thumbnails" v-for="slide in slides"> <div class="thumbnails" v-for="slide in slides">
...@@ -174,7 +175,7 @@ const GetTripFiled = async () =>{ ...@@ -174,7 +175,7 @@ const GetTripFiled = async () =>{
console.log("TemplateGetTripFiled", error); console.log("TemplateGetTripFiled", error);
} }
} }
if(searchData.value.TemplateType!=2) GetTripFiled() if(searchData.value.TemplateType!=2&&!query().ViewSlideshow) GetTripFiled()
const mainStore = useMainStore() const mainStore = useMainStore()
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
{{ formatDateTimeToRead(scope.row.UpdateTime&&scope.row.UpdateTime!=''?scope.row.UpdateTime:scope.row.CreateTime) }} {{ formatDateTimeToRead(scope.row.UpdateTime&&scope.row.UpdateTime!=''?scope.row.UpdateTime:scope.row.CreateTime) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="分享人" prop="CreateName" width="100" /> <el-table-column label="分享人" prop="CreateName" width="180" />
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template #default="scope"> <template #default="scope">
<div class="row items-center" :class="{'hover':showItemId!=scope.row.FileId}"> <div class="row items-center" :class="{'hover':showItemId!=scope.row.FileId}">
...@@ -148,7 +148,6 @@ const tempFilterName = ref('') ...@@ -148,7 +148,6 @@ const tempFilterName = ref('')
const currentRootDom = ref() const currentRootDom = ref()
const hgihlightId = ref(0) const hgihlightId = ref(0)
const dataTableRef = ref() const dataTableRef = ref()
const lastKeyword = ref('')
const backInquireHandler = () => { const backInquireHandler = () => {
let Navigation = navigations.value[navigations.value.length - 2]; let Navigation = navigations.value[navigations.value.length - 2];
...@@ -179,11 +178,14 @@ const editorFileHandler = (item:any)=>{ ...@@ -179,11 +178,14 @@ const editorFileHandler = (item:any)=>{
searchData.value.sellId = item.FileId; searchData.value.sellId = item.FileId;
searchData.value.sellTempId = item.TempId; searchData.value.sellTempId = item.TempId;
searchData.value.TemplateType = item.FileType; searchData.value.TemplateType = item.FileType;
if(item.IsDownload==0) searchData.value.noExportPermission = true
else searchData.value.noExportPermission = false
if(item.IsView==0) searchData.value.noCopyPermission = true
else searchData.value.noCopyPermission = false
SalesEditorStore.setSalesEditor(2); SalesEditorStore.setSalesEditor(2);
marketStore.setMarket(false); marketStore.setMarket(false);
} }
const getDocumentData = async () => { const getDocumentData = async () => {
lastKeyword.value = queryObj.FileName
if(loading.value) return if(loading.value) return
loading.value=true loading.value=true
try { try {
...@@ -375,9 +377,6 @@ getDocumentData() ...@@ -375,9 +377,6 @@ getDocumentData()
text-overflow:ellipsis !important; text-overflow:ellipsis !important;
width: 100%; width: 100%;
} }
.el-table .caret-wrapper{
height: 12px !important;
}
/* .sample-table th:nth-child(2) .cell{ /* .sample-table th:nth-child(2) .cell{
padding-left: 0 !important; padding-left: 0 !important;
} */ } */
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<el-dialog v-model="show" v-loading="loading" :show-close="false" :close-on-press-escape="false" <el-dialog v-model="show" v-loading="loading" :show-close="false" :close-on-press-escape="false"
:close-on-click-modal="false" style="width: 260px"> :close-on-click-modal="false" style="width: 260px">
<template #header> <template #header>
<div class="row overflow-hide" @click="OffEdit"> <div class="row overflow-hide">
<div> <div @click="OffEdit">
<img v-if="details.FileType > 0" class="q-px-md" <img v-if="details.FileType > 0" class="q-px-md"
:src="details.FileType == 1 ? datas.pdfImg : datas.adsImg" style="height: 43px" /> :src="details.FileType == 1 ? datas.pdfImg : datas.adsImg" style="height: 43px" />
<img v-else class="q-px-md" src="@/assets/img/file.png" style="height: 43px" /> <img v-else class="q-px-md" src="@/assets/img/file.png" style="height: 43px" />
...@@ -20,11 +20,12 @@ ...@@ -20,11 +20,12 @@
{{ details.FileName }} {{ details.FileName }}
</div> </div>
</el-tooltip> </el-tooltip>
<el-input class="journeyAds-Input" v-model="details.FileName" autosize type="textarea" <el-input v-model="details.FileName" autosize type="textarea"
placeholder="Please input" maxlength="500" size="small" v-if="datas.editTitle" placeholder="Please input" maxlength="500" size="small" v-if="datas.editTitle"
@blur="handleUpdateTitle" /> @blur="OffEdit" />
</div> </div>
<div class="text-small text-5B5D62 q-pt-sm"> <div class="text-small text-5B5D62 q-pt-sm" v-if="details.CreateByName||details.CreateName"
@click="OffEdit">
创建者: 创建者:
<template v-if="type == 1"> <template v-if="type == 1">
{{ details.CreateByName }} {{ details.CreateByName }}
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
</div> </div>
</template> </template>
<div class="TreeFile-container" @click="!type?OffEdit:''"> <div class="TreeFile-container">
<el-tree-select <el-tree-select
placeholder="请选择文件" placeholder="请选择文件"
node-key="FileId" node-key="FileId"
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
:render-after-expand="false" :render-after-expand="false"
style="width: 220px" style="width: 220px"
filterable filterable
@check="handleTreeNodeClick" @node-click="handleTreeNodeClick"
class="auto-width-tree" class="auto-width-tree"
/> />
...@@ -57,10 +58,9 @@ ...@@ -57,10 +58,9 @@
<template #footer> <template #footer>
<div @click="OffEdit"> <div @click="OffEdit">
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="() => closedhandler()">关闭</el-button> <el-button @click.stop="() => closedhandler()">关闭</el-button>
<el-button type="primary" @click="() => save()"> <el-button type="primary" @click.stop="() => save()">
保存<template v-if="type == 1">另存</template> 保存<template v-if="type">另存</template>
<template v-else-if="type == 2">替换</template>
<template v-else>复制</template> <template v-else>复制</template>
</el-button> </el-button>
</span> </span>
...@@ -125,21 +125,17 @@ const dataList = ref([]); ...@@ -125,21 +125,17 @@ const dataList = ref([]);
const OffEdit = () => { const OffEdit = () => {
datas.editTitle = false; datas.editTitle = false;
}; };
const handleUpdateTitle = () => {
OffEdit();
};
const closedhandler = () => { const closedhandler = () => {
emit("close"); emit("close");
}; };
const handleTreeNodeClick = (data: any, checkObj: any) => { const handleTreeNodeClick = (data: any, checkObj: any) => {
OffEdit();
if (checkObj.checkedKeys.length != 0) {
datas.FolderObj = data; datas.FolderObj = data;
} OffEdit();
}; };
const save = () => { const save = () => {
let title = props.details.FileName; let title = props.details.FileName;
if (props.type) title = props.type == 1 ? "另存" : "替换"; if (props.type) title = "另存";
else title = title + "复制"; else title = title + "复制";
ElMessageBox.confirm( ElMessageBox.confirm(
`此操作将${title}${datas.FolderObj.FileName ? datas.FolderObj.FileName : "根目录" `此操作将${title}${datas.FolderObj.FileName ? datas.FolderObj.FileName : "根目录"
...@@ -153,8 +149,12 @@ const save = () => { ...@@ -153,8 +149,12 @@ const save = () => {
) )
.then(async () => { .then(async () => {
try { try {
if (props.type) SaveOverlay(title); if (props.type==1) SaveOverlay(title);
else CopyId(); else if(props.type==2) {
let FolderId = datas.FolderId!=null?datas.FolderId:0
emit('success',props.details.type,FolderId);
}
else if(!props.type) CopyId();
} catch (error) { } } catch (error) { }
}) })
.catch(() => { }); .catch(() => { });
...@@ -224,7 +224,6 @@ const getFile = async () => { ...@@ -224,7 +224,6 @@ const getFile = async () => {
let FileType let FileType
if(props.details.FileType>0) FileType = props.details.FileType if(props.details.FileType>0) FileType = props.details.FileType
else FileType = props.details.FolderType else FileType = props.details.FolderType
console.log(props.details,'---',FileType)
let querys = { let querys = {
FileType: FileType, FileType: FileType,
}; };
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="HistoricalVersion-container" <div class="HistoricalVersion-container"
ref="HistoricalVersion" ref="HistoricalVersion"
style="min-height: 200px;max-height: 400px;"> style="min-height: 200px;max-height: 400px;">
<el-scrollbar @scroll="scrollingHandler"> <el-scrollbar @scroll="scrollingHandler" height="400">
<table class="text-small" style="width: 100%;"> <table class="text-small" style="width: 100%;">
<tr class="text-left"> <tr class="text-left">
<th class="text-light" style="min-width: 150px;width: 150px;">时间</th> <th class="text-light" style="min-width: 150px;width: 150px;">时间</th>
...@@ -45,18 +45,18 @@ ...@@ -45,18 +45,18 @@
</td> </td>
<td class="text-light text-5B5D62"><span>{{item.FileSize}}KB</span></td> <td class="text-light text-5B5D62"><span>{{item.FileSize}}KB</span></td>
<td class="text-light"> <td class="text-light">
<span :class="[item.NewTitle?'active':'text-5B5D62']"> <span :class="[item.LogId==0?'active':'text-5B5D62']">
{{item.NewTitle?item.NewTitle:''}}</span> {{item.LogId==0?'当前版本':''}}</span>
</td> </td>
<td class="text-center"> <td class="text-center">
<span class="hoverShow"> <span class="hoverShow row items-center">
<el-button type="primary" icon="View" size="small" @click.stop="clickControls(item)">查看</el-button> <el-button type="primary" icon="View" size="small" @click.stop="clickControls(item)">查看</el-button>
<el-dropdown class="q-pl-md" trigger="click"> <el-dropdown class="q-pl-md" trigger="click">
<el-icon size="16" color="#b1b7cf"><MoreFilled /></el-icon> <el-icon size="16" color="#b1b7cf"><MoreFilled /></el-icon>
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="q-pa-md" @click.stop="OffEdit"> <el-dropdown-menu class="q-pa-md" @click.stop="OffEdit">
<el-dropdown-item icon="Promotion" @click.stop="clickControls(item,1)">另存</el-dropdown-item> <el-dropdown-item icon="Promotion" @click.stop="clickControls(item,1)">另存</el-dropdown-item>
<el-dropdown-item v-if="!item.NewTitle" icon="Switch" @click.stop="clickControls(item,2)">替换</el-dropdown-item> <el-dropdown-item v-if="item.LogId!=0" icon="Switch" @click.stop="clickControls(item,2)">替换</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
...@@ -65,9 +65,9 @@ ...@@ -65,9 +65,9 @@
</tr> </tr>
</template> </template>
</table> </table>
<div v-if="dataList.length == 0 && !loading" class="bg-white rounded" <div v-if="dataList.length == 0 && !loading" class="bg-white rounded col"
style="padding: 0 10px;"> style="padding: 40px 10px;">
<el-empty :image-size="60" description="暂无数据" /> <el-empty :image-size="150" description="文档没有历史版本" />
</div> </div>
<el-divider class="no-bg q-mt-lg" v-if='dataList.length>0 && queryObj.pageCount == queryObj.pageIndex && !loading && queryObj.pageCount != 1'> <el-divider class="no-bg q-mt-lg" v-if='dataList.length>0 && queryObj.pageCount == queryObj.pageIndex && !loading && queryObj.pageCount != 1'>
<span class="text-small bg-white" style="padding: 0 10px;color:#a3a3a3">已加载完成所有数据</span> <span class="text-small bg-white" style="padding: 0 10px;color:#a3a3a3">已加载完成所有数据</span>
...@@ -129,10 +129,9 @@ import CopyFile from "./CopyFile.vue"; ...@@ -129,10 +129,9 @@ import CopyFile from "./CopyFile.vue";
const deleteLoading = ref<any>(null); const deleteLoading = ref<any>(null);
const queryObj = reactive({ const queryObj = reactive({
pageIndex: 1, pageIndex: 1,
pageSize: 30, pageSize: 10,
pageCount: 0, //总页数 pageCount: 0, //总页数
FileId: props.details.FileId, FileId: props.details.FileId,
UpdateTime: ''
}) })
const journeyAdsDetails = ref(''); const journeyAdsDetails = ref('');
const isCopyTo = ref(false); const isCopyTo = ref(false);
...@@ -212,11 +211,13 @@ import CopyFile from "./CopyFile.vue"; ...@@ -212,11 +211,13 @@ import CopyFile from "./CopyFile.vue";
}; };
arrList(pageRes.data.data.pageData); arrList(pageRes.data.data.pageData);
dataList.value = dataList.value.concat(pageRes.data.data.pageData); dataList.value = dataList.value.concat(pageRes.data.data.pageData);
dataList.value[0].NewTitle = '当前版本'
queryObj.pageCount = pageRes.data.data.pageCount; queryObj.pageCount = pageRes.data.data.pageCount;
} }
loading.value = false loading.value = false
} catch (error) { } catch (error) {
ElMessage.error({
message:'数据加载异常,请刷新页面'
})
loading.value = false loading.value = false
} }
} }
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-scrollbar max-height="300px"> <el-scrollbar max-height="300px">
<div class="search-result-block" :class="{'q-mt-lg':i>0}" v-for="(x,i) in searchResult"> <div class="search-result-block" :class="{'q-mt-lg':i>0}" v-for="(x,i) in searchResult">
<div class="text-h6 text-left text-bolder q-mx-md q-mb-sm">{{x.type==1?'行程文档':'广告图'}}</div> <div class="text-h6 text-left text-bolder q-mx-md q-mb-sm">{{x.type==1?'行程文档':'广告图'}}</div>
<div class="items row items-center q-pa-md" v-for="(item) in x.pageData" @click="editorFileHandler(item)" v-click-outside="()=>showRightContent=0" @contextmenu="()=>showRightContent=item.FileId"> <div class="items row items-center q-pa-md" v-for="(item) in x.pageData" @click="item.IsEdit?editorFileHandler(item):openFilePositionHandler(item)" v-click-outside="()=>showRightContent=0" @contextmenu="()=>showRightContent=item.FileId">
<img class="biao" :src="(x.type==1 ?'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708337830000_43.png':'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png')" /> <img class="biao" :src="(x.type==1 ?'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708337830000_43.png':'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png')" />
<el-popover :width="200" trigger="contextmenu" :visible="showRightContent==item.FileId"> <el-popover :width="200" trigger="contextmenu" :visible="showRightContent==item.FileId">
<template #reference> <template #reference>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</div> </div>
</template> </template>
<el-menu mode="vertical"> <el-menu mode="vertical">
<el-menu-item index="1" @click="editorFileHandler(item)">打开文件</el-menu-item> <el-menu-item v-if="item.IsEdit" index="1" @click="editorFileHandler(item)">打开文件</el-menu-item>
<el-menu-item index="2-4-1" @click="openFilePositionHandler(item)">打开文件所在位置</el-menu-item> <el-menu-item index="2-4-1" @click="openFilePositionHandler(item)">打开文件所在位置</el-menu-item>
</el-menu> </el-menu>
</el-popover> </el-popover>
...@@ -121,6 +121,7 @@ const editorFileHandler = (item:any)=>{ ...@@ -121,6 +121,7 @@ const editorFileHandler = (item:any)=>{
searchData.value.sellId = item.FileId; searchData.value.sellId = item.FileId;
searchData.value.sellTempId = item.TempId; searchData.value.sellTempId = item.TempId;
searchData.value.TemplateType = item.FileType; searchData.value.TemplateType = item.FileType;
searchData.value.ParentFileId = item.FolderId
SalesEditorStore.setSalesEditor(2); SalesEditorStore.setSalesEditor(2);
marketStore.setMarket(false); marketStore.setMarket(false);
} }
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
:render-after-expand="false" :render-after-expand="false"
style="width: 220px" style="width: 220px"
filterable filterable
@check="handleTreeNodeClick" @current-change="handleTreeNodeClick"
class="auto-width-tree" class="auto-width-tree"
/> />
...@@ -139,10 +139,8 @@ import FolderService from "@/services/FolderService"; ...@@ -139,10 +139,8 @@ import FolderService from "@/services/FolderService";
const handleTreeNodeClick = (data:any,checkObj:any) => { const handleTreeNodeClick = (data:any,checkObj:any) => {
// 共两个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、树目前的选中状态对象 // 共两个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、树目前的选中状态对象
// 树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性 // 树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性
if (checkObj.checkedKeys.length != 0) {
datas.FolderObj = data datas.FolderObj = data
} }
}
const filterNode = (value: string, data: Tree) => { const filterNode = (value: string, data: Tree) => {
if (!value) return true if (!value) return true
return data.FileName.includes(value) return data.FileName.includes(value)
...@@ -169,7 +167,7 @@ import FolderService from "@/services/FolderService"; ...@@ -169,7 +167,7 @@ import FolderService from "@/services/FolderService";
}) })
} }
ElMessageBox.confirm(`此操作将${title}移动到${datas.FolderObj.FileName},是否确定?`, "提示", { ElMessageBox.confirm(`此操作将${title}移动到${datas.FolderObj.FileName?datas.FolderObj.FileName:'根目录'},是否确定?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
......
...@@ -139,7 +139,7 @@ import FolderService from "@/services/FolderService"; ...@@ -139,7 +139,7 @@ import FolderService from "@/services/FolderService";
} }
const save = () => { const save = () => {
let title = props.details.FileName let title = props.details.FileName
ElMessageBox.confirm(`此操作将${title}恢复到${datas.FolderObj.FileName},是否确定?`, "提示", { ElMessageBox.confirm(`此操作将${title}恢复到${datas.FolderObj.FileName?datas.FolderObj.FileName:'根目录'},是否确定?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
......
<template> <template>
<el-table ref="dataTableRef" highlight-current-row class="sample-table" v-load-more="tableScrollHandler" :data="dataList" style="width: 100%" <el-table v-loading="loading" ref="dataTableRef" highlight-current-row class="sample-table" v-load-more="tableScrollHandler" :data="dataList" style="width: 100%"
@sort-change="sortHandler" :default-sort="{ prop: 'CreateTime', order: 'descending' }" @sort-change="sortHandler" :default-sort="{ prop: 'CreateTime', order: 'descending' }"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="20" v-if="currentMenu==3||currentMenu==4"/> <el-table-column type="selection" width="20" v-if="currentMenu==3||currentMenu==4"/>
...@@ -55,24 +55,29 @@ ...@@ -55,24 +55,29 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="datas.Title" width="150" sortable="custom" prop=""> <el-table-column :label="datas.Title" width="150" sortable="custom" prop="CreateTime">
<template #default="scope"> <template #default="scope">
{{ formatDateTimeToRead(scope.row.UpdateTime&&scope.row.UpdateTime!=''?scope.row.UpdateTime:scope.row.CreateTime) }} {{ formatDateTimeToRead(scope.row.UpdateTime&&scope.row.UpdateTime!=''?scope.row.UpdateTime:scope.row.CreateTime) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="CreateName" width="100" /> <el-table-column label="创建人" prop="" width="180" >
<template #default="scope">
{{scope.row.CreateName}}
<span class="text-info" v-if="datas.loggedder!=scope.row.CreateName"> 分享的</span>
</template>
</el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template #default="scope"> <template #default="scope">
<div class="row items-center" :class="{'hover':showItemId!=scope.row.FileId}"> <div class="row items-center" :class="{'hover':showItemId!=scope.row.FileId}">
<el-button v-if="currentMenu!=-1" type="primary" :icon="Edit" size="small" @click.stop="editDelete(scope.row)">编辑</el-button> <el-button v-if="(datas.loggedder==scope.row.CreateName&&currentMenu!=-1)||scope.row.IsEdit" type="primary" :icon="Edit" size="small" @click.stop="editDelete(scope.row)">编辑</el-button>
<el-button v-else type="primary" icon="Position" size="small" @click.stop="recover(scope.row)">恢复</el-button> <el-button v-if="currentMenu==-1" type="primary" icon="Position" size="small" @click.stop="recover(scope.row)">恢复</el-button>
<el-dropdown class="q-pl-md" trigger="click" @visible-change="(val:boolean)=>dropdownChange(val,scope.row.FileId)" <el-dropdown class="q-pl-md" trigger="click" @visible-change="(val:boolean)=>dropdownChange(val,scope.row.FileId)"
v-if="scope.row.FileType||currentMenu!=-1"> v-if="(datas.loggedder==scope.row.CreateName&&(scope.row.FileType||currentMenu!=-1))||scope.row.IsDownload||scope.row.IsView">
<el-icon size="16" color="#b1b7cf"><MoreFilled /></el-icon> <el-icon size="16" color="#b1b7cf"><MoreFilled /></el-icon>
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="q-pa-md" @click.stop="OffEdit"> <el-dropdown-menu class="q-pa-md" @click.stop="OffEdit">
<el-dropdown-item v-if="scope.row.FileType>0" icon="View" @click="viewTemplate(scope.row)">查看</el-dropdown-item> <el-dropdown-item v-if="(datas.loggedder==scope.row.CreateName&&scope.row.FileType>0)||scope.row.IsView" icon="View" @click="viewTemplate(scope.row)">查看</el-dropdown-item>
<template v-if="currentMenu!=-1"> <template v-if="currentMenu!=-1&&datas.loggedder==scope.row.CreateName">
<el-dropdown-item v-if="scope.row.FileType" icon="EditPen" @click.stop="startEditTitle(scope.row)">重命名</el-dropdown-item> <el-dropdown-item v-if="scope.row.FileType" icon="EditPen" @click.stop="startEditTitle(scope.row)">重命名</el-dropdown-item>
<el-dropdown-item v-if="scope.row.FileType" icon="Clock" @click.stop="history(scope.row)">历史版本</el-dropdown-item> <el-dropdown-item v-if="scope.row.FileType" icon="Clock" @click.stop="history(scope.row)">历史版本</el-dropdown-item>
<el-dropdown-item icon="Position" @click.stop="()=>setFileShareHandler(scope.row)">分享</el-dropdown-item> <el-dropdown-item icon="Position" @click.stop="()=>setFileShareHandler(scope.row)">分享</el-dropdown-item>
...@@ -85,10 +90,10 @@ ...@@ -85,10 +90,10 @@
<span>{{scope.row.IsCollect?'取消收藏':'收藏'}}</span> <span>{{scope.row.IsCollect?'取消收藏':'收藏'}}</span>
</span> </span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item v-if="scope.row.FileType!=0&&currentMenu!=-1" icon="Download" @click="exportDocument(scope.row)">导出</el-dropdown-item>
<el-dropdown-item v-if="scope.row.FileType" icon="CopyDocument" @click.stop="CopyTo(scope.row)">复制到</el-dropdown-item>
<el-dropdown-item icon="Delete" @click="editDelete(scope.row,1)">删除</el-dropdown-item> <el-dropdown-item icon="Delete" @click="editDelete(scope.row,1)">删除</el-dropdown-item>
</template> </template>
<el-dropdown-item v-if="(datas.loggedder==scope.row.CreateName&&scope.row.FileType&&currentMenu!=-1)||scope.row.IsDownLoad" icon="Download" @click="exportDocument(scope.row)">导出</el-dropdown-item>
<el-dropdown-item v-if="(datas.loggedder==scope.row.CreateName&&scope.row.FileType&&currentMenu!=-1)||scope.row.IsView" icon="CopyDocument" @click.stop="CopyTo(scope.row)">复制到</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
...@@ -148,6 +153,8 @@ ...@@ -148,6 +153,8 @@
emit('success')}"></TreeFileRecover> emit('success')}"></TreeFileRecover>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { userStore } from '@/store/user';
import { storeToRefs } from 'pinia';
import { ApiResult } from '@/configs/axios'; import { ApiResult } from '@/configs/axios';
import OrgService from '@/services/OrgService'; import OrgService from '@/services/OrgService';
import { ref,reactive,watch,inject,nextTick, PropType } from 'vue'; import { ref,reactive,watch,inject,nextTick, PropType } from 'vue';
...@@ -208,6 +215,7 @@ import CopyFile from "./CopyFile.vue"; ...@@ -208,6 +215,7 @@ import CopyFile from "./CopyFile.vue";
type: number; type: number;
}>({ id: -1, name: "", parentId: 0, number: 1 }); }>({ id: -1, name: "", parentId: 0, number: 1 });
const datas = reactive({ const datas = reactive({
loggedder: '',
emptyTitle: '', emptyTitle: '',
Title: '', Title: '',
selectAll: false as any, selectAll: false as any,
...@@ -222,11 +230,14 @@ import CopyFile from "./CopyFile.vue"; ...@@ -222,11 +230,14 @@ import CopyFile from "./CopyFile.vue";
}); });
const SalesEditorStore = useSellTemplateStore(); const SalesEditorStore = useSellTemplateStore();
const marketStore = useScreenStore(); const marketStore = useScreenStore();
const { userInfo } = storeToRefs(userStore())
datas.loggedder = userInfo.value.emName
const dataList = ref([] as Array<any>); const dataList = ref([] as Array<any>);
dataList.value = props.list dataList.value = props.list
const queryObj = ref({} as any); const queryObj = ref({} as any);
queryObj.value = props.msg queryObj.value = props.msg
const loading = ref(false) as Boolean
const shareId = ref(0); const shareId = ref(0);
const shareFileType = ref(0) const shareFileType = ref(0)
...@@ -291,12 +302,6 @@ import CopyFile from "./CopyFile.vue"; ...@@ -291,12 +302,6 @@ import CopyFile from "./CopyFile.vue";
} }
emit('refreshHandler',obj) emit('refreshHandler',obj)
} }
const clickSort = (type:any) =>{
let obj = {
OrderByType: queryObj.value.OrderByType==2?1:2
}
emit('refreshHandler',obj)
}
const sortHandler = (val:any)=>{ const sortHandler = (val:any)=>{
queryObj.value.OrderByType = val.order=='descending'?2:1 queryObj.value.OrderByType = val.order=='descending'?2:1
let obj = { let obj = {
...@@ -554,6 +559,15 @@ import CopyFile from "./CopyFile.vue"; ...@@ -554,6 +559,15 @@ import CopyFile from "./CopyFile.vue";
searchData.value.sellId = row.FileId; searchData.value.sellId = row.FileId;
searchData.value.sellTempId = row.TempId; searchData.value.sellTempId = row.TempId;
searchData.value.TemplateType = row.FileType; searchData.value.TemplateType = row.FileType;
if(props.currentMenu==0&&datas.loggedder!=row.CreateName){
searchData.value.ParentFileId = 0
if(row.IsDownLoad==0) searchData.value.noExportPermission = true
else searchData.value.noExportPermission = false
if(row.IsView==0) searchData.value.noCopyPermission = true
else searchData.value.noCopyPermission = false
}else{
searchData.value.ParentFileId = row.ParentFileId;
}
SalesEditorStore.setSalesEditor(2); SalesEditorStore.setSalesEditor(2);
marketStore.setMarket(false); marketStore.setMarket(false);
} else { } else {
...@@ -607,13 +621,21 @@ import CopyFile from "./CopyFile.vue"; ...@@ -607,13 +621,21 @@ import CopyFile from "./CopyFile.vue";
} }
},500) },500)
} }
loading.value = true
setTimeout(()=>{
loading.value = false
},300)
watch(() => props.list, (n,o) => { watch(() => props.list, (n,o) => {
loading.value = true
if (props.list) { if (props.list) {
nextTick(() => { nextTick(() => {
dataList.value = props.list dataList.value = props.list
setCurrentRow() setCurrentRow()
}) })
} }
setTimeout(()=>{
loading.value = false
},300)
}) })
watch(() => props.navigations, (n,o) => { watch(() => props.navigations, (n,o) => {
......
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