Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
glsx-staging
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b9fcd92d
authored
Apr 06, 2020
by
liwk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
3a7b7f53
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
src/api/storeManagement.js
src/plugin/axios/index.js
src/views/storeManagement/index.vue
src/api/storeManagement.js
View file @
b9fcd92
import
request
from
'./request'
import
request
from
'./request'
import
RequestMethods
from
'./request.methods'
const
path
=
'shop/'
const
path
=
'shop/'
function
storeList
(
data
)
{
function
storeList
(
data
)
{
...
@@ -8,9 +9,15 @@ function storeList(data) {
...
@@ -8,9 +9,15 @@ function storeList(data) {
function
exportExcel
(
data
)
{
function
exportExcel
(
data
)
{
data
.
method
=
`
${
path
}
export`
data
.
method
=
`
${
path
}
export`
return
request
(
data
,
'get'
,
'arraybuffer'
)
return
request
(
data
,
RequestMethods
.
GET
,
'arraybuffer'
)
}
function
delStore
(
data
)
{
data
.
method
=
`
${
path
}
del`
return
request
(
data
,
RequestMethods
.
POST
)
}
}
export
{
export
{
storeList
,
storeList
,
exportExcel
exportExcel
,
delStore
}
}
\ No newline at end of file
\ No newline at end of file
src/plugin/axios/index.js
View file @
b9fcd92
...
@@ -97,7 +97,7 @@ service.interceptors.response.use(
...
@@ -97,7 +97,7 @@ service.interceptors.response.use(
// store.commit('d2admin/refreshtable/set', !store.state.d2admin.refreshtable.value)
// store.commit('d2admin/refreshtable/set', !store.state.d2admin.refreshtable.value)
// refreshTable = false
// refreshTable = false
// }
// }
return
data
return
data
||
'success'
default
:
default
:
// 不是正确的 code
// 不是正确的 code
errorCreate
(
`
${
dataAxios
.
message
}
`
)
errorCreate
(
`
${
dataAxios
.
message
}
`
)
...
...
src/views/storeManagement/index.vue
View file @
b9fcd92
...
@@ -119,6 +119,18 @@
...
@@ -119,6 +119,18 @@
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<a
ref=
"downLoadQr"
class=
'qr'
>
</a>
<el-tooltip
content=
"请如实填写门店信息并保存之后,才能下载二维码"
placement=
"top"
>
<el-link
:underline=
'false'
>
下载二维码
<i
class=
"el-icon-warning-outline el-icon--right"
></i>
</el-link>
</el-tooltip>
<span
<span
slot=
"footer"
slot=
"footer"
class=
"dialog-footer"
class=
"dialog-footer"
...
@@ -134,7 +146,7 @@
...
@@ -134,7 +146,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
storeList
,
exportExcel
}
from
'@api/storeManagement'
import
*
as
api
from
'@api/storeManagement'
import
axios
from
'axios'
import
axios
from
'axios'
export
default
{
export
default
{
name
:
'storeManagement'
,
name
:
'storeManagement'
,
...
@@ -178,7 +190,7 @@ export default {
...
@@ -178,7 +190,7 @@ export default {
}
}
]
]
},
},
queryListApi
:
storeList
,
queryListApi
:
api
.
storeList
,
storeVisible
:
false
,
storeVisible
:
false
,
storeForm
:
{}
storeForm
:
{}
}
}
...
@@ -186,12 +198,16 @@ export default {
...
@@ -186,12 +198,16 @@ export default {
methods
:
{
methods
:
{
handleDelete
(
row
)
{
handleDelete
(
row
)
{
console
.
log
(
row
)
console
.
log
(
row
)
api
.
delStore
({
id
:
row
.
merId
}).
then
(
res
=>
{
console
.
log
(
res
)
})
},
},
handleEdit
(
row
)
{
handleEdit
(
row
)
{
this
.
storeVisible
=
!
this
.
storeVisible
this
.
storeVisible
=
!
this
.
storeVisible
this
.
storeForm
=
row
},
},
handleExport
()
{
handleExport
()
{
exportExcel
(
this
.
searchForm
).
then
(
res
=>
{
api
.
exportExcel
(
this
.
searchForm
).
then
(
res
=>
{
let
a
=
document
.
createElement
(
'a'
)
let
a
=
document
.
createElement
(
'a'
)
let
blob
=
new
Blob
([
res
],
{
type
:
"application/vnd.ms-excel"
})
let
blob
=
new
Blob
([
res
],
{
type
:
"application/vnd.ms-excel"
})
let
objectUrl
=
URL
.
createObjectURL
(
blob
)
let
objectUrl
=
URL
.
createObjectURL
(
blob
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment