Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
90b42ed9
Commit
90b42ed9
authored
Sep 14, 2023
by
Cat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zd 社团
parent
ddf3a95c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
773 additions
and
516 deletions
+773
-516
ruoyi-ui/src/api/smartSchool/MassOrganization/basicInfo/index.js
+60
-0
ruoyi-ui/src/api/smartSchool/MassOrganization/communityStyle/index.js
+59
-0
ruoyi-ui/src/views/smartSchool/massOrganization/basicInformationManagement/index.vue
+131
-127
ruoyi-ui/src/views/smartSchool/massOrganization/communityStyle/index.vue
+523
-389
No files found.
ruoyi-ui/src/api/smartSchool/MassOrganization/basicInfo/index.js
0 → 100644
View file @
90b42ed9
// 社团基础信息
import
request
from
'@/utils/request'
;
// 查询社团信息列表
export
function
getCommunityInfo
(
data
)
{
return
request
({
url
:
'/info/list'
,
method
:
'get'
,
params
:
data
})
}
// 查询社团详细信息列表
export
function
listCommunityInfo
(
id
)
{
return
request
({
url
:
'/info/'
+
id
,
method
:
'get'
,
})
}
// 修改社团信息
export
function
editCommunityInfo
(
data
)
{
return
request
({
url
:
'/info'
,
method
:
'put'
,
data
:
data
})
}
// 新增社团信息
export
function
addCommunityInfo
(
data
)
{
return
request
({
url
:
'/info'
,
method
:
'post'
,
data
:
data
})
}
// 删除社团信息
export
function
delCommunityInfo
(
id
)
{
return
request
({
url
:
'/info/'
+
id
,
method
:
'delete'
})
}
// 获取全校教师(不分页)
export
function
getTeachers
(
data
)
{
return
request
({
url
:
'/school/teacher/getTeachers'
,
method
:
'get'
,
params
:
data
})
}
\ No newline at end of file
ruoyi-ui/src/api/smartSchool/MassOrganization/communityStyle/index.js
0 → 100644
View file @
90b42ed9
// 社团风采信息
import
request
from
'@/utils/request'
;
// 查询社团风采信息列表
export
function
getCommunityInfo
(
data
)
{
return
request
({
url
:
'/fc/list'
,
method
:
'get'
,
params
:
data
})
}
// 获取社团风采详细信息列表
export
function
listCommunityInfo
(
id
)
{
return
request
({
url
:
'/fc/'
+
id
,
method
:
'get'
,
})
}
// 修改社团信息
export
function
editCommunityInfo
(
data
)
{
return
request
({
url
:
'/fc'
,
method
:
'put'
,
data
:
data
})
}
//新增社团信息
export
function
addCommunityInfo
(
data
)
{
return
request
({
url
:
'/fc'
,
method
:
'post'
,
data
:
data
})
}
// 是否发布
export
function
isCommunityFb
(
data
)
{
return
request
({
url
:
'/fc/isfb'
,
method
:
'post'
,
data
:
data
})
}
// 删除社团风采信息
export
function
delCommunityInfo
(
id
)
{
return
request
({
url
:
'/fc/'
+
id
,
method
:
'delete'
})
}
\ No newline at end of file
ruoyi-ui/src/views/smartSchool/massOrganization/basicInformationManagement/index.vue
View file @
90b42ed9
...
@@ -7,15 +7,15 @@
...
@@ -7,15 +7,15 @@
:inline=
"true"
:inline=
"true"
label-width=
"80px"
label-width=
"80px"
>
>
<el-form-item
prop=
"
taskN
ame"
label=
"社团名称"
>
<el-form-item
prop=
"
n
ame"
label=
"社团名称"
>
<el-input
<el-input
v-model=
"queryForm.
taskN
ame"
v-model=
"queryForm.
n
ame"
placeholder=
"社团名称"
placeholder=
"社团名称"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"
grade
"
label=
"指导教师"
>
<el-form-item
prop=
"
teachers
"
label=
"指导教师"
>
<el-input
<el-input
v-model=
"queryForm.
grade
"
v-model=
"queryForm.
teachers
"
placeholder=
"指导教师"
placeholder=
"指导教师"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
...
@@ -59,21 +59,24 @@
...
@@ -59,21 +59,24 @@
<div
style=
"width: 50%"
>
<div
style=
"width: 50%"
>
<!-- 任务详细信息 -->
<!-- 任务详细信息 -->
<div
class=
"task-info"
>
<div
class=
"task-info"
>
<div
class=
"task-name"
>
市二中田径社团
</div>
<div
class=
"task-name"
>
{{
task
.
intro
}}
</div>
</div>
</div>
<div
class=
"task-level"
>
<div
class=
"task-level"
>
<span>
指导教师:张三
</span>
<span>
{{
task
.
teachers
}}
</span>
</div>
</div>
<div
class=
"task-time"
>
<div
class=
"task-time"
>
<div>
<div>
社团宗旨:整合校内外教育资源,培养学生良好的心理素质,发展学生的个性特长,促进学生身心健康、全面发展
{{
task
.
aim
}}
</div>
</div>
</div>
</div>
</div>
</div>
<div
style=
"width: 50%"
>
<div
style=
"width: 50%"
>
<!-- 成员人数 -->
<!-- 成员人数 -->
<div
class=
"task-count"
>
<div
class=
"task-count"
>
<div
class=
"count"
>
200
</div>
<div
class=
"count"
>
{{
task
.
num
}}
</div>
<div
class=
"sun"
>
成员人数
</div>
<div
class=
"sun"
>
成员人数
</div>
</div>
</div>
</div>
</div>
...
@@ -86,28 +89,28 @@
...
@@ -86,28 +89,28 @@
size=
"mini"
size=
"mini"
type=
"danger"
type=
"danger"
round
round
@
click=
"handle
Upda
te(task)"
@
click=
"handle
Dele
te(task)"
>
删除
>
删除
</el-button>
</el-button>
<el-button
<el-button
type=
"success"
type=
"success"
size=
"small"
size=
"small"
round
round
@
click=
"clubRegistrationReview(task.id, task.
grade
)"
@
click=
"clubRegistrationReview(task.id, task.
teachers
)"
>
社团报名审核
</el-button
>
社团报名审核
</el-button
>
>
<el-button
<el-button
type=
"info"
type=
"info"
size=
"small"
size=
"small"
round
round
@
click=
"clubActivityRecord(task.id, task.
grade
)"
@
click=
"clubActivityRecord(task.id, task.
teachers
)"
>
社团活动记录
</el-button
>
社团活动记录
</el-button
>
>
<el-button
<el-button
type=
"warning"
type=
"warning"
size=
"small"
size=
"small"
round
round
@
click=
"memberManagement(task.id, task.
grade
)"
@
click=
"memberManagement(task.id, task.
teachers
)"
>
成员管理
>
成员管理
</el-button>
</el-button>
<el-button
<el-button
...
@@ -115,14 +118,14 @@
...
@@ -115,14 +118,14 @@
size=
"small"
size=
"small"
round
round
type=
"primary"
type=
"primary"
@
click=
"communityStyle(task.id, task.
grade
)"
@
click=
"communityStyle(task.id, task.
teachers
)"
>
社团风采
>
社团风采
</el-button>
</el-button>
<el-button
<el-button
type=
"primary"
type=
"primary"
size=
"small"
size=
"small"
round
round
@
click=
"basicInformation(task.id, task.
grade
)"
@
click=
"basicInformation(task.id, task.
teachers
)"
>
基础信息管理
>
基础信息管理
</el-button>
</el-button>
</div>
</div>
...
@@ -142,42 +145,42 @@
...
@@ -142,42 +145,42 @@
label-width=
"110px"
label-width=
"110px"
>
>
<div>
<div>
<el-form-item
label=
"社团名称"
prop=
"
taskN
ame"
>
<el-form-item
label=
"社团名称"
prop=
"
n
ame"
>
<el-input
<el-input
v-model=
"form.
taskN
ame"
v-model=
"form.
n
ame"
placeholder=
"请输入社团名称"
placeholder=
"请输入社团名称"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"指导教师"
>
<el-form-item
label=
"指导教师"
prop=
"teachers"
>
<el-select
<el-select
style=
"width: 100%"
style=
"width: 100%"
multiple
multiple
v-model=
"form.
value
"
v-model=
"form.
teachersId
"
filterable
filterable
placeholder=
"请选择指导教师"
placeholder=
"请选择指导教师"
>
>
<el-option
<el-option
v-for=
"item in
options
"
v-for=
"item in
teacherInfo
"
:key=
"item.
valu
e"
:key=
"item.
teacherCod
e"
:label=
"item.
label
"
:label=
"item.
teacherName
"
:value=
"item.
valu
e"
:value=
"item.
teacherCod
e"
>
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"社团宗旨"
prop=
"
grade
"
>
<el-form-item
label=
"社团宗旨"
prop=
"
aim
"
>
<el-input
<el-input
type=
"textarea"
type=
"textarea"
:rows=
"4"
:rows=
"4"
v-model=
"form.
grade
"
v-model=
"form.
aim
"
placeholder=
"请输入社团宗旨"
placeholder=
"请输入社团宗旨"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"社团简介"
prop=
"
grade
"
>
<el-form-item
label=
"社团简介"
prop=
"
intro
"
>
<el-input
<el-input
type=
"textarea"
type=
"textarea"
:rows=
"4"
:rows=
"4"
v-model=
"form.
grade
"
v-model=
"form.
intro
"
placeholder=
"请输入社团简介"
placeholder=
"请输入社团简介"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
...
@@ -193,12 +196,13 @@
...
@@ -193,12 +196,13 @@
<
script
>
<
script
>
import
{
import
{
dataCurricula
,
getCommunityInfo
,
// 查询社团信息列表
addCurricula
,
listCommunityInfo
,
// 查询社团详细信息列表
updateCurricula
,
editCommunityInfo
,
// 修改社团信息
getCurricula
,
addCommunityInfo
,
// 新增社团信息
getDept
delCommunityInfo
,
// 删除社团信息
}
from
'@/api/smartSchool/gradeWork/courseSelection/taskPublishing.js'
getTeachers
//获取全校教师
}
from
'@/api/smartSchool/MassOrganization/basicInfo'
export
default
{
export
default
{
name
:
'basicInformationManagement'
,
name
:
'basicInformationManagement'
,
...
@@ -206,16 +210,24 @@ export default {
...
@@ -206,16 +210,24 @@ export default {
return
{
return
{
tasks
:
[
1
,
2
,
3
],
tasks
:
[
1
,
2
,
3
],
queryForm
:
{
queryForm
:
{
taskN
ame
:
''
,
n
ame
:
''
,
grade
:
''
teachers
:
''
},
},
form
:
{
form
:
{
params
:
{},
id
:
''
,
id
:
''
,
taskName
:
''
,
createBy
:
''
,
grade
:
''
,
createTime
:
''
,
startTime
:
''
,
updateBy
:
''
,
endTime
:
''
updateTime
:
''
,
delFlag
:
''
,
name
:
''
,
teachers
:
[],
teachersId
:
''
,
aim
:
''
,
intro
:
''
,
num
:
null
},
},
//新增弹窗
//新增弹窗
open
:
false
,
open
:
false
,
...
@@ -229,108 +241,92 @@ export default {
...
@@ -229,108 +241,92 @@ export default {
look
:
false
,
look
:
false
,
// 日期范围
// 日期范围
dateRange
:
[],
dateRange
:
[],
options
:
[
teacherInfo
:
[]
//教师下拉列表
{
value
:
'选项1'
,
label
:
'黄金糕'
},
{
value
:
'选项2'
,
label
:
'双皮奶'
},
{
value
:
'选项3'
,
label
:
'蚵仔煎'
},
{
value
:
'选项4'
,
label
:
'龙须面'
},
{
value
:
'选项5'
,
label
:
'北京烤鸭'
}
]
}
}
},
},
created
()
{
created
()
{
this
.
getList
()
this
.
getList
(),
//查询列表
this
.
getTeachersInfo
()
//教师下拉列表
},
},
methods
:
{
methods
:
{
/** 获取列表数据 */
/** 获取列表数据 */
getList
()
{
getList
()
{
const
params
=
{
getCommunityInfo
(
this
.
form
)
taskName
:
this
.
queryForm
.
taskName
,
.
then
((
response
)
=>
{
grade
:
this
.
queryForm
.
grade
this
.
tasks
=
response
.
rows
}
this
.
total
=
response
.
total
// dataCurricula(params).then(response => {
})
// this.tasks = response.rows;
.
catch
((
err
)
=>
{
// this.total = response.total;
this
.
loading
=
false
// }).catch(err => {
})
// this.loading = false;
},
// })
// 教师下拉列表
getTeachersInfo
()
{
getTeachers
({}).
then
((
res
)
=>
{
this
.
teacherInfo
=
res
.
rows
})
},
//基础信息管理
basicInformation
(
row
)
{
// console.log('bbb', row)
this
.
reset
()
listCommunityInfo
(
row
).
then
((
response
)
=>
{
// console.log(response, '基础信息管理')
this
.
form
=
response
.
data
// this.form.teachers = response.data.teachers
this
.
form
.
teachers
=
this
.
form
.
teachers
.
split
(
','
)
// console.log(this.form.teachers, 'this.form.teachers')
// console.log(this.form, 'this.form')
this
.
open
=
true
this
.
title
=
'社团基础信息管理'
})
},
},
//新增按钮操作
//新增按钮操作
handleAdd
()
{
handleAdd
()
{
this
.
reset
()
this
.
reset
()
this
.
open
=
true
this
.
open
=
true
// getDept().then(response => {
// this.form.grade = response.data.grade;
// console.log(this.form.grade);
// })
// .catch(err => {
// this.loading = false;
// });
this
.
title
=
'新增社团基础信息'
this
.
title
=
'新增社团基础信息'
},
},
// 社团报名审核
// 社团报名审核
clubRegistrationReview
(
id
,
grade
)
{
clubRegistrationReview
(
id
,
teachers
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/massOrganization/clubRegistrationReview'
,
path
:
'/massOrganization/clubRegistrationReview'
,
query
:
{
query
:
{
id
,
id
,
grade
teachers
}
}
})
})
},
},
// 社团活动记录
// 社团活动记录
clubActivityRecord
(
id
,
grade
)
{
clubActivityRecord
(
id
,
teachers
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/massOrganization/clubActivityRecord'
,
path
:
'/massOrganization/clubActivityRecord'
,
query
:
{
query
:
{
id
,
id
,
grade
teachers
}
}
})
})
},
},
//成员管理
//成员管理
memberManagement
(
id
,
grade
)
{
memberManagement
(
id
,
teachers
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/massOrganization/memberManagement'
,
path
:
'/massOrganization/memberManagement'
,
query
:
{
query
:
{
id
,
id
,
grade
teachers
}
}
})
})
},
},
//社团风采
//社团风采
communityStyle
(
id
,
grade
)
{
communityStyle
(
id
,
teachers
)
{
console
.
log
(
'grade'
,
grade
)
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/massOrganization/communityStyle'
,
path
:
'/massOrganization/communityStyle'
,
query
:
{
query
:
{
id
,
id
,
grade
teachers
}
}
})
})
},
},
//基础信息管理
basicInformation
(
id
,
grade
)
{
this
.
reset
()
this
.
open
=
true
this
.
title
=
'社团基础信息维护'
},
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open
=
false
this
.
open
=
false
...
@@ -352,42 +348,51 @@ export default {
...
@@ -352,42 +348,51 @@ export default {
},
},
// 提交表单
// 提交表单
submitForm
()
{
submitForm
()
{
// console.log('object', this.dateRange);
// const teachersId = this.form.teachersId
const
teachersId
=
this
.
form
.
teachersId
this
.
form
.
teachers
=
teachersId
==
''
?
''
:
this
.
teacherInfo
.
find
(
(
item
)
=>
item
.
teacherCode
==
teachersId
).
teacherName
this
.
throttle
(()
=>
{
this
.
throttle
(()
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
const
techs
=
this
.
form
.
teachers
.
join
(
','
)
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
//
编辑
//
修改
const
params
=
{
const
params
=
{
id
:
this
.
form
.
id
,
name
:
this
.
form
.
name
,
taskName
:
this
.
form
.
taskName
,
teachers
:
techs
,
startTime
:
this
.
dateRange
[
0
],
teachersId
:
this
.
form
.
teachersId
,
endTime
:
this
.
dateRange
[
1
]
aim
:
this
.
form
.
aim
,
intro
:
this
.
form
.
intro
}
}
console
.
log
(
params
,
'params'
)
updateCurricula
(
params
)
editCommunityInfo
(
params
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
console
.
log
(
params
,
'params'
)
this
.
getList
()
console
.
log
(
'res1111'
)
this
.
$message
.
success
(
'修改成功'
)
this
.
$message
.
success
(
'修改成功'
)
console
.
log
(
'res'
,
response
)
this
.
open
=
false
this
.
open
=
false
this
.
getList
()
})
})
.
catch
((
err
)
=>
{})
.
catch
((
err
)
=>
{})
}
else
{
}
else
{
// 新增
// 新增
const
params
=
{
const
params
=
{
taskName
:
this
.
form
.
taskName
,
name
:
this
.
form
.
name
,
grade
:
this
.
form
.
grade
,
teachers
:
techs
,
startTime
:
this
.
dateRange
[
0
],
teachersId
:
this
.
form
.
teachersId
,
endTime
:
this
.
dateRange
[
1
]
aim
:
this
.
form
.
aim
,
intro
:
this
.
form
.
intro
}
}
addCurricula
(
params
)
console
.
log
(
params
,
'params'
)
addCommunityInfo
(
params
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
this
.
getList
()
this
.
$message
.
success
(
'新增成功'
)
this
.
$message
.
success
(
'新增成功'
)
this
.
open
=
false
this
.
open
=
false
this
.
getList
()
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
// Handle error if necessary
// Handle error if necessary
...
@@ -397,27 +402,26 @@ export default {
...
@@ -397,27 +402,26 @@ export default {
})
})
})
})
},
},
// 编辑按钮
// 删除按钮
handleUpdate
(
task
)
{
handleDelete
(
row
)
{
this
.
title
=
'修改'
const
ids
=
row
.
id
||
this
.
idEas
this
.
open
=
true
this
.
$modal
getCurricula
(
task
.
id
)
.
confirm
(
'是否确认删除?'
)
.
then
((
response
)
=>
{
.
then
(
function
()
{
this
.
form
=
response
.
data
return
delCommunityInfo
(
ids
)
this
.
dateRange
=
[
})
response
.
data
.
startTime
,
.
then
(()
=>
{
response
.
data
.
endTime
this
.
getList
()
]
this
.
$modal
.
msgSuccess
(
'删除成功'
)
this
.
$modal
.
closeLoading
()
})
})
.
catch
((
err
)
=>
{})
.
catch
(()
=>
{})
},
},
// 重置表单
// 重置表单
reset
()
{
reset
()
{
// 重置对话框表单
// 重置对话框表单
this
.
form
=
{
this
.
form
=
{
taskN
ame
:
''
,
n
ame
:
''
,
grade
:
''
teachers
:
''
}
}
this
.
dateRange
=
[]
this
.
dateRange
=
[]
this
.
resetForm
(
'form'
)
this
.
resetForm
(
'form'
)
...
...
ruoyi-ui/src/views/smartSchool/massOrganization/communityStyle/index.vue
View file @
90b42ed9
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
<el-form-item
label=
"标题"
prop=
"picName"
>
:model=
"queryParams"
<el-input
v-model=
"queryParams.picName"
placeholder=
"请输入标题"
clearable
/>
ref=
"queryForm"
</el-form-item>
size=
"small"
<el-form-item>
:inline=
"true"
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
v-show=
"showSearch"
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
label-width=
"68px"
</el-form-item>
>
</el-form>
<el-form-item
label=
"标题"
prop=
"theme"
>
<el-input
v-model=
"queryParams.theme"
placeholder=
"请输入标题"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
<el-button
</el-button>
type=
"primary"
</el-col>
icon=
"el-icon-plus"
<el-col
:span=
"1.5"
>
size=
"mini"
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
>
删除
@
click=
"handleAdd"
</el-button>
>
新增
</el-col>
</el-button>
<!--
<el-col
:span=
"1.5"
>
-->
</el-col>
<!--
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
--
>
<el-col
:span=
"1.5"
>
<!-- v-hasPermi="['system:pic:export']">导出-->
<el-button
<!--
</el-button>
-->
type=
"danger"
<!--
</el-col>
-->
icon=
"el-icon-delete"
<!--
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
:columns=
"columns"
></right-toolbar>
-->
size=
"mini"
</el-row>
:disabled=
"multiple"
@
click=
"handleDelete"
>
删除
</el-button>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
ref=
"table"
:data=
"picList"
@
selection-change=
"handleSelectionChange"
>
<el-table
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
v-loading=
"loading"
<el-table-column
label=
"序号"
align=
"center"
prop=
"seqencing"
width=
"80"
/>
ref=
"table"
<el-table-column
label=
"风采主题"
align=
"center"
prop=
"picName"
/>
:data=
"picList"
<el-table-column
label=
"附件"
align=
"center"
prop=
"picName"
>
@
selection-change=
"handleSelectionChange"
<template
slot-scope=
"scope"
>
>
<!--
<ListImage
:image-url=
"pev+scope.row.picUrl"
></ListImage>
-->
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<!-- previewSrcList 开启预览大图的功能。-->
<el-table-column
<el-image
label=
"序号"
style=
"width: 100px; height: 100px"
align=
"center"
:src=
"scope.row.url"
prop=
"seqencing"
:preview-src-list=
"srcList"
>
width=
"80"
</el-image>
/>
</
template
>
<el-table-column
label=
"风采主题"
align=
"center"
prop=
"theme"
/>
</el-table-column>
<el-table-column
label=
"附件"
align=
"center"
prop=
"theme"
>
<el-table-column
label=
"是否发布"
align=
"center"
prop=
"isShow"
>
<template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-image
<el-switch
v-model=
"scope.row.isShow"
active-value=
"1"
inactive-value=
"0"
style=
"width: 100px; height: 100px"
@
change=
"handleIsShow(scope.row)"
></el-switch>
:src=
"scope.row.url"
</
template
>
:preview-src-list=
"srcList"
</el-table-column>
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
v-if=
"columns[6].visible"
>
</el-image>
<
template
slot-scope=
"scope"
>
</
template
>
<!-- 未发布可以修改删除 -->
</el-table-column>
<div>
<el-table-column
label=
"是否发布"
align=
"center"
prop=
"isShow"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
>
修改
<
template
slot-scope=
"scope"
>
</el-button>
<el-switch
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
v-model=
"scope.row.isShow"
</el-button>
active-value=
"1"
</div>
inactive-value=
"0"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleCheck(scope.row)"
>
查看
@
change=
"handleIsShow(scope.row)"
</el-button>
></el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
v-if=
"columns[6].visible"
>
<
template
slot-scope=
"scope"
>
<!-- 未发布可以修改删除 -->
<div>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</div>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleCheck(scope.row)"
>
查看
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
<pagination
@
pagination=
"getList"
/>
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改社团主题对话框 -->
<!-- 添加或修改社团主题对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"900px"
append-to-body
>
<el-dialog
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"90px"
style=
"width: 80%; margin: auto"
>
:title=
"title"
<el-form-item
prop=
"gardenEmblem"
:visible
.
sync=
"open"
style=
"display: flex; text-align: center; justify-content: center; transform: translateX(-30px)"
>
width=
"900px"
<!-- <el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"-->
append-to-body
<!-- :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :on-remove="handleRemove"-->
>
<!-- :http-request="uploadImage" :limit="1" >-->
<el-form
<el-upload
:disabled=
"check == true ? true : false"
v-loading=
"uploadLoading"
class=
"avatar-uploader"
action=
"#"
accept=
"image/*"
ref=
"form"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
:on-remove=
"handleRemove"
:model=
"form"
:limit=
"1"
>
:rules=
"rules"
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
/>
label-width=
"90px"
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
style=
"width: 80%; margin: auto"
</el-upload>
>
</el-form-item>
<el-form-item
prop=
"gardenEmblem"
style=
"
display: flex;
text-align: center;
justify-content: center;
transform: translateX(-30px);
"
>
<!-- <el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"-->
<!-- :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :on-remove="handleRemove"-->
<!-- :http-request="uploadImage" :limit="1" >-->
<el-upload
:disabled=
"check == true ? true : false"
v-loading=
"uploadLoading"
class=
"avatar-uploader"
action=
"#"
accept=
"image/*"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
:on-remove=
"handleRemove"
:limit=
"1"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"风采主题:"
prop=
"picName"
>
<el-form-item
label=
"风采主题:"
prop=
"theme"
>
<el-input
:readonly=
"check == true ? true : false"
v-model=
"form.picName"
placeholder=
"请输入风采主题"
style=
"width: 100%"
/>
<el-input
</el-form-item>
:readonly=
"check == true ? true : false"
</el-col>
v-model=
"form.theme"
<!-- <el-col :span="12">-->
placeholder=
"请输入风采主题"
<!-- <el-form-item label="排序:" prop="seqencing">-->
style=
"width: 100%"
<!-- <el-input-number v-model="form.seqencing" controls-position="right" style="width: 100%"-->
/>
<!-- :min="1"></el-input-number>-->
</el-form-item>
<!-- </el-form-item>-->
</el-col>
<!-- </el-col>-->
</el-row>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
listPic
,
getPic
,
delPic
,
addPic
,
updatePic
,
updateState
}
from
'@/api/smartSchool/schoolManage/introduce/pic'
import
{
listPic
,
getPic
,
delPic
,
addPic
,
updatePic
,
updateState
}
from
'@/api/smartSchool/schoolManage/introduce/pic'
import
picAvatar
from
'@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar'
import
picAvatar
from
'@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar'
import
{
changeUserStatus
}
from
'@/api/system/user'
import
{
changeUserStatus
}
from
'@/api/system/user'
import
{
uploadImage
as
commonUpload
}
from
'@/api/common'
import
{
uploadImage
as
commonUpload
}
from
'@/api/common'
import
{
ExportType
,
TEXT_SIZE
}
from
'@/enums/common'
import
{
ExportType
,
TEXT_SIZE
}
from
'@/enums/common'
import
{
getCommunityInfo
,
// 查询社团信息列表
listCommunityInfo
,
// 查询社团详细信息列表
editCommunityInfo
,
// 修改社团信息
isCommunityFb
,
// 新增社团信息
delCommunityInfo
,
// 删除社团信息
addCommunityInfo
//新增社团信息
}
from
'@/api/smartSchool/MassOrganization/communityStyle'
export
default
{
export
default
{
name
:
'communityStyle'
,
name
:
'communityStyle'
,
components
:
{
picAvatar
},
components
:
{
picAvatar
},
data
()
{
data
()
{
return
{
return
{
pev
:
process
.
env
.
VUE_APP_BASE_API
,
pev
:
process
.
env
.
VUE_APP_BASE_API
,
// 输入框字数限制
// 输入框字数限制
TEXT_SIZE
,
TEXT_SIZE
,
//是否上传的院徽
//是否上传的院徽
isUploadPic
:
false
,
isUploadPic
:
false
,
//照片是否删除
//照片是否删除
options
:
[
options
:
[
{
{
value
:
0
,
value
:
0
,
label
:
'否'
label
:
'否'
},
},
{
{
value
:
1
,
value
:
1
,
label
:
'是'
label
:
'是'
}
],
//获取子组件传来的信息
pic
:
[],
// 图片路径
imageUrl
:
undefined
,
// 图片上传遮罩层
uploadLoading
:
false
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 园区照片表格数据
picList
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
theme
:
null
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
theme
:
[
{
required
:
true
,
message
:
'请输入相片名称'
,
trigger
:
'blur'
}
],
seqencing
:
[
{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
}
],
remark
:
[
{
max
:
TEXT_SIZE
,
message
:
'备注信息在0到200字之间'
,
trigger
:
'blur'
}
]
},
//设置table列隐藏与显示
columns
:
[
{
key
:
0
,
label
:
`园区照片`
,
visible
:
true
},
{
key
:
1
,
label
:
`相片名称`
,
visible
:
true
},
// {key: 2, label: `相片路径`, visible: true},
{
key
:
2
,
label
:
`排序`
,
visible
:
true
},
{
key
:
3
,
label
:
`备注`
,
visible
:
true
},
{
key
:
4
,
label
:
`创建者`
,
visible
:
true
},
{
key
:
5
,
label
:
`创建时间`
,
visible
:
true
},
{
key
:
6
,
label
:
`操作`
,
visible
:
true
}
],
// 作为临时图片展示
tempImage
:
''
,
// 导出选项
exportOptions
:
{
title
:
'选择导出类别'
,
open
:
false
},
//查看状态
check
:
false
}
}
],
//获取子组件传来的信息
pic
:
[],
// 图片路径
imageUrl
:
undefined
,
// 图片上传遮罩层
uploadLoading
:
false
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 园区照片表格数据
picList
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
picName
:
null
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
picName
:
[{
required
:
true
,
message
:
'请输入相片名称'
,
trigger
:
'blur'
}],
seqencing
:
[{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
}],
remark
:
[{
max
:
TEXT_SIZE
,
message
:
'备注信息在0到200字之间'
,
trigger
:
'blur'
}]
},
//设置table列隐藏与显示
columns
:
[
{
key
:
0
,
label
:
`园区照片`
,
visible
:
true
},
{
key
:
1
,
label
:
`相片名称`
,
visible
:
true
},
// {key: 2, label: `相片路径`, visible: true},
{
key
:
2
,
label
:
`排序`
,
visible
:
true
},
{
key
:
3
,
label
:
`备注`
,
visible
:
true
},
{
key
:
4
,
label
:
`创建者`
,
visible
:
true
},
{
key
:
5
,
label
:
`创建时间`
,
visible
:
true
},
{
key
:
6
,
label
:
`操作`
,
visible
:
true
}
],
// 作为临时图片展示
tempImage
:
''
,
// 导出选项
exportOptions
:
{
title
:
'选择导出类别'
,
open
:
false
},
//查看状态
check
:
false
,
}
},
created
()
{
this
.
getList
()
},
watch
:
{
pic
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
'watch----oldValue'
,
oldValue
)
console
.
log
(
'watch----newValue'
,
newValue
)
this
.
isUploadPic
=
newValue
[
3
]
}
}
},
methods
:
{
//是否删除 选中值发生变化时id处理函数
selectChangeHandler
(
value
)
{
this
.
form
.
isShow
=
value
},
/** 查询园区照片列表 */
getList
()
{
this
.
loading
=
true
this
.
picList
=
[]
listPic
(
this
.
queryParams
).
then
(
response
=>
{
this
.
picList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
})
},
//获取图片信息
getSchoolInfoPic
(
val
)
{
this
.
pic
=
val
},
// 取消按钮
cancel
()
{
this
.
open
=
false
this
.
reset
()
},
},
// 表单重置
created
()
{
reset
()
{
this
.
form
=
{
params
:
{},
id
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
delFlag
:
null
,
picName
:
null
,
picUrl
:
null
,
seqencing
:
null
,
isShow
:
0
}
this
.
imageUrl
=
''
this
.
resetForm
(
'form'
)
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
throttle
(()
=>
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
this
.
getList
()
})
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
'queryForm'
)
this
.
handleQuery
()
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
check
=
false
this
.
reset
()
this
.
open
=
true
this
.
title
=
'新增社团风采'
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
()
const
ids
=
row
.
id
||
this
.
ids
getPic
(
ids
).
then
(
response
=>
{
this
.
form
=
response
.
data
this
.
imageUrl
=
this
.
pev
+
this
.
form
.
picUrl
this
.
open
=
true
this
.
title
=
'修改园区照片'
})
},
/** 查看按钮操作 */
handleCheck
(
row
){
this
.
check
=
true
this
.
open
=
true
this
.
title
=
'查看社团风采'
},
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
res
.
data
.
url
console
.
log
(
file
)
this
.
commonUpload
(
file
)
},
},
// 上传前格式和图片大小限制
watch
:
{
beforeAvatarUpload
(
file
)
{
pic
:
{
const
type
=
file
.
type
===
'image/jpeg'
||
'image/jpg'
||
'image/webp'
||
'image/png'
handler
(
newValue
,
oldValue
)
{
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
console
.
log
(
'watch----oldValue'
,
oldValue
)
if
(
!
type
)
{
console
.
log
(
'watch----newValue'
,
newValue
)
this
.
$message
.
error
(
'图片格式不正确!(只能包含jpg,png,webp,JPEG)'
)
this
.
isUploadPic
=
newValue
[
3
]
}
}
if
(
!
isLt2M
)
{
}
this
.
$message
.
error
(
'上传图片大小不能超过 2MB!'
)
}
return
type
&&
isLt2M
},
//删除图片
handleRemove
(
file
,
fileList
){
this
.
imageUrl
=
''
},
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
const
formData
=
new
FormData
()
formData
.
append
(
'file'
,
fileData
)
this
.
uploadLoading
=
true
commonUpload
(
formData
)
.
then
(
response
=>
{
this
.
uploadLoading
=
false
this
.
$modal
.
msgSuccess
(
'上传成功'
)
this
.
imageUrl
=
this
.
pev
+
response
.
url
// this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
this
.
form
.
picUrl
=
response
.
url
})
.
catch
(
error
=>
{
this
.
uploadLoading
=
false
})
},
},
/** 提交按钮 */
methods
:
{
submitForm
()
{
//是否删除 选中值发生变化时id处理函数
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
selectChangeHandler
(
value
)
{
if
(
valid
)
{
this
.
form
.
isShow
=
value
this
.
$modal
.
loading
(
'正在上传数据,请稍等...'
)
},
if
(
this
.
form
.
id
!=
null
)
{
/** 查询列表 */
updatePic
({
getList
()
{
...
this
.
form
this
.
loading
=
true
this
.
picList
=
[]
getCommunityInfo
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
picList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
})
})
.
then
(
response
=>
{
},
this
.
$modal
.
closeLoading
()
//获取图片信息
this
.
$modal
.
msgSuccess
(
'修改成功'
)
getSchoolInfoPic
(
val
)
{
this
.
open
=
false
this
.
pic
=
val
},
// 取消按钮
cancel
()
{
this
.
open
=
false
this
.
reset
()
},
// 表单重置
reset
()
{
this
.
form
=
{
params
:
{},
id
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
delFlag
:
null
,
theme
:
null
,
picUrl
:
null
,
seqencing
:
null
,
isShow
:
0
}
this
.
imageUrl
=
''
this
.
resetForm
(
'form'
)
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
throttle
(()
=>
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
this
.
getList
()
})
.
catch
(
error
=>
{
this
.
$modal
.
closeLoading
()
})
}
else
{
addPic
({
...
this
.
form
,
isShow
:
'0'
})
})
.
then
(
response
=>
{
},
this
.
$modal
.
closeLoading
()
/** 重置按钮操作 */
this
.
$modal
.
msgSuccess
(
'新增成功'
)
resetQuery
()
{
this
.
open
=
false
this
.
resetForm
(
'queryForm'
)
this
.
getList
()
this
.
handleQuery
()
})
},
.
catch
(
error
=>
{
// 多选框选中数据
this
.
$modal
.
closeLoading
()
handleSelectionChange
(
selection
)
{
})
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
)
}
this
.
single
=
selection
.
length
!==
1
}
this
.
multiple
=
!
selection
.
length
})
},
},
/** 新增按钮操作 */
/** 删除按钮操作 */
handleAdd
()
{
handleDelete
(
row
)
{
this
.
check
=
false
const
ids
=
row
.
id
||
this
.
ids
this
.
reset
()
if
(
ids
)
{
this
.
open
=
true
this
.
$modal
this
.
title
=
'新增社团风采'
.
confirm
(
`是否确认删除选中的
${
Object
.
hasOwnProperty
.
call
(
ids
,
'length'
)
?
ids
.
length
:
1
}
条数据?`
)
},
.
then
(()
=>
{
/** 修改按钮操作 */
this
.
$modal
.
loading
(
'正在处理数据,请稍等...'
)
handleUpdate
(
row
)
{
return
delPic
(
ids
)
this
.
reset
()
})
const
ids
=
row
.
id
||
this
.
ids
.
then
(()
=>
{
this
.
$modal
.
closeLoading
()
this
.
getList
()
this
.
$modal
.
msgSuccess
(
'删除成功'
)
})
.
catch
(()
=>
{
this
.
$modal
.
closeLoading
()
})
}
},
/** 是否发布 */
// getPic(ids).then((response) => {
handleIsShow
(
row
)
{
// this.form = response.data
this
.
$modal
// this.imageUrl = this.pev + this.form.picUrl
.
confirm
(
row
.
isShow
===
'1'
?
'是否确认显示为轮播图?'
:
'是否取消显示为轮播图?'
)
// this.open = true
.
then
(()
=>
{
// this.title = '修改园区照片'
this
.
$modal
.
loading
(
'正在修改状态,请稍等...'
)
// })
updateState
(
row
.
id
,
row
.
isShow
)
},
.
then
(
response
=>
{
/** 查看按钮操作 */
this
.
$modal
.
closeLoading
()
handleCheck
(
row
)
{
this
.
$modal
.
msgSuccess
(
'修改成功'
)
this
.
check
=
true
})
this
.
open
=
true
.
catch
(
error
=>
{
this
.
title
=
'查看社团风采'
this
.
$modal
.
closeLoading
()
},
row
.
isShow
=
row
.
isShow
===
'0'
?
'1'
:
'0'
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
res
.
data
.
url
console
.
log
(
file
)
this
.
commonUpload
(
file
)
},
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
'image/jpeg'
||
'image/jpg'
||
'image/webp'
||
'image/png'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
if
(
!
type
)
{
this
.
$message
.
error
(
'图片格式不正确!(只能包含jpg,png,webp,JPEG)'
)
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传图片大小不能超过 2MB!'
)
}
return
type
&&
isLt2M
},
//删除图片
handleRemove
(
file
,
fileList
)
{
this
.
imageUrl
=
''
},
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
const
formData
=
new
FormData
()
formData
.
append
(
'file'
,
fileData
)
this
.
uploadLoading
=
true
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
this
.
$modal
.
msgSuccess
(
'上传成功'
)
this
.
imageUrl
=
this
.
pev
+
response
.
url
// this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
this
.
form
.
picUrl
=
response
.
url
})
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
})
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$modal
.
loading
(
'正在上传数据,请稍等...'
)
if
(
this
.
form
.
id
!=
null
)
{
editCommunityInfo
({
...
this
.
form
})
.
then
((
response
)
=>
{
this
.
$modal
.
closeLoading
()
this
.
$modal
.
msgSuccess
(
'修改成功'
)
this
.
open
=
false
this
.
getList
()
})
.
catch
((
error
)
=>
{
this
.
$modal
.
closeLoading
()
})
}
else
{
addCommunityInfo
({
...
this
.
form
,
isShow
:
'0'
})
.
then
((
response
)
=>
{
this
.
$modal
.
closeLoading
()
this
.
$modal
.
msgSuccess
(
'新增成功'
)
this
.
open
=
false
this
.
getList
()
})
.
catch
((
error
)
=>
{
this
.
$modal
.
closeLoading
()
})
}
}
})
})
})
},
.
catch
(()
=>
{
/** 删除按钮操作 */
row
.
isShow
=
row
.
isShow
===
'0'
?
'1'
:
'0'
handleDelete
(
row
)
{
})
const
ids
=
row
.
id
||
this
.
ids
if
(
ids
)
{
this
.
$modal
.
confirm
(
`是否确认删除选中的
${
Object
.
hasOwnProperty
.
call
(
ids
,
'length'
)
?
ids
.
length
:
1
}
条数据?`
)
.
then
(()
=>
{
this
.
$modal
.
loading
(
'正在处理数据,请稍等...'
)
return
delCommunityInfo
(
ids
)
})
.
then
(()
=>
{
this
.
$modal
.
closeLoading
()
this
.
getList
()
this
.
$modal
.
msgSuccess
(
'删除成功'
)
})
.
catch
(()
=>
{
this
.
$modal
.
closeLoading
()
})
}
},
/** 是否发布 */
handleIsShow
(
row
)
{
// this.$modal
// .confirm(
// row.isShow === '1'
// ? '是否确认显示为轮播图?'
// : '是否取消显示为轮播图?'
// )
// .then(() => {
// this.$modal.loading('正在修改状态,请稍等...')
// updateState(row.id, row.isShow)
// .then((response) => {
// this.$modal.closeLoading()
// this.$modal.msgSuccess('修改成功')
// })
// .catch((error) => {
// this.$modal.closeLoading()
// row.isShow = row.isShow === '0' ? '1' : '0'
// })
// })
// .catch(() => {
// row.isShow = row.isShow === '0' ? '1' : '0'
// })
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.avatar
,
.avatar
,
.avatar-uploader
,
.avatar-uploader
,
.el-icon-plus
{
.el-icon-plus
{
width
:
650px
;
width
:
650px
;
}
}
</
style
>
</
style
>
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