Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
pptist
Commits
a0c6f695
Commit
a0c6f695
authored
Feb 22, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
58b6cec3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
160 deletions
+25
-160
BrowsingHistory.vue
src/views/SellTemplate/components/BrowsingHistory.vue
+25
-160
No files found.
src/views/SellTemplate/components/BrowsingHistory.vue
View file @
a0c6f695
...
@@ -3,19 +3,8 @@
...
@@ -3,19 +3,8 @@
<div
class=
"q-pl-lg row q-mb-lg"
>
<div
class=
"q-pl-lg row q-mb-lg"
>
<div
class=
"col row items-center q-pl-md"
>
<div
class=
"col row items-center q-pl-md"
>
<h5
class=
"row items-center"
>
<h5
class=
"row items-center"
>
<span
<span
class=
"q-pl-md"
>
class=
"pointer"
<span
class=
"pointer"
>
最近
</span>
@
click=
"BackInquire"
><el-icon
class=
"q-pt-md"
v-if=
"queryObj.FileId > 0"
size=
"20"
><ArrowLeft
/></el-icon
></span>
<span
class=
"q-pl-md"
:class=
"[queryObj.FileId == 0?'':'row items-center']"
>
<span
class=
"pointer"
@
click=
"queryObj.FileId=0,refreshHandler()"
>
<template
v-if=
"currentMenu == 0"
>
最近
</
template
>
</span>
<breadPeeling
v-if=
"queryObj.FileId"
:navigations=
"Navigations"
@
Inquire=
"breadPeelingInquire"
></breadPeeling>
</span>
</span>
</h5>
</h5>
<div
class=
"select-btn q-pl-lg pointer q-mt-sm"
>
<div
class=
"select-btn q-pl-lg pointer q-mt-sm"
>
...
@@ -36,7 +25,22 @@
...
@@ -36,7 +25,22 @@
</el-button>
</el-button>
<template
#
dropdown
>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-menu>
<el-dropdown-item
icon=
"Expand"
@
click=
"MoveFile(0)"
>
移动至
</el-dropdown-item>
<el-dropdown-item
icon=
"Expand"
>
12121
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
<el-dropdown
trigger=
"click"
>
<el-button>
新建
</el-button>
<
template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item
@
click=
"sellAdd(1)"
>
新建行程
</el-dropdown-item
>
<el-dropdown-item
@
click=
"sellAdd(3)"
>
建广告图
</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown-menu>
</
template
>
</
template
>
</el-dropdown>
</el-dropdown>
...
@@ -84,18 +88,18 @@
...
@@ -84,18 +88,18 @@
</tr>
</tr>
<
template
v-for=
"(item,index) in dataList"
>
<
template
v-for=
"(item,index) in dataList"
>
<tr
class=
"text-5B5D62 journeyAdsple-table pointer"
>
<tr
class=
"text-5B5D62 journeyAdsple-table pointer"
>
<td
@
click
.
stop=
"
item.FileType?OffEdit():editDelete(item,2
)"
><div
class=
"row items-center hoverShow"
<td
@
click
.
stop=
"
OffEdit(
)"
><div
class=
"row items-center hoverShow"
:style=
"
{'opacity':item.singleChoice?1:''}">
:style=
"
{'opacity':item.singleChoice?1:''}">
<el-checkbox
size=
"sm"
class=
"SelectAllBox"
v-model=
"item.singleChoice"
<el-checkbox
size=
"sm"
class=
"SelectAllBox"
v-model=
"item.singleChoice"
@
click
.
stop=
"singleChoice(item)"
/></div></td>
@
click
.
stop=
"singleChoice(item)"
/></div></td>
<td
style=
"width: 30px;"
@
click
.
stop=
"
item.FileType?OffEdit():editDelete(item,2
)"
>
<td
style=
"width: 30px;"
@
click
.
stop=
"
OffEdit(
)"
>
<img
v-if=
"item.FileType"
class=
"q-px-md"
:src=
"item.FileType==1?datas.pdfImg:datas.adsImg"
<img
v-if=
"item.FileType"
class=
"q-px-md"
:src=
"item.FileType==1?datas.pdfImg:datas.adsImg"
style=
"height: 25px;"
/>
style=
"height: 25px;"
/>
<img
v-else
class=
"q-px-md"
src=
"@/assets/img/file.png"
<img
v-else
class=
"q-px-md"
src=
"@/assets/img/file.png"
style=
"height: 23px;"
/>
style=
"height: 23px;"
/>
</td>
</td>
<td
class=
"journeyAds-title wrap row"
>
<td
class=
"journeyAds-title wrap row"
>
<div
class=
"col"
v-if=
"!item.editTitle"
@
click
.
stop=
"
item.FileType?OffEdit():editDelete(item,2
)"
>
<div
class=
"col"
v-if=
"!item.editTitle"
@
click
.
stop=
"
OffEdit(
)"
>
<div
class=
"row flex-center"
>
<div
class=
"row flex-center"
>
<el-tooltip
<el-tooltip
placement=
"top-start"
>
placement=
"top-start"
>
...
@@ -117,8 +121,8 @@
...
@@ -117,8 +121,8 @@
v-if=
"item.editTitle"
v-if=
"item.editTitle"
@
blur=
"handleUpdateTitle(item)"
@
blur=
"handleUpdateTitle(item)"
/></td>
/></td>
<td
class=
"text-center"
@
click
.
stop=
"
item.FileType?OffEdit():editDelete(item,2
)"
><span>
{{item.Day?item.Day+'天前':item.UpdateTime}}
</span></td>
<td
class=
"text-center"
@
click
.
stop=
"
OffEdit(
)"
><span>
{{item.Day?item.Day+'天前':item.UpdateTime}}
</span></td>
<td
class=
"text-center"
@
click
.
stop=
"
item.FileType?OffEdit():editDelete(item,2
)"
><span>
{{item.CreateName}}
</span></td>
<td
class=
"text-center"
@
click
.
stop=
"
OffEdit(
)"
><span>
{{item.CreateName}}
</span></td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<div
class=
"hoverShow row items-center just-center q-pt-sm"
>
<div
class=
"hoverShow row items-center just-center q-pt-sm"
>
<el-button
type=
"primary"
:icon=
"Edit"
size=
"small"
@
click
.
stop=
"editDelete(item)"
>
编辑
</el-button>
<el-button
type=
"primary"
:icon=
"Edit"
size=
"small"
@
click
.
stop=
"editDelete(item)"
>
编辑
</el-button>
...
@@ -129,7 +133,6 @@
...
@@ -129,7 +133,6 @@
<el-dropdown-item
v-if=
"item.FileType"
icon=
"EditPen"
@
click
.
stop=
"startEditTitle(item)"
>
重命名
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"EditPen"
@
click
.
stop=
"startEditTitle(item)"
>
重命名
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Clock"
@
click
.
stop=
"history(item)"
>
历史版本
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Clock"
@
click
.
stop=
"history(item)"
>
历史版本
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Position"
@
click
.
stop=
"()=>shareId=item.FileId"
>
分享
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Position"
@
click
.
stop=
"()=>shareId=item.FileId"
>
分享
</el-dropdown-item>
<el-dropdown-item
icon=
"Expand"
@
click
.
stop=
"MoveFile(item)"
>
移动至
</el-dropdown-item>
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(item,1)"
>
删除
</el-dropdown-item>
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(item,1)"
>
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</
template
>
</
template
>
...
@@ -172,15 +175,6 @@
...
@@ -172,15 +175,6 @@
v-if=
"shareId > 0"
v-if=
"shareId > 0"
@
close=
"() => (shareId = 0)"
@
close=
"() => (shareId = 0)"
></ShareForm>
></ShareForm>
<Folder
:folder-id=
"folderObj?.id"
:folder-name=
"folderObj?.name"
:parent-id=
"folderObj.parentId"
:folder-type=
"folderObj?.type"
v-if=
"folderObj.id > -1"
@
close=
"() => (folderObj.id = -1)"
@
success=
"refreshHandler()"
></Folder>
<HistoricalVersion
<HistoricalVersion
:details=
"journeyAdsDetails"
:details=
"journeyAdsDetails"
...
@@ -188,18 +182,6 @@
...
@@ -188,18 +182,6 @@
@
close=
"() => {journeyAdsDetails = '';isHistoricalVersion=false}"
@
close=
"() => {journeyAdsDetails = '';isHistoricalVersion=false}"
></HistoricalVersion>
></HistoricalVersion>
<TreeFile
v-if=
"isTreeFile"
:details=
"journeyAdsDetails"
:selected-datas=
"datas.selectedDatas"
:set-file-list=
"datas.setFileList"
:file-type=
"queryObj.FileType"
@
close=
"() => {journeyAdsDetails = '';isTreeFile=false}"
@
success=
"() => {
journeyAdsDetails = '';
isTreeFile=false;
datas.selectAll = false;
datas.selectedDatas = [];
refreshHandler()}"
></TreeFile>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
reactive
,
provide
,
watch
,
inject
,
onMounted
}
from
"vue"
;
import
{
ref
,
reactive
,
provide
,
watch
,
inject
,
onMounted
}
from
"vue"
;
...
@@ -211,10 +193,7 @@
...
@@ -211,10 +193,7 @@
import
{
getDaysBetween
}
from
"@/utils/common"
;
import
{
getDaysBetween
}
from
"@/utils/common"
;
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
ShareForm
from
"./ShareForm.vue"
;
import
ShareForm
from
"./ShareForm.vue"
;
import
Folder
from
"./Folder.vue"
;
import
HistoricalVersion
from
"./HistoricalVersion.vue"
;
import
HistoricalVersion
from
"./HistoricalVersion.vue"
;
import
TreeFile
from
"./TreeFile.vue"
;
import
breadPeeling
from
"./breadPeeling.vue"
;
const
SalesEditorStore
=
useSellTemplateStore
();
const
SalesEditorStore
=
useSellTemplateStore
();
const
marketStore
=
useScreenStore
();
const
marketStore
=
useScreenStore
();
...
@@ -229,7 +208,6 @@
...
@@ -229,7 +208,6 @@
const
shareId
=
ref
(
0
);
const
shareId
=
ref
(
0
);
const
journeyAdsDetails
=
ref
(
''
);
const
journeyAdsDetails
=
ref
(
''
);
const
isHistoricalVersion
=
ref
(
false
);
const
isHistoricalVersion
=
ref
(
false
);
const
isTreeFile
=
ref
(
false
)
const
Navigations
=
ref
([]
as
Array
<
any
>
);
const
Navigations
=
ref
([]
as
Array
<
any
>
);
const
showHistory
=
ref
(
true
);
const
showHistory
=
ref
(
true
);
const
isIndeterminate
=
ref
(
false
);
const
isIndeterminate
=
ref
(
false
);
...
@@ -252,12 +230,6 @@
...
@@ -252,12 +230,6 @@
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png"
,
"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"
,
folderImg
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png"
,
});
});
const
folderObj
=
ref
<
{
id
:
number
;
name
:
string
;
parentId
:
number
;
type
:
number
;
}
>
({
id
:
-
1
,
name
:
""
,
parentId
:
0
,
number
:
1
});
const
queryObj
=
reactive
({
const
queryObj
=
reactive
({
pageIndex
:
1
,
pageIndex
:
1
,
...
@@ -303,24 +275,7 @@
...
@@ -303,24 +275,7 @@
)
dataList
.
value
[
i
].
singleChoice
=
true
;
)
dataList
.
value
[
i
].
singleChoice
=
true
;
}
}
}
}
// 导航
const
BackInquire
=
()
=>
{
datas
.
selectAll
=
false
;
datas
.
selectedDatas
=
[];
let
Navigation
=
Navigations
.
value
[
Navigations
.
value
.
length
-
2
]
if
(
Navigation
&&
Navigation
.
FileId
){
breadPeelingInquire
(
Navigation
.
FileId
,
Navigations
.
value
.
length
-
2
)
}
else
breadPeelingInquire
(
0
,
0
)
}
const
breadPeelingInquire
=
(
FileId
:
number
,
index
:
number
)
=>
{
datas
.
selectAll
=
false
;
datas
.
selectedDatas
=
[];
Navigations
.
value
.
splice
(
index
+
1
,
Navigations
.
value
.
length
-
1
)
queryObj
.
FileId
=
FileId
refreshHandler
()
}
const
sellAdd
=
(
type
:
number
)
=>
{
const
sellAdd
=
(
type
:
number
)
=>
{
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellTempId
=
0
searchData
.
value
.
sellTempId
=
0
...
@@ -328,26 +283,6 @@
...
@@ -328,26 +283,6 @@
marketStore
.
setMarket
(
true
)
marketStore
.
setMarket
(
true
)
}
}
// 移动到文件夹
const
MoveFile
=
(
item
:
any
)
=>
{
if
(
item
)
journeyAdsDetails
.
value
=
item
else
{
datas
.
setFileList
=
[]
for
(
let
i
=
0
;
i
<
dataList
.
value
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
datas
.
selectedDatas
.
length
;
j
++
){
if
(
dataList
.
value
[
i
].
FileId
==
datas
.
selectedDatas
[
j
]){
datas
.
setFileList
.
push
(
{
FileId
:
dataList
.
value
[
i
].
FileId
,
FileType
:
dataList
.
value
[
i
].
FileType
}
)
}
}
}
}
isTreeFile
.
value
=
true
}
// 历史版本
// 历史版本
const
history
=
(
row
:
any
)
=>
{
const
history
=
(
row
:
any
)
=>
{
journeyAdsDetails
.
value
=
row
;
journeyAdsDetails
.
value
=
row
;
...
@@ -439,47 +374,6 @@
...
@@ -439,47 +374,6 @@
if
(
datasList
==
0
&&
checkedCount
==
0
)
datas
.
selectAll
=
""
;
if
(
datasList
==
0
&&
checkedCount
==
0
)
datas
.
selectAll
=
""
;
};
};
const
DeleteFile
=
async
(
item
:
any
)
=>
{
ElMessageBox
.
confirm
(
"此操作将删除该文件夹,是否确定?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(
async
()
=>
{
try
{
let
queryMsg
=
{
FolderId
:
item
.
FileId
,
};
deleteLoading
.
value
=
ElLoading
.
service
({
lock
:
true
,
text
:
"正在处理"
,
});
let
pageRes
=
await
FolderService
.
RemoveTripFolder
(
queryMsg
);
if
(
pageRes
.
data
.
resultCode
==
1
)
{
ElMessage
({
showClose
:
true
,
message
:
`删除
${
queryObj
.
FileType
==
2
?
"广告"
:
"行程"
}
文件夹成功`
,
type
:
"success"
,
});
refreshHandler
();
}
else
{
ElMessage
({
showClose
:
true
,
message
:
`删除
${
queryObj
.
FileType
==
2
?
"广告"
:
"行程"
}
文件夹失败`
,
type
:
"warning"
,
});
}
deleteLoading
.
value
.
close
();
deleteLoading
.
value
=
null
;
}
catch
(
error
)
{}
})
.
catch
(()
=>
{});
};
const
DeleteTemplate
=
async
(
item
:
any
)
=>
{
const
DeleteTemplate
=
async
(
item
:
any
)
=>
{
ElMessageBox
.
confirm
(
"此操作将删除该模版,是否确定?"
,
"提示"
,
{
ElMessageBox
.
confirm
(
"此操作将删除该模版,是否确定?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
...
@@ -518,10 +412,8 @@
...
@@ -518,10 +412,8 @@
};
};
const
editDelete
=
async
(
row
:
any
,
type
:
Number
)
=>
{
const
editDelete
=
async
(
row
:
any
,
type
:
Number
)
=>
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
if
(
row
.
FileType
)
DeleteTemplate
(
row
);
DeleteTemplate
(
row
)
else
DeleteFile
(
row
);
}
else
{
}
else
{
if
(
row
.
FileType
)
{
let
list
=
[
let
list
=
[
{
{
id
:
"test-slide-1"
,
id
:
"test-slide-1"
,
...
@@ -539,28 +431,6 @@
...
@@ -539,28 +431,6 @@
searchData
.
value
.
TemplateType
=
row
.
FileType
;
searchData
.
value
.
TemplateType
=
row
.
FileType
;
SalesEditorStore
.
setSalesEditor
(
2
);
SalesEditorStore
.
setSalesEditor
(
2
);
marketStore
.
setMarket
(
false
);
marketStore
.
setMarket
(
false
);
}
else
{
// 2文件夹详情
if
(
type
==
2
)
{
console
.
log
(
row
.
FileId
,
row
.
ParentFileId
)
queryObj
.
FileId
=
row
.
FileId
;
Navigations
.
value
.
push
(
{
FileId
:
row
.
FileId
,
FileName
:
row
.
FileName
,
ParentFileId
:
row
.
ParentFileId
}
);
datas
.
selectAll
=
false
datas
.
selectedDatas
=
[]
isIndeterminate
.
value
=
false
refreshHandler
();
}
else
{
folderObj
.
value
.
id
=
row
.
FileId
;
folderObj
.
value
.
name
=
row
.
FileName
;
folderObj
.
value
.
type
=
row
.
FileType
;
}
}
}
}
};
};
const
querySearchHandler
=
async
()
=>
{
const
querySearchHandler
=
async
()
=>
{
...
@@ -621,11 +491,6 @@
...
@@ -621,11 +491,6 @@
queryObj
.
pageIndex
=
1
;
queryObj
.
pageIndex
=
1
;
querySearchHandler
();
querySearchHandler
();
};
};
const
operaFolder
=
(
id
:
number
,
name
:
string
)
=>
{
folderObj
.
value
.
id
=
id
;
folderObj
.
value
.
name
=
name
;
folderObj
.
value
.
type
=
queryObj
.
FileType
;
};
watch
(
watch
(
()
=>
searchData
.
value
.
SellTemplateType
,
()
=>
searchData
.
value
.
SellTemplateType
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment