Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
be17bdbe
Commit
be17bdbe
authored
Dec 06, 2021
by
tang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6dfa4632
08edca8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
26 deletions
+83
-26
business.js
src/axios/module/business.js
+12
-0
Notice.vue
src/views/Business/Notice.vue
+59
-18
pages.vue
src/views/comps/pages.vue
+12
-8
No files found.
src/axios/module/business.js
View file @
be17bdbe
...
@@ -15,7 +15,19 @@ const businessGetTop4 = (params = {}) => {
...
@@ -15,7 +15,19 @@ const businessGetTop4 = (params = {}) => {
return
POST
(
`
${
Prefix
}
/office/policy/api/getTop4`
,
params
)
return
POST
(
`
${
Prefix
}
/office/policy/api/getTop4`
,
params
)
}
}
// 条码注册/注销公告
const
businessGetEanUpcByCondition
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/eanupc/api/getEanUpcByCondition`
,
params
)
}
// 条码注册/注销公告详情
const
businessGetDetailById
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/eanupc/api/getDetailById`
,
params
)
}
export
default
{
export
default
{
businessDownLoad
,
businessDownLoad
,
businessGetTop4
,
businessGetTop4
,
businessGetEanUpcByCondition
,
businessGetDetailById
,
}
}
src/views/Business/Notice.vue
View file @
be17bdbe
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
aria-selected="true"
aria-selected="true"
@click="jump(i)"
@click="jump(i)"
>
>
{{
tmp
.
name
}}
{{
tmp
.
name
}}
</button>
</button>
</li>
</li>
</ul>
</ul>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
:aria-labelledby="tmp.type + '-tab'"
:aria-labelledby="tmp.type + '-tab'"
>
>
<list
:list=
"tmp.data"
/>
<list
:list=
"tmp.data"
/>
<pages
/>
<pages
:pages=
"pageParams"
@
toPagesFather=
"receivePagesChild"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -68,14 +68,7 @@ export default {
...
@@ -68,14 +68,7 @@ export default {
link
:
"/Business/Notice"
,
link
:
"/Business/Notice"
,
active
:
"zhuce"
,
active
:
"zhuce"
,
data
:
[
data
:
[
{
name
:
"武隆区陈氏面条加工坊"
,
time
:
"2021-09-30"
,
},
{
name
:
"重庆功存科技有限公司"
,
time
:
"2021-09-30"
,
},
],
],
},
},
{
{
...
@@ -84,22 +77,70 @@ export default {
...
@@ -84,22 +77,70 @@ export default {
link
:
"/Business/Notice"
,
link
:
"/Business/Notice"
,
active
:
"zhuxiao"
,
active
:
"zhuxiao"
,
data
:
[
data
:
[
{
name
:
"杭州瀚扬科技有限公司"
,
time
:
"2021-09-22"
,
},
{
name
:
"贵州国伟自由行智能科技有限公司"
,
time
:
"2021-09-07"
,
},
],
],
},
},
],
],
pageParams
:
{
currentPage
:
1
,
pageSize
:
10
,
pageCount
:
5
,
total
:
100
,
},
logoutFlag
:
"1"
,
};
};
},
},
created
()
{
this
.
init
();
},
methods
:
{
methods
:
{
init
()
{
this
.
setLogoutFlag
(
this
.
$route
.
query
.
id
);
},
setLogoutFlag
(
currentTab
)
{
if
(
currentTab
===
"zhuce"
)
{
this
.
logoutFlag
=
"1"
;
}
else
{
this
.
logoutFlag
=
"0"
;
}
this
.
businessGetEanUpcByCondition
();
},
// 条码注册/注销公告
async
businessGetEanUpcByCondition
()
{
const
params
=
{
page
:
this
.
pageParams
.
currentPage
,
limit
:
this
.
pageParams
.
pageSize
,
logoutFlag
:
this
.
logoutFlag
,
};
console
.
log
(
params
,
"params"
);
const
businessGetEanUpcByConditionRes
=
await
this
.
$api
.
business
.
businessGetEanUpcByCondition
(
params
);
const
{
returnCode
,
data
}
=
businessGetEanUpcByConditionRes
;
if
(
returnCode
===
"0"
)
{
console
.
log
(
businessGetEanUpcByConditionRes
,
"条码注册/注销公告"
);
this
.
pageParams
.
total
=
data
.
totalCount
;
let
key
;
if
(
this
.
logoutFlag
===
'1'
)
{
key
=
0
;
}
else
{
key
=
1
;
}
data
.
list
.
forEach
(
el
=>
{
el
.
name
=
el
.
firmName
;
el
.
time
=
this
.
$moment
(
el
.
logDate
).
format
(
'YYYY-MM-DD'
);
});
this
.
list
[
key
].
data
=
data
.
list
console
.
log
(
this
.
list
,
'this.list'
);
}
},
// 接收分页子组件传过来的值
receivePagesChild
(
val
)
{
this
.
pageParams
.
currentPage
=
val
;
this
.
businessGetEanUpcByCondition
();
},
jump
(
i
)
{
jump
(
i
)
{
// console.log(i);
// console.log(i);
this
.
setLogoutFlag
(
this
.
list
[
i
].
active
);
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
this
.
list
[
i
].
link
,
path
:
this
.
list
[
i
].
link
,
query
:
{
query
:
{
...
...
src/views/comps/pages.vue
View file @
be17bdbe
...
@@ -18,14 +18,14 @@
...
@@ -18,14 +18,14 @@
<div
class=
"pages-middle"
>
<div
class=
"pages-middle"
>
<button
class=
"pages-btn"
v-if=
"false"
>
首页
</button>
<button
class=
"pages-btn"
v-if=
"false"
>
首页
</button>
<el-pagination
<el-pagination
:page-size=
"20"
:current-page=
"pages.currentPage"
:pager-count=
"5"
:page-size=
"pages.pageSize"
:pager-count=
"pages.pageCount"
layout=
"prev, pager, next"
layout=
"prev, pager, next"
:total=
"
1000
"
:total=
"
pages.total
"
background
background
@
current-change=
"handleCurrentChange"
>
>
<span>
1111
</span>
</el-pagination>
</el-pagination>
<button
class=
"pages-btn"
v-if=
"false"
>
尾页
</button>
<button
class=
"pages-btn"
v-if=
"false"
>
尾页
</button>
</div>
</div>
...
@@ -40,14 +40,18 @@
...
@@ -40,14 +40,18 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
'pages'
],
data
()
{
data
()
{
return
{
return
{
sizeList
:
[
10
,
20
],
sizeList
:
[
10
,
20
],
pages
:
{
size
:
10
,
},
};
};
},
},
methods
:
{
// 当前页
handleCurrentChange
(
val
)
{
this
.
$emit
(
'toPagesFather'
,
val
)
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
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