代码提交

master
sunjianxi 2 years ago
parent eef228aabb
commit 4528a2d677
  1. 30
      src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java
  2. 1
      src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java
  3. 40
      src/main/java/net/mingsoft/cms/biz/ICmsSignBiz.java
  4. 7
      src/main/java/net/mingsoft/cms/biz/impl/DutyStandbyBizImpl.java
  5. 41
      src/main/java/net/mingsoft/cms/dao/ICmsSignDao.java
  6. 83
      src/main/java/net/mingsoft/cms/dao/ICmsSignDao.xml
  7. 68
      src/main/java/net/mingsoft/cms/entity/DutyStandbyEntity.java
  8. 34
      src/main/webapp/WEB-INF/manager/cms/content/form.ftl
  9. 63
      src/main/webapp/template/1/default/css/header.css
  10. 26
      src/main/webapp/template/1/default/footer.htm
  11. 111
      src/main/webapp/template/1/default/header.htm

@ -27,7 +27,9 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import net.mingsoft.base.entity.ResultData;
import net.mingsoft.basic.action.BaseFileAction;
import net.mingsoft.basic.bean.EUListBean;
import net.mingsoft.basic.bean.UploadConfigBean;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.cms.biz.IDutyStandbyBiz;
import net.mingsoft.cms.biz.IPhoneContactsBiz;
@ -56,7 +58,7 @@ import java.util.List;
@Api(tags={"后端-值班备勤接口"})
@Controller("dutyStandbyAction")
@RequestMapping("/${ms.manager.path}/cms/dutyStandby")
public class DutyStandbyAction extends BaseAction{
public class DutyStandbyAction extends BaseFileAction {
/**
@ -82,7 +84,6 @@ public class DutyStandbyAction extends BaseAction{
@RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST})
@ResponseBody
public ResultData list(@ModelAttribute @ApiIgnore DutyStandbyEntity entity) {
BasicUtil.startPage();
entity.setSqlWhere("");
List list = dutyStandbyBiz.query(entity);
return ResultData.build().success(new EUListBean(list,(int)BasicUtil.endPage(list).getTotal()));
@ -95,20 +96,24 @@ public class DutyStandbyAction extends BaseAction{
@ApiOperation(value = "导入接口")
@PostMapping("/import")
@ResponseBody
public ResultData importData(MultipartFile file){
List<DutyStandbyEntity> excelList = ExcelUtil.read(file, DutyStandbyEntity.class);
public ResultData importData(@ApiIgnore UploadConfigBean bean) throws IOException {
List<DutyStandbyEntity> excelList = ExcelUtil.read(bean.getFile(), DutyStandbyEntity.class);
if(excelList!=null){
UploadConfigBean config = new UploadConfigBean(bean.getUploadPath(),bean.getFile(),null,false,bean.isRename());
String filePath = this.upload(config).get("data").toString();
for(DutyStandbyEntity entity : excelList){
//删除相同日期数据
dutyStandbyBiz.deleteByEntity(entity);
//导入数据
entity.setFilePath(filePath);
entity.setCreateDate(new Date());
entity.setCreateBy(BasicUtil.getManager().getId());
dutyStandbyBiz.save(entity);
}
return ResultData.build().success(filePath);
}else{
return ResultData.build().error("导入文件为空!");
}
return ResultData.build().success("导入成功!");
}
/**
@ -121,4 +126,17 @@ public class DutyStandbyAction extends BaseAction{
ExcelUtil.export(response, "值班备勤导入模板", "值班备勤", list, DutyStandbyExcel.class);
}
/**
* 导入接口
* @param
*/
@PostMapping("/deleteByContentIds")
@ResponseBody
public ResultData deleteByContentIds(@RequestParam(value = "contentIds",required = false)List<String> contentIds) throws IOException {
dutyStandbyBiz.deleteByContentIds(contentIds);
return ResultData.build().success("删除成功");
}
}

@ -77,7 +77,6 @@ public class DutyStandbyAction extends BaseAction {
@RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST})
@ResponseBody
public ResultData list(@ModelAttribute @ApiIgnore DutyStandbyEntity entity) {
BasicUtil.startPage();
entity.setSqlWhere("");
List list = dutyStandbyBiz.query(entity);
return ResultData.build().success(new EUListBean(list,(int)BasicUtil.endPage(list).getTotal()));

@ -0,0 +1,40 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;
import net.mingsoft.cms.entity.CmsSignEntity;
import net.mingsoft.cms.entity.PhoneContactsEntity;
import java.util.List;
/**
* 分类业务
* @author 铭飞开发团队
* 创建日期2019-11-28 15:12:32<br/>
* 历史修订<br/>
*/
public interface ICmsSignBiz extends IBaseBiz<CmsSignEntity> {
}

@ -36,6 +36,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 分类管理持久化层
* @author 铭飞开发团队
@ -63,4 +65,9 @@ public class DutyStandbyBizImpl extends BaseBizImpl<IDutyStandbyDao, DutyStandby
public void deleteByEntity(DutyStandbyEntity entity) {
dutyStandbyDao.deleteByEntity(entity);
}
@Override
public void deleteByContentIds(List<String> contentIds) {
dutyStandbyDao.deleteByContentIds(contentIds);
}
}

@ -0,0 +1,41 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;
import net.mingsoft.cms.entity.CmsSignEntity;
import net.mingsoft.cms.entity.PhoneContactsEntity;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 分类持久层
* @author 铭飞开发团队
* 创建日期2024-03-20 15:12:32<br/>
* 历史修订<br/>
*/
@Component("cmsSignDao")
public interface ICmsSignDao extends IBaseDao<CmsSignEntity> {
}

@ -0,0 +1,83 @@
<?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" >
<mapper namespace="net.mingsoft.cms.dao.ICmsSignDao">
<resultMap id="resultMap" type="net.mingsoft.cms.entity.CmsSignEntity">
<id column="id" property="id" /><!--编号 -->
<result column="content_id" property="contentId" /><!--关联文章Id -->
<result column="manager_name" property="managerName" /><!--用户名 -->
<result column="create_by" property="createBy" /><!--创建人 -->
<result column="create_date" property="createDate" /><!--创建时间 -->
<result column="update_by" property="updateBy" /><!--修改人 -->
<result column="update_date" property="updateDate" /><!--修改时间 -->
<result column="del" property="del" /><!--删除标记 -->
</resultMap>
<!--更新-->
<update id="updateEntity" parameterType="net.mingsoft.cms.entity.CmsSignEntity">
update cms_sign
<set>
<if test="contentId != null and contentId != ''">content_id=#{contentId},</if>
<if test="managerName != null and managerName != ''">manager_name=#{managerName},</if>
<if test="createBy &gt; 0">create_by=#{createBy},</if>
<if test="createDate != null">create_date=#{createDate},</if>
<if test="updateBy &gt; 0">update_by=#{updateBy},</if>
<if test="updateDate != null">update_date=#{updateDate},</if>
<if test="del != null">del=#{del},</if>
</set>
where id = #{id}
</update>
<!--根据id获取-->
<select id="getEntity" resultMap="resultMap" parameterType="int">
select * from cms_sign where id=#{id}
</select>
<!--根据实体获取-->
<select id="getByEntity" resultMap="resultMap" parameterType="net.mingsoft.cms.entity.CmsSignEntity">
select * from cms_sign
<where>
<if test="contentId != null and contentId != ''">and content_id=#{contentId}</if>
<if test="managerName != null and managerName != ''">and manager_name=#{managerName}</if>
<if test="createBy &gt; 0"> and create_by=#{createBy} </if>
<if test="createDate != null"> and create_date=#{createDate} </if>
<if test="updateBy &gt; 0"> and update_by=#{updateBy} </if>
<if test="updateDate != null"> and update_date=#{updateDate} </if>
<if test="del != null"> and del=#{del} </if>
</where>
</select>
<!--删除-->
<delete id="deleteEntity" parameterType="int">
delete from cms_sign where id=#{id}
</delete>
<!--批量删除-->
<delete id="delete" >
delete from cms_sign
<where>
id in <foreach collection="ids" item="item" index="index"
open="(" separator="," close=")">#{item}</foreach>
</where>
</delete>
<!--查询全部-->
<select id="queryAll" resultMap="resultMap">
select * from cms_sign order by id desc
</select>
<!--条件查询-->
<select id="query" resultMap="resultMap">
select * from cms_sign
<where>
<if test="contentId != null and contentId != ''"> and content_id=#{contentId}</if>
<if test="managerName != null and managerName != ''">and manager_name=#{managerName}</if>
<if test="createBy &gt; 0"> and create_by=#{createBy} </if>
<if test="createDate != null"> and create_date=#{createDate} </if>
<if test="updateBy &gt; 0"> and update_by=#{updateBy} </if>
<if test="updateDate != null"> and update_date=#{updateDate} </if>
<if test="del != null"> and del=#{del} </if>
<include refid="net.mingsoft.base.dao.IBaseDao.sqlWhere"></include>
</where>
</select>
</mapper>

@ -52,22 +52,16 @@ public class DutyStandbyEntity extends BaseEntity {
private String monitor;
/**
* 副带班长
* 民警值班员
*/
@ExcelProperty("副带班长")
private String deputyMonitor;
@ExcelProperty("民警值班员")
private String policeDuty;
/**
* 守机
* 辅警值班
*/
@ExcelProperty("守机员")
private String operator;
/**
* 值班人员
*/
@ExcelProperty("值班人员")
private String dutyPerson;
@ExcelProperty("辅警值班员")
private String auxiliaryPoliceDuty;
/**
* 北岭值班人员
@ -75,6 +69,16 @@ public class DutyStandbyEntity extends BaseEntity {
@ExcelProperty("北岭值班人员")
private String blDutyPerson;
/**
* 上传文件路径
*/
private String filePath;
/**
* 关联文章Id
*/
private String contentId;
@Override
public String getId() {
return id;
@ -101,28 +105,20 @@ public class DutyStandbyEntity extends BaseEntity {
this.monitor = monitor;
}
public String getDeputyMonitor() {
return deputyMonitor;
}
public void setDeputyMonitor(String deputyMonitor) {
this.deputyMonitor = deputyMonitor;
public String getPoliceDuty() {
return policeDuty;
}
public String getOperator() {
return operator;
public void setPoliceDuty(String policeDuty) {
this.policeDuty = policeDuty;
}
public void setOperator(String operator) {
this.operator = operator;
public String getAuxiliaryPoliceDuty() {
return auxiliaryPoliceDuty;
}
public String getDutyPerson() {
return dutyPerson;
}
public void setDutyPerson(String dutyPerson) {
this.dutyPerson = dutyPerson;
public void setAuxiliaryPoliceDuty(String auxiliaryPoliceDuty) {
this.auxiliaryPoliceDuty = auxiliaryPoliceDuty;
}
public String getBlDutyPerson() {
@ -132,4 +128,20 @@ public class DutyStandbyEntity extends BaseEntity {
public void setBlDutyPerson(String blDutyPerson) {
this.blDutyPerson = blDutyPerson;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public String getContentId() {
return contentId;
}
public void setContentId(String contentId) {
this.contentId = contentId;
}
}

@ -22,7 +22,7 @@
</@shiro.hasPermission>
<el-button v-if="categoryType==1" size="mini" class="iconfont icon-fanhui" plain onclick="javascript:history.go(-1)">返回
</el-button>
<el-button v-if="categoryType==2" size="mini" type="danger" icon="el-icon-delete" @click="del()">删除
<el-button v-if="categoryType==2 && false" size="mini" type="danger" icon="el-icon-delete" @click="del()">删除1
</el-button>
</el-col>
</el-row>
@ -176,23 +176,6 @@
<el-row
:gutter=0
justify="start" align="top">
<el-col :span=12>
<el-form-item label="是否显示" prop="contentDisplay">
<el-radio-group v-model="form.contentDisplay"
:style="{width: ''}"
:disabled="false">
<el-radio :style="{display: true ? 'inline-block' : 'block'}"
:label="item.value"
v-for='(item, index) in contentDisplayOptions'
:key="item.value + index">
{{true? item.label : item.value}}
</el-radio>
</el-radio-group>
<div class="ms-form-tip">
选择否后前端将不显示,需要重新生成才有效果
</div>
</el-form-item>
</el-col>
<el-col :span=12>
<el-form-item label="自定义顺序" prop="contentSort">
<el-input-number
@ -320,7 +303,7 @@
scaleEnabled: true,
compressSide:0,
maxImageSideLength:1000,
maximumWords: 2000,
maximumWords: 10000,
initialFrameWidth: '100%',
initialFrameHeight: 400,
serverUrl: ms.base + "/static/plugins/ueditor/1.4.3.3/jsp/editor.do?jsonConfig=%7BvideoUrlPrefix:\'\',fileManagerListPath:\'\',imageMaxSize:204800000,videoMaxSize:204800000,fileMaxSize:204800000,fileUrlPrefix:\'\',imageUrlPrefix:\'\',imagePathFormat:\'/${app.id}/editor/%7Btime%7D\',filePathFormat:\'/${app.id}/editor/%7Btime%7D\',videoPathFormat:\'/${app.id}/editor/%7Btime%7D\'%7D",
@ -340,7 +323,7 @@
// 文章类型
contentType: [],
// 是否显示
contentDisplay: '0',
contentDisplay: '1',
// 文章作者
contentAuthor: '',
// 文章来源
@ -457,6 +440,17 @@
}else {
data.contentImg = JSON.stringify(data.contentImg);
}
let filePathObj = JSON.parse(localStorage.getItem('filePath'))
if(filePathObj){
data.filePath = filePathObj[0].path
localStorage.removeItem('filePath')
}
if(window.myPath&& window.myPath.response.data){
data.filePath = window.myPath.response.data
}
ms.http.post(url, data).then(function (data) {
if (data.result) {
//保存时需要赋值关联ID

@ -1,8 +1,8 @@
.header_box {
width: 100%;
width:1920px;
height: 600px;
background: url(../images/banner.png);
background-size: 100% 100%;
background-size: 1920px 600px;
background-repeat: no-repeat;
}
@ -16,16 +16,14 @@
}
.header_box .top_header .top_header_box {
width: 96%;
width: 76%;
height: 100%;
max-width: 1440px;
margin: 0 auto;
display: flex;
justify-content: space-between;
}
.header_box .top_header .left_top {
width: 50%;
height: 100%;
font-size: 16px;
display: flex;
@ -41,7 +39,7 @@
}
.header_box .top_header .login_box {
margin-left: 10%;
margin-left: 57px;
position: relative;
cursor: pointer;
}
@ -61,6 +59,19 @@
display: none;
}
.logout_model {
width: 214px;
height: 45px;
background: #FFFFFF;
box-shadow: 0px 3px 6px 1px rgba(14, 46, 101, 0.21);
padding: 18px 20px 22px 20px;
position: absolute;
top: 42px;
right: 0;
z-index: 99;
display: none;
}
.login_model .triangle {
position: absolute;
top: -12px;
@ -72,6 +83,17 @@
border-bottom: 22px solid #fff;
}
.logout_model .triangle {
position: absolute;
top: -12px;
right: 0;
width: 0;
height: 0;
border-left: 18px solid transparent;
border-right: 18px solid transparent;
border-bottom: 22px solid #fff;
}
.l_label {
font-size: 14px;
color: #999999;
@ -100,19 +122,29 @@
margin-top: 10px;
}
.logout_btn {
width: 100%;
height: 32px;
background: #004EBD;
text-align: center;
line-height: 32px;
cursor: pointer;
color: #fff;
font-size: 16px;
margin-top: 10px;
}
.hurl {
width: 576px;
font-weight: 400;
font-size: 16px;
color: #1F3464;
display: flex;
position: absolute;
top: 60px;
right: 196px;
}
.hurld{
display: none;
justify-content:end;
position: relative;
top:20px;
margin:0 auto;
}
.hurl div {
text-align: center;
padding: 0 12px;
@ -213,6 +245,7 @@
}
.bottom_header {
width:100%;
height: 100px;
}
.bottom_header2 {
@ -248,7 +281,6 @@
.footer-bg .f-b-box {
width: 100%;
height: 216px;
background: #1C519D;
}
@ -256,7 +288,6 @@
width: 1440px;
margin: 0 auto;
display: flex;
padding-top: 42px;
justify-content: center;
}
@ -272,7 +303,7 @@
font-weight: 400;
font-size: 18px;
color: #FFFFFF;
border-left: 2px solid rgb(255, 255, 255, 0.3);
text-align:center;
padding-left: 40px;
margin-top: 24px;
}

@ -30,13 +30,10 @@
</div>
<div class="f-b-box">
<div class="f-b">
<img src="/{ms:global.style/}images/red2.png" alt="" srcset="">
<div class="fonts">
主办单位: 山东省公安厅 承办单位:山东省公安厅
青岛市公安局交通警察支队车辆管理所 版权所有
<br />
鲁ICP备05003255 鲁公网安备 15010202150854  政府网站标识码:1500000000
<br />
联系地址:山东省青岛市城阳区流亭街道 未经授权严禁转载 联系电话:0532-1234567
联系地址:山东省青岛市城阳区惠安路6号 联系电话:0532-12123
</div>
</div>
</div>
@ -49,7 +46,7 @@
var sdgaw = []
var sdjjw = []
var qdgaw = []
axios.get('/cms/content/list.do?categoryId=1773193835922075650').then(res=>{
axios.get('/cms/content/list.do?categoryId=1773193835922075650&pageSize=999').then(res=>{
if(res.data.code == 200 && res.data.result){
@ -75,30 +72,27 @@
}
for (var qggawi = 0; qggawi < qggaw.length; qggawi++) {
var qggawhtmls = "<option value=" + qggaw[qggawi].contentOutLink + ">" + qggaw[qggawi].contentTitle + "</option>"
var qggawhtmls = "<option value=" + "'"+ qggaw[qggawi].contentOutLink +"'" + ">" + qggaw[qggawi].contentTitle + "</option>"
$(".qggaw").after(qggawhtmls);
}
for (var qgjjwi = 0; qgjjwi < qgjjw.length; qgjjwi++) {
var qgjjwhtmls = "<option value=" + qgjjw[qgjjwi].contentOutLink + ">" + qgjjw[qgjjwi].contentTitle + "</option>"
var qgjjwhtmls = "<option value=" + "'"+ qgjjw[qgjjwi].contentOutLink +"'" + ">" + qgjjw[qgjjwi].contentTitle + "</option>"
$(".qgjjw").after(qgjjwhtmls);
}
for (var sdgawi = 0; sdgawi < sdgaw.length; sdgawi++) {
var sdgawhtmls = "<option value=" + sdgaw[sdgawi].contentOutLink + ">" + sdgaw[sdgawi].contentTitle + "</option>"
var sdgawhtmls = "<option value=" + "'"+ sdgaw[sdgawi].contentOutLink +"'" + ">" + sdgaw[sdgawi].contentTitle + "</option>"
$(".sdgaw").after(sdgawhtmls);
}
for (var sdjjwi = 0; sdjjwi < sdjjw.length; sdjjwi++) {
var sdjjwhtmls = "<option value=" + sdjjw[sdjjwi].contentOutLink + ">" + sdjjw[sdjjwi].contentTitle + "</option>"
var sdjjwhtmls = "<option value=" + "'"+ sdjjw[sdjjwi].contentOutLink +"'" + ">" + sdjjw[sdjjwi].contentTitle + "</option>"
$(".sdjjw").after(sdjjwhtmls);
}
for (var qdgawi = 0; qdgawi < qdgaw.length; qdgawi++) {
var qdgawhtmls = "<option value=" + qdgaw[qdgawi].contentOutLink + ">" + qdgaw[qdgawi].contentTitle + "</option>"
var qdgawhtmls = "<option value=" + "'"+ qdgaw[qdgawi].contentOutLink +"'"+ ">" + qdgaw[qdgawi].contentTitle + "</option>"
$(".qdgaw").after(qdgawhtmls);
}
}
})
}
})
</script>

@ -5,6 +5,7 @@
<script src="/{ms:global.style/}/js/axios.min.js"></script>
<link href="/{ms:global.style/}css/style.css" rel="stylesheet" />
<link rel="stylesheet" href="/{ms:global.style/}css/public.css">
<div style="display:flex;flex-direction:column;align-items:center;width:100vw">
<div id="header" class="header_box">
<div class="top_header">
<div class="top_header_box">
@ -12,10 +13,8 @@
<p>欢迎来到青岛市公安局交通警察支队车辆管理所!</p>
</div>
<div class="left_top right">
<div class="wea_box">
<div class="wea_box">
<div>{{time}}</div>
<div style="margin:0 5px 0 5px;">{{weather}}</div>
<div>{{temp}}℃</div>
</div>
<div class="login_box">
<span class="login_dl">登录</span>
@ -31,21 +30,23 @@
<input type="password" class="password" id="myInput" placeholder="请输入"
style="padding-right: 26px;" />
<img src="/{ms:global.style/}images/y.png" class="login_y" style="position: absolute;
width: 15px;
height: 12px;
top: 10px;
right: 10px;">
</div>
<div class="login_btn">
登录
width: 15px;
height: 12px;
top: 10px;
right: 10px;">
</div>
<div class="login_btn">登录</div>
</div>
<div class="logout_model">
<div class="triangle"></div>
<div class="logout_btn">退出</div>
</div>
</div>
</div>
</div>
</div>
<div class="hurl hurld">
<div>
<div class="hurl hurld" style="float:right;right:11.35%">
<div><a href='https://www.mps.gov.cn/'>公安部</a></div>
<div><a href='https://sd.122.gov.cn/'>部交管局</a></div>
<div><a href='http://gat.shandong.gov.cn/'>省公安厅</a></div>
@ -53,22 +54,21 @@
<div><a href='https://sd.122.gov.cn/'>省厅车管所</a></div>
<div><a href='http://gat.shandong.gov.cn/'>市公安局</a></div>
</div>
</div>
</div>
<div class="bottom_header">
<div class="header-nav">
<ul>
<li>
<li class="currentPage" data-href="/html/web/index.html">
<a href="/html/web/index.html" title="首页">
<!-- <span class="b r">首页</span> -->
首页
</a>
</li>
<!--定义变量typeid、ids,通过这两个变量判断是否选中-->
<li>
<li class="currentPage" data-href="/html/web/intro/index.html">
<a href="/html/web/intro/index.html">
<span data-title="单位简介" class="b ">单位简介</span>
<!-- <div class="son-none ">
@ -87,7 +87,7 @@
</a>
</li>
<li>
<li class="currentPage" data-href="/html/web/zhibanbeiqin/index.html">
<a href="/html/web/zhibanbeiqin/index.html">
<span data-title="值班备勤" class="b ">值班备勤</span>
<div class="son-noneson-cont ">
@ -97,7 +97,7 @@
</a>
</li>
<li>
<li class="currentPage" data-href="/html/web/tongxunlu/index.html">
<a href="/html/web/tongxunlu/index.html">
<span data-title="通讯录" class="b ">通讯录</span>
<div class="son-noneson-cont ">
@ -107,14 +107,14 @@
</a>
</li>
<li>
<a href="/html/web/conference/index.html">
<li class="currentPage" data-href="/html/web/article/huiyitongzhi/index.html">
<a href="/html/web/article/huiyitongzhi/index.html">
<span data-title="会议通知" class="b ">会议通知</span>
</a>
</li>
<li>
<a href="/html/web/tongzhigonggao/index.html">
<li class="currentPage" data-href="/html/web/article/tongzhigonggao/index.html">
<a href="/html/web/article/tongzhigonggao/index.html">
<span data-title="通知公告" class="b ">通知公告</span>
<div class="son-noneson-cont ">
<div>
@ -179,7 +179,7 @@
</ul>
</div>
</div>
</div>
<script>
new Vue({
el: "#header",
@ -192,27 +192,18 @@
},
created() {
this.time = moment().format('yyyy-MM-DD')
this.getWeather()
},
methods: {
getWeather() {
axios.get('https://devapi.qweather.com/v7/weather/now?location=101120201&key=da5448d7e24e42659c86656047911980').then(res => {
console.log('res ====>', res)
this.weather = res.data.now.text
this.temp = res.data.now.temp
})
}
},
})
window.onload = function () {
var pathname = window.location.pathname
if (pathname == '/html/web/index.html') {
$('.hurl').removeClass('hurld')
}
// axios.get('/statistics/pasZh/get.do').then(res => {
// console.log('res ====>', res)
// if (res.data.code == 200 && res.data.result) {
@ -221,14 +212,17 @@
// }
// }
// })
};
$('.searchbtn').click(() => {
var content = $('.input1').val();
var type = $('.search_select').val();
console.log(content, type)
window.location.href = '/mcms/search.do?type=' + type + '&content' + content
})
//置灰查询
axios.get(`/ms/statistics/pasZh/list.do
`).then(res=>{
if(res && res.data && res.data.data && res.data.data.rows && res.data.data.rows[0].yjzh == '1'){
if(moment(res.data.data.rows[0].zhEndtime).valueOf() > moment().valueOf()){
$('html').addClass('zhhtmls');
}
}
})
};
$('.login_dl').click(() => {
$('.login_model').css('display', 'block')
})
@ -237,19 +231,27 @@
var $target = e.target._prevClass;
var target = $(event.target);
var $myElement = $('.login_model');
if ($target != 'login_dl' && $myElement.closest(target).length) {
$myElement.hide();
}
var $myElement2 = $('.logout_model');
if ($target != 'login_dl' && $myElement2.closest(target).length) {
$myElement2.hide();
}
});
$('.login_btn').click(() => {
var username = $('.username').val();
var password = $('.password').val();
console.log(username, password)
var userlogin = {
var username = $('.username').val();
var password = $('.password').val();
console.log(username, password)
var userlogin = {
managerName: username,
managerPassword: password
}
axios.post("{ms:global.host/}ms/login.do", userlogin, {
axios.post("/ms/login.do", userlogin, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
@ -262,6 +264,7 @@
alert(r.data.msg)
}
})
})
axios.get('/ms/checkLogin.do').then(res => {
if (res.data.code == 200 && res.data.result) {
@ -271,8 +274,15 @@
}
})
$('.login_grzx').click(() => {
window.location.href = '{ms:global.host/}ms/index.do';
$('.logout_model').css('display', 'block')
//window.location.href = '{ms:global.host/}ms/index.do';
})
$('.logout_btn').click(() => {
axios.get("/ms/loginOut.do").then(res=>{
location.reload();
})
})
var types = true
$('.login_y').off().click(() => {
@ -283,5 +293,10 @@
document.getElementById("myInput").setAttribute('type', 'text')
}
})
$('.currentPage').each(function (i, p) {
if(location.href.indexOf($(p).data('href')) != -1){
$(p).addClass('iscurrentPage')
}
});
</script>
<!--头部end-->
Loading…
Cancel
Save