新增政法营商环境监督
This commit is contained in:
parent
57c2fe7ea4
commit
44dad2c6f8
4
pom.xml
4
pom.xml
@ -24,7 +24,7 @@
|
||||
<mysql.version>5.1.47</mysql.version>
|
||||
<freemarker.version>2.3.28</freemarker.version>
|
||||
<druid.version>1.1.9</druid.version>
|
||||
<cm-cloud.version>1.0.1-SNAPSHOT</cm-cloud.version>
|
||||
<cm-cloud.version>1.0.2-SNAPSHOT</cm-cloud.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -110,7 +110,7 @@
|
||||
<dependency>
|
||||
<groupId>com.cm</groupId>
|
||||
<artifactId>cloud-central-control-client</artifactId>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<version>${cm-cloud.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
@ -9,9 +9,11 @@ import com.cm.common.plugin.oauth.service.department.IDepartmentService;
|
||||
import com.cm.common.plugin.pojo.dtos.datadictionary.DataDictionaryDTO;
|
||||
import com.cm.common.plugin.service.datadictionary.IDataDictionaryService;
|
||||
import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.pojo.dtos.department.DepartmentSortDTO;
|
||||
import com.cm.common.result.ErrorResult;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.common.utils.RegexUtil;
|
||||
import com.cm.manager.sms.manager.VerificationCodeManager;
|
||||
import com.cm.supervise.controller.BaseController;
|
||||
import com.cm.supervise.pojo.dtos.casereport.CaseReportDTO;
|
||||
@ -55,6 +57,9 @@ public class CaseReportWechatController extends BaseController {
|
||||
@PostMapping("savecasereport")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult saveCaseReport(@RequestHeader("token") String token, @RequestBody CaseReportVO caseReportVO) throws Exception {
|
||||
if (!StringUtils.isBlank(caseReportVO.getIdCard()) && !RegexUtil.isIdentity(caseReportVO.getIdCard())) {
|
||||
throw new ParamsException("身份证格式错误");
|
||||
}
|
||||
caseReportService.checkSensitiveWord(caseReportVO);
|
||||
String verifyCode = VerificationCodeManager.getInstance().getVerificationCode(caseReportVO.getPhone());
|
||||
if (StringUtils.isBlank(verifyCode)) {
|
||||
@ -79,6 +84,17 @@ public class CaseReportWechatController extends BaseController {
|
||||
return departmentService.listZTreeDepartment(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "部门列表", notes = "部门列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "areaId", value = "地区ID", paramType = "string")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list-department/{areaId}")
|
||||
public List<DepartmentSortDTO> listDepartmentByAreaId(@PathVariable("areaId") String areaId) {
|
||||
return caseReportService.listDepartmentByAreaId(areaId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "我的上报案件分页列表", notes = "我的上报案件分页列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
|
@ -7,7 +7,6 @@ import com.cm.supervise.pojo.dtos.reporttype.ReportTypeDTO;
|
||||
import com.cm.supervise.service.reporttype.IReportTypeService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
@ -55,6 +54,8 @@ public class ReportTypeWechatController {
|
||||
reportTypeId = "efb2e061-0d8a-4d89-ba4e-79d258573622";
|
||||
} else if (type == 3) {
|
||||
reportTypeId = "df4929ca-089d-485a-af53-afa64f3aeddb";
|
||||
} else if (type == 4) {
|
||||
reportTypeId = "8e1eee4c-9d10-4ca8-a8a8-4fe608215e4a";
|
||||
} else {
|
||||
throw new ParamsException("类型错误");
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package com.cm.supervise.pojo.vos.casereport;
|
||||
|
||||
import com.cm.common.annotation.CheckBooleanAnnotation;
|
||||
import com.cm.common.annotation.CheckEmptyAnnotation;
|
||||
import com.cm.common.annotation.CheckNumberAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ -22,11 +21,10 @@ public class CaseReportVO {
|
||||
@ApiModelProperty(name = "title", value = "标题")
|
||||
@CheckEmptyAnnotation(name = "标题")
|
||||
private String title;
|
||||
@ApiModelProperty(name = "name", value = "姓名")
|
||||
@CheckEmptyAnnotation(name = "姓名")
|
||||
@ApiModelProperty(name = "name", value = "单位或个人名称")
|
||||
@CheckEmptyAnnotation(name = "单位或个人名称")
|
||||
private String name;
|
||||
@ApiModelProperty(name = "idCard", value = "身份证")
|
||||
@CheckEmptyAnnotation(name = "身份证", verifyType = "identity")
|
||||
private String idCard;
|
||||
@ApiModelProperty(name = "phone", value = "手机号")
|
||||
@CheckEmptyAnnotation(name = "手机号", verifyType = "phone")
|
||||
|
@ -4,6 +4,7 @@ import com.cm.common.exception.RemoveException;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.exception.UpdateException;
|
||||
import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.pojo.dtos.department.DepartmentSortDTO;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
@ -209,4 +210,12 @@ public interface ICaseReportService {
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer countCaseReportReturnInteger(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 部门列表
|
||||
*
|
||||
* @param areaId 地区ID
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentSortDTO> listDepartmentByAreaId(String areaId);
|
||||
}
|
||||
|
@ -4,7 +4,9 @@ import com.cm.common.constants.ISystemConstant;
|
||||
import com.cm.common.exception.ParamsException;
|
||||
import com.cm.common.exception.RemoveException;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.plugin.oauth.service.department.IDepartmentService;
|
||||
import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.pojo.dtos.department.DepartmentSortDTO;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
@ -69,6 +71,8 @@ public class CaseReportServiceImpl extends BaseService implements ICaseReportSer
|
||||
private ISmsTemplateService smsTemplateService;
|
||||
@Autowired
|
||||
private IUserAdminConfigService userAdminConfigService;
|
||||
@Autowired
|
||||
private IDepartmentService departmentService;
|
||||
|
||||
@Override
|
||||
public SuccessResult saveCaseReport(CaseReportVO caseReportVO) throws Exception {
|
||||
@ -347,6 +351,11 @@ public class CaseReportServiceImpl extends BaseService implements ICaseReportSer
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentSortDTO> listDepartmentByAreaId(String areaId) {
|
||||
return departmentService.listSortByParentId(areaId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置脱敏信息
|
||||
*
|
||||
|
@ -146,7 +146,7 @@ open-platform:
|
||||
state: wechatRedirectUrl
|
||||
grant-type: authorization_code
|
||||
access-token-url: https://api.weixin.qq.com/cgi-bin/token
|
||||
bind-user-url: http://192.168.0.113:7001/usercenter/wechat/sign/login
|
||||
bind-user-url: http://192.168.0.103:7001/usercenter/wechat/sign/login
|
||||
app-id: wx583634d14c596fd7
|
||||
app-secret: 1158dcddd267c6f42b99bda62f842893
|
||||
grant-type: client_credential
|
||||
|
775
src/main/resources/static/wechatroute/business-report.html
Normal file
775
src/main/resources/static/wechatroute/business-report.html
Normal file
@ -0,0 +1,775 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
|
||||
<title>法制营商环境监督</title>
|
||||
<link rel="stylesheet" href="css/reset.css">
|
||||
<link rel="stylesheet" href="css/info-report.css">
|
||||
<link rel="stylesheet" href="css/iconfont.css">
|
||||
<script src="js/rem.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="page-title" style="padding-left: 0.2rem;">
|
||||
<!-- <a href="javascript: history.go(-1);" class="back iconfont icon-houtui"></a>-->
|
||||
法制营商环境监督
|
||||
<a href="check-finish.html" class="ckeck">办结查询</a>
|
||||
</div>
|
||||
<div class="content" v-cloak>
|
||||
<div class="box">
|
||||
<div class="item-box" v-if="currentStep == 1">
|
||||
<div class="part-title"><span style="color: #ff0000;">*</span>标题</div>
|
||||
<input v-model="title" class="put-text" placeholder="请填写标题,20个字以内" type="text" maxlength="20"/>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<!-- <div class="item-box">-->
|
||||
<!-- <div><span style="color: #ff0000;">*</span>上报类型</div>-->
|
||||
<!-- <div class="sel-box">-->
|
||||
<!-- <select v-model="reportType" class="report-selct">-->
|
||||
<!-- <option value="0">请选择上报类型</option>-->
|
||||
<!-- <option :value="type.dictionaryId" v-for="type in typeList">{{type.dictionaryName}}</option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- <!– <lb-picker ref="typePicker" v-model="reType" mode="selector" :list="typeList" @change="handleChangeType" @confirm="handleConfirmType"-->
|
||||
<!-- @cancle="handleCancleType">-->
|
||||
<!-- </lb-picker> –>-->
|
||||
<!-- <div class="divider"></div>-->
|
||||
<!-- </div>-->
|
||||
<div class="item-box" v-if="currentStep == 1">
|
||||
<div><span style="color: #ff0000;">*</span>单位或个人名称</div>
|
||||
<input v-model="name" class="put-text" placeholder="请填写您的姓名" type="text" maxlength="18"/>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 2">
|
||||
<div><span style="color: #ff0000;">*</span>电话</div>
|
||||
<div class="phone-box">
|
||||
<input v-model="phone" class="phone-put-text" placeholder="请填写您的电话" type="number"/>
|
||||
<div class="verify-btn" @click="getVerifyCode" v-if="verifyCodeTime == 0">获取验证码</div>
|
||||
<div class="verify-btn" v-if="verifyCodeTime > 0">{{verifyCodeTime}}秒后失效</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<input v-model="verifyCode" class="put-text" placeholder="请输入验证码" type="text"/>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 1">
|
||||
<div><span style="color: #ff0000;">*</span>区域</div>
|
||||
<div class="sel-box">
|
||||
<!--
|
||||
<select v-model="city" class="select-area" @change="selectCity">
|
||||
<option value="0">请选择城市</option>
|
||||
<option :value="city.dictionaryId" v-for="city in cityList">{{city.dictionaryName}}</option>
|
||||
</select>
|
||||
-->
|
||||
<!-- dictionarySummary:这里是部门的上级ID -->
|
||||
<select v-model="area" @change="changeArea" class="select-area" v-if="areaList.length > 0 && areaList.length != undefined">
|
||||
<option value="0">请选择区域</option>
|
||||
<option :value="area.dictionaryId +'|'+ area.dictionarySummary" v-for="area in areaList">{{area.dictionaryName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <lb-picker ref="picker3" v-model="value3" mode="multiSelector" :list="areaData" :level="3" @change="handleChange"
|
||||
@confirm="handleConfirm" @cancle="handleCancle">
|
||||
</lb-picker> -->
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 1">
|
||||
<div><span style="color: #ff0000;">*</span>单位</div>
|
||||
<div class="sel-box">
|
||||
<select v-model="dept" @change="changeDept">
|
||||
<option value="0">请选择单位</option>
|
||||
<option :value="list.departmentId +'|'+ list.departmentName " v-for="list in empList">{{list.departmentName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 1">
|
||||
<div><span style="color: #ff0000;">*</span>内容</div>
|
||||
<div>
|
||||
<div v-for="reportContent in contentArray">
|
||||
<input type="checkbox" v-model="content" :value="reportContent" style="display: inline-block;"/>
|
||||
<label>{{reportContent}}</label>
|
||||
</div>
|
||||
<div>
|
||||
<textarea v-model="otherContent" class="put-text-area" placeholder="请输入内容,100字以内" maxlength="100" style="margin-top: 0;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 1">
|
||||
<div>图片附件</div>
|
||||
<p class="put-placeholder">附件最多上传9张照片</p>
|
||||
<div class="sel-box up-load-img-box">
|
||||
<ul>
|
||||
<li v-for="(img,index) in upImg">
|
||||
<img :src="baseData.baseUrl +'/supervise/route/file/downloadfile/true/'+ img" alt="">
|
||||
<a href="javascript: void(0);" class="delete-img iconfont icon-add-fill"
|
||||
@click="deleteImg(index)"></a>
|
||||
<a href="javascript: void(0);" class="success-upload iconfont icon-iconzhenghe36"></a>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="file" id="up-load-img" ref="img" @change="uploadImg">
|
||||
</div>
|
||||
<label for="up-load-img" class="iconfont icon-jia3 up-load-img-btn" v-if="upImg.length < fileCount"></label>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 1" v-cloak>
|
||||
<div>视频附件</div>
|
||||
<p class="put-placeholder">附件最多上传1个视频,时长不超过{{mediaDuration.videoDuration}}秒</p>
|
||||
<div class="sel-box upload-video-box" style="margin-top: .2rem;">
|
||||
<label for="upload-video" style="width: 80%;" v-if="upVideo.length == 0">请选择视频文件</label>
|
||||
<input type="file" id="upload-video" ref="video" @change="uploadVideo">
|
||||
<video style="display: none;" :src="mediaSrc.videoSrc" controls="controls" @canplaythrough="checkVideoDuration($event)"></video>
|
||||
<div v-for="(video,index) in upVideo" style="width: 100%; padding: 0 .02rem">
|
||||
<label for="upload-video" style="width: 80%;">{{video.videoName}}</label>
|
||||
<a href="javascript: void(0);" class="delete-btn" @click="deleteVideo(index)">删除</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 1" v-cloak>
|
||||
<div>音频附件</div>
|
||||
<p class="put-placeholder">附件最多上传1个音频,时长不超过{{mediaDuration.voiceDuration}}s</p>
|
||||
<div class="sel-box upload-voice-box" style="margin-top: .2rem;">
|
||||
<label for="upload-voice" style="width: 80%;" v-if="upVoice.length == 0">请选择音频文件</label>
|
||||
<input type="file" id="upload-voice" ref="voice" @change="uploadVoice">
|
||||
<audio style="display: none;" :src="mediaSrc.voiceSrc" controls="controls" @canplaythrough="checkVoiceDuration($event)"></audio>
|
||||
<div v-for="(voice,index) in upVoice" style="width: 100%; padding: 0 .02rem">
|
||||
<label for="upload-voice" style="width: 80%;">{{voice.voiceName}}</label>
|
||||
<a href="javascript: void(0);" class="delete-btn" @click="deleteVoice(index)">删除</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 1">
|
||||
<div>文件附件</div>
|
||||
<p class="put-placeholder">附件最多上传9个文件附件</p>
|
||||
<div class="sel-box up-load-file-box">
|
||||
<ul>
|
||||
<li v-for="(file,index) in upFile" class="file-name-box" v-cloak>
|
||||
<p>{{file.fileName}}</p>
|
||||
<a href="javascript: void(0);" class="delete-btn" @click="deleteFile(index)">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="file" id="up-load-file" @change="uploadFile" ref="file">
|
||||
<label for="up-load-file" class="iconfont icon-jia3" v-if="upFile.length < fileCount"></label>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-bottom">
|
||||
<div class="btn-box" v-if="currentStep == 1">
|
||||
<div class="btn" @click="nextStep">
|
||||
<p>下一步</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-box" v-if="currentStep == 2">
|
||||
<input type="checkbox" id="checkConfirm" v-model="checkConfirm">
|
||||
<label for="checkConfirm" class="label-confirm" :class="{'active': checkConfirm}">保证上述内容属实</label>
|
||||
<div class="btn" @click="submit" v-if="!isSubmit">
|
||||
<p>提交</p>
|
||||
</div>
|
||||
<div class="btn" @click="previousStep" v-if="!isSubmit">
|
||||
<p>取消</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="copyright">
|
||||
<p>{{baseData.copyright.content}}</p>
|
||||
<p style="margin-top: .1rem;">{{baseData.copyright.link}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="must-know" v-cloak>
|
||||
<div class="must-know-content" v-html="mustKnow.content"></div>
|
||||
<div class="knew-rules" @click="alreadyKnow">
|
||||
<span v-if="mustKnowTime > 0">({{mustKnowTime}})</span>
|
||||
已读须知
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="js/jquery-2.1.4.min.js"></script>
|
||||
<script src="js/vue.js"></script>
|
||||
<script src="js/layer/layer.js"></script>
|
||||
<script src="js/restajax.js"></script>
|
||||
<script src="js/base.info.js"></script>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
baseData: baseData,
|
||||
mustKnowTime: 1,
|
||||
mustKnow: {},
|
||||
fileCount: 9, //文件上传数量限制
|
||||
title: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
content: [],
|
||||
otherContent: '',
|
||||
selCity: '',
|
||||
areaId: '',
|
||||
empName: '请选择单位',
|
||||
typeName: '请选择上报类型',
|
||||
typeId: '',
|
||||
verifyCode: '',
|
||||
idCard: '',
|
||||
empId: '',
|
||||
typeList: [],
|
||||
// 验证码
|
||||
checkConfirm: false,
|
||||
disabled: false,
|
||||
areaData: [],
|
||||
value3: [],
|
||||
reType: '',
|
||||
showTips: '获取验证码',
|
||||
value: '',
|
||||
empList: [],
|
||||
fileIdArrays: [],
|
||||
showTipsOff: false, //是否显示两个举报类别
|
||||
selectTips: false, //显示两个举报按钮
|
||||
tipsOne: false, //显示政法干警监督举报
|
||||
tipsTwo: false, //显示执法、司法监督举报
|
||||
checkedOne: false, //已确定政法干警监督举报
|
||||
checkedTwo: false, //已确定执法、司法监督举报
|
||||
// 上传附件
|
||||
upImg: [],
|
||||
upFile: [],
|
||||
upVideo: [],
|
||||
upVoice: [],
|
||||
type: 4,
|
||||
parentId: '',
|
||||
typeList: [],
|
||||
reportType: '',
|
||||
city: 'b0e3cdd5-0e46-441a-8880-d7918477fa22', // 包头市
|
||||
area: '0',//区
|
||||
cityList: [], //城市列表
|
||||
areaList: [], //区域列表
|
||||
dept: '0', //部门
|
||||
submitDept: '',
|
||||
verifyCodeTime: 0,
|
||||
isSubmit: false,
|
||||
uploadFileType: {
|
||||
imageTypeArray: ['png', 'jpg', 'jpeg', 'gif', 'blob'],
|
||||
videoTypeArray: ['mp4', 'rmvb'],
|
||||
audioTypeArray: ['mp3', 'wav'],
|
||||
fileTypeArray: ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'zip', 'rar', 'apk', 'pdf']
|
||||
},
|
||||
mediaSrc: {
|
||||
videoSrc: '',
|
||||
voiceSrc: '',
|
||||
},
|
||||
mediaDuration: {
|
||||
videoDuration: 10,
|
||||
voiceDuration: 60
|
||||
},
|
||||
mediaInputDom: null,
|
||||
mediaFormData: null,
|
||||
currentStep: 1,
|
||||
contents: {
|
||||
zhengFaWei: ['违反防止干预司法“三个规定”', '违规经商办企业', '配偶、子女及其配偶违规从事经营活动', '违规参股借贷', '其他'],
|
||||
faYuan: ['有案不立、压案不查、有罪不究', '人情案、关系案、金钱案', '执行案件中不作为、慢作为、乱作为等', '违规违法决定减刑、假释、暂予监外执行', '其他'],
|
||||
jianChaYuan: ['有案不立、压案不查、有罪不究', '人情案、关系案、金钱案', '法律监督履行不到位', '对减刑、假释、暂予监外执行监督不力', '其他'],
|
||||
gongAnJu: ['有案不立、压案不查、有罪不究', '人情案、关系案、金钱案', '执法司法不作为、慢作为、乱作为', '户证、车驾管、出入境业务办理中拖拉、推诿、吃拿卡要等行为', '减刑、假释、暂予监外执行中存在违规违法行为', '其他'],
|
||||
siFaJu: ['违反防止干预司法“三个规定”', '对律师、公证、司法鉴定监督不力、审批缓慢', '社区矫正管理监督乏力', '其他']
|
||||
},
|
||||
contentArray: []
|
||||
},
|
||||
watch: {
|
||||
'phone': function(value, old) {
|
||||
if(value.length > 11) {
|
||||
this.phone = value.substring(0, 11);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMustKnow: function () {
|
||||
var self = this;
|
||||
restAjax.get(restAjax.path('{url}/supervise/wechat/reporttype/getreporttypebytype/{type}', [self.baseData.baseUrl, self.type]), {}, {
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}, function (code, data) {
|
||||
self.mustKnow = data;
|
||||
var timer = setInterval(function () {
|
||||
self.mustKnowTime--;
|
||||
if (self.mustKnowTime == 0) {
|
||||
clearInterval(timer)
|
||||
}
|
||||
}, 1000)
|
||||
}, function (code, data) {
|
||||
layer.msg(data.msg);
|
||||
})
|
||||
},
|
||||
alreadyKnow: function () {
|
||||
if (this.mustKnowTime == 0) {
|
||||
$('.must-know').hide();
|
||||
}
|
||||
},
|
||||
changeArea: function() {
|
||||
this.dept = '0';
|
||||
this.getEmpData(this.area.split('|')[1]);
|
||||
},
|
||||
changeDept: function () {
|
||||
if(this.dept == '0') {
|
||||
this.contentArray = [];
|
||||
return;
|
||||
}
|
||||
var departmentName = this.dept.split('|')[1];
|
||||
console.log(departmentName);
|
||||
if(departmentName.indexOf('政法委') > -1) {
|
||||
this.contentArray = this.contents.zhengFaWei;
|
||||
} else if(departmentName.indexOf('法院') > -1) {
|
||||
this.contentArray = this.contents.faYuan;
|
||||
} else if(departmentName.indexOf('检察院') > -1) {
|
||||
this.contentArray = this.contents.jianChaYuan;
|
||||
} else if(departmentName.indexOf('公安局') > -1 || departmentName.indexOf('公安分局') > -1) {
|
||||
this.contentArray = this.contents.gongAnJu;
|
||||
} else if(departmentName.indexOf('司法局') > -1 || departmentName.indexOf('司法科') > -1) {
|
||||
this.contentArray = this.contents.siFaJu;
|
||||
} else {
|
||||
this.contentArray = [];
|
||||
}
|
||||
console.log(this.contentArray)
|
||||
},
|
||||
selectCity: function () {
|
||||
this.area = '0';
|
||||
for (var i = 0; i < this.cityList.length; i++) {
|
||||
if (this.cityList[i].dictionaryId == this.city) {
|
||||
this.areaList = this.cityList[i].subDictionary;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.areaList = [];
|
||||
},
|
||||
uploadUserFile: function (url, formData, callback) {
|
||||
var self = this;
|
||||
var layerIndex;
|
||||
restAjax.postFile(url, formData, {
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}, function (code, data) {
|
||||
layer.msg('上传成功');
|
||||
callback(code, data);
|
||||
}, function (code, data) {
|
||||
layer.msg(data.msg);
|
||||
}, function () {
|
||||
layerIndex = layer.msg('正在上传,请稍后...', {icon: 16, shade: 0.1, time: 0})
|
||||
}, function () {
|
||||
layer.close(layerIndex);
|
||||
});
|
||||
},
|
||||
uploadImg: function () {
|
||||
var self = this;
|
||||
if (self.upImg.length >= 9) {
|
||||
layer.msg('最多只能上传9张照片');
|
||||
return
|
||||
} else {
|
||||
var inputDOM = this.$refs.img;
|
||||
var fileName = inputDOM.files[0].name;
|
||||
var nameArray = fileName.split('\.');
|
||||
if (!self.checkImgType(nameArray[nameArray.length - 1])) {
|
||||
layer.msg('图片格式错误,支持' + self.uploadFileType.imageTypeArray.toString());
|
||||
return;
|
||||
}
|
||||
var formData = new FormData();
|
||||
formData.append("image", inputDOM.files[0]);
|
||||
self.uploadUserFile(restAjax.path('{url}/supervise/wechat/file/uploadimage', [self.baseData.baseUrl]), formData, function (code, data) {
|
||||
$('#up-load-img').val('');
|
||||
self.upImg.push(data.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
uploadFile: function () {
|
||||
var self = this;
|
||||
if (self.upFile.length >= 9) {
|
||||
layer.msg('最多只能上传9个文件');
|
||||
return
|
||||
} else {
|
||||
var inputDOM = this.$refs.file;
|
||||
var fileName = inputDOM.files[0].name;
|
||||
var nameArray = fileName.split('\.');
|
||||
if (!self.checkFileType(nameArray[nameArray.length - 1])) {
|
||||
layer.msg('文件格式错误,支持' + self.uploadFileType.fileTypeArray.toString());
|
||||
return;
|
||||
}
|
||||
var formData = new FormData();
|
||||
formData.append("file", inputDOM.files[0]);
|
||||
self.uploadUserFile(restAjax.path('{url}/supervise/wechat/file/uploadfile', [self.baseData.baseUrl]), formData, function (code, data) {
|
||||
$('#up-load-file').val('');
|
||||
self.upFile.push({
|
||||
fileName: fileName,
|
||||
fileId: data.data
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
uploadVoice: function () {
|
||||
var self = this;
|
||||
self.mediaInputDom = this.$refs.voice;
|
||||
var voiceName = self.mediaInputDom.files[0].name;
|
||||
var voiceFile = self.mediaInputDom.files[0];
|
||||
var nameArray = voiceName.split('\.');
|
||||
if (!self.checkVoiceType(nameArray[nameArray.length - 1])) {
|
||||
layer.msg('音频格式错误,支持' + self.uploadFileType.audioTypeArray.toString());
|
||||
return;
|
||||
}
|
||||
self.mediaSrc.voiceSrc = URL.createObjectURL(voiceFile);
|
||||
self.mediaFormData = new FormData();
|
||||
self.mediaFormData.append('audio', voiceFile);
|
||||
},
|
||||
checkVoiceDuration: function(event) {
|
||||
var self = this;
|
||||
var duration = event.target.duration;
|
||||
if(duration > self.mediaDuration.voiceDuration) {
|
||||
layer.msg('音频长度不超过'+ self.mediaDuration.voiceDuration +'秒');
|
||||
return;
|
||||
}
|
||||
self.uploadUserFile(restAjax.path('{url}/supervise/wechat/file/uploadaudio', [self.baseData.baseUrl]), self.mediaFormData, function (code, data) {
|
||||
self.mediaSrc.voiceSrc = '';
|
||||
var fileName = self.mediaInputDom.files[0].name;
|
||||
$('#upload-voice').val('')
|
||||
self.upVoice.push({
|
||||
voiceName: fileName,
|
||||
voiceId: data.data
|
||||
})
|
||||
});
|
||||
},
|
||||
uploadVideo: function () {
|
||||
var self = this;
|
||||
self.mediaInputDom = this.$refs.video;
|
||||
var videoName = self.mediaInputDom.files[0].name;
|
||||
var videoFile = self.mediaInputDom.files[0];
|
||||
var nameArray = videoName.split('\.');
|
||||
if (!self.checkVideoType(nameArray[nameArray.length - 1])) {
|
||||
layer.msg('视频格式错误,支持' + self.uploadFileType.videoTypeArray.toString());
|
||||
return;
|
||||
}
|
||||
self.mediaSrc.videoSrc = URL.createObjectURL(videoFile);
|
||||
self.mediaFormData = new FormData();
|
||||
self.mediaFormData.append('video', videoFile);
|
||||
},
|
||||
checkVideoDuration: function(event) {
|
||||
var self = this;
|
||||
var duration = event.target.duration;
|
||||
if(duration > self.mediaDuration.videoDuration) {
|
||||
layer.msg('视频长度不超过'+ self.mediaDuration.videoDuration +'秒');
|
||||
return;
|
||||
}
|
||||
self.uploadUserFile(restAjax.path('{url}/supervise/wechat/file/uploadvideo', [self.baseData.baseUrl]), self.mediaFormData, function (code, data) {
|
||||
self.mediaSrc.videoSrc = '';
|
||||
var fileName = self.mediaInputDom.files[0].name;
|
||||
$('#upload-video').val('');
|
||||
self.upVideo.push({
|
||||
videoName: fileName,
|
||||
videoId: data.data
|
||||
});
|
||||
});
|
||||
},
|
||||
deleteImg: function (idx) {
|
||||
this.upImg.splice(idx, 1);
|
||||
},
|
||||
deleteFile: function (index) {
|
||||
this.upFile.splice(index, 1);
|
||||
},
|
||||
deleteVideo: function (index) {
|
||||
this.upVideo.splice(index, 1);
|
||||
},
|
||||
deleteVoice: function (index) {
|
||||
this.upVoice.splice(index, 1);
|
||||
},
|
||||
showTipsBox: function () {
|
||||
this.showTipsOff = true
|
||||
this.selectTips = true
|
||||
},
|
||||
goTips: function (tip) {
|
||||
this.selectTips = false
|
||||
if (tip == 1) {
|
||||
this.tipsOne = true
|
||||
} else {
|
||||
this.tipsTwo = true
|
||||
}
|
||||
},
|
||||
submitTip: function (tip) {
|
||||
this.showTipsOff = false
|
||||
this.selectTips = false
|
||||
if (tip == 1) {
|
||||
this.checkedOne = true
|
||||
this.tipsOne = false
|
||||
} else {
|
||||
this.checkedTwo = true
|
||||
this.tipsTwo = false
|
||||
}
|
||||
},
|
||||
checkImgType: function (fileType) {
|
||||
var self = this;
|
||||
for (var i = 0, type; type = self.uploadFileType.imageTypeArray[i++];) {
|
||||
if (fileType.toLowerCase() == type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
checkVideoType: function (fileType) {
|
||||
var self = this;
|
||||
for (var i = 0, type; type = self.uploadFileType.videoTypeArray[i++];) {
|
||||
if (fileType.toLowerCase() == type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
checkVoiceType: function (fileType) {
|
||||
var self = this;
|
||||
for (var i = 0, type; type = self.uploadFileType.audioTypeArray[i++];) {
|
||||
if (fileType.toLowerCase() == type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
checkFileType: function (fileType) {
|
||||
var self = this;
|
||||
for (var i = 0, type; type = self.uploadFileType.fileTypeArray[i++];) {
|
||||
if (fileType.toLowerCase() == type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
//获取单位数据
|
||||
getEmpData: function (parentId, parentName) {
|
||||
var self = this;
|
||||
restAjax.get(restAjax.path('{url}/supervise/wechat/casereport/list-department/{areaId}', [self.baseData.baseUrl, parentId]), {}, {
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}, function (code, data) {
|
||||
self.empList = data;
|
||||
}, function (code, data) {
|
||||
layer.msg(data.msg);
|
||||
});
|
||||
},
|
||||
//获取上报类型数据
|
||||
// getReportType: function() {
|
||||
// var self = this;
|
||||
// $.ajax({
|
||||
// type: 'get',
|
||||
// url: self.baseData.baseUrl + '/supervise/wechat/datadictionary/listdictionaryallbyparentid/79e8c51e-36a8-4d75-aa69-b1ceb0e33349',
|
||||
// headers:{'Content-Type':'application/json;charset=utf8','token': self.token},
|
||||
// success: function(result){
|
||||
// self.typeList = result;
|
||||
// },
|
||||
// error: function(XMLHttpRequest){
|
||||
// //var responseCode = XMLHttpRequest.status;
|
||||
// var responseData = JSON.parse(XMLHttpRequest.responseText);
|
||||
// layer.msg(responseData.msg)
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// },
|
||||
//获取区域数据
|
||||
getAreaData: function () {
|
||||
var self = this;
|
||||
restAjax.get(restAjax.path('{url}/supervise/wechat/datadictionary/listdictionaryallbyparentid/{city}', [self.baseData.baseUrl, self.city]), {}, {
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}, function (code, data) {
|
||||
// self.cityList = data;
|
||||
self.areaList = data;
|
||||
}, function (code, data) {
|
||||
layer.msg(data.msg);
|
||||
});
|
||||
},
|
||||
//获取验证码
|
||||
getVerifyCode: function () {
|
||||
var self = this;
|
||||
if (self.phone == '') {
|
||||
layer.msg('请输入手机号');
|
||||
} else {
|
||||
restAjax.get(restAjax.path('{url}/supervise/api/sms/getverificationcode/{phone}', [self.baseData.baseUrl, self.phone]), {}, {
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}, function (code, data) {
|
||||
self.verifyCodeTime = 120;
|
||||
var timer = setInterval(function () {
|
||||
self.verifyCodeTime--;
|
||||
if (self.verifyCodeTime == 0) {
|
||||
clearInterval(timer)
|
||||
}
|
||||
}, 1000)
|
||||
}, function (code, data) {
|
||||
layer.msg(data.msg);
|
||||
});
|
||||
}
|
||||
},
|
||||
nextStep: function() {
|
||||
this.currentStep = 2;
|
||||
},
|
||||
previousStep: function() {
|
||||
this.currentStep = 1;
|
||||
},
|
||||
submit: function () {
|
||||
var self = this;
|
||||
if (self.checkConfirm) {
|
||||
if (self.title == '') {
|
||||
layer.msg('请输入标题');
|
||||
return;
|
||||
}
|
||||
// if(self.reportType == '0'){
|
||||
// layer.msg('请选择上报类型');
|
||||
// return
|
||||
// }
|
||||
if (self.name == '') {
|
||||
layer.msg('请输入姓名');
|
||||
return;
|
||||
}
|
||||
if (self.phone == '') {
|
||||
layer.msg('请填写手机号');
|
||||
return;
|
||||
}
|
||||
if (self.verifyCode == '') {
|
||||
layer.msg('请填写验证码');
|
||||
return;
|
||||
}
|
||||
if (self.content.length == 0) {
|
||||
layer.msg('请勾选内容');
|
||||
return;
|
||||
}
|
||||
if (self.content.toString().indexOf('其他') > -1 && self.otherContent == '') {
|
||||
layer.msg('请输入其他内容');
|
||||
return;
|
||||
}
|
||||
if (self.area == '0') {
|
||||
layer.msg('请选择区域');
|
||||
return;
|
||||
}
|
||||
if (self.city == '0') {
|
||||
layer.msg('请选择城市');
|
||||
return;
|
||||
}
|
||||
if(self.departmentId == '0'){
|
||||
layer.msg('请选择单位');
|
||||
return
|
||||
}
|
||||
var data = {
|
||||
"area": self.area.split('|')[0],
|
||||
"departmentId": self.dept.split('|')[0],
|
||||
"city": self.city,
|
||||
"content": function() {
|
||||
var content = '';
|
||||
for(var i = 0, item; item = self.content[i++];) {
|
||||
if(content != '') {
|
||||
content += '\n';
|
||||
}
|
||||
content += (i +'.' + item);
|
||||
}
|
||||
content += '\n描述内容:'+ self.otherContent;
|
||||
return content;
|
||||
}(),
|
||||
"currentLog": "",
|
||||
"files": function () {
|
||||
var fileIds = '';
|
||||
for (var i = 0, item; item = self.upFile[i++];) {
|
||||
if (fileIds != '') {
|
||||
fileIds += ',';
|
||||
}
|
||||
fileIds += item.fileId
|
||||
}
|
||||
return fileIds;
|
||||
}(),
|
||||
"idCard": self.idCard,
|
||||
"name": self.name,
|
||||
"phone": self.phone,
|
||||
"photos": function () {
|
||||
var fileIds = '';
|
||||
for (var i = 0, item; item = self.upImg[i++];) {
|
||||
if (fileIds != '') {
|
||||
fileIds += ',';
|
||||
}
|
||||
fileIds += item;
|
||||
}
|
||||
return fileIds;
|
||||
}(),
|
||||
"reportType": self.reportType,
|
||||
"status": "",
|
||||
"title": self.title,
|
||||
"type": 4,
|
||||
"verifyCode": self.verifyCode,
|
||||
"video": function () {
|
||||
var fileIds = '';
|
||||
for (var i = 0, item; item = self.upVideo[i++];) {
|
||||
if (fileIds != '') {
|
||||
fileIds += ',';
|
||||
}
|
||||
fileIds += item.videoId
|
||||
}
|
||||
return fileIds;
|
||||
}(),
|
||||
"voice": function () {
|
||||
var fileIds = '';
|
||||
for (var i = 0, item; item = self.upVoice[i++];) {
|
||||
if (fileIds != '') {
|
||||
fileIds += ',';
|
||||
}
|
||||
fileIds += item.voiceId
|
||||
}
|
||||
return fileIds;
|
||||
}()
|
||||
}
|
||||
self.isSubmit = true;
|
||||
restAjax.post(restAjax.path('{url}/supervise/wechat/casereport/savecasereport', [self.baseData.baseUrl]), data, {
|
||||
headers: {
|
||||
token: self.token
|
||||
}
|
||||
}, function (code, data) {
|
||||
layer.msg('提交成功!', {time: 1000}, function () {
|
||||
window.location.reload();
|
||||
});
|
||||
}, function (code, data) {
|
||||
layer.msg(data.msg);
|
||||
self.isSubmit = false;
|
||||
})
|
||||
} else {
|
||||
layer.msg('请先勾选保证内容属实!')
|
||||
}
|
||||
|
||||
},
|
||||
checkPhoneNumber: function () {
|
||||
var self = this;
|
||||
if (self.phone == '') {
|
||||
return false
|
||||
}
|
||||
if (!(/^1[3456789]\d{9}$/.test(self.phone))) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
getToken: function () {
|
||||
var self = this;
|
||||
restAjax.get(restAjax.path('{url}{tokenUrl}', [self.baseData.baseUrl, self.baseData.tokenUrl]), {}, null, function (code, data) {
|
||||
self.token = data.data;
|
||||
self.getAreaData();
|
||||
self.getMustKnow();
|
||||
}, function (code, data) {
|
||||
layer.msg(data.msg);
|
||||
});
|
||||
},
|
||||
// getType: function(){
|
||||
// this.type = window.location.search.replace('?','').split('&')[0].split('=')[1];
|
||||
// if(this.type == 2){
|
||||
// this.parentId = '9d6b07dd-fdf1-4282-95f2-ebadb8feba67'
|
||||
// }else {
|
||||
// this.parentId = '0ae62de6-2ae2-4e2e-8733-848f75961704'
|
||||
// }
|
||||
// this.getReportType();
|
||||
// }
|
||||
},
|
||||
mounted: function () {
|
||||
this.getToken();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -70,8 +70,7 @@
|
||||
<div class="divider"></div>
|
||||
<div class="item-box">
|
||||
<div class="item-title">内容</div>
|
||||
<p class="put-text">{{detailBean.content}}</p>
|
||||
|
||||
<p class="put-text" v-html="detailBean.content"></p>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="item-box">
|
||||
@ -168,6 +167,7 @@
|
||||
token: self.token
|
||||
}
|
||||
}, function (code, data) {
|
||||
data.content = data.content.replace(/[\r\n]/g, '<br/>');
|
||||
self.detailBean = data;
|
||||
self.getImgs(self.detailBean.photos);
|
||||
self.getVideo(self.detailBean.video);
|
||||
|
@ -98,8 +98,8 @@
|
||||
typeStr = '干警监督'
|
||||
} else if (type == 3) {
|
||||
typeStr = '信访受理'
|
||||
} else {
|
||||
typeStr = '舆情反馈'
|
||||
} else if (type == 4) {
|
||||
typeStr = '法制营商环境监督'
|
||||
}
|
||||
return typeStr
|
||||
},
|
||||
|
@ -25,6 +25,8 @@
|
||||
<a href="javascript: void(0);" :class="{active: type == 2}" @click="changeType(2)">干警监督</a>
|
||||
<a href="javascript: void(0);" :class="{active: type == 3}"
|
||||
@click="changeType(3)">执法、司法监督<br><small>(涉法涉诉讼信访案件受理)</small></a>
|
||||
<a href="javascript: void(0);" :class="{active: type == 4}"
|
||||
@click="changeType(4)">法制营商环境监督<br></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-box" v-if="currentStep == 1">
|
||||
@ -285,6 +287,8 @@
|
||||
this.type = type;
|
||||
if (type == 2) {
|
||||
this.parentId = '9d6b07dd-fdf1-4282-95f2-ebadb8feba67'
|
||||
} else if (type == 4) {
|
||||
window.location.href = 'business-report.html';
|
||||
} else {
|
||||
this.parentId = '0ae62de6-2ae2-4e2e-8733-848f75961704'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user