Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qr-consistency-vue3
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
刘怀志
qr-consistency-vue3
Commits
392890c9
Commit
392890c9
authored
Apr 22, 2025
by
祁正
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
国内品牌管理
parent
763e7903
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
27 deletions
+36
-27
index.vue
src/views/system/domesticBrand/index.vue
+36
-27
No files found.
src/views/system/domesticBrand/index.vue
View file @
392890c9
...
@@ -4,27 +4,30 @@
...
@@ -4,27 +4,30 @@
<div
style=
"width: 100%;display: flex;align-items: center;justify-content: flex-end"
>
<div
style=
"width: 100%;display: flex;align-items: center;justify-content: flex-end"
>
<el-button
<el-button
type=
"primary"
plain
plain
icon=
"Plus
"
class=
"btn-C
"
@
click=
"handleAdd"
@
click=
"handleAdd"
style=
""
style=
""
>
新
增
</el-button>
>
新
建
</el-button>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"brandDataList"
@
selection-change=
"handleSelectionChange"
>
<el-table
style=
"margin-top: 15px"
border
v-loading=
"loading"
:data=
"brandDataList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
/>
<el-table-column
label=
"品牌"
align=
"center"
prop=
"brand"
/>
<el-table-column
label=
"品牌"
align=
"center"
prop=
"brand"
/>
<el-table-column
label=
"更新人"
align=
"center"
prop=
"update
By
"
/>
<el-table-column
label=
"更新人"
align=
"center"
prop=
"update
UserName
"
/>
<el-table-column
label=
"更新时间"
align=
"center"
prop=
"updateTime"
>
<el-table-column
label=
"更新时间"
align=
"center"
prop=
"updateTime"
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
>
<template
#
default=
"scope"
>
{{
scope
.
row
.
remark
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
link
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['brandData:brandData:edit']"
>
修改
</el-button>
<el-button
link
type=
"primary"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['brandData:brandData:remove']"
>
删除
</el-button>
<el-button
link
type=
"danger"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -38,13 +41,17 @@
...
@@ -38,13 +41,17 @@
/>
/>
<!-- 添加或修改国内品牌数据对话框 -->
<!-- 添加或修改国内品牌数据对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"500px"
append-to-body
>
<el-dialog
top=
"30"
:title=
"title"
v-model=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"brandDataRef"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"brandDataRef"
label-position=
"top"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"类型"
prop=
"type"
>
<el-input
v-model=
"form.type"
disabled
placeholder=
"请输入类型"
/>
</el-form-item>
<el-form-item
label=
"品牌"
prop=
"brand"
>
<el-form-item
label=
"品牌"
prop=
"brand"
>
<el-input
v-model=
"form.brand"
placeholder=
"请输入品牌"
/>
<el-input
v-model=
"form.brand"
placeholder=
"请输入品牌"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
<el-input
v-model=
"form.remark"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<
template
#
footer
>
<
template
#
footer
>
...
@@ -57,7 +64,7 @@
...
@@ -57,7 +64,7 @@
</div>
</div>
</template>
</template>
<
script
setup
name=
"BrandData"
>
<
script
setup
>
import
{
listBrandData
,
getBrandData
,
delBrandData
,
addBrandData
,
updateBrandData
}
from
"@/api/brandData/brandData"
;
import
{
listBrandData
,
getBrandData
,
delBrandData
,
addBrandData
,
updateBrandData
}
from
"@/api/brandData/brandData"
;
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
...
@@ -72,20 +79,27 @@ const multiple = ref(true);
...
@@ -72,20 +79,27 @@ const multiple = ref(true);
const
total
=
ref
(
0
);
const
total
=
ref
(
0
);
const
title
=
ref
(
""
);
const
title
=
ref
(
""
);
const
form
=
ref
({
type
:
'国内'
})
const
data
=
reactive
({
const
data
=
reactive
({
form
:
{},
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
},
},
rules
:
{
rules
:
{
createTime
:
[
type
:
[
{
required
:
true
,
message
:
"创建时间不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"类型不能为空"
,
trigger
:
"blur"
}
],
brand
:
[
{
required
:
true
,
message
:
"品牌不能为空"
,
trigger
:
"blur"
}
],
],
}
}
});
});
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
const
{
queryParams
,
rules
}
=
toRefs
(
data
);
/** 查询国内品牌数据列表 */
/** 查询国内品牌数据列表 */
function
getList
()
{
function
getList
()
{
...
@@ -106,16 +120,10 @@ function cancel() {
...
@@ -106,16 +120,10 @@ function cancel() {
// 表单重置
// 表单重置
function
reset
()
{
function
reset
()
{
form
.
value
=
{
form
.
value
=
{
id
:
null
,
type
:
null
,
brand
:
null
,
brand
:
null
,
createBy
:
null
,
remark
:
null
,
createTime
:
null
,
type
:
"国内"
updateBy
:
null
,
updateTime
:
null
,
remark
:
null
};
};
proxy
.
resetForm
(
"brandDataRef"
);
}
}
/** 搜索按钮操作 */
/** 搜索按钮操作 */
...
@@ -141,7 +149,7 @@ function handleSelectionChange(selection) {
...
@@ -141,7 +149,7 @@ function handleSelectionChange(selection) {
function
handleAdd
()
{
function
handleAdd
()
{
reset
();
reset
();
open
.
value
=
true
;
open
.
value
=
true
;
title
.
value
=
"
添加国内品牌数据
"
;
title
.
value
=
"
新增
"
;
}
}
/** 修改按钮操作 */
/** 修改按钮操作 */
...
@@ -151,7 +159,7 @@ function handleUpdate(row) {
...
@@ -151,7 +159,7 @@ function handleUpdate(row) {
getBrandData
(
_id
).
then
(
response
=>
{
getBrandData
(
_id
).
then
(
response
=>
{
form
.
value
=
response
.
data
;
form
.
value
=
response
.
data
;
open
.
value
=
true
;
open
.
value
=
true
;
title
.
value
=
"
修改国内品牌数据
"
;
title
.
value
=
"
编辑
"
;
});
});
}
}
...
@@ -179,7 +187,7 @@ function submitForm() {
...
@@ -179,7 +187,7 @@ function submitForm() {
/** 删除按钮操作 */
/** 删除按钮操作 */
function
handleDelete
(
row
)
{
function
handleDelete
(
row
)
{
const
_ids
=
row
.
id
||
ids
.
value
;
const
_ids
=
row
.
id
||
ids
.
value
;
proxy
.
$modal
.
confirm
(
'是否确认删除
国内品牌数据编号为"'
+
_ids
+
'"的
数据项?'
).
then
(
function
()
{
proxy
.
$modal
.
confirm
(
'是否确认删除
该
数据项?'
).
then
(
function
()
{
return
delBrandData
(
_ids
);
return
delBrandData
(
_ids
);
}).
then
(()
=>
{
}).
then
(()
=>
{
getList
();
getList
();
...
@@ -206,4 +214,5 @@ getList();
...
@@ -206,4 +214,5 @@ getList();
:deep
(
.el-pagination.is-background
.el-pager
li
.is-active
)
{
:deep
(
.el-pagination.is-background
.el-pager
li
.is-active
)
{
background-color
:
#0154FB
;
background-color
:
#0154FB
;
}
}
</
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