Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
smart-web-tabs
Project
Project
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
SVI
svi-templates
smart-web-tabs
Commits
2c78b6c0
You need to sign in or sign up before continuing.
Commit
2c78b6c0
authored
Apr 01, 2020
by
陈珠河
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feat: 添加公告功能并调整登陆授权
parent
182365ea
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
28 deletions
+31
-28
config.js
template/config/config.js
+5
-11
package.json
template/package.json
+2
-2
config.js
template/src/api/config.js
+5
-11
businessConfig.js
template/src/plugins/routes/businessConfig.js
+1
-0
announce.vue
template/src/views/businessConfig/announce.vue
+16
-0
workflowDesign.vue
template/src/views/systemSetup/workflowDesign.vue
+2
-4
No files found.
template/config/config.js
View file @
2c78b6c0
...
...
@@ -12,6 +12,7 @@ axios.defaults.retry = 1;
axios
.
defaults
.
retryDelay
=
1000
;
// 设置defaults.baseURL
axios
.
defaults
.
baseURL
=
_config
.
baseUrl
;
axios
.
defaults
.
headers
.
common
[
'auth-token'
]
=
window
.
localStorage
.
getItem
(
'south-samrtweb-token'
)
||
''
;
// 请求超时拦截,重新请求
axios
.
interceptors
.
response
.
use
(
function
(
response
)
{
...
...
@@ -24,17 +25,10 @@ axios.interceptors.response.use(function(response) {
message
:
'请求服务好像出错了,'
+
status
});
return
Promise
.
reject
(
response
);
}
/* else if (data.status === 2) {
Message({
type: 'error',
message: '请求服务后台处理出现了错误'
});
} else if (data.status === 1) {
Message({
type: 'warning',
message: '请求服务处理出现了异常,' + data.message
});
} */
}
else
if
(
response
.
data
.
data
&&
response
.
data
.
data
.
hasOwnProperty
(
'token'
))
{
window
.
localStorage
.
setItem
(
'south-samrtweb-token'
,
response
.
data
.
data
.
token
);
axios
.
defaults
.
headers
.
common
[
'auth-token'
]
=
window
.
localStorage
.
getItem
(
'south-samrtweb-token'
)
||
''
;
}
return
Promise
.
resolve
(
response
);
},
function
axiosRetryInterceptor
(
err
)
{
...
...
template/package.json
View file @
2c78b6c0
...
...
@@ -12,8 +12,8 @@
},
"dependencies"
:
{
"core-js"
:
"^2.6.5"
,
"smart-charts"
:
"^1.0.0
-alpha
"
,
"smart-web"
:
"^2.
2.3
"
,
"smart-charts"
:
"^1.0.0"
,
"smart-web"
:
"^2.
3.0
"
,
"vue"
:
"^2.6.10"
,
"vue-progressbar"
:
"^0.7.5"
,
"vue-router"
:
"^3.1.3"
,
...
...
template/src/api/config.js
View file @
2c78b6c0
...
...
@@ -12,6 +12,7 @@ axios.defaults.retry = 1;
axios
.
defaults
.
retryDelay
=
1000
;
// 设置defaults.baseURL
axios
.
defaults
.
baseURL
=
_config
.
baseUrl
;
axios
.
defaults
.
headers
.
common
[
'auth-token'
]
=
window
.
localStorage
.
getItem
(
'south-samrtweb-token'
)
||
''
;
// 请求超时拦截,重新请求
axios
.
interceptors
.
response
.
use
(
function
(
response
)
{
...
...
@@ -24,17 +25,10 @@ axios.interceptors.response.use(function(response) {
message
:
'请求服务好像出错了,'
+
status
});
return
Promise
.
reject
(
response
);
}
/* else if (data.status === 2) {
Message({
type: 'error',
message: '请求服务后台处理出现了错误'
});
} else if (data.status === 1) {
Message({
type: 'warning',
message: '请求服务处理出现了异常,' + data.message
});
} */
}
else
if
(
response
.
data
.
data
&&
response
.
data
.
data
.
hasOwnProperty
(
'token'
))
{
window
.
localStorage
.
setItem
(
'south-samrtweb-token'
,
response
.
data
.
data
.
token
);
axios
.
defaults
.
headers
.
common
[
'auth-token'
]
=
window
.
localStorage
.
getItem
(
'south-samrtweb-token'
)
||
''
;
}
return
Promise
.
resolve
(
response
);
},
function
axiosRetryInterceptor
(
err
)
{
...
...
template/src/plugins/routes/businessConfig.js
View file @
2c78b6c0
import
{
cb
}
from
'../extend'
;
export
default
{
announce
:
()
=>
import
(
'@/views/businessConfig/announce'
).
then
(
cb
),
businessConfiguration
:
()
=>
import
(
'@/views/businessConfig/businessConfiguration'
).
then
(
cb
)
};
template/src/views/businessConfig/announce.vue
0 → 100644
View file @
2c78b6c0
<
template
>
<sw-announce></sw-announce>
</
template
>
<
script
>
import
SwAnnounce
from
'smart-web/packages/announce'
;
import
'smart-web/packages/styles/src/announce.scss'
;
export
default
{
name
:
'announce'
,
components
:
{
SwAnnounce
}
};
</
script
>
template/src/views/systemSetup/workflowDesign.vue
View file @
2c78b6c0
...
...
@@ -29,7 +29,7 @@ export default {
name
:
'新建流程'
,
componentName
:
'appIframe'
};
const
url
=
baseUrl
+
'/modeler.html?modelId='
+
modelId
;
const
url
=
baseUrl
+
'/modeler.html?modelId='
+
modelId
+
'&token='
+
window
.
localStorage
.
getItem
(
'south-samrtweb-token'
)
;
openTab
(
data
,
{
url
:
url
});
},
...
...
@@ -39,9 +39,7 @@ export default {
name
:
'编辑流程'
,
componentName
:
'editProcess'
};
const
url
=
baseUrl
+
'/modeler.html?modelId='
+
modelId
;
// let url = process.env.NODE_ENV === 'development' ? serviceUrl + '/smartweb2' : '.'
// url += '/workflow-designer/index.html?modelId=' + this.currentNode.id
const
url
=
baseUrl
+
'/modeler.html?modelId='
+
modelId
+
'&token='
+
window
.
localStorage
.
getItem
(
'south-samrtweb-token'
);
openTab
(
data
,
{
url
:
url
,
reload
:
true
});
},
}
...
...
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