gy-webcode2 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/breadcrumb.vue +16 -9
- package/components/themeConfig.vue +189 -142
- package/css/common.scss +13 -13
- package/css/layout.scss +132 -65
- package/css/login.scss +6 -6
- package/css/modules/common.scss +5 -5
- package/css/modules/header.scss +24 -13
- package/css/modules/sidebar.scss +103 -27
- package/css/modules/table.scss +30 -28
- package/css/modules/tabs.scss +63 -8
- package/css/theme/colors/cheng.scss +3 -2
- package/css/theme/colors/default.scss +7 -5
- package/css/theme/colors/hong.scss +4 -3
- package/css/theme/colors/huang.scss +2 -1
- package/css/theme/colors/lv.scss +2 -1
- package/css/theme/colors/qing.scss +2 -1
- package/css/theme/colors/shenaln.scss +4 -3
- package/css/theme/colors/zi.scss +2 -1
- package/css/theme/global.scss +13 -1
- package/css/theme/styles/default.scss +8 -4
- package/css/theme/styles/hailan.scss +5 -2
- package/css/theme/styles/shenlan.scss +8 -3
- package/css/theme/theme.scss +23 -17
- package/framework/App.vue +30 -0
- package/framework/index.vue +49 -0
- package/framework/login.vue +227 -0
- package/framework/main.vue +362 -0
- package/framework/refresh.vue +18 -0
- package/index.js +10 -1
- package/package.json +1 -1
|
@@ -6,6 +6,9 @@ $theme_hailan : (
|
|
|
6
6
|
sidebar_bgColor:#ffffff,
|
|
7
7
|
// 字体颜色
|
|
8
8
|
sidebar_color:#262626,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
//高亮背景色
|
|
10
|
+
sidebar_children_activeBgColor:#fff,
|
|
11
|
+
sidebar_children_activeColor:#1890ff,
|
|
12
|
+
wrapper_bgColor:#003a8c,
|
|
13
|
+
wrapper_bgColor2:#F1F6FC,
|
|
11
14
|
);
|
|
@@ -5,7 +5,12 @@ $theme_shenlan : (
|
|
|
5
5
|
// 背景
|
|
6
6
|
sidebar_bgColor:#ffffff,
|
|
7
7
|
// 字体颜色
|
|
8
|
-
sidebar_color:#
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
sidebar_color:#fff,
|
|
9
|
+
|
|
10
|
+
//高亮背景色
|
|
11
|
+
sidebar_children_activeBgColor:#233867,
|
|
12
|
+
sidebar_children_activeColor:#1890ff,
|
|
13
|
+
|
|
14
|
+
wrapper_bgColor:#0A1225,
|
|
15
|
+
wrapper_bgColor2:#192540,
|
|
11
16
|
);
|
package/css/theme/theme.scss
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
3
|
-
@import "
|
|
4
|
-
@import "
|
|
1
|
+
@import "global";
|
|
2
|
+
@import "styles/default";
|
|
3
|
+
@import "styles/shenlan";
|
|
4
|
+
@import "styles/hailan";
|
|
5
5
|
|
|
6
|
-
@import "
|
|
7
|
-
@import "
|
|
8
|
-
@import "
|
|
9
|
-
@import "
|
|
10
|
-
@import "
|
|
11
|
-
@import "
|
|
12
|
-
@import "
|
|
13
|
-
@import "
|
|
6
|
+
@import "colors/default";
|
|
7
|
+
@import "colors/hong";
|
|
8
|
+
@import "colors/cheng";
|
|
9
|
+
@import "colors/huang";
|
|
10
|
+
@import "colors/qing";
|
|
11
|
+
@import "colors/lv";
|
|
12
|
+
@import "colors/shenaln";
|
|
13
|
+
@import "colors/zi";
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -35,7 +35,7 @@ $themeColors:(
|
|
|
35
35
|
@each $theme-name, $theme-map in $themes {
|
|
36
36
|
//!global 把局部变量强升为全局变量
|
|
37
37
|
$theme-map: $theme-map !global;
|
|
38
|
-
[data-theme="#{$theme-name}"] & {
|
|
38
|
+
[data-theme="#{$theme-name}"] & {
|
|
39
39
|
@content;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -46,7 +46,7 @@ $themeColors:(
|
|
|
46
46
|
@each $theme-name, $theme-map in $themeColors {
|
|
47
47
|
//!global 把局部变量强升为全局变量
|
|
48
48
|
$theme-map: $theme-map !global;
|
|
49
|
-
[data-theme-color="#{$theme-name}"] & {
|
|
49
|
+
[data-theme-color="#{$theme-name}"] & {
|
|
50
50
|
@content;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -58,10 +58,16 @@ $themeColors:(
|
|
|
58
58
|
@return map-get($theme-map, $key);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
@mixin theme($key, $colorName: $key) {
|
|
61
|
+
@mixin theme($key, $colorName: $key,$opacity:null) {
|
|
62
62
|
@include themeMixin {
|
|
63
63
|
// #{$key}: #{$key};
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
@if($opacity == null){
|
|
66
|
+
#{$key}: themed($colorName);
|
|
67
|
+
}
|
|
68
|
+
@else {
|
|
69
|
+
#{$key}: rgba(themed($colorName),$opacity);
|
|
70
|
+
}
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
|
|
@@ -75,4 +81,4 @@ $themeColors:(
|
|
|
75
81
|
#{$key}: rgba(themed($colorName),$opacity);
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
|
-
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div >
|
|
3
|
+
<router-view/>
|
|
4
|
+
<div class="canvas_syBox " :style="`background-image:url(${vuex_watermarkImg})`" ref="canvasBox">
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
components: {
|
|
15
|
+
// dashboards
|
|
16
|
+
},
|
|
17
|
+
created(){
|
|
18
|
+
},
|
|
19
|
+
computed:{
|
|
20
|
+
data() {
|
|
21
|
+
return this.$store.state.menu.data;
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
watch:{
|
|
25
|
+
},
|
|
26
|
+
methods:{
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
</div>
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
data() {
|
|
10
|
+
return {}
|
|
11
|
+
},
|
|
12
|
+
computed: {
|
|
13
|
+
menuListAll() {
|
|
14
|
+
return this.$store.state.menu.data;
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
watch: {
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
created() {
|
|
21
|
+
let redirect = this.$route.query.redirect;
|
|
22
|
+
if(redirect && redirect != '/' && redirect != '/login'){
|
|
23
|
+
|
|
24
|
+
let myPath = this.$router.resolve(redirect);
|
|
25
|
+
this.$router.replace(myPath).catch(()=>{})
|
|
26
|
+
|
|
27
|
+
// let query = {...this.$route.query}
|
|
28
|
+
// delete query.redirect;
|
|
29
|
+
// this.$router.replace({
|
|
30
|
+
// path: redirect,
|
|
31
|
+
// query:query
|
|
32
|
+
// }).catch(()=>{})
|
|
33
|
+
}
|
|
34
|
+
else if(this.menuListAll.length > 0){
|
|
35
|
+
this.$router.replace({
|
|
36
|
+
path:this.menuListAll[0].list[0].list[0].list[0].path
|
|
37
|
+
}).catch(err => ()=>{})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
},
|
|
41
|
+
mounted() {
|
|
42
|
+
},
|
|
43
|
+
components: {
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
</style>
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="showHtml">
|
|
3
|
+
<div class="loginBody" ref="loginBody">
|
|
4
|
+
<canvas ref="Mycanvas" border='0'></canvas>
|
|
5
|
+
<div class="loginBox">
|
|
6
|
+
<div class="logo" :style="`background-image:url(${logoURL})`"></div>
|
|
7
|
+
<div class="projectName">
|
|
8
|
+
{{projectName}}
|
|
9
|
+
</div>
|
|
10
|
+
<div class="nrBox">
|
|
11
|
+
<div v-show="loginOption == 2">
|
|
12
|
+
<div class="login_inputBox">
|
|
13
|
+
<input autocomplete="text" @keyup="username_error=false" @keyup.13="login()"
|
|
14
|
+
v-model="username" id="username" placeholder="请输入用户名" type="text"/>
|
|
15
|
+
<div class="inputInfo">
|
|
16
|
+
<div class="error" v-show="username_error" id="username_error">{{errorText}}
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="login_inputBox">
|
|
21
|
+
<input autocomplete="password" @keyup.13="login()" @keyup="user_pwd_error=false" v-model="user_pwd" id="user_pwd" placeholder="请输入密码" type="password"/>
|
|
22
|
+
<div class="inputInfo">
|
|
23
|
+
<div class="error fl" v-show="user_pwd_error" id="user_pwd_error">{{errorText}}
|
|
24
|
+
</div>
|
|
25
|
+
<div class="fr">
|
|
26
|
+
<!-- <a href="#" class="wjmm">忘记密码?</a> -->
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<el-button type="primary" class="login_btn" @click="login()">登录</el-button>
|
|
31
|
+
<!-- <input type="button" class="login_btn cp" value="登录"> -->
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<!-- <div class="tr loginOption">
|
|
35
|
+
<i v-show="loginOption!=1" @click="loginOption = 1" class="common_iconfont common_icon-saoma"></i>
|
|
36
|
+
<i v-show="loginOption!= 2" @click="loginOption = 2" class="common_iconfont common_icon-yonghu"></i>
|
|
37
|
+
<i v-show="loginOption!=3" @click="loginOption = 3" class="common_iconfont common_icon-phone"></i>
|
|
38
|
+
</div> -->
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import md5 from '@/assets/scripts/md5'
|
|
46
|
+
import crypto from "gy-webcode2/scripts/crypto"
|
|
47
|
+
import canvasBg from '@/assets/scripts/canvasBg'
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
showHtml: true,
|
|
53
|
+
username: "",
|
|
54
|
+
user_pwd: "",
|
|
55
|
+
username_error: false,
|
|
56
|
+
user_pwd_error: false,
|
|
57
|
+
errorText: "",
|
|
58
|
+
slogan: "",
|
|
59
|
+
yyname: defaultConfig.yyName ? defaultConfig.yyName : '',
|
|
60
|
+
logoURL: defaultConfig.logoURL ? defaultConfig.logoURL : '/static/img/yh_logo_white.png',
|
|
61
|
+
projectName: defaultConfig.ProjectName ? defaultConfig.ProjectName : "医院数据治理平台",
|
|
62
|
+
loginOption: 2,
|
|
63
|
+
phone: "",
|
|
64
|
+
yzm: ""
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
created() {
|
|
68
|
+
if (defaultConfig.loginLogoURL) {
|
|
69
|
+
this.logoURL = defaultConfig.loginLogoURL
|
|
70
|
+
} else if (defaultConfig.logoURL) {
|
|
71
|
+
this.logoURL = defaultConfig.logoURL;
|
|
72
|
+
} else {
|
|
73
|
+
this.logoURL = '/static/img/yh_logo_white.png';
|
|
74
|
+
}
|
|
75
|
+
if (singin) { //开启单点登录1
|
|
76
|
+
var utype = this.getUrlKey("utype");
|
|
77
|
+
var userid = this.getUrlKey("userid");
|
|
78
|
+
|
|
79
|
+
var token2 = this.getUrlKey("token");
|
|
80
|
+
var appId = this.getUrlKey("appId");
|
|
81
|
+
|
|
82
|
+
if ((this.singinCompany != "") && token2 && appId) {
|
|
83
|
+
this.showHtml = false;
|
|
84
|
+
this.$http.get(interfaceUrl + "/login/getThirdUser", {
|
|
85
|
+
params: {token: token2, appId: appId, url: singinUrl}
|
|
86
|
+
}).then((data) => {
|
|
87
|
+
if (data.status == 200) {
|
|
88
|
+
this.mmlogin(data.data);
|
|
89
|
+
} else {
|
|
90
|
+
this.showHtml = true;
|
|
91
|
+
this.$message.error("登录失败,请输入用户名密码登录!");
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
} else if (utype == 1) {//允许单点免密码登录,密码默认123
|
|
95
|
+
this.showHtml = false;
|
|
96
|
+
if (userid == null) {
|
|
97
|
+
this.$message.error("用户名不能为空!");
|
|
98
|
+
this.showHtml = true;
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
this.mmlogin(userid);
|
|
102
|
+
} else {
|
|
103
|
+
this.showHtml = true;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
mounted() {
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
login() {
|
|
111
|
+
var username = $.trim(this.username);
|
|
112
|
+
var user_pwd = this.user_pwd;
|
|
113
|
+
if (!username || !user_pwd) {
|
|
114
|
+
|
|
115
|
+
if (!username) {
|
|
116
|
+
this.username_error = true;
|
|
117
|
+
this.errorText = "请输入用户名";
|
|
118
|
+
// $("#username_error").show();
|
|
119
|
+
// $("#username_error").html("请输入用户名");
|
|
120
|
+
}
|
|
121
|
+
if (!user_pwd) {
|
|
122
|
+
this.user_pwd_error = true;
|
|
123
|
+
this.errorText = "请输入密码";
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
var postJSON = {
|
|
129
|
+
userid: username,
|
|
130
|
+
password: md5(user_pwd)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
var vueThis = this;
|
|
135
|
+
var json = new URLSearchParams();
|
|
136
|
+
json.append("userid", username);
|
|
137
|
+
json.append("password", md5(user_pwd));
|
|
138
|
+
|
|
139
|
+
this.$http.post(interfaceUrl + "/login/exitLogin",
|
|
140
|
+
{
|
|
141
|
+
data: crypto.encrypt(JSON.stringify(postJSON))
|
|
142
|
+
}
|
|
143
|
+
).then((json) => {
|
|
144
|
+
// console.log(JSON.parse(crypto.decrypt(json.data)));
|
|
145
|
+
json = JSON.parse(crypto.decrypt(json.data))
|
|
146
|
+
|
|
147
|
+
var logJson = {operationtype: 5, pagecode: "login", pagename: "登录页面"};
|
|
148
|
+
if (json.status == 200) {
|
|
149
|
+
Cookies.set('gy_login', JSON.stringify(json.data));
|
|
150
|
+
userInfo = json.data;
|
|
151
|
+
|
|
152
|
+
logJson.status = json.status;
|
|
153
|
+
let redirect = this.$route.query.redirect;
|
|
154
|
+
if (redirect) {
|
|
155
|
+
this.$router.push({
|
|
156
|
+
path: redirect
|
|
157
|
+
})
|
|
158
|
+
} else {
|
|
159
|
+
this.$router.push({
|
|
160
|
+
path: '/'
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
} else {
|
|
165
|
+
logJson.status = json.status;
|
|
166
|
+
logJson.errormsg = json.message;
|
|
167
|
+
vueThis.username_error = true;
|
|
168
|
+
vueThis.errorText = json.message;
|
|
169
|
+
}
|
|
170
|
+
golLog.setMenuLog(logJson, vueThis, userInfo);
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
mmlogin(userid) {
|
|
174
|
+
var vueThis = this;
|
|
175
|
+
var postJSON = {
|
|
176
|
+
userid: userid
|
|
177
|
+
}
|
|
178
|
+
this.$http.post(interfaceUrl + "/login/ssoLogin",
|
|
179
|
+
postJSON
|
|
180
|
+
).then((json) => {
|
|
181
|
+
// console.log(JSON.parse(crypto.decrypt(json.data)));
|
|
182
|
+
// json = JSON.parse(crypto.decrypt(json.data))
|
|
183
|
+
if (json.data == null) {
|
|
184
|
+
this.$message.error("该用户不存在!");
|
|
185
|
+
this.showHtml = true;
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
var logJson = {operationtype: 5, pagecode: "login", pagename: "登录页面"};
|
|
189
|
+
if (json.status == 200) {
|
|
190
|
+
Cookies.set('gy_login', JSON.stringify(json.data));
|
|
191
|
+
userInfo = json.data;
|
|
192
|
+
|
|
193
|
+
logJson.status = json.status;
|
|
194
|
+
let redirect = this.$route.query.redirect;
|
|
195
|
+
if (redirect) {
|
|
196
|
+
this.$router.push({
|
|
197
|
+
path: redirect
|
|
198
|
+
})
|
|
199
|
+
} else {
|
|
200
|
+
this.$router.push({
|
|
201
|
+
path: '/'
|
|
202
|
+
})
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
} else {
|
|
206
|
+
logJson.status = json.status;
|
|
207
|
+
logJson.errormsg = json.message;
|
|
208
|
+
vueThis.username_error = true;
|
|
209
|
+
vueThis.errorText = json.message;
|
|
210
|
+
}
|
|
211
|
+
golLog.setMenuLog(logJson, vueThis, userInfo);
|
|
212
|
+
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
},
|
|
216
|
+
getUrlKey: function (name) {
|
|
217
|
+
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null;
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
}
|
|
223
|
+
</script>
|
|
224
|
+
<style lang="scss" src="gy-webcode2/css/login.scss" scoped></style>
|
|
225
|
+
<style lang="scss" scoped>
|
|
226
|
+
|
|
227
|
+
</style>
|