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
1753764d
Commit
1753764d
authored
Jul 26, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
af209121
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
27 deletions
+46
-27
hcategory.vue
src/components/huimai/hcategory.vue
+46
-27
No files found.
src/components/huimai/hcategory.vue
View file @
1753764d
...
...
@@ -8,7 +8,7 @@
<div
class=
"content"
>
<div
style=
"margin-bottom:20px"
>
<span>
分类名称
</span>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"
5
0"
v-model=
"msg.Name"
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"
10
0"
v-model=
"msg.Name"
@
input=
"(msg.pageIndex = 1), getList()"
clearable
>
</el-input>
<el-button
@
click=
"(msg.pageIndex = 1), getList()"
size=
"small"
type=
"primary"
>
...
...
@@ -31,9 +31,12 @@
<el-table-column
prop=
"Sort"
label=
"排序"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"250px"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"showCategoryForm(scope.row)"
src=
"../../assets/img/userman/edit.png"
alt=
""
/>
<img
@
click=
"RemmoveCategory(scope.row)"
style=
"margin-left:10px;"
src=
"../../assets/img/userman/del.png"
alt=
""
/>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
class=
"edit-img"
src=
"../../assets/img/userman/edit.png"
@
click=
"showCategoryForm(scope.row)"
/>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
src=
"../../assets/img/userman/del.png"
@
click=
"RemmoveCategory(scope.row)"
/>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -43,12 +46,13 @@
</div>
<!-- 修改分类 -->
<el-dialog
:title=
"editTitle"
:visible
.
sync=
"isShowCategoryForm"
width=
"500px"
>
<el-form
:model=
"postMsg"
:rules=
"rules"
label-width=
"150px"
>
<el-form
:model=
"postMsg"
:rules=
"rules"
label-width=
"150px"
ref=
"hcategory"
>
<el-form-item
label=
"分类名称"
prop=
"Name"
>
<el-input
type=
"text"
style=
"width:250px"
size=
"small"
maxlength=
"100"
v-model=
"postMsg.Name"
>
</el-input>
</el-form-item>
<el-form-item
label=
"Logo"
prop=
"file"
>
<el-form-item
label=
"Logo"
prop=
"Image"
>
<div>
<el-button
@
click=
"openChangeDig()"
size=
"small"
>
选择文件
</el-button>
</div>
...
...
@@ -56,18 +60,18 @@
<img
v-if=
"postMsg.Image"
:src=
"postMsg.Image"
alt=
""
style=
"width:100px;height:100px;"
/>
</div>
</el-form-item>
<el-form-item
label=
"启用状态"
prop=
"Enable"
>
<el-form-item
label=
"启用状态"
>
<el-radio
v-model=
"postMsg.Enable"
:label=
"1"
>
启用
</el-radio>
<el-radio
v-model=
"postMsg.Enable"
:label=
"2"
>
禁用
</el-radio>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"Sort"
>
<el-form-item
label=
"排序"
>
<el-input
style=
"width:250px"
size=
"small"
maxlength=
"200"
v-model=
"postMsg.Sort"
>
</el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"isShowCategoryForm = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"save
Data
()"
>
确 定
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"save
Msg
()"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 选择文件 -->
...
...
@@ -93,7 +97,6 @@
pageSize
:
15
,
Name
:
""
},
dateList
:
[],
//日期
editTitle
:
"新增分类分类"
,
postMsg
:
{
Id
:
0
,
...
...
@@ -110,18 +113,12 @@
message
:
"请输入名称"
,
trigger
:
"blur"
}],
Sort
:
[{
Image
:
[{
required
:
true
,
message
:
"请
输入排序
"
,
message
:
"请
选择文件
"
,
trigger
:
"blur"
}],
Enable
:
[{
required
:
true
,
message
:
"请选择状态"
,
trigger
:
"change"
}]
}
},
};
},
created
()
{},
...
...
@@ -174,16 +171,30 @@
}
this
.
isShowCategoryForm
=
true
;
},
//
新增修改分类
save
Data
(
)
{
this
.
assetsApipost
(
"/api/Assess/SetCategoryInfo"
,
this
.
postMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
getList
();
//
表单验证是否通过
save
Msg
(
)
{
//提交创建、修改表单
this
.
$refs
[
"hcategory"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
saveData
();
}
else
{
this
.
Error
(
res
.
data
.
message
)
;
return
false
;
}
});
},
//新增修改分类
saveData
()
{
this
.
assetsApipost
(
"/api/Assess/SetCategoryInfo"
,
this
.
postMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
getList
();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
},
//删除分类
RemmoveCategory
(
item
)
{
...
...
@@ -207,7 +218,7 @@
}
};
</
script
>
<
style
>
<
style
scope
>
.performanceStatics
.content
{
background
:
#fff
;
margin-top
:
10px
;
...
...
@@ -215,4 +226,12 @@
-webkit-box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
.edit-img
{
margin-right
:
10px
;
}
.indexApp_image
{
height
:
80px
;
}
</
style
>
\ No newline at end of file
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