Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
sample-form-platform
Commits
1fd30d6a
Commit
1fd30d6a
authored
Aug 03, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:添加站点事项库事项来源
parent
9e4c6b74
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
14 deletions
+28
-14
sample-form-manager-ui/admin/src/pages/jump/jump.vue
sample-form-manager-ui/admin/src/pages/jump/jump.vue
+2
-2
sample-form-manager-ui/admin/src/pages/login/login.vue
sample-form-manager-ui/admin/src/pages/login/login.vue
+3
-1
sample-form-manager-ui/admin/src/pages/software/materials/modal/AddMaterials.vue
...admin/src/pages/software/materials/modal/AddMaterials.vue
+5
-6
sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue
...nager-ui/admin/src/pages/software/matter/MatterManage.vue
+8
-0
sample-form-manager-ui/admin/src/router/index.js
sample-form-manager-ui/admin/src/router/index.js
+2
-2
sample-form-manager-ui/admin/src/store/index.js
sample-form-manager-ui/admin/src/store/index.js
+4
-1
sample-form-manager-ui/admin/src/utils/request.js
sample-form-manager-ui/admin/src/utils/request.js
+4
-2
No files found.
sample-form-manager-ui/admin/src/pages/jump/jump.vue
View file @
1fd30d6a
...
@@ -17,13 +17,13 @@ export default {
...
@@ -17,13 +17,13 @@ export default {
this
.
getInfo
();
this
.
getInfo
();
},
},
methods
:
{
methods
:
{
...
mapMutations
([
"
SET_sysName
"
,
"
SET_sysLogo
"
]),
...
mapMutations
([
"
SET_sysName
"
,
"
SET_sysLogo
"
,
"
SET_token
"
]),
// 获取token和站点信息
// 获取token和站点信息
async
getInfo
()
{
async
getInfo
()
{
let
{
token
,
siteid
,
sysName
,
sysLogo
}
=
this
.
$route
.
query
;
let
{
token
,
siteid
,
sysName
,
sysLogo
}
=
this
.
$route
.
query
;
if
(
token
)
{
if
(
token
)
{
local
.
setLocal
(
"
sampleToken
"
,
token
);
local
.
setLocal
(
"
sampleSiteId
"
,
siteid
);
local
.
setLocal
(
"
sampleSiteId
"
,
siteid
);
this
.
SET_token
(
token
);
this
.
SET_sysName
(
sysName
);
this
.
SET_sysName
(
sysName
);
this
.
SET_sysLogo
(
sysLogo
);
this
.
SET_sysLogo
(
sysLogo
);
calcMenu
();
calcMenu
();
...
...
sample-form-manager-ui/admin/src/pages/login/login.vue
View file @
1fd30d6a
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
import
{
login
}
from
"
@/api/login
"
;
import
{
login
}
from
"
@/api/login
"
;
import
local
from
"
@/utils/local
"
;
import
local
from
"
@/utils/local
"
;
import
{
calcMenu
}
from
"
@/router
"
;
import
{
calcMenu
}
from
"
@/router
"
;
import
{
mapMutations
}
from
"
vuex
"
;
export
default
{
export
default
{
name
:
"
login
"
,
name
:
"
login
"
,
data
()
{
data
()
{
...
@@ -53,6 +54,7 @@ export default {
...
@@ -53,6 +54,7 @@ export default {
},
},
created
()
{},
created
()
{},
methods
:
{
methods
:
{
...
mapMutations
([
"
SET_token
"
]),
async
login
()
{
async
login
()
{
let
res
=
await
login
(
this
.
form
);
let
res
=
await
login
(
this
.
form
);
let
{
data
,
code
}
=
res
.
data
;
let
{
data
,
code
}
=
res
.
data
;
...
@@ -62,8 +64,8 @@ export default {
...
@@ -62,8 +64,8 @@ export default {
let
siteIds
=
data
.
user
.
siteIds
;
let
siteIds
=
data
.
user
.
siteIds
;
let
siteid
=
siteIds
.
split
(
"
,
"
)[
0
];
let
siteid
=
siteIds
.
split
(
"
,
"
)[
0
];
if
(
token
)
{
if
(
token
)
{
local
.
setLocal
(
"
sampleToken
"
,
token
);
local
.
setLocal
(
"
sampleSiteId
"
,
siteid
);
local
.
setLocal
(
"
sampleSiteId
"
,
siteid
);
this
.
SET_token
(
token
);
// 渲染菜单
// 渲染菜单
calcMenu
();
calcMenu
();
this
.
$router
.
push
(
"
/basicsset
"
);
this
.
$router
.
push
(
"
/basicsset
"
);
...
...
sample-form-manager-ui/admin/src/pages/software/materials/modal/AddMaterials.vue
View file @
1fd30d6a
...
@@ -61,7 +61,9 @@
...
@@ -61,7 +61,9 @@
:on-remove=
"handleRemoveSamplePath"
:on-remove=
"handleRemoveSamplePath"
:file-list=
"samplePathFileList"
:file-list=
"samplePathFileList"
:on-success=
"OnsuccessSamplePath"
:on-success=
"OnsuccessSamplePath"
:headers=
"headers"
:headers=
"
{
Authorization: token,
}"
>
>
<!-- accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document" -->
<!-- accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document" -->
<el-button
size=
"small"
type=
"primary"
>
上传文件
</el-button>
<el-button
size=
"small"
type=
"primary"
>
上传文件
</el-button>
...
@@ -86,6 +88,7 @@
...
@@ -86,6 +88,7 @@
<
script
>
<
script
>
import
local
from
"
@/utils/local
"
;
import
local
from
"
@/utils/local
"
;
import
{
saveMaterials
}
from
"
@/api/materials
"
;
import
{
saveMaterials
}
from
"
@/api/materials
"
;
import
{
mapGetters
}
from
"
vuex
"
;
export
default
{
export
default
{
props
:
{
props
:
{
title
:
{
title
:
{
...
@@ -140,14 +143,10 @@ export default {
...
@@ -140,14 +143,10 @@ export default {
// { required: true, message: "请上传模板", trigger: "change" },
// { required: true, message: "请上传模板", trigger: "change" },
// ],
// ],
},
},
headers
:
{
Authorization
:
local
.
getLocal
(
"
sampleToken
"
)
?
local
.
getLocal
(
"
sampleToken
"
)
:
""
,
},
};
};
},
},
computed
:
{
computed
:
{
...
mapGetters
([
"
token
"
]),
Visible
:
{
Visible
:
{
get
()
{
get
()
{
return
this
.
addMaterialsVisible
;
return
this
.
addMaterialsVisible
;
...
...
sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue
View file @
1fd30d6a
...
@@ -240,6 +240,14 @@
...
@@ -240,6 +240,14 @@
label
=
"
事项名称
"
label
=
"
事项名称
"
>
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
width
=
"
100
"
align
=
"
center
"
label
=
"
事项来源
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
tag
size
=
"
small
"
type
=
"
success
"
v
-
if
=
"
scope.row.source == 0
"
>
一体化添加
<
/el-ta
g
>
<
el
-
tag
size
=
"
small
"
v
-
else
>
自建事项
<
/el-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
操作
"
align
=
"
center
"
width
=
"
160
"
>
<
el
-
table
-
column
label
=
"
操作
"
align
=
"
center
"
width
=
"
160
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
primary pointer
"
@
click
=
"
handleJoin(scope.row.id)
"
<
span
class
=
"
primary pointer
"
@
click
=
"
handleJoin(scope.row.id)
"
...
...
sample-form-manager-ui/admin/src/router/index.js
View file @
1fd30d6a
...
@@ -2,7 +2,7 @@ import Vue from "vue";
...
@@ -2,7 +2,7 @@ import Vue from "vue";
import
VueRouter
from
"
vue-router
"
;
import
VueRouter
from
"
vue-router
"
;
import
Layouts
from
"
@/pages/layouts/Layouts.vue
"
;
import
Layouts
from
"
@/pages/layouts/Layouts.vue
"
;
import
store
from
"
@/store
"
;
import
store
from
"
@/store
"
;
import
local
from
"
@/utils/local
"
;
//
import local from "@/utils/local";
// 解决重复点击同一个路由报错
// 解决重复点击同一个路由报错
const
originalPush
=
VueRouter
.
prototype
.
push
;
const
originalPush
=
VueRouter
.
prototype
.
push
;
VueRouter
.
prototype
.
push
=
function
(
location
)
{
VueRouter
.
prototype
.
push
=
function
(
location
)
{
...
@@ -33,7 +33,7 @@ const router = new VueRouter({
...
@@ -33,7 +33,7 @@ const router = new VueRouter({
// 前置路由卫士
// 前置路由卫士
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
let
islogin
=
local
.
getLocal
(
"
sampleToken
"
)
?
true
:
false
;
let
islogin
=
store
.
getters
.
token
;
if
(
islogin
)
{
if
(
islogin
)
{
next
();
next
();
}
else
{
}
else
{
...
...
sample-form-manager-ui/admin/src/store/index.js
View file @
1fd30d6a
...
@@ -15,6 +15,9 @@ export default new Vuex.Store({
...
@@ -15,6 +15,9 @@ export default new Vuex.Store({
sysLogo
:
""
,
// 系统logo
sysLogo
:
""
,
// 系统logo
},
},
getters
:
{
getters
:
{
token
(
state
)
{
return
state
.
token
;
},
siteId
(
state
)
{
siteId
(
state
)
{
return
state
.
siteId
;
return
state
.
siteId
;
},
},
...
@@ -50,7 +53,7 @@ export default new Vuex.Store({
...
@@ -50,7 +53,7 @@ export default new Vuex.Store({
// storage: window.sessionStorage,
// storage: window.sessionStorage,
// }),
// }),
createPersistedState
({
createPersistedState
({
key
:
"
info
"
,
key
:
"
sample
"
,
storage
:
{
storage
:
{
getItem
:
(
key
)
=>
ls
.
get
(
key
),
getItem
:
(
key
)
=>
ls
.
get
(
key
),
setItem
:
(
key
,
value
)
=>
ls
.
set
(
key
,
value
),
setItem
:
(
key
,
value
)
=>
ls
.
set
(
key
,
value
),
...
...
sample-form-manager-ui/admin/src/utils/request.js
View file @
1fd30d6a
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
*/
*/
import
axios
from
"
axios
"
;
import
axios
from
"
axios
"
;
import
{
Message
}
from
"
element-ui
"
;
import
{
Message
}
from
"
element-ui
"
;
import
local
from
"
@/utils/local
"
;
// import local from "@/utils/local";
import
store
from
"
@/store
"
;
// import router from "@/router"
// import router from "@/router"
// 请求超时时间
// 请求超时时间
// axios.defaults.timeout = 10 * 1000;
// axios.defaults.timeout = 10 * 1000;
...
@@ -13,7 +14,7 @@ axios.defaults.baseURL = process.env.VUE_APP_API_BASE_URL;
...
@@ -13,7 +14,7 @@ axios.defaults.baseURL = process.env.VUE_APP_API_BASE_URL;
// 请求拦截
// 请求拦截
axios
.
interceptors
.
request
.
use
(
axios
.
interceptors
.
request
.
use
(
(
config
)
=>
{
(
config
)
=>
{
let
token
=
local
.
getLocal
(
"
sampleToken
"
)
;
let
token
=
store
.
getters
.
token
;
if
(
token
)
{
if
(
token
)
{
config
.
headers
.
Authorization
=
token
;
config
.
headers
.
Authorization
=
token
;
config
.
headers
.
Authtoken
=
token
;
config
.
headers
.
Authtoken
=
token
;
...
@@ -40,6 +41,7 @@ axios.interceptors.response.use(
...
@@ -40,6 +41,7 @@ axios.interceptors.response.use(
message
:
msg
,
message
:
msg
,
});
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
store
.
commit
(
"
SET_token
"
,
""
);
location
.
href
=
process
.
env
.
VUE_APP_API_portal_URL
;
location
.
href
=
process
.
env
.
VUE_APP_API_portal_URL
;
},
2000
);
},
2000
);
}
}
...
...
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