Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1b70635a
authored
May 17, 2023
by
ext.wangyuman1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
内容中心从素材中选择重置按钮bug修复
1 parent
b9229b1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
63 deletions
linkwe-pc/src/components/ContentCenter/MaterialCenter/MaPage.vue
linkwe-pc/src/components/ContentCenter/MaterialCenter/index.vue
linkwe-pc/src/components/ContentCenter/MaterialCenter/MaPage.vue
View file @
1b70635
...
...
@@ -3,7 +3,6 @@ import { getTree, getList } from '@/api/material'
import
'quill/dist/quill.core.css'
import
'quill/dist/quill.snow.css'
import
'quill/dist/quill.bubble.css'
import
{
getCodeCategoryList
}
from
'@/api/drainageCode/staff'
import
PreviewInPhone
from
'@/components/ContentCenter/PreviewInPhone'
export
default
{
...
...
@@ -62,15 +61,8 @@ export default {
},
list
:
[],
// 列表
total
:
0
,
// 总条数
treeData
:
[{}],
// 树
// 树props
treeProps
:
{
children
:
'children'
,
label
:
'name'
,
},
treeForm
:
{},
// 树表格
treeDialogVisible
:
false
,
// 树表格对话框显隐
group
:
''
,
// 选择的分组
groupDialogVisible
:
false
,
// 移动分组对话框
// 分组props
...
...
@@ -107,8 +99,7 @@ export default {
computed
:
{},
created
()
{
this
.
query
.
mediaType
=
this
.
type
this
.
getTree
()
// this.getList()
// this.getTree()
// 开始
this
.
getCodeCategoryListFn
()
// 结束
...
...
@@ -146,23 +137,6 @@ export default {
resetQuery
()
{
this
.
query
.
materialName
=
''
this
.
search
()
// this.query.categoryId = 1
},
// 结束
// 获取类目树
getTree
()
{
getTree
(
this
.
type
).
then
(({
data
})
=>
{
this
.
treeData
=
[
{
id
:
''
,
name
:
'全部'
,
parentId
:
'0'
,
hasParent
:
false
,
hasChildren
:
true
,
children
:
data
||
[],
},
]
})
},
// 获取素材列表
getList
(
page
)
{
...
...
@@ -173,7 +147,7 @@ export default {
this
.
list
=
rows
.
sort
((
a
,
b
)
=>
+
new
Date
(
b
.
updateTime
)
-
+
new
Date
(
a
.
updateTime
))
this
.
total
=
+
total
this
.
loading
=
false
this
.
$emit
(
'listChange'
,
this
.
list
)
this
.
$emit
(
'listChange'
,
this
.
list
,
this
.
type
)
})
.
catch
(()
=>
{
this
.
loading
=
false
...
...
@@ -197,7 +171,8 @@ export default {
:class=
"
{ active: groupIndex == key }"
v-for="(group, key) in groupList"
:key="group.id"
@click="switchGroup(key, group)">
@click="switchGroup(key, group)"
>
<div
class=
"name"
>
{{
group
.
name
+
' ('
+
group
.
number
+
')'
}}
</div>
</div>
</div>
...
...
@@ -211,7 +186,8 @@ export default {
clearable
prefix-icon=
"el-icon-search"
style=
"width: 300px"
@
keyup
.
enter
.
native=
"search()"
/>
@
keyup
.
enter
.
native=
"search()"
/>
<el-button
class=
"ml10"
@
click=
"getList(1)"
type=
"primary"
>
查询
</el-button>
<!-- v-hasPermi="['wecom:material:list']" -->
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
...
...
@@ -225,7 +201,8 @@ export default {
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
@
pagination=
"getList"
/>
</div>
</el-col>
</el-row>
...
...
linkwe-pc/src/components/ContentCenter/MaterialCenter/index.vue
View file @
1b70635
...
...
@@ -18,7 +18,7 @@
:label=
"item.label + '(' + item.list.length + ')'"
:name=
"item.name"
>
<MaPage
ref=
"page"
:type=
"item.type"
v-slot=
"
{ list }">
<MaPage
ref=
"page"
:type=
"item.type"
v-slot=
"
{ list }"
@listChange="listChange"
>
<div
v-if=
"item.type === '0'"
>
<div
v-if=
"list && list.length"
>
<el-checkbox-group
v-model=
"paneList[picindex].list"
class=
"imgStyle"
>
...
...
@@ -148,6 +148,19 @@ export default {
}
},
methods
:
{
listChange
(
list
,
type
)
{
this
.
paneList
=
this
.
paneList
.
map
((
item
)
=>
{
if
(
type
===
item
.
type
)
{
item
.
list
.
forEach
((
one
)
=>
{
this
.
ids
=
this
.
ids
.
filter
((
two
)
=>
{
return
two
.
id
!==
one
.
id
})
})
item
.
list
=
[]
}
return
item
})
},
// 超过num个。。。展示
coverContent
(
str
,
num
)
{
if
(
str
&&
str
.
length
>
num
)
{
...
...
@@ -318,30 +331,6 @@ export default {
}
})
},
// 多选框选中数据
// handleSelectionChange(selection) {
// let list = JSON.parse(JSON.stringify(this.paneList[this.index].list))
// this.paneList[this.index].list = selection
// this.ids = []
// this.paneList.forEach((item) => {
// if (item.list && item.list.length) {
// item.list.forEach((item1) => {
// this.ids.push(item1)
// })
// }
// })
// if (this.ids.length + this.talkListLength > this.maxlength) {
// this.paneList[this.index].list = list
// this.ids = []
// this.paneList.forEach((item) => {
// if (item.list && item.list.length) {
// item.list.forEach((item1) => {
// this.ids.push(item1)
// })
// }
// })
// }
// },
// 处理文件类型
filType
(
file
)
{
let
filecontent
=
JSON
.
parse
(
JSON
.
stringify
(
file
))
...
...
@@ -365,13 +354,6 @@ export default {
}
else
{
this
.
inx
=
index
}
// if (this.picindex === 0) {
// // 不包含文本
// this.inx = this.index - 1
// } else if (this.picindex === 1) {
// // 包含文本
// }
},
},
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment