Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
cc4c6363
Commit
cc4c6363
authored
May 15, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
65793983
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
67 deletions
+100
-67
Article.vue
src/components/StoreDesign/Article.vue
+100
-67
No files found.
src/components/StoreDesign/Article.vue
View file @
cc4c6363
...
...
@@ -18,20 +18,23 @@
</div>
</div>
<el-table
:data=
"dataList"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
prop=
"
i
d"
label=
"ID"
width=
"150"
>
<el-table-column
prop=
"
I
d"
label=
"ID"
width=
"150"
>
</el-table-column>
<el-table-column
prop=
"
t
itle"
label=
"标题"
width=
"829"
>
<el-table-column
prop=
"
T
itle"
label=
"标题"
width=
"829"
>
</el-table-column>
<el-table-column
prop=
"
sort
"
label=
"排序"
width=
"250"
>
<el-table-column
prop=
"
SortNum
"
label=
"排序"
width=
"250"
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
width=
"150"
>
<el-table-column
prop=
"IsDisable"
label=
"状态"
width=
"150"
>
<template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.IsDisable"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"updateIsDisable(scope.row)"
>
</el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"EditArticle(scope.row)"
class=
"operatImg"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"RemoveArticle(scope.row)"
class=
"operatImg"
src=
"../../assets/img/userman/del.png"
alt=
""
>
<img
@
click=
"EditArticle(scope.row)"
class=
"operatImg"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"RemoveArticle(scope.row)"
class=
"operatImg"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -49,19 +52,19 @@
<div
class=
"Article_condiv"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"100px"
style=
"padding:0 20px;"
>
<el-form-item
label=
"标题"
prop=
"title"
>
<el-input
v-model=
"addMsg.title"
size=
"small"
placeholder=
"请输入名称"
maxlength=
"2
0"
/>
<el-input
v-model=
"addMsg.Title"
size=
"small"
placeholder=
"请输入名称"
maxlength=
"10
0"
/>
</el-form-item>
<el-form-item
label=
"排序"
>
<el-input
type=
"text"
v-model=
"addMsg.Sort"
size=
"small"
placeholder=
"请输入排序
"
maxlength=
"4"
/>
<el-input
type=
"text"
v-model=
"addMsg.SortNum"
@
keyup
.
native=
"checkInteger(addMsg,'SortNum')"
size=
"small
"
placeholder=
"请输入排序"
maxlength=
"4"
/>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-switch
v-model=
"addMsg.status
"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
<el-switch
v-model=
"addMsg.IsDisable
"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"内容"
>
<div
style=
"line-height:normal;"
>
<UE
:defaultMsg=
"defaultMsg
"
:config=
"config"
ref=
"ue"
@
input=
"input"
></UE>
<UE
:defaultMsg=
"addMsg.Content
"
:config=
"config"
ref=
"ue"
@
input=
"input"
></UE>
</div>
</el-form-item>
</el-form>
...
...
@@ -80,32 +83,32 @@
//是否线下链接弹窗
loading
:
false
,
dataList
:
[{
id
:
123
,
title
:
'标题'
,
sort
:
1
,
status
:
0
id
:
123
,
title
:
'标题'
,
sort
:
1
,
status
:
0
}],
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
NavIconName
:
""
,
MallBaseId
:
0
,
NavIconIsShow
:
-
1
},
total
:
0
,
ArticleIsShowAdd
:
true
,
addMsg
:
{
title
:
''
,
//标题
Sort
:
''
,
//排序
status
:
0
,
//状态
content
:
''
// 内容
Id
:
0
,
//文章编号
Title
:
''
,
//标题
SortNum
:
0
,
//排序
IsDisable
:
0
,
//禁用状态(0-禁用,1-启用)
Content
:
''
// 内容
},
rules
:{
title
:
[
{
required
:
true
,
message
:
'标题不能为空'
,
trigger
:
'change'
}
],
rules
:
{
Title
:
[{
required
:
true
,
message
:
'标题不能为空'
,
trigger
:
'change'
}],
},
defaultMsg
:
''
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
350
,
...
...
@@ -119,25 +122,19 @@
},
methods
:
{
getMenu
()
{
//调用子组件方法
var
obj
=
this
.
$refs
.
chooseMeun
.
getChooseMenu
();
this
.
addMsg
.
NavIconUrl
=
obj
.
PageUrl
;
this
.
isShowLink
=
false
;
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getList
()
{
// this.apipost("/api/Tenant/GetMiniProgrameNaviconPage
", this.msg, res => {
//
if (res.data.resultCode == 1) {
//
this.dataList = res.data.data.pageData;
//
this.total = res.data.data.count;
//
} else {
//
this.Info(res.data.message);
//
}
//
})
this
.
apipost
(
"/api/MContent/GetArticlePageList
"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
submitform
(
addMsg
)
{
//提交创建、修改表单
...
...
@@ -151,18 +148,39 @@
},
//保存
saveMsg
()
{
this
.
apipost
(
"/api/MContent/SetArticle"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ArticleIsShowAdd
=
true
;
this
.
getList
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//修改
EditArticle
(
item
)
{
this
.
apipost
(
"/api/MContent/GetArticle"
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
jsonData
=
res
.
data
.
data
;
this
.
addMsg
.
Id
=
jsonData
.
Id
;
this
.
addMsg
.
Title
=
jsonData
.
Title
;
this
.
addMsg
.
SortNum
=
jsonData
.
SortNum
;
this
.
addMsg
.
IsDisable
=
jsonData
.
IsDisable
;
this
.
addMsg
.
Content
=
jsonData
.
Content
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//删除
RemoveArticle
(
item
)
{
var
that
=
this
;
that
.
Confirm
(
"是否要删除?"
,
function
()
{
that
.
apipost
(
"/api/
Tenant/RemoveMiniProgrameNavicon
"
,
{
NavIconId
:
item
.
NavIcon
Id
that
.
apipost
(
"/api/
MContent/RemoveArticle
"
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
getList
();
...
...
@@ -172,8 +190,21 @@
})
})
},
//更新状态
updateIsDisable
(
item
)
{
this
.
apipost
(
"/api/MContent/SetArticle"
,
{
Id
:
item
.
Id
,
IsDisable
:
item
.
IsDisable
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ArticleIsShowAdd
=
true
;
this
.
getList
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
input
(
obj
)
{
this
.
addMsg
.
content
=
obj
this
.
addMsg
.
Content
=
obj
;
},
},
mounted
()
{
...
...
@@ -183,7 +214,6 @@
</
script
>
<
style
>
.Article
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
...
...
@@ -212,15 +242,18 @@
padding
:
20px
;
box-sizing
:
border-box
;
}
.Article
.operatImg
{
width
:
32px
;
height
:
32px
;
margin
:
0
10px
.Article
.operatImg
{
width
:
32px
;
height
:
32px
;
margin
:
0
10px
}
.Article
.Article_condiv
{
.Article
.Article_condiv
{
padding
:
20px
0
;
background-color
:
#fff
;
margin-bottom
:
20px
;
padding-right
:
50%
;
}
</
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