|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@ -1,4 +0,0 @@ |
|||||
Manifest-Version: 1.0 |
|
||||
Main-Class: com.dreamchaser.depository_manage.DepositoryManageApplicatio |
|
||||
n |
|
||||
|
|
||||
@ -1,87 +0,0 @@ |
|||||
#开启健康检查、审计、统计和监控,即可通过访问/actuator/beans等查看状态 |
|
||||
management: |
|
||||
endpoints: |
|
||||
web: |
|
||||
exposure: |
|
||||
include: beans,health |
|
||||
spring: |
|
||||
mobile: |
|
||||
sitepreference: |
|
||||
enabled:true |
|
||||
|
|
||||
servlet: |
|
||||
multipart: |
|
||||
enabled: true |
|
||||
max-file-size: 100MB # 单个文件上传的最大上限 |
|
||||
max-request-size: 100MB # 一次请求总大小上限 |
|
||||
|
|
||||
##数据库设置 |
|
||||
datasource: |
|
||||
username: root |
|
||||
password: root |
|
||||
url: jdbc:mysql://localhost:3306/depository?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull |
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver |
|
||||
type: com.alibaba.druid.pool.DruidDataSource |
|
||||
initialSize: 5 |
|
||||
minIdle: 5 |
|
||||
maxActive: 10 |
|
||||
maxWait: 60000 |
|
||||
timeBetweenEvictionRunsMillis: 60000 |
|
||||
minEvictableIdleTimeMillis: 300000 |
|
||||
validationQuery: SELECT 1 FROM DUAL |
|
||||
useGlobalDataSourceStat: true |
|
||||
server: |
|
||||
port: 9090 |
|
||||
testWhileIdle: true |
|
||||
testOnReturn: false |
|
||||
testOnBorrow: false |
|
||||
poolPreparedStatements: true |
|
||||
maxPoolPreparedStatementPerConnectionSize: 20 |
|
||||
#配置监控统计拦截的filters,去掉后监控界面sql将无法统计,'wall'用于防火墙 |
|
||||
filters: stat, wall, log4j |
|
||||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
|
||||
#超时回收机制 |
|
||||
removeAbandoned: true |
|
||||
removeAbandonedTimeout: 1800 |
|
||||
logAbandoned: true |
|
||||
banner: |
|
||||
location: banner.txt |
|
||||
thymeleaf: |
|
||||
cache: false |
|
||||
mode: HTML |
|
||||
mvc: |
|
||||
hiddenmethod: |
|
||||
filter: |
|
||||
enabled: true |
|
||||
view: |
|
||||
prefix: /templates/ |
|
||||
suffix: .html |
|
||||
static-path-pattern: /static/** |
|
||||
redis: |
|
||||
port: 6379 |
|
||||
host: 127.0.0.1 |
|
||||
database: 0 |
|
||||
jedis: |
|
||||
pool: |
|
||||
min-idle: 10 |
|
||||
max-idle: 20 |
|
||||
max-wait: -1ms |
|
||||
max-active: 200 |
|
||||
timeout: 2000ms |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
server: |
|
||||
mybatis: |
|
||||
type-aliases-package: com.dreamchaser.depository_manage.entity |
|
||||
configuration: |
|
||||
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl |
|
||||
log-prefix: mapper. |
|
||||
|
|
||||
mybatis-plus: |
|
||||
configuration: |
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
|
||||
|
|
||||
file: |
|
||||
uploadPath: D:/upLoad |
|
||||
@ -1,5 +0,0 @@ |
|||||
spring: |
|
||||
profiles: |
|
||||
active: test |
|
||||
server: |
|
||||
port: 11111 |
|
||||
@ -1,14 +0,0 @@ |
|||||
,---, ____ ,---, |
|
||||
.' .' `\ ,' , `. ,--.' | |
|
||||
,---.' \ __ ,-. ,-+-,.' _ | | | : __ ,-. |
|
||||
| | .`\ |,' ,'/ /| ,-+-. ; , || : : : .--.--. ,' ,'/ /| |
|
||||
: : | ' |' | |' | ,---. ,--.--. ,--.'|' | || ,---. : | |,--. ,--.--. / / ' ,---. ' | |' | |
|
||||
| ' ' ; :| | ,'/ \ / \ | | ,', | |,/ \ | : ' | / \ | : /`./ / \ | | ,' |
|
||||
' | ; . |' : / / / | .--. .-. | | | / | |--'/ / ' | | /' :.--. .-. | | : ;_ / / |' : / |
|
||||
| | : | '| | ' . ' / | \__\/: . . | : | | , . ' / ' : | | | \__\/: . . \ \ `. . ' / || | ' |
|
||||
' : | / ; ; : | ' ; /| ," .--.; | | : | |/ ' ; :__ | | ' | : ," .--.; | `----. \' ; /|; : | |
|
||||
| | '` ,/ | , ; ' | / | / / ,. | | | |`-' ' | '.'|| : :_:,'/ / ,. | / /`--' /' | / || , ; |
|
||||
; : .' ---' | : |; : .' \| ;/ | : :| | ,' ; : .' \'--'. / | : | ---' |
|
||||
| ,.' \ \ / | , .-./'---' \ \ / `--'' | , .-./ `--'---' \ \ / |
|
||||
'---' `----' `--`---' `----' `--`---' `----' |
|
||||
|
|
||||
@ -1,108 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- depository --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.AccesstoAddressMapper"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="accesstoAddress" type="com.dreamchaser.depository_manage.entity.AccesstoAddress"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="name" property="name" jdbcType="VARCHAR" /> |
|
||||
<result column="url" property="url" jdbcType="VARCHAR" /> |
|
||||
<result column="type" property="type" jdbcType="INTEGER" /> |
|
||||
<result column="role_id" property="role_id" jdbcType="INTEGER" /> |
|
||||
<result column="menuparent" property="menuparent" jdbcType="INTEGER" /> |
|
||||
<result column="state" property="state" jdbcType="INTEGER" /> |
|
||||
<result column="icon" property="icon" jdbcType="VARCHAR"/> |
|
||||
<result column="target" property="target" jdbcType="VARCHAR"/> |
|
||||
<result column="ischild" property="ischild" jdbcType="INTEGER"/> |
|
||||
</resultMap> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 end. --> |
|
||||
|
|
||||
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
a.id,a.name,a.url ,a.`type` ,a.role_id ,a.menuparent ,a.state,a.icon,a.target,a.ischild |
|
||||
</sql> |
|
||||
|
|
||||
<select id="findAllMenus" resultMap="accesstoAddress"> |
|
||||
select |
|
||||
<include refid="allColumns"></include> |
|
||||
from accesstoaddress a |
|
||||
where a.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<select id="findAccessstoAddressByParentAndRole" resultMap="accesstoAddress" parameterType="map"> |
|
||||
select |
|
||||
<include refid="allColumns"/> |
|
||||
from accesstoaddress a |
|
||||
where 1 = 1 |
|
||||
<if test="roleId != null and roleId != ''"> |
|
||||
and a.role_id = #{roleId} |
|
||||
</if> |
|
||||
<if test="menuparent != null and menuparent != ''"> |
|
||||
and a.menuparent = #{menuparent} |
|
||||
</if> |
|
||||
and a.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<select id="findMenusByRole" resultMap="accesstoAddress" parameterType="map"> |
|
||||
select |
|
||||
<include refid="allColumns"/> |
|
||||
from accesstoaddress a |
|
||||
where 1 = 1 |
|
||||
<if test="type != null and type != ''"> |
|
||||
and type = #{type} |
|
||||
</if> |
|
||||
<if test="roleId != null and roleId != ''"> |
|
||||
and a.role_id = #{roleId} |
|
||||
</if> |
|
||||
<if test="menuparent != null and menuparent != ''"> |
|
||||
and a.menuparent = #{menuparent} |
|
||||
</if> |
|
||||
and a.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<select id="findMenusByNoParent" resultMap="accesstoAddress"> |
|
||||
select |
|
||||
<include refid="allColumns"></include> |
|
||||
from accesstoaddress a |
|
||||
where 1 = 1 |
|
||||
and a.menuparent = 0 |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<select id="findAccessstoAddressByParent" resultMap="accesstoAddress" parameterType="INTEGER"> |
|
||||
select |
|
||||
<include refid="allColumns"></include> |
|
||||
from accesstoaddress a |
|
||||
where 1 = 1 |
|
||||
and a.menuparent = #{id} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<select id="findAccessToAddressByUser" resultMap="accesstoAddress" parameterType="map"> |
|
||||
select |
|
||||
<include refid="allColumns"/> |
|
||||
from |
|
||||
AccessToAddressByUser a |
|
||||
where authority = #{roleId} |
|
||||
<if test="userId != '' and userId != null "> |
|
||||
and uid = #{userId} |
|
||||
</if> |
|
||||
<if test="menuparent != null and menuparent != ''"> |
|
||||
and menuparent = #{menuparent} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<select id="findAccessToAddressByList" resultMap="accesstoAddress" parameterType="list"> |
|
||||
select |
|
||||
<include refid="allColumns"/> |
|
||||
from accesstoaddress a |
|
||||
where a.id in |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</select> |
|
||||
</mapper> |
|
||||
@ -1,35 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- depository --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.CallBackLogMapper"> |
|
||||
<resultMap id="callBackMap" type="com.dreamchaser.depository_manage.entity.CallBackLog"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="msg_signature" property="msg_signature" jdbcType="VARCHAR" /> |
|
||||
<result column="timestamp" property="timestamp" jdbcType="INTEGER" /> |
|
||||
<result column="nonce" property="nonce" jdbcType="VARCHAR" /> |
|
||||
<result column="echostr" property="echostr" jdbcType="VARCHAR" /> |
|
||||
<result column="xmlstr" property="xmlstr" jdbcType="VARCHAR" /> |
|
||||
<result column="jsonstr" property="jsonstr" jdbcType="VARCHAR" /> |
|
||||
<result column="reqdata" property="reqdata" jdbcType="VARCHAR"/> |
|
||||
<result column="addtime" property="addtime" jdbcType="INTEGER"/> |
|
||||
</resultMap> |
|
||||
|
|
||||
<insert id="addCallBackLog"> |
|
||||
|
|
||||
INSERT INTO callback_log ( |
|
||||
id, msg_signature, timestamp,nonce,echostr,xmlstr,jsonstr,reqdata,addtime |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{msg_signature}, |
|
||||
#{timestamp}, |
|
||||
#{nonce}, |
|
||||
#{echostr}, |
|
||||
#{xmlstr}, |
|
||||
#{jsonstr}, |
|
||||
#{reqdata}, |
|
||||
#{addtime} |
|
||||
) |
|
||||
|
|
||||
</insert> |
|
||||
</mapper> |
|
||||
@ -1,168 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- depository --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.CompanyMapper"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="companyMap" type="com.dreamchaser.depository_manage.entity.Company"> |
|
||||
<id column="cid" property="cid" jdbcType="INTEGER" /> |
|
||||
<result column="cname" property="cname" jdbcType="VARCHAR" /> |
|
||||
<result column="state" property="state" jdbcType="INTEGER"/> |
|
||||
<result column="parentId" property="parentId" jdbcType="INTEGER"/> |
|
||||
<result column="introduce" property="introduce" jdbcType="VARCHAR"/> |
|
||||
</resultMap> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 end. --> |
|
||||
|
|
||||
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
c.cid, c.cname ,c.state , c.parentId,c.introduce |
|
||||
</sql> |
|
||||
|
|
||||
<!-- 查询所有数据 --> |
|
||||
<select id="findCompanyAll" resultMap="companyMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM company c |
|
||||
Where c.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<select id="findcompanyById" resultMap="companyMap" parameterType="int"> |
|
||||
select <include refid="allColumns"/> |
|
||||
from company c |
|
||||
where c.cid = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据条件查询公司--> |
|
||||
<select id="findCompanyByCondition" resultMap="companyMap" parameterType="map"> |
|
||||
select |
|
||||
<include refid="allColumns"/> |
|
||||
from company c |
|
||||
where 1 = 1 |
|
||||
<if test="id != null and id !=''"> |
|
||||
and c.cid = #{id} |
|
||||
</if> |
|
||||
<if test="cname != null and cname != ''"> |
|
||||
and c.cname LIKE CONCAT('%', #{cname}, '%') |
|
||||
</if> |
|
||||
<if test="introduce != null and introduce !=''"> |
|
||||
and c.introduce LIKE CONCAT('%', #{introduce}, '%') |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
AND c.parentId = #{parentId} |
|
||||
</if> |
|
||||
<if test="state != null"> |
|
||||
and c.state = #{state} |
|
||||
</if> |
|
||||
and c.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据条件参数查询数据列表数目 --> |
|
||||
<select id="findCountByCondition" resultType="int" parameterType="map"> |
|
||||
SELECT count(*) |
|
||||
from company c |
|
||||
where 1 = 1 |
|
||||
<if test="id != null and id !=''"> |
|
||||
and c.cid = #{id} |
|
||||
</if> |
|
||||
<if test="cname != null and cname != ''"> |
|
||||
and c.cname LIKE CONCAT('%', #{cname}, '%') |
|
||||
</if> |
|
||||
<if test="introduce != null and introduce !=''"> |
|
||||
and c.introduce LIKE CONCAT('%', #{introduce}, '%') |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
AND c.parentId = #{parentId} |
|
||||
</if> |
|
||||
and c.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<!--根据父级查询公司信息--> |
|
||||
<select id="findCompanyByParentId" resultMap="companyMap" parameterType="int"> |
|
||||
select |
|
||||
<include refid="allColumns"/> |
|
||||
from company c |
|
||||
where c.state != 3 and c.parentId = #{parentId} |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据主键删除数据 --> |
|
||||
<delete id="deleteCompanyById" parameterType="int"> |
|
||||
DELETE FROM company WHERE cid = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据主键批量删除数据 --> |
|
||||
<delete id="deleteCompanyByIds" parameterType="list"> |
|
||||
DELETE FROM company WHERE cid IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 修改数据 --> |
|
||||
<update id="updateCompany" parameterType="map"> |
|
||||
UPDATE company |
|
||||
<set> |
|
||||
<if test="cname != null"> |
|
||||
cname = #{cname}, |
|
||||
</if> |
|
||||
<if test="introduce != null"> |
|
||||
introduce = #{introduce}, |
|
||||
</if> |
|
||||
<if test="state != null"> |
|
||||
state = #{state}, |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
parentId = #{parentId} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE cid = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!--插入数据--> |
|
||||
<insert id="insertCompany" parameterType="map"> |
|
||||
INSERT INTO company ( |
|
||||
cid, cname, introduce,parentId |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{cname}, |
|
||||
#{introduce}, |
|
||||
#{parentId} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 根据主键将状态改为删除--> |
|
||||
<update id="changeStateToDeletedById" parameterType="int"> |
|
||||
update company |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where cid = #{id} |
|
||||
</update> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键批量将状态改为删除--> |
|
||||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|
||||
update company |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where cid in |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
|
|
||||
<update id="updateStateByParam" parameterType="map"> |
|
||||
update company |
|
||||
<set> |
|
||||
state = #{state} |
|
||||
</set> |
|
||||
where cid = #{cid} |
|
||||
<if test="oldState != null"> |
|
||||
and state = #{oldState} |
|
||||
</if> |
|
||||
and state != 3 |
|
||||
</update> |
|
||||
</mapper> |
|
||||
@ -1,350 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- depository --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.DepositoryMapper"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="depositoryMap" type="com.dreamchaser.depository_manage.entity.Depository"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="dname" property="dname" jdbcType="VARCHAR" /> |
|
||||
<result column="address" property="address" jdbcType="VARCHAR" /> |
|
||||
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
|
||||
<result column="parentId" property="parentId" jdbcType="INTEGER"/> |
|
||||
<result column="cid" property="cid" jdbcType="INTEGER"/> |
|
||||
<result column="code" property="code" jdbcType="VARCHAR"/> |
|
||||
<result column="adminorg" property="adminorg" jdbcType="VARCHAR"/> |
|
||||
<result column="minNumber" property="minNumber" jdbcType="INTEGER"/> |
|
||||
<result column="maxNumber" property="maxNumber" jdbcType="INTEGER"/> |
|
||||
</resultMap> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 end. --> |
|
||||
|
|
||||
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
d.id, d.dname, d.address, d.introduce,d.state,d.parentId,d.cid,d.code,d.adminorg,d.maxNumber,d.minNumber |
|
||||
</sql> |
|
||||
<!-- 视图查询字段--> |
|
||||
<sql id="depositoryAndCompany"> |
|
||||
id,dname,address,introduce,state,parentId,cid,cname,code,adminorg,minNumber,maxNumber |
|
||||
</sql> |
|
||||
<!-- This code was generated by TableGo tools, mark 2 end. --> |
|
||||
|
|
||||
<!-- 根据id获取仓库名称 --> |
|
||||
<select id="findDepositoryNameById" resultType="string" parameterType="int"> |
|
||||
SELECT |
|
||||
d.dname |
|
||||
FROM depository d where d.id=#{id} |
|
||||
</select> |
|
||||
|
|
||||
<!-- <!– 查询所有数据 –> |
|
||||
<select id="findDepositoryAll" resultMap="depositoryMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM depository d |
|
||||
Where d.state != 3 |
|
||||
</select>--> |
|
||||
|
|
||||
<!-- 查询所有数据 --> |
|
||||
<select id="findDepositoryAll" resultMap="depositoryMap"> |
|
||||
SELECT |
|
||||
<include refid="depositoryAndCompany" /> |
|
||||
FROM depositoryandcompany dc |
|
||||
Where dc.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<!-- 获取当前部门仓库以及公共仓库--> |
|
||||
<select id="findDepositoryByAdminorg" resultMap="depositoryMap" parameterType="string"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM depository d WHERE 1 = 1 and d.state != 3 |
|
||||
<if test="adminorg != null and adminorg != ''"> |
|
||||
and d.adminorg = #{adminorg} |
|
||||
</if> |
|
||||
or d.adminorg = '' |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据仓库编码获取仓库--> |
|
||||
<select id="findDepositoryByCode" resultMap="depositoryMap" parameterType="string"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM depository d WHERE 1 = 1 and d.state != 3 |
|
||||
<if test="depositoryCode != null and depositoryCode !=''"> |
|
||||
and d.code = #{depositoryCode} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<select id="findDepositoryByAdminorgAndParent" resultMap="depositoryMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM depository d WHERE 1 = 1 |
|
||||
<if test="adminorg != null and adminorg != ''"> |
|
||||
and (d.adminorg = #{adminorg} or d.adminorg = 361) |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
AND d.parentId = #{parentId} |
|
||||
</if> |
|
||||
or d.adminorg = '' and d.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键查询多个数据--> |
|
||||
<select id="selectDepositoryRecordByIds" parameterType="list" resultMap="depositoryMap"> |
|
||||
select |
|
||||
<include refid="allColumns"></include> |
|
||||
FROM depository WHERE id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</select> |
|
||||
<!-- 根据条件查询数据列表 --> |
|
||||
<select id="findDepositoryRecordPByCondition" resultMap="depositoryMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM depository d WHERE 1 = 1 |
|
||||
<if test="depositoryId != null"> |
|
||||
AND d.id = #{depositoryId} |
|
||||
</if> |
|
||||
<if test="dname != null and dname != ''"> |
|
||||
AND d.dname LIKE CONCAT('%', #{dname}, '%') |
|
||||
</if> |
|
||||
<if test="address != null and address != ''"> |
|
||||
AND d.address LIKE CONCAT('%', #{address}, '%') |
|
||||
</if> |
|
||||
<if test="introduce != null and introduce != ''"> |
|
||||
AND d.introduce LIKE CONCAT('%', #{introduce}, '%') |
|
||||
</if> |
|
||||
<if test="state != null and state != '' "> |
|
||||
AND d.state = #{state} |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
AND d.parentId = #{parentId} |
|
||||
</if> |
|
||||
<if test="cid != null"> |
|
||||
and d.cid = #{cid} |
|
||||
</if> |
|
||||
<if test="adminorg != null"> |
|
||||
and (d.adminorg = #{adminorg} or d.adminorg = '') |
|
||||
</if> |
|
||||
AND d.state != 3 |
|
||||
<if test="begin != null and size != null"> |
|
||||
LIMIT #{begin},#{size} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 根据条件参数查询数据列表数目 --> |
|
||||
<select id="findCountByCondition" resultType="int" parameterType="map"> |
|
||||
SELECT count(*) |
|
||||
FROM depository d WHERE 1 = 1 |
|
||||
<if test="dname != null and dname != ''"> |
|
||||
AND d.dname LIKE CONCAT('%', #{dname}, '%') |
|
||||
</if> |
|
||||
<if test="address != null and address != ''"> |
|
||||
AND d.address LIKE CONCAT('%', #{address}, '%') |
|
||||
</if> |
|
||||
<if test="introduce != null and introduce != ''"> |
|
||||
AND d.introduce LIKE CONCAT('%', #{introduce}, '%') |
|
||||
</if> |
|
||||
<if test="state != null and state != '' "> |
|
||||
AND d.state = #{state} |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
AND d.parentId = #{parentId} |
|
||||
</if> |
|
||||
<if test="cid != null"> |
|
||||
and d.cid = #{cid} |
|
||||
</if> |
|
||||
<if test="adminorg != null"> |
|
||||
and d.adminorg = #{adminorg} |
|
||||
</if> |
|
||||
AND d.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<select id="getParentByDepository" resultMap="depositoryMap" parameterType="int"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM depository d WHERE d.parentId = #{parentId} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键查询数据--> |
|
||||
<select id="findDepositoryRecordById" resultMap="depositoryMap" parameterType="Integer"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM depository d WHERE d.id = #{id} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!-- 插入数据 --> |
|
||||
<insert id="insertDepository" parameterType="map"> |
|
||||
INSERT INTO depository ( |
|
||||
id, dname, address, introduce,parentId,cid,code,adminorg,maxNumber,minNumber |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{dname}, |
|
||||
#{address}, |
|
||||
#{introduce}, |
|
||||
#{parentId}, |
|
||||
#{cid}, |
|
||||
#{code}, |
|
||||
#{adminorg}, |
|
||||
#{maxNumber}, |
|
||||
#{minNumber} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 批量插入数据 |
|
||||
<insert id="insertDepositorys" parameterType="list"> |
|
||||
INSERT INTO depository ( |
|
||||
id, dname, address, introduce |
|
||||
) VALUES |
|
||||
<foreach collection="list" index="index" item="item" separator=","> |
|
||||
( |
|
||||
#{item.id}, |
|
||||
#{item.dname}, |
|
||||
#{item.address}, |
|
||||
#{item.introduce} |
|
||||
) |
|
||||
</foreach> |
|
||||
</insert> |
|
||||
--> |
|
||||
|
|
||||
<!-- 修改数据 --> |
|
||||
<update id="updateDepository" parameterType="map"> |
|
||||
UPDATE depository |
|
||||
<set> |
|
||||
<if test="dname != null"> |
|
||||
dname = #{dname}, |
|
||||
</if> |
|
||||
<if test="address != null"> |
|
||||
address = #{address}, |
|
||||
</if> |
|
||||
<if test="introduce != null"> |
|
||||
introduce = #{introduce}, |
|
||||
</if> |
|
||||
<if test="state != null"> |
|
||||
state = #{state}, |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
parentId = #{parentId}, |
|
||||
</if> |
|
||||
<if test="cid != null"> |
|
||||
cid = #{cid}, |
|
||||
</if> |
|
||||
<if test="adminorg != null"> |
|
||||
adminorg = #{adminorg}, |
|
||||
</if> |
|
||||
<if test="code != null"> |
|
||||
code = #{code}, |
|
||||
</if> |
|
||||
<if test="minNumber != null and minNumber != ''"> |
|
||||
minNumber = #{minNumber}, |
|
||||
</if> |
|
||||
<if test="maxNumber != null and maxNumber != ''"> |
|
||||
maxNumber = #{maxNumber} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
|
|
||||
<!-- 批量修改数据 |
|
||||
<update id="updateDepositorys" parameterType="list"> |
|
||||
<foreach collection="list" index="index" item="item" separator=";"> |
|
||||
UPDATE depository |
|
||||
<set> |
|
||||
<if test="item.dname != null"> |
|
||||
dname = #{item.dname}, |
|
||||
</if> |
|
||||
<if test="item.address != null"> |
|
||||
address = #{item.address}, |
|
||||
</if> |
|
||||
<if test="item.introduce != null"> |
|
||||
introduce = #{item.introduce} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{item.id} |
|
||||
</foreach> |
|
||||
</update>--> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键删除数据 --> |
|
||||
<delete id="deleteDepositoryRecordById" parameterType="int"> |
|
||||
DELETE FROM depository WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键批量删除数据--> |
|
||||
<delete id="deleteDepositoryRecordByIds" parameterType="list"> |
|
||||
DELETE FROM depository WHERE id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据主键将状态改为删除--> |
|
||||
<update id="changeStateToDeletedById" parameterType="int"> |
|
||||
UPDATE depository |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateStateByParam" parameterType="map"> |
|
||||
UPDATE depository |
|
||||
<set> |
|
||||
state = #{state} |
|
||||
</set> |
|
||||
|
|
||||
where id = #{id} |
|
||||
<if test="oldState != null"> |
|
||||
and state = #{oldState} |
|
||||
</if> |
|
||||
and state != 3 |
|
||||
</update> |
|
||||
|
|
||||
<!-- 根据主键批量将状态改为删除--> |
|
||||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|
||||
update depository |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where id in |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
|
|
||||
<!-- 获取仓库总数--> |
|
||||
<select id="findAllCountByState" resultType="int"> |
|
||||
select count(*) |
|
||||
from depository d |
|
||||
where d.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<select id="getToDayInventoryByDName" resultType="double" parameterType="map"> |
|
||||
select ifnull(sum(quantity),0.0) |
|
||||
from depositoryAndmaterial |
|
||||
where 1 = 1 |
|
||||
<if test="dname != null and dname !=''"> |
|
||||
and dname = #{dname} |
|
||||
</if> |
|
||||
<if test="dcode != null and dcode !=''"> |
|
||||
and dcode = #{dcode} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<select id="findUserNameByDepositoryId" resultType="string" parameterType="int"> |
|
||||
select uname |
|
||||
from depositoryanduser |
|
||||
where did = #{depositoryId} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,486 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- 产品信息记录(库存)(material) --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.MaterialMapper"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="materialMap" type="com.dreamchaser.depository_manage.entity.Material"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
|
||||
<result column="mname" property="mname" jdbcType="VARCHAR" /> |
|
||||
<result column="quantity" property="quantity" jdbcType="VARCHAR" /> |
|
||||
<result column="price" property="price" jdbcType="DOUBLE" /> |
|
||||
<result column="type_id" property="typeId" jdbcType="INTEGER" /> |
|
||||
<result column="state" property="state" jdbcType="INTEGER" /> |
|
||||
<result column="code" property="code" jdbcType="INTEGER"/> |
|
||||
<result column="version" property="version" jdbcType="VARCHAR"/> |
|
||||
<result column="amounts" property="amounts" jdbcType="DOUBLE"/> |
|
||||
<result column="unit" property="unit" jdbcType="VARCHAR"/> |
|
||||
<result column="texture" property="texture" jdbcType="VARCHAR"/> |
|
||||
<result column="number_of_temporary" property="numberOfTemporary" jdbcType="VARCHAR"/> |
|
||||
</resultMap> |
|
||||
|
|
||||
<!-- 字段映射--> |
|
||||
<resultMap id="materialAndTypeMap" type="com.dreamchaser.depository_manage.entity.Material"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
|
||||
<result column="mname" property="mname" jdbcType="VARCHAR" /> |
|
||||
<result column="quantity" property="quantity" jdbcType="VARCHAR" /> |
|
||||
<result column="price" property="price" jdbcType="VARCHAR" /> |
|
||||
<result column="type_id" property="typeId" jdbcType="INTEGER" /> |
|
||||
<result column="state" property="state" jdbcType="INTEGER" /> |
|
||||
<result column="code" property="code" jdbcType="INTEGER"/> |
|
||||
<result column="version" property="version" jdbcType="VARCHAR"/> |
|
||||
<result column="amounts" property="amounts" jdbcType="DOUBLE"/> |
|
||||
<result column="unit" property="unit" jdbcType="VARCHAR"/> |
|
||||
<result column="texture" property="texture" jdbcType="VARCHAR"/> |
|
||||
<result column="depositoryCode" property="depositoryCode" jdbcType="VARCHAR"/> |
|
||||
<association property="materialType" column="typeId" javaType="com.dreamchaser.depository_manage.entity.MaterialType"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="tname" property="tname" jdbcType="VARCHAR" /> |
|
||||
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
|
||||
</association> |
|
||||
<association property="depository" column="depositoryId" javaType="com.dreamchaser.depository_manage.entity.Depository"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="dname" property="dname" jdbcType="VARCHAR" /> |
|
||||
<result column="address" property="address" jdbcType="VARCHAR" /> |
|
||||
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
|
||||
</association> |
|
||||
</resultMap> |
|
||||
|
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
m.id, m.depository_id, m.mname, m.quantity, m.price, m.type_id,m.state,m.code ,m.version ,m.amounts ,m.unit ,m.texture,m.depositoryCode,m.number_of_temporary |
|
||||
</sql> |
|
||||
|
|
||||
<!-- 表查询字段,包括物料类型 --> |
|
||||
<sql id="allColumnsAndTypeName"> |
|
||||
id,depository_id,mname,quantity,price,type_id,state,code ,version ,amounts ,unit ,texture,tname,depositoryCode,dname |
|
||||
</sql> |
|
||||
|
|
||||
<!-- 表查询字段,包括物料类型 用于视图--> |
|
||||
<sql id="allColumnsAndTypeNameOnView"> |
|
||||
id,depository_id,mname,quantity,price,type_id,state,tname,dname,version,amounts ,unit ,texture,code,depositoryCode |
|
||||
</sql> |
|
||||
<!-- 查询所有数据的条数 --> |
|
||||
<select id="findCount" resultType="integer"> |
|
||||
SELECT |
|
||||
count(*) |
|
||||
FROM material m |
|
||||
</select> |
|
||||
|
|
||||
<!-- 查询所有符合条件的数据条数 --> |
|
||||
<select id="findCountByCondition" parameterType="map" resultType="integer"> |
|
||||
SELECT |
|
||||
count(*) |
|
||||
FROM material m WHERE 1 = 1 |
|
||||
<if test="depositoryId != null"> |
|
||||
AND m.depository_id = #{depositoryId} |
|
||||
</if> |
|
||||
<if test="mname != null and mname != ''"> |
|
||||
AND m.mname LIKE CONCAT('%', #{mname}, '%') |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
AND m.quantity = #{quantity} |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
AND m.price = #{price} |
|
||||
</if> |
|
||||
<if test="typeId != null"> |
|
||||
AND m.type_id = #{typeId} |
|
||||
</if> |
|
||||
and state != 3 and m.depository_id is null |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 根据条件参数查询数据列表 --> |
|
||||
<select id="findMaterialByCondition" resultMap="materialMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumnsAndTypeNameOnView" /> |
|
||||
from findMaterial |
|
||||
where 1 = 1 |
|
||||
<if test="mid != null"> |
|
||||
and id = #{mid} |
|
||||
</if> |
|
||||
<if test="depositoryId != null"> |
|
||||
AND depository_id = #{depositoryId} |
|
||||
</if> |
|
||||
<if test="mname != null and mname != ''"> |
|
||||
AND mname LIKE CONCAT('%', #{mname}, '%') |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
AND quantity = #{quantity} |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
AND price = #{price} |
|
||||
</if> |
|
||||
<if test="materialTypeId != null"> |
|
||||
AND type_id = #{materialTypeId} |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
And state = #{state} |
|
||||
</if> |
|
||||
<if test="code != null and code != '' "> |
|
||||
and code = #{code} |
|
||||
</if> |
|
||||
and depository_id is null |
|
||||
<if test="begin != null and size != null"> |
|
||||
LIMIT #{begin},#{size} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<!--根据条件查询库存--> |
|
||||
<select id="findInventory" resultMap="materialMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumnsAndTypeNameOnView" /> |
|
||||
from findMaterial |
|
||||
where 1 = 1 |
|
||||
<if test="mid != null"> |
|
||||
and id = #{mid} |
|
||||
</if> |
|
||||
<if test="depositoryId != null"> |
|
||||
AND depository_id = #{depositoryId} |
|
||||
</if> |
|
||||
<if test="mname != null and mname != ''"> |
|
||||
AND mname LIKE CONCAT('%', #{mname}, '%') |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
AND quantity = #{quantity} |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
AND price = #{price} |
|
||||
</if> |
|
||||
<if test="materialTypeId != null"> |
|
||||
AND type_id = #{materialTypeId} |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
And state = #{state} |
|
||||
</if> |
|
||||
<if test="code != null and code != '' "> |
|
||||
and code = #{code} |
|
||||
</if> |
|
||||
and depository_id is not null |
|
||||
<if test="begin != null and size != null"> |
|
||||
LIMIT #{begin},#{size} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<select id="findInventoryCount" parameterType="map" resultType="int"> |
|
||||
SELECT |
|
||||
count(*) |
|
||||
from findMaterial |
|
||||
where 1 = 1 |
|
||||
<if test="mid != null"> |
|
||||
and id = #{mid} |
|
||||
</if> |
|
||||
<if test="depositoryId != null"> |
|
||||
AND depository_id = #{depositoryId} |
|
||||
</if> |
|
||||
<if test="mname != null and mname != ''"> |
|
||||
AND mname LIKE CONCAT('%', #{mname}, '%') |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
AND quantity = #{quantity} |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
AND price = #{price} |
|
||||
</if> |
|
||||
<if test="materialTypeId != null"> |
|
||||
AND type_id = #{materialTypeId} |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
And state = #{state} |
|
||||
</if> |
|
||||
<if test="code != null and code != '' "> |
|
||||
and code = #{code} |
|
||||
</if> |
|
||||
and depository_id is not null |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据仓库查询物料--> |
|
||||
<select id="findMaterialByDepositorys" resultMap="materialMap" parameterType="list"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
from material m |
|
||||
where m.depository_id in |
|
||||
<foreach collection="list" index="index" item="item" open="(" |
|
||||
separator="," close=")"> |
|
||||
#{item} |
|
||||
</foreach> |
|
||||
</select> |
|
||||
|
|
||||
<select id="findMaterialByDepositorysAndType" resultMap="materialMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
from material m |
|
||||
where m.depository_id in |
|
||||
<foreach collection="list" index="index" item="item" open="(" |
|
||||
separator="," close=")"> |
|
||||
#{item} |
|
||||
</foreach> |
|
||||
and m.type_id = #{materialTypeId} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!-- 根据仓库查询物料--> |
|
||||
<select id="findMaterialByDepository" resultMap="materialMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
from material m |
|
||||
where m.depository_id = #{depositoryId} |
|
||||
<if test="begin != null and size != null"> |
|
||||
LIMIT #{begin},#{size} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据仓库查询物料总数--> |
|
||||
<select id="findMaterialByDepositoryCount" resultType="int" parameterType="map"> |
|
||||
SELECT |
|
||||
COUNT(*) |
|
||||
from material m |
|
||||
where m.depository_id = #{depositoryId} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键查询数据 --> |
|
||||
<select id="findMaterialById" resultMap="materialMap" parameterType="integer"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM material m WHERE m.id =#{id} |
|
||||
</select> |
|
||||
|
|
||||
<select id="findMaterialAndTypeById" resultMap="materialAndTypeMap" parameterType="integer"> |
|
||||
select |
|
||||
<include refid="allColumnsAndTypeName"/> |
|
||||
from materialAndType |
|
||||
where id = #{id} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键查询数据 --> |
|
||||
<select id="findMaterialByIds" resultMap="materialMap" parameterType="list"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM material m WHERE m.id IN |
|
||||
<foreach collection="ids" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 插入数据 --> |
|
||||
<insert id="insertMaterial" parameterType="map" useGeneratedKeys="true" keyProperty="id"> |
|
||||
INSERT INTO material ( |
|
||||
id, depository_id, mname, quantity, price, type_id,code,unit,version,texture,amounts,depositoryCode |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
<if test="depositoryId != null"> |
|
||||
#{depositoryId}, |
|
||||
</if> |
|
||||
<if test="depositoryId == null"> |
|
||||
null, |
|
||||
</if> |
|
||||
#{mname}, |
|
||||
<if test="quantity != null"> |
|
||||
#{quantity}, |
|
||||
</if> |
|
||||
<if test="quantity == null"> |
|
||||
0, |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
#{price}, |
|
||||
</if> |
|
||||
<if test="price == null"> |
|
||||
0, |
|
||||
</if> |
|
||||
#{materialTypeId}, |
|
||||
#{code}, |
|
||||
#{unit}, |
|
||||
#{version}, |
|
||||
#{texture}, |
|
||||
<if test="amounts != null"> |
|
||||
#{amounts}, |
|
||||
</if> |
|
||||
<if test="amounts == null"> |
|
||||
0, |
|
||||
</if> |
|
||||
<if test="depositoryCode != null"> |
|
||||
#{depositoryCode} |
|
||||
</if> |
|
||||
<if test="depositoryCode == null"> |
|
||||
'' |
|
||||
</if> |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 批量插入数据--> |
|
||||
<insert id="insertMaterials" parameterType="list"> |
|
||||
INSERT INTO material ( |
|
||||
id, depository_id, mname, quantity, price, type_id,code,unit,version,texture,amounts,depositoryCode |
|
||||
) VALUES |
|
||||
<foreach collection="list" index="index" item="item" separator=","> |
|
||||
( |
|
||||
#{item.id}, |
|
||||
#{item.depositoryId}, |
|
||||
#{item.mname}, |
|
||||
#{item.quantity}, |
|
||||
#{item.price}, |
|
||||
#{item.typeId}, |
|
||||
#{item.code}, |
|
||||
#{item.unit}, |
|
||||
#{item.version}, |
|
||||
#{item.texture}, |
|
||||
#{item.amounts}, |
|
||||
#{item.depositoryCode} |
|
||||
) |
|
||||
</foreach> |
|
||||
</insert> |
|
||||
|
|
||||
|
|
||||
<!-- 修改数据 --> |
|
||||
<update id="updateMaterial"> |
|
||||
UPDATE material |
|
||||
<set> |
|
||||
<if test="depositoryId != null"> |
|
||||
depository_id = #{depositoryId}, |
|
||||
</if> |
|
||||
<if test="mname != null"> |
|
||||
mname = #{mname}, |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
quantity = #{quantity}, |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
price = #{price}, |
|
||||
</if> |
|
||||
<if test="typeId != null"> |
|
||||
type_id = #{typeId}, |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
state = #{state}, |
|
||||
</if> |
|
||||
<if test="amounts != null and amounts != ''"> |
|
||||
amounts = #{amounts}, |
|
||||
</if> |
|
||||
<if test="version != null and version != ''"> |
|
||||
version = #{version}, |
|
||||
</if> |
|
||||
<if test="code != null and code != ''"> |
|
||||
code = #{code}, |
|
||||
</if> |
|
||||
<if test="unit != null and unit != ''"> |
|
||||
unit = #{unit}, |
|
||||
</if> |
|
||||
<if test="depositoryCode != null and depositoryCode !=''"> |
|
||||
depositoryCode = #{depositoryCode}, |
|
||||
</if> |
|
||||
<if test="numberOfTemporary != null"> |
|
||||
number_of_temporary = #{numberOfTemporary}, |
|
||||
</if> |
|
||||
<if test="texture != null and texture != ''"> |
|
||||
texture = #{texture} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!-- 根据仓库id和物料名称改变物料的数量 --> |
|
||||
<update id="changeMaterial" parameterType="map"> |
|
||||
UPDATE material |
|
||||
<set> |
|
||||
|
|
||||
<if test='state == "已入库"'> |
|
||||
<if test="price != null"> |
|
||||
quantity = quantity+#{quantity}, |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
price = price + #{price} |
|
||||
</if> |
|
||||
</if> |
|
||||
<if test='state == "已出库"'> |
|
||||
<if test="price != null"> |
|
||||
quantity = quantity - #{quantity}, |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
price = price - #{price} |
|
||||
</if> |
|
||||
</if> |
|
||||
|
|
||||
</set> |
|
||||
WHERE |
|
||||
depository_id = #{depositoryId} and mname = #{mname}, |
|
||||
</update> |
|
||||
|
|
||||
<!-- 批量修改数据 |
|
||||
<update id="updateMaterials" parameterType="list"> |
|
||||
<foreach collection="list" index="index" item="item" separator=";"> |
|
||||
UPDATE material |
|
||||
<set> |
|
||||
<if test="item.depositoryId != null"> |
|
||||
depository_id = #{item.depositoryId}, |
|
||||
</if> |
|
||||
<if test="item.mname != null"> |
|
||||
mname = #{item.mname}, |
|
||||
</if> |
|
||||
<if test="item.quantity != null"> |
|
||||
quantity = #{item.quantity}, |
|
||||
</if> |
|
||||
<if test="item.price != null"> |
|
||||
price = #{item.price}, |
|
||||
</if> |
|
||||
<if test="item.typeId != null"> |
|
||||
type_id = #{item.typeId} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{item.id} |
|
||||
</foreach> |
|
||||
</update>--> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键删除数据 --> |
|
||||
<delete id="deleteMaterialById" parameterType="int"> |
|
||||
DELETE FROM material WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据主键批量删除数据 |
|
||||
<delete id="deleteMaterialByIds" parameterType="list"> |
|
||||
DELETE FROM material WHERE id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete>--> |
|
||||
<!-- 根据主键将状态改为删除--> |
|
||||
<update id="changeStateToDeletedById" parameterType="int"> |
|
||||
UPDATE material |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateStateByParam" parameterType="map"> |
|
||||
UPDATE material |
|
||||
<set> |
|
||||
state = #{state} |
|
||||
</set> |
|
||||
where id = #{id} |
|
||||
<if test="oldState != null"> |
|
||||
and state = #{oldState} |
|
||||
</if> |
|
||||
and state != 3 |
|
||||
</update> |
|
||||
|
|
||||
<!-- 根据主键批量将状态改为删除--> |
|
||||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|
||||
update material |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where id in |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
</mapper> |
|
||||
@ -1,215 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- material_type --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.MaterialTypeMapper"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="materialTypeMap" type="com.dreamchaser.depository_manage.entity.MaterialType"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="tname" property="tname" jdbcType="VARCHAR" /> |
|
||||
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
|
||||
</resultMap> |
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
mt.id, mt.tname, mt.introduce, mt.state,mt.parentId |
|
||||
</sql> |
|
||||
<!-- This code was generated by TableGo tools, mark 2 end. --> |
|
||||
|
|
||||
<!-- 查询所有数据 --> |
|
||||
<select id="findMaterialTypeAll" resultMap="materialTypeMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM material_type mt |
|
||||
where mt.state != 3 and mt.state != 4 |
|
||||
</select> |
|
||||
<!-- 查询所有顶级父类 --> |
|
||||
<select id="findMaterialTypeNoParent" resultMap="materialTypeMap"> |
|
||||
select |
|
||||
<include refid="allColumns" /> |
|
||||
FROM material_type mt |
|
||||
where mt.state != 3 and mt.state != 4 and mt.parentId = 0 |
|
||||
</select> |
|
||||
|
|
||||
<select id="findMaterialTypeCountByCondition" resultType="int" parameterType="map"> |
|
||||
select count(*) |
|
||||
FROM material_type mt WHERE 1 = 1 |
|
||||
<if test="tname != null and tname != ''"> |
|
||||
AND mt.tname LIKE CONCAT('%', #{tname}, '%') |
|
||||
</if> |
|
||||
<if test="introduce != null and introduce != ''"> |
|
||||
AND mt.introduce LIKE CONCAT('%', #{introduce}, '%') |
|
||||
</if> |
|
||||
<if test="state != null and state != ''" > |
|
||||
and mt.state = #{state} |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
and mt.parentId = #{parentId} |
|
||||
</if> |
|
||||
and mt.state != 3 and mt.state != 4 |
|
||||
</select> |
|
||||
<!-- 根据条件参数查询数据列表 --> |
|
||||
<select id="findMaterialTypeByCondition" resultMap="materialTypeMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM material_type mt WHERE 1 = 1 |
|
||||
<if test="tname != null and tname != ''"> |
|
||||
AND mt.tname LIKE CONCAT('%', #{tname}, '%') |
|
||||
</if> |
|
||||
<if test="introduce != null and introduce != ''"> |
|
||||
AND mt.introduce LIKE CONCAT('%', #{introduce}, '%') |
|
||||
</if> |
|
||||
<if test="state != null and state != ''" > |
|
||||
and mt.state = #{state} |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
and mt.parentId = #{parentId} |
|
||||
</if> |
|
||||
|
|
||||
and mt.state != 3 and mt.state != 4 |
|
||||
<if test="begin != null and size != null"> |
|
||||
LIMIT #{begin},#{size} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据主键查询数据 --> |
|
||||
<select id="findMaterialTypeNameById" resultType="string" parameterType="integer"> |
|
||||
SELECT |
|
||||
mt.tname |
|
||||
FROM material_type mt WHERE mt.id = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据主键查询数据 --> |
|
||||
<select id="findMaterialTypeById" resultMap="materialTypeMap" parameterType="integer"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM material_type mt WHERE mt.id = #{id} and mt.state != 3 and mt.state != 4 |
|
||||
</select> |
|
||||
<!-- 根据主键查询数据 |
|
||||
<select id="findMaterialTypeByIds" resultMap="materialTypeMap" parameterType="list"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM material_type mt WHERE mt.id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</select>--> |
|
||||
|
|
||||
|
|
||||
<!-- 插入数据 --> |
|
||||
<insert id="insertMaterialType" parameterType="map"> |
|
||||
INSERT INTO material_type ( |
|
||||
id, tname, introduce,parentId |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{tname}, |
|
||||
#{introduce}, |
|
||||
#{parentId} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 批量插入数据 |
|
||||
<insert id="insertMaterialTypes" parameterType="list"> |
|
||||
INSERT INTO material_type ( |
|
||||
id, tname, introduce |
|
||||
) VALUES |
|
||||
<foreach collection="list" index="index" item="item" separator=","> |
|
||||
( |
|
||||
#{item.id}, |
|
||||
#{item.tname}, |
|
||||
#{item.introduce} |
|
||||
) |
|
||||
</foreach> |
|
||||
</insert>--> |
|
||||
|
|
||||
|
|
||||
<!-- 修改数据 --> |
|
||||
<update id="updateMaterialType" parameterType="map"> |
|
||||
UPDATE material_type |
|
||||
<set> |
|
||||
<if test="tname != null"> |
|
||||
tname = #{tname}, |
|
||||
</if> |
|
||||
<if test="introduce != null"> |
|
||||
introduce = #{introduce}, |
|
||||
</if> |
|
||||
<if test="state != null"> |
|
||||
state = #{state}, |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
parentId = #{parentId} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!-- 批量修改数据 --> |
|
||||
<update id="updateMaterialTypes" parameterType="list"> |
|
||||
<foreach collection="list" index="index" item="item" separator=";"> |
|
||||
UPDATE material_type |
|
||||
<set> |
|
||||
<if test="item.tname != null"> |
|
||||
tname = #{item.tname}, |
|
||||
</if> |
|
||||
<if test="item.introduce != null"> |
|
||||
introduce = #{item.introduce} |
|
||||
</if> |
|
||||
<if test="state != null"> |
|
||||
state = #{state} |
|
||||
</if> |
|
||||
<if test="parentId != null"> |
|
||||
parentId = #{parentId} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{item.id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键删除数据 --> |
|
||||
<delete id="deleteMaterialTypeById" parameterType="int"> |
|
||||
DELETE FROM material_type WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据主键批量删除数据--> |
|
||||
<delete id="deleteMaterialTypeByIds" parameterType="list"> |
|
||||
DELETE FROM material_type WHERE id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据主键将状态改为删除--> |
|
||||
<update id="changeStateToDeletedById" parameterType="int"> |
|
||||
update material_type |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键批量将状态改为删除--> |
|
||||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|
||||
update material_type |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where id in |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateStateByParam" parameterType="map"> |
|
||||
update material_type |
|
||||
<set> |
|
||||
state = #{state} |
|
||||
</set> |
|
||||
where id = #{id} |
|
||||
<if test="oldState != null"> |
|
||||
and state = #{oldState} |
|
||||
</if> |
|
||||
and state != 3 and mt.state != 4 |
|
||||
</update> |
|
||||
</mapper> |
|
||||
@ -1,131 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- notice --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.NoticeMapper"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="noticeMap" type="com.dreamchaser.depository_manage.entity.Notice"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="title" property="title" jdbcType="VARCHAR" /> |
|
||||
<result column="content" property="content" jdbcType="VARCHAR" /> |
|
||||
<result column="time" property="time" jdbcType="INTEGER" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
n.id, n.title, n.content, n.time |
|
||||
</sql> |
|
||||
|
|
||||
<!-- 查询所有 --> |
|
||||
<select id="findNoticeAll" resultMap="noticeMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM notice n |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据条件参数查询列表 --> |
|
||||
<select id="findNoticeByCondition" resultMap="noticeMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM notice n WHERE 1 = 1 |
|
||||
<if test="title != null and title != ''"> |
|
||||
AND n.title LIKE CONCAT('%', #{title}, '%') |
|
||||
</if> |
|
||||
<if test="content != null and content != ''"> |
|
||||
AND n.content LIKE CONCAT('%', #{content}, '%') |
|
||||
</if> |
|
||||
<if test="time != null"> |
|
||||
AND n.time = #{time} |
|
||||
</if> |
|
||||
order by n.time DESC |
|
||||
<if test="begin != null and size != null"> |
|
||||
LIMIT #{begin},#{size} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据主键查询信息 --> |
|
||||
<select id="findNoticeByIds" resultMap="noticeMap" parameterType="list"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM notice n WHERE n.id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 新增信息 --> |
|
||||
<insert id="addNotice"> |
|
||||
INSERT INTO notice ( |
|
||||
title, content, time |
|
||||
) VALUES ( |
|
||||
#{title}, |
|
||||
#{content}, |
|
||||
#{time} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 批量新增信息 --> |
|
||||
<insert id="addNotices" parameterType="list"> |
|
||||
INSERT INTO notice ( |
|
||||
id, title, content, time |
|
||||
) VALUES |
|
||||
<foreach collection="list" index="index" item="item" separator=","> |
|
||||
( |
|
||||
#{item.id}, |
|
||||
#{item.title}, |
|
||||
#{item.content}, |
|
||||
#{item.time} |
|
||||
) |
|
||||
</foreach> |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 修改信息 --> |
|
||||
<update id="updateNotice"> |
|
||||
UPDATE notice |
|
||||
<set> |
|
||||
<if test="title != null"> |
|
||||
title = #{title}, |
|
||||
</if> |
|
||||
<if test="content != null"> |
|
||||
content = #{content}, |
|
||||
</if> |
|
||||
<if test="time != null"> |
|
||||
time = #{time} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!-- 批量修改信息 --> |
|
||||
<update id="updateNotices" parameterType="list"> |
|
||||
<foreach collection="list" index="index" item="item" separator=";"> |
|
||||
UPDATE notice |
|
||||
<set> |
|
||||
<if test="item.title != null"> |
|
||||
title = #{item.title}, |
|
||||
</if> |
|
||||
<if test="item.content != null"> |
|
||||
content = #{item.content}, |
|
||||
</if> |
|
||||
<if test="item.time != null"> |
|
||||
time = #{item.time} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{item.id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
<!-- 根据主键删除 --> |
|
||||
<delete id="deleteNoticeById" parameterType="int"> |
|
||||
DELETE FROM notice WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据主键批量删除 --> |
|
||||
<delete id="deleteNoticeByIds" parameterType="list"> |
|
||||
DELETE FROM notice WHERE id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
</mapper> |
|
||||
@ -1,316 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- notice --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.PlaceMapper"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="placeMap" type="com.dreamchaser.depository_manage.entity.Place"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="x" property="x" jdbcType="INTEGER" /> |
|
||||
<result column="y" property="y" jdbcType="INTEGER" /> |
|
||||
<result column="z" property="z" jdbcType="INTEGER" /> |
|
||||
<result column="mid" property="mid" jdbcType="INTEGER" /> |
|
||||
<result column="did" property="did" jdbcType="INTEGER" /> |
|
||||
<result column="code" property="code" jdbcType="VARCHAR" /> |
|
||||
<result column="min" property="min" jdbcType="INTEGER" /> |
|
||||
<result column="max" property="max" jdbcType="INTEGER" /> |
|
||||
<result column="state" property="state" jdbcType="INTEGER" /> |
|
||||
<result column="quantity" property="quantity" jdbcType="INTEGER" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<resultMap id="materialAndPlaceMap" type="com.dreamchaser.depository_manage.entity.MaterialAndPlace"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="mid" property="mid" jdbcType="INTEGER" /> |
|
||||
<result column="pid" property="pid" jdbcType="INTEGER" /> |
|
||||
<result column="did" property="did" jdbcType="INTEGER" /> |
|
||||
<result column="quantity" property="quantity" jdbcType="INTEGER" /> |
|
||||
<result column="max" property="max" jdbcType="INTEGER" /> |
|
||||
<result column="min" property="min" jdbcType="INTEGER" /> |
|
||||
<result column="code" property="code" jdbcType="VARCHAR" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
p.id,p.x,p.y,p.z,p.code,p.mid,p.did,p.min,p.max,p.state,p.quantity |
|
||||
</sql> |
|
||||
|
|
||||
<sql id="allColumnsByMaterialAndPlace"> |
|
||||
mp.id,mp.mid,mp.pid,mp.quantity,p.code,p.max,p.min,p.did |
|
||||
</sql> |
|
||||
|
|
||||
|
|
||||
<!-- 查询所有 --> |
|
||||
<select id="findPlaceAll" resultMap="placeMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM place p |
|
||||
where p.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<select id="findPlaceByMidAndDid" resultMap="placeMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
from materialandplace mp left join place p on p.id = mp.pid |
|
||||
where 1 = 1 |
|
||||
|
|
||||
<if test="mid != null and mid != ''"> |
|
||||
and mp.mid = #{mid} |
|
||||
</if> |
|
||||
<if test="did != null and did != ''"> |
|
||||
and ( p.did = #{did} or p.did = 0) |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据条件参数查询列表 --> |
|
||||
<select id="findPlaceByCondition" resultMap="placeMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM place p WHERE 1 = 1 |
|
||||
<if test="id != null and id != ''"> |
|
||||
and p.id = #{id} |
|
||||
</if> |
|
||||
<if test="x != null and x != ''"> |
|
||||
AND p.x = #{x} |
|
||||
</if> |
|
||||
<if test="y != null and y != ''"> |
|
||||
AND p.y = #{y} |
|
||||
</if> |
|
||||
<if test="z != null and z != ''"> |
|
||||
AND p.z = #{z} |
|
||||
</if> |
|
||||
<if test="code != null and code != ''"> |
|
||||
AND p.code LIKE CONCAT('%', #{code}, '%') |
|
||||
</if> |
|
||||
<if test="mid != null and mid != ''"> |
|
||||
AND find_in_set(#{mid},p.mid) |
|
||||
</if> |
|
||||
<if test="did != null and did != ''"> |
|
||||
AND p.did = #{did} |
|
||||
</if> |
|
||||
<if test="max != null and max != ''"> |
|
||||
AND p.max = #{max} |
|
||||
</if> |
|
||||
<if test="min != null and min != ''"> |
|
||||
AND p.min = #{min} |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
and p.state = #{state} |
|
||||
</if> |
|
||||
and p.state != 3 |
|
||||
<if test="begin != null and size != null"> |
|
||||
LIMIT #{begin},#{size} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<select id="findPlaceCountByCondition" parameterType="map" resultType="int"> |
|
||||
SELECT |
|
||||
count(*) |
|
||||
FROM place p WHERE 1 = 1 |
|
||||
<if test="id != null and id != ''"> |
|
||||
and p.id = #{id} |
|
||||
</if> |
|
||||
<if test="x != null and x != ''"> |
|
||||
AND p.x = #{x} |
|
||||
</if> |
|
||||
<if test="y != null and y != ''"> |
|
||||
AND p.y = #{y} |
|
||||
</if> |
|
||||
<if test="code != null and code != ''"> |
|
||||
AND p.code LIKE CONCAT('%', #{code}, '%') |
|
||||
</if> |
|
||||
<if test="z != null and z != ''"> |
|
||||
AND p.z = #{z} |
|
||||
</if> |
|
||||
<if test="mid != null and mid != ''"> |
|
||||
AND p.mid = #{mid} |
|
||||
</if> |
|
||||
<if test="did != null and did != ''"> |
|
||||
AND p.did = #{did} |
|
||||
</if> |
|
||||
<if test="max != null and max != ''"> |
|
||||
AND p.max = #{max} |
|
||||
</if> |
|
||||
<if test="min != null and min != ''"> |
|
||||
AND p.min = #{min} |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
and p.state = #{state} |
|
||||
</if> |
|
||||
and p.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<select id="findPlaceByDid" parameterType="int" resultMap="placeMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM place p WHERE 1 = 1 and p.did = #{did} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<select id="findPlaceByMid" parameterType="int" resultMap="placeMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and mp.mid = #{mid} |
|
||||
</select> |
|
||||
|
|
||||
<select id="findQuantityByMidAndPid" parameterType="map" resultType="int"> |
|
||||
select quantity |
|
||||
from materialandplace |
|
||||
where pid = #{pid} and mid = #{mid} |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据主键查询信息 --> |
|
||||
<select id="findPlaceById" resultMap="placeMap" parameterType="int"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM place p WHERE p.id = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<select id="findPlaceAndMaterialByPid" resultMap="materialAndPlaceMap" parameterType="int"> |
|
||||
SELECT |
|
||||
<include refid="allColumnsByMaterialAndPlace" /> |
|
||||
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and p.id = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<select id="findPlaceAndMaterialByMidAndPid" resultMap="materialAndPlaceMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumnsByMaterialAndPlace" /> |
|
||||
FROM materialandplace mp left join place p on p.id = mp.pid |
|
||||
where 1 = 1 |
|
||||
<if test="mid != null"> |
|
||||
and mp.mid = #{mid} |
|
||||
</if> |
|
||||
<if test="pid != null"> |
|
||||
and mp.pid = #{pid} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 新增信息 --> |
|
||||
<insert id="InsertPlace"> |
|
||||
INSERT INTO place ( |
|
||||
id,x,y,z,code, mid,did,min,max,state,quantity |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{x}, |
|
||||
#{y}, |
|
||||
#{z}, |
|
||||
#{code}, |
|
||||
#{mid}, |
|
||||
#{did}, |
|
||||
#{min}, |
|
||||
#{max}, |
|
||||
#{state}, |
|
||||
#{quantity} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<insert id="addMaterialOnPlace"> |
|
||||
insert into materialandplace(id,mid,pid,quantity) |
|
||||
values ( |
|
||||
#{id}, |
|
||||
#{mid}, |
|
||||
#{pid}, |
|
||||
#{quantity} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<delete id="delMaterialOnPlace" parameterType="int"> |
|
||||
DELETE FROM materialandplace WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 修改信息 --> |
|
||||
<update id="UpdatePlace"> |
|
||||
UPDATE place |
|
||||
<set> |
|
||||
<if test="x != null"> |
|
||||
x = #{x}, |
|
||||
</if> |
|
||||
<if test="y != null"> |
|
||||
y = #{y}, |
|
||||
</if> |
|
||||
<if test="z != null"> |
|
||||
z = #{z}, |
|
||||
</if> |
|
||||
<if test="code != null"> |
|
||||
code = #{code}, |
|
||||
</if> |
|
||||
<if test="mid != null"> |
|
||||
mid = #{mid}, |
|
||||
</if> |
|
||||
<if test="did != null"> |
|
||||
did = #{did}, |
|
||||
</if> |
|
||||
<if test="min != null"> |
|
||||
min = #{min}, |
|
||||
</if> |
|
||||
<if test="max != null"> |
|
||||
max = #{max}, |
|
||||
</if> |
|
||||
<if test="state != null and state !=''"> |
|
||||
state = #{state}, |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
quantity = #{quantity} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateMaterialAndPlace"> |
|
||||
update materialandplace |
|
||||
<set> |
|
||||
<if test="mid != null"> |
|
||||
mid = #{mid}, |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
quantity = #{quantity}, |
|
||||
</if> |
|
||||
<if test="pid != null"> |
|
||||
pid = #{pid} |
|
||||
</if> |
|
||||
</set> |
|
||||
where id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键删除 --> |
|
||||
<delete id="DelPlace" parameterType="int"> |
|
||||
DELETE FROM place WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键批量将状态改为删除--> |
|
||||
<update id="changeStateToDeletedByIds" parameterType="list"> |
|
||||
update place |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where id in |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
<!-- 根据主键将状态改为删除--> |
|
||||
<update id="changeStateToDeletedById" parameterType="int"> |
|
||||
UPDATE place |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!--获取当前仓库下的行--> |
|
||||
<select id="findPlaceXByDid" parameterType="int" resultType="int"> |
|
||||
select DISTINCT x from place where did = #{did} and state != 3 ORDER BY x desc |
|
||||
</select> |
|
||||
<!--获取当前仓库下的列--> |
|
||||
<select id="findPlaceYByDid" parameterType="map" resultType="int"> |
|
||||
select DISTINCT y from place where did = #{did} and x = #{x} and state != 3 ORDER BY y desc |
|
||||
</select> |
|
||||
<!--获取当前仓库下的ceng--> |
|
||||
<select id="findPlaceZByDid" parameterType="map" resultType="int"> |
|
||||
select DISTINCT z from place where did = #{did} and x = #{x} and state != 3 ORDER BY z desc |
|
||||
</select> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,137 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- user --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.RoleMapper"> |
|
||||
<!-- 字段映射(权限) --> |
|
||||
<resultMap id="roleMap" type="com.dreamchaser.depository_manage.entity.Role"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="name" property="name" jdbcType="VARCHAR" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<!-- 权限映射--> |
|
||||
<resultMap id="postoruserroleMap" type="com.dreamchaser.depository_manage.entity.PostOrUserRole"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="classes" property="classes" jdbcType="INTEGER" /> |
|
||||
<result column="role" property="role" jdbcType="INTEGER" /> |
|
||||
<result column="userid" property="userid" jdbcType="INTEGER" /> |
|
||||
<result column="did" property="did" jdbcType="INTEGER" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<resultMap id="depositoryAndrole" type="com.dreamchaser.depository_manage.pojo.RoleAndDepository"> |
|
||||
<result column="prid" property="id" jdbcType="INTEGER"/> |
|
||||
<result column="userId" property="userId" jdbcType="INTEGER"/> |
|
||||
<result column="roleName" property="roleName" jdbcType="VARCHAR"/> |
|
||||
<result column="depositoryName" property="depositoryName" jdbcType="VARCHAR"/> |
|
||||
<result column="depositoryAddress" property="depositoryAddress" jdbcType="VARCHAR"/> |
|
||||
<result column="depositoryIntroduce" property="depositoryIntroduce" jdbcType="VARCHAR"/> |
|
||||
<result column="depositoryState" property="depositoryState" jdbcType="VARCHAR"/> |
|
||||
<result column="did" property="depositoryId" jdbcType="VARCHAR"/> |
|
||||
<result column="classes" property="classes" jdbcType="INTEGER"/> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="allColumns"> |
|
||||
r.id,r.name |
|
||||
</sql> |
|
||||
|
|
||||
<sql id="roleNameAnddepositoryName"> |
|
||||
prid,userid as userId,name as roleName,dname as depositoryName,address as depositoryAddress ,introduce as depositoryIntroduce,state as depositoryState,did,classes |
|
||||
</sql> |
|
||||
|
|
||||
<select id="findAllRole" resultMap="roleMap"> |
|
||||
select |
|
||||
<include refid="allColumns"/> |
|
||||
from role r |
|
||||
</select> |
|
||||
|
|
||||
<update id="updateUserOrPostRoleAndDepository" parameterType="map"> |
|
||||
update postoruserrole |
|
||||
<set> |
|
||||
<if test="authority != null and authority != ''"> |
|
||||
role = #{authority}, |
|
||||
</if> |
|
||||
<if test="depositoryId != null and depositoryId != ''"> |
|
||||
did = #{depositoryId} |
|
||||
</if> |
|
||||
</set> |
|
||||
where userid = #{userid} |
|
||||
</update> |
|
||||
|
|
||||
<update id="UpdateRoleAndDepositoryById" parameterType="map"> |
|
||||
update postoruserrole |
|
||||
<set> |
|
||||
<if test="authority != null and authority != ''"> |
|
||||
role = #{authority}, |
|
||||
</if> |
|
||||
<if test="depositoryId != null and depositoryId != ''"> |
|
||||
did = #{depositoryId}, |
|
||||
</if> |
|
||||
<if test="classes != null and classes != ''"> |
|
||||
classes = #{classes} |
|
||||
</if> |
|
||||
</set> |
|
||||
where id = #{roleId} |
|
||||
</update> |
|
||||
|
|
||||
<insert id="addUserOrPostRoleAndDepository" parameterType="map"> |
|
||||
INSERT INTO postoruserrole ( |
|
||||
id, classes, role,userid,did |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{classes}, |
|
||||
#{authority}, |
|
||||
#{userid}, |
|
||||
#{depositoryId} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
|
|
||||
<select id="findDepositoryAndRole" parameterType="int" resultMap="depositoryAndrole"> |
|
||||
select |
|
||||
<include refid="roleNameAnddepositoryName"/> |
|
||||
from userroleanddepository |
|
||||
where userid = #{userid} |
|
||||
</select> |
|
||||
|
|
||||
<select id="findRoleByUid" parameterType="int" resultType="int"> |
|
||||
select role from postoruserrole where userid = #{uid} and classes = 1 |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<select id="findUserIdByDid" parameterType="int" resultType="int"> |
|
||||
select userid from postoruserrole where 1 = 1 and did = #{did} |
|
||||
</select> |
|
||||
|
|
||||
<select id="findRoleAndDepositoryByCondition" parameterType="map" resultMap="depositoryAndrole"> |
|
||||
select |
|
||||
<include refid="roleNameAnddepositoryName"/> |
|
||||
from userroleanddepository |
|
||||
where 1 = 1 |
|
||||
<if test="depositoryId != null and depositoryId != ''"> |
|
||||
and did = #{depositoryId} |
|
||||
</if> |
|
||||
<if test="userId != null and userId != ''"> |
|
||||
and userId = #{userId} |
|
||||
</if> |
|
||||
<if test="classes != null and classes != ''"> |
|
||||
and classes = #{classes} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<select id="findRoleAndDepositoryById" parameterType="int" resultMap="depositoryAndrole"> |
|
||||
select |
|
||||
<include refid="roleNameAnddepositoryName"/> |
|
||||
from userroleanddepository |
|
||||
where prid = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteRoleAndDepositoryById" parameterType="int"> |
|
||||
delete from postoruserrole WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
|
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,153 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- transfer_record --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.TransferRecordMapper"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="transferRecordMap" type="com.dreamchaser.depository_manage.entity.TransferRecord"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="from_id" property="fromId" jdbcType="INTEGER" /> |
|
||||
<result column="to_id" property="toId" jdbcType="INTEGER" /> |
|
||||
<result column="mid" property="mid" jdbcType="INTEGER" /> |
|
||||
<result column="applicantTime" property="applicantTime" jdbcType="INTEGER" /> |
|
||||
<result column="applicantId" property="applicantId" jdbcType="INTEGER" /> |
|
||||
<result column="from_place_id" property="fromPlaceId" jdbcType="INTEGER" /> |
|
||||
<result column="to_place_id" property="toPlaceId" jdbcType="INTEGER" /> |
|
||||
</resultMap> |
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
tr.id, tr.from_id, tr.to_id,tr.mid,tr.applicantTime,tr.applicantId,tr.from_place_id,tr.to_place_id |
|
||||
</sql> |
|
||||
|
|
||||
<!-- 查询所有 |
|
||||
<select id="findTransferRecordAll" resultMap="transferRecordMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM transfer_record tr |
|
||||
</select>--> |
|
||||
|
|
||||
|
|
||||
<!-- 根据条件参数查询列表--> |
|
||||
<select id="findTransferRecordByCondition" resultMap="transferRecordMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM transfer_record tr WHERE 1 = 1 |
|
||||
<if test="fromId != null"> |
|
||||
AND tr.from_id = #{fromId} |
|
||||
</if> |
|
||||
<if test="toId != null"> |
|
||||
AND tr.to_id = #{toId} |
|
||||
</if> |
|
||||
<if test="mid != null"> |
|
||||
and tr.mid = #{mid} |
|
||||
</if> |
|
||||
<if test="applicantTime != null"> |
|
||||
and tr.applicantTime = #{applicantTime} |
|
||||
</if> |
|
||||
<if test="applicantId != null"> |
|
||||
and tr.applicantId = #{applicantId} |
|
||||
</if> |
|
||||
<if test="fromPlaceId != null"> |
|
||||
and tr.from_place_id = #{fromPlaceId} |
|
||||
</if> |
|
||||
<if test="toPlaceId != null"> |
|
||||
and tr.to_place_id = #{toPlaceId} |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键查询信息 |
|
||||
<select id="findTransferRecordByIds" resultMap="transferRecordMap" parameterType="list"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM transfer_record tr WHERE tr.id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</select>--> |
|
||||
|
|
||||
<select id="findTransferRecordById" resultMap="transferRecordMap" parameterType="int"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM transfer_record tr WHERE tr.id = #{id} |
|
||||
</select> |
|
||||
<!-- 新增信息 --> |
|
||||
<insert id="addTransferRecord" parameterType="map" useGeneratedKeys="true" keyProperty="id"> |
|
||||
INSERT INTO transfer_record ( |
|
||||
id, from_id, to_id,quantity,mid,applicantTime,applicantId,from_place_id,to_place_id |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{fromId}, |
|
||||
#{toId}, |
|
||||
#{quantity}, |
|
||||
#{mid}, |
|
||||
#{applicantTime}, |
|
||||
#{applicantId}, |
|
||||
#{fromPlaceId}, |
|
||||
#{toPlaceId} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 批量新增信息 |
|
||||
<insert id="addTransferRecords" parameterType="list"> |
|
||||
INSERT INTO transfer_record ( |
|
||||
id, from_id, to_id |
|
||||
) VALUES |
|
||||
<foreach collection="list" index="index" item="item" separator=","> |
|
||||
( |
|
||||
#{item.id}, |
|
||||
#{item.fromId}, |
|
||||
#{item.toId} |
|
||||
) |
|
||||
</foreach> |
|
||||
</insert>--> |
|
||||
|
|
||||
|
|
||||
<!-- 修改信息 |
|
||||
<update id="updateTransferRecord"> |
|
||||
UPDATE transfer_record |
|
||||
<set> |
|
||||
<if test="fromId != null"> |
|
||||
from_id = #{fromId}, |
|
||||
</if> |
|
||||
<if test="toId != null"> |
|
||||
to_id = #{toId} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update>--> |
|
||||
|
|
||||
|
|
||||
<!-- 批量修改信息 |
|
||||
<update id="updateTransferRecords" parameterType="list"> |
|
||||
<foreach collection="list" index="index" item="item" separator=";"> |
|
||||
UPDATE transfer_record |
|
||||
<set> |
|
||||
<if test="item.fromId != null"> |
|
||||
from_id = #{item.fromId}, |
|
||||
</if> |
|
||||
<if test="item.toId != null"> |
|
||||
to_id = #{item.toId} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{item.id} |
|
||||
</foreach> |
|
||||
</update>--> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键删除 |
|
||||
<delete id="deleteTransferRecordById" parameterType="int"> |
|
||||
DELETE FROM transfer_record WHERE id = #{id} |
|
||||
</delete>--> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键批量删除 |
|
||||
<delete id="deleteTransferRecordByIds" parameterType="list"> |
|
||||
DELETE FROM transfer_record WHERE id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete>--> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,385 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- user --> |
|
||||
<mapper namespace="com.dreamchaser.depository_manage.mapper.UserMapper"> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="userMap" type="com.dreamchaser.depository_manage.entity.User"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="uname" property="uname" jdbcType="VARCHAR" /> |
|
||||
<result column="authority" property="authority" jdbcType="VARCHAR" /> |
|
||||
<result column="pwd" property="pwd" jdbcType="VARCHAR" /> |
|
||||
<result column="sex" property="sex" jdbcType="VARCHAR" /> |
|
||||
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
|
||||
<result column="entry_date" property="entryDate" jdbcType="TIMESTAMP" /> |
|
||||
<result column="email" property="email" jdbcType="VARCHAR" /> |
|
||||
<result column="phone" property="phone" jdbcType="VARCHAR" /> |
|
||||
<result column="state" property="state" javaType="INTEGER"/> |
|
||||
</resultMap> |
|
||||
|
|
||||
<!-- 字段映射(包括角色名)--> |
|
||||
<resultMap id="userMapWithRoleName" type="com.dreamchaser.depository_manage.entity.User"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="state" property="state" javaType="INTEGER"/> |
|
||||
<result column="uname" property="uname" jdbcType="VARCHAR" /> |
|
||||
<result column="authority" property="authority" jdbcType="VARCHAR" /> |
|
||||
<result column="pwd" property="pwd" jdbcType="VARCHAR" /> |
|
||||
<result column="sex" property="sex" jdbcType="VARCHAR" /> |
|
||||
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
|
||||
<result column="entry_date" property="entryDate" jdbcType="TIMESTAMP" /> |
|
||||
<result column="email" property="email" jdbcType="VARCHAR" /> |
|
||||
<result column="phone" property="phone" jdbcType="VARCHAR" /> |
|
||||
<association property="role" javaType="com.dreamchaser.depository_manage.entity.Role"> |
|
||||
<id property="id" column="authority"/> |
|
||||
<result property="name" column="name"/> |
|
||||
</association> |
|
||||
</resultMap> |
|
||||
<!-- 表查询字段(不敏感信息) --> |
|
||||
<sql id="noSensitiveColumns"> |
|
||||
u.id, u.uname, u.sex, u.entry_date |
|
||||
</sql> |
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
u.id, u.uname, u.authority, u.pwd, u.sex, u.depository_id, u.entry_date, u.email, |
|
||||
u.phone,u.state |
|
||||
</sql> |
|
||||
|
|
||||
<sql id="ColumnsAndRoleName"> |
|
||||
u.id, u.uname, r.name,r.id,u.authority, u.pwd, u.sex, u.depository_id, u.entry_date, u.email, |
|
||||
u.phone,u.state |
|
||||
</sql> |
|
||||
<!-- This code was generated by TableGo tools, mark 2 end. --> |
|
||||
<!-- 查询该表的行数 --> |
|
||||
<select id="findCount" resultType="integer"> |
|
||||
SELECT |
|
||||
count(*) |
|
||||
FROM user u |
|
||||
</select> |
|
||||
<!-- 根据条件查询数据的数量 --> |
|
||||
<select id="findCountByCondition" resultType="integer" parameterType="map"> |
|
||||
SELECT |
|
||||
count(*) |
|
||||
FROM user u WHERE 1 = 1 |
|
||||
<if test="uname != null and uname != ''"> |
|
||||
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
|
||||
</if> |
|
||||
<if test="authority != null and authority != ''"> |
|
||||
AND u.authority LIKE CONCAT('%', #{authority}, '%') |
|
||||
</if> |
|
||||
<if test="pwd != null and pwd != ''"> |
|
||||
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
|
||||
</if> |
|
||||
<if test="sex != null and sex != ''"> |
|
||||
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
|
||||
</if> |
|
||||
<if test="depositoryId != null"> |
|
||||
AND u.depository_id = #{depositoryId} |
|
||||
</if> |
|
||||
<if test="entryDate != null"> |
|
||||
AND u.entry_date = #{entryDate} |
|
||||
</if> |
|
||||
<if test="email != null and email != ''"> |
|
||||
AND u.email LIKE CONCAT('%', #{email}, '%') |
|
||||
</if> |
|
||||
<if test="phone != null and phone != ''"> |
|
||||
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
and u.state = #{state} |
|
||||
</if> |
|
||||
and u.state != 3 |
|
||||
</select> |
|
||||
<!-- 查询所有数据 --> |
|
||||
<!-- <select id="findUserAll" resultMap="userMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM user u |
|
||||
</select>--> |
|
||||
|
|
||||
<!-- 根据id查询数据列表 --> |
|
||||
<select id="findUserNameById" resultType="string" parameterType="int"> |
|
||||
SELECT |
|
||||
u.uname |
|
||||
FROM user u WHERE u.id=#{id} |
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<!-- 根据email查询数据列表 --> |
|
||||
<select id="findUserByEmail" resultMap="userMap" parameterType="string"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM user u WHERE u.email LIKE CONCAT('%', #{email}, '%') |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据条件参数查询数据列表 --> |
|
||||
<select id="findUsersByCondition" resultMap="userMapWithRoleName" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="ColumnsAndRoleName" /> |
|
||||
FROM user u,role r WHERE 1 = 1 |
|
||||
<if test="uname != null and uname != ''"> |
|
||||
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
|
||||
</if> |
|
||||
<if test="authority != null and authority != ''"> |
|
||||
AND u.authority = #{authority} |
|
||||
</if> |
|
||||
<if test="pwd != null and pwd != ''"> |
|
||||
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
|
||||
</if> |
|
||||
<if test="sex != null and sex != ''"> |
|
||||
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
|
||||
</if> |
|
||||
<if test="depositoryId != null"> |
|
||||
AND u.depository_id = #{depositoryId} or u.depository_id = 0 |
|
||||
</if> |
|
||||
<if test="entryDate != null"> |
|
||||
AND u.entry_date = #{entryDate} |
|
||||
</if> |
|
||||
<if test="email != null and email != ''"> |
|
||||
AND u.email LIKE CONCAT('%', #{email}, '%') |
|
||||
</if> |
|
||||
<if test="phone != null and phone != ''"> |
|
||||
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
And u.state = #{state} |
|
||||
</if> |
|
||||
and u.authority = r.id |
|
||||
and u.state != 3 |
|
||||
<if test="begin != null and size != null"> |
|
||||
LIMIT #{begin},#{size} |
|
||||
</if> |
|
||||
|
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据条件参数查询数据列表 --> |
|
||||
<select id="findUserByCondition" resultMap="userMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM user u WHERE 1 = 1 |
|
||||
<if test="uname != null and uname != ''"> |
|
||||
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
|
||||
</if> |
|
||||
<if test="authority != null and authority != ''"> |
|
||||
AND u.authority LIKE CONCAT('%', #{authority}, '%') |
|
||||
</if> |
|
||||
<if test="pwd != null and pwd != ''"> |
|
||||
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
|
||||
</if> |
|
||||
<if test="sex != null and sex != ''"> |
|
||||
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
|
||||
</if> |
|
||||
<if test="depositoryId != null"> |
|
||||
AND u.depository_id = #{depositoryId} |
|
||||
</if> |
|
||||
<if test="entryDate != null"> |
|
||||
AND u.entry_date = #{entryDate} |
|
||||
</if> |
|
||||
<if test="email != null and email != ''"> |
|
||||
AND u.email LIKE CONCAT('%', #{email}, '%') |
|
||||
</if> |
|
||||
<if test="phone != null and phone != ''"> |
|
||||
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
and u.state = #{state} |
|
||||
</if> |
|
||||
and u.state != 3 |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据主键查询数据 --> |
|
||||
<select id="findUserById" resultMap="userMap" parameterType="integer"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM user u WHERE u.id = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据主键查询数据 |
|
||||
<select id="findUserByIds" resultMap="userMap" parameterType="list"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM user u WHERE u.id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</select>--> |
|
||||
|
|
||||
|
|
||||
<!-- 插入数据 --> |
|
||||
<insert id="insertUser" parameterType="map"> |
|
||||
INSERT INTO user ( |
|
||||
id, uname, authority, pwd, sex, depository_id, entry_date, email, |
|
||||
phone |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{uname}, |
|
||||
#{authority}, |
|
||||
#{pwd}, |
|
||||
#{sex}, |
|
||||
#{depositoryId}, |
|
||||
#{entryDate}, |
|
||||
#{email}, |
|
||||
#{phone} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 批量插入数据 |
|
||||
<insert id="insertUsers" parameterType="list"> |
|
||||
INSERT INTO user ( |
|
||||
id, uname, authority, pwd, sex, depository_id, entry_date, email, |
|
||||
phone |
|
||||
) VALUES |
|
||||
<foreach collection="list" index="index" item="item" separator=","> |
|
||||
( |
|
||||
#{item.id}, |
|
||||
#{item.uname}, |
|
||||
#{item.authority}, |
|
||||
#{item.pwd}, |
|
||||
#{item.sex}, |
|
||||
#{item.depositoryId}, |
|
||||
#{item.entryDate}, |
|
||||
#{item.email}, |
|
||||
#{item.phone} |
|
||||
) |
|
||||
</foreach> |
|
||||
</insert>--> |
|
||||
|
|
||||
<!-- 修改不敏感数据(这里由于并未对手机号进行验证所以这个也是非敏感信息可以给用户自己修改) --> |
|
||||
<update id="updateUserNoSensitive" parameterType="map"> |
|
||||
UPDATE user |
|
||||
<set> |
|
||||
<if test='uname != null and uname!=""'> |
|
||||
uname = #{uname}, |
|
||||
</if> |
|
||||
<if test='sex != null and sex!=""'> |
|
||||
sex = #{sex}, |
|
||||
</if> |
|
||||
<if test="entryDate != null and entryDate!=''"> |
|
||||
entry_date = #{entryDate}, |
|
||||
</if> |
|
||||
<if test="phone != null and phone !=''"> |
|
||||
phone = #{phone} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
<!-- 修改数据 --> |
|
||||
<update id="updateUser" parameterType="map"> |
|
||||
UPDATE user |
|
||||
<set> |
|
||||
<if test='uname != null and uname!=""'> |
|
||||
uname = #{uname}, |
|
||||
</if> |
|
||||
<if test='authority != null and authority!=""'> |
|
||||
authority = #{authority}, |
|
||||
</if> |
|
||||
<if test="pwd != null and pwd!=''"> |
|
||||
pwd = #{pwd}, |
|
||||
</if> |
|
||||
<if test='sex != null and sex!=""'> |
|
||||
sex = #{sex}, |
|
||||
</if> |
|
||||
<if test="depositoryId != null and depository!=''"> |
|
||||
depository_id = #{depositoryId}, |
|
||||
</if> |
|
||||
<if test="entryDate != null and entryDate!=''"> |
|
||||
entry_date = #{entryDate}, |
|
||||
</if> |
|
||||
<if test="email != null and email != ''"> |
|
||||
email = #{email}, |
|
||||
</if> |
|
||||
<if test="phone != null and phone !=''"> |
|
||||
phone = #{phone}, |
|
||||
</if> |
|
||||
<if test="state != null and state != ''"> |
|
||||
state = #{state} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!-- 批量修改数据 |
|
||||
<update id="updateUsers" parameterType="list"> |
|
||||
<foreach collection="list" index="index" item="item" separator=";"> |
|
||||
UPDATE user |
|
||||
<set> |
|
||||
<if test="item.uname != null"> |
|
||||
uname = #{item.uname}, |
|
||||
</if> |
|
||||
<if test="item.authority != null"> |
|
||||
authority = #{item.authority}, |
|
||||
</if> |
|
||||
<if test="item.pwd != null"> |
|
||||
pwd = #{item.pwd}, |
|
||||
</if> |
|
||||
<if test="item.sex != null"> |
|
||||
sex = #{item.sex}, |
|
||||
</if> |
|
||||
<if test="item.depositoryId != null"> |
|
||||
depository_id = #{item.depositoryId}, |
|
||||
</if> |
|
||||
<if test="item.entryDate != null"> |
|
||||
entry_date = #{item.entryDate}, |
|
||||
</if> |
|
||||
<if test="item.email != null"> |
|
||||
email = #{item.email}, |
|
||||
</if> |
|
||||
<if test="item.phone != null"> |
|
||||
phone = #{item.phone} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{item.id} |
|
||||
</foreach> |
|
||||
</update>--> |
|
||||
|
|
||||
|
|
||||
<!-- 根据主键删除数据 --> |
|
||||
<delete id="deleteUserById" parameterType="integer"> |
|
||||
DELETE FROM user WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据主键批量删除数据 --> |
|
||||
<delete id="deleteUserByIds" parameterType="list"> |
|
||||
DELETE FROM user WHERE id IN |
|
||||
<!-- 单参数时,List对象只能为list,数组对象只能为array,多参数用map时,collection参数才为KeyName --> |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<!--根据主键将状态修改为删除--> |
|
||||
<update id="changeUserStateToDeleteById" parameterType="integer"> |
|
||||
update user |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where id = #{id} |
|
||||
</update> |
|
||||
<!--根据主键批量将状态修改为删除--> |
|
||||
<update id="changeUserStateToDeleteByIds" parameterType="list"> |
|
||||
update user |
|
||||
<set> |
|
||||
state = 3 |
|
||||
</set> |
|
||||
where id in |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
|
|
||||
<update id="updateUserPasswordById" parameterType="map"> |
|
||||
update user |
|
||||
<set> |
|
||||
pwd = #{new_password} |
|
||||
</set> |
|
||||
where id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<select id="FindUserRoleById" parameterType="int" resultType="string"> |
|
||||
select name from userandrole ur left join role r on ur.rid = r.id where ur.uid = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<select id="FindDepositoryByUserId" parameterType="int" resultType="string"> |
|
||||
select dname from depositoryanduserbyport where uid = #{id} |
|
||||
</select> |
|
||||
</mapper> |
|
||||
@ -1,143 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<!-- standing_book --> |
|
||||
<mapper namespace="mysql.standingBook"> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
|
||||
<!-- 字段映射 --> |
|
||||
<resultMap id="standingBookMap" type="StandingBook"> |
|
||||
<id column="id" property="id" jdbcType="INTEGER" /> |
|
||||
<result column="type" property="type" jdbcType="INTEGER" /> |
|
||||
<result column="quantity" property="quantity" jdbcType="INTEGER" /> |
|
||||
<result column="price" property="price" jdbcType="INTEGER" /> |
|
||||
<result column="material_name" property="materialName" jdbcType="VARCHAR" /> |
|
||||
</resultMap> |
|
||||
<!-- This code was generated by TableGo tools, mark 1 end. --> |
|
||||
|
|
||||
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
|
||||
<!-- 表查询字段 --> |
|
||||
<sql id="allColumns"> |
|
||||
sb.id, sb.type, sb.quantity, sb.price, sb.material_name |
|
||||
</sql> |
|
||||
<!-- This code was generated by TableGo tools, mark 2 end. --> |
|
||||
|
|
||||
<!-- 查询所有数据 --> |
|
||||
<select id="findStandingBookAll" resultMap="standingBookMap"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM standing_book sb |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据条件参数查询数据列表 --> |
|
||||
<select id="findStandingBookByCondition" resultMap="standingBookMap" parameterType="map"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM standing_book sb WHERE 1 = 1 |
|
||||
<if test="type != null"> |
|
||||
AND sb.type = #{type} |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
AND sb.quantity = #{quantity} |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
AND sb.price = #{price} |
|
||||
</if> |
|
||||
<if test="materialName != null and materialName != ''"> |
|
||||
AND sb.material_name LIKE CONCAT('%', #{materialName}, '%') |
|
||||
</if> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 根据主键查询数据 --> |
|
||||
<select id="findStandingBookByIds" resultMap="standingBookMap" parameterType="list"> |
|
||||
SELECT |
|
||||
<include refid="allColumns" /> |
|
||||
FROM standing_book sb WHERE sb.id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 插入数据 --> |
|
||||
<insert id="insertStandingBook" parameterType="map"> |
|
||||
INSERT INTO standing_book ( |
|
||||
id, type, quantity, price, material_name |
|
||||
) VALUES ( |
|
||||
#{id}, |
|
||||
#{type}, |
|
||||
#{quantity}, |
|
||||
#{price}, |
|
||||
#{materialName} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 批量插入数据 --> |
|
||||
<insert id="insertStandingBooks" parameterType="list"> |
|
||||
INSERT INTO standing_book ( |
|
||||
id, type, quantity, price, material_name |
|
||||
) VALUES |
|
||||
<foreach collection="list" index="index" item="item" separator=","> |
|
||||
( |
|
||||
#{item.id}, |
|
||||
#{item.type}, |
|
||||
#{item.quantity}, |
|
||||
#{item.price}, |
|
||||
#{item.materialName} |
|
||||
) |
|
||||
</foreach> |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 修改数据 --> |
|
||||
<update id="updateStandingBook" parameterType="map"> |
|
||||
UPDATE standing_book |
|
||||
<set> |
|
||||
<if test="type != null"> |
|
||||
type = #{type}, |
|
||||
</if> |
|
||||
<if test="quantity != null"> |
|
||||
quantity = #{quantity}, |
|
||||
</if> |
|
||||
<if test="price != null"> |
|
||||
price = #{price}, |
|
||||
</if> |
|
||||
<if test="materialName != null"> |
|
||||
material_name = #{materialName} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!-- 批量修改数据 --> |
|
||||
<update id="updateStandingBooks" parameterType="list"> |
|
||||
<foreach collection="list" index="index" item="item" separator=";"> |
|
||||
UPDATE standing_book |
|
||||
<set> |
|
||||
<if test="item.type != null"> |
|
||||
type = #{item.type}, |
|
||||
</if> |
|
||||
<if test="item.quantity != null"> |
|
||||
quantity = #{item.quantity}, |
|
||||
</if> |
|
||||
<if test="item.price != null"> |
|
||||
price = #{item.price}, |
|
||||
</if> |
|
||||
<if test="item.materialName != null"> |
|
||||
material_name = #{item.materialName} |
|
||||
</if> |
|
||||
</set> |
|
||||
WHERE id = #{item.id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
<!-- 根据主键删除数据 --> |
|
||||
<delete id="deleteStandingBookById" parameterType="int"> |
|
||||
DELETE FROM standing_book WHERE id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据主键批量删除数据 --> |
|
||||
<delete id="deleteStandingBookByIds" parameterType="list"> |
|
||||
DELETE FROM standing_book WHERE id IN |
|
||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
</mapper> |
|
||||
@ -1,155 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false"> |
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> |
|
||||
<!-- 应用名称--> |
|
||||
<property name="appName" value="Dreamchser"/> |
|
||||
<!-- 日志的存放目录--> |
|
||||
<!-- debug--> |
|
||||
<property name="DEBUG_LOG_FILE_NAME_PATTERN" value="logs/${appName}-debug.%d{yyyy-MM-dd}.%i.log"/> |
|
||||
<property name="INFO_LOG_FILE_NAME_PATTERN" value="logs/${appName}-info.%d{yyyy-MM-dd}.%i.log"/> |
|
||||
<property name="WARN_LOG_FILE_NAME_PATTERN" value="errlogs/${appName}-warn.%d{yyyy-MM-dd}.%i.log"/> |
|
||||
<property name="ERROR_LOG_FILE_NAME_PATTERN" value="errlogs/${appName}-error.%d{yyyy-MM-dd}.%i.log"/> |
|
||||
<!-- 日志格式 --> |
|
||||
<property name="CONSOLE_LOG_PATTERN" |
|
||||
value="%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%c){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/> |
|
||||
<property name="FILE_LOG_PATTERN" |
|
||||
value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %c : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/> |
|
||||
<!--输出到控制台--> |
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> |
|
||||
<encoder> |
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> |
|
||||
</encoder> |
|
||||
|
|
||||
</appender> |
|
||||
|
|
||||
<!--输出到DEBUG文件--> |
|
||||
<appender name="debug_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||
<fileNamePattern>${DEBUG_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
|
||||
<!-- 日志保留天数 --> |
|
||||
<maxHistory>30</maxHistory> |
|
||||
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
|
||||
<totalSizeCap>2GB</totalSizeCap> |
|
||||
<!-- 每个日志文件的最大值 --> |
|
||||
<timeBasedFileNamingAndTriggeringPolicy |
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|
||||
<maxFileSize>50MB</maxFileSize> |
|
||||
</timeBasedFileNamingAndTriggeringPolicy> |
|
||||
</rollingPolicy> |
|
||||
<encoder> |
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern> |
|
||||
</encoder> |
|
||||
<!-- 此日志文件只记录debug级别的 --> |
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|
||||
<level>debug</level> |
|
||||
<onMatch>ACCEPT</onMatch> |
|
||||
<onMismatch>DENY</onMismatch> |
|
||||
</filter> |
|
||||
</appender> |
|
||||
|
|
||||
<!--输出到INFO文件--> |
|
||||
<appender name="info_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||
<fileNamePattern>${INFO_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
|
||||
<!-- 日志保留天数 --> |
|
||||
<maxHistory>7</maxHistory> |
|
||||
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
|
||||
<totalSizeCap>1GB</totalSizeCap> |
|
||||
<!-- 每个日志文件的最大值 --> |
|
||||
<timeBasedFileNamingAndTriggeringPolicy |
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|
||||
<maxFileSize>50MB</maxFileSize> |
|
||||
</timeBasedFileNamingAndTriggeringPolicy> |
|
||||
</rollingPolicy> |
|
||||
<encoder> |
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern> |
|
||||
</encoder> |
|
||||
<!-- 此日志文件只记录info级别的 --> |
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|
||||
<level>info</level> |
|
||||
<onMatch>ACCEPT</onMatch> |
|
||||
<onMismatch>DENY</onMismatch> |
|
||||
</filter> |
|
||||
</appender> |
|
||||
|
|
||||
<!--输出到WARN文件--> |
|
||||
<appender name="warn_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||
<fileNamePattern>${WARN_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
|
||||
<!-- 日志保留天数 --> |
|
||||
<maxHistory>30</maxHistory> |
|
||||
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
|
||||
<totalSizeCap>1GB</totalSizeCap> |
|
||||
<!-- 每个日志文件的最大值 --> |
|
||||
<timeBasedFileNamingAndTriggeringPolicy |
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|
||||
<maxFileSize>10MB</maxFileSize> |
|
||||
</timeBasedFileNamingAndTriggeringPolicy> |
|
||||
</rollingPolicy> |
|
||||
<encoder> |
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern> |
|
||||
</encoder> |
|
||||
<!-- 此日志文件只记录warn级别的 --> |
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|
||||
<level>warn</level> |
|
||||
<onMatch>ACCEPT</onMatch> |
|
||||
<onMismatch>DENY</onMismatch> |
|
||||
</filter> |
|
||||
</appender> |
|
||||
|
|
||||
<!--输出到ERROR文件--> |
|
||||
<appender name="error_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||
<fileNamePattern>${ERROR_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
|
||||
<!-- 日志保留天数 --> |
|
||||
<maxHistory>30</maxHistory> |
|
||||
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
|
||||
<totalSizeCap>1GB</totalSizeCap> |
|
||||
<!-- 每个日志文件的最大值 --> |
|
||||
<timeBasedFileNamingAndTriggeringPolicy |
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|
||||
<maxFileSize>10MB</maxFileSize> |
|
||||
</timeBasedFileNamingAndTriggeringPolicy> |
|
||||
</rollingPolicy> |
|
||||
<encoder> |
|
||||
<pattern>${FILE_LOG_PATTERN}</pattern> |
|
||||
</encoder> |
|
||||
<!-- 此日志文件只记录error级别的 --> |
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|
||||
<level>error</level> |
|
||||
<onMatch>ACCEPT</onMatch> |
|
||||
<onMismatch>DENY</onMismatch> |
|
||||
</filter> |
|
||||
</appender> |
|
||||
<!-- region 根据不同的环境设置不同的日志输出级别 --> |
|
||||
<springProfile name="default,local,dev"> |
|
||||
<root level="info"> |
|
||||
<appender-ref ref="console"/> |
|
||||
</root> |
|
||||
<!-- <logger name="com.dreamchaser" level="debug"/>--> |
|
||||
|
|
||||
</springProfile> |
|
||||
|
|
||||
|
|
||||
<springProfile name="prod,pre,test"> |
|
||||
<root level="info"> |
|
||||
<appender-ref ref="console"/> |
|
||||
<appender-ref ref="debug_file"/> |
|
||||
<appender-ref ref="info_file"/> |
|
||||
<appender-ref ref="warn_file"/> |
|
||||
<appender-ref ref="error_file"/> |
|
||||
</root> |
|
||||
<logger name="com.ibatis" level="DEBUG" /> |
|
||||
<logger name="com.ibatis.common.jdbc.SimpleDataSource" level="DEBUG" /> |
|
||||
<logger name="com.ibatis.common.jdbc.ScriptRunner" level="DEBUG" /> |
|
||||
<logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" level="DEBUG" /> |
|
||||
<logger name="java.sql.Connection" level="DEBUG" /> |
|
||||
<logger name="java.sql.Statement" level="DEBUG" /> |
|
||||
<logger name="java.sql.PreparedStatement" level="DEBUG" /> |
|
||||
<logger name="java.sql.ResultSet" level="DEBUG" /> |
|
||||
<logger name="com.dreamchaser.dream.depository_manage.mapper" level="DEBUG" /> |
|
||||
<!-- <logger name="com.dreamchaser.mapper" level="debug"/>--> |
|
||||
</springProfile> |
|
||||
<!-- endregion --> |
|
||||
|
|
||||
</configuration> |
|
||||
@ -1,26 +0,0 @@ |
|||||
#Redisson配置 |
|
||||
singleServerConfig: |
|
||||
address: "redis://127.0.0.1:6379" |
|
||||
clientName: null |
|
||||
database: 7 #选择使用哪个数据库0~15 |
|
||||
idleConnectionTimeout: 10000 |
|
||||
pingTimeout: 1000 |
|
||||
connectTimeout: 10000 |
|
||||
timeout: 3000 |
|
||||
retryAttempts: 3 |
|
||||
retryInterval: 1500 |
|
||||
reconnectionTimeout: 3000 |
|
||||
failedAttempts: 3 |
|
||||
subscriptionsPerConnection: 5 |
|
||||
subscriptionConnectionMinimumIdleSize: 1 |
|
||||
subscriptionConnectionPoolSize: 50 |
|
||||
connectionMinimumIdleSize: 32 |
|
||||
connectionPoolSize: 64 |
|
||||
dnsMonitoringInterval: 5000 |
|
||||
#dnsMonitoring: false |
|
||||
|
|
||||
threads: 0 |
|
||||
nettyThreads: 0 |
|
||||
codec: |
|
||||
class: "org.redisson.codec.JsonJacksonCodec" |
|
||||
transportMode: "NIO" |
|
||||
@ -1,4 +0,0 @@ |
|||||
{ |
|
||||
"code": 1, |
|
||||
"msg": "服务端清理缓存成功" |
|
||||
} |
|
||||
@ -1,226 +0,0 @@ |
|||||
{ |
|
||||
"homeInfo": { |
|
||||
"title": "首页", |
|
||||
"href": "/welcome" |
|
||||
}, |
|
||||
"logoInfo": { |
|
||||
"title": "Repository", |
|
||||
"image": "static/images/logo.png", |
|
||||
"href": "" |
|
||||
}, |
|
||||
"menuInfo": [ |
|
||||
{ |
|
||||
"title": "仓库信息概览", |
|
||||
"href": "/welcome", |
|
||||
"icon": "fa fa-tachometer", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "首页", |
|
||||
"href": "/welcome", |
|
||||
"icon": "fa fa-home", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库管理", |
|
||||
"icon": "fa fa-lemon-o", |
|
||||
"href": "", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "申请提交", |
|
||||
"icon": "fa fa-book", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "入库申请", |
|
||||
"href": "/application_in", |
|
||||
"icon": "layui-icon layui-icon-file-b", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库申请", |
|
||||
"href": "/application_out", |
|
||||
"icon": "fa fa-file-text", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存转移申请", |
|
||||
"href": "/application_transfer", |
|
||||
"icon": "fa fa-exchange", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库管理", |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "入库查询", |
|
||||
"href": "/table_in", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库可视化", |
|
||||
"href": "/chart_in", |
|
||||
"icon": "fa fa-bar-chart", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库可视化(测试)", |
|
||||
"href": "/chart_in_back", |
|
||||
"icon": "fa fa-bar-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库管理", |
|
||||
"icon": "fa fa-mail-reply", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "出库查询", |
|
||||
"href": "/table_out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库可视化", |
|
||||
"href": "/chart_out", |
|
||||
"icon": "fa fa-pie-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存管理", |
|
||||
"icon": "fa fa-server", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "库存查询", |
|
||||
"href": "/table_stock", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存可视化", |
|
||||
"href": "/chart_stock", |
|
||||
"icon": "fa fa-area-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "创建仓库", |
|
||||
"href": "/depository_add", |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库查询", |
|
||||
"href": "/depository-out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料种类管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "物料种类添加", |
|
||||
"href": "/materialType_add", |
|
||||
"icon": "layui-icon layui-icon-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料种类查询", |
|
||||
"href": "/materialType_view", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "创建物料", |
|
||||
"href": "/material_add", |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料查询", |
|
||||
"href": "/material_out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "我的任务", |
|
||||
"icon": "fa fa-tasks", |
|
||||
"target": "_self", |
|
||||
"href": "/my_task" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "我的申请", |
|
||||
"href": "/my_apply", |
|
||||
"icon": "fa fa-paper-plane", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "辅助管理", |
|
||||
"icon": "fa fa-slideshare", |
|
||||
"href": "", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "人员管理", |
|
||||
"href": "/table_user", |
|
||||
"icon": "fa fa-group", |
|
||||
"target": "" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "公告发布", |
|
||||
"href": "/notice_edit", |
|
||||
"icon": "fa fa-superpowers", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "个人中心", |
|
||||
"href": "pages/error.html", |
|
||||
"icon": "fa fa-superpowers", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "个人信息", |
|
||||
"href": "/account_look", |
|
||||
"icon": "layui-icon layui-icon-friends", |
|
||||
"target": "" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,220 +0,0 @@ |
|||||
{ |
|
||||
"homeInfo": { |
|
||||
"title": "首页", |
|
||||
"href": "/welcome" |
|
||||
}, |
|
||||
"logoInfo": { |
|
||||
"title": "Repository", |
|
||||
"image": "static/images/logo.png", |
|
||||
"href": "" |
|
||||
}, |
|
||||
"menuInfo": [ |
|
||||
{ |
|
||||
"title": "仓库信息概览", |
|
||||
"href": "/welcome", |
|
||||
"icon": "fa fa-tachometer", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "首页", |
|
||||
"href": "/welcome", |
|
||||
"icon": "fa fa-home", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库管理", |
|
||||
"icon": "fa fa-lemon-o", |
|
||||
"href": "", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "申请提交", |
|
||||
"icon": "fa fa-book", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "入库申请", |
|
||||
"href": "/application_in", |
|
||||
"icon": "layui-icon layui-icon-file-b", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库申请", |
|
||||
"href": "/application_out", |
|
||||
"icon": "fa fa-file-text", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存转移申请", |
|
||||
"href": "application_transfer", |
|
||||
"icon": "fa fa-exchange", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库管理", |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "入库查询", |
|
||||
"href": "/table_in", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库可视化", |
|
||||
"href": "/chart_in", |
|
||||
"icon": "fa fa-bar-chart", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库可视化(测试)", |
|
||||
"href": "/chart_in_back", |
|
||||
"icon": "fa fa-bar-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库管理", |
|
||||
"icon": "fa fa-mail-reply", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "出库查询", |
|
||||
"href": "/table_out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库可视化", |
|
||||
"href": "/chart_out", |
|
||||
"icon": "fa fa-pie-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存管理", |
|
||||
"icon": "fa fa-server", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "库存查询", |
|
||||
"href": "/table_stock", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存可视化", |
|
||||
"href": "/chart_stock", |
|
||||
"icon": "fa fa-area-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "创建仓库", |
|
||||
"href": "/depository_add", |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库查询", |
|
||||
"href": "/depository-out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料种类管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "物料种类添加", |
|
||||
"href": "/materialType_add", |
|
||||
"icon": "layui-icon layui-icon-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料种类查询", |
|
||||
"href": "/materialType_view", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "创建物料", |
|
||||
"href": "/material_add", |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料查询", |
|
||||
"href": "/material_out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "我的任务", |
|
||||
"icon": "fa fa-tasks", |
|
||||
"target": "_self", |
|
||||
"href": "/my_task" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "我的申请", |
|
||||
"href": "/my_apply", |
|
||||
"icon": "fa fa-paper-plane", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "辅助管理", |
|
||||
"icon": "fa fa-slideshare", |
|
||||
"href": "", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "公告发布", |
|
||||
"href": "/notice_edit", |
|
||||
"icon": "fa fa-superpowers", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "个人中心", |
|
||||
"href": "pages/error.html", |
|
||||
"icon": "fa fa-superpowers", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "个人信息", |
|
||||
"href": "/account_look", |
|
||||
"icon": "layui-icon layui-icon-friends", |
|
||||
"target": "" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,226 +0,0 @@ |
|||||
{ |
|
||||
"homeInfo": { |
|
||||
"title": "首页", |
|
||||
"href": "/welcome" |
|
||||
}, |
|
||||
"logoInfo": { |
|
||||
"title": "Repository", |
|
||||
"image": "static/images/logo.png", |
|
||||
"href": "" |
|
||||
}, |
|
||||
"menuInfo": [ |
|
||||
{ |
|
||||
"title": "仓库信息概览", |
|
||||
"href": "/welcome", |
|
||||
"icon": "fa fa-tachometer", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "首页", |
|
||||
"href": "/welcome", |
|
||||
"icon": "fa fa-home", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库管理", |
|
||||
"icon": "fa fa-lemon-o", |
|
||||
"href": "", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "申请提交", |
|
||||
"icon": "fa fa-book", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "入库申请", |
|
||||
"href": "/application_in", |
|
||||
"icon": "layui-icon layui-icon-file-b", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库申请", |
|
||||
"href": "/application_out", |
|
||||
"icon": "fa fa-file-text", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存转移申请", |
|
||||
"href": "application_transfer", |
|
||||
"icon": "fa fa-exchange", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库管理", |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "入库查询", |
|
||||
"href": "/table_in", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库可视化", |
|
||||
"href": "/chart_in", |
|
||||
"icon": "fa fa-bar-chart", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "入库可视化(测试)", |
|
||||
"href": "/chart_in_back", |
|
||||
"icon": "fa fa-bar-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库管理", |
|
||||
"icon": "fa fa-mail-reply", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "出库查询", |
|
||||
"href": "/table_out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库可视化", |
|
||||
"href": "/chart_out", |
|
||||
"icon": "fa fa-pie-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存管理", |
|
||||
"icon": "fa fa-server", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "库存查询", |
|
||||
"href": "/table_stock", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存可视化", |
|
||||
"href": "/chart_stock", |
|
||||
"icon": "fa fa-area-chart", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "创建仓库", |
|
||||
"href": "/depository_add", |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库查询", |
|
||||
"href": "/depository-out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料种类管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "物料种类添加", |
|
||||
"href": "/materialType_add", |
|
||||
"icon": "layui-icon layui-icon-list", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料种类查询", |
|
||||
"href": "/materialType_view", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料管理", |
|
||||
"icon": "fa fa-wrench", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "创建物料", |
|
||||
"href": "/material_add", |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "物料查询", |
|
||||
"href": "/material_out", |
|
||||
"icon": "fa fa-th-list", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "我的任务", |
|
||||
"icon": "fa fa-tasks", |
|
||||
"target": "_self", |
|
||||
"href": "/my_task" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "我的申请", |
|
||||
"href": "/my_apply", |
|
||||
"icon": "fa fa-paper-plane", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "辅助管理", |
|
||||
"icon": "fa fa-slideshare", |
|
||||
"href": "", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "人员管理", |
|
||||
"href": "/table_user", |
|
||||
"icon": "fa fa-group", |
|
||||
"target": "" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "公告发布", |
|
||||
"href": "/notice_edit", |
|
||||
"icon": "fa fa-superpowers", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "个人中心", |
|
||||
"href": "pages/error.html", |
|
||||
"icon": "fa fa-superpowers", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "个人信息", |
|
||||
"href": "/account_look", |
|
||||
"icon": "layui-icon layui-icon-friends", |
|
||||
"target": "" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,100 +0,0 @@ |
|||||
{ |
|
||||
"homeInfo": { |
|
||||
"title": "首页", |
|
||||
"href": "/welcome" |
|
||||
}, |
|
||||
"logoInfo": { |
|
||||
"title": "Repository", |
|
||||
"image": "static/images/logo.png", |
|
||||
"href": "" |
|
||||
}, |
|
||||
"menuInfo": [ |
|
||||
{ |
|
||||
"title": "仓库信息概览", |
|
||||
"href": "/welcome", |
|
||||
"icon": "fa fa-tachometer", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "首页", |
|
||||
"href": "/welcome", |
|
||||
"icon": "fa fa-home", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "仓库管理", |
|
||||
"icon": "fa fa-lemon-o", |
|
||||
"href": "", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "申请提交", |
|
||||
"icon": "fa fa-book", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "入库申请", |
|
||||
"href": "/application_in", |
|
||||
"icon": "layui-icon layui-icon-file-b", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "出库申请", |
|
||||
"href": "/application_out", |
|
||||
"icon": "fa fa-file-text", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "库存转移申请", |
|
||||
"href": "application_transfer", |
|
||||
"icon": "fa fa-exchange", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "我的任务", |
|
||||
"icon": "fa fa-tasks", |
|
||||
"target": "_self", |
|
||||
"href": "/my_task" |
|
||||
}, |
|
||||
{ |
|
||||
"title": "我的申请", |
|
||||
"href": "/my_apply", |
|
||||
"icon": "fa fa-paper-plane", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "辅助管理", |
|
||||
"icon": "fa fa-slideshare", |
|
||||
"href": "", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "公告发布", |
|
||||
"href": "/notice_edit", |
|
||||
"icon": "fa fa-superpowers", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"title": "个人中心", |
|
||||
"href": "pages/error.html", |
|
||||
"icon": "fa fa-superpowers", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"title": "个人信息", |
|
||||
"href": "/account_look", |
|
||||
"icon": "layui-icon layui-icon-friends", |
|
||||
"target": "" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,254 +0,0 @@ |
|||||
{ |
|
||||
"code": 0, |
|
||||
"msg": "", |
|
||||
"count": 19, |
|
||||
"data": [ |
|
||||
{ |
|
||||
"authorityId": 1, |
|
||||
"authorityName": "系统管理", |
|
||||
"orderNumber": 1, |
|
||||
"menuUrl": null, |
|
||||
"menuIcon": "layui-icon-set", |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": null, |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 0, |
|
||||
"parentId": -1 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 2, |
|
||||
"authorityName": "用户管理", |
|
||||
"orderNumber": 2, |
|
||||
"menuUrl": "system/user", |
|
||||
"menuIcon": null, |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": null, |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 0, |
|
||||
"parentId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 3, |
|
||||
"authorityName": "查询用户", |
|
||||
"orderNumber": 3, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/07/21 13:54:16", |
|
||||
"authority": "user:view", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/21 13:54:16", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 2 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 4, |
|
||||
"authorityName": "添加用户", |
|
||||
"orderNumber": 4, |
|
||||
"menuUrl": null, |
|
||||
"menuIcon": null, |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "user:add", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 2 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 5, |
|
||||
"authorityName": "修改用户", |
|
||||
"orderNumber": 5, |
|
||||
"menuUrl": null, |
|
||||
"menuIcon": null, |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "user:edit", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 2 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 6, |
|
||||
"authorityName": "删除用户", |
|
||||
"orderNumber": 6, |
|
||||
"menuUrl": null, |
|
||||
"menuIcon": null, |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "user:delete", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 2 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 7, |
|
||||
"authorityName": "角色管理", |
|
||||
"orderNumber": 7, |
|
||||
"menuUrl": "system/role", |
|
||||
"menuIcon": null, |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": null, |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 0, |
|
||||
"parentId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 8, |
|
||||
"authorityName": "查询角色", |
|
||||
"orderNumber": 8, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/07/21 13:54:59", |
|
||||
"authority": "role:view", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/21 13:54:58", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 7 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 9, |
|
||||
"authorityName": "添加角色", |
|
||||
"orderNumber": 9, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "role:add", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 7 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 10, |
|
||||
"authorityName": "修改角色", |
|
||||
"orderNumber": 10, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "role:edit", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 7 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 11, |
|
||||
"authorityName": "删除角色", |
|
||||
"orderNumber": 11, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "role:delete", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 7 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 12, |
|
||||
"authorityName": "角色权限管理", |
|
||||
"orderNumber": 12, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "role:auth", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 15:27:18", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 7 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 13, |
|
||||
"authorityName": "权限管理", |
|
||||
"orderNumber": 13, |
|
||||
"menuUrl": "system/authorities", |
|
||||
"menuIcon": null, |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": null, |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 15:45:13", |
|
||||
"isMenu": 0, |
|
||||
"parentId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 14, |
|
||||
"authorityName": "查询权限", |
|
||||
"orderNumber": 14, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/07/21 13:55:57", |
|
||||
"authority": "authorities:view", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/21 13:55:56", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 13 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 15, |
|
||||
"authorityName": "添加权限", |
|
||||
"orderNumber": 15, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "authorities:add", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/06/29 11:05:41", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 13 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 16, |
|
||||
"authorityName": "修改权限", |
|
||||
"orderNumber": 16, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/07/13 09:13:42", |
|
||||
"authority": "authorities:edit", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/13 09:13:42", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 13 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 17, |
|
||||
"authorityName": "删除权限", |
|
||||
"orderNumber": 17, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": "authorities:delete", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/06/29 11:05:41", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 13 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 18, |
|
||||
"authorityName": "登录日志", |
|
||||
"orderNumber": 18, |
|
||||
"menuUrl": "system/loginRecord", |
|
||||
"menuIcon": null, |
|
||||
"createTime": "2018/06/29 11:05:41", |
|
||||
"authority": null, |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/06/29 11:05:41", |
|
||||
"isMenu": 0, |
|
||||
"parentId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"authorityId": 19, |
|
||||
"authorityName": "查询登录日志", |
|
||||
"orderNumber": 19, |
|
||||
"menuUrl": "", |
|
||||
"menuIcon": "", |
|
||||
"createTime": "2018/07/21 13:56:43", |
|
||||
"authority": "loginRecord:view", |
|
||||
"checked": 0, |
|
||||
"updateTime": "2018/07/21 13:56:43", |
|
||||
"isMenu": 1, |
|
||||
"parentId": 18 |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,139 +0,0 @@ |
|||||
{ |
|
||||
"code": 0, |
|
||||
"msg": "", |
|
||||
"count": 1000, |
|
||||
"data": [ |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 2001, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "购入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "无", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10001, |
|
||||
"applicationId": 3301, |
|
||||
"materialName": "麒麟980芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "购入", |
|
||||
"state": "已入库", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2021-10-06 10:05", |
|
||||
"reviewRemarks": "审核批准!", |
|
||||
"reviewTime": "2021-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准", |
|
||||
"checkerName": "李四", |
|
||||
"checkRemarks": "验收无误,入库!", |
|
||||
"checkTime": "2021-10-8 15:23" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10002, |
|
||||
"applicationId": 409, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "购入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 123, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "转入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 321, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "转入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 456, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "转入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 456, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "购入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 123, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "转入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,136 +0,0 @@ |
|||||
{ |
|
||||
"code": 0, |
|
||||
"msg": "", |
|
||||
"count": 1000, |
|
||||
"data": [ |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 2001, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "购入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "无", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10001, |
|
||||
"applicationId": 3301, |
|
||||
"materialName": "麒麟980芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "购入", |
|
||||
"state": "已入库", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2021-10-06 10:05", |
|
||||
"reviewRemarks": "审核批准!", |
|
||||
"reviewTime": "2021-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10002, |
|
||||
"applicationId": 409, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "购入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 123, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "转入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 321, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "转入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 456, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "转入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 456, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "购入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"applicationId": 123, |
|
||||
"materialName": "骁龙888芯片", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"quantity": "409", |
|
||||
"price": "205004109", |
|
||||
"type": "转入", |
|
||||
"state": "待审核", |
|
||||
"applicantName": "张三", |
|
||||
"reviewerName": "King", |
|
||||
"applyTime": "2020-10-06 10:05", |
|
||||
"reviewTime": "2020-10-07 11:12", |
|
||||
"depositoryId": 57, |
|
||||
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,95 +0,0 @@ |
|||||
{ |
|
||||
"code": 0, |
|
||||
"msg": "", |
|
||||
"count": 1000, |
|
||||
"data": [ |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"uname": "张三", |
|
||||
"sex": "男", |
|
||||
"authority": "仓管员", |
|
||||
"phone": "4561348", |
|
||||
"email": "12345689@qq.com", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"entryDate": "2012-10-06", |
|
||||
"depositoryId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"uname": "李四", |
|
||||
"sex": "男", |
|
||||
"authority": "仓管员", |
|
||||
"phone": "4561348", |
|
||||
"email": "12345689@qq.com", |
|
||||
"depositoryName": "义乌仓库a", |
|
||||
"entryDate": "2012-10-06", |
|
||||
"depositoryId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"uname": "King", |
|
||||
"sex": "男", |
|
||||
"authority": "仓管员", |
|
||||
"phone": "4561348", |
|
||||
"email": "12345689@qq.com", |
|
||||
"depositoryName": "义乌仓库b", |
|
||||
"entryDate": "2012-10-06", |
|
||||
"depositoryId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"uname": "张三", |
|
||||
"sex": "男", |
|
||||
"authority": "仓管员", |
|
||||
"phone": "4561348", |
|
||||
"email": "12345689@qq.com", |
|
||||
"depositoryName": "宁波仓库", |
|
||||
"entryDate": "2012-10-06", |
|
||||
"depositoryId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"uname": "张三", |
|
||||
"sex": "男", |
|
||||
"authority": "仓管员", |
|
||||
"phone": "4561348", |
|
||||
"email": "12345689@qq.com", |
|
||||
"depositoryName": "宁波仓库", |
|
||||
"entryDate": "2012-10-06", |
|
||||
"depositoryId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"uname": "boss", |
|
||||
"sex": "男", |
|
||||
"authority": "系统管理员", |
|
||||
"phone": "4561348", |
|
||||
"email": "12345689@qq.com", |
|
||||
"depositoryName": "all", |
|
||||
"entryDate": "2012-10-06", |
|
||||
"depositoryId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"uname": "张三", |
|
||||
"sex": "男", |
|
||||
"authority": "仓管员", |
|
||||
"phone": "4561348", |
|
||||
"email": "12345689@qq.com", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"entryDate": "2012-10-06", |
|
||||
"depositoryId": 1 |
|
||||
}, |
|
||||
{ |
|
||||
"id": 10000, |
|
||||
"uname": "张三", |
|
||||
"sex": "男", |
|
||||
"authority": "仓管员", |
|
||||
"phone": "4561348", |
|
||||
"email": "12345689@qq.com", |
|
||||
"depositoryName": "外芯仓库", |
|
||||
"entryDate": "2012-10-06", |
|
||||
"depositoryId": 1 |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,87 +0,0 @@ |
|||||
{ |
|
||||
"code": 0, |
|
||||
"msg": "", |
|
||||
"count": 16, |
|
||||
"data": [ |
|
||||
{ |
|
||||
"id": "001", |
|
||||
"username": "张玉林", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "002", |
|
||||
"username": "刘晓军", |
|
||||
"sex": "男" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "003", |
|
||||
"username": "张恒", |
|
||||
"sex": "男" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "004", |
|
||||
"username": "朱一", |
|
||||
"sex": "男" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "005", |
|
||||
"username": "刘佳能", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "006", |
|
||||
"username": "晓梅", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "007", |
|
||||
"username": "马冬梅", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "008", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "009", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "010", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "011", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "012", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "013", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "014", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "015", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
}, |
|
||||
{ |
|
||||
"id": "016", |
|
||||
"username": "刘晓庆", |
|
||||
"sex": "女" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,225 +0,0 @@ |
|||||
{ |
|
||||
"homeInfo": { |
|
||||
"title": "首页", |
|
||||
"href": "/welcome" |
|
||||
}, |
|
||||
"logoInfo": { |
|
||||
"title": "Repository", |
|
||||
"image": "static/images/logo.png", |
|
||||
"href": "" |
|
||||
}, |
|
||||
"menuInfo": [ |
|
||||
{ |
|
||||
"icon": "fa fa-home", |
|
||||
"href": "/welcome", |
|
||||
"title": "仓库信息概览", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "fa fa-home", |
|
||||
"href": "/welcome", |
|
||||
"title": "首页", |
|
||||
"target": "_self", |
|
||||
"child": [] |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/account_look", |
|
||||
"title": "个人中心", |
|
||||
"target": "_self", |
|
||||
"child": [] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-lemon-o", |
|
||||
"href": "", |
|
||||
"title": "仓库管理", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/my_task", |
|
||||
"title": "我的任务", |
|
||||
"target": "_self", |
|
||||
"child": [] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/my_apply", |
|
||||
"title": "我的申请", |
|
||||
"target": "_self", |
|
||||
"child": [] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"href": "", |
|
||||
"title": "申请提交", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-file-b", |
|
||||
"href": "/application_in", |
|
||||
"title": "入库申请", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-file-text", |
|
||||
"href": "/application_out", |
|
||||
"title": "出库申请", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-exchange", |
|
||||
"href": "/application_transfer", |
|
||||
"title": "库存转移申请", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"href": "", |
|
||||
"title": "入库管理", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "fa fa-th-list", |
|
||||
"href": "/table_in", |
|
||||
"title": "入库查询", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-bar-chart", |
|
||||
"href": "/chart_in", |
|
||||
"title": "入库可视化", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"href": "", |
|
||||
"title": "出库管理", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "fa fa-th-list", |
|
||||
"href": "/table_out", |
|
||||
"title": "出库查询", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-pie-chart", |
|
||||
"href": "/chart_out", |
|
||||
"title": "出库可视化", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"href": "", |
|
||||
"title": "库存管理", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "fa fa-th-list", |
|
||||
"href": "/table_stock", |
|
||||
"title": "库存查询", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-area-chart", |
|
||||
"href": "/chart_stock", |
|
||||
"title": "库存可视化", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"href": "", |
|
||||
"title": "仓库管理", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/depository_add", |
|
||||
"title": "创建仓库", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-th-list", |
|
||||
"href": "/depository-out", |
|
||||
"title": "仓库查询", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"href": "", |
|
||||
"title": "物料种类管理", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "fa fa-th-list", |
|
||||
"href": "/materialType_add", |
|
||||
"title": "物料种类添加", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/materialType_view", |
|
||||
"title": "物料种类查询", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-mail-forward", |
|
||||
"href": "", |
|
||||
"title": "物料管理", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/material_add", |
|
||||
"title": "创建物料", |
|
||||
"target": "_self" |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/material_out", |
|
||||
"title": "物料查询", |
|
||||
"target": "_self" |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "fa fa-slideshare", |
|
||||
"href": "", |
|
||||
"title": "辅助管理", |
|
||||
"target": "_self", |
|
||||
"child": [ |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/table_user", |
|
||||
"title": "人员管理", |
|
||||
"target": "_self", |
|
||||
"child": [] |
|
||||
}, |
|
||||
{ |
|
||||
"icon": "layui-icon layui-icon-template-1", |
|
||||
"href": "/notice_edit", |
|
||||
"title": "公告发布", |
|
||||
"target": "_self", |
|
||||
"child": [] |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -1,10 +0,0 @@ |
|||||
{ |
|
||||
"code": 1, |
|
||||
"msg": "上传成功", |
|
||||
"data": { |
|
||||
"url": [ |
|
||||
"../images/logo.png", |
|
||||
"../images/captcha.jpg" |
|
||||
] |
|
||||
} |
|
||||
} |
|
||||
@ -1,934 +0,0 @@ |
|||||
/** |
|
||||
配色方案(如有需要,请自行配置) |
|
||||
*/ |
|
||||
/**头部-配色*/ |
|
||||
.layui-layout-admin .layui-header { |
|
||||
background-color: #1aa094 !important; |
|
||||
} |
|
||||
|
|
||||
.layui-header > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
|
||||
background-color: #197971 !important; |
|
||||
} |
|
||||
|
|
||||
.layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
|
||||
background-color: #197971 !important; |
|
||||
} |
|
||||
|
|
||||
/**logo-配色*/ |
|
||||
.layui-layout-admin .layuimini-logo { |
|
||||
background-color: #243346 !important; |
|
||||
} |
|
||||
|
|
||||
/**左侧-配色*/ |
|
||||
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul { |
|
||||
background-color: #2f4056 !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav .layui-nav-child a:hover:not(.layui-this) { |
|
||||
background-color: #3b3f4b; |
|
||||
} |
|
||||
|
|
||||
/**左侧菜单选中-配色*/ |
|
||||
.layui-layout-admin .layui-nav-tree .layui-this, .layui-layout-admin .layui-nav-tree .layui-this > a, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a { |
|
||||
background-color: #1aa094 !important; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/**头部样式 */ |
|
||||
.layui-layout-admin .header { |
|
||||
position: fixed; |
|
||||
left: 0; |
|
||||
right: 0; |
|
||||
top: 0; |
|
||||
bottom: 0; |
|
||||
} |
|
||||
|
|
||||
.layuimini-header-menu, .layui-header { |
|
||||
height: 60px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-header-menu > .layui-nav-item { |
|
||||
color: #1b1d21; |
|
||||
height: 60px !important; |
|
||||
line-height: 60px !important; |
|
||||
} |
|
||||
|
|
||||
.layui-header > .layui-layout-right > .layui-nav-item { |
|
||||
height: 60px !important; |
|
||||
line-height: 60px !important; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-left { |
|
||||
left: 295px !important; |
|
||||
} |
|
||||
|
|
||||
.layui-nav.layui-layout-left.layuimini-header-menu.layuimini-pc-show { |
|
||||
font-weight: bold; |
|
||||
transition: all .2s; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/**logo演示(通用) */ |
|
||||
.layui-layout-admin .layuimini-logo { |
|
||||
font-weight: bold; |
|
||||
color: #ffffff !important; |
|
||||
height: 60px !important; |
|
||||
line-height: 60px !important; |
|
||||
overflow: hidden; |
|
||||
line-height: 64px; |
|
||||
transition: all .2s !important; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-admin .layuimini-logo img { |
|
||||
display: inline-block; |
|
||||
height: 40px; |
|
||||
vertical-align: middle; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-admin .layuimini-logo h1 { |
|
||||
display: inline-block; |
|
||||
margin: 0 0 0 12px; |
|
||||
color: #ffffff; |
|
||||
font-weight: 600; |
|
||||
font-size: 20px; |
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; |
|
||||
vertical-align: middle; |
|
||||
} |
|
||||
|
|
||||
/**缩放工具(通用) */ |
|
||||
.layuimini-tool { |
|
||||
position: absolute !important; |
|
||||
top: 0; |
|
||||
left: 235px; |
|
||||
width: 60px; |
|
||||
height: 100%; |
|
||||
line-height: 60px; |
|
||||
text-align: center; |
|
||||
color: #ffffff !important; |
|
||||
transition: all .2s; |
|
||||
} |
|
||||
|
|
||||
/**缩放工具(缩放) */ |
|
||||
.layuimini-tool i { |
|
||||
display: block; |
|
||||
color: #bbe3df; |
|
||||
width: 32px; |
|
||||
height: 32px; |
|
||||
line-height: 32px; |
|
||||
border-radius: 3px; |
|
||||
text-align: center; |
|
||||
margin-top: 15px; |
|
||||
cursor: pointer; |
|
||||
} |
|
||||
|
|
||||
/**tab选项卡 */ |
|
||||
.layuimini-tab { |
|
||||
margin: 0px; |
|
||||
overflow: hidden; |
|
||||
height: 100% !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-content { |
|
||||
height: calc(100% - 37px) !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-content .layui-tab-item { |
|
||||
height: 100%; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-content { |
|
||||
padding: 0px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title { |
|
||||
border: none; |
|
||||
border: 1px solid whitesmoke; |
|
||||
background-color: white; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title li { |
|
||||
border-right: 1px solid whitesmoke; |
|
||||
color: dimgray; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .layui-tab-bar { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .layui-this:after { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .layuimini-tab-active { |
|
||||
display: inline-block; |
|
||||
background-color: lightgray; |
|
||||
width: 9px; |
|
||||
height: 9px; |
|
||||
border-radius: 30px; |
|
||||
margin-right: 5px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { |
|
||||
background-color: #1aa094; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab > .layui-tab-title, .layuimini-tab > .close-box { |
|
||||
height: 35px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab > .layui-tab-title li, .layuimini-tab > .close-box li { |
|
||||
line-height: 35px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title span { |
|
||||
color: #acafb1; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .layui-this span { |
|
||||
color: dimgray; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .layui-tab-close { |
|
||||
font-size: 12px !important; |
|
||||
width: 14px !important; |
|
||||
height: 14px !important; |
|
||||
line-height: 16px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .layui-tab-close:hover { |
|
||||
border-radius: 4em; |
|
||||
background: #ff5722; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .disable-close + .layui-tab-close { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-title .able-close + .layui-tab-close { |
|
||||
display: inline-block; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-control > li { |
|
||||
position: absolute; |
|
||||
top: 0px; |
|
||||
height: 35px; |
|
||||
line-height: 35px; |
|
||||
width: 35px; |
|
||||
text-align: center; |
|
||||
background-color: white; |
|
||||
border-top: whitesmoke 1px solid; |
|
||||
border-bottom: whitesmoke 1px solid; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layuimini-tab-roll-left { |
|
||||
left: 0px; |
|
||||
border-right: whitesmoke 1px solid; |
|
||||
border-left: whitesmoke 1px solid; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layuimini-tab-roll-right { |
|
||||
right: 35px; |
|
||||
border-left: 1px solid whitesmoke; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-tool { |
|
||||
right: 0px; |
|
||||
border-left: 1px solid whitesmoke; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-control .layui-tab-tool, |
|
||||
.layuimini-tab .layui-tab-control .layuimini-tab-roll-left, |
|
||||
.layuimini-tab .layui-tab-control .layuimini-tab-roll-right { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-left, |
|
||||
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right { |
|
||||
display: block; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right { |
|
||||
right: 0px; |
|
||||
border-right: 1px solid whitesmoke; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab.layui-tab-roll .layui-tab-title { |
|
||||
padding-left: 35px; |
|
||||
padding-right: 35px; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
.layuimini-tab.layui-tab-tool .layui-tab-control .layui-tab-tool { |
|
||||
display: block; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab.layui-tab-tool .layui-tab-title { |
|
||||
padding-left: 0px; |
|
||||
padding-right: 35px; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
.layuimini-tab.layui-tab-rollTool .layui-tab-title { |
|
||||
padding-left: 35px; |
|
||||
padding-right: 80px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-left, |
|
||||
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-right, |
|
||||
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layui-tab-tool { |
|
||||
display: block; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-tool .layui-nav { |
|
||||
position: absolute; |
|
||||
height: 43px !important; |
|
||||
top: 0; |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
padding: 0; |
|
||||
background: 0 0; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-tool .layui-nav-item { |
|
||||
height: 35px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-tool .layui-nav-bar { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-tool .layui-nav-child { |
|
||||
left: auto; |
|
||||
top: 45px; |
|
||||
right: 3px; |
|
||||
width: 120px; |
|
||||
border: 1px solid whitesmoke; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-tool .layui-this a { |
|
||||
background-color: #009688; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab-loading { |
|
||||
position: absolute; |
|
||||
display: none; |
|
||||
width: 100%; |
|
||||
height: calc(100% - 37px); |
|
||||
top: 37px; |
|
||||
z-index: 19; |
|
||||
background-color: #fff |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab-loading.close { |
|
||||
animation: close 1s; |
|
||||
-webkit-animation: close 1s; |
|
||||
animation-fill-mode: forwards; |
|
||||
} |
|
||||
|
|
||||
/**左侧菜单栏 (通用) */ |
|
||||
.layui-side.layui-bg-black { |
|
||||
transition: all .2s; |
|
||||
} |
|
||||
|
|
||||
.layui-side.layui-bg-black > .layuimini-menu-left > ul { |
|
||||
transition: all .2s; |
|
||||
} |
|
||||
|
|
||||
.layui-side.layui-bg-black > .layuimini-menu-left > ul > .layui-nav-item:first-child { |
|
||||
border-top: 1px solid #4b5461; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav .layui-nav-item a { |
|
||||
height: 40px; |
|
||||
line-height: 40px; |
|
||||
padding-right: 30px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav .layui-nav-item > a { |
|
||||
padding-top: 5px; |
|
||||
padding-bottom: 5px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child { |
|
||||
background: 0 0 !important |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav .layui-nav-more { |
|
||||
right: 15px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav .layui-nav-item a:hover { |
|
||||
background-color: transparent !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav { |
|
||||
background-color: transparent !important; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/**左侧菜单栏 (正常) */ |
|
||||
.layui-layout-body .layui-nav-itemed .layui-nav-child a, .layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child a { |
|
||||
padding-left: 35px; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child a { |
|
||||
padding-left: 45px; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child a { |
|
||||
padding-left: 55px; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child .layui-nav-child a { |
|
||||
padding-left: 65px; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-itemed > .layui-nav-child { |
|
||||
padding: 5px 0; |
|
||||
} |
|
||||
|
|
||||
/**内容主体(通用) */ |
|
||||
.layui-layout-admin .layui-body { |
|
||||
overflow: hidden; |
|
||||
bottom: 0px !important; |
|
||||
top: 60px !important; |
|
||||
transition: all .2s; |
|
||||
} |
|
||||
|
|
||||
/**选择配色方案 */ |
|
||||
.layuimini-color .color-title { |
|
||||
padding: 10px 0 10px 20px; |
|
||||
border-bottom: 1px solid #d9dada; |
|
||||
margin-bottom: 8px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .color-content { |
|
||||
padding: 10px 5px 0 5px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .color-content ul { |
|
||||
list-style: none; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .color-content ul li { |
|
||||
position: relative; |
|
||||
display: inline-block; |
|
||||
vertical-align: top; |
|
||||
width: 80px; |
|
||||
height: 50px; |
|
||||
margin: 0 15px 15px 0; |
|
||||
padding: 2px 2px 4px 2px; |
|
||||
background-color: #f2f2f2; |
|
||||
cursor: pointer; |
|
||||
font-size: 12px; |
|
||||
color: #666; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .color-content li.layui-this:after, .layuimini-color .color-content li:hover:after { |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
padding: 4px; |
|
||||
top: -5px; |
|
||||
left: -5px; |
|
||||
border-color: #d8d8d8; |
|
||||
opacity: 1; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .color-content li:after { |
|
||||
content: ''; |
|
||||
position: absolute; |
|
||||
z-index: 20; |
|
||||
top: 50%; |
|
||||
left: 50%; |
|
||||
width: 1px; |
|
||||
height: 0; |
|
||||
border: 1px solid #f2f2f2; |
|
||||
transition: all .3s; |
|
||||
-webkit-transition: all .3s; |
|
||||
opacity: 0; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/**其它 */ |
|
||||
.layui-tab-item { |
|
||||
width: 100% !important; |
|
||||
height: 100% !important; |
|
||||
} |
|
||||
|
|
||||
.layui-nav-item.layui-this { |
|
||||
background-color: #1b1d21; |
|
||||
} |
|
||||
|
|
||||
.layui-width-height { |
|
||||
width: 100%; |
|
||||
height: 95%; |
|
||||
} |
|
||||
|
|
||||
.layui-tab { |
|
||||
margin: 0 0 0 0; |
|
||||
z-index: 99999; |
|
||||
} |
|
||||
|
|
||||
.text-center { |
|
||||
height: 30px !important; |
|
||||
line-height: 30px !important; |
|
||||
text-align: center !important; |
|
||||
} |
|
||||
|
|
||||
.layui-nav { |
|
||||
padding: 0 !important; |
|
||||
} |
|
||||
|
|
||||
.layui-nav .layui-this:after, .layui-nav-bar, .layui-nav-tree .layui-nav-itemed:after { |
|
||||
width: 0 !important; |
|
||||
height: 0 !important; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-admin .layui-side { |
|
||||
top: 60px !important; |
|
||||
} |
|
||||
|
|
||||
.layui-tab-card { |
|
||||
box-shadow: 0px 0px 0px #888888; |
|
||||
border-bottom: 0; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/**自定义滚动条样式 */ |
|
||||
::-webkit-scrollbar { |
|
||||
display: none |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/*移动端遮罩层*/ |
|
||||
.layuimini-make { |
|
||||
position: fixed; |
|
||||
left: 0; |
|
||||
right: 0; |
|
||||
bottom: 0; |
|
||||
top: 0; |
|
||||
z-index: 1000; |
|
||||
background: rgba(0, 0, 0, .5); |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layui-header { |
|
||||
z-index: 1001; |
|
||||
} |
|
||||
|
|
||||
/**初始化加载层*/ |
|
||||
.layuimini-loader { |
|
||||
position: fixed; |
|
||||
top: 0; |
|
||||
left: 0; |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
background-color: #ffffff; |
|
||||
z-index: 999999; |
|
||||
} |
|
||||
|
|
||||
.layuimini-loader .layuimini-loader-inner { |
|
||||
display: block; |
|
||||
position: relative; |
|
||||
left: 50%; |
|
||||
top: 50%; |
|
||||
width: 150px; |
|
||||
height: 150px; |
|
||||
margin: -75px 0 0 -75px; |
|
||||
border-radius: 50%; |
|
||||
border: 3px solid transparent; |
|
||||
border-top-color: #1E9FFF; |
|
||||
animation: spin 2s linear infinite; |
|
||||
} |
|
||||
|
|
||||
.layuimini-loader .layuimini-loader-inner:before { |
|
||||
content: ""; |
|
||||
position: absolute; |
|
||||
top: 5px; |
|
||||
left: 5px; |
|
||||
right: 5px; |
|
||||
bottom: 5px; |
|
||||
border-radius: 50%; |
|
||||
border: 3px solid transparent; |
|
||||
border-top-color: #1E9FFF; |
|
||||
animation: spin 3s linear infinite; |
|
||||
} |
|
||||
|
|
||||
.layuimini-loader .layuimini-loader-inner:after { |
|
||||
content: ""; |
|
||||
position: absolute; |
|
||||
top: 15px; |
|
||||
left: 15px; |
|
||||
right: 15px; |
|
||||
bottom: 15px; |
|
||||
border-radius: 50%; |
|
||||
border: 3px solid transparent; |
|
||||
border-top-color: #1E9FFF; |
|
||||
animation: spin 1.5s linear infinite; |
|
||||
} |
|
||||
|
|
||||
@keyframes spin { |
|
||||
0% { |
|
||||
transform: rotate(0deg); |
|
||||
} |
|
||||
to { |
|
||||
transform: rotate(1turn); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/*系统设置*/ |
|
||||
|
|
||||
.layuimini-color .layui-word-aux { |
|
||||
position: absolute; |
|
||||
left: 60px; |
|
||||
top: 12px; |
|
||||
font-size: 12px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .layui-input-block { |
|
||||
margin-left: 15px; |
|
||||
min-height: 36px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .more-menu-list { |
|
||||
width: 100%; |
|
||||
margin-top: 30px; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
.layuimini-color .more-menu-item:first-child { |
|
||||
border-top: 1px solid #e8e8e8; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .more-menu-item .layui-icon { |
|
||||
font-size: 18px; |
|
||||
padding-right: 10px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .more-menu-item { |
|
||||
color: #595959; |
|
||||
height: 50px; |
|
||||
line-height: 50px; |
|
||||
font-size: 16px; |
|
||||
padding: 0 25px; |
|
||||
border-bottom: 1px solid #e8e8e8; |
|
||||
font-style: normal; |
|
||||
display: block; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .more-menu-item:hover { |
|
||||
background-color: whitesmoke; |
|
||||
} |
|
||||
|
|
||||
.layuimini-color .more-menu-item:after { |
|
||||
color: #8c8c8c; |
|
||||
right: 16px; |
|
||||
content: "\e602"; |
|
||||
position: absolute; |
|
||||
font-family: layui-icon !important; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
鼠标右键 |
|
||||
*/ |
|
||||
.layuimini-tab-mousedown { |
|
||||
display: none; |
|
||||
width: 80px; |
|
||||
position: absolute; |
|
||||
top: 0px !important; |
|
||||
left: 0px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab-mousedown dd a { |
|
||||
padding: 0 15px; |
|
||||
color: #484545; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab-make { |
|
||||
position: absolute; |
|
||||
top: 36px; |
|
||||
bottom: 0px; |
|
||||
width: 100%; |
|
||||
background: rgb(255, 255, 255, 0); |
|
||||
padding: 0px; |
|
||||
overflow: hidden; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
菜单缩放 |
|
||||
*/ |
|
||||
.popup-tips .layui-layer-TipsG { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.popup-tips.layui-layer-tips .layui-layer-content { |
|
||||
padding: 0; |
|
||||
} |
|
||||
|
|
||||
.popup-tips .layui-nav-tree { |
|
||||
width: 150px; |
|
||||
border-radius: 10px; |
|
||||
} |
|
||||
|
|
||||
/**左侧菜单字体间距*/ |
|
||||
.layuimini-menu-left .layui-nav-item a span { |
|
||||
letter-spacing: 1px; |
|
||||
} |
|
||||
|
|
||||
/**头部菜单字体间距*/ |
|
||||
.layui-layout-admin .layui-header .layuimini-header-menu.layuimini-pc-show, .layui-layout-admin .layui-header .layuimini-header-menu.layuimini-mobile-show { |
|
||||
letter-spacing: 1px; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/**左侧菜单更多下拉样式*/ |
|
||||
.layuimini-menu-left .layui-nav-more, .layuimini-menu-left-zoom .layui-nav-more { |
|
||||
font-family: layui-icon !important; |
|
||||
font-size: 12px; |
|
||||
font-style: normal; |
|
||||
-webkit-font-smoothing: antialiased; |
|
||||
-moz-osx-font-smoothing: grayscale; |
|
||||
overflow: hidden; |
|
||||
width: auto; |
|
||||
height: auto; |
|
||||
line-height: normal; |
|
||||
border: none; |
|
||||
display: inline-block; |
|
||||
margin-top: -6px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav-child .layui-nav-more { |
|
||||
margin-top: -6px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more { |
|
||||
margin-top: -9px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more { |
|
||||
margin-top: -9px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav-more:before, .layuimini-menu-left-zoom .layui-nav-more:before { |
|
||||
content: "\e61a"; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more, .layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more { |
|
||||
transform: rotate(180deg); |
|
||||
-ms-transform: rotate(180deg); |
|
||||
-moz-transform: rotate(180deg); |
|
||||
-webkit-transform: rotate(180deg); |
|
||||
-o-transform: rotate(180deg); |
|
||||
width: 12px; |
|
||||
text-align: center; |
|
||||
border-style: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more:before, .layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more:before { |
|
||||
content: '\e61a'; |
|
||||
background-color: transparent; |
|
||||
display: inline-block; |
|
||||
vertical-align: middle; |
|
||||
} |
|
||||
|
|
||||
/**修复左侧菜单字体不对齐的问题*/ |
|
||||
.layuimini-menu-left .layui-nav-item a .fa, .layuimini-menu-left .layui-nav-item a .layui-icon { |
|
||||
width: 20px; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
PC版样式 |
|
||||
*/ |
|
||||
@media screen and (min-width: 1025px) { |
|
||||
/**头部样式(缩放) */ |
|
||||
.layuimini-mini .layui-layout-left.layuimini-header-menu.layuimini-pc-show { |
|
||||
left: 155px !important; |
|
||||
} |
|
||||
|
|
||||
/**logo演示(缩放) */ |
|
||||
.layuimini-mini .layui-layout-admin .layuimini-logo { |
|
||||
width: 60px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layui-layout-admin .layuimini-logo h1 { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
/**左侧菜单栏(缩放) */ |
|
||||
.layuimini-mini .layuimini-menu-left { |
|
||||
width: 80px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layui-side.layui-bg-black, .layuimini-mini .layuimini-menu-left > ul, .layuimini-mini .layuimini-menu-left > ul li i { |
|
||||
width: 60px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layuimini-menu-left > ul li span:first-child { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layuimini-menu-left > ul li span:last-child { |
|
||||
float: right; |
|
||||
right: 7px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layuimini-menu-left .layui-nav .layui-nav-item a { |
|
||||
height: 40px; |
|
||||
line-height: 40px; |
|
||||
padding-right: 0px !important; |
|
||||
} |
|
||||
|
|
||||
/**内容主体(缩放) */ |
|
||||
.layuimini-mini .layui-layout-admin .layui-body { |
|
||||
left: 60px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layuimini-tool { |
|
||||
left: 95px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-pc-show { |
|
||||
display: block; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mobile-show { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
/**菜单缩放*/ |
|
||||
.layuimini-mini .layuimini-menu-left .layui-nav-more, .layuimini-mini .layuimini-menu-left .layui-nav-child { |
|
||||
display: none; |
|
||||
!important; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
手机自适应样式 |
|
||||
*/ |
|
||||
@media screen and (max-width: 1024px) { |
|
||||
|
|
||||
/** |
|
||||
todo 修复低版本IOS不能滑动问题, 但还是有问题, 低版本IOS部分情况下子页面无法自适应 |
|
||||
*/ |
|
||||
.layuimini-tab .layui-tab-content .layui-tab-item { |
|
||||
-webkit-overflow-scrolling: touch; |
|
||||
overflow: scroll; |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
} |
|
||||
|
|
||||
.layuimini-tab .layui-tab-content .layui-tab-item iframe { |
|
||||
height: 100%; |
|
||||
width: 100%; |
|
||||
} |
|
||||
|
|
||||
.layuimini-pc-show { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mobile-show { |
|
||||
display: block; |
|
||||
} |
|
||||
|
|
||||
.layuimini-header-content { |
|
||||
left: 0; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-admin .layui-body .layui-tab-item.layui-show { |
|
||||
border-top: 1px solid #e2e2e2; |
|
||||
} |
|
||||
|
|
||||
.layuimini-all .layui-layout-left.layuimini-header-menu { |
|
||||
left: 15px !important |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layui-layout-left.layuimini-header-menu { |
|
||||
left: 205px !important |
|
||||
} |
|
||||
|
|
||||
.layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) { |
|
||||
width: 40px !important; |
|
||||
} |
|
||||
|
|
||||
.layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) a { |
|
||||
padding: 0 15px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-all .layui-layout-admin .layui-body { |
|
||||
left: 0px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layui-layout-admin .layuimini-menu-left, .layuimini-mini .layui-header .layuimini-logo { |
|
||||
left: 0; |
|
||||
transition: left .2s; |
|
||||
z-index: 1001 !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-all .layui-layout-admin .layuimini-menu-left, .layuimini-all .layui-header .layuimini-logo { |
|
||||
left: -200px; |
|
||||
transition: left .2s; |
|
||||
top: 0; |
|
||||
z-index: 1002; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layui-layout-admin .layui-body { |
|
||||
left: 0 !important; |
|
||||
transition: left .2s; |
|
||||
top: 0; |
|
||||
z-index: 998; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layuimini-make { |
|
||||
display: block; |
|
||||
} |
|
||||
|
|
||||
.layuimini-multi-module .layuimini-header-content .layuimini-tool { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.layuimini-single-module .layuimini-header-content .layuimini-tool { |
|
||||
left: 15px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-mini .layuimini-site-mobile { |
|
||||
display: none !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-site-mobile { |
|
||||
display: block !important; |
|
||||
position: fixed; |
|
||||
z-index: 100000; |
|
||||
bottom: 15px; |
|
||||
left: 15px; |
|
||||
width: 40px; |
|
||||
height: 40px; |
|
||||
line-height: 40px; |
|
||||
border-radius: 2px; |
|
||||
text-align: center; |
|
||||
background-color: rgba(0, 0, 0, .7); |
|
||||
color: #fff; |
|
||||
} |
|
||||
|
|
||||
.layuimini-header-content { |
|
||||
z-index: 997; |
|
||||
} |
|
||||
|
|
||||
/*修复UC之类的浏览器点击无效*/ |
|
||||
.layuimini-make { |
|
||||
cursor: pointer; |
|
||||
} |
|
||||
|
|
||||
.layuimini-site-mobile { |
|
||||
cursor: pointer; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
@media screen and (max-width: 550px) { |
|
||||
|
|
||||
/**头部右侧数据*/ |
|
||||
.layuimini-multi-module.layuimini-mini .layuimini-header-content .layui-layout-right { |
|
||||
display: none; |
|
||||
} |
|
||||
} |
|
||||
@ -1,99 +0,0 @@ |
|||||
body { |
|
||||
margin: 15px 15px 15px 15px; |
|
||||
background: #f2f2f2; |
|
||||
} |
|
||||
|
|
||||
.layuimini-container { |
|
||||
border: 1px solid #f2f2f2; |
|
||||
border-radius: 5px; |
|
||||
background-color: #ffffff |
|
||||
} |
|
||||
|
|
||||
.layuimini-main { |
|
||||
margin: 10px 10px 10px 10px; |
|
||||
} |
|
||||
|
|
||||
/**必填红点 */ |
|
||||
.layuimini-form > .layui-form-item > .required:after { |
|
||||
content: '*'; |
|
||||
color: red; |
|
||||
position: absolute; |
|
||||
margin-left: 4px; |
|
||||
font-weight: bold; |
|
||||
line-height: 1.8em; |
|
||||
top: 6px; |
|
||||
right: 5px; |
|
||||
} |
|
||||
|
|
||||
.layuimini-form > .layui-form-item > .layui-form-label { |
|
||||
width: 120px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-form > .layui-form-item > .layui-input-block { |
|
||||
margin-left: 150px !important; |
|
||||
} |
|
||||
|
|
||||
.layuimini-form > .layui-form-item > .layui-input-block > tip { |
|
||||
display: inline-block; |
|
||||
margin-top: 10px; |
|
||||
line-height: 10px; |
|
||||
font-size: 10px; |
|
||||
color: #a29c9c; |
|
||||
} |
|
||||
|
|
||||
/**搜索框*/ |
|
||||
.layuimini-container .table-search-fieldset { |
|
||||
margin: 0; |
|
||||
border: 1px solid #e6e6e6; |
|
||||
padding: 10px 20px 5px 20px; |
|
||||
color: #6b6b6b; |
|
||||
} |
|
||||
|
|
||||
/**自定义滚动条样式 */ |
|
||||
::-webkit-scrollbar { |
|
||||
width: 6px; |
|
||||
height: 6px |
|
||||
} |
|
||||
|
|
||||
::-webkit-scrollbar-track { |
|
||||
background-color: transparent; |
|
||||
-webkit-border-radius: 2em; |
|
||||
-moz-border-radius: 2em; |
|
||||
border-radius: 2em; |
|
||||
} |
|
||||
|
|
||||
::-webkit-scrollbar-thumb { |
|
||||
background-color: #9c9da0; |
|
||||
-webkit-border-radius: 2em; |
|
||||
-moz-border-radius: 2em; |
|
||||
border-radius: 2em |
|
||||
} |
|
||||
|
|
||||
.my-shadow:hover { |
|
||||
box-shadow: 2px 0 4px rgba(0, 21, 41, .35); |
|
||||
} |
|
||||
|
|
||||
.my-card { |
|
||||
cursor: pointer; |
|
||||
width: 100%; |
|
||||
display: inline-block; |
|
||||
border-top-left-radius: 4px; |
|
||||
border-top-right-radius: 4px; |
|
||||
} |
|
||||
|
|
||||
.my-card-context{ |
|
||||
margin-left: 15px; |
|
||||
font-size: 18px; |
|
||||
margin-top: 5px; |
|
||||
font-weight:normal; |
|
||||
} |
|
||||
|
|
||||
.my-time { |
|
||||
margin-top: 40px; |
|
||||
margin-bottom: 20px; |
|
||||
} |
|
||||
|
|
||||
body { |
|
||||
font-family: 华文楷体; |
|
||||
font-weight: bold; |
|
||||
} |
|
||||
@ -1,95 +0,0 @@ |
|||||
/*头部右侧背景色 headerRightBg */ |
|
||||
.layui-layout-admin .layui-header { |
|
||||
background-color: #ffffff !important; |
|
||||
} |
|
||||
|
|
||||
/*头部右侧选中背景色 headerRightBgThis */ |
|
||||
.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
|
||||
background-color: #e4e4e4 !important; |
|
||||
} |
|
||||
|
|
||||
/*头部右侧字体颜色 headerRightColor */ |
|
||||
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a { |
|
||||
color: rgba(107, 107, 107, 0.7); |
|
||||
} |
|
||||
|
|
||||
/**头部右侧下拉字体颜色 headerRightChildColor */ |
|
||||
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { |
|
||||
color: rgba(107, 107, 107, 0.7) !important; |
|
||||
} |
|
||||
|
|
||||
/*头部右侧鼠标选中 headerRightColorThis */ |
|
||||
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { |
|
||||
color: #565656 !important; |
|
||||
} |
|
||||
|
|
||||
/*头部右侧更多下拉颜色 headerRightNavMore */ |
|
||||
.layui-header .layui-nav .layui-nav-more { |
|
||||
border-top-color: rgba(160, 160, 160, 0.7) !important; |
|
||||
} |
|
||||
|
|
||||
/*头部右侧更多下拉颜色 headerRightNavMore */ |
|
||||
.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more { |
|
||||
border-color: transparent transparent rgba(160, 160, 160, 0.7) !important; |
|
||||
} |
|
||||
|
|
||||
/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */ |
|
||||
.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { |
|
||||
background-color: #1E9FFF !important; |
|
||||
color: #ffffff !important; |
|
||||
} |
|
||||
|
|
||||
/*头部缩放按钮样式 headerRightToolColor */ |
|
||||
.layui-layout-admin .layui-header .layuimini-tool i { |
|
||||
color: #565656; |
|
||||
} |
|
||||
|
|
||||
/*logo背景颜色 headerLogoBg */ |
|
||||
.layui-layout-admin .layuimini-logo { |
|
||||
background-color: #192027 !important; |
|
||||
} |
|
||||
|
|
||||
/*logo字体颜色 headerLogoColor */ |
|
||||
.layui-layout-admin .layuimini-logo h1 { |
|
||||
color: rgb(191, 187, 187); |
|
||||
} |
|
||||
|
|
||||
/*左侧菜单更多下拉样式 leftMenuNavMore */ |
|
||||
.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more { |
|
||||
border-top-color: rgb(191, 187, 187); |
|
||||
} |
|
||||
|
|
||||
/*左侧菜单更多下拉样式 leftMenuNavMore */ |
|
||||
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more { |
|
||||
border-color: transparent transparent rgb(191, 187, 187) !important; |
|
||||
} |
|
||||
|
|
||||
/*左侧菜单背景 leftMenuBg */ |
|
||||
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul { |
|
||||
background-color: #28333E !important; |
|
||||
} |
|
||||
|
|
||||
/*左侧菜单选中背景 leftMenuBgThis */ |
|
||||
.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { |
|
||||
background-color: #1E9FFF !important |
|
||||
} |
|
||||
|
|
||||
/*左侧菜单子菜单背景 leftMenuChildBg */ |
|
||||
.layuimini-menu-left .layui-nav-itemed > .layui-nav-child { |
|
||||
background-color: #0c0f13 !important; |
|
||||
} |
|
||||
|
|
||||
/*左侧菜单字体颜色 leftMenuColor */ |
|
||||
.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a { |
|
||||
color: rgb(191, 187, 187) !important; |
|
||||
} |
|
||||
|
|
||||
/*左侧菜单选中字体颜色 leftMenuColorThis */ |
|
||||
.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a { |
|
||||
color: #ffffff !important; |
|
||||
} |
|
||||
|
|
||||
/**tab选项卡选中颜色 tabActiveColor */ |
|
||||
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { |
|
||||
background-color: #1e9fff; |
|
||||
} |
|
||||
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 625 B |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 671 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
@ -1,52 +0,0 @@ |
|||||
var cookieUtil = { |
|
||||
createCookie: function (name, value, days) { |
|
||||
var expires = ""; |
|
||||
if (days) { |
|
||||
var date = new Date(); |
|
||||
date.setTime(date.getTime() + (days * 14 * 24 * 3600 * 1000)); |
|
||||
expires = ";expires=" + date.toGMTString(); |
|
||||
} |
|
||||
document.cookie = name + "=" + value + expires + ";path=/"; |
|
||||
}, |
|
||||
/*设置cookie*/ |
|
||||
set: function (name, value, expires, path, domain, secure) { |
|
||||
var cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value); |
|
||||
if (expires instanceof Date) { |
|
||||
cookie += "; expires=" + expires.toGMTString(); |
|
||||
} else { |
|
||||
var date = new Date(); |
|
||||
date.setTime(date.getTime() + expires * 24 * 3600 * 1000); |
|
||||
cookie += "; expires=" + date.toGMTString(); |
|
||||
} |
|
||||
if (path) { |
|
||||
cookie += "; path=" + path; |
|
||||
} |
|
||||
if (domain) { |
|
||||
cookie += "; domain=" + domain; |
|
||||
} |
|
||||
if (secure) { |
|
||||
cookie += "; " + secure; |
|
||||
} |
|
||||
document.cookie = cookie; |
|
||||
}, |
|
||||
/*获取cookie*/ |
|
||||
get: function (name) { |
|
||||
var cookieName = encodeURIComponent(name); |
|
||||
/*正则表达式获取cookie*/ |
|
||||
var restr = "(^| )" + cookieName + "=([^;]*)(;|$)"; |
|
||||
var reg = new RegExp(restr); |
|
||||
var cookieValue = document.cookie.match(reg)[2]; |
|
||||
/*字符串截取cookie*/ |
|
||||
/*var cookieStart=document.cookie.indexOf(cookieName+“=”); |
|
||||
var cookieValue=null; |
|
||||
if(cookieStart>-1){ |
|
||||
var cookieEnd=document.cookie.indexOf(";",cookieStart); |
|
||||
if(cookieEnd==-1){ |
|
||||
cookieEnd=document.cookie.length; |
|
||||
} |
|
||||
cookieValue=decodeURIComponent(document.cookie.substring(cookieStart |
|
||||
+cookieName.length,cookieEnd)); |
|
||||
}*/ |
|
||||
return cookieValue; |
|
||||
} |
|
||||
} |
|
||||
@ -1 +0,0 @@ |
|||||
(function(e,t){function n(e,t){var n=e.createElement("p"),i=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",i.insertBefore(n.lastChild,i.firstChild)}function i(){var e=m.elements;return"string"==typeof e?e.split(" "):e}function r(e){var t={},n=e.createElement,r=e.createDocumentFragment,o=r();e.createElement=function(e){m.shivMethods||n(e);var i;return i=t[e]?t[e].cloneNode():g.test(e)?(t[e]=n(e)).cloneNode():n(e),i.canHaveChildren&&!f.test(e)?o.appendChild(i):i},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(e){return t[e]=n(e),o.createElement(e),'c("'+e+'")'})+");return n}")(m,o)}function o(e){var t;return e.documentShived?e:(m.shivCSS&&!d&&(t=!!n(e,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),h||(t=!r(e)),t&&(e.documentShived=t),e)}function a(e){for(var t,n=e.getElementsByTagName("*"),r=n.length,o=RegExp("^(?:"+i().join("|")+")$","i"),a=[];r--;)t=n[r],o.test(t.nodeName)&&a.push(t.applyElement(s(t)));return a}function s(e){for(var t,n=e.attributes,i=n.length,r=e.ownerDocument.createElement(b+":"+e.nodeName);i--;)t=n[i],t.specified&&r.setAttribute(t.nodeName,t.nodeValue);return r.style.cssText=e.style.cssText,r}function l(e){for(var t,n=e.split("{"),r=n.length,o=RegExp("(^|[\\s,>+~])("+i().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+b+"\\:$2";r--;)t=n[r]=n[r].split("}"),t[t.length-1]=t[t.length-1].replace(o,a),n[r]=t.join("}");return n.join("{")}function c(e){for(var t=e.length;t--;)e[t].removeNode()}function u(e){var t,i,r=e.namespaces,o=e.parentWindow;return!y||e.printShived?e:(r[b]===void 0&&r.add(b),o.attachEvent("onbeforeprint",function(){for(var r,o,s,c=e.styleSheets,u=[],d=c.length,h=Array(d);d--;)h[d]=c[d];for(;s=h.pop();)if(!s.disabled&&v.test(s.media)){for(r=s.imports,d=0,o=r.length;o>d;d++)h.push(r[d]);try{u.push(s.cssText)}catch(p){}}u=l(u.reverse().join("")),i=a(e),t=n(e,u)}),o.attachEvent("onafterprint",function(){c(i),t.removeNode(!0)}),e.printShived=!0,e)}var d,h,p=e.html5||{},f=/^<|^(?:button|form|map|select|textarea|object|iframe)$/i,g=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i;(function(){var n=t.createElement("a");n.innerHTML="<xyz></xyz>",d="hidden"in n,d&&"function"==typeof injectElementWithStyles&&injectElementWithStyles("#modernizr{}",function(t){t.hidden=!0,d="none"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).display}),h=1==n.childNodes.length||function(){try{t.createElement("a")}catch(e){return!0}var n=t.createDocumentFragment();return n.cloneNode===void 0||n.createDocumentFragment===void 0||n.createElement===void 0}()})();var m={elements:p.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:p.shivCSS!==!1,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:o};e.html5=m,o(t);var v=/^$|\b(?:all|print)\b/,b="html5shiv",y=!h&&function(){var n=t.documentElement;return t.namespaces!==void 0&&t.parentWindow!==void 0&&n.applyElement!==void 0&&n.removeNode!==void 0&&e.attachEvent!==void 0}();m.type+=" print",m.shivPrint=u,u(t)})(this,document); |
|
||||
@ -1,31 +0,0 @@ |
|||||
/** |
|
||||
* date:2019/08/16 |
|
||||
* author:Mr.Chung |
|
||||
* description:此处放layui自定义扩展 |
|
||||
* version:2.0.4 |
|
||||
*/ |
|
||||
|
|
||||
window.rootPath = (function (src) { |
|
||||
src = document.scripts[document.scripts.length - 1].src; |
|
||||
return src.substring(0, src.lastIndexOf("/") + 1); |
|
||||
})(); |
|
||||
|
|
||||
layui.config({ |
|
||||
base: rootPath + "lay-module/", |
|
||||
version: true |
|
||||
}).extend({ |
|
||||
miniAdmin: "layuimini/miniAdmin", // layuimini后台扩展
|
|
||||
miniMenu: "layuimini/miniMenu", // layuimini菜单扩展
|
|
||||
miniTab: "layuimini/miniTab", // layuimini tab扩展
|
|
||||
miniTheme: "layuimini/miniTheme", // layuimini 主题扩展
|
|
||||
miniTongji: "layuimini/miniTongji", // layuimini 统计扩展
|
|
||||
step: 'step-lay/step', // 分步表单扩展
|
|
||||
treetable: 'treetable-lay/treetable', //table树形扩展
|
|
||||
tableSelect: 'tableSelect/tableSelect', // table选择扩展
|
|
||||
iconPickerFa: 'iconPicker/iconPickerFa', // fa图标选择扩展
|
|
||||
echarts: 'echarts/echarts', // echarts图表扩展
|
|
||||
echartsTheme: 'echarts/echartsTheme', // echarts图表主题扩展
|
|
||||
wangEditor: 'wangEditor/wangEditor', // wangEditor富文本扩展
|
|
||||
layarea: 'layarea/layarea', // 省市县区三级联动下拉选择器
|
|
||||
cardTable: 'cardTable/cardTable' //卡片表格拓展
|
|
||||
}); |
|
||||
@ -1,95 +0,0 @@ |
|||||
.project-list-item { |
|
||||
background-color: #fff; |
|
||||
border-radius: 4px; |
|
||||
cursor: pointer; |
|
||||
transition: all .2s; |
|
||||
} |
|
||||
|
|
||||
.project-list-item:hover { |
|
||||
box-shadow: 2px 0 4px rgba(0, 21, 41, .35); |
|
||||
} |
|
||||
|
|
||||
.project-list-item .project-list-item-cover { |
|
||||
width: 100%; |
|
||||
height: 180px; |
|
||||
display: block; |
|
||||
border-top-left-radius: 4px; |
|
||||
border-top-right-radius: 4px; |
|
||||
} |
|
||||
|
|
||||
.project-list-item-body { |
|
||||
padding: 20px; |
|
||||
border: 1px solid #e8e8e8; |
|
||||
} |
|
||||
|
|
||||
.project-list-item .project-list-item-body > h2 { |
|
||||
font-size: 16px; |
|
||||
color: #333; |
|
||||
margin-bottom: 12px; |
|
||||
} |
|
||||
|
|
||||
.project-list-item .project-list-item-text { |
|
||||
height: 40px; |
|
||||
overflow: hidden; |
|
||||
margin-bottom: 12px; |
|
||||
} |
|
||||
|
|
||||
.project-list-item .project-list-item-desc { |
|
||||
position: relative; |
|
||||
} |
|
||||
|
|
||||
.project-list-item .project-list-item-desc .time { |
|
||||
color: #999; |
|
||||
font-size: 12px; |
|
||||
} |
|
||||
|
|
||||
.project-list-item .project-list-item-desc .ew-head-list { |
|
||||
position: absolute; |
|
||||
right: 0; |
|
||||
top: 0; |
|
||||
} |
|
||||
|
|
||||
.ew-head-list .ew-head-list-item:first-child { |
|
||||
margin-left: 0; |
|
||||
} |
|
||||
|
|
||||
.ew-head-list .ew-head-list-item { |
|
||||
width: 22px; |
|
||||
height: 22px; |
|
||||
border-radius: 50%; |
|
||||
border: 1px solid #fff; |
|
||||
margin-left: -10px; |
|
||||
} |
|
||||
|
|
||||
.ew-head-list .ew-head-list-item { |
|
||||
width: 22px; |
|
||||
height: 22px; |
|
||||
border-radius: 50%; |
|
||||
border: 1px solid #fff; |
|
||||
margin-left: -10px; |
|
||||
} |
|
||||
|
|
||||
.cloud-card-component { |
|
||||
padding: 20px; |
|
||||
} |
|
||||
|
|
||||
.cloud-card-component .layui-laypage .layui-laypage-curr .layui-laypage-em { |
|
||||
border-radius: 0px !important; |
|
||||
} |
|
||||
|
|
||||
.ew-table-loading { |
|
||||
padding: 10px 0; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.ew-table-loading > i { |
|
||||
color: #999; |
|
||||
font-size: 30px; |
|
||||
} |
|
||||
|
|
||||
.ew-table-loading.ew-loading-float { |
|
||||
position: absolute; |
|
||||
top: 0; |
|
||||
left: 0; |
|
||||
right: 0; |
|
||||
} |
|
||||
@ -1,249 +0,0 @@ |
|||||
layui.define(['table', 'laypage', 'jquery', 'element'], function (exports) { |
|
||||
"use strict"; |
|
||||
var filePath = layui.cache.modules.cardTable |
|
||||
.substr(0, layui.cache.modules.cardTable.lastIndexOf('/')); |
|
||||
// 引入tablePlug.css
|
|
||||
layui.link(filePath + '/cardTable.css'); |
|
||||
var MOD_NAME = 'cardTable', |
|
||||
$ = layui.jquery, |
|
||||
element = layui.element, |
|
||||
laypage = layui.laypage; |
|
||||
var _instances = {}; // 记录所有实例
|
|
||||
/* 默认参数 */ |
|
||||
var defaultOption = { |
|
||||
elem: "#currentTableId",// 构建的模型
|
|
||||
url: "",// 数据 url 连接
|
|
||||
loading: true,//是否加载
|
|
||||
limit: 0, //每页数量默认是每行数量的双倍
|
|
||||
linenum: 4, //每行数量 2,3,4,6
|
|
||||
currentPage: 1,//当前页
|
|
||||
data: [], //静态数据
|
|
||||
limits: [], //页码
|
|
||||
page: true, //是否分页
|
|
||||
layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],//分页控件
|
|
||||
request: { |
|
||||
pageName: 'page' //页码的参数名称,默认:page
|
|
||||
, limitName: 'limit' //每页数据量的参数名,默认:limit
|
|
||||
, idName: 'id' //主键名称,默认:id
|
|
||||
, titleName: 'title' //标题名称,默认:title
|
|
||||
, imageName: 'image' //图片地址,默认:image
|
|
||||
, remarkName: 'remark' //备注名称,默认:remark
|
|
||||
, timeName: 'time' //时间名称,默认:time
|
|
||||
}, |
|
||||
response: { |
|
||||
statusName: 'code' //规定数据状态的字段名称,默认:code
|
|
||||
, statusCode: 0 //规定成功的状态码,默认:0
|
|
||||
, msgName: 'msg' //规定状态信息的字段名称,默认:msg
|
|
||||
, countName: 'count' //规定数据总数的字段名称,默认:count
|
|
||||
, dataName: 'data' //规定数据列表的字段名称,默认:data
|
|
||||
}, |
|
||||
// 完 成 函 数
|
|
||||
done: function () { |
|
||||
|
|
||||
} |
|
||||
}; |
|
||||
var card = function (opt) { |
|
||||
_instances[opt.elem.substring(1)] = this; |
|
||||
this.reload(opt); |
|
||||
}; |
|
||||
/** 参数设置 */ |
|
||||
card.prototype.initOptions = function (opt) { |
|
||||
this.option = $.extend(true, {}, defaultOption, opt); |
|
||||
if (!this.option.limit || this.option.limit == 0) { |
|
||||
this.option.limit = this.option.linenum * 2; |
|
||||
} |
|
||||
if (!this.option.limits || this.option.limits.length == 0) { |
|
||||
this.option.limits = [this.option.limit]; |
|
||||
} |
|
||||
}; |
|
||||
card.prototype.init = function () { |
|
||||
var option = this.option; |
|
||||
var url = option.url; |
|
||||
var html = ""; |
|
||||
html += option.loading == true ? ' <div class="ew-table-loading">' : ' <div class="ew-table-loading layui-hide">'; |
|
||||
html += ' <i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>'; |
|
||||
html += ' </div>'; |
|
||||
$(option.elem).html(html); |
|
||||
// 根 据 请 求 方 式 获 取 数 据
|
|
||||
html = ""; |
|
||||
if (!!url) { |
|
||||
if (url.indexOf("?") >= 0) { |
|
||||
url = url + '&v=1.0.0'; |
|
||||
} else { |
|
||||
url = url + '?v=1.0.0'; |
|
||||
} |
|
||||
if (!!option.page) { |
|
||||
url = url + '&' + option.request.limitName + '=' + option.limit; |
|
||||
url = url + '&' + option.request.pageName + '=' + option.currentPage; |
|
||||
} |
|
||||
if (!!option.where) { |
|
||||
for (let key in option.where) { |
|
||||
url = url + '&' + key + '=' + option.where[key]; |
|
||||
} |
|
||||
} |
|
||||
var data = getData(url); |
|
||||
data = initData(data, option); |
|
||||
if (data.code != option.response.statusCode) { |
|
||||
option.data = []; |
|
||||
option.count = 0; |
|
||||
} else { |
|
||||
option.data = data.data; |
|
||||
option.count = option.data.length; |
|
||||
} |
|
||||
|
|
||||
} else { |
|
||||
if (!option.alldata) { |
|
||||
option.alldata = option.data; |
|
||||
} |
|
||||
if (option.page) { |
|
||||
var data = []; |
|
||||
option.count = option.alldata.length; |
|
||||
for (var i = (option.currentPage - 1) * option.limit; i < option.currentPage * option.limit && i < option.alldata.length; i++) { |
|
||||
data.push(option.alldata[i]); |
|
||||
} |
|
||||
option.data = data; |
|
||||
} |
|
||||
} |
|
||||
// 根据结果进行相应结构的创建
|
|
||||
if (!!option.data && option.data.length > 0) { |
|
||||
html = createComponent(option.elem.substring(1), option.linenum, option.data); |
|
||||
html += "<div id='cardpage'></div>"; |
|
||||
} else { |
|
||||
html = "<p>没有数据</p>"; |
|
||||
} |
|
||||
$(option.elem).html(html); |
|
||||
if (option.page) { |
|
||||
// 初始化分页组件
|
|
||||
laypage.render({ |
|
||||
elem: 'cardpage' |
|
||||
, count: option.count, limit: option.limit, limits: option.limits, curr: option.currentPage |
|
||||
, layout: option.layout |
|
||||
, jump: function (obj, first) { |
|
||||
option.limit = obj.limit; |
|
||||
option.currentPage = obj.curr; |
|
||||
if (!first) { |
|
||||
_instances[option.elem.substring(1)].reload(option); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
card.prototype.reload = function (opt) { |
|
||||
this.initOptions(this.option ? $.extend(true, this.option, opt) : opt); |
|
||||
this.init(); // 初始化表格
|
|
||||
} |
|
||||
|
|
||||
function createComponent(elem, linenum, data) { |
|
||||
var html = "<div class='cloud-card-component'>" |
|
||||
var content = createCards(elem, linenum, data); |
|
||||
var page = ""; |
|
||||
content = content + page; |
|
||||
html += content + "</div>" |
|
||||
return html; |
|
||||
} |
|
||||
|
|
||||
/** 创建指定数量的卡片 */ |
|
||||
function createCards(elem, linenum, data) { |
|
||||
var content = "<div class='layui-row layui-col-space30'>"; |
|
||||
for (var i = 0; i < data.length; i++) { |
|
||||
content += createCard(elem, linenum, data[i], i); |
|
||||
} |
|
||||
content += "</div>"; |
|
||||
return content; |
|
||||
} |
|
||||
|
|
||||
/** 创建一个卡片 */ |
|
||||
function createCard(elem, linenum, item, no) { |
|
||||
var line = 12 / linenum; |
|
||||
var card = |
|
||||
'<div id=' + item.id + ' onclick="cardTableCheckedCard(' + elem + ',this)" class="layui-col-md' + line + ' ew-datagrid-item" data-index="' + no + '" data-number="1"> <div class="project-list-item"> <img class="project-list-item-cover" src="' + item.image + '"> <div class="project-list-item-body"> <h2>' + item.title + '</h2> <div class="project-list-item-text layui-text">' + item.remark + '</div> <div class="project-list-item-desc"> <span class="time">' + item.time + '</span> <div class="ew-head-list"></div> </div> </div > </div > </div > ' |
|
||||
return card; |
|
||||
} |
|
||||
|
|
||||
/** 格式化返回参数 */ |
|
||||
function initData(tempData, option) { |
|
||||
var data = {}; |
|
||||
data.code = tempData[option.response.statusName]; |
|
||||
data.msg = tempData[option.response.msgName]; |
|
||||
data.count = tempData[option.response.countName]; |
|
||||
var dataList = tempData[option.response.dataName]; |
|
||||
data.data = []; |
|
||||
for (var i = 0; i < dataList.length; i++) { |
|
||||
var item = {}; |
|
||||
item.id = dataList[i][option.request.idName]; |
|
||||
item.image = dataList[i][option.request.imageName]; |
|
||||
item.title = dataList[i][option.request.titleName]; |
|
||||
item.remark = dataList[i][option.request.remarkName]; |
|
||||
item.time = dataList[i][option.request.timeName]; |
|
||||
data.data.push(item); |
|
||||
} |
|
||||
return data; |
|
||||
} |
|
||||
|
|
||||
/** 同 步 请 求 获 取 数 据 */ |
|
||||
function getData(url) { |
|
||||
$.ajaxSettings.async = false; |
|
||||
var redata = null; |
|
||||
$.getJSON(url, function (data) { |
|
||||
redata = data; |
|
||||
}).fail(function () { |
|
||||
redata = null; |
|
||||
}); |
|
||||
return redata; |
|
||||
} |
|
||||
|
|
||||
//卡片点击事件
|
|
||||
window.cardTableCheckedCard = function (elem, obj) { |
|
||||
$(obj).addClass('layui-table-click').siblings().removeClass('layui-table-click'); |
|
||||
var item = {}; |
|
||||
item.id = obj.id; |
|
||||
item.image = $(obj).find('.project-list-item-cover')[0].src; |
|
||||
item.title = $(obj).find('h2')[0].innerHTML; |
|
||||
item.remark = $(obj).find('.project-list-item-text')[0].innerHTML; |
|
||||
item.time = $(obj).find('.time')[0].innerHTML; |
|
||||
_instances[elem.id].option.checkedItem = item; |
|
||||
} |
|
||||
/** 对外提供的方法 */ |
|
||||
var tt = { |
|
||||
/* 渲染 */ |
|
||||
render: function (options) { |
|
||||
return new card(options); |
|
||||
}, |
|
||||
/* 重载 */ |
|
||||
reload: function (id, opt) { |
|
||||
_instances[id].option.checkedItem = null; |
|
||||
_instances[id].reload(opt); |
|
||||
}, |
|
||||
/* 获取选中数据 */ |
|
||||
getChecked: function (id) { |
|
||||
var option = _instances[id].option; |
|
||||
var data = option.checkedItem; |
|
||||
var item = {}; |
|
||||
if (!data) { |
|
||||
return null; |
|
||||
} |
|
||||
item[option.request.idName] = data.id; |
|
||||
item[option.request.imageName] = data.image; |
|
||||
item[option.request.titleName] = data.title; |
|
||||
item[option.request.remarkName] = data.remark; |
|
||||
item[option.request.timeName] = data.time; |
|
||||
return item; |
|
||||
}, |
|
||||
/* 获取表格数据 */ |
|
||||
getAllData: function (id) { |
|
||||
var option = _instances[id].option; |
|
||||
var data = []; |
|
||||
for (var i = 0; i < option.data.length; i++) { |
|
||||
var item = {}; |
|
||||
item[option.request.idName] = option.data[i].id; |
|
||||
item[option.request.imageName] = option.data[i].image; |
|
||||
item[option.request.titleName] = option.data[i].title; |
|
||||
item[option.request.remarkName] = option.data[i].remark; |
|
||||
item[option.request.timeName] = option.data[i].time; |
|
||||
data.push(item); |
|
||||
} |
|
||||
return data; |
|
||||
}, |
|
||||
} |
|
||||
exports(MOD_NAME, tt); |
|
||||
}) |
|
||||
@ -1,492 +0,0 @@ |
|||||
layui.define(function (exports) { |
|
||||
exports('echartsTheme', |
|
||||
{ |
|
||||
"color": [ |
|
||||
"#3fb1e3", |
|
||||
"#6be6c1", |
|
||||
"#626c91", |
|
||||
"#a0a7e6", |
|
||||
"#c4ebad", |
|
||||
"#96dee8" |
|
||||
], |
|
||||
"backgroundColor": "rgba(252,252,252,0)", |
|
||||
"textStyle": {}, |
|
||||
"title": { |
|
||||
"textStyle": { |
|
||||
"color": "#666666" |
|
||||
}, |
|
||||
"subtextStyle": { |
|
||||
"color": "#999999" |
|
||||
} |
|
||||
}, |
|
||||
"line": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": "3" |
|
||||
} |
|
||||
}, |
|
||||
"lineStyle": { |
|
||||
"normal": { |
|
||||
"width": "4" |
|
||||
} |
|
||||
}, |
|
||||
"symbolSize": "10", |
|
||||
"symbol": "emptyCircle", |
|
||||
"smooth": true |
|
||||
}, |
|
||||
"radar": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": "3" |
|
||||
} |
|
||||
}, |
|
||||
"lineStyle": { |
|
||||
"normal": { |
|
||||
"width": "4" |
|
||||
} |
|
||||
}, |
|
||||
"symbolSize": "10", |
|
||||
"symbol": "emptyCircle", |
|
||||
"smooth": true |
|
||||
}, |
|
||||
"bar": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"barBorderWidth": 0, |
|
||||
"barBorderColor": "#ccc" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"barBorderWidth": 0, |
|
||||
"barBorderColor": "#ccc" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"pie": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"scatter": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"boxplot": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"parallel": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"sankey": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"funnel": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"gauge": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"candlestick": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"color": "#e6a0d2", |
|
||||
"color0": "transparent", |
|
||||
"borderColor": "#e6a0d2", |
|
||||
"borderColor0": "#3fb1e3", |
|
||||
"borderWidth": "2" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"graph": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"borderWidth": 0, |
|
||||
"borderColor": "#ccc" |
|
||||
} |
|
||||
}, |
|
||||
"lineStyle": { |
|
||||
"normal": { |
|
||||
"width": "1", |
|
||||
"color": "#cccccc" |
|
||||
} |
|
||||
}, |
|
||||
"symbolSize": "10", |
|
||||
"symbol": "emptyCircle", |
|
||||
"smooth": true, |
|
||||
"color": [ |
|
||||
"#3fb1e3", |
|
||||
"#6be6c1", |
|
||||
"#626c91", |
|
||||
"#a0a7e6", |
|
||||
"#c4ebad", |
|
||||
"#96dee8" |
|
||||
], |
|
||||
"label": { |
|
||||
"normal": { |
|
||||
"textStyle": { |
|
||||
"color": "#ffffff" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"map": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"areaColor": "#eeeeee", |
|
||||
"borderColor": "#aaaaaa", |
|
||||
"borderWidth": 0.5 |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"areaColor": "rgba(63,177,227,0.25)", |
|
||||
"borderColor": "#3fb1e3", |
|
||||
"borderWidth": 1 |
|
||||
} |
|
||||
}, |
|
||||
"label": { |
|
||||
"normal": { |
|
||||
"textStyle": { |
|
||||
"color": "#ffffff" |
|
||||
} |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"textStyle": { |
|
||||
"color": "rgb(63,177,227)" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"geo": { |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"areaColor": "#eeeeee", |
|
||||
"borderColor": "#aaaaaa", |
|
||||
"borderWidth": 0.5 |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"areaColor": "rgba(63,177,227,0.25)", |
|
||||
"borderColor": "#3fb1e3", |
|
||||
"borderWidth": 1 |
|
||||
} |
|
||||
}, |
|
||||
"label": { |
|
||||
"normal": { |
|
||||
"textStyle": { |
|
||||
"color": "#ffffff" |
|
||||
} |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"textStyle": { |
|
||||
"color": "rgb(63,177,227)" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"categoryAxis": { |
|
||||
"axisLine": { |
|
||||
"show": true, |
|
||||
"lineStyle": { |
|
||||
"color": "#cccccc" |
|
||||
} |
|
||||
}, |
|
||||
"axisTick": { |
|
||||
"show": false, |
|
||||
"lineStyle": { |
|
||||
"color": "#333" |
|
||||
} |
|
||||
}, |
|
||||
"axisLabel": { |
|
||||
"show": true, |
|
||||
"textStyle": { |
|
||||
"color": "#999999" |
|
||||
} |
|
||||
}, |
|
||||
"splitLine": { |
|
||||
"show": true, |
|
||||
"lineStyle": { |
|
||||
"color": [ |
|
||||
"#eeeeee" |
|
||||
] |
|
||||
} |
|
||||
}, |
|
||||
"splitArea": { |
|
||||
"show": false, |
|
||||
"areaStyle": { |
|
||||
"color": [ |
|
||||
"rgba(250,250,250,0.05)", |
|
||||
"rgba(200,200,200,0.02)" |
|
||||
] |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"valueAxis": { |
|
||||
"axisLine": { |
|
||||
"show": true, |
|
||||
"lineStyle": { |
|
||||
"color": "#cccccc" |
|
||||
} |
|
||||
}, |
|
||||
"axisTick": { |
|
||||
"show": false, |
|
||||
"lineStyle": { |
|
||||
"color": "#333" |
|
||||
} |
|
||||
}, |
|
||||
"axisLabel": { |
|
||||
"show": true, |
|
||||
"textStyle": { |
|
||||
"color": "#999999" |
|
||||
} |
|
||||
}, |
|
||||
"splitLine": { |
|
||||
"show": true, |
|
||||
"lineStyle": { |
|
||||
"color": [ |
|
||||
"#eeeeee" |
|
||||
] |
|
||||
} |
|
||||
}, |
|
||||
"splitArea": { |
|
||||
"show": false, |
|
||||
"areaStyle": { |
|
||||
"color": [ |
|
||||
"rgba(250,250,250,0.05)", |
|
||||
"rgba(200,200,200,0.02)" |
|
||||
] |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"logAxis": { |
|
||||
"axisLine": { |
|
||||
"show": true, |
|
||||
"lineStyle": { |
|
||||
"color": "#cccccc" |
|
||||
} |
|
||||
}, |
|
||||
"axisTick": { |
|
||||
"show": false, |
|
||||
"lineStyle": { |
|
||||
"color": "#333" |
|
||||
} |
|
||||
}, |
|
||||
"axisLabel": { |
|
||||
"show": true, |
|
||||
"textStyle": { |
|
||||
"color": "#999999" |
|
||||
} |
|
||||
}, |
|
||||
"splitLine": { |
|
||||
"show": true, |
|
||||
"lineStyle": { |
|
||||
"color": [ |
|
||||
"#eeeeee" |
|
||||
] |
|
||||
} |
|
||||
}, |
|
||||
"splitArea": { |
|
||||
"show": false, |
|
||||
"areaStyle": { |
|
||||
"color": [ |
|
||||
"rgba(250,250,250,0.05)", |
|
||||
"rgba(200,200,200,0.02)" |
|
||||
] |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"timeAxis": { |
|
||||
"axisLine": { |
|
||||
"show": true, |
|
||||
"lineStyle": { |
|
||||
"color": "#cccccc" |
|
||||
} |
|
||||
}, |
|
||||
"axisTick": { |
|
||||
"show": false, |
|
||||
"lineStyle": { |
|
||||
"color": "#333" |
|
||||
} |
|
||||
}, |
|
||||
"axisLabel": { |
|
||||
"show": true, |
|
||||
"textStyle": { |
|
||||
"color": "#999999" |
|
||||
} |
|
||||
}, |
|
||||
"splitLine": { |
|
||||
"show": true, |
|
||||
"lineStyle": { |
|
||||
"color": [ |
|
||||
"#eeeeee" |
|
||||
] |
|
||||
} |
|
||||
}, |
|
||||
"splitArea": { |
|
||||
"show": false, |
|
||||
"areaStyle": { |
|
||||
"color": [ |
|
||||
"rgba(250,250,250,0.05)", |
|
||||
"rgba(200,200,200,0.02)" |
|
||||
] |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"toolbox": { |
|
||||
"iconStyle": { |
|
||||
"normal": { |
|
||||
"borderColor": "#999999" |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"borderColor": "#666666" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"legend": { |
|
||||
"textStyle": { |
|
||||
"color": "#999999" |
|
||||
} |
|
||||
}, |
|
||||
"tooltip": { |
|
||||
"axisPointer": { |
|
||||
"lineStyle": { |
|
||||
"color": "#cccccc", |
|
||||
"width": 1 |
|
||||
}, |
|
||||
"crossStyle": { |
|
||||
"color": "#cccccc", |
|
||||
"width": 1 |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"timeline": { |
|
||||
"lineStyle": { |
|
||||
"color": "#626c91", |
|
||||
"width": 1 |
|
||||
}, |
|
||||
"itemStyle": { |
|
||||
"normal": { |
|
||||
"color": "#626c91", |
|
||||
"borderWidth": 1 |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"color": "#626c91" |
|
||||
} |
|
||||
}, |
|
||||
"controlStyle": { |
|
||||
"normal": { |
|
||||
"color": "#626c91", |
|
||||
"borderColor": "#626c91", |
|
||||
"borderWidth": 0.5 |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"color": "#626c91", |
|
||||
"borderColor": "#626c91", |
|
||||
"borderWidth": 0.5 |
|
||||
} |
|
||||
}, |
|
||||
"checkpointStyle": { |
|
||||
"color": "#3fb1e3", |
|
||||
"borderColor": "rgba(63,177,227,0.15)" |
|
||||
}, |
|
||||
"label": { |
|
||||
"normal": { |
|
||||
"textStyle": { |
|
||||
"color": "#626c91" |
|
||||
} |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"textStyle": { |
|
||||
"color": "#626c91" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
"visualMap": { |
|
||||
"color": [ |
|
||||
"#2a99c9", |
|
||||
"#afe8ff" |
|
||||
] |
|
||||
}, |
|
||||
"dataZoom": { |
|
||||
"backgroundColor": "rgba(255,255,255,0)", |
|
||||
"dataBackgroundColor": "rgba(222,222,222,1)", |
|
||||
"fillerColor": "rgba(114,230,212,0.25)", |
|
||||
"handleColor": "#cccccc", |
|
||||
"handleSize": "100%", |
|
||||
"textStyle": { |
|
||||
"color": "#999999" |
|
||||
} |
|
||||
}, |
|
||||
"markPoint": { |
|
||||
"label": { |
|
||||
"normal": { |
|
||||
"textStyle": { |
|
||||
"color": "#ffffff" |
|
||||
} |
|
||||
}, |
|
||||
"emphasis": { |
|
||||
"textStyle": { |
|
||||
"color": "#ffffff" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
}); |
|
||||
@ -1,399 +0,0 @@ |
|||||
/** |
|
||||
* fa图标选择器 根据开源项目https://gitee.com/wujiawei0926/iconpicker修改而来
|
|
||||
* @author wujiawei0926@yeah.net chung@99php.cn |
|
||||
* @version 1.1 |
|
||||
*/ |
|
||||
|
|
||||
layui.define(['laypage', 'form'], function (exports) { |
|
||||
"use strict"; |
|
||||
|
|
||||
var IconPicker = function () { |
|
||||
this.v = '1.1'; |
|
||||
}, _MOD = 'iconPickerFa', |
|
||||
_this = this, |
|
||||
$ = layui.jquery, |
|
||||
laypage = layui.laypage, |
|
||||
form = layui.form, |
|
||||
BODY = 'body', |
|
||||
TIPS = '请选择图标'; |
|
||||
|
|
||||
/** |
|
||||
* 渲染组件 |
|
||||
*/ |
|
||||
IconPicker.prototype.render = function (options) { |
|
||||
var opts = options, |
|
||||
// DOM选择器
|
|
||||
elem = opts.elem, |
|
||||
// 数据类型:fontClass/unicode
|
|
||||
url = opts.url, |
|
||||
// 是否分页:true/false
|
|
||||
page = opts.page == null ? true : opts.page, |
|
||||
// 每页显示数量
|
|
||||
limit = opts.limit == null ? 12 : opts.limit, |
|
||||
// 是否开启搜索:true/false
|
|
||||
search = opts.search == null ? true : opts.search, |
|
||||
// 每个图标格子的宽度:'43px'或'20%'
|
|
||||
cellWidth = opts.cellWidth, |
|
||||
// 点击回调
|
|
||||
click = opts.click, |
|
||||
// 渲染成功后的回调
|
|
||||
success = opts.success, |
|
||||
// json数据
|
|
||||
data = {}, |
|
||||
// 唯一标识
|
|
||||
tmp = new Date().getTime(), |
|
||||
// 初始化时input的值
|
|
||||
ORIGINAL_ELEM_VALUE = $(elem).val(), |
|
||||
TITLE = 'layui-select-title', |
|
||||
TITLE_ID = 'layui-select-title-' + tmp, |
|
||||
ICON_BODY = 'layui-iconpicker-' + tmp, |
|
||||
PICKER_BODY = 'layui-iconpicker-body-' + tmp, |
|
||||
PAGE_ID = 'layui-iconpicker-page-' + tmp, |
|
||||
LIST_BOX = 'layui-iconpicker-list-box', |
|
||||
selected = 'layui-form-selected', |
|
||||
unselect = 'layui-unselect'; |
|
||||
|
|
||||
var a = { |
|
||||
init: function () { |
|
||||
data = common.getData(url); |
|
||||
|
|
||||
a.hideElem().createSelect().createBody().toggleSelect(); |
|
||||
a.preventEvent().inputListen(); |
|
||||
common.loadCss(); |
|
||||
|
|
||||
if (success) { |
|
||||
success(this.successHandle()); |
|
||||
} |
|
||||
|
|
||||
return a; |
|
||||
}, |
|
||||
successHandle: function () { |
|
||||
var d = { |
|
||||
options: opts, |
|
||||
data: data, |
|
||||
id: tmp, |
|
||||
elem: $('#' + ICON_BODY) |
|
||||
}; |
|
||||
return d; |
|
||||
}, |
|
||||
/** |
|
||||
* 隐藏elem |
|
||||
*/ |
|
||||
hideElem: function () { |
|
||||
$(elem).hide(); |
|
||||
return a; |
|
||||
}, |
|
||||
/** |
|
||||
* 绘制select下拉选择框 |
|
||||
*/ |
|
||||
createSelect: function () { |
|
||||
var oriIcon = '<i class="fa">'; |
|
||||
|
|
||||
// 默认图标
|
|
||||
if (ORIGINAL_ELEM_VALUE === '') { |
|
||||
ORIGINAL_ELEM_VALUE = 'fa-adjust'; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
oriIcon = '<i class="fa ' + ORIGINAL_ELEM_VALUE + '">'; |
|
||||
|
|
||||
oriIcon += '</i>'; |
|
||||
|
|
||||
var selectHtml = '<div class="layui-iconpicker layui-unselect layui-form-select" id="' + ICON_BODY + '">' + |
|
||||
'<div class="' + TITLE + '" id="' + TITLE_ID + '">' + |
|
||||
'<div class="layui-iconpicker-item">' + |
|
||||
'<span class="layui-iconpicker-icon layui-unselect">' + |
|
||||
oriIcon + |
|
||||
'</span>' + |
|
||||
'<i class="layui-edge"></i>' + |
|
||||
'</div>' + |
|
||||
'</div>' + |
|
||||
'<div class="layui-anim layui-anim-upbit" style="">' + |
|
||||
'123' + |
|
||||
'</div>'; |
|
||||
$(elem).after(selectHtml); |
|
||||
return a; |
|
||||
}, |
|
||||
/** |
|
||||
* 展开/折叠下拉框 |
|
||||
*/ |
|
||||
toggleSelect: function () { |
|
||||
var item = '#' + TITLE_ID + ' .layui-iconpicker-item,#' + TITLE_ID + ' .layui-iconpicker-item .layui-edge'; |
|
||||
a.event('click', item, function (e) { |
|
||||
var $icon = $('#' + ICON_BODY); |
|
||||
if ($icon.hasClass(selected)) { |
|
||||
$icon.removeClass(selected).addClass(unselect); |
|
||||
} else { |
|
||||
// 隐藏其他picker
|
|
||||
$('.layui-form-select').removeClass(selected); |
|
||||
// 显示当前picker
|
|
||||
$icon.addClass(selected).removeClass(unselect); |
|
||||
} |
|
||||
e.stopPropagation(); |
|
||||
}); |
|
||||
return a; |
|
||||
}, |
|
||||
/** |
|
||||
* 绘制主体部分 |
|
||||
*/ |
|
||||
createBody: function () { |
|
||||
// 获取数据
|
|
||||
var searchHtml = ''; |
|
||||
|
|
||||
if (search) { |
|
||||
searchHtml = '<div class="layui-iconpicker-search">' + |
|
||||
'<input class="layui-input">' + |
|
||||
'<i class="layui-icon"></i>' + |
|
||||
'</div>'; |
|
||||
} |
|
||||
|
|
||||
// 组合dom
|
|
||||
var bodyHtml = '<div class="layui-iconpicker-body" id="' + PICKER_BODY + '">' + |
|
||||
searchHtml + |
|
||||
'<div class="' + LIST_BOX + '"></div> ' + |
|
||||
'</div>'; |
|
||||
$('#' + ICON_BODY).find('.layui-anim').eq(0).html(bodyHtml); |
|
||||
a.search().createList().check().page(); |
|
||||
|
|
||||
return a; |
|
||||
}, |
|
||||
/** |
|
||||
* 绘制图标列表 |
|
||||
* @param text 模糊查询关键字 |
|
||||
* @returns {string} |
|
||||
*/ |
|
||||
createList: function (text) { |
|
||||
var d = data, |
|
||||
l = d.length, |
|
||||
pageHtml = '', |
|
||||
listHtml = $('<div class="layui-iconpicker-list">')//'<div class="layui-iconpicker-list">';
|
|
||||
|
|
||||
// 计算分页数据
|
|
||||
var _limit = limit, // 每页显示数量
|
|
||||
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1), // 总计多少页
|
|
||||
_id = PAGE_ID; |
|
||||
|
|
||||
// 图标列表
|
|
||||
var icons = []; |
|
||||
|
|
||||
for (var i = 0; i < l; i++) { |
|
||||
var obj = d[i]; |
|
||||
|
|
||||
// 判断是否模糊查询
|
|
||||
if (text && obj.indexOf(text) === -1) { |
|
||||
continue; |
|
||||
} |
|
||||
|
|
||||
// 是否自定义格子宽度
|
|
||||
var style = ''; |
|
||||
if (cellWidth !== null) { |
|
||||
style += ' style="width:' + cellWidth + '"'; |
|
||||
} |
|
||||
|
|
||||
// 每个图标dom
|
|
||||
var icon = '<div class="layui-iconpicker-icon-item" title="' + obj + '" ' + style + '>'; |
|
||||
|
|
||||
icon += '<i class="fa ' + obj + '"></i>'; |
|
||||
|
|
||||
icon += '</div>'; |
|
||||
|
|
||||
icons.push(icon); |
|
||||
} |
|
||||
|
|
||||
// 查询出图标后再分页
|
|
||||
l = icons.length; |
|
||||
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1); |
|
||||
for (var i = 0; i < _pages; i++) { |
|
||||
// 按limit分块
|
|
||||
var lm = $('<div class="layui-iconpicker-icon-limit" id="layui-iconpicker-icon-limit-' + tmp + (i + 1) + '">'); |
|
||||
|
|
||||
for (var j = i * _limit; j < (i + 1) * _limit && j < l; j++) { |
|
||||
lm.append(icons[j]); |
|
||||
} |
|
||||
|
|
||||
listHtml.append(lm); |
|
||||
} |
|
||||
|
|
||||
// 无数据
|
|
||||
if (l === 0) { |
|
||||
listHtml.append('<p class="layui-iconpicker-tips">无数据</p>'); |
|
||||
} |
|
||||
|
|
||||
// 判断是否分页
|
|
||||
if (page) { |
|
||||
$('#' + PICKER_BODY).addClass('layui-iconpicker-body-page'); |
|
||||
pageHtml = '<div class="layui-iconpicker-page" id="' + PAGE_ID + '">' + |
|
||||
'<div class="layui-iconpicker-page-count">' + |
|
||||
'<span id="' + PAGE_ID + '-current">1</span>/' + |
|
||||
'<span id="' + PAGE_ID + '-pages">' + _pages + '</span>' + |
|
||||
' (<span id="' + PAGE_ID + '-length">' + l + '</span>)' + |
|
||||
'</div>' + |
|
||||
'<div class="layui-iconpicker-page-operate">' + |
|
||||
'<i class="layui-icon" id="' + PAGE_ID + '-prev" data-index="0" prev></i> ' + |
|
||||
'<i class="layui-icon" id="' + PAGE_ID + '-next" data-index="2" next></i> ' + |
|
||||
'</div>' + |
|
||||
'</div>'; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
$('#' + ICON_BODY).find('.layui-anim').find('.' + LIST_BOX).html('').append(listHtml).append(pageHtml); |
|
||||
return a; |
|
||||
}, |
|
||||
// 阻止Layui的一些默认事件
|
|
||||
preventEvent: function () { |
|
||||
var item = '#' + ICON_BODY + ' .layui-anim'; |
|
||||
a.event('click', item, function (e) { |
|
||||
e.stopPropagation(); |
|
||||
}); |
|
||||
return a; |
|
||||
}, |
|
||||
// 分页
|
|
||||
page: function () { |
|
||||
var icon = '#' + PAGE_ID + ' .layui-iconpicker-page-operate .layui-icon'; |
|
||||
|
|
||||
$(icon).unbind('click'); |
|
||||
a.event('click', icon, function (e) { |
|
||||
var elem = e.currentTarget, |
|
||||
total = parseInt($('#' + PAGE_ID + '-pages').html()), |
|
||||
isPrev = $(elem).attr('prev') !== undefined, |
|
||||
// 按钮上标的页码
|
|
||||
index = parseInt($(elem).attr('data-index')), |
|
||||
$cur = $('#' + PAGE_ID + '-current'), |
|
||||
// 点击时正在显示的页码
|
|
||||
current = parseInt($cur.html()); |
|
||||
|
|
||||
// 分页数据
|
|
||||
if (isPrev && current > 1) { |
|
||||
current = current - 1; |
|
||||
$(icon + '[prev]').attr('data-index', current); |
|
||||
} else if (!isPrev && current < total) { |
|
||||
current = current + 1; |
|
||||
$(icon + '[next]').attr('data-index', current); |
|
||||
} |
|
||||
$cur.html(current); |
|
||||
|
|
||||
// 图标数据
|
|
||||
$('#' + ICON_BODY + ' .layui-iconpicker-icon-limit').hide(); |
|
||||
$('#layui-iconpicker-icon-limit-' + tmp + current).show(); |
|
||||
e.stopPropagation(); |
|
||||
}); |
|
||||
return a; |
|
||||
}, |
|
||||
/** |
|
||||
* 搜索 |
|
||||
*/ |
|
||||
search: function () { |
|
||||
var item = '#' + PICKER_BODY + ' .layui-iconpicker-search .layui-input'; |
|
||||
a.event('input propertychange', item, function (e) { |
|
||||
var elem = e.target, |
|
||||
t = $(elem).val(); |
|
||||
a.createList(t); |
|
||||
}); |
|
||||
return a; |
|
||||
}, |
|
||||
/** |
|
||||
* 点击选中图标 |
|
||||
*/ |
|
||||
check: function () { |
|
||||
var item = '#' + PICKER_BODY + ' .layui-iconpicker-icon-item'; |
|
||||
a.event('click', item, function (e) { |
|
||||
var el = $(e.currentTarget).find('.fa'), |
|
||||
icon = ''; |
|
||||
|
|
||||
var clsArr = el.attr('class').split(/[\s\n]/), |
|
||||
cls = clsArr[1], |
|
||||
icon = cls; |
|
||||
$('#' + TITLE_ID).find('.layui-iconpicker-item .fa').html('').attr('class', clsArr.join(' ')); |
|
||||
|
|
||||
|
|
||||
$('#' + ICON_BODY).removeClass(selected).addClass(unselect); |
|
||||
$(elem).val(icon).attr('value', icon); |
|
||||
// 回调
|
|
||||
if (click) { |
|
||||
click({ |
|
||||
icon: icon |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
return a; |
|
||||
}, |
|
||||
// 监听原始input数值改变
|
|
||||
inputListen: function () { |
|
||||
var el = $(elem); |
|
||||
a.event('change', elem, function () { |
|
||||
var value = el.val(); |
|
||||
}) |
|
||||
// el.change(function(){
|
|
||||
|
|
||||
// });
|
|
||||
return a; |
|
||||
}, |
|
||||
event: function (evt, el, fn) { |
|
||||
$(BODY).on(evt, el, fn); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
var common = { |
|
||||
/** |
|
||||
* 加载样式表 |
|
||||
*/ |
|
||||
loadCss: function () { |
|
||||
var css = '.layui-iconpicker {max-width: 280px;}.layui-iconpicker .layui-anim{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:899;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box;}.layui-iconpicker-item{border:1px solid #e6e6e6;width:90px;height:38px;border-radius:4px;cursor:pointer;position:relative;}.layui-iconpicker-icon{border-right:1px solid #e6e6e6;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;width:60px;height:100%;float:left;text-align:center;background:#fff;transition:all .3s;}.layui-iconpicker-icon i{line-height:38px;font-size:18px;}.layui-iconpicker-item > .layui-edge{left:70px;}.layui-iconpicker-item:hover{border-color:#D2D2D2!important;}.layui-iconpicker-item:hover .layui-iconpicker-icon{border-color:#D2D2D2!important;}.layui-iconpicker.layui-form-selected .layui-anim{display:block;}.layui-iconpicker-body{padding:6px;}.layui-iconpicker .layui-iconpicker-list{background-color:#fff;border:1px solid #ccc;border-radius:4px;}.layui-iconpicker .layui-iconpicker-icon-item{display:inline-block;width:21.1%;line-height:36px;text-align:center;cursor:pointer;vertical-align:top;height:36px;margin:4px;border:1px solid #ddd;border-radius:2px;transition:300ms;}.layui-iconpicker .layui-iconpicker-icon-item i.layui-icon{font-size:17px;}.layui-iconpicker .layui-iconpicker-icon-item:hover{background-color:#eee;border-color:#ccc;-webkit-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;-moz-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;box-shadow:0 0 2px #aaa,0 0 2px #fff inset;text-shadow:0 0 1px #fff;}.layui-iconpicker-search{position:relative;margin:0 0 6px 0;border:1px solid #e6e6e6;border-radius:2px;transition:300ms;}.layui-iconpicker-search:hover{border-color:#D2D2D2!important;}.layui-iconpicker-search .layui-input{cursor:text;display:inline-block;width:86%;border:none;padding-right:0;margin-top:1px;}.layui-iconpicker-search .layui-icon{position:absolute;top:11px;right:4%;}.layui-iconpicker-tips{text-align:center;padding:8px 0;cursor:not-allowed;}.layui-iconpicker-page{margin-top:6px;margin-bottom:-6px;font-size:12px;padding:0 2px;}.layui-iconpicker-page-count{display:inline-block;}.layui-iconpicker-page-operate{display:inline-block;float:right;cursor:default;}.layui-iconpicker-page-operate .layui-icon{font-size:12px;cursor:pointer;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit{display:none;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit:first-child{display:block;}'; |
|
||||
var $style = $('head').find('style[iconpicker]'); |
|
||||
if ($style.length === 0) { |
|
||||
$('head').append('<style rel="stylesheet" iconpicker>' + css + '</style>'); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 获取数据 |
|
||||
*/ |
|
||||
getData: function (url) { |
|
||||
var iconlist = []; |
|
||||
$.ajax({ |
|
||||
url: url, |
|
||||
type: 'get', |
|
||||
contentType: "application/x-www-form-urlencoded; charset=UTF-8", |
|
||||
async: false, |
|
||||
success: function (ret) { |
|
||||
var exp = /fa-var-(.*):/ig; |
|
||||
var result; |
|
||||
while ((result = exp.exec(ret)) != null) { |
|
||||
iconlist.push('fa-' + result[1]); |
|
||||
} |
|
||||
}, |
|
||||
error: function (xhr, textstatus, thrown) { |
|
||||
layer.msg('fa图标接口有误'); |
|
||||
} |
|
||||
}); |
|
||||
return iconlist; |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
a.init(); |
|
||||
return new IconPicker(); |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* 选中图标 |
|
||||
* @param filter lay-filter |
|
||||
* @param iconName 图标名称,自动识别fontClass/unicode |
|
||||
*/ |
|
||||
IconPicker.prototype.checkIcon = function (filter, iconName) { |
|
||||
var el = $('*[lay-filter=' + filter + ']'), |
|
||||
p = el.next().find('.layui-iconpicker-item .fa'), |
|
||||
c = iconName; |
|
||||
|
|
||||
if (c.indexOf('#xe') > 0) { |
|
||||
p.html(c); |
|
||||
} else { |
|
||||
p.html('').attr('class', 'fa ' + c); |
|
||||
} |
|
||||
el.attr('value', c).val(c); |
|
||||
}; |
|
||||
|
|
||||
var iconPicker = new IconPicker(); |
|
||||
exports(_MOD, iconPicker); |
|
||||
}); |
|
||||
@ -1,350 +0,0 @@ |
|||||
/** |
|
||||
* date:2020/02/27 |
|
||||
* author:Mr.Chung |
|
||||
* version:2.0 |
|
||||
* description:layuimini 主体框架扩展 |
|
||||
*/ |
|
||||
layui.define(["jquery", "miniMenu", "element", "miniTab", "miniTheme"], function (exports) { |
|
||||
var $ = layui.$, |
|
||||
layer = layui.layer, |
|
||||
miniMenu = layui.miniMenu, |
|
||||
miniTheme = layui.miniTheme, |
|
||||
element = layui.element, |
|
||||
miniTab = layui.miniTab; |
|
||||
|
|
||||
if (!/http(s*):\/\//.test(location.href)) { |
|
||||
var tips = "请先将项目部署至web容器(Apache/Tomcat/Nginx/IIS/等),否则部分数据将无法显示"; |
|
||||
return layer.alert(tips); |
|
||||
} |
|
||||
|
|
||||
var miniAdmin = { |
|
||||
|
|
||||
/** |
|
||||
* 后台框架初始化 |
|
||||
* @param options.iniUrl 后台初始化接口地址 |
|
||||
* @param options.clearUrl 后台清理缓存接口 |
|
||||
* @param options.urlHashLocation URL地址hash定位 |
|
||||
* @param options.bgColorDefault 默认皮肤 |
|
||||
* @param options.multiModule 是否开启多模块 |
|
||||
* @param options.menuChildOpen 是否展开子菜单 |
|
||||
* @param options.loadingTime 初始化加载时间 |
|
||||
* @param options.pageAnim iframe窗口动画 |
|
||||
* @param options.maxTabNum 最大的tab打开数量 |
|
||||
*/ |
|
||||
render: function (options) { |
|
||||
options.iniUrl = options.iniUrl || null; |
|
||||
options.clearUrl = options.clearUrl || null; |
|
||||
options.urlHashLocation = options.urlHashLocation || false; |
|
||||
options.bgColorDefault = options.bgColorDefault || 0; |
|
||||
options.multiModule = options.multiModule || false; |
|
||||
options.menuChildOpen = options.menuChildOpen || false; |
|
||||
options.loadingTime = options.loadingTime || 1; |
|
||||
options.pageAnim = options.pageAnim || false; |
|
||||
options.maxTabNum = options.maxTabNum || 20; |
|
||||
$.getJSON(options.iniUrl, function (data) { |
|
||||
if (data == null) { |
|
||||
miniAdmin.error('暂无菜单信息') |
|
||||
} else { |
|
||||
miniAdmin.renderLogo(data.logoInfo); |
|
||||
miniAdmin.renderClear(options.clearUrl); |
|
||||
miniAdmin.renderHome(data.homeInfo); |
|
||||
miniAdmin.renderAnim(options.pageAnim); |
|
||||
miniAdmin.listen(); |
|
||||
miniMenu.render({ |
|
||||
menuList: data.menuInfo, |
|
||||
multiModule: options.multiModule, |
|
||||
menuChildOpen: options.menuChildOpen |
|
||||
}); |
|
||||
miniTab.render({ |
|
||||
filter: 'layuiminiTab', |
|
||||
urlHashLocation: options.urlHashLocation, |
|
||||
multiModule: options.multiModule, |
|
||||
menuChildOpen: options.menuChildOpen, |
|
||||
maxTabNum: options.maxTabNum, |
|
||||
menuList: data.menuInfo, |
|
||||
homeInfo: data.homeInfo, |
|
||||
listenSwichCallback: function () { |
|
||||
miniAdmin.renderDevice(); |
|
||||
} |
|
||||
}); |
|
||||
miniTheme.render({ |
|
||||
bgColorDefault: options.bgColorDefault, |
|
||||
listen: true, |
|
||||
}); |
|
||||
miniAdmin.deleteLoader(options.loadingTime); |
|
||||
} |
|
||||
}).fail(function () { |
|
||||
miniAdmin.error('菜单接口有误'); |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 初始化logo |
|
||||
* @param data |
|
||||
*/ |
|
||||
renderLogo: function (data) { |
|
||||
var html = '<a href="' + data.href + '"><img src="' + data.image + '" alt="logo"><h1>' + data.title + '</h1></a>'; |
|
||||
$('.layuimini-logo').html(html); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 初始化首页 |
|
||||
* @param data |
|
||||
*/ |
|
||||
renderHome: function (data) { |
|
||||
sessionStorage.setItem('layuiminiHomeHref', data.href); |
|
||||
$('#layuiminiHomeTabId').html('<span class="layuimini-tab-active"></span><span class="disable-close">' + data.title + '</span><i class="layui-icon layui-unselect layui-tab-close">ဆ</i>'); |
|
||||
$('#layuiminiHomeTabId').attr('lay-id', data.href); |
|
||||
$('#layuiminiHomeTabIframe').html('<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" src="' + data.href + '"></iframe>'); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 初始化缓存地址 |
|
||||
* @param clearUrl |
|
||||
*/ |
|
||||
renderClear: function (clearUrl) { |
|
||||
$('.layuimini-clear').attr('data-href', clearUrl); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 初始化iframe窗口动画 |
|
||||
* @param anim |
|
||||
*/ |
|
||||
renderAnim: function (anim) { |
|
||||
if (anim) { |
|
||||
$('#layuimini-bg-color').after('<style id="layuimini-page-anim">' + |
|
||||
'.layui-tab-item.layui-show {animation:moveTop 1s;-webkit-animation:moveTop 1s;animation-fill-mode:both;-webkit-animation-fill-mode:both;position:relative;height:100%;-webkit-overflow-scrolling:touch;}\n' + |
|
||||
'@keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' + |
|
||||
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' + |
|
||||
'}\n' + |
|
||||
'@-o-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' + |
|
||||
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' + |
|
||||
'}\n' + |
|
||||
'@-moz-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' + |
|
||||
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' + |
|
||||
'}\n' + |
|
||||
'@-webkit-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' + |
|
||||
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' + |
|
||||
'}' + |
|
||||
'</style>'); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
fullScreen: function () { |
|
||||
var el = document.documentElement; |
|
||||
var rfs = el.requestFullScreen || el.webkitRequestFullScreen; |
|
||||
if (typeof rfs != "undefined" && rfs) { |
|
||||
rfs.call(el); |
|
||||
} else if (typeof window.ActiveXObject != "undefined") { |
|
||||
var wscript = new ActiveXObject("WScript.Shell"); |
|
||||
if (wscript != null) { |
|
||||
wscript.SendKeys("{F11}"); |
|
||||
} |
|
||||
} else if (el.msRequestFullscreen) { |
|
||||
el.msRequestFullscreen(); |
|
||||
} else if (el.oRequestFullscreen) { |
|
||||
el.oRequestFullscreen(); |
|
||||
} else if (el.webkitRequestFullscreen) { |
|
||||
el.webkitRequestFullscreen(); |
|
||||
} else if (el.mozRequestFullScreen) { |
|
||||
el.mozRequestFullScreen(); |
|
||||
} else { |
|
||||
miniAdmin.error('浏览器不支持全屏调用!'); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 退出全屏 |
|
||||
*/ |
|
||||
exitFullScreen: function () { |
|
||||
var el = document; |
|
||||
var cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.exitFullScreen; |
|
||||
if (typeof cfs != "undefined" && cfs) { |
|
||||
cfs.call(el); |
|
||||
} else if (typeof window.ActiveXObject != "undefined") { |
|
||||
var wscript = new ActiveXObject("WScript.Shell"); |
|
||||
if (wscript != null) { |
|
||||
wscript.SendKeys("{F11}"); |
|
||||
} |
|
||||
} else if (el.msExitFullscreen) { |
|
||||
el.msExitFullscreen(); |
|
||||
} else if (el.oRequestFullscreen) { |
|
||||
el.oCancelFullScreen(); |
|
||||
} else if (el.mozCancelFullScreen) { |
|
||||
el.mozCancelFullScreen(); |
|
||||
} else if (el.webkitCancelFullScreen) { |
|
||||
el.webkitCancelFullScreen(); |
|
||||
} else { |
|
||||
miniAdmin.error('浏览器不支持全屏调用!'); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 初始化设备端 |
|
||||
*/ |
|
||||
renderDevice: function () { |
|
||||
if (miniAdmin.checkMobile()) { |
|
||||
$('.layuimini-tool i').attr('data-side-fold', 1); |
|
||||
$('.layuimini-tool i').attr('class', 'fa fa-outdent'); |
|
||||
$('.layui-layout-body').removeClass('layuimini-mini'); |
|
||||
$('.layui-layout-body').addClass('layuimini-all'); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 初始化加载时间 |
|
||||
* @param loadingTime |
|
||||
*/ |
|
||||
deleteLoader: function (loadingTime) { |
|
||||
setTimeout(function () { |
|
||||
$('.layuimini-loader').fadeOut(); |
|
||||
}, loadingTime * 1000) |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 成功 |
|
||||
* @param title |
|
||||
* @returns {*} |
|
||||
*/ |
|
||||
success: function (title) { |
|
||||
return layer.msg(title, {icon: 1, shade: this.shade, scrollbar: false, time: 2000, shadeClose: true}); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 失败 |
|
||||
* @param title |
|
||||
* @returns {*} |
|
||||
*/ |
|
||||
error: function (title) { |
|
||||
return layer.msg(title, {icon: 2, shade: this.shade, scrollbar: false, time: 3000, shadeClose: true}); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 判断是否为手机 |
|
||||
* @returns {boolean} |
|
||||
*/ |
|
||||
checkMobile: function () { |
|
||||
var ua = navigator.userAgent.toLocaleLowerCase(); |
|
||||
var pf = navigator.platform.toLocaleLowerCase(); |
|
||||
var isAndroid = (/android/i).test(ua) || ((/iPhone|iPod|iPad/i).test(ua) && (/linux/i).test(pf)) |
|
||||
|| (/ucweb.*linux/i.test(ua)); |
|
||||
var isIOS = (/iPhone|iPod|iPad/i).test(ua) && !isAndroid; |
|
||||
var isWinPhone = (/Windows Phone|ZuneWP7/i).test(ua); |
|
||||
var clientWidth = document.documentElement.clientWidth; |
|
||||
if (!isAndroid && !isIOS && !isWinPhone && clientWidth > 1024) { |
|
||||
return false; |
|
||||
} else { |
|
||||
return true; |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 监听 |
|
||||
*/ |
|
||||
listen: function () { |
|
||||
|
|
||||
/** |
|
||||
* 清理 |
|
||||
*/ |
|
||||
$('body').on('click', '[data-clear]', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
sessionStorage.clear(); |
|
||||
|
|
||||
// 判断是否清理服务端
|
|
||||
var clearUrl = $(this).attr('data-href'); |
|
||||
if (clearUrl != undefined && clearUrl != '' && clearUrl != null) { |
|
||||
$.getJSON(clearUrl, function (data, status) { |
|
||||
layer.close(loading); |
|
||||
if (data.code != 1) { |
|
||||
return miniAdmin.error(data.msg); |
|
||||
} else { |
|
||||
return miniAdmin.success(data.msg); |
|
||||
} |
|
||||
}).fail(function () { |
|
||||
layer.close(loading); |
|
||||
return miniAdmin.error('清理缓存接口有误'); |
|
||||
}); |
|
||||
} else { |
|
||||
layer.close(loading); |
|
||||
return miniAdmin.success('清除缓存成功'); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 刷新 |
|
||||
*/ |
|
||||
$('body').on('click', '[data-refresh]', function () { |
|
||||
$(".layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload(); |
|
||||
miniAdmin.success('刷新成功'); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 监听提示信息 |
|
||||
*/ |
|
||||
$("body").on("mouseenter", ".layui-nav-tree .menu-li", function () { |
|
||||
if (miniAdmin.checkMobile()) { |
|
||||
return false; |
|
||||
} |
|
||||
var classInfo = $(this).attr('class'), |
|
||||
tips = $(this).prop("innerHTML"), |
|
||||
isShow = $('.layuimini-tool i').attr('data-side-fold'); |
|
||||
if (isShow == 0 && tips) { |
|
||||
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>" + tips + "</li></ul>"; |
|
||||
window.openTips = layer.tips(tips, $(this), { |
|
||||
tips: [2, '#2f4056'], |
|
||||
time: 300000, |
|
||||
skin: "popup-tips", |
|
||||
success: function (el) { |
|
||||
var left = $(el).position().left - 10; |
|
||||
$(el).css({left: left}); |
|
||||
element.render(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
$("body").on("mouseleave", ".popup-tips", function () { |
|
||||
if (miniAdmin.checkMobile()) { |
|
||||
return false; |
|
||||
} |
|
||||
var isShow = $('.layuimini-tool i').attr('data-side-fold'); |
|
||||
if (isShow == 0) { |
|
||||
try { |
|
||||
layer.close(window.openTips); |
|
||||
} catch (e) { |
|
||||
console.log(e.message); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 全屏 |
|
||||
*/ |
|
||||
$('body').on('click', '[data-check-screen]', function () { |
|
||||
var check = $(this).attr('data-check-screen'); |
|
||||
if (check == 'full') { |
|
||||
miniAdmin.fullScreen(); |
|
||||
$(this).attr('data-check-screen', 'exit'); |
|
||||
$(this).html('<i class="fa fa-compress"></i>'); |
|
||||
} else { |
|
||||
miniAdmin.exitFullScreen(); |
|
||||
$(this).attr('data-check-screen', 'full'); |
|
||||
$(this).html('<i class="fa fa-arrows-alt"></i>'); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 点击遮罩层 |
|
||||
*/ |
|
||||
$('body').on('click', '.layuimini-make', function () { |
|
||||
miniAdmin.renderDevice(); |
|
||||
}); |
|
||||
|
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
|
|
||||
exports("miniAdmin", miniAdmin); |
|
||||
}); |
|
||||
@ -1,260 +0,0 @@ |
|||||
/** |
|
||||
* date:2020/02/27 |
|
||||
* author:Mr.Chung |
|
||||
* version:2.0 |
|
||||
* description:layuimini 菜单框架扩展 |
|
||||
*/ |
|
||||
layui.define(["element", "laytpl", "jquery"], function (exports) { |
|
||||
var element = layui.element, |
|
||||
$ = layui.$, |
|
||||
laytpl = layui.laytpl, |
|
||||
layer = layui.layer; |
|
||||
|
|
||||
var miniMenu = { |
|
||||
|
|
||||
/** |
|
||||
* 菜单初始化 |
|
||||
* @param options.menuList 菜单数据信息 |
|
||||
* @param options.multiModule 是否开启多模块 |
|
||||
* @param options.menuChildOpen 是否展开子菜单 |
|
||||
*/ |
|
||||
render: function (options) { |
|
||||
options.menuList = options.menuList || []; |
|
||||
options.multiModule = options.multiModule || false; |
|
||||
options.menuChildOpen = options.menuChildOpen || false; |
|
||||
if (options.multiModule) { |
|
||||
miniMenu.renderMultiModule(options.menuList, options.menuChildOpen); |
|
||||
} else { |
|
||||
miniMenu.renderSingleModule(options.menuList, options.menuChildOpen); |
|
||||
} |
|
||||
miniMenu.listen(); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 单模块 |
|
||||
* @param menuList 菜单数据 |
|
||||
* @param menuChildOpen 是否默认展开 |
|
||||
*/ |
|
||||
renderSingleModule: function (menuList, menuChildOpen) { |
|
||||
menuList = menuList || []; |
|
||||
var leftMenuHtml = '', |
|
||||
childOpenClass = '', |
|
||||
leftMenuCheckDefault = 'layui-this'; |
|
||||
var me = this; |
|
||||
if (menuChildOpen) childOpenClass = ' layui-nav-itemed'; |
|
||||
leftMenuHtml = this.renderLeftMenu(menuList, {childOpenClass: childOpenClass}); |
|
||||
$('.layui-layout-body').addClass('layuimini-single-module'); //单模块标识
|
|
||||
$('.layuimini-header-menu').remove(); |
|
||||
$('.layuimini-menu-left').html(leftMenuHtml); |
|
||||
|
|
||||
element.init(); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 渲染一级菜单 |
|
||||
*/ |
|
||||
compileMenu: function (menu, isSub) { |
|
||||
var menuHtml = '<li {{#if( d.menu){ }} data-menu="{{d.menu}}" {{#}}} class="layui-nav-item menu-li {{d.childOpenClass}} {{d.className}}" {{#if( d.id){ }} id="{{d.id}}" {{#}}}> <a {{#if( d.href){ }} layuimini-href="{{d.href}}" {{#}}} {{#if( d.target){ }} target="{{d.target}}" {{#}}} href="javascript:;">{{#if( d.icon){ }} <i class="{{d.icon}}"></i> {{#}}} <span class="layui-left-nav">{{d.title}}</span></a> {{# if(d.children){}} {{d.children}} {{#}}} </li>'; |
|
||||
if (isSub) { |
|
||||
menuHtml = '<dd class="menu-dd {{d.childOpenClass}} {{ d.className }}"> <a href="javascript:;" {{#if( d.menu){ }} data-menu="{{d.menu}}" {{#}}} {{#if( d.id){ }} id="{{d.id}}" {{#}}} {{#if(( !d.child || !d.child.length ) && d.href){ }} layuimini-href="{{d.href}}" {{#}}} {{#if( d.target){ }} target="{{d.target}}" {{#}}}> {{#if( d.icon){ }} <i class="{{d.icon}}"></i> {{#}}} <span class="layui-left-nav"> {{d.title}}</span></a> {{# if(d.children){}} {{d.children}} {{#}}}</dd>' |
|
||||
} |
|
||||
return laytpl(menuHtml).render(menu); |
|
||||
}, |
|
||||
compileMenuContainer: function (menu, isSub) { |
|
||||
var wrapperHtml = '<ul class="layui-nav layui-nav-tree layui-left-nav-tree {{d.className}}" id="{{d.id}}">{{d.children}}</ul>'; |
|
||||
if (isSub) { |
|
||||
wrapperHtml = '<dl class="layui-nav-child ">{{d.children}}</dl>'; |
|
||||
} |
|
||||
if (!menu.children) { |
|
||||
return ""; |
|
||||
} |
|
||||
return laytpl(wrapperHtml).render(menu); |
|
||||
}, |
|
||||
|
|
||||
each: function (list, callback) { |
|
||||
var _list = []; |
|
||||
for (var i = 0, length = list.length; i < length; i++) { |
|
||||
_list[i] = callback(i, list[i]); |
|
||||
} |
|
||||
return _list; |
|
||||
}, |
|
||||
renderChildrenMenu: function (menuList, options) { |
|
||||
var me = this; |
|
||||
menuList = menuList || []; |
|
||||
var html = this.each(menuList, function (idx, menu) { |
|
||||
if (menu.child && menu.child.length) { |
|
||||
menu.children = me.renderChildrenMenu(menu.child, {childOpenClass: options.childOpenClass || ''}); |
|
||||
} |
|
||||
menu.className = ""; |
|
||||
menu.childOpenClass = options.childOpenClass || '' |
|
||||
return me.compileMenu(menu, true) |
|
||||
}).join(""); |
|
||||
return me.compileMenuContainer({children: html}, true) |
|
||||
}, |
|
||||
renderLeftMenu: function (leftMenus, options) { |
|
||||
options = options || {}; |
|
||||
var me = this; |
|
||||
var leftMenusHtml = me.each(leftMenus || [], function (idx, leftMenu) { // 左侧菜单遍历
|
|
||||
var children = me.renderChildrenMenu(leftMenu.child, {childOpenClass: options.childOpenClass}); |
|
||||
var leftMenuHtml = me.compileMenu({ |
|
||||
href: leftMenu.href, |
|
||||
target: leftMenu.target, |
|
||||
childOpenClass: options.childOpenClass, |
|
||||
icon: leftMenu.icon, |
|
||||
title: leftMenu.title, |
|
||||
children: children, |
|
||||
className: '', |
|
||||
}); |
|
||||
return leftMenuHtml; |
|
||||
}).join(""); |
|
||||
|
|
||||
leftMenusHtml = me.compileMenuContainer({ |
|
||||
id: options.parentMenuId, |
|
||||
className: options.leftMenuCheckDefault, |
|
||||
children: leftMenusHtml |
|
||||
}); |
|
||||
return leftMenusHtml; |
|
||||
}, |
|
||||
/** |
|
||||
* 多模块 |
|
||||
* @param menuList 菜单数据 |
|
||||
* @param menuChildOpen 是否默认展开 |
|
||||
*/ |
|
||||
renderMultiModule: function (menuList, menuChildOpen) { |
|
||||
menuList = menuList || []; |
|
||||
var me = this; |
|
||||
var headerMenuHtml = '', |
|
||||
headerMobileMenuHtml = '', |
|
||||
leftMenuHtml = '', |
|
||||
leftMenuCheckDefault = 'layui-this', |
|
||||
childOpenClass = '', |
|
||||
headerMenuCheckDefault = 'layui-this'; |
|
||||
|
|
||||
if (menuChildOpen) childOpenClass = ' layui-nav-itemed'; |
|
||||
var headerMenuHtml = this.each(menuList, function (index, val) { //顶部菜单渲染
|
|
||||
var menu = 'multi_module_' + index; |
|
||||
var id = menu + "HeaderId"; |
|
||||
var topMenuItemHtml = ""; |
|
||||
topMenuItemHtml = me.compileMenu({ |
|
||||
className: headerMenuCheckDefault, |
|
||||
menu: menu, |
|
||||
id: id, |
|
||||
title: val.title, |
|
||||
href: "", |
|
||||
target: "", |
|
||||
children: "" |
|
||||
}); |
|
||||
leftMenuHtml += me.renderLeftMenu(val.child, { |
|
||||
parentMenuId: menu, |
|
||||
childOpenClass: childOpenClass, |
|
||||
leftMenuCheckDefault: leftMenuCheckDefault |
|
||||
}); |
|
||||
headerMobileMenuHtml += me.compileMenu({ |
|
||||
id: id, |
|
||||
menu: menu, |
|
||||
id: id, |
|
||||
icon: val.icon, |
|
||||
title: val.title, |
|
||||
}, true); |
|
||||
headerMenuCheckDefault = ""; |
|
||||
leftMenuCheckDefault = "layui-hide"; |
|
||||
return topMenuItemHtml; |
|
||||
}).join(""); |
|
||||
$('.layui-layout-body').addClass('layuimini-multi-module'); //多模块标识
|
|
||||
$('.layuimini-menu-header-pc').html(headerMenuHtml); //电脑
|
|
||||
$('.layuimini-menu-left').html(leftMenuHtml); |
|
||||
$('.layuimini-menu-header-mobile').html(headerMobileMenuHtml); //手机
|
|
||||
element.init(); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 监听 |
|
||||
*/ |
|
||||
listen: function () { |
|
||||
|
|
||||
/** |
|
||||
* 菜单模块切换 |
|
||||
*/ |
|
||||
$('body').on('click', '[data-menu]', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var menuId = $(this).attr('data-menu'); |
|
||||
// header
|
|
||||
$(".layuimini-header-menu .layui-nav-item.layui-this").removeClass('layui-this'); |
|
||||
$(this).addClass('layui-this'); |
|
||||
// left
|
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree.layui-this").addClass('layui-hide'); |
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree.layui-this.layui-hide").removeClass('layui-this'); |
|
||||
$("#" + menuId).removeClass('layui-hide'); |
|
||||
$("#" + menuId).addClass('layui-this'); |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 菜单缩放 |
|
||||
*/ |
|
||||
$('body').on('click', '.layuimini-site-mobile', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var isShow = $('.layuimini-tool [data-side-fold]').attr('data-side-fold'); |
|
||||
if (isShow == 1) { // 缩放
|
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 0); |
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent'); |
|
||||
$('.layui-layout-body').removeClass('layuimini-all'); |
|
||||
$('.layui-layout-body').addClass('layuimini-mini'); |
|
||||
} else { // 正常
|
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 1); |
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-outdent'); |
|
||||
$('.layui-layout-body').removeClass('layuimini-mini'); |
|
||||
$('.layui-layout-body').addClass('layuimini-all'); |
|
||||
layer.close(window.openTips); |
|
||||
} |
|
||||
element.init(); |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
/** |
|
||||
* 菜单缩放 |
|
||||
*/ |
|
||||
$('body').on('click', '[data-side-fold]', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var isShow = $('.layuimini-tool [data-side-fold]').attr('data-side-fold'); |
|
||||
if (isShow == 1) { // 缩放
|
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 0); |
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent'); |
|
||||
$('.layui-layout-body').removeClass('layuimini-all'); |
|
||||
$('.layui-layout-body').addClass('layuimini-mini'); |
|
||||
// $(".menu-li").each(function (idx,el) {
|
|
||||
// $(el).addClass("hidden-sub-menu");
|
|
||||
// });
|
|
||||
|
|
||||
} else { // 正常
|
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 1); |
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-outdent'); |
|
||||
$('.layui-layout-body').removeClass('layuimini-mini'); |
|
||||
$('.layui-layout-body').addClass('layuimini-all'); |
|
||||
// $(".menu-li").each(function (idx,el) {
|
|
||||
// $(el).removeClass("hidden-sub-menu");
|
|
||||
// });
|
|
||||
layer.close(window.openTips); |
|
||||
} |
|
||||
element.init(); |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 手机端点开模块 |
|
||||
*/ |
|
||||
$('body').on('click', '.layuimini-header-menu.layuimini-mobile-show dd', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var check = $('.layuimini-tool [data-side-fold]').attr('data-side-fold'); |
|
||||
if (check === "1") { |
|
||||
$('.layuimini-site-mobile').trigger("click"); |
|
||||
element.init(); |
|
||||
} |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
}; |
|
||||
|
|
||||
|
|
||||
exports("miniMenu", miniMenu); |
|
||||
}); |
|
||||
@ -1,586 +0,0 @@ |
|||||
/** |
|
||||
* date:2020/02/27 |
|
||||
* author:Mr.Chung |
|
||||
* version:2.0 |
|
||||
* description:layuimini tab框架扩展 |
|
||||
*/ |
|
||||
layui.define(["element", "layer", "jquery"], function (exports) { |
|
||||
var element = layui.element, |
|
||||
layer = layui.layer, |
|
||||
$ = layui.$; |
|
||||
|
|
||||
|
|
||||
var miniTab = { |
|
||||
|
|
||||
/** |
|
||||
* 初始化tab |
|
||||
* @param options |
|
||||
*/ |
|
||||
render: function (options) { |
|
||||
options.filter = options.filter || null; |
|
||||
options.multiModule = options.multiModule || false; |
|
||||
options.urlHashLocation = options.urlHashLocation || false; |
|
||||
options.maxTabNum = options.maxTabNum || 20; |
|
||||
options.menuList = options.menuList || []; // todo 后期菜单想改为不操作dom, 而是直接操作初始化传过来的数据
|
|
||||
options.homeInfo = options.homeInfo || {}; |
|
||||
options.listenSwichCallback = options.listenSwichCallback || function () { |
|
||||
}; |
|
||||
miniTab.listen(options); |
|
||||
miniTab.listenRoll(); |
|
||||
miniTab.listenSwitch(options); |
|
||||
miniTab.listenHash(options); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 新建tab窗口 |
|
||||
* @param options.tabId |
|
||||
* @param options.href |
|
||||
* @param options.title |
|
||||
* @param options.isIframe |
|
||||
* @param options.maxTabNum |
|
||||
*/ |
|
||||
create: function (options) { |
|
||||
options.tabId = options.tabId || null; |
|
||||
options.href = options.href || null; |
|
||||
options.title = options.title || null; |
|
||||
options.isIframe = options.isIframe || false; |
|
||||
options.maxTabNum = options.maxTabNum || 20; |
|
||||
if ($(".layuimini-tab .layui-tab-title li").length >= options.maxTabNum) { |
|
||||
layer.msg('Tab窗口已达到限定数量,请先关闭部分Tab'); |
|
||||
return false; |
|
||||
} |
|
||||
var ele = element; |
|
||||
if (options.isIframe) ele = parent.layui.element; |
|
||||
ele.tabAdd('layuiminiTab', { |
|
||||
title: '<span class="layuimini-tab-active"></span><span>' + options.title + '</span><i class="layui-icon layui-unselect layui-tab-close">ဆ</i>' //用于演示
|
|
||||
, |
|
||||
content: '<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" src="' + options.href + '"></iframe>' |
|
||||
, |
|
||||
id: options.tabId |
|
||||
}); |
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'add'); |
|
||||
sessionStorage.setItem('layuiminimenu_' + options.tabId, options.title); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 切换选项卡 |
|
||||
* @param tabId |
|
||||
*/ |
|
||||
change: function (tabId) { |
|
||||
element.tabChange('layuiminiTab', tabId); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 删除tab窗口 |
|
||||
* @param tabId |
|
||||
* @param isParent |
|
||||
*/ |
|
||||
delete: function (tabId, isParent) { |
|
||||
// todo 未知BUG,不知道是不是layui问题,必须先删除元素
|
|
||||
$(".layuimini-tab .layui-tab-title .layui-unselect.layui-tab-bar").remove(); |
|
||||
|
|
||||
if (isParent === true) { |
|
||||
parent.layui.element.tabDelete('layuiminiTab', tabId); |
|
||||
} else { |
|
||||
element.tabDelete('layuiminiTab', tabId); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 在iframe层打开新tab方法 |
|
||||
*/ |
|
||||
openNewTabByIframe: function (options) { |
|
||||
options.href = options.href || null; |
|
||||
options.title = options.title || null; |
|
||||
var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
if (options.href === null || options.href === undefined) options.href = new Date().getTime(); |
|
||||
var checkTab = miniTab.check(options.href, true); |
|
||||
if (!checkTab) { |
|
||||
miniTab.create({ |
|
||||
tabId: options.href, |
|
||||
href: options.href, |
|
||||
title: options.title, |
|
||||
isIframe: true, |
|
||||
}); |
|
||||
} |
|
||||
parent.layui.element.tabChange('layuiminiTab', options.href); |
|
||||
parent.layer.close(loading); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 在iframe层关闭当前tab方法 |
|
||||
*/ |
|
||||
deleteCurrentByIframe: function () { |
|
||||
var ele = $(".layuimini-tab .layui-tab-title li.layui-this", parent.document); |
|
||||
if (ele.length > 0) { |
|
||||
var layId = $(ele[0]).attr('lay-id'); |
|
||||
miniTab.delete(layId, true); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 判断tab窗口 |
|
||||
*/ |
|
||||
check: function (tabId, isIframe) { |
|
||||
// 判断选项卡上是否有
|
|
||||
var checkTab = false; |
|
||||
if (isIframe === undefined || isIframe === false) { |
|
||||
$(".layui-tab-title li").each(function () { |
|
||||
var checkTabId = $(this).attr('lay-id'); |
|
||||
if (checkTabId != null && checkTabId === tabId) { |
|
||||
checkTab = true; |
|
||||
} |
|
||||
}); |
|
||||
} else { |
|
||||
parent.layui.$(".layui-tab-title li").each(function () { |
|
||||
var checkTabId = $(this).attr('lay-id'); |
|
||||
if (checkTabId != null && checkTabId === tabId) { |
|
||||
checkTab = true; |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
return checkTab; |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 开启tab右键菜单 |
|
||||
* @param tabId |
|
||||
* @param left |
|
||||
*/ |
|
||||
openTabRignMenu: function (tabId, left) { |
|
||||
miniTab.closeTabRignMenu(); |
|
||||
var menuHtml = '<div class="layui-unselect layui-form-select layui-form-selected layuimini-tab-mousedown layui-show" data-tab-id="' + tabId + '" style="left: ' + left + 'px!important">\n' + |
|
||||
'<dl>\n' + |
|
||||
'<dd><a href="javascript:;" layuimini-tab-menu-close="current">关 闭 当 前</a></dd>\n' + |
|
||||
'<dd><a href="javascript:;" layuimini-tab-menu-close="other">关 闭 其 他</a></dd>\n' + |
|
||||
'<dd><a href="javascript:;" layuimini-tab-menu-close="all">关 闭 全 部</a></dd>\n' + |
|
||||
'</dl>\n' + |
|
||||
'</div>'; |
|
||||
var makeHtml = '<div class="layuimini-tab-make"></div>'; |
|
||||
$('.layuimini-tab .layui-tab-title').after(menuHtml); |
|
||||
$('.layuimini-tab .layui-tab-content').after(makeHtml); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 关闭tab右键菜单 |
|
||||
*/ |
|
||||
closeTabRignMenu: function () { |
|
||||
$('.layuimini-tab-mousedown').remove(); |
|
||||
$('.layuimini-tab-make').remove(); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 查询菜单信息 |
|
||||
* @param href |
|
||||
* @param menuList |
|
||||
*/ |
|
||||
searchMenu: function (href, menuList) { |
|
||||
var menu; |
|
||||
for (key in menuList) { |
|
||||
var item = menuList[key]; |
|
||||
if (item.href === href) { |
|
||||
menu = item; |
|
||||
break; |
|
||||
} |
|
||||
if (item.child) { |
|
||||
newMenu = miniTab.searchMenu(href, item.child); |
|
||||
if (newMenu) { |
|
||||
menu = newMenu; |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
return menu; |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 监听 |
|
||||
* @param options |
|
||||
*/ |
|
||||
listen: function (options) { |
|
||||
options = options || {}; |
|
||||
options.maxTabNum = options.maxTabNum || 20; |
|
||||
|
|
||||
/** |
|
||||
* 打开新窗口 |
|
||||
*/ |
|
||||
$('body').on('click', '[layuimini-href]', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var tabId = $(this).attr('layuimini-href'), |
|
||||
href = $(this).attr('layuimini-href'), |
|
||||
title = $(this).text(), |
|
||||
target = $(this).attr('target'); |
|
||||
|
|
||||
var el = $("[layuimini-href='" + href + "']", ".layuimini-menu-left"); |
|
||||
layer.close(window.openTips); |
|
||||
if (el.length) { |
|
||||
$(el).closest(".layui-nav-tree").find(".layui-this").removeClass("layui-this"); |
|
||||
$(el).parent().addClass("layui-this"); |
|
||||
} |
|
||||
|
|
||||
if (target === '_blank') { |
|
||||
layer.close(loading); |
|
||||
window.open(href, "_blank"); |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
if (tabId === null || tabId === undefined) tabId = new Date().getTime(); |
|
||||
var checkTab = miniTab.check(tabId); |
|
||||
if (!checkTab) { |
|
||||
miniTab.create({ |
|
||||
tabId: tabId, |
|
||||
href: href, |
|
||||
title: title, |
|
||||
isIframe: false, |
|
||||
maxTabNum: options.maxTabNum, |
|
||||
}); |
|
||||
} |
|
||||
element.tabChange('layuiminiTab', tabId); |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 在iframe子菜单上打开新窗口 |
|
||||
*/ |
|
||||
$('body').on('click', '[layuimini-content-href]', function () { |
|
||||
var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var tabId = $(this).attr('layuimini-content-href'), |
|
||||
href = $(this).attr('layuimini-content-href'), |
|
||||
title = $(this).attr('data-title'), |
|
||||
target = $(this).attr('target'); |
|
||||
if (target === '_blank') { |
|
||||
parent.layer.close(loading); |
|
||||
window.open(href, "_blank"); |
|
||||
return false; |
|
||||
} |
|
||||
if (tabId === null || tabId === undefined) tabId = new Date().getTime(); |
|
||||
var checkTab = miniTab.check(tabId, true); |
|
||||
if (!checkTab) { |
|
||||
miniTab.create({ |
|
||||
tabId: tabId, |
|
||||
href: href, |
|
||||
title: title, |
|
||||
isIframe: true, |
|
||||
maxTabNum: options.maxTabNum, |
|
||||
}); |
|
||||
} |
|
||||
parent.layui.element.tabChange('layuiminiTab', tabId); |
|
||||
parent.layer.close(loading); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 关闭选项卡 |
|
||||
**/ |
|
||||
$('body').on('click', '.layuimini-tab .layui-tab-title .layui-tab-close', function () { |
|
||||
|
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var $parent = $(this).parent(); |
|
||||
console.log($parent); |
|
||||
var tabId = $parent.attr('lay-id'); |
|
||||
if (tabId !== undefined || tabId !== null) { |
|
||||
miniTab.delete(tabId); |
|
||||
} |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 选项卡操作 |
|
||||
*/ |
|
||||
$('body').on('click', '[layuimini-tab-close]', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var closeType = $(this).attr('layuimini-tab-close'); |
|
||||
$(".layuimini-tab .layui-tab-title li").each(function () { |
|
||||
var tabId = $(this).attr('lay-id'); |
|
||||
var id = $(this).attr('id'); |
|
||||
var isCurrent = $(this).hasClass('layui-this'); |
|
||||
if (id !== 'layuiminiHomeTabId') { |
|
||||
if (closeType === 'all') { |
|
||||
miniTab.delete(tabId); |
|
||||
} else { |
|
||||
if (closeType === 'current' && isCurrent) { |
|
||||
miniTab.delete(tabId); |
|
||||
} else if (closeType === 'other' && !isCurrent) { |
|
||||
miniTab.delete(tabId); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 禁用网页右键 |
|
||||
*/ |
|
||||
$(".layuimini-tab .layui-tab-title").unbind("mousedown").bind("contextmenu", function (e) { |
|
||||
e.preventDefault(); |
|
||||
return false; |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 注册鼠标右键 |
|
||||
*/ |
|
||||
$('body').on('mousedown', '.layuimini-tab .layui-tab-title li', function (e) { |
|
||||
var left = $(this).offset().left - $('.layuimini-tab ').offset().left + ($(this).width() / 2), |
|
||||
tabId = $(this).attr('lay-id'); |
|
||||
if (e.which === 3) { |
|
||||
miniTab.openTabRignMenu(tabId, left); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 关闭tab右键菜单 |
|
||||
*/ |
|
||||
$('body').on('click', '.layui-body,.layui-header,.layuimini-menu-left,.layuimini-tab-make', function () { |
|
||||
miniTab.closeTabRignMenu(); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* tab右键选项卡操作 |
|
||||
*/ |
|
||||
$('body').on('click', '[layuimini-tab-menu-close]', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var closeType = $(this).attr('layuimini-tab-menu-close'), |
|
||||
currentTabId = $('.layuimini-tab-mousedown').attr('data-tab-id'); |
|
||||
$(".layuimini-tab .layui-tab-title li").each(function () { |
|
||||
var tabId = $(this).attr('lay-id'); |
|
||||
var id = $(this).attr('id'); |
|
||||
if (id !== 'layuiminiHomeTabId') { |
|
||||
if (closeType === 'all') { |
|
||||
miniTab.delete(tabId); |
|
||||
} else { |
|
||||
if (closeType === 'current' && currentTabId === tabId) { |
|
||||
miniTab.delete(tabId); |
|
||||
} else if (closeType === 'other' && currentTabId !== tabId) { |
|
||||
miniTab.delete(tabId); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
miniTab.closeTabRignMenu(); |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 监听tab切换 |
|
||||
* @param options |
|
||||
*/ |
|
||||
listenSwitch: function (options) { |
|
||||
options.filter = options.filter || null; |
|
||||
options.multiModule = options.multiModule || false; |
|
||||
options.urlHashLocation = options.urlHashLocation || false; |
|
||||
options.listenSwichCallback = options.listenSwichCallback || function () { |
|
||||
|
|
||||
}; |
|
||||
element.on('tab(' + options.filter + ')', function (data) { |
|
||||
var tabId = $(this).attr('lay-id'); |
|
||||
if (options.urlHashLocation) { |
|
||||
location.hash = '/' + tabId; |
|
||||
} |
|
||||
if (typeof options.listenSwichCallback === 'function') { |
|
||||
options.listenSwichCallback(); |
|
||||
} |
|
||||
// 判断是否为新增窗口
|
|
||||
if ($('.layuimini-menu-left').attr('layuimini-tab-tag') === 'add') { |
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no') |
|
||||
} else { |
|
||||
$("[layuimini-href]").parent().removeClass('layui-this'); |
|
||||
if (options.multiModule) { |
|
||||
miniTab.listenSwitchMultiModule(tabId); |
|
||||
} else { |
|
||||
miniTab.listenSwitchSingleModule(tabId); |
|
||||
} |
|
||||
} |
|
||||
miniTab.rollPosition(); |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 监听hash变化 |
|
||||
* @param options |
|
||||
* @returns {boolean} |
|
||||
*/ |
|
||||
listenHash: function (options) { |
|
||||
options.urlHashLocation = options.urlHashLocation || false; |
|
||||
options.maxTabNum = options.maxTabNum || 20; |
|
||||
options.homeInfo = options.homeInfo || {}; |
|
||||
options.menuList = options.menuList || []; |
|
||||
if (!options.urlHashLocation) return false; |
|
||||
var tabId = location.hash.replace(/^#\//, ''); |
|
||||
if (tabId === null || tabId === undefined || tabId === '') return false; |
|
||||
|
|
||||
// 判断是否为首页
|
|
||||
if (tabId === options.homeInfo.href) return false; |
|
||||
|
|
||||
// 判断是否为右侧菜单
|
|
||||
var menu = miniTab.searchMenu(tabId, options.menuList); |
|
||||
if (menu !== undefined) { |
|
||||
miniTab.create({ |
|
||||
tabId: tabId, |
|
||||
href: tabId, |
|
||||
title: menu.title, |
|
||||
isIframe: false, |
|
||||
maxTabNum: options.maxTabNum, |
|
||||
}); |
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no'); |
|
||||
element.tabChange('layuiminiTab', tabId); |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
// 判断是否为快捷菜单
|
|
||||
var isSearchMenu = false; |
|
||||
$("[layuimini-content-href]").each(function () { |
|
||||
if ($(this).attr("layuimini-content-href") === tabId) { |
|
||||
var title = $(this).attr("data-title"); |
|
||||
miniTab.create({ |
|
||||
tabId: tabId, |
|
||||
href: tabId, |
|
||||
title: title, |
|
||||
isIframe: false, |
|
||||
maxTabNum: options.maxTabNum, |
|
||||
}); |
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no'); |
|
||||
element.tabChange('layuiminiTab', tabId); |
|
||||
isSearchMenu = true; |
|
||||
return false; |
|
||||
} |
|
||||
}); |
|
||||
if (isSearchMenu) return false; |
|
||||
|
|
||||
// 既不是右侧菜单、快捷菜单,就直接打开
|
|
||||
var title = sessionStorage.getItem('layuiminimenu_' + tabId) === null ? tabId : sessionStorage.getItem('layuiminimenu_' + tabId); |
|
||||
miniTab.create({ |
|
||||
tabId: tabId, |
|
||||
href: tabId, |
|
||||
title: title, |
|
||||
isIframe: false, |
|
||||
maxTabNum: options.maxTabNum, |
|
||||
}); |
|
||||
element.tabChange('layuiminiTab', tabId); |
|
||||
return false; |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 监听滚动 |
|
||||
*/ |
|
||||
listenRoll: function () { |
|
||||
$(".layuimini-tab-roll-left").click(function () { |
|
||||
miniTab.rollClick("left"); |
|
||||
}); |
|
||||
$(".layuimini-tab-roll-right").click(function () { |
|
||||
miniTab.rollClick("right"); |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 单模块切换 |
|
||||
* @param tabId |
|
||||
*/ |
|
||||
listenSwitchSingleModule: function (tabId) { |
|
||||
$("[layuimini-href]").each(function () { |
|
||||
if ($(this).attr("layuimini-href") === tabId) { |
|
||||
// 自动展开菜单栏
|
|
||||
var addMenuClass = function ($element, type) { |
|
||||
if (type === 1) { |
|
||||
$element.addClass('layui-this'); |
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) { |
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item'); |
|
||||
} else { |
|
||||
addMenuClass($element.parent().parent(), 2); |
|
||||
} |
|
||||
} else { |
|
||||
$element.addClass('layui-nav-itemed'); |
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) { |
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item'); |
|
||||
} else { |
|
||||
addMenuClass($element.parent().parent(), 2); |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
addMenuClass($(this).parent(), 1); |
|
||||
return false; |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 多模块切换 |
|
||||
* @param tabId |
|
||||
*/ |
|
||||
listenSwitchMultiModule: function (tabId) { |
|
||||
$("[layuimini-href]").each(function () { |
|
||||
if ($(this).attr("layuimini-href") === tabId) { |
|
||||
|
|
||||
// 自动展开菜单栏
|
|
||||
var addMenuClass = function ($element, type) { |
|
||||
if (type === 1) { |
|
||||
$element.addClass('layui-this'); |
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) { |
|
||||
var moduleId = $element.parent().attr('id'); |
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item'); |
|
||||
$("#" + moduleId + "HeaderId").addClass("layui-this"); |
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide'); |
|
||||
$("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this'); |
|
||||
} else { |
|
||||
addMenuClass($element.parent().parent(), 2); |
|
||||
} |
|
||||
} else { |
|
||||
$element.addClass('layui-nav-itemed'); |
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) { |
|
||||
var moduleId = $element.parent().attr('id'); |
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item'); |
|
||||
$("#" + moduleId + "HeaderId").addClass("layui-this"); |
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide'); |
|
||||
$("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this'); |
|
||||
} else { |
|
||||
addMenuClass($element.parent().parent(), 2); |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
addMenuClass($(this).parent(), 1); |
|
||||
return false; |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 自动定位 |
|
||||
*/ |
|
||||
rollPosition: function () { |
|
||||
var $tabTitle = $('.layuimini-tab .layui-tab-title'); |
|
||||
var autoLeft = 0; |
|
||||
$tabTitle.children("li").each(function () { |
|
||||
if ($(this).hasClass('layui-this')) { |
|
||||
return false; |
|
||||
} else { |
|
||||
autoLeft += $(this).outerWidth(); |
|
||||
} |
|
||||
}); |
|
||||
$tabTitle.animate({ |
|
||||
scrollLeft: autoLeft - $tabTitle.width() / 3 |
|
||||
}, 200); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 点击滚动 |
|
||||
* @param direction |
|
||||
*/ |
|
||||
rollClick: function (direction) { |
|
||||
var $tabTitle = $('.layuimini-tab .layui-tab-title'); |
|
||||
var left = $tabTitle.scrollLeft(); |
|
||||
if ('left' === direction) { |
|
||||
$tabTitle.animate({ |
|
||||
scrollLeft: left - 450 |
|
||||
}, 200); |
|
||||
} else { |
|
||||
$tabTitle.animate({ |
|
||||
scrollLeft: left + 450 |
|
||||
}, 200); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
}; |
|
||||
|
|
||||
exports("miniTab", miniTab); |
|
||||
}); |
|
||||
@ -1,474 +0,0 @@ |
|||||
/** |
|
||||
* date:2020/02/28 |
|
||||
* author:Mr.Chung |
|
||||
* version:2.0 |
|
||||
* description:layuimini tab框架扩展 |
|
||||
*/ |
|
||||
layui.define(["jquery", "layer"], function (exports) { |
|
||||
var $ = layui.$, |
|
||||
layer = layui.layer; |
|
||||
|
|
||||
var miniTheme = { |
|
||||
|
|
||||
/** |
|
||||
* 主题配置项 |
|
||||
* @param bgcolorId |
|
||||
* @returns {{headerLogo, menuLeftHover, headerRight, menuLeft, headerRightThis, menuLeftThis}|*|*[]} |
|
||||
*/ |
|
||||
config: function (bgcolorId) { |
|
||||
var bgColorConfig = [ |
|
||||
{ |
|
||||
headerRightBg: '#ffffff', //头部右侧背景色
|
|
||||
headerRightBgThis: '#e4e4e4', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(107, 107, 107, 0.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: 'rgba(107, 107, 107, 0.7)', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#565656', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(160, 160, 160, 0.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#1E9FFF', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#565656', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#192027', //logo背景颜色,
|
|
||||
headerLogoColor: 'rgb(191, 187, 187)', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#28333E', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#1E9FFF', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: '#0c0f13', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#1e9fff', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#23262e', //头部右侧背景色
|
|
||||
headerRightBgThis: '#0c0c0c', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#23262e', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#737373', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#23262e', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#ffa4d1', //头部右侧背景色
|
|
||||
headerRightBgThis: '#bf7b9d', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#ffa4d1', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#e694bd', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#737373', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#ffa4d1', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#1aa094', //头部右侧背景色
|
|
||||
headerRightBgThis: '#197971', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#23262e', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#1aa094', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#1aa094', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#1e9fff', //头部右侧背景色
|
|
||||
headerRightBgThis: '#0069b7', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#1e9fff', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#1e9fff', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#1e9fff', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#ffb800', //头部右侧背景色
|
|
||||
headerRightBgThis: '#d09600', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#d09600', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#243346', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#2f4056', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#8593a7', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#ffb800', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#e82121', //头部右侧背景色
|
|
||||
headerRightBgThis: '#ae1919', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#ae1919', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#e82121', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#963885', //头部右侧背景色
|
|
||||
headerRightBgThis: '#772c6a', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#772c6a', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#243346', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#2f4056', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#586473', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#963885', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#2D8CF0', //头部右侧背景色
|
|
||||
headerRightBgThis: '#0069b7', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#0069b7', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#0069b7', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#2D8CF0', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#2d8cf0', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#ffb800', //头部右侧背景色
|
|
||||
headerRightBgThis: '#d09600', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#d09600', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#d09600', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#2f4056', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#ffb800', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#e82121', //头部右侧背景色
|
|
||||
headerRightBgThis: '#ae1919', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#ae1919', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#d91f1f', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#e82121', //tab选项卡选中颜色,
|
|
||||
}, |
|
||||
{ |
|
||||
headerRightBg: '#963885', //头部右侧背景色
|
|
||||
headerRightBgThis: '#772c6a', //头部右侧选中背景色,
|
|
||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
|
||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
|
||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
|
||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
|
||||
headerRightNavMoreBg: '#772c6a', //头部右侧更多下拉列表选中背景色,
|
|
||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
|
||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
|
||||
headerLogoBg: '#772c6a', //logo背景颜色,
|
|
||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
|
||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
|
||||
leftMenuBg: '#2f4056', //左侧菜单背景,
|
|
||||
leftMenuBgThis: '#626f7f', //左侧菜单选中背景,
|
|
||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
|
||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
|
||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
|
||||
tabActiveColor: '#963885', //tab选项卡选中颜色,
|
|
||||
} |
|
||||
]; |
|
||||
if (bgcolorId === undefined) { |
|
||||
return bgColorConfig; |
|
||||
} else { |
|
||||
return bgColorConfig[bgcolorId]; |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 初始化 |
|
||||
* @param options |
|
||||
*/ |
|
||||
render: function (options) { |
|
||||
options.bgColorDefault = options.bgColorDefault || false; |
|
||||
options.listen = options.listen || false; |
|
||||
var bgcolorId = sessionStorage.getItem('layuiminiBgcolorId'); |
|
||||
if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') { |
|
||||
bgcolorId = options.bgColorDefault; |
|
||||
} |
|
||||
miniTheme.buildThemeCss(bgcolorId); |
|
||||
if (options.listen) miniTheme.listen(options); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 构建主题样式 |
|
||||
* @param bgcolorId |
|
||||
* @returns {boolean} |
|
||||
*/ |
|
||||
buildThemeCss: function (bgcolorId) { |
|
||||
if (!bgcolorId) { |
|
||||
return false; |
|
||||
} |
|
||||
var bgcolorData = miniTheme.config(bgcolorId); |
|
||||
var styleHtml = '/*头部右侧背景色 headerRightBg */\n' + |
|
||||
'.layui-layout-admin .layui-header {\n' + |
|
||||
' background-color: ' + bgcolorData.headerRightBg + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*头部右侧选中背景色 headerRightBgThis */\n' + |
|
||||
'.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {\n' + |
|
||||
' background-color: ' + bgcolorData.headerRightBgThis + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*头部右侧字体颜色 headerRightColor */\n' + |
|
||||
'.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {\n' + |
|
||||
' color: ' + bgcolorData.headerRightColor + ';\n' + |
|
||||
'}\n' + |
|
||||
'/**头部右侧下拉字体颜色 headerRightChildColor */\n' + |
|
||||
'.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {\n' + |
|
||||
' color: ' + bgcolorData.headerRightChildColor + '!important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*头部右侧鼠标选中 headerRightColorThis */\n' + |
|
||||
'.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {\n' + |
|
||||
' color: ' + bgcolorData.headerRightColorThis + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*头部右侧更多下拉颜色 headerRightNavMore */\n' + |
|
||||
'.layui-header .layui-nav .layui-nav-more {\n' + |
|
||||
' border-top-color: ' + bgcolorData.headerRightNavMore + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*头部右侧更多下拉颜色 headerRightNavMore */\n' + |
|
||||
'.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more {\n' + |
|
||||
' border-color: transparent transparent ' + bgcolorData.headerRightNavMore + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */\n' + |
|
||||
'.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {\n' + |
|
||||
' background-color: ' + bgcolorData.headerRightNavMoreBg + ' !important;\n' + |
|
||||
' color:' + bgcolorData.headerRightNavMoreColor + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*头部缩放按钮样式 headerRightToolColor */\n' + |
|
||||
'.layui-layout-admin .layui-header .layuimini-tool i {\n' + |
|
||||
' color: ' + bgcolorData.headerRightToolColor + ';\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*logo背景颜色 headerLogoBg */\n' + |
|
||||
'.layui-layout-admin .layuimini-logo {\n' + |
|
||||
' background-color: ' + bgcolorData.headerLogoBg + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*logo字体颜色 headerLogoColor */\n' + |
|
||||
'.layui-layout-admin .layuimini-logo h1 {\n' + |
|
||||
' color: ' + bgcolorData.headerLogoColor + ';\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*左侧菜单更多下拉样式 leftMenuNavMore */\n' + |
|
||||
'.layuimini-menu-left .layui-nav .layui-nav-more,.layuimini-menu-left-zoom.layui-nav .layui-nav-more {\n' + |
|
||||
' border-top-color: ' + bgcolorData.leftMenuNavMore + ';\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*左侧菜单更多下拉样式 leftMenuNavMore */\n' + |
|
||||
'.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more {\n' + |
|
||||
' border-color: transparent transparent ' + bgcolorData.leftMenuNavMore + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*左侧菜单背景 leftMenuBg */\n' + |
|
||||
'.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul {\n' + |
|
||||
' background-color: ' + bgcolorData.leftMenuBg + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*左侧菜单选中背景 leftMenuBgThis */\n' + |
|
||||
'.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {\n' + |
|
||||
' background-color: ' + bgcolorData.leftMenuBgThis + ' !important\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*左侧菜单子菜单背景 leftMenuChildBg */\n' + |
|
||||
'.layuimini-menu-left .layui-nav-itemed > .layui-nav-child{\n' + |
|
||||
' background-color: ' + bgcolorData.leftMenuChildBg + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*左侧菜单字体颜色 leftMenuColor */\n' + |
|
||||
'.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a {\n' + |
|
||||
' color: ' + bgcolorData.leftMenuColor + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/*左侧菜单选中字体颜色 leftMenuColorThis */\n' + |
|
||||
'.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a {\n' + |
|
||||
' color:' + bgcolorData.leftMenuColorThis + ' !important;\n' + |
|
||||
'}\n' + |
|
||||
'\n' + |
|
||||
'/**tab选项卡选中颜色 tabActiveColor */\n' + |
|
||||
'.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {\n' + |
|
||||
' background-color: ' + bgcolorData.tabActiveColor + ';\n' + |
|
||||
'}\n'; |
|
||||
$('#layuimini-bg-color').html(styleHtml); |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 构建主题选择html |
|
||||
* @param options |
|
||||
* @returns {string} |
|
||||
*/ |
|
||||
buildBgColorHtml: function (options) { |
|
||||
options.bgColorDefault = options.bgColorDefault || 0; |
|
||||
var bgcolorId = parseInt(sessionStorage.getItem('layuiminiBgcolorId')); |
|
||||
if (isNaN(bgcolorId)) bgcolorId = options.bgColorDefault; |
|
||||
var bgColorConfig = miniTheme.config(); |
|
||||
var html = ''; |
|
||||
$.each(bgColorConfig, function (key, val) { |
|
||||
if (key === bgcolorId) { |
|
||||
html += '<li class="layui-this" data-select-bgcolor="' + key + '">\n'; |
|
||||
} else { |
|
||||
html += '<li data-select-bgcolor="' + key + '">\n'; |
|
||||
} |
|
||||
html += '<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">\n' + |
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: ' + val.headerLogoBg + ';"></span><span style="display:block; width: 80%; float: left; height: 12px; background: ' + val.headerRightBg + ';"></span></div>\n' + |
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: ' + val.leftMenuBg + ';"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #ffffff;"></span></div>\n' + |
|
||||
'</a>\n' + |
|
||||
'</li>'; |
|
||||
}); |
|
||||
return html; |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 监听 |
|
||||
* @param options |
|
||||
*/ |
|
||||
listen: function (options) { |
|
||||
$('body').on('click', '[data-bgcolor]', function () { |
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
|
||||
var clientHeight = (document.documentElement.clientHeight) - 60; |
|
||||
var bgColorHtml = miniTheme.buildBgColorHtml(options); |
|
||||
var html = '<div class="layuimini-color">\n' + |
|
||||
'<div class="color-title">\n' + |
|
||||
'<span>配色方案</span>\n' + |
|
||||
'</div>\n' + |
|
||||
'<div class="color-content">\n' + |
|
||||
'<ul>\n' + bgColorHtml + '</ul>\n' + |
|
||||
'</div>\n' + |
|
||||
'<div class="more-menu-list">\n' + |
|
||||
'<a class="more-menu-item" href="http://layuimini.99php.cn/docs/index.html" target="_blank"><i class="layui-icon layui-icon-read" style="font-size: 19px;"></i> 开发文档</a>\n' + |
|
||||
'<a class="more-menu-item" href="https://github.com/zhongshaofa/layuimini" target="_blank"><i class="layui-icon layui-icon-tabs" style="font-size: 16px;"></i> 开源地址</a>\n' + |
|
||||
'<a class="more-menu-item" href="http://layuimini.99php.cn" target="_blank"><i class="layui-icon layui-icon-theme"></i> 官方网站</a>\n' + |
|
||||
'</div>' + |
|
||||
'</div>'; |
|
||||
layer.open({ |
|
||||
type: 1, |
|
||||
title: false, |
|
||||
closeBtn: 0, |
|
||||
shade: 0.2, |
|
||||
anim: 2, |
|
||||
shadeClose: true, |
|
||||
id: 'layuiminiBgColor', |
|
||||
area: ['340px', clientHeight + 'px'], |
|
||||
offset: 'rb', |
|
||||
content: html, |
|
||||
success: function (index, layero) { |
|
||||
}, |
|
||||
end: function () { |
|
||||
$('.layuimini-select-bgcolor').removeClass('layui-this'); |
|
||||
} |
|
||||
}); |
|
||||
layer.close(loading); |
|
||||
}); |
|
||||
|
|
||||
$('body').on('click', '[data-select-bgcolor]', function () { |
|
||||
var bgcolorId = $(this).attr('data-select-bgcolor'); |
|
||||
$('.layuimini-color .color-content ul .layui-this').attr('class', ''); |
|
||||
$(this).attr('class', 'layui-this'); |
|
||||
sessionStorage.setItem('layuiminiBgcolorId', bgcolorId); |
|
||||
miniTheme.render({ |
|
||||
bgColorDefault: bgcolorId, |
|
||||
listen: false, |
|
||||
}); |
|
||||
}); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
exports("miniTheme", miniTheme); |
|
||||
|
|
||||
}) |
|
||||
; |
|
||||
@ -1,40 +0,0 @@ |
|||||
/** |
|
||||
* date:2020/03/01 |
|
||||
* author:Mr.Chung |
|
||||
* version:2.0 |
|
||||
* description:layuimini 统计框架扩展 |
|
||||
*/ |
|
||||
layui.define(["jquery"], function (exports) { |
|
||||
var $ = layui.$; |
|
||||
|
|
||||
var miniTongji = { |
|
||||
|
|
||||
/** |
|
||||
* 初始化 |
|
||||
* @param options |
|
||||
*/ |
|
||||
render: function (options) { |
|
||||
options.specific = options.specific || false; |
|
||||
options.domains = options.domains || []; |
|
||||
var domain = window.location.hostname; |
|
||||
if (options.specific === false || (options.specific === true && options.domains.indexOf(domain) >= 0)) { |
|
||||
miniTongji.listen(); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 监听统计代码 |
|
||||
*/ |
|
||||
listen: function () { |
|
||||
var _hmt = _hmt || []; |
|
||||
(function () { |
|
||||
var hm = document.createElement("script"); |
|
||||
hm.src = "https://hm.baidu.com/hm.js?d97abf6d61c21d773f97835defbdef4e"; |
|
||||
var s = document.getElementsByTagName("script")[0]; |
|
||||
s.parentNode.insertBefore(hm, s); |
|
||||
})(); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
exports("miniTongji", miniTongji); |
|
||||
}); |
|
||||
@ -1,80 +0,0 @@ |
|||||
.lay-step { |
|
||||
font-size: 0; |
|
||||
width: 400px; |
|
||||
margin: 0 auto; |
|
||||
max-width: 100%; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.step-item { |
|
||||
display: inline-block; |
|
||||
line-height: 26px; |
|
||||
position: relative; |
|
||||
font-size: 14px; |
|
||||
} |
|
||||
|
|
||||
.step-item-tail { |
|
||||
width: 100%; |
|
||||
padding: 0 10px; |
|
||||
position: absolute; |
|
||||
left: 0; |
|
||||
top: 13px; |
|
||||
} |
|
||||
|
|
||||
.step-item-tail i { |
|
||||
display: inline-block; |
|
||||
width: 100%; |
|
||||
height: 1px; |
|
||||
vertical-align: top; |
|
||||
background: #c2c2c2; |
|
||||
position: relative; |
|
||||
} |
|
||||
|
|
||||
.step-item-tail .step-item-tail-done { |
|
||||
background: #009688; |
|
||||
} |
|
||||
|
|
||||
.step-item-head { |
|
||||
position: relative; |
|
||||
display: inline-block; |
|
||||
height: 26px; |
|
||||
width: 26px; |
|
||||
text-align: center; |
|
||||
vertical-align: top; |
|
||||
color: #009688; |
|
||||
border: 1px solid #009688; |
|
||||
border-radius: 50%; |
|
||||
background: #ffffff; |
|
||||
} |
|
||||
|
|
||||
.step-item-head.step-item-head-active { |
|
||||
background: #009688; |
|
||||
color: #ffffff; |
|
||||
} |
|
||||
|
|
||||
.step-item-main { |
|
||||
display: block; |
|
||||
position: relative; |
|
||||
/*margin-left: -20px;*/ |
|
||||
/*margin-left: -50%;*/ |
|
||||
/*margin-right: 50%;*/ |
|
||||
/*padding-left: 26px;*/ |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.step-item-main-title { |
|
||||
font-weight: bolder; |
|
||||
color: #555555; |
|
||||
} |
|
||||
|
|
||||
.step-item-main-desc { |
|
||||
color: #aaaaaa; |
|
||||
} |
|
||||
|
|
||||
.lay-step + [carousel-item]:before { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.lay-step + [carousel-item] > * { |
|
||||
background-color: transparent; |
|
||||
} |
|
||||
@ -1,105 +0,0 @@ |
|||||
layui.define(['layer', 'carousel'], function (exports) { |
|
||||
var $ = layui.jquery; |
|
||||
var layer = layui.layer; |
|
||||
var carousel = layui.carousel; |
|
||||
|
|
||||
// 添加步骤条dom节点
|
|
||||
var renderDom = function (elem, stepItems, position, newnumber) { |
|
||||
var stepDiv = '<div class="lay-step">'; |
|
||||
for (var i = 0; i < stepItems.length; i++) { |
|
||||
stepDiv += '<div class="step-item">'; |
|
||||
// 线
|
|
||||
if (i < (stepItems.length - 1)) { |
|
||||
if (i < position) { |
|
||||
stepDiv += '<div class="step-item-tail" style="display:none;"><i class="step-item-tail-done" ></i></div>'; |
|
||||
} else { |
|
||||
stepDiv += '<div class="step-item-tail" style="display:none;"><i class=""></i></div>'; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
// 数字
|
|
||||
var number = stepItems[i].number; |
|
||||
if (newnumber != 0) { |
|
||||
number = newnumber; |
|
||||
} |
|
||||
if (!number) { |
|
||||
number = i + 1; |
|
||||
} |
|
||||
if (i == position) { |
|
||||
stepDiv += '<div class="step-item-head step-item-head-active"><i class="layui-icon">' + number + '</i></div>'; |
|
||||
} else if (i < position) { |
|
||||
stepDiv += '<div class="step-item-head"><i class="layui-icon layui-icon-ok"></i></div>'; |
|
||||
} else { |
|
||||
stepDiv += '<div class="step-item-head "><i class="layui-icon">' + number + '</i></div>'; |
|
||||
} |
|
||||
|
|
||||
// 标题和描述
|
|
||||
var title = stepItems[i].title; |
|
||||
var desc = stepItems[i].desc; |
|
||||
if (title || desc) { |
|
||||
stepDiv += '<div class="step-item-main">'; |
|
||||
if (title) { |
|
||||
stepDiv += '<div class="step-item-main-title">' + title + '</div>'; |
|
||||
} |
|
||||
if (desc) { |
|
||||
stepDiv += '<div class="step-item-main-desc">' + desc + '</div>'; |
|
||||
} |
|
||||
stepDiv += '</div>'; |
|
||||
} |
|
||||
stepDiv += '</div>'; |
|
||||
} |
|
||||
stepDiv += '</div>'; |
|
||||
|
|
||||
$(elem).prepend(stepDiv); |
|
||||
|
|
||||
// 计算每一个条目的宽度
|
|
||||
var bfb = 100 / stepItems.length; |
|
||||
$('.step-item').css('width', bfb + '%'); |
|
||||
}; |
|
||||
|
|
||||
var step = { |
|
||||
// 渲染步骤条
|
|
||||
render: function (param) { |
|
||||
param.indicator = 'none'; // 不显示指示器
|
|
||||
param.arrow = 'always'; // 始终显示箭头
|
|
||||
param.autoplay = false; // 关闭自动播放
|
|
||||
|
|
||||
if (!param.stepWidth) { |
|
||||
param.stepWidth = '400px'; |
|
||||
} |
|
||||
|
|
||||
// 渲染轮播图
|
|
||||
carousel.render(param); |
|
||||
|
|
||||
// 渲染步骤条
|
|
||||
var stepItems = param.stepItems; |
|
||||
renderDom(param.elem, stepItems, param.position || 0, param.number); |
|
||||
$('.lay-step').css('width', param.stepWidth); |
|
||||
|
|
||||
//监听轮播切换事件
|
|
||||
carousel.on('change(' + param.filter + ')', function (obj) { |
|
||||
$(param.elem).find('.lay-step').remove(); |
|
||||
renderDom(param.elem, stepItems, obj.index); |
|
||||
$('.lay-step').css('width', param.stepWidth); |
|
||||
}); |
|
||||
|
|
||||
// 隐藏左右箭头按钮
|
|
||||
$(param.elem).find('.layui-carousel-arrow').css('display', 'none'); |
|
||||
|
|
||||
// 去掉轮播图的背景颜色
|
|
||||
$(param.elem).css('background-color', 'transparent'); |
|
||||
}, |
|
||||
// 下一步
|
|
||||
next: function (elem) { |
|
||||
$(elem).find('.layui-carousel-arrow[lay-type=add]').trigger('click'); |
|
||||
}, |
|
||||
// 上一步
|
|
||||
pre: function (elem) { |
|
||||
$(elem).find('.layui-carousel-arrow[lay-type=sub]').trigger('click'); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
layui.link(layui.cache.base + 'step-lay/step.css'); |
|
||||
|
|
||||
exports('step', step); |
|
||||
}); |
|
||||
@ -1,274 +0,0 @@ |
|||||
layui.define(['table', 'jquery', 'form'], function (exports) { |
|
||||
"use strict"; |
|
||||
|
|
||||
var MOD_NAME = 'tableSelect', |
|
||||
$ = layui.jquery, |
|
||||
table = layui.table, |
|
||||
form = layui.form; |
|
||||
var tableSelect = function () { |
|
||||
this.v = '1.1.0'; |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* 初始化表格选择器 |
|
||||
*/ |
|
||||
tableSelect.prototype.render = function (opt) { |
|
||||
var elem = $(opt.elem); |
|
||||
var tableDone = opt.table.done || function () { |
|
||||
}; |
|
||||
|
|
||||
//默认设置
|
|
||||
opt.searchKey = opt.searchKey || 'keyword'; |
|
||||
opt.searchPlaceholder = opt.searchPlaceholder || '关键词搜索'; |
|
||||
opt.checkedKey = opt.checkedKey; |
|
||||
opt.table.page = opt.table.page || true; |
|
||||
opt.table.height = opt.height || 315; |
|
||||
|
|
||||
//最小宽度
|
|
||||
opt.width = opt.width || '530'; |
|
||||
|
|
||||
//多搜索条件
|
|
||||
opt.searchType = opt.searchType || 'one'; |
|
||||
opt.searchList = opt.searchList || [{key: opt.searchKey, placeholder: opt.searchPlaceholder}]; |
|
||||
|
|
||||
elem.off('click').on('click', function (e) { |
|
||||
e.stopPropagation(); |
|
||||
|
|
||||
if ($('div.tableSelect').length >= 1) { |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
var t = elem.offset().top + elem.outerHeight() + "px"; |
|
||||
var l = elem.offset().left + "px"; |
|
||||
var tableName = "tableSelect_table_" + new Date().getTime(); |
|
||||
var tableBox = '<div class="tableSelect layui-anim layui-anim-upbit" style="left:' + l + ';top:' + t + ';border: 1px solid #d2d2d2;background-color: #fff;box-shadow: 0 2px 4px rgba(0,0,0,.12);padding:10px 10px 0 10px;position: absolute;z-index:66666666;margin: 5px 0;border-radius: 2px;min-width:' + opt.width + 'px;">'; |
|
||||
tableBox += '<div class="tableSelectBar">'; |
|
||||
tableBox += '<form class="layui-form" action="" style="display:inline-block;">'; |
|
||||
|
|
||||
//判断是否多搜索条件
|
|
||||
if (opt.searchType == 'more') { |
|
||||
$.each(opt.searchList, function (index, item) { |
|
||||
tableBox += '<input style="display:inline-block;width:190px;height:30px;vertical-align:middle;margin-right:-1px;border: 1px solid #C9C9C9;" type="text" name="' + item.searchKey + '" placeholder="' + item.searchPlaceholder + '" autocomplete="off" class="layui-input">'; |
|
||||
}); |
|
||||
} else { |
|
||||
tableBox += '<input style="display:inline-block;width:190px;height:30px;vertical-align:middle;margin-right:-1px;border: 1px solid #C9C9C9;" type="text" name="' + opt.searchKey + '" placeholder="' + opt.searchPlaceholder + '" autocomplete="off" class="layui-input">'; |
|
||||
} |
|
||||
|
|
||||
tableBox += '<button class="layui-btn layui-btn-sm layui-btn-primary tableSelect_btn_search" lay-submit lay-filter="tableSelect_btn_search"><i class="layui-icon layui-icon-search"></i></button>'; |
|
||||
tableBox += '</form>'; |
|
||||
tableBox += '<button style="float:right;" class="layui-btn layui-btn-sm tableSelect_btn_select">选择<span></span></button>'; |
|
||||
tableBox += '</div>'; |
|
||||
tableBox += '<table id="' + tableName + '" lay-filter="' + tableName + '"></table>'; |
|
||||
tableBox += '</div>'; |
|
||||
tableBox = $(tableBox); |
|
||||
$('body').append(tableBox); |
|
||||
|
|
||||
//数据缓存
|
|
||||
var checkedData = []; |
|
||||
|
|
||||
//渲染TABLE
|
|
||||
opt.table.elem = "#" + tableName; |
|
||||
opt.table.id = tableName; |
|
||||
opt.table.done = function (res, curr, count) { |
|
||||
defaultChecked(res, curr, count); |
|
||||
setChecked(res, curr, count); |
|
||||
tableDone(res, curr, count); |
|
||||
}; |
|
||||
var tableSelect_table = table.render(opt.table); |
|
||||
|
|
||||
//分页选中保存数组
|
|
||||
table.on('radio(' + tableName + ')', function (obj) { |
|
||||
if (opt.checkedKey) { |
|
||||
checkedData = table.checkStatus(tableName).data |
|
||||
} |
|
||||
updataButton(table.checkStatus(tableName).data.length) |
|
||||
}) |
|
||||
table.on('checkbox(' + tableName + ')', function (obj) { |
|
||||
if (opt.checkedKey) { |
|
||||
if (obj.checked) { |
|
||||
for (var i = 0; i < table.checkStatus(tableName).data.length; i++) { |
|
||||
checkedData.push(table.checkStatus(tableName).data[i]) |
|
||||
} |
|
||||
} else { |
|
||||
if (obj.type == 'all') { |
|
||||
for (var j = 0; j < table.cache[tableName].length; j++) { |
|
||||
for (var i = 0; i < checkedData.length; i++) { |
|
||||
if (checkedData[i][opt.checkedKey] == table.cache[tableName][j][opt.checkedKey]) { |
|
||||
checkedData.splice(i, 1) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} else { |
|
||||
//因为LAYUI问题,操作到变化全选状态时获取到的obj为空,这里用函数获取未选中的项。
|
|
||||
function nu() { |
|
||||
var noCheckedKey = ''; |
|
||||
for (var i = 0; i < table.cache[tableName].length; i++) { |
|
||||
if (!table.cache[tableName][i].LAY_CHECKED) { |
|
||||
noCheckedKey = table.cache[tableName][i][opt.checkedKey]; |
|
||||
} |
|
||||
} |
|
||||
return noCheckedKey |
|
||||
} |
|
||||
|
|
||||
var noCheckedKey = obj.data[opt.checkedKey] || nu(); |
|
||||
for (var i = 0; i < checkedData.length; i++) { |
|
||||
if (checkedData[i][opt.checkedKey] == noCheckedKey) { |
|
||||
checkedData.splice(i, 1); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
checkedData = uniqueObjArray(checkedData, opt.checkedKey); |
|
||||
updataButton(checkedData.length) |
|
||||
} else { |
|
||||
updataButton(table.checkStatus(tableName).data.length) |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
//渲染表格后选中
|
|
||||
function setChecked(res, curr, count) { |
|
||||
for (var i = 0; i < res.data.length; i++) { |
|
||||
for (var j = 0; j < checkedData.length; j++) { |
|
||||
if (res.data[i][opt.checkedKey] == checkedData[j][opt.checkedKey]) { |
|
||||
res.data[i].LAY_CHECKED = true; |
|
||||
var index = res.data[i]['LAY_TABLE_INDEX']; |
|
||||
var checkbox = $('#' + tableName + '').next().find('tr[data-index=' + index + '] input[type="checkbox"]'); |
|
||||
checkbox.prop('checked', true).next().addClass('layui-form-checked'); |
|
||||
var radio = $('#' + tableName + '').next().find('tr[data-index=' + index + '] input[type="radio"]'); |
|
||||
radio.prop('checked', true).next().addClass('layui-form-radioed').find("i").html(''); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
var checkStatus = table.checkStatus(tableName); |
|
||||
if (checkStatus.isAll) { |
|
||||
$('#' + tableName + '').next().find('.layui-table-header th[data-field="0"] input[type="checkbox"]').prop('checked', true); |
|
||||
$('#' + tableName + '').next().find('.layui-table-header th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked'); |
|
||||
} |
|
||||
updataButton(checkedData.length) |
|
||||
} |
|
||||
|
|
||||
//写入默认选中值(puash checkedData)
|
|
||||
function defaultChecked(res, curr, count) { |
|
||||
if (opt.checkedKey && elem.attr('ts-selected')) { |
|
||||
var selected = elem.attr('ts-selected').split(","); |
|
||||
for (var i = 0; i < res.data.length; i++) { |
|
||||
for (var j = 0; j < selected.length; j++) { |
|
||||
if (res.data[i][opt.checkedKey] == selected[j]) { |
|
||||
checkedData.push(res.data[i]) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
checkedData = uniqueObjArray(checkedData, opt.checkedKey); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//更新选中数量
|
|
||||
function updataButton(n) { |
|
||||
tableBox.find('.tableSelect_btn_select span').html(n == 0 ? '' : '(' + n + ')') |
|
||||
} |
|
||||
|
|
||||
//数组去重
|
|
||||
function uniqueObjArray(arr, type) { |
|
||||
var newArr = []; |
|
||||
var tArr = []; |
|
||||
if (arr.length == 0) { |
|
||||
return arr; |
|
||||
} else { |
|
||||
if (type) { |
|
||||
for (var i = 0; i < arr.length; i++) { |
|
||||
if (!tArr[arr[i][type]]) { |
|
||||
newArr.push(arr[i]); |
|
||||
tArr[arr[i][type]] = true; |
|
||||
} |
|
||||
} |
|
||||
return newArr; |
|
||||
} else { |
|
||||
for (var i = 0; i < arr.length; i++) { |
|
||||
if (!tArr[arr[i]]) { |
|
||||
newArr.push(arr[i]); |
|
||||
tArr[arr[i]] = true; |
|
||||
} |
|
||||
} |
|
||||
return newArr; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//FIX位置
|
|
||||
var overHeight = (elem.offset().top + elem.outerHeight() + tableBox.outerHeight() - $(window).scrollTop()) > $(window).height(); |
|
||||
var overWidth = (elem.offset().left + tableBox.outerWidth()) > $(window).width(); |
|
||||
overHeight && tableBox.css({'top': 'auto', 'bottom': '0px'}); |
|
||||
overWidth && tableBox.css({'left': 'auto', 'right': '5px'}) |
|
||||
|
|
||||
//关键词搜索
|
|
||||
form.on('submit(tableSelect_btn_search)', function (data) { |
|
||||
tableSelect_table.reload({ |
|
||||
where: data.field, |
|
||||
page: { |
|
||||
curr: 1 |
|
||||
} |
|
||||
}); |
|
||||
return false; |
|
||||
}); |
|
||||
|
|
||||
//双击行选中
|
|
||||
table.on('rowDouble(' + tableName + ')', function (obj) { |
|
||||
var checkStatus = {data: [obj.data]}; |
|
||||
selectDone(checkStatus); |
|
||||
}) |
|
||||
|
|
||||
//按钮选中
|
|
||||
tableBox.find('.tableSelect_btn_select').on('click', function () { |
|
||||
var checkStatus = table.checkStatus(tableName); |
|
||||
if (checkedData.length > 1) { |
|
||||
checkStatus.data = checkedData; |
|
||||
} |
|
||||
selectDone(checkStatus); |
|
||||
}) |
|
||||
|
|
||||
//写值回调和关闭
|
|
||||
function selectDone(checkStatus) { |
|
||||
if (opt.checkedKey) { |
|
||||
var selected = []; |
|
||||
for (var i = 0; i < checkStatus.data.length; i++) { |
|
||||
selected.push(checkStatus.data[i][opt.checkedKey]) |
|
||||
} |
|
||||
elem.attr("ts-selected", selected.join(",")); |
|
||||
} |
|
||||
opt.done(elem, checkStatus); |
|
||||
tableBox.remove(); |
|
||||
delete table.cache[tableName]; |
|
||||
checkedData = []; |
|
||||
} |
|
||||
|
|
||||
//点击其他区域关闭
|
|
||||
$(document).mouseup(function (e) { |
|
||||
var userSet_con = $('' + opt.elem + ',.tableSelect'); |
|
||||
if (!userSet_con.is(e.target) && userSet_con.has(e.target).length === 0) { |
|
||||
tableBox.remove(); |
|
||||
delete table.cache[tableName]; |
|
||||
checkedData = []; |
|
||||
} |
|
||||
}); |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 隐藏选择器 |
|
||||
*/ |
|
||||
tableSelect.prototype.hide = function (opt) { |
|
||||
$('.tableSelect').remove(); |
|
||||
} |
|
||||
|
|
||||
//自动完成渲染
|
|
||||
var tableSelect = new tableSelect(); |
|
||||
|
|
||||
//FIX 滚动时错位
|
|
||||
if (window.top == window.self) { |
|
||||
$(window).scroll(function () { |
|
||||
tableSelect.hide(); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
exports(MOD_NAME, tableSelect); |
|
||||
}) |
|
||||
@ -1,18 +0,0 @@ |
|||||
.treeTable-empty { |
|
||||
width: 20px; |
|
||||
display: inline-block; |
|
||||
} |
|
||||
|
|
||||
.treeTable-icon { |
|
||||
cursor: pointer; |
|
||||
} |
|
||||
|
|
||||
.treeTable-icon .layui-icon-triangle-d:before { |
|
||||
content: "\e623"; |
|
||||
} |
|
||||
|
|
||||
.treeTable-icon.open .layui-icon-triangle-d:before { |
|
||||
content: "\e625"; |
|
||||
background-color: transparent; |
|
||||
} |
|
||||
|
|
||||
@ -1,206 +0,0 @@ |
|||||
layui.define(['layer', 'table'], function (exports) { |
|
||||
var $ = layui.jquery; |
|
||||
var layer = layui.layer; |
|
||||
var table = layui.table; |
|
||||
|
|
||||
var treetable = { |
|
||||
// 渲染树形表格
|
|
||||
render: function (param) { |
|
||||
// 检查参数
|
|
||||
if (!treetable.checkParam(param)) { |
|
||||
return; |
|
||||
} |
|
||||
// 获取数据
|
|
||||
if (param.data) { |
|
||||
treetable.init(param, param.data); |
|
||||
} else { |
|
||||
$.getJSON(param.url, param.where, function (res) { |
|
||||
treetable.init(param, res.data); |
|
||||
}); |
|
||||
} |
|
||||
}, |
|
||||
// 渲染表格
|
|
||||
init: function (param, data) { |
|
||||
var mData = []; |
|
||||
var doneCallback = param.done; |
|
||||
var tNodes = data; |
|
||||
// 补上id和pid字段
|
|
||||
for (var i = 0; i < tNodes.length; i++) { |
|
||||
var tt = tNodes[i]; |
|
||||
if (!tt.id) { |
|
||||
if (!param.treeIdName) { |
|
||||
layer.msg('参数treeIdName不能为空', {icon: 5}); |
|
||||
return; |
|
||||
} |
|
||||
tt.id = tt[param.treeIdName]; |
|
||||
} |
|
||||
if (!tt.pid) { |
|
||||
if (!param.treePidName) { |
|
||||
layer.msg('参数treePidName不能为空', {icon: 5}); |
|
||||
return; |
|
||||
} |
|
||||
tt.pid = tt[param.treePidName]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
// 对数据进行排序
|
|
||||
var sort = function (s_pid, data) { |
|
||||
for (var i = 0; i < data.length; i++) { |
|
||||
if (data[i].pid == s_pid) { |
|
||||
var len = mData.length; |
|
||||
if (len > 0 && mData[len - 1].id == s_pid) { |
|
||||
mData[len - 1].isParent = true; |
|
||||
} |
|
||||
mData.push(data[i]); |
|
||||
sort(data[i].id, data); |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
sort(param.treeSpid, tNodes); |
|
||||
|
|
||||
// 重写参数
|
|
||||
param.url = undefined; |
|
||||
param.data = mData; |
|
||||
param.page = { |
|
||||
count: param.data.length, |
|
||||
limit: param.data.length |
|
||||
}; |
|
||||
param.cols[0][param.treeColIndex].templet = function (d) { |
|
||||
var mId = d.id; |
|
||||
var mPid = d.pid; |
|
||||
var isDir = d.isParent; |
|
||||
var emptyNum = treetable.getEmptyNum(mPid, mData); |
|
||||
var iconHtml = ''; |
|
||||
for (var i = 0; i < emptyNum; i++) { |
|
||||
iconHtml += '<span class="treeTable-empty"></span>'; |
|
||||
} |
|
||||
if (isDir) { |
|
||||
iconHtml += '<i class="layui-icon layui-icon-triangle-d"></i> <i class="layui-icon layui-icon-layer"></i>'; |
|
||||
} else { |
|
||||
iconHtml += '<i class="layui-icon layui-icon-file"></i>'; |
|
||||
} |
|
||||
iconHtml += ' '; |
|
||||
var ttype = isDir ? 'dir' : 'file'; |
|
||||
var vg = '<span class="treeTable-icon open" lay-tid="' + mId + '" lay-tpid="' + mPid + '" lay-ttype="' + ttype + '">'; |
|
||||
return vg + iconHtml + d[param.cols[0][param.treeColIndex].field] + '</span>' |
|
||||
}; |
|
||||
|
|
||||
param.done = function (res, curr, count) { |
|
||||
$(param.elem).next().addClass('treeTable'); |
|
||||
$('.treeTable .layui-table-page').css('display', 'none'); |
|
||||
$(param.elem).next().attr('treeLinkage', param.treeLinkage); |
|
||||
// 绑定事件换成对body绑定
|
|
||||
/*$('.treeTable .treeTable-icon').click(function () { |
|
||||
treetable.toggleRows($(this), param.treeLinkage); |
|
||||
});*/ |
|
||||
if (param.treeDefaultClose) { |
|
||||
treetable.foldAll(param.elem); |
|
||||
} |
|
||||
if (doneCallback) { |
|
||||
doneCallback(res, curr, count); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
// 渲染表格
|
|
||||
table.render(param); |
|
||||
}, |
|
||||
// 计算缩进的数量
|
|
||||
getEmptyNum: function (pid, data) { |
|
||||
var num = 0; |
|
||||
if (!pid) { |
|
||||
return num; |
|
||||
} |
|
||||
var tPid; |
|
||||
for (var i = 0; i < data.length; i++) { |
|
||||
if (pid == data[i].id) { |
|
||||
num += 1; |
|
||||
tPid = data[i].pid; |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
return num + treetable.getEmptyNum(tPid, data); |
|
||||
}, |
|
||||
// 展开/折叠行
|
|
||||
toggleRows: function ($dom, linkage) { |
|
||||
var type = $dom.attr('lay-ttype'); |
|
||||
if ('file' == type) { |
|
||||
return; |
|
||||
} |
|
||||
var mId = $dom.attr('lay-tid'); |
|
||||
var isOpen = $dom.hasClass('open'); |
|
||||
if (isOpen) { |
|
||||
$dom.removeClass('open'); |
|
||||
} else { |
|
||||
$dom.addClass('open'); |
|
||||
} |
|
||||
$dom.closest('tbody').find('tr').each(function () { |
|
||||
var $ti = $(this).find('.treeTable-icon'); |
|
||||
var pid = $ti.attr('lay-tpid'); |
|
||||
var ttype = $ti.attr('lay-ttype'); |
|
||||
var tOpen = $ti.hasClass('open'); |
|
||||
if (mId == pid) { |
|
||||
if (isOpen) { |
|
||||
$(this).hide(); |
|
||||
if ('dir' == ttype && tOpen == isOpen) { |
|
||||
$ti.trigger('click'); |
|
||||
} |
|
||||
} else { |
|
||||
$(this).show(); |
|
||||
if (linkage && 'dir' == ttype && tOpen == isOpen) { |
|
||||
$ti.trigger('click'); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
// 检查参数
|
|
||||
checkParam: function (param) { |
|
||||
if (!param.treeSpid && param.treeSpid != 0) { |
|
||||
layer.msg('参数treeSpid不能为空', {icon: 5}); |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
if (!param.treeColIndex && param.treeColIndex != 0) { |
|
||||
layer.msg('参数treeColIndex不能为空', {icon: 5}); |
|
||||
return false; |
|
||||
} |
|
||||
return true; |
|
||||
}, |
|
||||
// 展开所有
|
|
||||
expandAll: function (dom) { |
|
||||
$(dom).next('.treeTable').find('.layui-table-body tbody tr').each(function () { |
|
||||
var $ti = $(this).find('.treeTable-icon'); |
|
||||
var ttype = $ti.attr('lay-ttype'); |
|
||||
var tOpen = $ti.hasClass('open'); |
|
||||
if ('dir' == ttype && !tOpen) { |
|
||||
$ti.trigger('click'); |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
// 折叠所有
|
|
||||
foldAll: function (dom) { |
|
||||
$(dom).next('.treeTable').find('.layui-table-body tbody tr').each(function () { |
|
||||
var $ti = $(this).find('.treeTable-icon'); |
|
||||
var ttype = $ti.attr('lay-ttype'); |
|
||||
var tOpen = $ti.hasClass('open'); |
|
||||
if ('dir' == ttype && tOpen) { |
|
||||
$ti.trigger('click'); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
layui.link(layui.cache.base + 'treetable-lay/treetable.css'); |
|
||||
|
|
||||
// 给图标列绑定事件
|
|
||||
$('body').on('click', '.treeTable .treeTable-icon', function () { |
|
||||
var treeLinkage = $(this).parents('.treeTable').attr('treeLinkage'); |
|
||||
if ('true' == treeLinkage) { |
|
||||
treetable.toggleRows($(this), true); |
|
||||
} else { |
|
||||
treetable.toggleRows($(this), false); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
exports('treetable', treetable); |
|
||||
}); |
|
||||
@ -1,5 +0,0 @@ |
|||||
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl |
|
||||
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
|
|
||||
* */ |
|
||||
|
|
||||
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this); |
|
||||
@ -1,84 +0,0 @@ |
|||||
(function(){var E;var g=window,n=document,p=function(a){var b=g._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===g["ga-disable-"+a])return!0;try{var c=g.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(f){}a=[];b=n.cookie.split(";");c=/^\s*AMP_TOKEN=\s*(.*?)\s*$/;for(var d=0;d<b.length;d++){var e=b[d].match(c);e&&a.push(e[1])}for(b=0;b<a.length;b++)if("$OPT_OUT"==decodeURIComponent(a[b]))return!0;return!1};var q=function(a){return encodeURIComponent?encodeURIComponent(a).replace(/\(/g,"%28").replace(/\)/g,"%29"):a},r=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,u=/(^|\.)doubleclick\.net$/i;function Aa(a,b){switch(b){case 0:return""+a;case 1:return 1*a;case 2:return!!a;case 3:return 1E3*a}return a}function Ba(a){return"function"==typeof a}function Ca(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")}function F(a,b){return void 0==a||"-"==a&&!b||""==a}function Da(a){if(!a||""==a)return"";for(;a&&-1<" \n\r\t".indexOf(a.charAt(0));)a=a.substring(1);for(;a&&-1<" \n\r\t".indexOf(a.charAt(a.length-1));)a=a.substring(0,a.length-1);return a} |
|
||||
function Ea(){return Math.round(2147483647*Math.random())}function Fa(){}function G(a,b){if(encodeURIComponent instanceof Function)return b?encodeURI(a):encodeURIComponent(a);H(68);return escape(a)}function I(a){a=a.split("+").join(" ");if(decodeURIComponent instanceof Function)try{return decodeURIComponent(a)}catch(b){H(17)}else H(68);return unescape(a)}var Ga=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)}; |
|
||||
function Ia(a,b){if(a){var c=J.createElement("script");c.type="text/javascript";c.async=!0;c.src=a;c.id=b;a=J.getElementsByTagName("script")[0];a.parentNode.insertBefore(c,a);return c}}function K(a){return a&&0<a.length?a[0]:""}function L(a){var b=a?a.length:0;return 0<b?a[b-1]:""}var nf=function(){this.prefix="ga.";this.values={}};nf.prototype.set=function(a,b){this.values[this.prefix+a]=b};nf.prototype.get=function(a){return this.values[this.prefix+a]}; |
|
||||
nf.prototype.contains=function(a){return void 0!==this.get(a)};function Ka(a){0==a.indexOf("www.")&&(a=a.substring(4));return a.toLowerCase()} |
|
||||
function La(a,b){var c={url:a,protocol:"http",host:"",path:"",R:new nf,anchor:""};if(!a)return c;var d=a.indexOf("://");0<=d&&(c.protocol=a.substring(0,d),a=a.substring(d+3));d=a.search("/|\\?|#");if(0<=d)c.host=a.substring(0,d).toLowerCase(),a=a.substring(d);else return c.host=a.toLowerCase(),c;d=a.indexOf("#");0<=d&&(c.anchor=a.substring(d+1),a=a.substring(0,d));d=a.indexOf("?");0<=d&&(Na(c.R,a.substring(d+1)),a=a.substring(0,d));c.anchor&&b&&Na(c.R,c.anchor);a&&"/"==a.charAt(0)&&(a=a.substring(1)); |
|
||||
c.path=a;return c} |
|
||||
function Oa(a,b){function c(a){var b=(a.hostname||"").split(":")[0].toLowerCase(),c=(a.protocol||"").toLowerCase();c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";0==a.indexOf("/")||(a="/"+a);return[b,""+c,a]}b=b||J.createElement("a");b.href=J.location.href;var d=(b.protocol||"").toLowerCase(),e=c(b),f=b.search||"",Be=d+"//"+e[0]+(e[1]?":"+e[1]:"");0==a.indexOf("//")?a=d+a:0==a.indexOf("/")?a=Be+a:a&&0!=a.indexOf("?")?0>a.split("/")[0].indexOf(":")&&(a=Be+e[2].substring(0,e[2].lastIndexOf("/"))+ |
|
||||
"/"+a):a=Be+e[2]+(a||f);b.href=a;d=c(b);return{protocol:(b.protocol||"").toLowerCase(),host:d[0],port:d[1],path:d[2],query:b.search||"",url:a||""}}function Na(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b).push(c)}b=Da(b).split("&");for(var d=0;d<b.length;d++)if(b[d]){var e=b[d].indexOf("=");0>e?c(b[d],"1"):c(b[d].substring(0,e),b[d].substring(e+1))}} |
|
||||
function Pa(a,b){return F(a)||"["==a.charAt(0)&&"]"==a.charAt(a.length-1)?"-":a.indexOf(J.domain+(b&&"/"!=b?b:""))==(0==a.indexOf("http://")?7:0==a.indexOf("https://")?8:0)?"0":a};var Qa=0;function Ra(a,b,c){1<=Qa||1<=100*Math.random()||ld()||(a=["utmt=error","utmerr="+a,"utmwv=5.7.2","utmn="+Ea(),"utmsp=1"],b&&a.push("api="+b),c&&a.push("msg="+G(c.substring(0,100))),M.w&&a.push("aip=1"),Sa(a.join("&")),Qa++)};var Ta=0,Ua={};function N(a){return Va("x"+Ta++,a)}function Va(a,b){Ua[a]=!!b;return a} |
|
||||
var Wa=N(),Xa=Va("anonymizeIp"),Ya=N(),$a=N(),ab=N(),bb=N(),O=N(),P=N(),cb=N(),db=N(),eb=N(),fb=N(),gb=N(),hb=N(),ib=N(),jb=N(),kb=N(),lb=N(),nb=N(),ob=N(),pb=N(),qb=N(),rb=N(),sb=N(),tb=N(),ub=N(),vb=N(),wb=N(),xb=N(),yb=N(),zb=N(),Ab=N(),Bb=N(),Cb=N(),Db=N(),Eb=N(),Fb=N(!0),Gb=Va("currencyCode"),v=Va("storeGac"),Hb=Va("page"),Ib=Va("title"),Jb=N(),Kb=N(),Lb=N(),Mb=N(),Nb=N(),Ob=N(),Pb=N(),Qb=N(),Rb=N(),Q=N(!0),Sb=N(!0),Tb=N(!0),Ub=N(!0),Vb=N(!0),Wb=N(!0),Zb=N(!0),$b=N(!0),ac=N(!0),bc=N(!0),cc=N(!0), |
|
||||
R=N(!0),dc=N(!0),ec=N(!0),fc=N(!0),gc=N(!0),hc=N(!0),ic=N(!0),jc=N(!0),S=N(!0),kc=N(!0),lc=N(!0),mc=N(!0),nc=N(!0),oc=N(!0),pc=N(!0),qc=N(!0),rc=Va("campaignParams"),sc=N(),tc=Va("hitCallback"),uc=N();N();var vc=N(),wc=N(),xc=N(),yc=N(),zc=N(),Ac=N(),Bc=N(),Cc=N(),Dc=N(),Ec=N(),Fc=N(),Gc=N(),Hc=N(),Ic=N();N(); |
|
||||
var Mc=N(),Nc=N(),Yb=N(),Jc=N(),Kc=N(),Lc=Va("utmtCookieName"),Cd=Va("displayFeatures"),Oc=N(),of=Va("gtmid"),Oe=Va("uaName"),Pe=Va("uaDomain"),Qe=Va("uaPath"),pf=Va("linkid"),w=N(),x=N(),y=N(),z=N();var Re=function(){function a(a,c,d){T(qf.prototype,a,c,d)}a("_createTracker",qf.prototype.hb,55);a("_getTracker",qf.prototype.oa,0);a("_getTrackerByName",qf.prototype.u,51);a("_getTrackers",qf.prototype.pa,130);a("_anonymizeIp",qf.prototype.aa,16);a("_forceSSL",qf.prototype.la,125);a("_getPlugin",Pc,120)},Se=function(){function a(a,c,d){T(U.prototype,a,c,d)}Qc("_getName",$a,58);Qc("_getAccount",Wa,64);Qc("_visitCode",Q,54);Qc("_getClientInfo",ib,53,1);Qc("_getDetectTitle",lb,56,1);Qc("_getDetectFlash", |
|
||||
jb,65,1);Qc("_getLocalGifPath",wb,57);Qc("_getServiceMode",xb,59);V("_setClientInfo",ib,66,2);V("_setAccount",Wa,3);V("_setNamespace",Ya,48);V("_setAllowLinker",fb,11,2);V("_setDetectFlash",jb,61,2);V("_setDetectTitle",lb,62,2);V("_setLocalGifPath",wb,46,0);V("_setLocalServerMode",xb,92,void 0,0);V("_setRemoteServerMode",xb,63,void 0,1);V("_setLocalRemoteServerMode",xb,47,void 0,2);V("_setSampleRate",vb,45,1);V("_setCampaignTrack",kb,36,2);V("_setAllowAnchor",gb,7,2);V("_setCampNameKey",ob,41);V("_setCampContentKey", |
|
||||
tb,38);V("_setCampIdKey",nb,39);V("_setCampMediumKey",rb,40);V("_setCampNOKey",ub,42);V("_setCampSourceKey",qb,43);V("_setCampTermKey",sb,44);V("_setCampCIdKey",pb,37);V("_setCookiePath",P,9,0);V("_setMaxCustomVariables",yb,0,1);V("_setVisitorCookieTimeout",cb,28,1);V("_setSessionCookieTimeout",db,26,1);V("_setCampaignCookieTimeout",eb,29,1);V("_setReferrerOverride",Jb,49);V("_setSiteSpeedSampleRate",Dc,132);V("_storeGac",v,143);a("_trackPageview",U.prototype.Fa,1);a("_trackEvent",U.prototype.F,4); |
|
||||
a("_trackPageLoadTime",U.prototype.Ea,100);a("_trackSocial",U.prototype.Ga,104);a("_trackTrans",U.prototype.Ia,18);a("_sendXEvent",U.prototype.ib,78);a("_createEventTracker",U.prototype.ia,74);a("_getVersion",U.prototype.qa,60);a("_setDomainName",U.prototype.B,6);a("_setAllowHash",U.prototype.va,8);a("_getLinkerUrl",U.prototype.na,52);a("_link",U.prototype.link,101);a("_linkByPost",U.prototype.ua,102);a("_setTrans",U.prototype.za,20);a("_addTrans",U.prototype.$,21);a("_addItem",U.prototype.Y,19); |
|
||||
a("_clearTrans",U.prototype.ea,105);a("_setTransactionDelim",U.prototype.Aa,82);a("_setCustomVar",U.prototype.wa,10);a("_deleteCustomVar",U.prototype.ka,35);a("_getVisitorCustomVar",U.prototype.ra,50);a("_setXKey",U.prototype.Ca,83);a("_setXValue",U.prototype.Da,84);a("_getXKey",U.prototype.sa,76);a("_getXValue",U.prototype.ta,77);a("_clearXKey",U.prototype.fa,72);a("_clearXValue",U.prototype.ga,73);a("_createXObj",U.prototype.ja,75);a("_addIgnoredOrganic",U.prototype.W,15);a("_clearIgnoredOrganic", |
|
||||
U.prototype.ba,97);a("_addIgnoredRef",U.prototype.X,31);a("_clearIgnoredRef",U.prototype.ca,32);a("_addOrganic",U.prototype.Z,14);a("_clearOrganic",U.prototype.da,70);a("_cookiePathCopy",U.prototype.ha,30);a("_get",U.prototype.ma,106);a("_set",U.prototype.xa,107);a("_addEventListener",U.prototype.addEventListener,108);a("_removeEventListener",U.prototype.removeEventListener,109);a("_addDevId",U.prototype.V);a("_getPlugin",Pc,122);a("_setPageGroup",U.prototype.ya,126);a("_trackTiming",U.prototype.Ha, |
|
||||
124);a("_initData",U.prototype.initData,2);a("_setVar",U.prototype.Ba,22);V("_setSessionTimeout",db,27,3);V("_setCookieTimeout",eb,25,3);V("_setCookiePersistence",cb,24,1);a("_setAutoTrackOutbound",Fa,79);a("_setTrackOutboundSubdomains",Fa,81);a("_setHrefExamineLimit",Fa,80)};function Pc(a){var b=this.plugins_;if(b)return b.get(a)} |
|
||||
var T=function(a,b,c,d){a[b]=function(){try{return void 0!=d&&H(d),c.apply(this,arguments)}catch(e){throw Ra("exc",b,e&&e.name),e;}}},Qc=function(a,b,c,d){U.prototype[a]=function(){try{return H(c),Aa(this.a.get(b),d)}catch(e){throw Ra("exc",a,e&&e.name),e;}}},V=function(a,b,c,d,e){U.prototype[a]=function(f){try{H(c),void 0==e?this.a.set(b,Aa(f,d)):this.a.set(b,e)}catch(Be){throw Ra("exc",a,Be&&Be.name),Be;}}},Te=function(a,b){return{type:b,target:a,stopPropagation:function(){throw"aborted";}}};var Rc=new RegExp(/(^|\.)doubleclick\.net$/i),Sc=function(a,b){return Rc.test(J.location.hostname)?!0:"/"!==b?!1:0!=a.indexOf("www.google.")&&0!=a.indexOf(".google.")&&0!=a.indexOf("google.")||-1<a.indexOf("google.org")?!1:!0},Tc=function(a){var b=a.get(bb),c=a.c(P,"/");Sc(b,c)&&a.stopPropagation()};var Zc=function(){var a={},b={},c=new Uc;this.g=function(a,b){c.add(a,b)};var d=new Uc;this.v=function(a,b){d.add(a,b)};var e=!1,f=!1,Be=!0;this.T=function(){e=!0};this.j=function(a){this.load();this.set(sc,a,!0);a=new Vc(this);e=!1;d.cb(this);e=!0;b={};this.store();a.Ja()};this.load=function(){e&&(e=!1,this.Ka(),Wc(this),f||(f=!0,c.cb(this),Xc(this),Wc(this)),e=!0)};this.store=function(){e&&(f?(e=!1,Xc(this),e=!0):this.load())};this.get=function(c){Ua[c]&&this.load();return void 0!==b[c]?b[c]:a[c]}; |
|
||||
this.set=function(c,d,e){Ua[c]&&this.load();e?b[c]=d:a[c]=d;Ua[c]&&this.store()};this.Za=function(b){a[b]=this.b(b,0)+1};this.b=function(a,b){a=this.get(a);return void 0==a||""===a?b:1*a};this.c=function(a,b){a=this.get(a);return void 0==a?b:a+""};this.Ka=function(){if(Be){var b=this.c(bb,""),c=this.c(P,"/");Sc(b,c)||(a[O]=a[hb]&&""!=b?Yc(b):1,Be=!1)}}};Zc.prototype.stopPropagation=function(){throw"aborted";}; |
|
||||
var Vc=function(a){var b=this;this.fb=0;var c=a.get(tc);this.Ua=function(){0<b.fb&&c&&(b.fb--,b.fb||c())};this.Ja=function(){!b.fb&&c&&setTimeout(c,10)};a.set(uc,b,!0)};function $c(a,b){b=b||[];for(var c=0;c<b.length;c++){var d=b[c];if(""+a==d||0==d.indexOf(a+"."))return d}return"-"} |
|
||||
var bd=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(6!==b.length||ad(b[0],c))return!1;c=1*b[1];var d=1*b[2],e=1*b[3],f=1*b[4];b=1*b[5];if(!(0<=c&&0<d&&0<e&&0<f&&0<=b))return!1;a.set(Q,c);a.set(Vb,d);a.set(Wb,e);a.set(Zb,f);a.set($b,b);return!0},cd=function(a){var b=a.get(Q),c=a.get(Vb),d=a.get(Wb),e=a.get(Zb),f=a.b($b,1);return[a.b(O,1),void 0!=b?b:"-",c||"-",d||"-",e||"-",f].join(".")},dd=function(a){return[a.b(O,1),a.b(cc,0),a.b(R,1),a.b(dc,0)].join(".")},ed=function(a,b,c){c=c?"":a.c(O, |
|
||||
"1");var d=b.split(".");if(4!==d.length||ad(d[0],c))d=null;a.set(cc,d?1*d[1]:0);a.set(R,d?1*d[2]:10);a.set(dc,d?1*d[3]:a.get(ab));return null!=d||!ad(b,c)},fd=function(a,b){var c=G(a.c(Tb,"")),d=[],e=a.get(Fb);if(!b&&e){for(b=0;b<e.length;b++){var f=e[b];f&&1==f.scope&&d.push(b+"="+G(f.name)+"="+G(f.value)+"=1")}0<d.length&&(c+="|"+d.join("^"))}return c?a.b(O,1)+"."+c:null},gd=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(2>b.length||ad(b[0],c))return!1;b=b.slice(1).join(".").split("|");0<b.length&& |
|
||||
a.set(Tb,I(b[0]));if(1>=b.length)return!0;b=b[1].split(-1==b[1].indexOf(",")?"^":",");for(c=0;c<b.length;c++){var d=b[c].split("=");if(4==d.length){var e={};e.name=I(d[1]);e.value=I(d[2]);e.scope=1;a.get(Fb)[d[0]]=e}}return!0},hd=function(a,b){return(b=Ue(a,b))?[a.b(O,1),a.b(ec,0),a.b(fc,1),a.b(gc,1),b].join("."):""},Ue=function(a){function b(b,e){F(a.get(b))||(b=a.c(b,""),b=b.split(" ").join("%20"),b=b.split("+").join("%20"),c.push(e+"="+b))}var c=[];b(ic,"utmcid");b(nc,"utmcsr");b(S,"utmgclid"); |
|
||||
b(kc,"utmgclsrc");b(lc,"utmdclid");b(mc,"utmdsid");b(jc,"utmccn");b(oc,"utmcmd");b(pc,"utmctr");b(qc,"utmcct");return c.join("|")},id=function(a,b,c){c=c?"":a.c(O,"1");b=b.split(".");if(5>b.length||ad(b[0],c))return a.set(ec,void 0),a.set(fc,void 0),a.set(gc,void 0),a.set(ic,void 0),a.set(jc,void 0),a.set(nc,void 0),a.set(oc,void 0),a.set(pc,void 0),a.set(qc,void 0),a.set(S,void 0),a.set(kc,void 0),a.set(lc,void 0),a.set(mc,void 0),!1;a.set(ec,1*b[1]);a.set(fc,1*b[2]);a.set(gc,1*b[3]);Ve(a,b.slice(4).join(".")); |
|
||||
return!0},Ve=function(a,b){function c(a){return(a=b.match(a+"=(.*?)(?:\\|utm|$)"))&&2==a.length?a[1]:void 0}function d(b,c){c?(c=e?I(c):c.split("%20").join(" "),a.set(b,c)):a.set(b,void 0)}-1==b.indexOf("=")&&(b=I(b));var e="2"==c("utmcvr");d(ic,c("utmcid"));d(jc,c("utmccn"));d(nc,c("utmcsr"));d(oc,c("utmcmd"));d(pc,c("utmctr"));d(qc,c("utmcct"));d(S,c("utmgclid"));d(kc,c("utmgclsrc"));d(lc,c("utmdclid"));d(mc,c("utmdsid"))},ad=function(a,b){return b?a!=b:!/^\d+$/.test(a)};var Uc=function(){this.filters=[]};Uc.prototype.add=function(a,b){this.filters.push({name:a,s:b})};Uc.prototype.cb=function(a){try{for(var b=0;b<this.filters.length;b++)this.filters[b].s.call(W,a)}catch(c){}};function jd(a){100!=a.get(vb)&&a.get(Q)%1E4>=100*a.get(vb)&&a.stopPropagation()}function kd(a){ld(a.get(Wa))&&a.stopPropagation()}function md(a){"file:"==J.location.protocol&&a.stopPropagation()}function Ge(a){He()&&a.stopPropagation()} |
|
||||
function nd(a){a.get(Ib)||a.set(Ib,J.title,!0);a.get(Hb)||a.set(Hb,J.location.pathname+J.location.search,!0)}function lf(a){a.get(Wa)&&"UA-XXXXX-X"!=a.get(Wa)||a.stopPropagation()};var od=new function(){var a=[];this.set=function(b){a[b]=!0};this.encode=function(){for(var b=[],c=0;c<a.length;c++)a[c]&&(b[Math.floor(c/6)]^=1<<c%6);for(c=0;c<b.length;c++)b[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(b[c]||0);return b.join("")+"~"}};function H(a){od.set(a)};var W=window,J=document,ld=function(a){var b=W._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===W["ga-disable-"+a])return!0;try{var c=W.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(d){}return!1},He=function(){return W.navigator&&"preview"==W.navigator.loadPurpose},We=function(a,b){setTimeout(a,b)},pd=function(a){var b=[],c=J.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},X=function(a,b,c,d,e,f){e= |
|
||||
ld(e)?!1:Sc(d,c)?!1:He()?!1:!0;e&&((b=mf(b))&&2E3<b.length&&(b=b.substring(0,2E3),H(69)),a=a+"="+b+"; path="+c+"; ",f&&(a+="expires="+(new Date((new Date).getTime()+f)).toGMTString()+"; "),d&&(a+="domain="+d+";"),J.cookie=a)},mf=function(a){if(!a)return a;var b=a.indexOf(";");-1!=b&&(a=a.substring(0,b),H(141));if(!(0<=W.navigator.userAgent.indexOf("Firefox")))return a;a=a.replace(/\n|\r/g," ");b=0;for(var c=a.length;b<c;++b){var d=a.charCodeAt(b)&255;if(10==d||13==d)a=a.substring(0,b)+"?"+a.substring(b+ |
|
||||
1)}return a};var A,B=/^.*Version\/?(\d+)[^\d].*$/i;var qd,rd,sd=function(){if(!qd){var a={},b=W.navigator,c=W.screen;a.jb=c?c.width+"x"+c.height:"-";a.P=c?c.colorDepth+"-bit":"-";a.language=(b&&(b.language||b.browserLanguage)||"-").toLowerCase();a.javaEnabled=b&&b.javaEnabled()?1:0;a.characterSet=J.characterSet||J.charset||"-";try{var d=J.documentElement,e=J.body,f=e&&e.clientWidth&&e.clientHeight;b=[];d&&d.clientWidth&&d.clientHeight&&("CSS1Compat"===J.compatMode||!f)?b=[d.clientWidth,d.clientHeight]:f&&(b=[e.clientWidth,e.clientHeight]);var Be= |
|
||||
0>=b[0]||0>=b[1]?"":b.join("x");a.Wa=Be}catch(k){H(135)}qd=a}},td=function(){sd();var a=qd,b=W.navigator;a=b.appName+b.version+a.language+b.platform+b.userAgent+a.javaEnabled+a.jb+a.P+(J.cookie?J.cookie:"")+(J.referrer?J.referrer:"");b=a.length;for(var c=W.history.length;0<c;)a+=c--^b++;return Yc(a)},ud=function(a){sd();var b=qd;a.set(Lb,b.jb);a.set(Mb,b.P);a.set(Pb,b.language);a.set(Qb,b.characterSet);a.set(Nb,b.javaEnabled);a.set(Rb,b.Wa);if(a.get(ib)&&a.get(jb)){if(!(b=rd)){var c,d;var e="ShockwaveFlash"; |
|
||||
if((b=(b=W.navigator)?b.plugins:void 0)&&0<b.length)for(c=0;c<b.length&&!d;c++)e=b[c],-1<e.name.indexOf("Shockwave Flash")&&(d=e.description.split("Shockwave Flash ")[1]);else{e=e+"."+e;try{c=new ActiveXObject(e+".7"),d=c.GetVariable("$version")}catch(f){}if(!d)try{c=new ActiveXObject(e+".6"),d="WIN 6,0,21,0",c.AllowScriptAccess="always",d=c.GetVariable("$version")}catch(f){}if(!d)try{c=new ActiveXObject(e),d=c.GetVariable("$version")}catch(f){}d&&(d=d.split(" ")[1].split(","),d=d[0]+"."+d[1]+" r"+ |
|
||||
d[2])}b=d?d:"-"}rd=b;a.set(Ob,rd)}else a.set(Ob,"-")};var vd=function(a){if(Ba(a))this.s=a;else{var b=a[0],c=b.lastIndexOf(":"),d=b.lastIndexOf(".");this.h=this.i=this.l="";-1==c&&-1==d?this.h=b:-1==c&&-1!=d?(this.i=b.substring(0,d),this.h=b.substring(d+1)):-1!=c&&-1==d?(this.l=b.substring(0,c),this.h=b.substring(c+1)):c>d?(this.i=b.substring(0,d),this.l=b.substring(d+1,c),this.h=b.substring(c+1)):(this.i=b.substring(0,d),this.h=b.substring(d+1));this.Xa=a.slice(1);this.Ma=!this.l&&"_require"==this.h;this.J=!this.i&&!this.l&&"_provide"==this.h}},Y=function(){T(Y.prototype, |
|
||||
"push",Y.prototype.push,5);T(Y.prototype,"_getPlugin",Pc,121);T(Y.prototype,"_createAsyncTracker",Y.prototype.Sa,33);T(Y.prototype,"_getAsyncTracker",Y.prototype.Ta,34);this.I=new nf;this.eb=[]};E=Y.prototype;E.Na=function(a,b,c){var d=this.I.get(a);if(!Ba(d))return!1;b.plugins_=b.plugins_||new nf;b.plugins_.set(a,new d(b,c||{}));return!0};E.push=function(a){var b=Z.Va.apply(this,arguments);b=Z.eb.concat(b);for(Z.eb=[];0<b.length&&!Z.O(b[0])&&!(b.shift(),0<Z.eb.length););Z.eb=Z.eb.concat(b);return 0}; |
|
||||
E.Va=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new vd(arguments[c]);d.J?this.O(d):b.push(d)}catch(e){}return b}; |
|
||||
E.O=function(a){try{if(a.s)a.s.apply(W);else if(a.J)this.I.set(a.Xa[0],a.Xa[1]);else{var b="_gat"==a.i?M:"_gaq"==a.i?Z:M.u(a.i);if(a.Ma){if(!this.Na(a.Xa[0],b,a.Xa[2])){if(!a.Pa){var c=Oa(""+a.Xa[1]);var d=c.protocol,e=J.location.protocol;var f;if(f="https:"==d||d==e?!0:"http:"!=d?!1:"http:"==e)a:{var Be=Oa(J.location.href);if(!(c.query||0<=c.url.indexOf("?")||0<=c.path.indexOf("://")||c.host==Be.host&&c.port==Be.port)){var k="http:"==c.protocol?80:443,Ja=M.S;for(b=0;b<Ja.length;b++)if(c.host==Ja[b][0]&& |
|
||||
(c.port||k)==(Ja[b][1]||k)&&0==c.path.indexOf(Ja[b][2])){f=!0;break a}}f=!1}f&&!ld()&&(a.Pa=Ia(c.url))}return!0}}else a.l&&(b=b.plugins_.get(a.l)),b[a.h].apply(b,a.Xa)}}catch(t){}};E.Sa=function(a,b){return M.hb(a,b||"")};E.Ta=function(a){return M.u(a)};var yd=function(){function a(a,b,c,d){void 0==f[a]&&(f[a]={});void 0==f[a][b]&&(f[a][b]=[]);f[a][b][c]=d}function b(a,b,c){if(void 0!=f[a]&&void 0!=f[a][b])return f[a][b][c]}function c(a,b){if(void 0!=f[a]&&void 0!=f[a][b]){f[a][b]=void 0;b=!0;var c;for(c=0;c<Be.length;c++)if(void 0!=f[a][Be[c]]){b=!1;break}b&&(f[a]=void 0)}}function d(a){var b="",c=!1,d;for(d=0;d<Be.length;d++){var e=a[Be[d]];if(void 0!=e){c&&(b+=Be[d]);var f=e,Ja=[];for(e=0;e<f.length;e++)if(void 0!=f[e]){c="";1!=e&&void 0==f[e- |
|
||||
1]&&(c+=e.toString()+"!");var fa,Ke=f[e],Le="";for(fa=0;fa<Ke.length;fa++){var Me=Ke.charAt(fa);var m=k[Me];Le+=void 0!=m?m:Me}c+=Le;Ja.push(c)}b+="("+Ja.join("*")+")";c=!1}else c=!0}return b}var e=this,f=[],Be=["k","v"],k={"'":"'0",")":"'1","*":"'2","!":"'3"};e.Ra=function(a){return void 0!=f[a]};e.A=function(){for(var a="",b=0;b<f.length;b++)void 0!=f[b]&&(a+=b.toString()+d(f[b]));return a};e.Qa=function(a){if(void 0==a)return e.A();for(var b=a.A(),c=0;c<f.length;c++)void 0==f[c]||a.Ra(c)||(b+= |
|
||||
c.toString()+d(f[c]));return b};e.f=function(b,c,d){if(!wd(d))return!1;a(b,"k",c,d);return!0};e.o=function(b,c,d){if(!xd(d))return!1;a(b,"v",c,d.toString());return!0};e.getKey=function(a,c){return b(a,"k",c)};e.N=function(a,c){return b(a,"v",c)};e.L=function(a){c(a,"k")};e.M=function(a){c(a,"v")};T(e,"_setKey",e.f,89);T(e,"_setValue",e.o,90);T(e,"_getKey",e.getKey,87);T(e,"_getValue",e.N,88);T(e,"_clearKey",e.L,85);T(e,"_clearValue",e.M,86)};function wd(a){return"string"==typeof a} |
|
||||
function xd(a){return!("number"==typeof a||void 0!=Number&&a instanceof Number)||Math.round(a)!=a||isNaN(a)||Infinity==a?!1:!0};var zd=function(a){var b=W.gaGlobal;a&&!b&&(W.gaGlobal=b={});return b},Ad=function(){var a=zd(!0).hid;null==a&&(a=Ea(),zd(!0).hid=a);return a},Dd=function(a){a.set(Kb,Ad());var b=zd();if(b&&b.dh==a.get(O)){var c=b.sid;c&&(a.get(ac)?H(112):H(132),a.set(Zb,c),a.get(Sb)&&a.set(Wb,c));b=b.vid;a.get(Sb)&&b&&(b=b.split("."),a.set(Q,1*b[0]),a.set(Vb,1*b[1]))}};var Ed,Fd=function(a,b,c,d){var e=a.c(bb,""),f=a.c(P,"/");d=void 0!=d?d:a.b(cb,0);a=a.c(Wa,"");X(b,c,f,e,a,d)},Xc=function(a){var b=a.c(bb,""),c=a.c(P,"/"),d=a.c(Wa,"");X("__utma",cd(a),c,b,d,a.get(cb));X("__utmb",dd(a),c,b,d,a.get(db));X("__utmc",""+a.b(O,1),c,b,d);var e=hd(a,!0);e?X("__utmz",e,c,b,d,a.get(eb)):X("__utmz","",c,b,"",-1);(e=fd(a,!1))?X("__utmv",e,c,b,d,a.get(cb)):X("__utmv","",c,b,"",-1);if(1==a.get(v)&&(e=a.get(w))){var f=a.get(x);b=a.c(bb,"");c=a.c(P,"/");d=a.c(Wa,"");var Be=a.b(y, |
|
||||
0);a=Math.min(a.b(cb,7776E6),a.b(eb,7776E6),7776E6);a=Math.min(a,1E3*Be+a-(new Date).getTime());if(!f||"aw.ds"==f)if(f=["1",Be+"",q(e)].join("."),0<a&&(e="_gac_"+q(d),!(p(d)||u.test(J.location.hostname)||"/"==c&&r.test(b))&&((d=f)&&1200<d.length&&(d=d.substring(0,1200)),c=e+"="+d+"; path="+c+"; ",a&&(c+="expires="+(new Date((new Date).getTime()+a)).toGMTString()+"; "),b&&"none"!==b&&(c+="domain="+b+";"),b=J.cookie,J.cookie=c,b==J.cookie)))for(b=[],c=J.cookie.split(";"),a=new RegExp("^\\s*"+e+"=\\s*(.*?)\\s*$"), |
|
||||
d=0;d<c.length;d++)(e=c[d].match(a))&&b.push(e[1])}},Wc=function(a){var b=a.b(O,1);if(!bd(a,$c(b,pd("__utma"))))return a.set(Ub,!0),!1;var c=!ed(a,$c(b,pd("__utmb")));a.set(bc,c);id(a,$c(b,pd("__utmz")));gd(a,$c(b,pd("__utmv")));if(1==a.get(v)){b=a.get(w);var d=a.get(x);if(!b||d&&"aw.ds"!=d){if(J){b=[];d=J.cookie.split(";");for(var e=/^\s*_gac_(UA-\d+-\d+)=\s*(.+?)\s*$/,f=0;f<d.length;f++){var Be=d[f].match(e);Be&&b.push({Oa:Be[1],value:Be[2]})}d={};if(b&&b.length)for(e=0;e<b.length;e++)f=b[e].value.split("."), |
|
||||
"1"==f[0]&&3==f.length&&f[1]&&(d[b[e].Oa]||(d[b[e].Oa]=[]),d[b[e].Oa].push({timestamp:f[1],kb:f[2]}));b=d}else b={};(b=b[a.get(Wa)])&&0<b.length&&(b=b[0],a.set(y,b.timestamp),a.set(w,b.kb),a.set(x,void 0))}}Ed=!c;return!0},Gd=function(a){Ed||0<pd("__utmb").length||(X("__utmd","1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),1E4),0==pd("__utmd").length&&a.stopPropagation())};var h=0,Jd=function(a){void 0==a.get(Q)?Hd(a):a.get(Ub)&&!a.get(Mc)?Hd(a):a.get(bc)&&Id(a)},Kd=function(a){a.get(hc)&&!a.get(ac)&&(Id(a),a.set(fc,a.get($b)))},Hd=function(a){h++;1<h&&H(137);var b=a.get(ab);a.set(Sb,!0);a.set(Q,Ea()^td(a)&2147483647);a.set(Tb,"");a.set(Vb,b);a.set(Wb,b);a.set(Zb,b);a.set($b,1);a.set(ac,!0);a.set(cc,0);a.set(R,10);a.set(dc,b);a.set(Fb,[]);a.set(Ub,!1);a.set(bc,!1)},Id=function(a){h++;1<h&&H(137);a.set(Wb,a.get(Zb));a.set(Zb,a.get(ab));a.Za($b);a.set(ac,!0);a.set(cc, |
|
||||
0);a.set(R,10);a.set(dc,a.get(ab));a.set(bc,!1)};var Ld="daum:q eniro:search_word naver:query pchome:q images.google:q google:q yahoo:p yahoo:q msn:q bing:q aol:query aol:q lycos:q lycos:query ask:q cnn:query virgilio:qs baidu:wd baidu:word alice:qs yandex:text najdi:q seznam:q rakuten:qt biglobe:q goo.ne:MT search.smt.docomo:MT onet:qt onet:q kvasir:q terra:query rambler:query conduit:q babylon:q search-results:q avg:q comcast:q incredimail:q startsiden:q go.mail.ru:q centrum.cz:q 360.cn:q sogou:query tut.by:query globo:q ukr:q so.com:q haosou.com:q auone:q".split(" "), |
|
||||
Sd=function(a){if(a.get(kb)&&!a.get(Mc)){var b=!F(a.get(ic))||!F(a.get(nc))||!F(a.get(S))||!F(a.get(lc));for(var c={},d=0;d<Md.length;d++){var e=Md[d];c[e]=a.get(e)}(d=a.get(rc))?(H(149),e=new nf,Na(e,d),d=e):d=La(J.location.href,a.get(gb)).R;if("1"!=L(d.get(a.get(ub)))||!b)if(d=Xe(a,d)||Qd(a),d||b||!a.get(ac)||(Pd(a,void 0,"(direct)",void 0,void 0,void 0,"(direct)","(none)",void 0,void 0),d=!0),d&&(a.set(hc,Rd(a,c)),b="(direct)"==a.get(nc)&&"(direct)"==a.get(jc)&&"(none)"==a.get(oc),a.get(hc)||a.get(ac)&& |
|
||||
!b))a.set(ec,a.get(ab)),a.set(fc,a.get($b)),a.Za(gc)}},Xe=function(a,b){function c(c,d){d=d||"-";return(c=L(b.get(a.get(c))))&&"-"!=c?I(c):d}var d=L(b.get(a.get(nb)))||"-",e=L(b.get(a.get(qb)))||"-",f=L(b.get(a.get(pb)))||"-",Be=L(b.get("gclsrc"))||"-",k=L(b.get("dclid"))||"-";"-"!=f&&a.set(w,f);"-"!=Be&&a.set(x,Be);var Ja=c(ob,"(not set)"),t=c(rb,"(not set)"),Za=c(sb),Ma=c(tb);if(F(d)&&F(f)&&F(k)&&F(e))return!1;var mb=!F(f)&&!F(Be);mb=F(e)&&(!F(k)||mb);var Xb=F(Za);if(mb||Xb){var Bd=Nd(a);Bd=La(Bd, |
|
||||
!0);(Bd=Od(a,Bd))&&!F(Bd[1]&&!Bd[2])&&(mb&&(e=Bd[0]),Xb&&(Za=Bd[1]))}Pd(a,d,e,f,Be,k,Ja,t,Za,Ma);return!0},Qd=function(a){var b=Nd(a),c=La(b,!0);(b=!(void 0!=b&&null!=b&&""!=b&&"0"!=b&&"-"!=b&&0<=b.indexOf("://")))||(b=c&&-1<c.host.indexOf("google")&&c.R.contains("q")&&"cse"==c.path);if(b)return!1;if((b=Od(a,c))&&!b[2])return Pd(a,void 0,b[0],void 0,void 0,void 0,"(organic)","organic",b[1],void 0),!0;if(b||!a.get(ac))return!1;a:{b=a.get(Bb);for(var d=Ka(c.host),e=0;e<b.length;++e)if(-1<d.indexOf(b[e])){a= |
|
||||
!1;break a}Pd(a,void 0,d,void 0,void 0,void 0,"(referral)","referral",void 0,"/"+c.path);a=!0}return a},Od=function(a,b){for(var c=a.get(zb),d=0;d<c.length;++d){var e=c[d].split(":");if(-1<b.host.indexOf(e[0].toLowerCase())){var f=b.R.get(e[1]);if(f&&(f=K(f),!f&&-1<b.host.indexOf("google.")&&(f="(not provided)"),!e[3]||-1<b.url.indexOf(e[3]))){f||H(151);a:{b=f;a=a.get(Ab);b=I(b).toLowerCase();for(c=0;c<a.length;++c)if(b==a[c]){a=!0;break a}a=!1}return[e[2]||e[0],f,a]}}}return null},Pd=function(a, |
|
||||
b,c,d,e,f,Be,k,Ja,t){a.set(ic,b);a.set(nc,c);a.set(S,d);a.set(kc,e);a.set(lc,f);a.set(jc,Be);a.set(oc,k);a.set(pc,Ja);a.set(qc,t)},Md=[jc,ic,S,lc,nc,oc,pc,qc],Rd=function(a,b){function c(a){a=(""+a).split("+").join("%20");return a=a.split(" ").join("%20")}function d(c){var d=""+(a.get(c)||"");c=""+(b[c]||"");return 0<d.length&&d==c}if(d(S)||d(lc))return H(131),!1;for(var e=0;e<Md.length;e++){var f=Md[e],Be=b[f]||"-";f=a.get(f)||"-";if(c(Be)!=c(f))return!0}return!1},Td=new RegExp(/^https?:\/\/(www\.)?google(\.com?)?(\.[a-z]{2}t?)?\/?$/i), |
|
||||
jf=/^https?:\/\/(r\.)?search\.yahoo\.com?(\.jp)?\/?[^?]*$/i,rf=/^https?:\/\/(www\.)?bing\.com\/?$/i,Nd=function(a){a=Pa(a.get(Jb),a.get(P));try{if(Td.test(a))return H(136),a+"?q=";if(jf.test(a))return H(150),a+"?p=(not provided)";if(rf.test(a))return a+"?q=(not provided)"}catch(b){H(145)}return a};var Ud,Vd,Wd=function(a){Ud=a.c(S,"");Vd=a.c(kc,"")},Xd=function(a){var b=a.c(S,""),c=a.c(kc,"");b!=Ud&&(-1<c.indexOf("ds")?a.set(mc,void 0):!F(Ud)&&-1<Vd.indexOf("ds")&&a.set(mc,Ud))};var Zd=function(a){Yd(a,J.location.href)?(a.set(Mc,!0),H(12)):a.set(Mc,!1)},Yd=function(a,b){if(!a.get(fb))return!1;var c=La(b,a.get(gb));b=K(c.R.get("__utma"));var d=K(c.R.get("__utmb")),e=K(c.R.get("__utmc")),f=K(c.R.get("__utmx")),Be=K(c.R.get("__utmz")),k=K(c.R.get("__utmv"));c=K(c.R.get("__utmk"));if(Yc(""+b+d+e+f+Be+k)!=c){b=I(b);d=I(d);e=I(e);f=I(f);e=$d(b+d+e+f,Be,k,c);if(!e)return!1;Be=e[0];k=e[1]}if(!bd(a,b,!0))return!1;ed(a,d,!0);id(a,Be,!0);gd(a,k,!0);ae(a,f,!0);return!0},ce=function(a, |
|
||||
b,c){var d=cd(a)||"-";var e=dd(a)||"-",f=""+a.b(O,1)||"-",Be=be(a)||"-",k=hd(a,!1)||"-";a=fd(a,!1)||"-";var Ja=Yc(""+d+e+f+Be+k+a),t=[];t.push("__utma="+d);t.push("__utmb="+e);t.push("__utmc="+f);t.push("__utmx="+Be);t.push("__utmz="+k);t.push("__utmv="+a);t.push("__utmk="+Ja);d=t.join("&");if(!d)return b;e=b.indexOf("#");if(c)return 0>e?b+"#"+d:b+"&"+d;c="";0<e&&(c=b.substring(e),b=b.substring(0,e));return 0>b.indexOf("?")?b+"?"+d+c:b+"&"+d+c},$d=function(a,b,c,d){for(var e=0;3>e;e++){for(var f= |
|
||||
0;3>f;f++){if(d==Yc(a+b+c))return H(127),[b,c];var Be=b.replace(/ /g,"%20"),k=c.replace(/ /g,"%20");if(d==Yc(a+Be+k))return H(128),[Be,k];Be=Be.replace(/\+/g,"%20");k=k.replace(/\+/g,"%20");if(d==Yc(a+Be+k))return H(129),[Be,k];try{var Ja=b.match("utmctr=(.*?)(?:\\|utm|$)");if(Ja&&2==Ja.length&&(Be=b.replace(Ja[1],G(I(Ja[1]))),d==Yc(a+Be+c)))return H(139),[Be,c]}catch(t){}b=I(b)}c=I(c)}};var de="|",fe=function(a,b,c,d,e,f,Be,k,Ja){var t=ee(a,b);t||(t={},a.get(Cb).push(t));t.id_=b;t.affiliation_=c;t.total_=d;t.tax_=e;t.shipping_=f;t.city_=Be;t.state_=k;t.country_=Ja;t.items_=t.items_||[];return t},ge=function(a,b,c,d,e,f,Be){a=ee(a,b)||fe(a,b,"",0,0,0,"","","");a:{if(a&&a.items_){var k=a.items_;for(var Ja=0;Ja<k.length;Ja++)if(k[Ja].sku_==c){k=k[Ja];break a}}k=null}Ja=k||{};Ja.transId_=b;Ja.sku_=c;Ja.name_=d;Ja.category_=e;Ja.price_=f;Ja.quantity_=Be;k||a.items_.push(Ja);return Ja}, |
|
||||
ee=function(a,b){a=a.get(Cb);for(var c=0;c<a.length;c++)if(a[c].id_==b)return a[c];return null};var he,ie=function(a){if(!he){var b=J.location.hash;var c=W.name,d=/^#?gaso=([^&]*)/;if(c=(b=(b=b&&b.match(d)||c&&c.match(d))?b[1]:K(pd("GASO")))&&b.match(/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))Fd(a,"GASO",""+b,0),M._gasoDomain=a.get(bb),M._gasoCPath=a.get(P),a=c[1],Ia("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+Ea(),"_gasojs");he=!0}};var ae=function(a,b,c){c&&(b=I(b));c=a.b(O,1);b=b.split(".");2>b.length||!/^\d+$/.test(b[0])||(b[0]=""+c,Fd(a,"__utmx",b.join("."),void 0))},be=function(a,b){a=$c(a.get(O),pd("__utmx"));"-"==a&&(a="");return b?G(a):a},Ye=function(a){try{var b=La(J.location.href,!1),c=decodeURIComponent(L(b.R.get("utm_referrer")))||"";c&&a.set(Jb,c);var d=decodeURIComponent(K(b.R.get("utm_expid")))||"";d&&(d=d.split(".")[0],a.set(Oc,""+d))}catch(e){H(146)}},l=function(a){var b=W.gaData&&W.gaData.expId;b&&a.set(Oc, |
|
||||
""+b)};var ke=function(a,b){var c=Math.min(a.b(Dc,0),100);if(a.b(Q,0)%100>=c)return!1;c=Ze()||$e();if(void 0==c)return!1;var d=c[0];if(void 0==d||Infinity==d||isNaN(d))return!1;0<d?af(c)?b(je(c)):b(je(c.slice(0,1))):Ga(W,"load",function(){ke(a,b)},!1);return!0},me=function(a,b,c,d){var e=new yd;e.f(14,90,b.substring(0,500));e.f(14,91,a.substring(0,150));e.f(14,92,""+le(c));void 0!=d&&e.f(14,93,d.substring(0,500));e.o(14,90,c);return e},af=function(a){for(var b=1;b<a.length;b++)if(isNaN(a[b])||Infinity== |
|
||||
a[b]||0>a[b])return!1;return!0},le=function(a){return isNaN(a)||0>a?0:5E3>a?10*Math.floor(a/10):5E4>a?100*Math.floor(a/100):41E5>a?1E3*Math.floor(a/1E3):41E5},je=function(a){for(var b=new yd,c=0;c<a.length;c++)b.f(14,c+1,""+le(a[c])),b.o(14,c+1,a[c]);return b},Ze=function(){var a=W.performance||W.webkitPerformance;if(a=a&&a.timing){var b=a.navigationStart;if(0==b)H(133);else return[a.loadEventStart-b,a.domainLookupEnd-a.domainLookupStart,a.connectEnd-a.connectStart,a.responseStart-a.requestStart, |
|
||||
a.responseEnd-a.responseStart,a.fetchStart-b,a.domInteractive-b,a.domContentLoadedEventStart-b]}},$e=function(){if(W.top==W){var a=W.external,b=a&&a.onloadT;a&&!a.isValidLoadTime&&(b=void 0);2147483648<b&&(b=void 0);0<b&&a.setPageReadyTime();if(void 0!=b)return[b]}};var cf=function(a){if(a.get(Sb))try{a:{var b=pd(a.get(Oe)||"_ga");if(b&&!(1>b.length)){for(var c=[],d=0;d<b.length;d++){var e=b[d].split("."),f=e.shift();if(("GA1"==f||"1"==f)&&1<e.length){var Be=e.shift().split("-");1==Be.length&&(Be[1]="1");Be[0]*=1;Be[1]*=1;var k={Ya:Be,$a:e.join(".")}}else k=void 0;k&&c.push(k)}if(1==c.length){var Ja=c[0].$a;break a}if(0!=c.length){var t=a.get(Pe)||a.get(bb);c=bf(c,(0==t.indexOf(".")?t.substr(1):t).split(".").length,0);if(1==c.length){Ja=c[0].$a;break a}var Za= |
|
||||
a.get(Qe)||a.get(P);(b=Za)?(1<b.length&&"/"==b.charAt(b.length-1)&&(b=b.substr(0,b.length-1)),0!=b.indexOf("/")&&(b="/"+b),Za=b):Za="/";c=bf(c,"/"==Za?1:Za.split("/").length,1);Ja=c[0].$a;break a}}Ja=void 0}if(Ja){var Ma=(""+Ja).split(".");2==Ma.length&&/[0-9.]/.test(Ma)&&(H(114),a.set(Q,Ma[0]),a.set(Vb,Ma[1]),a.set(Sb,!1))}}catch(mb){H(115)}},bf=function(a,b,c){for(var d=[],e=[],f=128,Be=0;Be<a.length;Be++){var k=a[Be];k.Ya[c]==b?d.push(k):k.Ya[c]==f?e.push(k):k.Ya[c]<f&&(e=[k],f=k.Ya[c])}return 0< |
|
||||
d.length?d:e};var kf=/^gtm\d+$/,hf=function(a){var b=!!a.b(Cd,1);if(b)if(H(140),"page"!=a.get(sc))a.set(Kc,"",!0);else if(b=a.c(Lc,""),b||(b=(b=a.c($a,""))&&"~0"!=b?kf.test(b)?"__utmt_"+G(a.c(Wa,"")):"__utmt_"+G(b):"__utmt"),0<pd(b).length)a.set(Kc,"",!0);else if(X(b,"1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),6E5),0<pd(b).length){a.set(Kc,Ea(),!0);a.set(Yb,1,!0);if(void 0!==W.__ga4__)b=W.__ga4__;else{if(void 0===A){var c=W.navigator.userAgent;if(c){b=c;try{b=decodeURIComponent(c)}catch(d){}if(c=!(0<=b.indexOf("Chrome"))&& |
|
||||
!(0<=b.indexOf("CriOS"))&&(0<=b.indexOf("Safari/")||0<=b.indexOf("Safari,")))b=B.exec(b),c=11<=(b?Number(b[1]):-1);A=c}else A=!1}b=A}b?(a.set(z,C(a),!0),a.set(Jc,"https://ssl.google-analytics.com/j/__utm.gif",!0)):a.set(Jc,Ne()+"/r/__utm.gif?",!0)}},C=function(a){a=aa(a);return{gb:"t=dc&_r=3&"+a,google:"t=sr&slf_rd=1&_r=4&"+a,count:0}},aa=function(a){function b(a,b){c.push(a+"="+G(b))}var c=[];b("v","1");b("_v","5.7.2");b("tid",a.get(Wa));b("cid",a.get(Q)+"."+a.get(Vb));b("jid",a.get(Kc));b("aip", |
|
||||
"1");return c.join("&")+"&z="+Ea()};var U=function(a,b,c){function d(a){return function(b){if((b=b.get(Nc)[a])&&b.length)for(var c=Te(e,a),d=0;d<b.length;d++)b[d].call(e,c)}}var e=this;this.a=new Zc;this.get=function(a){return this.a.get(a)};this.set=function(a,b,c){this.a.set(a,b,c)};this.set(Wa,b||"UA-XXXXX-X");this.set($a,a||"");this.set(Ya,c||"");this.set(ab,Math.round((new Date).getTime()/1E3));this.set(P,"/");this.set(cb,63072E6);this.set(eb,15768E6);this.set(db,18E5);this.set(fb,!1);this.set(yb,50);this.set(gb,!1);this.set(hb, |
|
||||
!0);this.set(ib,!0);this.set(jb,!0);this.set(kb,!0);this.set(lb,!0);this.set(ob,"utm_campaign");this.set(nb,"utm_id");this.set(pb,"gclid");this.set(qb,"utm_source");this.set(rb,"utm_medium");this.set(sb,"utm_term");this.set(tb,"utm_content");this.set(ub,"utm_nooverride");this.set(vb,100);this.set(Dc,1);this.set(Ec,!1);this.set(wb,"/__utm.gif");this.set(xb,1);this.set(Cb,[]);this.set(Fb,[]);this.set(zb,Ld.slice(0));this.set(Ab,[]);this.set(Bb,[]);this.B("auto");this.set(Jb,J.referrer);this.set(v,!0); |
|
||||
this.set(y,Math.round((new Date).getTime()/1E3));Ye(this.a);this.set(Nc,{hit:[],load:[]});this.a.g("0",Zd);this.a.g("1",Wd);this.a.g("2",Jd);this.a.g("3",cf);this.a.g("4",Sd);this.a.g("5",Xd);this.a.g("6",Kd);this.a.g("7",d("load"));this.a.g("8",ie);this.a.v("A",kd);this.a.v("B",md);this.a.v("C",Ge);this.a.v("D",Jd);this.a.v("E",jd);this.a.v("F",Tc);this.a.v("G",ne);this.a.v("H",lf);this.a.v("I",Gd);this.a.v("J",nd);this.a.v("K",ud);this.a.v("L",Dd);this.a.v("M",l);this.a.v("N",hf);this.a.v("O",d("hit")); |
|
||||
this.a.v("P",oe);this.a.v("Q",pe);0===this.get(ab)&&H(111);this.a.T();this.H=void 0};E=U.prototype;E.m=function(){var a=this.get(Db);a||(a=new yd,this.set(Db,a));return a};E.La=function(a){for(var b in a){var c=a[b];a.hasOwnProperty(b)&&this.set(b,c,!0)}};E.K=function(a){if(this.get(Ec))return!1;var b=this,c=ke(this.a,function(c){b.set(Hb,a,!0);b.ib(c)});this.set(Ec,c);return c}; |
|
||||
E.Fa=function(a){a&&Ca(a)?(H(13),this.set(Hb,a,!0)):"object"===typeof a&&null!==a&&this.La(a);this.H=a=this.get(Hb);this.a.j("page");this.K(a)};E.F=function(a,b,c,d,e){if(""==a||!wd(a)||""==b||!wd(b)||void 0!=c&&!wd(c)||void 0!=d&&!xd(d))return!1;this.set(wc,a,!0);this.set(xc,b,!0);this.set(yc,c,!0);this.set(zc,d,!0);this.set(vc,!!e,!0);this.a.j("event");return!0}; |
|
||||
E.Ha=function(a,b,c,d,e){var f=this.a.b(Dc,0);1*e===e&&(f=e);if(this.a.b(Q,0)%100>=f)return!1;c=1*(""+c);if(""==a||!wd(a)||""==b||!wd(b)||!xd(c)||isNaN(c)||0>c||0>f||100<f||void 0!=d&&(""==d||!wd(d)))return!1;this.ib(me(a,b,c,d));return!0};E.Ga=function(a,b,c,d){if(!a||!b)return!1;this.set(Ac,a,!0);this.set(Bc,b,!0);this.set(Cc,c||J.location.href,!0);d&&this.set(Hb,d,!0);this.a.j("social");return!0};E.Ea=function(){this.set(Dc,10);this.K(this.H)};E.Ia=function(){this.a.j("trans")}; |
|
||||
E.ib=function(a){this.set(Eb,a,!0);this.a.j("event")};E.ia=function(a){this.initData();var b=this;return{_trackEvent:function(c,d,e){H(91);b.F(a,c,d,e)}}};E.ma=function(a){return this.get(a)};E.xa=function(a,b){if(a)if(Ca(a))this.set(a,b);else if("object"==typeof a)for(var c in a)a.hasOwnProperty(c)&&this.set(c,a[c])};E.addEventListener=function(a,b){(a=this.get(Nc)[a])&&a.push(b)};E.removeEventListener=function(a,b){a=this.get(Nc)[a];for(var c=0;a&&c<a.length;c++)if(a[c]==b){a.splice(c,1);break}}; |
|
||||
E.qa=function(){return"5.7.2"};E.B=function(a){this.get(hb);a="auto"==a?Ka(J.domain):a&&"-"!=a&&"none"!=a?a.toLowerCase():"";this.set(bb,a)};E.va=function(a){this.set(hb,!!a)};E.na=function(a,b){return ce(this.a,a,b)};E.link=function(a,b){this.a.get(fb)&&a&&(J.location.href=ce(this.a,a,b))};E.ua=function(a,b){this.a.get(fb)&&a&&a.action&&(a.action=ce(this.a,a.action,b))}; |
|
||||
E.za=function(){this.initData();var a=this.a,b=J.getElementById?J.getElementById("utmtrans"):J.utmform&&J.utmform.utmtrans?J.utmform.utmtrans:null;if(b&&b.value){a.set(Cb,[]);b=b.value.split("UTM:");for(var c=0;c<b.length;c++){b[c]=Da(b[c]);for(var d=b[c].split(de),e=0;e<d.length;e++)d[e]=Da(d[e]);"T"==d[0]?fe(a,d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8]):"I"==d[0]&&ge(a,d[1],d[2],d[3],d[4],d[5],d[6])}}};E.$=function(a,b,c,d,e,f,Be,k){return fe(this.a,a,b,c,d,e,f,Be,k)}; |
|
||||
E.Y=function(a,b,c,d,e,f){return ge(this.a,a,b,c,d,e,f)};E.Aa=function(a){de=a||"|"};E.ea=function(){this.set(Cb,[])};E.wa=function(a,b,c,d){var e=this.a;if(0>=a||a>e.get(yb))a=!1;else if(!b||!c||128<b.length+c.length)a=!1;else{1!=d&&2!=d&&(d=3);var f={};f.name=b;f.value=c;f.scope=d;e.get(Fb)[a]=f;a=!0}a&&this.a.store();return a};E.ka=function(a){this.a.get(Fb)[a]=void 0;this.a.store()};E.ra=function(a){return(a=this.a.get(Fb)[a])&&1==a.scope?a.value:void 0}; |
|
||||
E.Ca=function(a,b,c){12==a&&1==b?this.set(pf,c):this.m().f(a,b,c)};E.Da=function(a,b,c){this.m().o(a,b,c)};E.sa=function(a,b){return this.m().getKey(a,b)};E.ta=function(a,b){return this.m().N(a,b)};E.fa=function(a){this.m().L(a)};E.ga=function(a){this.m().M(a)};E.ja=function(){return new yd};E.W=function(a){a&&this.get(Ab).push(a.toLowerCase())};E.ba=function(){this.set(Ab,[])};E.X=function(a){a&&this.get(Bb).push(a.toLowerCase())};E.ca=function(){this.set(Bb,[])}; |
|
||||
E.Z=function(a,b,c,d,e){if(a&&b){a=[a,b.toLowerCase()].join(":");if(d||e)a=[a,d,e].join(":");d=this.get(zb);d.splice(c?0:d.length,0,a)}};E.da=function(){this.set(zb,[])};E.ha=function(a){this.a.load();var b=this.get(P),c=be(this.a);this.set(P,a);this.a.store();ae(this.a,c);this.set(P,b)};E.ya=function(a,b){if(0<a&&5>=a&&Ca(b)&&""!=b){var c=this.get(Fc)||[];c[a]=b;this.set(Fc,c)}};E.V=function(a){a=""+a;if(a.match(/^[A-Za-z0-9]{1,5}$/)){var b=this.get(Ic)||[];b.push(a);this.set(Ic,b)}}; |
|
||||
E.initData=function(){this.a.load()};E.Ba=function(a){a&&""!=a&&(this.set(Tb,a),this.a.j("var"))};var ne=function(a){"trans"!==a.get(sc)&&500<=a.b(cc,0)&&a.stopPropagation();if("event"===a.get(sc)){var b=(new Date).getTime(),c=a.b(dc,0),d=a.b(Zb,0);c=Math.floor((b-(c!=d?c:1E3*c))/1E3);0<c&&(a.set(dc,b),a.set(R,Math.min(10,a.b(R,0)+c)));0>=a.b(R,0)&&a.stopPropagation()}},pe=function(a){"event"===a.get(sc)&&a.set(R,Math.max(0,a.b(R,10)-1))};var qe=function(){var a=[];this.add=function(b,c,d){d&&(c=G(""+c));a.push(b+"="+c)};this.toString=function(){return a.join("&")}},re=function(a,b){(b||2!=a.get(xb))&&a.Za(cc)},se=function(a,b){b.add("utmwv","5.7.2");b.add("utms",a.get(cc));b.add("utmn",Ea());var c=J.location.hostname;F(c)||b.add("utmhn",c,!0);a=a.get(vb);100!=a&&b.add("utmsp",a,!0)},te=function(a,b){b.add("utmht",(new Date).getTime());b.add("utmac",Da(a.get(Wa)));a.get(Oc)&&b.add("utmxkey",a.get(Oc),!0);a.get(vc)&&b.add("utmni",1); |
|
||||
a.get(of)&&b.add("utmgtm",a.get(of),!0);var c=a.get(Ic);c&&0<c.length&&b.add("utmdid",c.join("."));ff(a,b);!1!==a.get(Xa)&&(a.get(Xa)||M.w)&&b.add("aip",1);void 0!==a.get(Kc)&&b.add("utmjid",a.c(Kc,""),!0);a.b(Yb,0)&&b.add("utmredir",a.b(Yb,0),!0);M.bb||(M.bb=a.get(Wa));(1<M.ab()||M.bb!=a.get(Wa))&&b.add("utmmt",1);b.add("utmu",od.encode())},ue=function(a,b){a=a.get(Fc)||[];for(var c=[],d=1;d<a.length;d++)a[d]&&c.push(d+":"+G(a[d].replace(/%/g,"%25").replace(/:/g,"%3A").replace(/,/g,"%2C")));c.length&& |
|
||||
b.add("utmpg",c.join(","))},ff=function(a,b){function c(a,b){b&&d.push(a+"="+b+";")}var d=[];c("__utma",cd(a));c("__utmz",hd(a,!1));c("__utmv",fd(a,!0));c("__utmx",be(a));b.add("utmcc",d.join("+"),!0)},ve=function(a,b){a.get(ib)&&(b.add("utmcs",a.get(Qb),!0),b.add("utmsr",a.get(Lb)),a.get(Rb)&&b.add("utmvp",a.get(Rb)),b.add("utmsc",a.get(Mb)),b.add("utmul",a.get(Pb)),b.add("utmje",a.get(Nb)),b.add("utmfl",a.get(Ob),!0))},we=function(a,b){a.get(lb)&&a.get(Ib)&&b.add("utmdt",a.get(Ib),!0);b.add("utmhid", |
|
||||
a.get(Kb));b.add("utmr",Pa(a.get(Jb),a.get(P)),!0);b.add("utmp",G(a.get(Hb),!0),!0)},xe=function(a,b){for(var c=a.get(Db),d=a.get(Eb),e=a.get(Fb)||[],f=0;f<e.length;f++){var Be=e[f];Be&&(c||(c=new yd),c.f(8,f,Be.name),c.f(9,f,Be.value),3!=Be.scope&&c.f(11,f,""+Be.scope))}F(a.get(wc))||F(a.get(xc),!0)||(c||(c=new yd),c.f(5,1,a.get(wc)),c.f(5,2,a.get(xc)),e=a.get(yc),void 0!=e&&c.f(5,3,e),e=a.get(zc),void 0!=e&&c.o(5,1,e));F(a.get(pf))||(c||(c=new yd),c.f(12,1,a.get(pf)));c?b.add("utme",c.Qa(d),!0): |
|
||||
d&&b.add("utme",d.A(),!0)},ye=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","tran");d.add("utmtid",b.id_,!0);d.add("utmtst",b.affiliation_,!0);d.add("utmtto",b.total_,!0);d.add("utmttx",b.tax_,!0);d.add("utmtsp",b.shipping_,!0);d.add("utmtci",b.city_,!0);d.add("utmtrg",b.state_,!0);d.add("utmtco",b.country_,!0);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,!0);c||(ue(a,d),te(a,d));return d.toString()},ze=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","item");d.add("utmtid", |
|
||||
b.transId_,!0);d.add("utmipc",b.sku_,!0);d.add("utmipn",b.name_,!0);d.add("utmiva",b.category_,!0);d.add("utmipr",b.price_,!0);d.add("utmiqt",b.quantity_,!0);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,!0);c||(ue(a,d),te(a,d));return d.toString()},Ae=function(a,b){var c=a.get(sc);if("page"==c)c=new qe,re(a,b),se(a,c),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),a=[c.toString()];else if("event"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","event"),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)), |
|
||||
a=[c.toString()];else if("var"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","var"),!b&&te(a,c),a=[c.toString()];else if("trans"==c){c=[];for(var d=a.get(Cb),e=0;e<d.length;++e){c.push(ye(a,d[e],b));for(var f=d[e].items_,Be=0;Be<f.length;++Be)c.push(ze(a,f[Be],b))}a=c}else"social"==c?b?a=[]:(c=new qe,re(a,b),se(a,c),c.add("utmt","social"),c.add("utmsn",a.get(Ac),!0),c.add("utmsa",a.get(Bc),!0),c.add("utmsid",a.get(Cc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),a=[c.toString()]):"feedback"==c?b?a=[]:(c= |
|
||||
new qe,re(a,b),se(a,c),c.add("utmt","feedback"),c.add("utmfbid",a.get(Gc),!0),c.add("utmfbpr",a.get(Hc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),a=[c.toString()]):a=[];return a},oe=function(a){var b=a.get(xb),c=a.get(uc),d=c&&c.Ua,e=0,f=a.get(z);if(0==b||2==b){var Be=a.get(wb)+"?";var k=Ae(a,!0);for(var Ja=0,t=k.length;Ja<t;Ja++)Sa(k[Ja],d,Be,!0),e++}if(1==b||2==b)for(k=Ae(a),a=a.c(Jc,""),Ja=0,t=k.length;Ja<t;Ja++)try{if(f){var Za=k[Ja];b=(b=d)||Fa;df("",b,a+"?"+Za,f)}else Sa(k[Ja],d,a);e++}catch(Ma){Ma&& |
|
||||
Ra(Ma.name,void 0,Ma.message)}c&&(c.fb=e)};var Ne=function(){return"https:"==J.location.protocol||M.G?"https://ssl.google-analytics.com":"http://www.google-analytics.com"},Ce=function(a){this.name="len";this.message=a+"-8192"},De=function(a){this.name="ff2post";this.message=a+"-2036"},Sa=function(a,b,c,d){b=b||Fa;if(d||2036>=a.length)gf(a,b,c);else if(8192>=a.length){if(0<=W.navigator.userAgent.indexOf("Firefox")&&![].reduce)throw new De(a.length);df(a,b)||ef(a,b)||Ee(a,b)||b()}else throw new Ce(a.length);},gf=function(a,b,c){c=c||Ne()+"/__utm.gif?"; |
|
||||
var d=new Image(1,1);d.src=c+a;d.onload=function(){d.onload=null;d.onerror=null;b()};d.onerror=function(){d.onload=null;d.onerror=null;b()}},ef=function(a,b){if(0!=Ne().indexOf(J.location.protocol))return!1;var c=W.XDomainRequest;if(!c)return!1;c=new c;c.open("POST",Ne()+"/p/__utm.gif");c.onerror=function(){b()};c.onload=b;c.send(a);return!0},df=function(a,b,c,d){var e=W.XMLHttpRequest;if(!e)return!1;var f=new e;if(!("withCredentials"in f))return!1;f.open("POST",c||Ne()+"/p/__utm.gif",!0);f.withCredentials= |
|
||||
!0;f.setRequestHeader("Content-Type","text/plain");f.onreadystatechange=function(){if(4==f.readyState){if(d)try{var a=f.responseText;if(1>a.length||"1"!=a.charAt(0))Ra("xhr","ver",a),b();else if(3<d.count++)Ra("xhr","tmr",""+d.count),b();else if(1==a.length)b();else{var c=a.charAt(1);if("d"==c){var e=d.gb;a=(a=b)||Fa;df("",a,"https://stats.g.doubleclick.net/j/collect?"+e,d)}else if("g"==c){var t="https://www.google.%/ads/ga-audiences?".replace("%","com");gf(d.google,b,t);var Za=a.substring(2);if(Za)if(/^[a-z.]{1,6}$/.test(Za)){var Ma= |
|
||||
"https://www.google.%/ads/ga-audiences?".replace("%",Za);gf(d.google,Fa,Ma)}else Ra("tld","bcc",Za)}else Ra("xhr","brc",c),b()}}catch(mb){b()}else b();f=null}};f.send(a);return!0},Ee=function(a,b){if(!J.body)return We(function(){Ee(a,b)},100),!0;a=encodeURIComponent(a);try{var c=J.createElement('<iframe name="'+a+'"></iframe>')}catch(e){c=J.createElement("iframe"),c.name=a}c.height="0";c.width="0";c.style.display="none";c.style.visibility="hidden";var d=Ne()+"/u/post_iframe.html";Ga(W,"beforeunload", |
|
||||
function(){c.src="";c.parentNode&&c.parentNode.removeChild(c)});setTimeout(b,1E3);J.body.appendChild(c);c.src=d;return!0};var qf=function(){this.G=this.w=!1;0==Ea()%1E4&&(H(142),this.G=!0);this.C={};this.D=[];this.U=0;this.S=[["www.google-analytics.com","","/plugins/"]];this._gasoCPath=this._gasoDomain=this.bb=void 0;Re();Se()};E=qf.prototype;E.oa=function(a,b){return this.hb(a,void 0,b)};E.hb=function(a,b,c){b&&H(23);c&&H(67);void 0==b&&(b="~"+M.U++);a=new U(b,a,c);M.C[b]=a;M.D.push(a);return a};E.u=function(a){a=a||"";return M.C[a]||M.hb(void 0,a)};E.pa=function(){return M.D.slice(0)};E.ab=function(){return M.D.length}; |
|
||||
E.aa=function(){this.w=!0};E.la=function(){this.G=!0};var Fe=function(a){if("prerender"==J.visibilityState)return!1;a();return!0};var M=new qf;var D=W._gat;D&&Ba(D._getTracker)?M=D:W._gat=M;var Z=new Y;(function(a){if(!Fe(a)){H(123);var b=!1,c=function(){if(!b&&Fe(a)){b=!0;var d=J,e=c;d.removeEventListener?d.removeEventListener("visibilitychange",e,!1):d.detachEvent&&d.detachEvent("onvisibilitychange",e)}};Ga(J,"visibilitychange",c)}})(function(){var a=W._gaq,b=!1;if(a&&Ba(a.push)&&(b="[object Array]"==Object.prototype.toString.call(Object(a)),!b)){Z=a;return}W._gaq=Z;b&&Z.push.apply(Z,a)});function Yc(a){var b=1,c;if(a)for(b=0,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);b=(b<<6&268435455)+d+(d<<14);d=b&266338304;b=0!=d?b^d>>21:b}return b};}).call(this); |
|
||||
@ -1,211 +0,0 @@ |
|||||
// QRCODE reader Copyright 2011 Lazar Laszlo
|
|
||||
// http://www.webqr.com
|
|
||||
|
|
||||
var gCtx = null; |
|
||||
var gCanvas = null; |
|
||||
var c = 0; |
|
||||
var stype = 0; |
|
||||
var gUM = false; |
|
||||
var webkit = false; |
|
||||
var moz = false; |
|
||||
var v = null; |
|
||||
|
|
||||
var imghtml = '<div id="qrfile"><canvas id="out-canvas" width="320" height="240"></canvas>' + |
|
||||
'<div id="imghelp">drag and drop a QRCode here' + |
|
||||
'<br>or select a file' + |
|
||||
'<input type="file" onchange="handleFiles(this.files)"/>' + |
|
||||
'</div>' + |
|
||||
'</div>'; |
|
||||
|
|
||||
var vidhtml = '<video id="v" autoplay></video>'; |
|
||||
|
|
||||
function dragenter(e) { |
|
||||
e.stopPropagation(); |
|
||||
e.preventDefault(); |
|
||||
} |
|
||||
|
|
||||
function dragover(e) { |
|
||||
e.stopPropagation(); |
|
||||
e.preventDefault(); |
|
||||
} |
|
||||
|
|
||||
function drop(e) { |
|
||||
e.stopPropagation(); |
|
||||
e.preventDefault(); |
|
||||
|
|
||||
var dt = e.dataTransfer; |
|
||||
var files = dt.files; |
|
||||
if (files.length > 0) { |
|
||||
handleFiles(files); |
|
||||
} else if (dt.getData('URL')) { |
|
||||
qrcode.decode(dt.getData('URL')); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function handleFiles(f) { |
|
||||
var o = []; |
|
||||
|
|
||||
for (var i = 0; i < f.length; i++) { |
|
||||
var reader = new FileReader(); |
|
||||
reader.onload = (function (theFile) { |
|
||||
return function (e) { |
|
||||
gCtx.clearRect(0, 0, gCanvas.width, gCanvas.height); |
|
||||
|
|
||||
qrcode.decode(e.target.result); |
|
||||
}; |
|
||||
})(f[i]); |
|
||||
reader.readAsDataURL(f[i]); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function initCanvas(w, h) { |
|
||||
gCanvas = document.getElementById("qr-canvas"); |
|
||||
gCanvas.style.width = w + "px"; |
|
||||
gCanvas.style.height = h + "px"; |
|
||||
gCanvas.width = w; |
|
||||
gCanvas.height = h; |
|
||||
gCtx = gCanvas.getContext("2d"); |
|
||||
gCtx.clearRect(0, 0, w, h); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
function captureToCanvas() { |
|
||||
if (stype != 1) |
|
||||
return; |
|
||||
if (gUM) { |
|
||||
try { |
|
||||
gCtx.drawImage(v, 0, 0); |
|
||||
try { |
|
||||
qrcode.decode(); |
|
||||
} catch (e) { |
|
||||
console.log(e); |
|
||||
setTimeout(captureToCanvas, 500); |
|
||||
} |
|
||||
; |
|
||||
} catch (e) { |
|
||||
console.log(e); |
|
||||
setTimeout(captureToCanvas, 500); |
|
||||
} |
|
||||
; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function htmlEntities(str) { |
|
||||
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); |
|
||||
} |
|
||||
|
|
||||
function read(a) { |
|
||||
var html = "<br>"; |
|
||||
if (a.indexOf("http://") === 0 || a.indexOf("https://") === 0) |
|
||||
html += "<a target='_blank' href='" + a + "'>" + a + "</a><br>"; |
|
||||
html += "<b>" + htmlEntities(a) + "</b><br><br>"; |
|
||||
document.getElementById("result").innerHTML = html; |
|
||||
} |
|
||||
|
|
||||
function isCanvasSupported() { |
|
||||
var elem = document.createElement('canvas'); |
|
||||
return !!(elem.getContext && elem.getContext('2d')); |
|
||||
} |
|
||||
|
|
||||
function success(stream) { |
|
||||
|
|
||||
v.srcObject = stream; |
|
||||
v.play(); |
|
||||
|
|
||||
gUM = true; |
|
||||
setTimeout(captureToCanvas, 500); |
|
||||
} |
|
||||
|
|
||||
function error(error) { |
|
||||
gUM = false; |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
function load() { |
|
||||
if (isCanvasSupported() && window.File && window.FileReader) { |
|
||||
initCanvas(800, 600); |
|
||||
qrcode.callback = read; |
|
||||
document.getElementById("mainbody").style.display = "inline"; |
|
||||
setwebcam(); |
|
||||
} else { |
|
||||
document.getElementById("mainbody").style.display = "inline"; |
|
||||
document.getElementById("mainbody").innerHTML = '<p id="mp1">QR code scanner for HTML5 capable browsers</p><br>' + |
|
||||
'<br><p id="mp2">sorry your browser is not supported</p><br><br>' + |
|
||||
'<p id="mp1">try <a href="http://www.mozilla.com/firefox"><img src="firefox.png"/></a> or <a href="http://chrome.google.com"><img src="chrome_logo.gif"/></a> or <a href="http://www.opera.com"><img src="Opera-logo.png"/></a></p>'; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function setwebcam() { |
|
||||
|
|
||||
var options = true; |
|
||||
if (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) { |
|
||||
try { |
|
||||
navigator.mediaDevices.enumerateDevices() |
|
||||
.then(function (devices) { |
|
||||
devices.forEach(function (device) { |
|
||||
if (device.kind === 'videoinput') { |
|
||||
if (device.label.toLowerCase().search("back") > -1) |
|
||||
options = {'deviceId': {'exact': device.deviceId}, 'facingMode': 'environment'}; |
|
||||
} |
|
||||
console.log(device.kind + ": " + device.label + " id = " + device.deviceId); |
|
||||
}); |
|
||||
setwebcam2(options); |
|
||||
}); |
|
||||
} catch (e) { |
|
||||
console.log(e); |
|
||||
} |
|
||||
} else { |
|
||||
console.log("no navigator.mediaDevices.enumerateDevices"); |
|
||||
setwebcam2(options); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
function setwebcam2(options) { |
|
||||
console.log(options); |
|
||||
document.getElementById("result").innerHTML = "- scanning -"; |
|
||||
if (stype == 1) { |
|
||||
setTimeout(captureToCanvas, 500); |
|
||||
return; |
|
||||
} |
|
||||
var n = navigator; |
|
||||
document.getElementById("outdiv").innerHTML = vidhtml; |
|
||||
v = document.getElementById("v"); |
|
||||
|
|
||||
|
|
||||
if (n.mediaDevices.getUserMedia) { |
|
||||
n.mediaDevices.getUserMedia({video: options, audio: false}).then(function (stream) { |
|
||||
success(stream); |
|
||||
}).catch(function (error) { |
|
||||
error(error) |
|
||||
}); |
|
||||
} else if (n.getUserMedia) { |
|
||||
webkit = true; |
|
||||
n.getUserMedia({video: options, audio: false}, success, error); |
|
||||
} else if (n.webkitGetUserMedia) { |
|
||||
webkit = true; |
|
||||
n.webkitGetUserMedia({video: options, audio: false}, success, error); |
|
||||
} |
|
||||
|
|
||||
document.getElementById("qrimg").style.opacity = 0.2; |
|
||||
document.getElementById("webcamimg").style.opacity = 1.0; |
|
||||
|
|
||||
stype = 1; |
|
||||
setTimeout(captureToCanvas, 500); |
|
||||
} |
|
||||
|
|
||||
function setimg() { |
|
||||
document.getElementById("result").innerHTML = ""; |
|
||||
if (stype == 2) |
|
||||
return; |
|
||||
document.getElementById("outdiv").innerHTML = imghtml; |
|
||||
//document.getElementById("qrimg").src="qrimg.png";
|
|
||||
//document.getElementById("webcamimg").src="webcam2.png";
|
|
||||
document.getElementById("qrimg").style.opacity = 1.0; |
|
||||
document.getElementById("webcamimg").style.opacity = 0.2; |
|
||||
var qrfile = document.getElementById("qrfile"); |
|
||||
qrfile.addEventListener("dragenter", dragenter, false); |
|
||||
qrfile.addEventListener("dragover", dragover, false); |
|
||||
qrfile.addEventListener("drop", drop, false); |
|
||||
stype = 2; |
|
||||
} |
|
||||
@ -1,20 +0,0 @@ |
|||||
function test() { |
|
||||
console.log('test方法'); |
|
||||
} |
|
||||
|
|
||||
function IsURL(str_url) { |
|
||||
return (/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/gm).test(str_url); |
|
||||
} |
|
||||
|
|
||||
function AnalysisURL(url) { |
|
||||
return /^(https?:\/\/)([0-9a-z.]+)(:[0-9]+)?([/0-9a-z.]+)?(\?[0-9a-z&=]+)?(#[0-9-a-z]+)?/i.exec(url); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
const permission = { |
|
||||
test: test, |
|
||||
IsURL: IsURL, |
|
||||
AnalysisURL: AnalysisURL |
|
||||
} |
|
||||
|
|
||||
module.exports = permission |
|
||||
@ -1,245 +0,0 @@ |
|||||
/// null = 未请求,1 = 已允许,0 = 拒绝|受限, 2 = 系统未开启
|
|
||||
|
|
||||
var isIOS; |
|
||||
|
|
||||
function album() { |
|
||||
var result = 0; |
|
||||
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary"); |
|
||||
var authStatus = PHPhotoLibrary.authorizationStatus(); |
|
||||
if (authStatus === 0) { |
|
||||
result = null; |
|
||||
} else if (authStatus == 3) { |
|
||||
result = 1; |
|
||||
} else { |
|
||||
result = 0; |
|
||||
} |
|
||||
plus.ios.deleteObject(PHPhotoLibrary); |
|
||||
return result; |
|
||||
} |
|
||||
|
|
||||
function camera() { |
|
||||
var result = 0; |
|
||||
var AVCaptureDevice = plus.ios.import("AVCaptureDevice"); |
|
||||
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide'); |
|
||||
if (authStatus === 0) { |
|
||||
result = null; |
|
||||
} else if (authStatus == 3) { |
|
||||
result = 1; |
|
||||
} else { |
|
||||
result = 0; |
|
||||
} |
|
||||
plus.ios.deleteObject(AVCaptureDevice); |
|
||||
return result; |
|
||||
} |
|
||||
|
|
||||
function location() { |
|
||||
var result = 0; |
|
||||
var cllocationManger = plus.ios.import("CLLocationManager"); |
|
||||
var enable = cllocationManger.locationServicesEnabled(); |
|
||||
var status = cllocationManger.authorizationStatus(); |
|
||||
if (!enable) { |
|
||||
result = 2; |
|
||||
} else if (status === 0) { |
|
||||
result = null; |
|
||||
} else if (status === 3 || status === 4) { |
|
||||
result = 1; |
|
||||
} else { |
|
||||
result = 0; |
|
||||
} |
|
||||
plus.ios.deleteObject(cllocationManger); |
|
||||
return result; |
|
||||
} |
|
||||
|
|
||||
function push() { |
|
||||
var result = 0; |
|
||||
var UIApplication = plus.ios.import("UIApplication"); |
|
||||
var app = UIApplication.sharedApplication(); |
|
||||
var enabledTypes = 0; |
|
||||
if (app.currentUserNotificationSettings) { |
|
||||
var settings = app.currentUserNotificationSettings(); |
|
||||
enabledTypes = settings.plusGetAttribute("types"); |
|
||||
if (enabledTypes == 0) { |
|
||||
result = 0; |
|
||||
console.log("推送权限没有开启"); |
|
||||
} else { |
|
||||
result = 1; |
|
||||
console.log("已经开启推送功能!") |
|
||||
} |
|
||||
plus.ios.deleteObject(settings); |
|
||||
} else { |
|
||||
enabledTypes = app.enabledRemoteNotificationTypes(); |
|
||||
if (enabledTypes == 0) { |
|
||||
result = 3; |
|
||||
console.log("推送权限没有开启!"); |
|
||||
} else { |
|
||||
result = 4; |
|
||||
console.log("已经开启推送功能!") |
|
||||
} |
|
||||
} |
|
||||
plus.ios.deleteObject(app); |
|
||||
plus.ios.deleteObject(UIApplication); |
|
||||
return result; |
|
||||
} |
|
||||
|
|
||||
function contact() { |
|
||||
var result = 0; |
|
||||
var CNContactStore = plus.ios.import("CNContactStore"); |
|
||||
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0); |
|
||||
if (cnAuthStatus === 0) { |
|
||||
result = null; |
|
||||
} else if (cnAuthStatus == 3) { |
|
||||
result = 1; |
|
||||
} else { |
|
||||
result = 0; |
|
||||
} |
|
||||
plus.ios.deleteObject(CNContactStore); |
|
||||
return result; |
|
||||
} |
|
||||
|
|
||||
function record() { |
|
||||
var result = null; |
|
||||
var avaudiosession = plus.ios.import("AVAudioSession"); |
|
||||
var avaudio = avaudiosession.sharedInstance(); |
|
||||
var status = avaudio.recordPermission(); |
|
||||
console.log("permissionStatus:" + status); |
|
||||
if (status === 1970168948) { |
|
||||
result = null; |
|
||||
} else if (status === 1735552628) { |
|
||||
result = 1; |
|
||||
} else { |
|
||||
result = 0; |
|
||||
} |
|
||||
plus.ios.deleteObject(avaudiosession); |
|
||||
return result; |
|
||||
} |
|
||||
|
|
||||
function calendar() { |
|
||||
var result = null; |
|
||||
var EKEventStore = plus.ios.import("EKEventStore"); |
|
||||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0); |
|
||||
if (ekAuthStatus == 3) { |
|
||||
result = 1; |
|
||||
console.log("日历权限已经开启"); |
|
||||
} else { |
|
||||
console.log("日历权限没有开启"); |
|
||||
} |
|
||||
plus.ios.deleteObject(EKEventStore); |
|
||||
return result; |
|
||||
} |
|
||||
|
|
||||
function memo() { |
|
||||
var result = null; |
|
||||
var EKEventStore = plus.ios.import("EKEventStore"); |
|
||||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1); |
|
||||
if (ekAuthStatus == 3) { |
|
||||
result = 1; |
|
||||
console.log("备忘录权限已经开启"); |
|
||||
} else { |
|
||||
console.log("备忘录权限没有开启"); |
|
||||
} |
|
||||
plus.ios.deleteObject(EKEventStore); |
|
||||
return result; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
function requestIOS(permissionID) { |
|
||||
return new Promise((resolve, reject) => { |
|
||||
switch (permissionID) { |
|
||||
case "push": |
|
||||
resolve(push()); |
|
||||
break; |
|
||||
case "location": |
|
||||
resolve(location()); |
|
||||
break; |
|
||||
case "record": |
|
||||
resolve(record()); |
|
||||
break; |
|
||||
case "camera": |
|
||||
resolve(camera()); |
|
||||
break; |
|
||||
case "album": |
|
||||
resolve(album()); |
|
||||
break; |
|
||||
case "contact": |
|
||||
resolve(contact()); |
|
||||
break; |
|
||||
case "calendar": |
|
||||
resolve(calendar()); |
|
||||
break; |
|
||||
case "memo": |
|
||||
resolve(memo()); |
|
||||
break; |
|
||||
default: |
|
||||
resolve(0); |
|
||||
break; |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
function requestAndroid(permissionID) { |
|
||||
return new Promise((resolve, reject) => { |
|
||||
plus.android.requestPermissions( |
|
||||
[permissionID], |
|
||||
function (resultObj) { |
|
||||
var result = 0; |
|
||||
for (var i = 0; i < resultObj.granted.length; i++) { |
|
||||
var grantedPermission = resultObj.granted[i]; |
|
||||
console.log('已获取的权限:' + grantedPermission); |
|
||||
result = 1 |
|
||||
} |
|
||||
for (var i = 0; i < resultObj.deniedPresent.length; i++) { |
|
||||
var deniedPresentPermission = resultObj.deniedPresent[i]; |
|
||||
console.log('拒绝本次申请的权限:' + deniedPresentPermission); |
|
||||
result = 0 |
|
||||
} |
|
||||
for (var i = 0; i < resultObj.deniedAlways.length; i++) { |
|
||||
var deniedAlwaysPermission = resultObj.deniedAlways[i]; |
|
||||
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission); |
|
||||
result = -1 |
|
||||
} |
|
||||
resolve(result); |
|
||||
}, |
|
||||
function (error) { |
|
||||
console.log('result error: ' + error.message) |
|
||||
resolve({ |
|
||||
code: error.code, |
|
||||
message: error.message |
|
||||
}); |
|
||||
} |
|
||||
); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
function gotoAppPermissionSetting() { |
|
||||
if (permission.isIOS) { |
|
||||
var UIApplication = plus.ios.import("UIApplication"); |
|
||||
var application2 = UIApplication.sharedApplication(); |
|
||||
var NSURL2 = plus.ios.import("NSURL"); |
|
||||
var setting2 = NSURL2.URLWithString("app-settings:"); |
|
||||
application2.openURL(setting2); |
|
||||
plus.ios.deleteObject(setting2); |
|
||||
plus.ios.deleteObject(NSURL2); |
|
||||
plus.ios.deleteObject(application2); |
|
||||
} else { |
|
||||
var Intent = plus.android.importClass("android.content.Intent"); |
|
||||
var Settings = plus.android.importClass("android.provider.Settings"); |
|
||||
var Uri = plus.android.importClass("android.net.Uri"); |
|
||||
var mainActivity = plus.android.runtimeMainActivity(); |
|
||||
var intent = new Intent(); |
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); |
|
||||
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null); |
|
||||
intent.setData(uri); |
|
||||
mainActivity.startActivity(intent); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
const permission = { |
|
||||
get isIOS() { |
|
||||
return typeof isIOS === 'boolean' ? isIOS : (isIOS = uni.getSystemInfoSync().platform === 'ios') |
|
||||
}, |
|
||||
requestIOS: requestIOS, |
|
||||
requestAndroid: requestAndroid, |
|
||||
gotoAppSetting: gotoAppPermissionSetting |
|
||||
} |
|
||||
|
|
||||
module.exports = permission |
|
||||
@ -1,25 +0,0 @@ |
|||||
const Home = httpVueLoader('static/vuePage/index.vue'); |
|
||||
var Header = httpVueLoader('static/vuePage/scanCode.vue'); |
|
||||
Vue.component('my-header', Header); |
|
||||
const Foo = { |
|
||||
template: '<div>foo</div>' |
|
||||
}; |
|
||||
const Bar = { |
|
||||
template: '<div>bar</div>' |
|
||||
}; |
|
||||
const routes = [{ |
|
||||
path: '/', |
|
||||
component: Home, |
|
||||
children: [{ |
|
||||
path: '/foo', |
|
||||
component: Foo |
|
||||
}, |
|
||||
{ |
|
||||
path: '/bar', |
|
||||
component: Bar |
|
||||
}, |
|
||||
] |
|
||||
},]; |
|
||||
const router = new VueRouter({ |
|
||||
routes // (缩写) 相当于 routes: routes
|
|
||||
}) |
|
||||
@ -1,7 +0,0 @@ |
|||||
I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, |
|
||||
Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, |
|
||||
comprehensive icon sets or copy and paste your own. |
|
||||
|
|
||||
Please. Check it out. |
|
||||
|
|
||||
-Dave Gandy |
|
||||
|
Before Width: | Height: | Size: 451 KiB |