Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwell-mes
Project
Project
Details
Activity
Releases
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
gavelinfo
kwell-mes
Commits
47b0a72b
Commit
47b0a72b
authored
Apr 06, 2022
by
yff
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes
parents
60db7963
0ad867b8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1533 additions
and
147 deletions
+1533
-147
FilterConfig.java
gavel/src/main/java/com/gavel/kwell/config/FilterConfig.java
+26
-26
ShiroConfig.java
gavel/src/main/java/com/gavel/kwell/config/ShiroConfig.java
+202
-102
gzfk.css
gavel/src/main/resources/static/css/gzfk.css
+313
-0
api.js
gavel/src/main/resources/static/js/dashboard/api.js
+1
-1
first.html
.../main/resources/templates/views/kmes/dashboard/first.html
+27
-18
gx.html
gavel/src/main/resources/templates/views/kmes/gzfk/gx.html
+67
-0
gzindex.html
...src/main/resources/templates/views/kmes/gzfk/gzindex.html
+239
-0
index.html
...l/src/main/resources/templates/views/kmes/gzfk/index.html
+658
-0
No files found.
gavel/src/main/java/com/gavel/kwell/config/FilterConfig.java
View file @
47b0a72b
package
com
.
gavel
.
kwell
.
config
;
import
java.util.Arrays
;
import
com.gavel.framework.filter.RequestWrapperFilter
;
import
com.gavel.framework.filter.ThreadContextFilter
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.filter.CharacterEncodingFilter
;
import
com.gavel.framework.filter.AuthenticationFilter
;
import
com.gavel.framework.filter.RequestWrapperFilter
;
import
com.gavel.framework.filter.ThreadContextFilter
;
import
java.util.Arrays
;
@Configuration
public
class
FilterConfig
{
@Bean
public
CharacterEncodingFilter
characterEncodingFilter
()
{
CharacterEncodingFilter
filter
=
new
CharacterEncodingFilter
();
filter
.
setEncoding
(
"UTF-8"
);
filter
.
setForceEncoding
(
true
);
return
filter
;
}
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
@Bean
public
FilterRegistrationBean
authenticationFilter
()
{
// 用户认证
AuthenticationFilter
authenticationFilter
=
new
AuthenticationFilter
();
FilterRegistrationBean
registrationBean
=
new
FilterRegistrationBean
();
registrationBean
.
setName
(
"authenticationFilter"
);
// 过滤器名称
registrationBean
.
setFilter
(
authenticationFilter
);
// 注入过滤器
registrationBean
.
setOrder
(
10
);
registrationBean
.
addInitParameter
(
"prefix"
,
"/css,/js,/images,/lib,/fonts,/mock"
);
registrationBean
.
setUrlPatterns
(
Arrays
.
asList
(
"/*"
));
//拦截规则
return
registrationBean
;
@Bean
public
CharacterEncodingFilter
characterEncodingFilter
()
{
CharacterEncodingFilter
filter
=
new
CharacterEncodingFilter
();
filter
.
setEncoding
(
"UTF-8"
);
filter
.
setForceEncoding
(
true
);
return
filter
;
}
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
@Bean
// @Bean
// public FilterRegistrationBean authenticationFilter() {
// // 用户认证
// AuthenticationFilter authenticationFilter = new AuthenticationFilter();
// FilterRegistrationBean registrationBean = new FilterRegistrationBean();
// registrationBean.setName("authenticationFilter"); // 过滤器名称
// registrationBean.setFilter(authenticationFilter); // 注入过滤器
// registrationBean.setOrder(10);
// registrationBean.addInitParameter("prefix", "/css,/js,/images,/lib,/fonts,/mock");
// registrationBean.setUrlPatterns(Arrays.asList("/*")); //拦截规则
// return registrationBean;
// }
@Bean
public
FilterRegistrationBean
requestWrapperFilter
()
{
RequestWrapperFilter
requestWrapperFilter
=
new
RequestWrapperFilter
();
FilterRegistrationBean
registrationBean
=
new
FilterRegistrationBean
();
...
...
gavel/src/main/java/com/gavel/kwell/config/ShiroConfig.java
View file @
47b0a72b
package
com
.
gavel
.
kwell
.
config
;
import
com.gavel.common.Constants
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.framework.filter.GavelCommonLogoutFilter
;
import
com.gavel.framework.filter.ShiroAuthFilter
;
import
com.gavel.kzzx.auth.cas.GavelAuthenticationFilter
;
import
com.gavel.kzzx.auth.cas.GavelCasFilter
;
import
com.gavel.kzzx.auth.cas.GavelCasRealm
;
import
com.gavel.kzzx.auth.cas.GavelLogoutFilter
;
import
com.gavel.kzzx.auth.shiro.*
;
import
org.apache.shiro.cache.CacheManager
;
import
org.apache.shiro.cache.MemoryConstrainedCacheManager
;
import
org.apache.shiro.cas.CasSubjectFactory
;
import
org.apache.shiro.mgt.SecurityManager
;
import
org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator
;
import
org.apache.shiro.session.mgt.eis.SessionIdGenerator
;
import
org.apache.shiro.spring.web.ShiroFilterFactoryBean
;
import
org.apache.shiro.web.mgt.DefaultWebSecurityManager
;
import
org.apache.shiro.web.session.mgt.DefaultWebSessionManager
;
import
org.crazycake.shiro.RedisCacheManager
;
import
org.crazycake.shiro.RedisManager
;
import
org.crazycake.shiro.RedisSessionDAO
;
import
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.web.filter.DelegatingFilterProxy
;
import
javax.servlet.Filter
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.kzzx.auth.shiro.GavelAuthResource
;
import
com.gavel.kzzx.auth.shiro.GavelAuthorizationAttributeSourceAdvisor
;
import
com.gavel.kzzx.auth.shiro.GavelAuthorizingRealm
;
import
com.gavel.kzzx.auth.shiro.GavelHashedCredentialsMatcher
;
@Configuration
@PropertySource
(
value
=
{
"classpath:config.properties"
})
public
class
ShiroConfig
{
@Value
(
"${shiro.cache:}"
)
private
String
cacheType
;
@Autowired
private
RedisConfig
redisConfig
;
@Bean
public
ShiroFilterFactoryBean
shirFilter
(
SecurityManager
securityManager
)
{
ShiroFilterFactoryBean
shiroFilterFactoryBean
=
new
ShiroFilterFactoryBean
();
// 必须设置 SecurityManager
shiroFilterFactoryBean
.
setSecurityManager
(
securityManager
);
// 设置login URL
shiroFilterFactoryBean
.
setLoginUrl
(
"/login_view"
);
// 登录成功后要跳转的链接
shiroFilterFactoryBean
.
setSuccessUrl
(
"/index"
);
shiroFilterFactoryBean
.
setFilterChainDefinitionMap
(
GavelAuthResource
.
init
());
return
shiroFilterFactoryBean
;
}
/*
* 凭证匹配器 (由于我们的密码校验交给Shiro的SimpleAuthenticationInfo进行处理了
* 所以我们需要修改下doGetAuthenticationInfo中的代码; )
*/
@Bean
public
GavelHashedCredentialsMatcher
hashedCredentialsMatcher
()
{
GavelHashedCredentialsMatcher
hashedCredentialsMatcher
=
new
GavelHashedCredentialsMatcher
();
hashedCredentialsMatcher
.
setHashAlgorithmName
(
"md5"
);
// 散列算法:这里使用MD5算法;
hashedCredentialsMatcher
.
setHashIterations
(
1
);
// 散列的次数,比如散列两次,相当于md5(md5(""));
return
hashedCredentialsMatcher
;
}
@Bean
public
GavelAuthorizingRealm
shiroRealm
()
{
GavelAuthorizingRealm
shiroRealm
=
new
GavelAuthorizingRealm
();
shiroRealm
.
setCredentialsMatcher
(
hashedCredentialsMatcher
());
return
shiroRealm
;
}
@Bean
public
SecurityManager
securityManager
()
{
DefaultWebSecurityManager
securityManager
=
new
DefaultWebSecurityManager
();
// 注入自定义的realm;
securityManager
.
setRealm
(
shiroRealm
());
// 注入缓存管理器;
if
(
StringUtils
.
equals
(
cacheType
,
"redis"
))
securityManager
.
setCacheManager
(
redisCacheManager
());
else
securityManager
.
setCacheManager
(
cacheManager
());
return
securityManager
;
}
/*
* 开启shiro aop注解支持 使用代理方式;所以需要开启代码支持;
*/
@Bean
public
GavelAuthorizationAttributeSourceAdvisor
authorizationAttributeSourceAdvisor
(
SecurityManager
securityManager
)
{
GavelAuthorizationAttributeSourceAdvisor
authorizationAttributeSourceAdvisor
=
new
GavelAuthorizationAttributeSourceAdvisor
();
authorizationAttributeSourceAdvisor
.
setSecurityManager
(
securityManager
);
return
authorizationAttributeSourceAdvisor
;
}
/**
* DefaultAdvisorAutoProxyCreator,Spring的一个bean,由Advisor决定对哪些类的方法进行AOP代理。
*/
@Bean
public
DefaultAdvisorAutoProxyCreator
defaultAdvisorAutoProxyCreator
()
{
DefaultAdvisorAutoProxyCreator
defaultAAP
=
new
DefaultAdvisorAutoProxyCreator
();
defaultAAP
.
setProxyTargetClass
(
true
);
return
defaultAAP
;
}
/*
* shiro缓存管理器;
* 需要注入对应的其它的实体类中-->安全管理器:securityManager可见securityManager是整个shiro的核心;
*/
@Bean
public
CacheManager
cacheManager
()
{
return
new
MemoryConstrainedCacheManager
();
}
/**
private
static
final
String
CAS_FILTER_URL
=
"/shiro-cas"
;
@Value
(
"${sso.enable:false}"
)
private
boolean
ssoEnable
;
@Value
(
"${sso.server:}"
)
private
String
casServerUrl
;
@Value
(
"${shiro.cache:}"
)
private
String
cacheType
;
@Autowired
private
RedisConfig
redisConfig
;
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
@Bean
public
FilterRegistrationBean
filterRegistrationBean
()
{
FilterRegistrationBean
filterRegistration
=
new
FilterRegistrationBean
();
filterRegistration
.
setFilter
(
new
DelegatingFilterProxy
(
"shiroFilter"
));
filterRegistration
.
addInitParameter
(
"targetFilterLifecycle"
,
"true"
);
filterRegistration
.
setEnabled
(
true
);
filterRegistration
.
setOrder
(
1
);
filterRegistration
.
addUrlPatterns
(
"/*"
);
return
filterRegistration
;
}
@Bean
(
name
=
"shiroFilter"
)
public
ShiroFilterFactoryBean
shirFilter
(
SecurityManager
securityManager
)
{
ShiroFilterFactoryBean
shiroFilterFactoryBean
=
new
ShiroFilterFactoryBean
();
// 必须设置 SecurityManager
shiroFilterFactoryBean
.
setSecurityManager
(
securityManager
);
// 登录成功后要跳转的链接
shiroFilterFactoryBean
.
setSuccessUrl
(
"/index"
);
if
(
ssoEnable
)
{
Map
<
String
,
Filter
>
filters
=
new
LinkedHashMap
<>();
shiroFilterFactoryBean
.
setFilters
(
filters
);
filters
.
put
(
"casFilter"
,
new
GavelCasFilter
(
casServerUrl
));
filters
.
put
(
"logout"
,
new
GavelLogoutFilter
(
casServerUrl
,
ssoEnable
));
filters
.
put
(
"authFilter"
,
new
GavelAuthenticationFilter
(
casServerUrl
,
ssoEnable
));
Map
<
String
,
String
>
filterChainDefinitionMap
=
new
LinkedHashMap
<>();
filterChainDefinitionMap
.
put
(
CAS_FILTER_URL
,
"casFilter"
);
filterChainDefinitionMap
.
put
(
"/logout"
,
"logout"
);
filterChainDefinitionMap
.
put
(
"/file/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/api/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/video.html"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/static/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/api/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/css/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/js/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/images/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/lib/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/fonts/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/mock/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/**"
,
"authFilter"
);
shiroFilterFactoryBean
.
setFilterChainDefinitionMap
(
filterChainDefinitionMap
);
}
else
{
// 设置login URL
shiroFilterFactoryBean
.
setLoginUrl
(
"/login_view"
);
shiroFilterFactoryBean
.
setUnauthorizedUrl
(
"/403"
);
shiroFilterFactoryBean
.
setSuccessUrl
(
"/index"
);
Map
<
String
,
Filter
>
filters
=
new
LinkedHashMap
<>();
filters
.
put
(
"permFilter"
,
new
ShiroAuthFilter
());
filters
.
put
(
"logout"
,
new
GavelCommonLogoutFilter
());
shiroFilterFactoryBean
.
setFilters
(
filters
);
Map
<
String
,
String
>
filterChainDefinitionMap
=
GavelAuthResource
.
init
();
filterChainDefinitionMap
.
put
(
"/logout"
,
"logout"
);
filterChainDefinitionMap
.
put
(
"/**"
,
"permFilter"
);
shiroFilterFactoryBean
.
setFilterChainDefinitionMap
(
filterChainDefinitionMap
);
}
return
shiroFilterFactoryBean
;
}
/*
* 凭证匹配器 (由于我们的密码校验交给Shiro的SimpleAuthenticationInfo进行处理了
* 所以我们需要修改下doGetAuthenticationInfo中的代码; )
*/
@Bean
public
GavelHashedCredentialsMatcher
hashedCredentialsMatcher
()
{
GavelHashedCredentialsMatcher
hashedCredentialsMatcher
=
new
GavelHashedCredentialsMatcher
();
hashedCredentialsMatcher
.
setHashAlgorithmName
(
"md5"
);
// 散列算法:这里使用MD5算法;
hashedCredentialsMatcher
.
setHashIterations
(
1
);
// 散列的次数,比如散列两次,相当于md5(md5(""));
return
hashedCredentialsMatcher
;
}
@Bean
(
name
=
"shiroRealm"
)
public
GavelAuthorizingRealm
shiroRealm
()
{
GavelAuthorizingRealm
shiroRealm
=
new
GavelAuthorizingRealm
();
shiroRealm
.
setCredentialsMatcher
(
hashedCredentialsMatcher
());
return
shiroRealm
;
}
@Bean
(
name
=
"casRealm"
)
public
GavelCasRealm
casRealm
()
{
GavelCasRealm
casRealm
=
new
GavelCasRealm
();
// 认证通过后的默认角色
casRealm
.
setDefaultRoles
(
"ROLE_USER"
);
// cas 服务端地址前缀
casRealm
.
setCasServerUrlPrefix
(
casServerUrl
);
// 应用服务地址,用来接收cas服务端票证
// casRealm.setCasService(appServerUrl + CAS_FILTER_URL);
return
casRealm
;
}
@Bean
(
"securityManager"
)
public
SecurityManager
securityManager
(
GavelCasRealm
casRealm
)
{
DefaultWebSecurityManager
securityManager
=
new
DefaultWebSecurityManager
();
// 注入自定义的realm;
if
(
ssoEnable
)
{
// 设置授权策略,此步骤必须在设置realm的前面,不然会报错realm未配置
//securityManager.setAuthenticator(authenticator);
securityManager
.
setSubjectFactory
(
new
CasSubjectFactory
());
// 设置自定义验证策略
securityManager
.
setRealm
(
casRealm
);
}
else
{
securityManager
.
setRealm
(
shiroRealm
());
}
// 注入缓存管理器;
if
(
StringUtils
.
equals
(
cacheType
,
"redis"
))
securityManager
.
setCacheManager
(
redisCacheManager
());
else
securityManager
.
setCacheManager
(
cacheManager
());
securityManager
.
setSessionManager
(
sessionManager
());
return
securityManager
;
}
/*
* 开启shiro aop注解支持 使用代理方式;所以需要开启代码支持;
*/
@Bean
public
GavelAuthorizationAttributeSourceAdvisor
authorizationAttributeSourceAdvisor
(
@Qualifier
(
"securityManager"
)
SecurityManager
securityManager
)
{
GavelAuthorizationAttributeSourceAdvisor
authorizationAttributeSourceAdvisor
=
new
GavelAuthorizationAttributeSourceAdvisor
();
authorizationAttributeSourceAdvisor
.
setSecurityManager
(
securityManager
);
return
authorizationAttributeSourceAdvisor
;
}
/**
* DefaultAdvisorAutoProxyCreator,Spring的一个bean,由Advisor决定对哪些类的方法进行AOP代理。
*/
@Bean
public
DefaultAdvisorAutoProxyCreator
defaultAdvisorAutoProxyCreator
()
{
DefaultAdvisorAutoProxyCreator
defaultAAP
=
new
DefaultAdvisorAutoProxyCreator
();
defaultAAP
.
setProxyTargetClass
(
true
);
return
defaultAAP
;
}
/*
* shiro缓存管理器;
* 需要注入对应的其它的实体类中-->安全管理器:securityManager可见securityManager是整个shiro的核心;
*/
@Bean
(
"ShiroCacheManager"
)
public
CacheManager
cacheManager
()
{
return
new
MemoryConstrainedCacheManager
();
}
/**
* 配置会话ID生成器
* @return
*/
...
...
@@ -118,14 +214,14 @@ public class ShiroConfig {
public
SessionIdGenerator
sessionIdGenerator
()
{
return
new
JavaUuidSessionIdGenerator
();
}
/**
/**
* redisManager
*
* @return
*/
@Bean
@ConditionalOnProperty
(
value
=
"shiro.cache"
,
havingValue
=
"redis"
,
matchIfMissing
=
false
)
@Bean
(
"redisManager"
)
//
@ConditionalOnProperty(value="shiro.cache", havingValue="redis", matchIfMissing=false)
public
RedisManager
redisManager
()
{
RedisManager
redisManager
=
new
RedisManager
();
redisManager
.
setHost
(
redisConfig
.
getHost
()+
":"
+
redisConfig
.
getPort
());
...
...
@@ -133,7 +229,7 @@ public class ShiroConfig {
}
/**
* cacheManager
* cacheManager
*
* @return
*/
...
...
@@ -148,23 +244,27 @@ public class ShiroConfig {
/**
* redisSessionDAO
*/
@ConditionalOnProperty
(
value
=
"shiro.cache"
,
havingValue
=
"redis"
,
matchIfMissing
=
false
)
@Bean
//
@ConditionalOnProperty(value="shiro.cache", havingValue="redis", matchIfMissing=false)
@Bean
(
"redisSessionDAO"
)
public
RedisSessionDAO
redisSessionDAO
()
{
RedisSessionDAO
redisSessionDAO
=
new
RedisSessionDAO
();
redisSessionDAO
.
setRedisManager
(
redisManager
());
// redisSessionDAO.setSessionIdGenerator(new GavelSessionGenerator());
return
redisSessionDAO
;
}
/**
* sessionManager
*/
@ConditionalOnProperty
(
value
=
"shiro.cache"
,
havingValue
=
"redis"
,
matchIfMissing
=
false
)
@Bean
public
DefaultWebSessionManager
SessionManager
()
{
DefaultWebSessionManager
sessionManager
=
new
DefaultWebSessionManager
();
// @ConditionalOnProperty(value="shiro.cache", havingValue="redis", matchIfMissing=false)
@Bean
(
"sessionManager"
)
public
GavelSessionManager
sessionManager
()
{
// DefaultWebSessionManager sessionManager = new DefaultWebSessionManager();
GavelSessionManager
sessionManager
=
new
GavelSessionManager
();
sessionManager
.
setGlobalSessionTimeout
(
Constants
.
liveMills
);
sessionManager
.
setSessionDAO
(
redisSessionDAO
());
return
sessionManager
;
}
}
gavel/src/main/resources/static/css/gzfk.css
0 → 100644
View file @
47b0a72b
.n-item
{
background
:
rgb
(
57
,
52
,
86
);}
.null-item
{
background
:
#FFFFFF
;}
.ok-item
{
background
:
-webkit-gradient
(
linear
,
left
top
,
right
top
,
from
(
#42d79b
),
to
(
#a6e25f
));
background
:
linear-gradient
(
90deg
,
#42d79b
,
#a6e25f
);}
.nok-item
{
background
:
-webkit-gradient
(
linear
,
left
top
,
right
top
,
from
(
#ff0000
),
to
(
#ff007f
));
background
:
linear-gradient
(
90deg
,
#ff0000
,
#ff007f
);}
#gzfk01
div
{
font-size
:
14px
;
}
#gzfk01
li
{
font-size
:
14px
;
}
#gzfk02
div
{
font-size
:
14px
;
}
#gzfk02
li
{
font-size
:
14px
;
}
#gzfk03
div
{
font-size
:
14px
;
}
#gzfk03
li
{
font-size
:
14px
;
}
#gzfk01
{
height
:
100%
;
width
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
align-items
:
stretch
}
#gzfk01
div
{
box-sizing
:
border-box
;
}
#gzfk01
.toptitle
{
height
:
50px
;
width
:
100%
;
background-color
:
#00aaff
;
color
:
#FFFFFF
;
text-align
:
center
;
line-height
:
50px
;
}
#gzfk01
.left
{
height
:
calc
(
100%
-
60px
);
width
:
40%
;
}
#gzfk01
.right
{
height
:
calc
(
100%
-
60px
);
width
:
calc
(
60%
-
10px
);
border
:
#EEEEEE
1px
solid
;
}
#gzfk01
.rightPdf
{
height
:
100%
;
width
:
100%
;
}
#gzfk01
.cbinfor
{
width
:
100%
;
height
:
60%
;
}
#gzfk01
.tab
{
width
:
100%
;
height
:
40%
;
padding-top
:
10px
;
}
#gzfk01
.cpif
{
width
:
100%
;
height
:
40%
;
border
:
1px
solid
#EEEEEE
;
}
#gzfk01
.cprz
{
width
:
100%
;
height
:
60%
;
border
:
1px
solid
#EEEEEE
;
}
#gzfk01
.cpiftop
{
width
:
100%
;
height
:
40px
;
border-bottom
:
1px
solid
#EEEEEE
;
line-height
:
40px
;
display
:
flex
;
justify-content
:
center
;
}
#gzfk01
.cpifbot
{
height
:
calc
(
100%
-
40px
);
}
#gzfk01
.ery
{
width
:
50%
;
height
:
50%
;
display
:
flex
;
align-items
:
center
;
}
#gzfk01
.ery
span
{
padding-left
:
20px
;
display
:
inline-block
;
width
:
70px
;
}
#gzfk01
.tipul
>
li
{
width
:
150px
;
padding-left
:
20px
;
float
:
left
;
line-height
:
50px
;
}
#gzfk01
.tipuli2
{
float
:
right
!important
;
}
#gzfk01
.maintab
{
height
:
100%
;
width
:
100%
;
overflow
:
auto
;
border
:
0.5px
solid
#EEEEEE
;
}
#gzfk01
.showtab
{
height
:
100%
;
width
:
100%
;
}
.easyuitext
{
padding-left
:
10px
;
height
:
30px
;
border
:
0.5px
solid
#D3D3D3
;
}
#gzfk01
.wid70
{
width
:
70%
;
}
#gzfk01
.cardList-wrapper
.card-item
:nth-child
(
1
)
{
background
:
-webkit-gradient
(
linear
,
left
top
,
right
top
,
from
(
#5171fd
),
to
(
#c97afd
));
background
:
linear-gradient
(
90deg
,
#5171fd
,
#c97afd
);
-webkit-box-shadow
:
0
5px
10px
#c97afd
;
box-shadow
:
0
5px
10px
#c97afd
;}
#gzfk01
.cardList-wrapper
.card-item
:nth-child
(
2
)
{
background
:
-webkit-gradient
(
linear
,
left
top
,
right
top
,
from
(
#3dadf6
),
to
(
#737bfc
));
background
:
linear-gradient
(
90deg
,
#3dadf6
,
#737bfc
);
-webkit-box-shadow
:
0
5px
10px
#737bfc
;
box-shadow
:
0
5px
10px
#737bfc
;}
#gzfk01
.cardList-wrappers
{
background
:
-webkit-gradient
(
linear
,
left
top
,
right
top
,
from
(
#ea677c
),
to
(
#ef9b5f
));
background
:
linear-gradient
(
90deg
,
#ea677c
,
#ef9b5f
);
-webkit-box-shadow
:
0
5px
10px
#ef9b5f
;
box-shadow
:
0
5px
10px
#ef9b5f
;}
#gzfk01
.cardList-wrapper
.card-item
:nth-child
(
3
)
{
background
:
-webkit-gradient
(
linear
,
left
top
,
right
top
,
from
(
#42d79b
),
to
(
#a6e25f
));
background
:
linear-gradient
(
90deg
,
#42d79b
,
#a6e25f
);
-webkit-box-shadow
:
0
5px
10px
#a6e25f
;
box-shadow
:
0
5px
10px
#a6e25f
;}
/* 界面5css */
#gzfk02
{
height
:
100%
;
width
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
align-items
:
stretch
}
#gzfk02
div
{
box-sizing
:
border-box
;
}
#gzfk02
.toptitle
{
height
:
50px
;
width
:
100%
;
background-color
:
#00aaff
;
color
:
#FFFFFF
;
text-align
:
center
;
line-height
:
50px
;
}
#gzfk02
.left
{
height
:
calc
(
100%
-
60px
);
width
:
40%
;
}
#gzfk02
.right
{
height
:
calc
(
100%
-
60px
);
width
:
calc
(
60%
-
10px
);
border
:
#EEEEEE
1px
solid
;
}
#gzfk02
.rightPdf
{
height
:
100%
;
width
:
100%
;
}
#gzfk02
.cbinfor
{
width
:
100%
;
height
:
50%
;
}
#gzfk02
.tab
{
width
:
100%
;
height
:
50%
;
padding-top
:
10px
;
}
#gzfk02
.cpif
{
width
:
100%
;
height
:
100%
;
border
:
1px
solid
#EEEEEE
;
}
/* .cprz{
width: 100%;
height: 60%;
border: 1px solid #EEEEEE;
} */
#gzfk02
.cpiftop
{
width
:
100%
;
height
:
40px
;
border-bottom
:
1px
solid
#EEEEEE
;
line-height
:
40px
;
display
:
flex
;
justify-content
:
center
;
}
#gzfk02
.cpifbot
{
height
:
calc
(
100%
-
40px
);
}
#gzfk02
.ery
{
width
:
100%
;
height
:
20%
;
display
:
flex
;
align-items
:
center
;
}
#gzfk02
.ery
span
{
padding-left
:
20px
;
display
:
inline-block
;
width
:
70px
;
}
#gzfk02
.tipul
>
li
{
width
:
150px
;
padding-left
:
20px
;
float
:
left
;
line-height
:
50px
;
}
#gzfk02
.tipuli2
{
float
:
right
!important
;
}
#gzfk02
.maintab
{
height
:
100%
;
width
:
100%
;
overflow
:
auto
;
border
:
0.5px
solid
#EEEEEE
;
}
#gzfk02
.showtab
{
height
:
100%
;
width
:
100%
;
}
/* 看板6样式 */
#gzfk03
{
height
:
100%
;
width
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
align-items
:
stretch
}
#gzfk03
div
{
box-sizing
:
border-box
;
}
#gzfk03
.toptitle
{
height
:
50px
;
width
:
100%
;
background-color
:
#00aaff
;
color
:
#FFFFFF
;
text-align
:
center
;
line-height
:
50px
;
}
#gzfk03
.left
{
height
:
calc
(
100%
-
60px
);
width
:
40%
;
}
#gzfk03
.right
{
height
:
calc
(
100%
-
60px
);
width
:
calc
(
60%
-
10px
);
border
:
#EEEEEE
1px
solid
;
}
#gzfk03
.rightPdf
{
height
:
100%
;
width
:
100%
;
}
#gzfk03
.cbinfor
{
width
:
100%
;
height
:
45%
;
}
#gzfk03
.tab
{
width
:
100%
;
height
:
55%
;
padding-top
:
10px
;
}
#gzfk03
.cpif
{
width
:
100%
;
height
:
100%
;
border
:
1px
solid
#EEEEEE
;
}
/* .cprz{
width: 100%;
height: 60%;
border: 1px solid #EEEEEE;
} */
#gzfk03
.cpiftop
{
width
:
100%
;
height
:
40px
;
border-bottom
:
1px
solid
#EEEEEE
;
line-height
:
40px
;
display
:
flex
;
justify-content
:
center
;
}
#gzfk03
.cpifbot
{
height
:
calc
(
100%
-
40px
);
}
#gzfk03
.ery
{
width
:
100%
;
height
:
20%
;
display
:
flex
;
align-items
:
center
;
}
#gzfk03
.ery
span
{
padding-left
:
20px
;
display
:
inline-block
;
width
:
70px
;
}
#gzfk03
.tipul
>
li
{
width
:
150px
;
padding-left
:
20px
;
float
:
left
;
line-height
:
50px
;
}
#gzfk03
.tipuli2
{
float
:
right
!important
;
}
#gzfk03
.maintab
{
height
:
50%
;
width
:
100%
;
overflow
:
auto
;
border
:
0.5px
solid
#EEEEEE
;
}
#gzfk03
.mainsp
{
height
:
50%
;
width
:
100%
;
}
#gzfk03
.showtab
{
height
:
100%
;
width
:
100%
;
}
\ No newline at end of file
gavel/src/main/resources/static/js/dashboard/api.js
View file @
47b0a72b
...
...
@@ -19,7 +19,7 @@
HTTP
.
post
(
"querySafeDays"
,
{},
function
(
result
)
{
if
(
result
[
'success'
])
{
let
data
=
result
.
data
.
records
dom
.
text
(
"安全生产天数: "
+
data
||
'0'
+
"天"
)
dom
.
html
(
"安全生产天数: "
+
"<span>"
+
data
+
"</span>"
+
"天"
)
}
else
{
console
.
log
(
"请求失败"
)
}
...
...
gavel/src/main/resources/templates/views/kmes/dashboard/first.html
View file @
47b0a72b
...
...
@@ -7,6 +7,14 @@
<link
rel=
"stylesheet"
href=
"../../css/dashboard/index.css"
>
<link
rel=
"stylesheet"
href=
"../../css/dashboard/public.css"
>
<style
type=
"text/css"
>
#aqscts
{
box-sizing
:
border-box
;
cursor
:
url(../../images/dashboard/pointer.png)
8
3
,
auto
;
font-family
:
微软雅黑
;
text-shadow
:
#00d8ff
0
0
20.9455px
;
width
:
100%
;
}
.allnav-circle
li
{
width
:
32%
!important
;
}
...
...
@@ -43,9 +51,9 @@
<div
style=
"width: 100%;height: 50%;"
>
数字化柔性自动生产车间看板
</div>
<div
id=
"aqscts"
style=
"width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;"
>
<
!-- <
div id="aqscts" style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
安全生产天数:0
</div>
</div>
-->
</div>
<div
class=
"header-img"
></div>
</div>
...
...
@@ -72,16 +80,17 @@
<div
class=
"listTxt"
>
<p><label
for=
""
>
应到人数:
</label><span
id=
"ydrs"
>
20
</span></p>
<p><label
for=
""
>
实际人数:
</label><span
id=
"sdrs"
>
20
</span></p>
<p><label
for=
""
>
休假人数:
</label><span
id=
"xjrs"
>
0
</span>
</p>
<p><label
for=
""
>
总生产量:
</label><span
id=
"zscl"
>
0
</span></p>
<p><label
for=
""
>
总生产量:
</label><span
id=
"zscl"
>
0
</span></p>
<p></p>
<p
id=
"aqscts"
style=
"font-size: 18px;"
></p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"left-bottom rightTop border"
>
<div
class=
"left-bottom rightTop border"
style=
"height: 3.8rem;"
>
<div
class=
"title"
>
静电手环
</div>
<div
class=
"bottom-b"
>
<div
class=
"bottom-b"
style=
"height: 3.1rem;"
>
<div
id=
"chartJdsh"
class=
"allnav"
>
<div
class=
"allnav-left"
>
<div
class=
"circle "
id=
"chartJdshCirle"
></div>
...
...
@@ -132,9 +141,9 @@
<video
width=
"100%"
height=
"100%"
controls
id=
"firstVideo"
muted
autoplay=
"autoplay"
loop=
"loop"
>
</video>
</div>
<div
class=
"cen-bottom rightTop border"
>
<div
class=
"cen-bottom rightTop border"
style=
"height: 3.8rem;"
>
<div
class=
"title"
>
生产进度跟踪
</div>
<div
class=
"bottom-b"
>
<div
class=
"bottom-b"
style=
"height: 3.1rem;"
>
<div
id=
"chartScjdgz"
class=
"allnav"
>
<div
class=
"echart wenzi"
>
<div
class=
"gun"
>
...
...
@@ -284,13 +293,13 @@
</div>
<div
class=
"center-right fr"
style=
"padding-top: 0;"
>
<div
class=
"right-top rightTop border"
style=
"height: 3.175rem;margin-bottom: .2rem;"
>
<div
class=
"title"
>
周计划/
月计划达成
</div>
<div
class=
"title"
>
月计划达成
</div>
<div
class=
"chart"
style=
"width: calc(100% - 0.2rem);
height: 2.6rem;
margin-left: 0.1rem;
margin-top: 0.1rem;"
>
<ul
style=
"width: 100%;height: 100%"
>
<li
style=
"float: left;width: 50%;height: 100%;position: relative;overflow:hidden;"
>
<
!-- <
li style="float: left;width: 50%;height: 100%;position: relative;overflow:hidden;">
<div style="position: absolute;top: 0;bottom: 0.4rem;left: 0;right: 0">
<div id="chartRjh" class="allnav"></div>
</div>
...
...
@@ -298,8 +307,8 @@
<div>周计划数:<span id="rjhs">100</span></div>
<div>周完工数:<span id="rwgs">80</span></div>
</div>
</li>
<li
style=
"float: left;width:
5
0%;height: 100%;position: relative;overflow:hidden;"
>
</li>
-->
<li
style=
"float: left;width:
10
0%;height: 100%;position: relative;overflow:hidden;"
>
<div
style=
"position: absolute;top: 0;bottom: 0.4rem;left: 0;right: 0"
>
<div
id=
"chartYjh"
class=
"allnav"
></div>
</div>
...
...
@@ -324,9 +333,9 @@
</div>
</div>
<div
class=
"right-bottom rightTop border"
>
<div
class=
"right-bottom rightTop border"
style=
"height: 3.8rem;"
>
<div
class=
"title"
>
日产量
&
合格率
</div>
<div
class=
"chat"
>
<div
class=
"chat"
style=
"height: 3.1rem;"
>
<div
id=
"chartRpcdcsj"
class=
"allnav"
></div>
</div>
<!-- <div class="title">OA考勤</div>
...
...
@@ -368,7 +377,7 @@
// var myChartSdcl = echarts.init(document.getElementById('chartSdcl'));
var
chartRpcdcsj
=
echarts
.
init
(
document
.
getElementById
(
"chartRpcdcsj"
),
null
,
{
renderer
:
'svg'
});
var
chartHgl
=
echarts
.
init
(
document
.
getElementById
(
"chartHgl"
),
null
,
{
renderer
:
'svg'
});
var
chartRjh
=
echarts
.
init
(
document
.
getElementById
(
"chartRjh"
),
null
,
{
renderer
:
'svg'
});
//
var chartRjh=echarts.init(document.getElementById("chartRjh"),null, {renderer: 'svg'});
var
chartYjh
=
echarts
.
init
(
document
.
getElementById
(
"chartYjh"
),
null
,
{
renderer
:
'svg'
});
var
chartJdshCirle
=
echarts
.
init
(
document
.
getElementById
(
"chartJdshCirle"
),
null
,
{
renderer
:
'svg'
});
var
chartTzzp
=
echarts
.
init
(
document
.
getElementById
(
"chartzzp"
),
null
,
{
renderer
:
'svg'
});
...
...
@@ -376,7 +385,7 @@
// oaechart(myChartSdcl); /*oa*/
setRclHglEchart
(
chartRpcdcsj
);
/*日排产达成数据*/
// setHglEchart(chartHgl);/*合格率*/
setPieDailyChart
(
chartRjh
,
80
);
/*日计划*/
// setPieDailyChart(chartRjh,80);
setPieDailyChart
(
chartYjh
,
80
);
setproduceEchart
(
chartTzzp
)
$
(
'.myscroll'
).
myScroll
({
...
...
@@ -388,7 +397,7 @@
// myChartSdcl.resize()
chartRpcdcsj
.
resize
()
chartHgl
.
resize
()
chartRjh
.
resize
()
//
chartRjh.resize()
chartYjh
.
resize
()
chartJdshCirle
.
resize
()
}
...
...
@@ -400,7 +409,7 @@
apisetRpcHglEchart
(
chartRpcdcsj
,
'rcl'
)
// apisetTimeProductionEchart(myChartSdcl)
// apisetDailyDataEchart(chartRpcdcsj)
apisetPieDailyChart
(
chartRjh
)
//
apisetPieDailyChart(chartRjh)
apisetPieDailyCharty
(
chartYjh
)
apisetHglEchart
(
chartHgl
)
apiqueryWo
()
...
...
gavel/src/main/resources/templates/views/kmes/gzfk/gx.html
0 → 100644
View file @
47b0a72b
<div
class=
"e-dialog-container"
data-options=
"width:480,height:260"
id=
"gpwxGx"
>
<div
class=
"gui-fluid editTable"
>
<input
type=
"hidden"
name=
"gxName"
>
<input
type=
"hidden"
name=
"gzzxid"
>
<input
type=
"hidden"
name=
"gzzxname"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
工序:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gxid"
data-toggle=
"gui-combobox"
>
</div>
</div>
</div>
<!--<div class="gui-row">
<div class="gui-col-sm12">
<label class="gui-form-label">班型:</label>
<div class="gui-input-block">
<input type="text" name="bxid" style="width: 100%;" data-options="required:true">
</div>
</div>
</div>-->
</div>
</div>
<script>
$
(
function
()
{
var
$dialog
=
$
(
"#gpwxGx"
);
var
$inputGxid
=
$dialog
.
find
(
"input[name='gxid']"
);
var
$inputBx
=
$dialog
.
find
(
"input[name='bxid']"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
$inputGxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
false
,
required
:
true
,
allowEdit
:
false
,
url
:
'gygl/bzgx/queryWxBzgx'
,
onSelect
:
function
(
a
)
{
$dialog
.
find
(
"input[name='gxName']"
).
val
(
a
.
name
)
$dialog
.
find
(
"input[name='gzzxid']"
).
val
(
a
.
gzzxid
||
''
)
$dialog
.
find
(
"input[name='gzzxname']"
).
val
(
a
.
gzzxname
||
''
)
},
loadFilter
:
function
(
a
)
{
var
datas
=
a
[
"data"
][
"records"
]
$
.
each
(
datas
,
function
(
i
,
item
)
{
item
[
"name"
]
=
item
[
"gzzxname"
]
+
"-"
+
item
[
"name"
]
});
return
datas
}});
$inputBx
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
false
,
allowEdit
:
false
,
url
:
'hzmes/bx/query'
,
onSelect
:
function
(
a
)
{
}});
}
/*数据初始化*/
function
dataInit
(
obj
){
}
function
run
(
res
){
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
\ No newline at end of file
gavel/src/main/resources/templates/views/kmes/gzfk/gzindex.html
0 → 100644
View file @
47b0a72b
<div
id=
"kmesGpgzindex"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'kmesGpgzindexTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"kmesGpgzindexTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'kmesGpgzindexTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-cancelgz toolbar"
href=
"javascript:void(0)"
></a>
<!-- <a class="toolbar-reviewBhg toolbar" href="javascript:void(0)"></a>-->
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm2"
>
<label
class=
"gui-form-label"
>
产品条码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wosnid"
style=
"width: 100%"
></div>
</div>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
加工日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"start"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"end"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
生产工单:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wodjid"
style=
"width: 100%"
></div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
工序:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bzgxid"
style=
"width: 100%"
></div>
</div>
<!-- <input type="hidden" name="bxid"/>-->
<input
type=
"hidden"
name=
"fkrid"
/>
<input
type=
"hidden"
name=
"bzbzgxid"
/>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search1"
style=
"color: white"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
/*js初始化*/
$
(
function
()
{
var
$div
=
$
(
'#kmesGpgzindex'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
$datStart
=
$div
.
find
(
"input[name='start']"
);
var
$datEnd
=
$div
.
find
(
"input[name='end']"
);
var
$txtScgd
=
$div
.
find
(
'input[name="wodjid"]'
);
var
$txtWosnid
=
$div
.
find
(
'input[name="wosnid"]'
);
var
$bzgxid
=
$div
.
find
(
'input[name="bzgxid"]'
);
var
gxName
=
''
;
var
gzzxid
=
""
;
var
gzzxname
=
""
;
var
fkrName
=
""
;
function
paramsInit
()
{
}
function
pageInit
()
{
$datStart
.
iDatetimebox
();
$datEnd
.
iDatetimebox
();
$txtScgd
.
iTextbox
();
$txtWosnid
.
iTextbox
();
var
options
=
{
url
:
'kmes/gpgz'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"产品条码"
,
field
:
"wosnid"
,
fieldType
:
"ftString"
,
width
:
160
},
//{title: "工序编码", field: "bzgxCode", fieldType: "ftString",width:100},
{
title
:
"标准工序"
,
field
:
"bzgxName"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"反馈工序"
,
field
:
"fkgx"
,
fieldType
:
"ftString"
,
width
:
100
,
hidden
:
true
},
//{title: "规格型号", field: "wlxxGg", fieldType: "ftString",width:200},
{
title
:
"合格"
,
field
:
"hgbz"
,
align
:
"center"
,
fieldType
:
"ftString"
,
width
:
100
,
formatter
:
function
(
value
,
index
,
row
){
var
map
=
{
Y
:
"合格"
,
N
:
"不合格"
};
if
(
value
==
"Y"
){
return
"<span style='color: #216d4c'>"
+
map
[
value
]
+
"</span>"
;
}
else
if
(
value
==
"N"
){
return
"<span style='color: indianred'>"
+
map
[
value
]
+
"</span>"
;
}
else
{
return
''
}
}
},
{
title
:
"合格数量"
,
field
:
"hgsl"
,
fieldType
:
"int"
,
width
:
100
},
{
title
:
"不合格数量"
,
field
:
"bhgsl"
,
fieldType
:
"int"
,
width
:
100
},
{
title
:
"反馈数量"
,
field
:
"fksl"
,
fieldType
:
"int"
,
width
:
100
},
{
title
:
"反馈人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
},
{
title
:
"反馈时间"
,
field
:
"fksj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"生产工单"
,
field
:
"woDjid"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
fieldType
:
"ftString"
,
width
:
160
}
]],
dialog
:
{
footerIn
:
true
,
maximized
:
true
,
modal
:
true
,
width
:
960
,
height
:
640
,
href
:
'kmes/gpgz/edit'
,
draggable
:
false
,
onSaveCallback
:
function
(
opt
,
data
)
{
},
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
queryParams
=
$
.
extend
({},
DataBind
.
collectData
(
$div
),{
gxName
:
gxName
,
gzzxid
:
gzzxid
,
gzzxname
:
gzzxname
,
fkrName
:
fkrName
})
},
messager
:
function
()
{
var
flag
=
true
;
if
(
$div
.
find
(
"input[name='bzgxid']"
).
val
()
==
""
){
gas
.
confirm
(
"您尚未选择工序,无法进行反馈操作。是否重新选择工序?"
,
function
()
{
run
();
flag
=
false
;
},
function
()
{
flag
=
true
});
}
else
{
flag
=
false
}
return
flag
},
onDestroy
:
function
()
{
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
}
};
$div
.
Holder
(
options
);
/*取消改制*/
$
(
"#kmesGpgzindexTable-toolbar"
).
find
(
".toolbar-cancelgz"
).
iMenubutton
({
event
:
'doAjax'
,
text
:
'取消改制'
,
onClick
:
function
()
{
var
selectedRow
=
$div
.
find
(
'.toolbar-table'
).
datagrid
(
'getSelected'
);
if
(
selectedRow
==
null
){
$
.
messager
.
alert
(
'提示'
,
'请选中一条数据进行操作'
);
return
false
;
}
gas
.
confirm
(
"是否执行该操作"
,
function
()
{
HTTP
.
post
(
'kmes/gpgz/delGpgz'
,{
gpfkid
:
selectedRow
.
id
},
function
(
result
)
{
if
(
result
[
'success'
]){
var
index
=
$div
.
find
(
'.toolbar-table'
).
datagrid
(
"getRowIndex"
,
selectedRow
);
$div
.
find
(
'.toolbar-table'
).
datagrid
(
"deleteRow"
,
index
);
$
.
messager
.
alert
(
'提示'
,
'取消改制成功!'
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
result
[
'message'
]
||
'取消改制失败,请重新操作!'
);
}
})})
}
});
$
(
"#kmesGpgzindexTable-toolbar"
).
find
(
".toolbar-search1"
).
iMenubutton
({
text
:
'搜索'
,
iconCls
:
"fa fa-search"
,
btnCls
:
""
,
onClick
:
function
()
{
if
(
$div
.
find
(
"input[name='bzgxid']"
).
val
()
==
""
){
gas
.
confirm
(
"您尚未选择工序,是否重新选择工序?"
,
function
()
{
run
();
});
}
else
{
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
}
});
}
/*数据初始化*/
function
dataInit
(
obj
){
}
/*数据初始化*/
function
dataInit
(
obj
){
}
/*用户操作*/
function
run
(
res
){
$bzgxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
false
,
required
:
true
,
allowEdit
:
false
,
url
:
'gygl/bzgx/queryGzBzgx'
,
onSelect
:
function
(
a
)
{
// $dialog.find("input[name='gxName']").val(a.name)
// $dialog.find("input[name='gzzxid']").val(a.gzzxid||'')
// $dialog.find("input[name='gzzxname']").val(a.gzzxname||'')
gxName
=
a
.
name
gzzxid
=
a
.
gzzxid
gzzxname
=
a
.
gzzxname
},
loadFilter
:
function
(
a
)
{
var
datas
=
a
[
"data"
][
"records"
]
$
.
each
(
datas
,
function
(
i
,
item
)
{
item
[
"name"
]
=
item
[
"gzzxname"
]
+
"-"
+
item
[
"name"
]
});
return
datas
}});
// gas.Dialog({
// title:"选择工序",
// width:480,
// height:280,
// minimizable:false,
// maximizable:false,
// href:"kmes/gpgz/gx",
// onInit:function (element) {
// },
// regResultHandler:function (element) {
// if(!element.form("validate")){
// return false
// }
// var data=DataBind.collectData(element);
// $div.find("input[name='bxid']").val(data.bxid||"");
// $div.find("input[name='bzgxid']").val(data.gxid||"");
// $div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId'));
// fkrName=window.sessionStorage.getItem('userName');
// gxName=data.gxName||"";
// gzzxid=data.gzzxid||'';
// gzzxname=data.gzzxname||"";
// $datagrid.datagrid("options").url="kmes/gpfk/query";
// $datagrid.datagrid("load",DataBind.collectData($div));
// }
// })
}
gas
.
load
(
paramsInit
,
pageInit
,
dataInit
,
run
);
});
</script>
gavel/src/main/resources/templates/views/kmes/gzfk/index.html
0 → 100644
View file @
47b0a72b
<script
src=
"js/pdfshow.js"
type=
"text/javascript"
charset=
"utf-8"
></script>
<script
src=
"js/dbenlarge.js"
type=
"text/javascript"
charset=
"utf-8"
></script>
<script
src=
"js/gethash.js"
type=
"text/javascript"
charset=
"utf-8"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/gzfk.css"
/>
<style
type=
"text/css"
>
.errdialog
{
min-width
:
35%
;
/* width: 35%; */
height
:
40px
;
text-align
:
center
;
line-height
:
40px
;
position
:
absolute
;
top
:
50px
;
right
:
50%
;
color
:
#FFFFFF
;
background-color
:
rgba
(
255
,
0
,
0
,
0.5
);
transform
:
translateX
(
50%
);
border-radius
:
5px
;
}
</style>
<script
type=
"text/javascript"
>
/* 通用代码 */
const
pdfUr
=
"kmes/gpfk/queryPdfByWoidAndZpgx"
var
urlo
=
"kmes/gpfkfj/queryFjBybzgx/"
+
window
.
bzlx
+
"/O"
var
urlt
=
"kmes/gpfkfj/queryFjBybzgx/"
+
window
.
bzlx
+
"/T"
var
urlm
=
"kmes/gpfkfj/queryFjBybzgx/"
+
window
.
bzlx
+
"/M"
/* 初始化工序 */
function
gzfk_getgx
(
e
){
let
that
=
e
that
.
gx
=
window
.
gxname
||
"获取失败"
}
/* 大屏内部弹框 */
function
screenAlert
(
dom
,
msg
,
timeNum
){
let
getdom
=
$
(
dom
)
getdom
.
css
(
'position'
,
'relative'
)
let
dialog
=
"<div class='errdialog'>"
+
msg
+
"</div>"
getdom
.
prepend
(
dialog
)
setTimeout
(
function
(){
$
(
'.errdialog'
).
remove
();
},
timeNum
)
}
/* 时间 */
function
gzfk_pagetime
(
w
){
let
that
=
w
let
nowtime
nowtime
=
new
Date
().
getTime
()
that
.
systime
=
new
Date
(
nowtime
).
Format
(
"yyyy-MM-dd hh:mm"
)
that
.
sivtimer
=
setInterval
(
function
(){
nowtime
=
new
Date
().
getTime
()
that
.
systime
=
new
Date
(
nowtime
).
Format
(
"yyyy-MM-dd hh:mm"
)
},
20000
)
}
/* 日志事件汇总,写在请求内部或者单独拿出 */
function
gzfk_wrz
(
o
,
msg
,
type
){
let
that
=
o
if
(
type
!=
'error'
){
$
(
that
.
el
).
find
(
".rz"
).
append
(
"<br>>"
+
"<span>"
+
msg
+
"</sapn>"
)
that
.
addtop
=
that
.
addtop
+
600
$
(
that
.
el
).
find
(
".rz"
).
scrollTop
(
that
.
addtop
)
}
else
{
$
(
that
.
el
).
find
(
".rz"
).
append
(
"<br>>"
+
"<span style='color: red;'>"
+
msg
+
"</sapn>"
)
that
.
addtop
=
that
.
addtop
+
600
$
(
that
.
el
).
find
(
".rz"
).
scrollTop
(
that
.
addtop
)
}
/* this.xlh="" */
}
/* gzfk */
/* pdfshow gxid登录页传进来 */
function
gzfk_pdfshow
(
e
,
woid
){
let
that
=
e
let
newpdfurl
=
pdfUr
+
"/"
+
woid
+
"/"
+
window
.
bzlx
that
.
pdf
=
""
if
(
newpdfurl
!=
that
.
pdfurl
){
that
.
pdfurl
=
newpdfurl
if
(
that
.
sivpdf
){
clearInterval
(
that
.
sivpdf
)
}
pdfshow
(
that
.
pdfurl
,
that
.
pdfdom
,
10000
).
then
(
e
=>
{
that
.
sivpdf
=
e
})
}
}
/* 反馈技计数 */
function
gzfk_apigetjs
(
s
){
let
that
=
s
gas
.
post
(
'kmes/gpfk/getDailyInfo'
,{
"bzgxid"
:
window
.
bzlx
},
function
(
res
){
if
(
res
.
data
&&
res
.
data
.
records
){
that
.
fksl
=
res
.
data
.
records
.
fksl
||
0
that
.
hg
=
res
.
data
.
records
.
hgsl
||
0
that
.
ng
=
res
.
data
.
records
.
bhgsl
||
0
}
else
{
let
msg
=
res
.
message
||
"当前计数获取失败"
gzfk_wrz
(
that
,
msg
,
'error'
)
}
});
}
/* newgzfk */
function
gzfk_apigzfk
(
e
){
let
that
=
e
return
new
Promise
(
function
(
y
,
n
){
gas
.
post
(
'kmes/gpfk/gzfk '
,{
"sncode"
:
that
.
xlh
,
"bzgxid"
:
window
.
bzlx
||
""
,
"wosncode"
:
that
.
wosncode
||
""
},
function
(
res
){
if
(
res
.
data
&&
res
.
data
.
records
){
/* 赋值操作 */
that
.
gd
=
res
.
data
.
records
.
woDjid
;
that
.
cpsn
=
res
.
data
.
records
.
wosnCode
;
that
.
ph
=
res
.
data
.
records
.
wlxxCode
;
let
woid
=
res
.
data
.
records
.
woDjid
;
that
.
fkid
=
res
.
data
.
records
.
id
;
y
(
woid
)
/** wobom查询 **/
if
(
res
.
data
.
records
.
sntype
==
"WOSNID"
)
{
that
.
wosncode
=
that
.
xlh
let
msg
=
res
.
message
||
"查询WOSNID:"
+
that
.
wosncode
+
"成功"
gzfk_wrz
(
that
,
msg
)
}
else
if
(
res
.
data
.
records
.
sntype
==
"OKBZ"
){
that
.
isok
=
"OK"
}
else
if
(
res
.
data
.
records
.
sntype
==
"NGBZ"
){
that
.
isok
=
"NG"
}
that
.
xlh
=
""
/* 日志操作 */
/* pdf地址 */
}
else
{
let
msg
=
res
.
message
||
"查询该序列号:"
+
that
.
xlh
+
"失败"
that
.
xlh
=
""
gzfk_wrz
(
that
,
msg
,
'error'
)
screenAlert
(
that
.
el
,
msg
,
2000
)
}
});
})
}
/* 总体扫描封装 */
function
gzfk_gzfk
(
t
){
let
that
=
t
if
(
that
.
xlh
==
"logout"
)
{
gzfk_wrz
(
that
,
"即将退出系统"
)
localStorage
.
clear
();
window
.
location
.
href
=
"loginscan_view"
;
return
}
gzfk_wrz
(
that
,
"正在查询序列号:"
+
that
.
xlh
)
gzfk_apigzfk
(
that
).
then
(
function
(
s
){
gzfk_pdfshow
(
that
,
s
)
gzfk_apigetjs
(
that
)
})
}
/* gzfk */
function
gzfk_secgzfk
(
t
,
type
){
let
that
=
t
gas
.
post
(
'kmes/gpfk/gzfk'
,{
"fkid"
:
that
.
fkid
,
"hgsn"
:
that
.
xlh
},
function
(
res
){
if
(
res
.
data
&&
res
.
data
.
records
){
if
(
type
==
"ok"
){
that
.
isok
=
"OK"
that
.
hg
=
res
.
data
.
records
.
hgsl
||
0
;
that
.
ng
=
res
.
data
.
records
.
bhgsl
||
0
;
}
else
if
(
type
==
"ng"
){
that
.
isok
=
"NG"
that
.
hg
=
res
.
data
.
records
.
hgsl
||
0
;
that
.
ng
=
res
.
data
.
records
.
bhgsl
||
0
;
}
}
else
{
let
msg
=
res
.
message
||
"操作执行失败"
gzfk_wrz
(
that
,
msg
,
"error"
)
}
});
}
</script>
<div
id=
"gzfk01"
>
<!-- 顶部信息条 -->
<div
class=
"toptitle"
>
<ul
class=
"tipul"
style=
"height: 100%;"
>
<li>
{{username}}
</li>
<li
class=
"tipuli2"
style=
"width: 250px;"
>
{{systime}}
</li>
<li
class=
"tipuli2"
style=
"margin-right: 200px;display: none"
>
计数:
<span
style=
"font-size: 16px;"
>
{{fksl}}
</span></li>
<li
class=
"tipuli2"
>
当前工序:{{gx}}
</li>
</ul>
</div>
<!-- 左侧信息条 -->
<div
class=
"left"
style=
"width: 30%;"
>
<!-- 左上信息表 -->
<div
class=
"cbinfor"
>
<div
class=
"cpif"
>
<!-- top -->
<div
class=
"cpiftop"
style=
"display: flex;align-items: center;"
>
<span>
序列号
</span>
<input
class=
"easyuitext "
style=
"width: 84%;"
v-model=
"xlh"
@
keydown=
"scanxlh()"
name=
"xlh"
placeholder=
"请扫码条码"
/>
</div>
<!-- bot -->
<div
class=
"cpifbot"
style=
"display: flex;flex-wrap: wrap;"
>
<div
class=
"ery"
>
<span>
工序
</span><input
class=
"easyuitext wid70"
v-model=
"gx"
name=
"gx"
/>
</div>
<div
class=
"ery"
>
<span>
工单
</span><input
class=
"easyuitext wid70"
v-model=
"gd"
name=
"gd"
/>
</div>
<div
class=
"ery"
>
<span>
SN
</span><input
class=
"easyuitext wid70"
v-model=
"cpsn"
name=
"cpsn"
/>
</div>
<div
class=
"ery"
>
<span>
品号
</span><input
class=
"easyuitext wid70"
v-model=
"ph"
name=
"ph"
/>
</div>
</div>
</div>
<!-- 日志 -->
<div
class=
"cprz"
>
<div
style=
"height: 100%;display: flex;align-items: center;justify-content: center;"
>
<div
class=
"cardList-wrapper"
style=
"width: 55%;height: 100%;background-color: #FFFFFF;color: #FFFFFF;display: flex;flex-wrap: wrap;justify-content:space-around;align-items: center;"
>
<div
class=
""
style=
"height: 45%;width: 90%;display: flex;align-items: center;justify-content: center;color: #FFFFFF;background-color: #00AAFF!important;"
>
<span
style=
"font-size: 20px;font-weight: 800;"
>
合格数量:{{hg}}
</span>
</div>
<div
class=
""
style=
"height: 45%;width: 90%;display: flex;align-items: center;justify-content: center;color: #FFFFFF;background-color: #FEC041!important;"
>
<span
style=
"font-size: 20px;font-weight: 800;"
>
NG数量:{{ng}}
</span>
</div>
</div>
<div
:class=
"{'ok-item' : isok=='OK','nok-item' : isok=='NG','null-item': isok!='OK'&&isok!='NG'}"
style=
"width: 40%;height: 95%;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;"
>
<b
style=
"font-size: 60px;"
>
{{isok}}
</b>
</div>
</div>
</div>
</div>
<!-- 左下表格 -->
<div
class=
"tab"
>
<div
class=
"maintab"
>
<div
style=
"height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;"
>
日志
</div>
<div
style=
"height: calc(100% - 20px);display: flex;"
>
<div
class=
"rz"
style=
"width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;"
>
</div>
</div>
</div>
</div>
</div>
<!-- 右侧信息pdf -->
<div
class=
"right"
style=
"width: 45%;"
>
<canvas
id=
"gpgzpdf"
class=
"rightPdf"
></canvas>
</div>
<!-- new右侧 -->
<div
class=
"right"
style=
"width: 25%;"
>
<div
style=
"height: 50%;overflow: hidden;"
>
<video
width=
"100%"
height=
"100%"
:src=
"urlm"
controls
muted
autoplay=
"autoplay"
loop=
"loop"
>
</video>
</div>
<div
ref=
"scrollmain"
style=
"height: 50%;overflow: auto;border-bottom: 1px solid #EEEEEE;"
>
<canvas
id=
"gpgzrpdf"
ref=
"scroll"
style=
"width: 100%;height: 160%;"
></canvas>
</div>
</div>
</div>
<!-- 界面5 -->
<div
id=
"gzfk02"
style=
"display: none;"
>
<!-- 顶部信息条 -->
<div
class=
"toptitle"
>
<ul
class=
"tipul"
style=
"height: 100%;"
>
<li>
username
</li>
<li
class=
"tipuli2"
style=
"width: 250px;"
>
{{systime}}
</li>
<li
class=
"tipuli2"
style=
"margin-right: 200px;display: none"
>
计数:
<span
style=
"font-size: 16px;"
>
{{fksl}}
</span></li>
<li
class=
"tipuli2"
>
当前工序:{{gx}}
</li>
</ul>
</div>
<!-- 左侧信息条 -->
<div
class=
"left"
>
<!-- 左上信息表 -->
<div
class=
"cbinfor"
>
<div
class=
"cpif"
>
<!-- top -->
<div
class=
"cpiftop"
style=
"display: flex;align-items: center;"
>
<span>
序列号
</span>
:
<input
class=
"easyuitext"
style=
"width: 80%"
name=
"xlh"
v-model=
"xlh"
@
keydown=
"scanxlh()"
/>
</div>
<!-- bot -->
<div
class=
"cpifbot"
style=
"display: flex;flex-wrap: wrap;"
>
<div
style=
"display: flex;width: 55%;height: 100%;flex-wrap: wrap;"
>
<div
class=
"ery"
>
<span>
工序
</span><input
class=
"easyuitext"
style=
"width: 70%"
name=
"gx"
v-model=
"gx"
/>
</div>
<div
class=
"ery"
>
<span>
工单
</span><input
class=
"easyuitext"
style=
"width: 70%"
name=
"gd"
v-model=
"gd"
/>
</div>
<div
class=
"ery"
>
<span>
SN
</span><input
class=
"easyuitext"
style=
"width: 70%"
name=
"cpsn"
v-model=
"cpsn"
/>
</div>
<div
class=
"ery"
>
<span>
品号
</span><input
class=
"easyuitext"
style=
"width: 70%"
name=
"ph"
v-model=
"ph"
/>
</div>
<div
class=
"ery"
>
<span>
品名
</span><input
class=
"easyuitext"
style=
"width: 70%"
name=
"pm"
v-model=
"pm"
/>
</div>
</div>
<div
style=
"display: flex;width: 45%;height: 100%;flex-wrap: wrap;align-items: center;"
>
<div
style=
"height: 45%;width: 90%;background-color: #00AAFF;display: flex;align-items: center;justify-content: center;color: #FFFFFF;"
>
<span
style=
"font-size: 20px;font-weight: 800;"
>
合格数量:{{ng}}
</span>
</div>
<div
style=
"height: 45%;width: 90%;background-color: #FEC041;display: flex;align-items: center;justify-content: center;color: #FFFFFF;"
>
<span
style=
"font-size: 20px;font-weight: 800;"
>
NG数量:{{hg}}
</span>
</div>
</div>
</div>
</div>
</div>
<!-- 左下表格 -->
<div
class=
"tab"
>
<div
class=
"maintab"
style=
"position: relative;"
>
<div
class=
"cpiright"
style=
"width:160px;height: 160px;padding: 10px;position: absolute;right: 10px;top: 20px;"
>
<div
:class=
"{'ok-item' : isok=='OK','nok-item' : isok=='NG','null-item': isok!='OK'&&isok!='NG'}"
style=
"width: 100%;height: 100%;background-color: #1890FF;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;"
>
<b>
{{isok}}
</b>
</div>
</div>
<div
style=
"height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;"
>
日志
</div>
<div
style=
"height: calc(100% - 20px);display: flex;"
>
<div
class=
"rz"
style=
"width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;"
>
</div>
</div>
</div>
</div>
</div>
<!-- 右侧信息pdf -->
<div
class=
"right"
>
<canvas
id=
"pdf"
class=
"gzfk02pdf"
></canvas>
</div>
</div>
<!-- 看板6html -->
<div
id=
"gzfk03"
style=
"display: none;"
>
<!-- 顶部信息条 -->
<div
class=
"toptitle"
>
<ul
class=
"tipul"
style=
"height: 100%;"
>
<li>
{{username}}
</li>
<li
class=
"tipuli2"
style=
"width: 250px;"
>
{{systime}}
</li>
<li
class=
"tipuli2"
style=
"margin-right: 200px;display: none"
>
计数:
<span
style=
"font-size: 16px;"
>
{{fksl}}
</span></li>
<li
class=
"tipuli2"
>
当前工序:{{gx}}
</li>
</ul>
</div>
<!-- 左侧信息条 -->
<div
class=
"left"
>
<!-- 左上信息表 -->
<div
class=
"cbinfor"
>
<div
class=
"cpif"
>
<!-- top -->
<div
class=
"cpiftop"
style=
"display: flex;align-items: center;"
>
<span>
序列号
</span>
:
<input
class=
"easyuitext"
style=
"width: 80%;"
name=
"xlh"
@
keydown=
"scanxlh()"
v-model=
"xlh"
/>
</div>
<!-- bot -->
<div
class=
"cpifbot"
style=
"display: flex;flex-wrap: wrap;"
>
<div
style=
"display: flex;width: 55%;height: 100%;flex-wrap: wrap;"
>
<div
class=
"ery"
>
<span>
工序
</span><input
class=
"easyuitext"
style=
"width: 70%;"
name=
"gx"
v-model=
"gx"
/>
</div>
<div
class=
"ery"
>
<span>
工单
</span><input
class=
"easyuitext"
style=
"width: 70%;"
name=
"gd"
v-model=
"gd"
/>
</div>
<div
class=
"ery"
>
<span>
SN
</span><input
class=
"easyuitext"
style=
"width: 70%;"
name=
"cpsn"
v-model=
"cpsn"
/>
</div>
<div
class=
"ery"
>
<span>
品号
</span><input
class=
"easyuitext"
style=
"width: 70%;"
name=
"ph"
v-model=
"ph"
/>
</div>
<div
class=
"ery"
>
<span>
品名
</span><input
class=
"easyuitext"
style=
"width: 70%;"
name=
"pm"
v-model=
"pm"
/>
</div>
</div>
<div
style=
"display: flex;width: 45%;height: 100%;flex-wrap: wrap;align-items: center;"
>
<div
style=
"height: 45%;width: 90%;background-color: #00AAFF;display: flex;align-items: center;justify-content: center;color: #FFFFFF;"
>
<span
style=
"font-size: 20px;font-weight: 800;"
>
合格数量:{{hg}}
</span>
</div>
<div
style=
"height: 45%;width: 90%;background-color: #FEC041;display: flex;align-items: center;justify-content: center;color: #FFFFFF;"
>
<span
style=
"font-size: 20px;font-weight: 800;"
>
NG数量:{{ng}}
</span>
</div>
</div>
</div>
</div>
</div>
<!-- 左下表格 -->
<div
class=
"tab"
>
<div
class=
"maintab"
style=
"position: relative;"
>
<div
class=
"cpiright"
style=
"width:130px;height: 130px;padding: 10px;position: absolute;right: 10px;top: 20px;"
>
<div
:class=
"{'ok-item' : isok=='OK','nok-item' : isok=='NG','null-item': isok!='OK'&&isok!='NG'}"
style=
"width: 100%;height: 100%;background-color: #1890FF;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;"
>
<b>
{{isok}}
</b>
</div>
</div>
<div
style=
"height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;"
>
日志
</div>
<div
style=
"height: calc(100% - 20px);display: flex;"
>
<div
class=
"rz"
style=
"width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;"
>
</div>
</div>
</div>
<div
class=
"mainsp"
>
<video
src=
"movie.ogg"
controls=
"controls"
style=
"height: 100%;width: 100%;"
>
您的浏览器不支持 video 标签。
</video>
</div>
</div>
</div>
<!-- 右侧信息pdf -->
<div
class=
"right"
>
<canvas
id=
"gzfk03pdf"
class=
"rightPdf"
></canvas>
</div>
</div>
<script
type=
"text/javascript"
>
let
Vgzfk01
=
new
Vue
({
el
:
"#gzfk01"
,
mounted
()
{
gzfk_getgx
(
this
)
gzfk_apigetjs
(
this
)
dbenlarge
(
'gzfk01'
,
1
,
this
.
isFocus
())
// this.sivpdf=
this
.
initpage
()
this
.
gettime
()
this
.
scroll
()
this
.
appdestory
()
},
destroyed
()
{
clearInterval
(
this
.
sivdestory
)
clearInterval
(
this
.
sivpdf
)
clearInterval
(
this
.
sivtimer
)
clearInterval
(
this
.
sivscroll
)
clearInterval
(
this
.
sivrpdf
)
},
data
:
function
(){
return
{
urlm
:
urlm
,
fksl
:
0
,
isok
:
""
,
username
:
localStorage
.
getItem
(
"username"
),
pm
:
""
,
ng
:
0
,
hg
:
0
,
pdfdom
:
"gzfk01pdf"
,
el
:
"#gzfk01"
,
addtop
:
0
,
xlh
:
""
,
gx
:
""
,
gd
:
""
,
cpsn
:
""
,
ph
:
""
,
systime
:
""
,
tabdata
:[],
sivtimer
:
null
,
//时间计数器
sivpdf
:
null
,
sivdestory
:
null
,
sivscroll
:
null
,
sivrpdf
:
null
}
},
methods
:{
scroll
(){
/* test */
// pdfshow(urlo,'gpgzpdf', 10000).then(e => {
// that.sivpdf = e
// })
/* test */
pdfshow
(
urlt
,
'gpgzrpdf'
,
10000
).
then
(
e
=>
{
that
.
sivrpdf
=
e
})
const
mainData
=
this
.
$refs
.
scrollmain
const
divData
=
this
.
$refs
.
scroll
this
.
sivscroll
=
setInterval
(()
=>
{
mainData
.
scrollTop
+=
1
if
(
mainData
.
clientHeight
+
mainData
.
scrollTop
+
10
>
mainData
.
scrollHeight
)
{
mainData
.
scrollTop
=
0
}
},
100
)
},
// 扫码接口
apiscanxlh
(){
let
that
=
this
gzfk_gzfk
(
that
)
},
isFocus
(){
let
$xlh
=
$
(
this
.
el
).
find
(
'input[name="xlh"]'
)
$xlh
.
focus
()
},
// 扫码事件
scanxlh
(
e
){
var
evt
=
window
.
event
||
e
;
if
(
evt
.
keyCode
==
13
)
{
this
.
apiscanxlh
()
}
},
// 初始化页面
initpage
(){
},
/* 展示时间 */
gettime
(){
let
that
=
this
gzfk_pagetime
(
that
)
},
appdestory
(){
let
that
=
this
this
.
sivdestory
=
setInterval
(
function
(){
if
(
!
$
(
"#gzfk01"
).
height
()){
Vgzfk01
.
$destroy
()
}
},
3000
)
}
}
})
/* 界面5vue实例 */
let
Vgzfk02
=
new
Vue
({
el
:
"#gzfk02"
,
mounted
()
{
gzfk_getgx
(
this
)
dbenlarge
(
'gzfk02'
)
// this.sivpdf=
this
.
initpage
()
this
.
gettime
()
this
.
appdestory
()
},
destroyed
()
{
clearInterval
(
this
.
sivdestory
)
clearInterval
(
this
.
sivpdf
)
clearInterval
(
this
.
sivtimer
)
},
data
:
function
(){
return
{
fksl
:
0
,
isok
:
""
,
username
:
localStorage
.
getItem
(
"username"
),
pm
:
""
,
ng
:
0
,
hg
:
0
,
pdfdom
:
"gzfk02pdf"
,
el
:
"#gzfk02"
,
addtop
:
0
,
xlh
:
""
,
gx
:
""
,
gd
:
""
,
cpsn
:
""
,
ph
:
""
,
systime
:
""
,
tabdata
:[],
sivtimer
:
null
,
//时间计数器
sivpdf
:
null
,
sivdestory
:
null
}
},
methods
:{
//扫码事件
scanxlh
(
e
){
var
evt
=
window
.
event
||
e
;
if
(
evt
.
keyCode
==
13
)
{
this
.
apiscanxlh
()
}
},
// 扫码接口
apiscanxlh
(){
let
that
=
this
gzfk_gzfk
(
that
)
},
// 初始化页面
initpage
(){
},
/* 展示时间 */
gettime
(){
let
that
=
this
gzfk_pagetime
(
that
)
},
appdestory
(){
let
that
=
this
this
.
sivdestory
=
setInterval
(
function
(){
if
(
!
$
(
"#gzfk02"
).
height
()){
Vgzfk02
.
$destroy
()
}
},
3000
)
}
}
})
/* 看板6实例 */
let
Vgzfk03
=
new
Vue
({
el
:
"#gzfk03"
,
mounted
()
{
gzfk_getgx
(
this
)
dbenlarge
(
'gzfk03'
)
// this.sivpdf=
this
.
initpage
()
this
.
gettime
()
this
.
appdestory
()
},
destroyed
()
{
clearInterval
(
this
.
sivdestory
)
clearInterval
(
this
.
sivpdf
)
clearInterval
(
this
.
sivtimer
)
},
data
:
function
(){
return
{
fksl
:
0
,
isok
:
""
,
username
:
localStorage
.
getItem
(
"username"
),
pm
:
""
,
ng
:
0
,
hg
:
0
,
pdfdom
:
"gzfk03pdf"
,
el
:
"#gzfk03"
,
addtop
:
0
,
xlh
:
""
,
gx
:
""
,
gd
:
""
,
cpsn
:
""
,
ph
:
""
,
systime
:
""
,
tabdata
:[],
sivtimer
:
null
,
//时间计数器
sivpdf
:
null
,
sivdestory
:
null
}
},
methods
:{
//扫码事件
scanxlh
(
e
){
var
evt
=
window
.
event
||
e
;
if
(
evt
.
keyCode
==
13
)
{
this
.
apiscanxlh
()
}
},
// 扫码接口
apiscanxlh
(){
let
that
=
this
gzfk_gzfk
(
that
)
},
// 初始化页面
initpage
(){
},
/* 展示时间 */
gettime
(){
let
that
=
this
gzfk_pagetime
(
that
)
},
appdestory
(){
let
that
=
this
this
.
sivdestory
=
setInterval
(
function
(){
if
(
!
$
(
"#gzfk03"
).
height
()){
Vgzfk03
.
$destroy
()
}
},
3000
)
}
}
})
</script>
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