Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
seeta-device
/
deviceManage
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 4345db1b
authored
Aug 31, 2021
by
温丽香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数,数据,应用模块完成
1 parent
d178de9b
Pipeline
#3872
passed
in 1 minute 54 seconds
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
7 deletions
src/axios.js
src/http.ts
src/views/Apply/index.vue
src/views/DataList/index.vue
src/views/ParamsModel/add.vue
src/views/ParamsModel/edit.vue
src/views/ParamsModel/index.vue
src/axios.js
View file @
4345db1
...
@@ -25,3 +25,4 @@ const APPID = '/appid'
...
@@ -25,3 +25,4 @@ const APPID = '/appid'
export
const
getApp
=
data
=>
axios
(
GET
,
FRONT
+
APPID
+
'/query_list'
,
data
)
export
const
getApp
=
data
=>
axios
(
GET
,
FRONT
+
APPID
+
'/query_list'
,
data
)
export
const
deleteApp
=
data
=>
axios
(
GET
,
FRONT
+
APPID
+
'/delete'
,
data
)
export
const
deleteApp
=
data
=>
axios
(
GET
,
FRONT
+
APPID
+
'/delete'
,
data
)
export
const
setApp
=
data
=>
axios
(
GET
,
FRONT
+
APPID
+
'/set'
,
data
)
export
const
setApp
=
data
=>
axios
(
GET
,
FRONT
+
APPID
+
'/set'
,
data
)
export
const
addApp
=
data
=>
axios
(
POST
,
FRONT
+
APPID
+
'/add'
,
data
)
src/http.ts
View file @
4345db1
...
@@ -56,6 +56,9 @@ Axios.interceptors.response.use(res => {
...
@@ -56,6 +56,9 @@ Axios.interceptors.response.use(res => {
store
.
commit
(
'removeAxiosCancelArr'
,
index
)
store
.
commit
(
'removeAxiosCancelArr'
,
index
)
}
}
})
})
if
(
res
&&
res
.
data
&&
res
.
data
.
code
!==
0
)
{
notificationError
(
'提示'
,
res
.
data
.
msg
)
}
return
res
return
res
},
error
=>
{
},
error
=>
{
error
.
response
&&
error
.
response
.
data
&&
notificationError
(
'提示'
,
error
.
response
.
data
.
message
)
error
.
response
&&
error
.
response
.
data
&&
notificationError
(
'提示'
,
error
.
response
.
data
.
message
)
...
...
src/views/Apply/index.vue
View file @
4345db1
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
<span
class=
"title"
>
{{
'应用中心'
}}
</span>
<span
class=
"title"
>
{{
'应用中心'
}}
</span>
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content"
>
<div
class=
"content-header"
>
<st-button
type=
"primary"
id=
"btn"
@
click=
"showDialog = true"
>
<i
class=
"iconfont icon-tianjia"
></i><span
class=
"text"
>
{{
'申请应用'
}}
</span></st-button>
</div>
<div
class=
"table-list"
>
<div
class=
"table-list"
>
<div
class=
"list-content"
>
<div
class=
"list-content"
>
<st-table
<st-table
...
@@ -28,17 +32,51 @@
...
@@ -28,17 +32,51 @@
</div>
</div>
</div>
</div>
</div>
</div>
<st-dialog
:show
.
sync=
"showDialog"
class=
"update-dialog"
@
dismiss=
"cancelSubmit"
>
<div
slot=
"header"
class=
"popup-header"
>
{{
'申请应用'
}}
</div>
<div
slot=
"body"
class=
"popup-body"
>
<st-form
label-width=
"90px"
ref=
"form"
:model=
"form"
>
<st-form-item
:label=
"'appId:'"
><st-input
v-model=
"form.appid"
></st-input></st-form-item>
<st-form-item
:label=
"'secret:'"
><st-input
v-model=
"form.secret"
></st-input></st-form-item>
<st-form-item
:label=
"'说明:'"
>
<st-input
type=
"textarea"
placeholder=
"请输入应用描述"
v-model=
"form.description"
maxlength=
"100"
show-word-limit
>
</st-input>
</st-form-item>
</st-form>
</div>
<div
slot=
"footer"
class=
"popup-footer flex right"
>
<st-button
@
click=
"cancelSubmit"
>
{{
$t
(
'public.cancel'
)
}}
</st-button>
<st-button
type=
"primary"
@
click=
"submit"
>
{{
'确定'
}}
</st-button>
</div>
</st-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getApp
,
deleteApp
,
setApp
}
from
'@/axios'
import
{
getApp
,
deleteApp
,
setApp
,
addApp
}
from
'@/axios'
import
Dialog
from
'@/helpers/dialog'
import
Dialog
from
'@/helpers/dialog'
import
browserStorage
from
'@/services/local-storage'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
showSecret
:
''
,
showSecret
:
''
,
loadingStatus
:
false
,
loadingStatus
:
false
,
form
:
{},
showDialog
:
false
,
definitions
:
[
definitions
:
[
{
{
label
:
'APPID'
,
label
:
'APPID'
,
...
@@ -85,6 +123,20 @@ export default {
...
@@ -85,6 +123,20 @@ export default {
}
}
this
.
loadingStatus
=
false
this
.
loadingStatus
=
false
},
},
cancelSubmit
()
{
this
.
form
=
{}
this
.
showDialog
=
false
},
async
submit
()
{
const
userInfo
=
JSON
.
parse
(
browserStorage
.
getItem
(
'user'
))
const
res
=
await
addApp
({
...
this
.
form
,
creater
:
userInfo
.
creater
})
if
(
res
&&
res
.
data
&&
res
.
data
.
code
===
0
)
{
Toast
.
success
(
'操作成功'
)
this
.
getData
()
}
this
.
showDialog
=
false
this
.
form
=
{}
},
async
handleDelete
(
row
)
{
async
handleDelete
(
row
)
{
const
confirmDelete
=
await
Dialog
.
confirm
(
'提示'
,
{
message
:
'是否删除此应用?'
})
const
confirmDelete
=
await
Dialog
.
confirm
(
'提示'
,
{
message
:
'是否删除此应用?'
})
if
(
!
confirmDelete
)
return
if
(
!
confirmDelete
)
return
...
@@ -108,6 +160,23 @@ export default {
...
@@ -108,6 +160,23 @@ export default {
</
script
>
</
script
>
<
style
lang=
"sass"
scoped
>
<
style
lang=
"sass"
scoped
>
.update-dialog
::v-deep
input
&
::placeholder
font-size
:
14px
font-family
:
PingFangSC-Regular
,
PingFang
SC
font-weight
:
400
color
:
#999999
::v-deep
.el-input__inner
,
::v-deep
.el-textarea
,
::v-deep
.el-textarea__inner
font-size
:
14px
font-family
:
PingFangSC-Regular
,
PingFang
SC
font-weight
:
400
color
:
#333
&
::placeholder
font-size
:
14px
font-family
:
PingFangSC-Regular
,
PingFang
SC
font-weight
:
400
color
:
#999999
.eye-btn
.eye-btn
margin-left
:
10px
margin-left
:
10px
color
:
#409EFF
color
:
#409EFF
...
...
src/views/DataList/index.vue
View file @
4345db1
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
definitions
:
[
definitions
:
[
{
{
label
:
'序号'
,
label
:
'序号'
,
render
:
'
numb
er'
render
:
'
ord
er'
},
},
{
{
label
:
'名称'
,
label
:
'名称'
,
...
@@ -131,7 +131,10 @@ export default {
...
@@ -131,7 +131,10 @@ export default {
this
.
loadingStatus
=
true
this
.
loadingStatus
=
true
const
res
=
await
getTable
({
pages
:
this
.
currentPage
-
1
,
pagesize
:
this
.
currentSize
})
const
res
=
await
getTable
({
pages
:
this
.
currentPage
-
1
,
pagesize
:
this
.
currentSize
})
if
(
res
&&
res
.
data
&&
res
.
data
.
code
===
0
)
{
if
(
res
&&
res
.
data
&&
res
.
data
.
code
===
0
)
{
this
.
tokenList
=
res
.
data
.
data
.
tables
this
.
tokenList
=
res
.
data
.
data
.
tables
.
map
((
item
,
index
)
=>
{
item
.
order
=
index
+
1
+
(
this
.
currentPage
-
1
)
*
this
.
currentSize
return
item
})
this
.
total
=
res
.
data
.
data
.
total
this
.
total
=
res
.
data
.
data
.
total
}
}
this
.
loadingStatus
=
false
this
.
loadingStatus
=
false
...
...
src/views/ParamsModel/add.vue
View file @
4345db1
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
prop=
"description"
>
prop=
"description"
>
<st-input
<st-input
type=
"textarea"
type=
"textarea"
placeholder=
"请输入
应用
描述"
placeholder=
"请输入描述"
v-model=
"form.description"
v-model=
"form.description"
maxlength=
"100"
maxlength=
"100"
show-word-limit
show-word-limit
...
...
src/views/ParamsModel/edit.vue
View file @
4345db1
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<st-form-item
<st-form-item
:label=
"'模板名称'+':'"
:label=
"'模板名称'+':'"
prop=
"name"
>
prop=
"name"
>
<st-input
v-model=
"form.name"
></st-input>
<st-input
v-model=
"form.name"
:disabled=
"true"
></st-input>
</st-form-item>
</st-form-item>
<st-form-item
<st-form-item
:label=
"'模板类型'+':'"
:label=
"'模板类型'+':'"
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
prop=
"description"
>
prop=
"description"
>
<st-input
<st-input
type=
"textarea"
type=
"textarea"
placeholder=
"请输入
应用
描述"
placeholder=
"请输入描述"
v-model=
"form.description"
v-model=
"form.description"
maxlength=
"100"
maxlength=
"100"
show-word-limit
show-word-limit
...
...
src/views/ParamsModel/index.vue
View file @
4345db1
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
list: twoList,
list: twoList,
total: twoTotal,
total: twoTotal,
}"
}"
:empty-text="parentLevel ? '暂无数据' : '未选择一级参数模板'"
:outerLoading="loadingTwo">
:outerLoading="loadingTwo">
<div
slot=
"operate"
slot-scope=
"row"
>
<div
slot=
"operate"
slot-scope=
"row"
>
<span
class=
"operate"
@
click=
"$router.push(
{ path: '/params/detail', query: { name: row.name } })">详情
</span>
<span
class=
"operate"
@
click=
"$router.push(
{ path: '/params/detail', query: { name: row.name } })">详情
</span>
...
@@ -138,7 +139,7 @@ export default {
...
@@ -138,7 +139,7 @@ export default {
},
},
async
getTwoData
()
{
async
getTwoData
()
{
this
.
loadingTwo
=
true
this
.
loadingTwo
=
true
const
twoLevel
=
await
getParameter
({
base
:
0
,
parent
:
this
.
parentLevel
,
pages
:
this
.
twoCurrentPage
-
1
,
pagesize
:
10
})
const
twoLevel
=
await
getParameter
({
parent
:
this
.
parentLevel
,
pages
:
this
.
twoCurrentPage
-
1
,
pagesize
:
10
})
if
(
twoLevel
&&
twoLevel
.
data
&&
twoLevel
.
data
.
code
===
0
)
{
if
(
twoLevel
&&
twoLevel
.
data
&&
twoLevel
.
data
.
code
===
0
)
{
this
.
twoList
=
twoLevel
.
data
.
parameters
.
datas
this
.
twoList
=
twoLevel
.
data
.
parameters
.
datas
this
.
twoTotal
=
twoLevel
.
data
.
parameters
.
total
this
.
twoTotal
=
twoLevel
.
data
.
parameters
.
total
...
...
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