Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center-ui
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center-ui
Commits
0c0fbd3b
Commit
0c0fbd3b
authored
Sep 14, 2021
by
程彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
json数据 项目请求引用
parent
9bb503a4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
8 deletions
+34
-8
src/api/api.js
+3
-2
src/api/manage.js
+6
-1
src/utils/request.js
+3
-0
src/views/school-center/productManagement/broadband.vue
+13
-5
static/school-center-ui.json
+9
-0
No files found.
src/api/api.js
View file @
0c0fbd3b
import
{
getAction
,}
from
'@/api/manage'
import
{
getAction
,
getJons
}
from
'@/api/manage'
//组件事例专用,请无视
const
getUserList
=
(
params
)
=>
getAction
(
"/sys/user/list"
,
params
);
...
...
@@ -6,7 +6,7 @@ const queryDepartTreeList = (params)=>getAction("/sysdepart/sysDepart/queryTreeL
export
const
ajaxGetDictItems
=
(
code
,
params
)
=>
getAction
(
`/sys/dict/getDictItems/
${
code
}
`
,
params
);
const
queryUserByDepId
=
(
params
)
=>
getAction
(
"/sys/user/queryUserByDepId"
,
params
);
const
queryUserRoleMap
=
(
params
)
=>
getAction
(
"/sys/user/queryUserRoleMap"
,
params
);
const
getJonslist
=
()
=>
getJons
(
'/json/school-center-ui.json'
)
export
{
...
...
@@ -14,6 +14,7 @@ export {
queryDepartTreeList
,
queryUserByDepId
,
queryUserRoleMap
,
getJonslist
}
...
...
src/api/manage.js
View file @
0c0fbd3b
...
...
@@ -9,7 +9,12 @@ const api = {
}
export
default
api
export
function
getJons
(
url
)
{
return
axios
({
url
:
url
,
method
:
'get'
,
})
}
//post
export
function
postAction
(
url
,
parameter
)
{
return
axios
({
...
...
src/utils/request.js
View file @
0c0fbd3b
...
...
@@ -87,6 +87,9 @@ const err = (error) => {
// request interceptor
service
.
interceptors
.
request
.
use
(
config
=>
{
if
(
config
.
url
.
indexOf
(
'school-center-ui.json'
)
!=
-
1
){
config
.
baseURL
=
''
}
const
token
=
Vue
.
ls
.
get
(
ACCESS_TOKEN
)
if
(
token
)
{
config
.
headers
[
'Authorization'
]
=
token
// 让每个请求携带自定义 token 请根据实际情况自行修改
...
...
src/views/school-center/productManagement/broadband.vue
View file @
0c0fbd3b
...
...
@@ -220,10 +220,11 @@
<a-form-item
:labelCol=
"{span: 5}"
:wrapperCol=
"{span: 9, offset: 1}"
label=
"允许上网终端类型:"
>
<a-select
v-decorator=
"[ 'universityTerminalType', {rules: [{ required: true, message: '允许上网终端类型'}]} ]"
@
change=
"changeTerminalType"
>
<a-select-option
value=
"PC+手机"
>
PC+手机
</a-select-option>
<a-select-option
value=
"仅PC"
>
仅PC
</a-select-option>
<a-select-option
value=
"仅手机"
>
仅手机
</a-select-option>
<a-select-option
value=
"1PC+1手机"
>
1PC+1手机
</a-select-option>
<!-- <a-select-option value="PC+手机">PC+手机</a-select-option>-->
<!-- <a-select-option value="仅PC">仅PC</a-select-option>-->
<!-- <a-select-option value="仅手机">仅手机</a-select-option>-->
<a-select-option
v-for=
"d in broadbands"
:key=
"d.value"
:value=
"d.value"
>
{{d.name}}
</a-select-option>
</a-select>
</a-form-item>
...
...
@@ -306,7 +307,7 @@ import {cloneObject} from '@/utils/util';
import
{
getSchoolNames
,
initSubstName
}
from
"../../../api/school-center/louZhang/louZhangManagerAPI"
;
import
{
mavonEditor
}
from
"mavon-editor"
;
import
"mavon-editor/dist/css/index.css"
;
import
{
getJonslist
}
from
'@/api/api'
;
export
default
{
name
:
"university"
,
components
:
{
...
...
@@ -314,6 +315,7 @@ export default {
},
data
(){
return
{
broadbands
:[],
universityId
:
true
,
universityName
:
''
,
regularName
:
''
,
...
...
@@ -888,6 +890,12 @@ export default {
mounted
()
{
this
.
initSubstName
();
this
.
getSchool
();
getJonslist
().
then
((
res
)
=>
{
//请求json文件
debugger
this
.
broadbands
=
res
.
school_center_productManagement_broadband
;
this
.
$forceUpdate
()
}).
catch
((
ress
)
=>
{
// 请求失败处理
});
}
}
</
script
>
...
...
static/school-center-ui.json
0 → 100644
View file @
0c0fbd3b
{
"school-center/productManagement/broadband"
:
[
{
"value"
:
"PC+手机"
,
"name"
:
"PC+手机"
},
{
"value"
:
"仅PC"
,
"name"
:
"仅PC"
},
{
"value"
:
"仅手机"
,
"name"
:
"仅手机"
},
{
"value"
:
"1PC+1手机"
,
"name"
:
"1PC+1手机"
}
]
}
\ 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