Commit c546b3c4 by yuhao

添加协助平台

parent 8b08ddd0
...@@ -2,7 +2,60 @@ import { post, postform, postdown } from "@/utils/http.js"; ...@@ -2,7 +2,60 @@ import { post, postform, postdown } from "@/utils/http.js";
import base from "@/api/base"; import base from "@/api/base";
//线索组查询 //协助查询
export const selectAll = params => export const selectAll = params =>
postform(`${base.alyIP}/xzqqXx/selectAll`, params); postform(`${base.alyIP}/xzqqXx/selectAll`, params);
//协助新增
export const insertXzqqXx = params =>
postform(`${base.alyIP}/xzqqXx/insertXzqqXx`, params);
//协助详情
export const selectOne = params =>
postform(`${base.alyIP}/xzqqXx/selectOne`, params);
export const imgInfo = params =>
postform(`${base.alyIP}/xzqqXx/imgInfo`, params);
export const selectAllMj = params =>
postform(`${base.alyIP}/mjxx/selectAll`, params);
export const selectAllXyr = params =>
postform(`${base.alyIP}/xyrxx/selectAll`, params);
// 审批
export const shXzqqXx = params =>
postform(`${base.alyIP}/xzqqXx/shXzqqXx`, params);
// 抓获人列表
export const selectAllZhr = params =>
postform(`${base.alyIP}/zhryxx/selectAll`, params);
// 抓获人新增
export const insertZhryxx = params =>
postform(`${base.alyIP}/zhryxx/insertZhryxx`, params);
// 抓获人修改
export const updateZhryxx = params =>
postform(`${base.alyIP}/zhryxx/updateZhryxx`, params);
// 抓获人删除
export const deleteByIdZhr = params =>
postform(`${base.alyIP}/zhryxx/deleteById`, params);
// 民警新增
export const insertMjxx = params =>
postform(`${base.alyIP}/mjxx/insertMjxx`, params);
// 民警修改
export const updateMjxx = params =>
postform(`${base.alyIP}/mjxx/updateMjxx`, params);
// 嫌疑人新增
export const insertXyrxx = params =>
postform(`${base.alyIP}/xyrxx/insertXyrxx`, params);
// 嫌疑人修改
export const updateXyrxx = params =>
postform(`${base.alyIP}/xyrxx/updateXyrxx`, params);
// 整体修改
export const updateXzqqXx = params =>
postform(`${base.alyIP}/xzqqXx/updateXzqqXx`, params);
// 删除民警
export const deleteByIdMj = params =>
postform(`${base.alyIP}/mjxx/deleteById`, params);
// 删除基本信息
export const deleteByIdJbxx = params =>
postform(`${base.alyIP}/xzqqXx/deleteById`, params);
// 删除嫌疑人
export const deleteByIdXyr = params =>
postform(`${base.alyIP}/xyrxx/deleteById`, params);
import { post, postform, postdown } from "@/utils/http.js";
import base from "@/api/base";
//用户新增
export const insertUserNew = params =>
postform(`${base.alyIP}/sysuser/zcinsertUserNew`, params);
//删除用户
export const deleteUserNew = params =>
post(`${base.alyIP}/sysuser/deleteUserNew`, params);
//用户详情
export const getUserXxByxxzjbh = params =>
post(`${base.alyIP}/sysuser/getUserXxByxxzjbh`, params);
//用户修改
export const updateUserXx = params =>
postform(`${base.alyIP}/sysuser/updateUserXx`, params);
//用户审批
export const getUserShList = params =>
postform(`${base.alyIP}/sysuser/getUserShList`, params);
//注册用户详情
export const shUserDetail = params =>
post(`${base.alyIP}/sysuser/shUserDetail`, params);
//注册用户详情审核
export const shUser = params =>
post(`${base.alyIP}/sysuser/shUser`, params);
//附件详情
export const applyfjlist = params =>
postform(`${base.alyIP}/sysuser/applyfjlist`, params);
//修改密码
export const updateUserMm = params =>
post(`${base.alyIP}/sysuser/updateUserMm`, params);
\ No newline at end of file
src/assets/img/login/login2.png

12.1 KB | W: | H:

src/assets/img/login/login2.png

10.5 KB | W: | H:

src/assets/img/login/login2.png
src/assets/img/login/login2.png
src/assets/img/login/login2.png
src/assets/img/login/login2.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -30,19 +30,38 @@ ...@@ -30,19 +30,38 @@
:index="columIndex"> :index="columIndex">
<template slot-scope="{row,$index}"> <template slot-scope="{row,$index}">
<!-- 操作按钮 --> <!-- 操作按钮 -->
<!-- 基础操作 --> <!-- 基础操作 -->
<template v-if="column.type=='basic'"> <template v-if="column.type=='basic'">
<span v-for="(operations, index) in column.operation" <span v-for="(operations, index) in column.operation"
:key="index"> :key="index">
<!-- operations.label , -->
<!-- -->
<el-button :icon="operations.icon" <el-button :icon="operations.icon"
:type="operations.type" :type="operations.type"
@click="rowOperation(row,index,operations.option)" @click="rowOperation(row,index,operations.option)"
:style="{color:operations.color}" :style="{color:operations.color}"
size="mini">{{ operations.label }}</el-button> size="mini">{{ operations.label}}</el-button>
</span> </span>
</template> </template>
<template v-if="column.type=='basicXz'">
<span v-for="(operations, index) in column.operation"
:key="index">
<!-- operations.label , -->
<!-- -->
<el-button :icon="operations.icon"
:type="operations.type"
v-if="operations.shztList.indexOf(row.xzzt)!=-1"
@click="rowOperation(row,index,operations.option)"
:style="{color:operations.color}"
size="mini">{{ operations.label}}</el-button>
</span>
</template>
<!-- 按钮插槽 -->
<template v-if="column.type=='basicSlot'">
<slot name="btnGroup"
:scope="row"
style="width: 200px"></slot>
</template>
<!-- 默认展示 --> <!-- 默认展示 -->
<span v-if="column.text && column.editRow != $index"> <span v-if="column.text && column.editRow != $index">
{{ (row[column.prop] + '') || '--' }} {{ (row[column.prop] + '') || '--' }}
...@@ -98,10 +117,70 @@ ...@@ -98,10 +117,70 @@
</div> </div>
</el-image> </el-image>
</template> </template>
<template v-else-if="column.prop=='faceUrl'"> <template v-else-if="column.prop=='imageUrlZm'">
<el-image style="width:204px;height:120px;"
:src="row.imageUrlZm"
:preview-src-list="[row.imageUrlZm]"
alt="">
<div slot="error"
class="image-slot el-image__error">
<i class="el-icon-picture-outline"></i>
<p>暂无图片</p>
</div>
</el-image>
</template>
<template v-else-if="column.prop=='imageUrlFm'">
<el-image style="width:204px;height:120px;"
:src="row.imageUrlFm"
:preview-src-list="[row.imageUrlFm]"
alt="">
<div slot="error"
class="image-slot el-image__error">
<i class="el-icon-picture-outline"></i>
<p>暂无图片</p>
</div>
</el-image>
</template>
<template v-else-if="column.prop=='imageUrlZmcl'">
<el-image style="width:204px;height:120px;"
:src="row.imageUrlZmcl"
:preview-src-list="[row.imageUrlZmcl]"
alt="">
<div slot="error"
class="image-slot el-image__error">
<i class="el-icon-picture-outline"></i>
<p>暂无图片</p>
</div>
</el-image>
</template>
<template v-else-if="column.prop=='zmjgzp'">
<el-image style="width:204px;height:120px;"
:src="row.zmjgzp"
:preview-src-list="[row.zmjgzp]"
alt="">
<div slot="error"
class="image-slot el-image__error">
<i class="el-icon-picture-outline"></i>
<p>暂无图片</p>
</div>
</el-image>
</template>
<template v-else-if="column.prop=='fmjgzp'">
<el-image style="width:204px;height:120px;"
:src="row.fmjgzp"
:preview-src-list="[row.fmjgzp]"
alt="">
<div slot="error"
class="image-slot el-image__error">
<i class="el-icon-picture-outline"></i>
<p>暂无图片</p>
</div>
</el-image>
</template>
<template v-else-if="column.prop=='wj'">
<el-image style="width:204px;height:120px;" <el-image style="width:204px;height:120px;"
:src="row.faceUrl" :src="row.wj&&row.wj[0].dzwjnrBase64"
:preview-src-list="[row.faceUrl]" :preview-src-list="[row.wj&&row.wj[0].dzwjnrBase64]"
alt=""> alt="">
<div slot="error" <div slot="error"
class="image-slot el-image__error"> class="image-slot el-image__error">
...@@ -110,10 +189,10 @@ ...@@ -110,10 +189,10 @@
</div> </div>
</el-image> </el-image>
</template> </template>
<template v-else-if="column.prop=='imgFace'"> <template v-else-if="column.prop=='wj2'">
<el-image style="width:204px;height:120px;" <el-image style="width:204px;height:120px;"
:src="row.imgFace" :src="row.wj&&row.wj[1].dzwjnrBase64"
:preview-src-list="[row.imgFace]" :preview-src-list="[row.wj&&row.wj[1].dzwjnrBase64]"
alt=""> alt="">
<div slot="error" <div slot="error"
class="image-slot el-image__error"> class="image-slot el-image__error">
......
<!--
* @Author: your name
* @Date: 2021-08-31 09:51:34
* @LastEditTime: 2021-10-22 10:29:58
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\components\PersonInfor.vue
-->
<template>
<div class="rightContent"
id="personInfor">
<div class="Content paneDiv paneDiv2">
<div class="header">
<span class="title">{{ title || "人员信息详情" }}</span>
<span class="iconBox">
<slot name="icon"></slot>
</span>
</div>
<div class="Boxcontent">
<div class="content">
<div class="imgBox"
v-if="imgArr && imgArr.length > 0">
<img :src="item"
alt=""
v-for="item in imgArr"
:key="item" />
</div>
<div :class="{
inforContent: true,
pt0: (imgArr && imgArr.length) > 0 ? false : true,
}">
<div class="itemBox"
v-for="item in cxQueryField"
:key="item.id"
v-show="
(item.applyType == 'list' &&
pageData[item.objStr] &&
pageData[item.objStr].length > 0) ||
item.applyType !== 'list'
">
<div v-if="
item.applyType == 'list' &&
pageData[item.objStr] &&
pageData[item.objStr].length > 0
">
<div class="module"
v-for="(item1, index) in pageData[item.objStr]"
:key="index">
<div class="title"
v-if="item.title">
{{ item.title + (index + 1) }}
</div>
<div class="rows">
<div :class="'col' + i.col"
v-for="i in item.data"
:key="i.prop">
<span class="label"
style="width: 90px">{{
i.label
}}</span>
<span v-if="
i.prop == 'spflwsfjssss' || i.prop == 'zpflwsfjssss'
">
<div v-for="(itemss, indexss) in item1[i.props]"
:key="indexss">
<div style="margin-left: 146px"
class="fj_name">
<i class="iconfont iconfujian-wenjian"></i>
<span>{{ itemss.xsfjDzwjbt }}</span>
</div>
</div>
</span>
<span v-if="i.prop == 'asjbh'"
class="cont"
:style="{ width: `calc(100% - 90px)` }">
<span>{{ pageData[item.objStr][index].asjbh }}</span>
<el-popover placement="right"
trigger="click">
<div>
<ul class="popUl"
style="position: absolute; left: -1px; top: -30px">
<li>
<span>{{
pageData[item.objStr][index].asjbh
}}</span>
</li>
<li @click="
ychyLink(
'ajzb',
pageData[item.objStr][index].asjbh
)
">
<i class="el-icon-coin"></i><span>案件侦办</span>
</li>
<li @click="
ychyLink(
'skzz',
pageData[item.objStr][index].asjbh
)
">
<i class="el-icon-link"></i>
<span>时空作战</span>
</li>
</ul>
</div>
<!-- <img slot="reference"
src="../assets/img/asjxx_ychy.png"
style="width: 20px; cursor: pointer" /> -->
</el-popover>
</span>
<span v-if="
item.objStr &&
(i.prop != 'spflwsfjssss' ||
i.prop != 'zpflwsfjssss') &&
i.prop != 'asjbh'
"
class="cont"
:style="{ width: `calc(100% - ${labelWidth})` }">{{
(pageData[item.objStr][index] &&
pageData[item.objStr][index][i.prop]) ||
"-"
}}</span>
</div>
</div>
</div>
</div>
<div class="module"
v-else>
<div class="title"
v-if="item.title">{{ item.title }}</div>
<div class="rows">
<div :class="'col' + i.col"
v-for="i in item.data"
v-show="!i.hidden"
:key="i.prop">
<span class="label"
:style="{ width: labelWidth }">{{
i.label
}}</span>
<div v-if="item.objStr"
class="cont"
:style="{ width: `calc(100% - ${labelWidth})` }">
{{
(pageData[item.objStr] &&
pageData[item.objStr][i.prop]) ||
"-"
}}
</div>
<div v-else
class="cont"
:style="{ width: `calc(100% - ${labelWidth})` }">
<!-- pageData[i.prop] || -->
<div class="photoBox"
v-if="i.type == 'photo' && pageData[i.prop]">
<span class="textBox"><i class="el-icon-tickets"></i><span class="textFlow"
:title="pageData[i.prop] && pageData[i.prop].name">{{
pageData[i.prop] && pageData[i.prop].name
}}</span></span>
<span @click="preview(pageData[i.prop])"
class="yltext">{{ "预览" }}</span>
</div>
<div id="PhotoNew"
class="photoBox"
v-else-if="i.type == 'photoNew' && pageData[i.prop]">
<!-- {{ pageData[i.prop].src }} -->
<el-image class="new-image"
@click.stop="handleClose"
:preview-src-list="[pageData[i.prop].src]"
:src="pageData[i.prop].src"
lazy></el-image>
</div>
<!-- 审批详情 -->
<div id="PhotoNew"
class="photoBox"
v-else-if="i.type == 'photoSp' && pageData[i.prop]">
<!-- {{ pageData[i.prop].src }} -->
<el-image class="new-image"
@click.stop="handleClose"
:preview-src-list="[pageData[i.prop]]"
:src="pageData[i.prop]"></el-image>
</div>
<!-- 群体研判页面只有标题没有文件,显示为比标题 -->
<div v-else-if="i.type == 'photoW' && pageData[i.prop]">
<p class="photoBox"
v-for="(itemW, index) in pageData[i.prop]"
:key="index">
<span>
{{ itemW.fjDzwjbt }}
</span>
</p>
</div>
<span v-else>{{ pageData[i.prop] || "-" }}</span>
</div>
</div>
</div>
</div>
<slot name="datas"
:datas="pageData"></slot>
</div>
</div>
</div>
<div class="footer">
<div class="rows">
<div :class="'col' + item.col"
v-for="item in footerProps"
:key="item.prop">
<span class="label">{{ item.label }}</span>
<span class="cont">{{ pageData[item.prop] || "-" }}</span>
</div>
</div>
</div>
<div>
<slot name="tableSlot"></slot>
</div>
</div>
</div>
<el-image style="width: 0px; height: 0px"
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
:preview-src-list="[url]"
ref="image">
</el-image>
</div>
</template>
<script>
import encrypt from "@/utils/encry.js";
export default {
data () {
return {
//页脚配置
footerProps: this.pageFooterProps,
//页面信息对象
pageData: this.pageObject,
col: 0,
url: "https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg",
};
},
props: {
//详情配置
cxQueryField: {
type: Array,
default: () => [],
},
//页脚配置
pageFooterProps: {
type: Array,
default: () => [],
},
//接口请求的对象所有信息都包含的
pageObject: {
type: Object,
default: () => ({}),
},
//label的宽度默认80
labelWidth: String,
//页面标题
title: String,
//照片集合
imgArr: Array,
},
methods: {
handleClose () {
this.$nextTick(() => {
let domImageView = document.querySelector(".el-image-viewer__mask"); // 获取遮罩层dom
if (!domImageView) {
return;
}
domImageView.addEventListener("click", () => {
// 点击遮罩层时调用关闭按钮的 click 事件
document.querySelector(".el-image-viewer__close").click();
});
});
},
ychyLink (type, asjbh) {
if (type == "ajzb") {
let id = encrypt.Encrypt(
JSON.parse(sessionStorage.getItem("userInfo")).identitycard
);
let path = `http://65.26.106.172:9007/#/jump?identitycard=${id}&path=/ajzbDetails&asjbh=${asjbh}`;
window.open(path, "_blank");
} else {
let key =
"maplogin" +
encrypt.creattimeBumderNYR(new Date()).split("-").join("");
let vi =
"map_vues" +
encrypt.creattimeBumderNYR(new Date()).split("-").join("");
let skjm = encrypt.skEncrypt(
JSON.parse(sessionStorage.getItem("userInfo")).identitycard,
key.trim(),
vi.trim()
);
let path = `${this.$baseUrl.alyIP9}/#/jumplogin?idcard=${skjm}&toType=yazc&objectValue=${asjbh}`;
window.open(path, "_blank");
}
},
preview (photoData) {
this.url = photoData.src ? photoData.src : photoData;
this.$refs.image.clickHandler();
},
},
mounted () { },
watch: {
pageObject: {
handler: function (val) {
this.pageData = val;
},
deep: true,
},
},
};
</script>
<style lang="scss" scoped>
.popUl {
ul {
li {
i {
margin-right: 15px;
color: #3f95e6;
}
}
}
}
#PhotoNew {
border: 0px solid rgba(0, 0, 0, 0.18);
.el-image {
width: 178px;
height: 178px;
}
}
i.iconfont.iconfujian-wenjian {
color: #ffa456;
margin-right: 9px;
}
@mixin pageStyle() {
padding: 13px 50px;
}
@mixin photoStyle() {
display: flex;
align-items: center;
background-color: #fcfcfd;
border: 1px solid rgba(0, 0, 0, 0.18);
}
.rightContent {
flex: 1;
height: 100%;
width: 1200px;
margin: 0 auto;
overflow-y: auto;
.paneDiv {
background: #ffffff;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.18);
opacity: 1;
border-radius: 4px;
margin: 16px 20px 50px;
position: relative;
}
.paneDiv2 {
background: #ffffff;
border: 1px solid #eaeaea;
box-shadow: none;
opacity: 1;
border-radius: 8px;
}
.header {
padding: 13px 20px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #e4e4e4;
.title {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 600;
color: #363636;
}
.iconBox {
i {
font-size: 18px;
color: #808591;
&:not(:last-of-type) {
margin-right: 15px;
}
}
}
}
.Boxcontent {
@include pageStyle();
.content {
height: auto;
display: block;
.imgBox {
margin: 6px 0 10px;
> img {
width: 140px;
height: 140px;
margin-left: 20px;
&:first-of-type {
margin-left: 10px;
}
}
}
.inforContent {
padding: 10px 0;
width: 100%;
border-bottom: 1px solid #e4e4e4;
.rows {
box-sizing: border-box;
width: 100%;
padding: 5px 10px;
}
}
.pt0 {
padding-top: 0;
}
}
.footer {
padding-top: 13px;
.rows {
box-sizing: border-box;
width: 100%;
padding: 0 10px;
.label {
color: #808591 !important;
font-weight: bold !important;
}
}
}
}
.el-icon-tickets {
color: #ffa456;
margin-right: 7px;
font-size: 17px;
}
.yltext {
width: 20%;
text-align: center;
color: #3f95e6;
cursor: pointer;
}
.textBox {
width: 80%;
padding-left: 10px;
box-sizing: border-box;
display: flex !important;
align-items: center;
}
.textFlow {
text-overflow: ellipsis;
width: calc(100% - 30px);
display: inline-block;
white-space: nowrap;
overflow: hidden;
}
.module {
padding: 10px 0;
}
.photoBox {
@include photoStyle();
width: 100%;
}
.itemBox {
.title {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 600;
color: #ff8d1e;
border-bottom: 1px solid #e4e4e4;
padding-bottom: 10px;
}
}
.col3,
.col6,
.col10,
.col5,
.col13 {
display: inline-block;
vertical-align: top;
padding: 5px 0;
.label {
font-size: 15px;
color: #363636;
font-weight: bold;
display: inline-block;
width: 80px;
text-align: left;
vertical-align: top;
}
.cont {
color: #808591;
font-size: 15px;
display: inline-block;
width: calc(100% - 80px);
box-sizing: border-box;
padding-right: 15px;
padding-left: 10px;
> span {
word-wrap: break-word;
}
}
}
.col3 {
width: 33%;
}
.col6 {
width: 66%;
}
.col10 {
width: 100%;
}
.col5 {
width: 50%;
}
.col13 {
width: 33%;
margin-right: 33%;
}
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<div>
<!--字典框 @emitValue="getLbValue"-->
<el-select :placeholder="curItem.placeholder"
v-model="curFormData[curItem.id]"
:class="curItem.code"
popper-class="zdyCodeDialog"
style="width: 100%"
@clear="clearSeleted"
@remove-tag="removeTag"
:popper-append-to-body="false"
:multiple="curItem.multiple"
:disabled="curItem.disabled"
empty-text="请从弹框中选择数据"
@focus="
(val, $event) =>
showCodeTreeDialog(val, curItem, curFormData, curItem.id)
"
clearable>
<el-option v-for="item2 in codeTreeConfig.fieldItem"
:key="item2.id"
:label="item2.label"
:value="item2.id">
</el-option>
</el-select>
<!--多级或多数据下拉框弹框样式-->
<el-dialog v-if="dialogCodeVisible"
custom-class="treeDialog"
:visible.sync="dialogCodeVisible"
style="z-index: 2020 !important"
:close-on-click-modal="false"
center>
<div slot="title"
class="header-title"
style="
text-align: left;
height: 30px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 30px;
opacity: 1;
">
<div>{{ codeTreeConfig.title }}</div>
</div>
<el-input placeholder="输入关键字进行过滤"
v-model="filterText"
style="
margin-bottom: 4px;
width: calc(100% - 26px) !important;
margin-left: 15px;
margin-top: 2px;
">
</el-input>
<div style="
width: calc(100% - 18px);
height: calc(100% - 42px);
overflow-y: auto;
border-bottom: 1px solid #f2f2f2;
margin-left: 7px;
">
<el-tree :props="defaultProps"
node-key="id"
:filter-node-method="filterNode"
ref="codeTreeDialog"
:default-expanded-keys="defaultExpandedKeys"
:default-checked-keys="
Array.isArray(curFormData[curItem.id])
? curFormData[curItem.id]
: [...curFormData[curItem.id]]
"
@check="codeTreeNodeCheck"
@check-change="handleNodeClick"
:check-on-click-node="true"
lazy
:load="loadNode"
check-strictly
show-checkbox
style="height: 288px">
</el-tree>
</div>
<div slot="footer"
class="dialog-footer ar"
style="margin-top: 11px">
<el-button @click="dialogCodeVisible = false"
style="width: 120px; height: 36px">取 消</el-button>
<el-button type="primary"
@click="forSureSelectCode"
style="width: 120px; height: 36px">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Http from "@/utils/http.js";
import url from "@/api/base";
export default {
name: "treeCode_components",
props: {
formData: Object,
currentItem: Object,
sendId: String,
},
data () {
return {
curFormData: this.formData,
curItem: this.currentItem,
defaultProps: {
parent: "parentId", // 父级唯一标识
value: "id", // 唯一标识
label: "label", // 标签显示
isLeaf: "leaf",
// children: 'children', // 子级
},
id: this.sendId,
filterText: "",
//多级或多数据下拉框弹框样式(数据量太多时使用这种风格 普通字典还用原来的下拉框)
dialogCodeVisible: false,
//树型字典配置
codeTreeConfig: {
//弹框标题
title: "案发地区划",
//值字段
nodeKey: "value",
//字典类型
codeType: "CODE_XZQH",
//绑定的model
realValue: null,
//当前要展示的字段
fieldItem: null,
//codeTree预设
props: [],
},
//默认展开的节点
defaultExpandedKeys: [],
};
},
computed: {
newValue () {
this.getcode();
return this.curFormData[this.curItem.id];
},
},
watch: {
formData (val) {
this.curFormData = val;
},
filterText (val) {
this.$refs.codeTreeDialog.filter(val);
},
newValue (val) {
// if (val != '' && this.codeTreeConfig.fieldItem == null) {
if (val != "") {
var self = this;
//判断是否要回显
if (self.curFormData[self.curItem.id]) {
let parm = {
type: self.currentItem.codeTree,
id: self.curFormData[self.curItem.id],
grade: "prev",
};
debugger;
self.doQueryRequest(parm, "/queryCodeByType").then((codeResult) => {
var thisCodeOptions = [];
if (codeResult.code == 200) {
var codRes = codeResult.data.data.data;
var codeArry = [];
var realCodeResult = [];
for (var j = 0; j < codRes.length; j++) {
var singleRow = codRes[j];
if (singleRow.id == val) {
thisCodeOptions.push({
id: singleRow.id,
label: singleRow.label,
});
} else {
if (singleRow.children && singleRow.children.length > 0) {
var thisItem = self.getChildrenItem(val, singleRow);
if (thisItem) {
thisCodeOptions.push({
id: thisItem.id,
label: thisItem.label,
});
}
}
}
}
if (thisCodeOptions.length < 0) {
self.$emit("clearId");
}
self.codeTreeConfig.fieldItem = thisCodeOptions;
}
});
}
}
},
},
methods: {
getcode () {
var self = this;
if (self.curFormData[self.curItem.id]) {
let parm = {
type: self.currentItem.codeTree,
id: self.curFormData[self.curItem.id],
grade: "prev",
};
debugger;
self.doQueryRequest(parm, "/queryCodeByType").then((codeResult) => {
var thisCodeOptions = [];
console.log(codeResult, 222222222);
if (codeResult.code == 200) {
var codRes = codeResult.data.data.rows;
var codeArry = [];
var realCodeResult = [];
for (var j = 0; j < codRes.length; j++) {
var singleRow = codRes[j];
if (singleRow.id == self.curFormData[self.curItem.id]) {
thisCodeOptions.push({
id: singleRow.id,
label: singleRow.label,
});
} else {
if (singleRow.children && singleRow.children.length > 0) {
var thisItem = self.getChildrenItem(
self.curFormData[self.curItem.id],
singleRow
);
if (thisItem) {
thisCodeOptions.push({
id: thisItem.id,
label: thisItem.label,
});
}
}
}
}
if (thisCodeOptions.length == 0) {
self.$emit("clearId");
}
self.codeTreeConfig.fieldItem = thisCodeOptions;
}
});
}
},
// 搜索树状数据中的 ID
queryTree (tree, id) {
let stark = [];
stark = stark.concat(tree);
while (stark.length) {
const temp = stark.shift();
if (temp[this.defaultProps.children]) {
stark = stark.concat(temp[this.defaultProps.children]);
}
if (temp[this.defaultProps.value] === id) {
return temp[this.defaultProps.label];
}
}
return "";
},
//多选模式下移除tag时触发
removeTag (val) {
let self = this,
label = "";
self.codeTreeConfig.fieldItem.splice(
self.codeTreeConfig.fieldItem.findIndex((item) => item.id === val),
1
);
if (self.codeTreeConfig.fieldItem.length != 0) {
self.codeTreeConfig.fieldItem.forEach((item, index) => {
label += index == 0 ? "" + item.label : "," + item.label;
});
} else {
label = "";
}
this.$emit("getDialogSeleted", label);
},
//可清空的单选模式下用户点击清空按钮时触发
clearSeleted () {
this.$emit("getDialogSeleted", "");
},
//确定选择当前用户
forSureSelectCode () {
var self = this;
var thisCodeOptions = [];
if (self.$refs.codeTreeDialog.getCheckedNodes().length != 0) {
if (self.curItem.multiple) {
self.$set(
self.codeTreeConfig.realFatherValue,
self.codeTreeConfig.realrValueKey,
self.$refs.codeTreeDialog.getCheckedKeys()
);
var selectedNodes = self.$refs.codeTreeDialog.getCheckedNodes();
for (var i = 0; i < selectedNodes.length; i++) {
thisCodeOptions.push({
id: self.$refs.codeTreeDialog.getCheckedNodes()[i].id,
label: self.$refs.codeTreeDialog.getCheckedNodes()[i].label,
});
}
} else {
self.$set(
self.codeTreeConfig.realFatherValue,
self.codeTreeConfig.realrValueKey,
self.$refs.codeTreeDialog.getCheckedNodes()[0].id
);
thisCodeOptions.push({
id: self.$refs.codeTreeDialog.getCheckedNodes()[0].id,
label: self.$refs.codeTreeDialog.getCheckedNodes()[0].label,
});
}
self.codeTreeConfig.fieldItem = thisCodeOptions;
if (self.codeTreeConfig.fieldItem.type == "codeTag") {
self.changeTags(
self.$refs.codeTreeDialog.getCheckedKeys(),
self.codeTreeConfig.fieldItem
);
}
self.$forceUpdate();
if (self.curItem.multiple) {
let label = "";
thisCodeOptions.forEach((item, index) => {
label += index == 0 ? "" + item.label : "," + item.label;
});
self.$emit("getDialogSeleted", label);
} else {
self.$emit("getDialogSeleted", thisCodeOptions[0].label);
}
} else {
//没有选值得情况
self.$set(
self.codeTreeConfig.realFatherValue,
self.codeTreeConfig.realrValueKey,
""
);
self.$forceUpdate();
self.$emit("getDialogSeleted", "");
}
self.dialogCodeVisible = false;
},
//对树节点进行筛选
filterNode (value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1 || data.id.indexOf(value) !== -1;
},
//树节点点击事件(改为点选)
handleNodeClick (data, checked) {
var self = this;
if (!self.curItem.multiple) {
if (checked === true) {
self.codeTreeConfig.codeId = data.id;
self.$refs.codeTreeDialog.setCheckedKeys([data.id]);
} else {
if (self.codeTreeConfig.codeId === data.id) {
self.$refs.codeTreeDialog.setCheckedKeys([]);
}
}
}
},
//树形字典节点点击事件(用来拦截并控制单选)
codeTreeNodeCheck (data, checked, node) {
console.log(data, checked, node);
},
/**
* 展示字典树弹出框
*/
showCodeTreeDialog (value, item, realFormLableAlign, realValueKey) {
var self = this;
//判断是否要回显
if (realFormLableAlign[realValueKey]) {
let parm = {
type: self.currentItem.codeTree,
id: realFormLableAlign[realValueKey],
grade: "prev",
};
debugger;
self.doQueryRequest(parm, "/queryCodeByType").then((codeResult) => {
console.log(codeResult, 33333);
if (codeResult.code == 200) {
var codRes = codeResult.data.data.data;
var codeArry = [];
var realCodeResult = [];
for (var j = 0; j < codRes.length; j++) {
var singleRow = codRes[j];
if (singleRow.children && singleRow.children.length > 0) {
codeArry.push(singleRow.id);
self.getChildrenCode(codeArry, singleRow);
}
}
self.defaultExpandedKeys = codeArry;
}
});
}
if (value) {
self.filterText = "";
self.codeTreeConfig.nodeKey = "value";
self.codeTreeConfig.codeType = item.codeTree;
self.codeTreeConfig.codeId = "";
if (this.curFormData[this.curItem.id] == "") {
self.codeTreeConfig.fieldItem = item;
} else {
if (
self.codeTreeConfig.fieldItem == null ||
self.codeTreeConfig.fieldItem.length == 0 ||
self.codeTreeConfig.fieldItem == ""
) {
self.codeTreeConfig.fieldItem = item;
}
}
self.codeTreeConfig.realFatherValue = realFormLableAlign;
self.codeTreeConfig.realrValueKey = realValueKey;
//先设置一个默认空值
self.codeTreeConfig.realValue = realFormLableAlign[realValueKey];
self.codeTreeConfig.title = item.name;
//延迟加载使弹框的z-index值在el-select之上
setTimeout(() => {
self.dialogCodeVisible = true;
}, 10);
if (item.codeTree == "CODE_AJXZ_MA") {
if (realFormLableAlign["ajlbdm"]) {
self.codeTreeConfig.props = item.codeOptions.slice(0);
self.codeTreeConfig.props.forEach((item) => {
if (item.id == realFormLableAlign["ajlbdm"]) {
self.codeTreeConfig.props = item.children;
return false;
}
});
} else {
self.codeTreeConfig.props = [];
return;
}
} else {
self.codeTreeConfig.props = item.codeOptions;
}
}
},
/**
* 懒加载节点
*/
loadNode (currentNode, resolve) {
var self = this;
var cc = arguments;
let parm = {
type: self.currentItem.codeTree,
};
if (currentNode.level != 0) {
parm.id = currentNode.data.id;
parm.grade = "next";
}
debugger;
self.doQueryRequest(parm, "/queryCodeByType").then((codeResult) => {
console.log(codeResult, 55555555);
if (codeResult.data.code == 200) {
//判断是否有下级
codeResult.data.data.rows.forEach((realCodeItem) => {
realCodeItem.label =
realCodeItem.label + "[" + realCodeItem.id + "]";
if (realCodeItem.parentFlag == "true") {
realCodeItem.leaf = false;
} else {
realCodeItem.leaf = true;
}
});
resolve(codeResult.data.data.rows);
}
});
},
doQueryRequest (form, relurl) {
var currentUrl = relurl ? relurl : this.cxUrl;
return Http({
url: '/alyzd' + currentUrl,
data: form,
params: form,
method: "get",
headers: {
"blade-auth": sessionStorage.getItem("token"),
},
});
},
/**
* 获取子字典数据
*/
getChildrenCode (codeArry, singleRo) {
var self = this;
singleRo.children.forEach((childrenItem) => {
if (childrenItem.children && childrenItem.children.length > 0) {
codeArry.push(childrenItem.id);
self.getChildrenCode(codeArry, childrenItem);
}
});
},
/**
* 获取子字典数据item
*/
getChildrenItem (orgId, singleRo) {
var self = this;
var readyToReturn;
singleRo.children.forEach((childrenItem) => {
if (childrenItem.id == orgId) {
readyToReturn = childrenItem;
} else {
if (childrenItem.children.length > 0) {
readyToReturn = self.getChildrenItem(orgId, childrenItem);
}
}
});
return readyToReturn;
},
},
};
</script>
<style scoped lang="scss">
/deep/ .zdyCodeDialog {
opacity: 0;
}
/deep/ .treeDialog {
width: 680px;
height: 498px;
background: #ffffff;
box-shadow: 0px 8px 8px rgba(0, 0, 0, 0.1);
opacity: 1;
border-radius: 8px;
position: absolute;
top: 40%;
left: 50%;
margin-top: -223px !important;
margin-left: -340px;
z-index: 100;
.el-dialog__body {
height: 390px;
}
}
</style>
<template>
<el-popover
ref="popover"
placement="bottom-start"
trigger="click"
@show="onShowPopover"
@hide="onHidePopover"
>
<el-tree
ref="tree"
class="select-tree"
:style="{ 'min-width': treeWidth }"
highlight-current
:data="data"
:props="props"
:expand-on-click-node="false"
:filter-node-method="filterNode"
:default-expand-all="false"
@node-click="onClickNode"
/>
<el-input
slot="reference"
ref="input"
v-model="labelModel"
clearable
@clear="clearSeleted"
:class="{ rotate: showStatus }"
:placeholder="placeholder"
suffix-icon="el-icon-arrow-down"
>
<!--<i slot="suffix" class="iconfont iconzidianmaxuanze"></i>-->
</el-input>
</el-popover>
</template>
<script>
export default {
name: "ElSelectTree",
// 设置绑定参数
model: {
prop: "value",
event: "selected"
},
props: {
sendId: String,
// 接收绑定参数
value: String,
// 输入框宽度
width: String,
// 选项数据
options: {
type: Array,
required: true
},
// 输入框占位符
placeholder: {
type: String,
required: false,
default: "请选择"
},
// 树节点配置选项
props: {
type: Object,
required: false,
default: () => ({
parent: "parentId",
value: "id",
label: "label",
children: "children"
})
}
},
data() {
return {
// 树状菜单显示状态
showStatus: false,
// 菜单宽度
treeWidth: "auto",
// 输入框显示值
labelModel: "",
// 实际请求传值
valueModel: ""
};
},
computed: {
// 是否为树状结构数据
dataType() {
const jsonStr = JSON.stringify(this.options);
/*if (process.client) {*/
return jsonStr.indexOf(this.props.children) !== -1;
/* }*/
},
// 若非树状结构,则转化为树状结构数据
data() {
return this.dataType ? this.options : this.switchTree();
}
},
watch: {
labelModel(val) {
if (!val) {
this.valueModel = "";
}
/* if (process.client) {*/
this.$refs.tree.filter(val);
this.$emit("getSeleted", this.labelModel);
/* }*/
},
value(val) {
if (this.sendId && val == "") {
this.$emit("emitQkValue", this.sendId, val);
}
this.labelModel = this.queryTree(this.data, val);
this.$emit("getSeleted", this.labelModel);
}
},
created() {
// 检测输入框原有值并显示对应 label
if (this.value) {
this.labelModel = this.queryTree(this.data, this.value);
}
// 获取输入框宽度同步至树状菜单宽度
this.$nextTick(() => {
/* if (process.client) {*/
this.treeWidth = `${(this.width ||
this.$refs.input.$refs.input.clientWidth) - 24}px`;
/* }*/
});
},
methods: {
clearSearchValue(){
this.labelModel='';
},
clearSeleted() {
this.$emit("getSeleted", this.labelModel);
},
// 单击节点
onClickNode(node) {
this.labelModel = node[this.props.label];
this.valueModel = node[this.props.value];
if (this.sendId) {
this.$emit("emitValue", this.sendId, node.id, node.parentId);
}
this.onCloseTree();
this.$emit("getSeleted", this.labelModel);
},
// 偏平数组转化为树状层级结构
switchTree() {
return this.cleanChildren(this.buildTree(this.options, "0"));
},
// 隐藏树状菜单
onCloseTree() {
/*if (process.client) {
this.$refs.popover.showPopper = false;
}*/
this.$refs.popover.showPopper = false;
},
// 显示时触发
onShowPopover() {
this.showStatus = true;
/* if (process.client) {
this.$refs.tree.filter(false);
}*/
this.$refs.tree.filter(false);
},
// 隐藏时触发
onHidePopover() {
this.showStatus = false;
this.$emit("selected", this.valueModel);
},
// 树节点过滤方法
filterNode(query, data) {
if (!query) return true;
/*if (process.client) {*/
return data[this.props.label].indexOf(query) !== -1;
/* }*/
},
// 搜索树状数据中的 ID
queryTree(tree, id) {
let stark = [];
stark = stark.concat(tree);
/* if (process.client) {*/
while (stark.length) {
const temp = stark.shift();
if (temp[this.props.children]) {
stark = stark.concat(temp[this.props.children]);
}
if (temp[this.props.value] === id) {
return temp[this.props.label];
}
}
/* }*/
return "";
},
// 将一维的扁平数组转换为多层级对象
buildTree(data, id = "0") {
const fa = parentId => {
const temp = [];
/*if (process.client) {*/
for (let i = 0; i < data.length; i++) {
const n = data[i];
if (n[this.props.parent] === parentId) {
n.children = fa(n.rowGuid);
temp.push(n);
}
}
/* }*/
return temp;
};
return fa(id);
},
// 清除空 children项
cleanChildren(data) {
const fa = list => {
list.map(e => {
/*if (process.client) {*/
if (e.children.length) {
fa(e.children);
} else {
delete e.children;
}
/* }*/
return e;
});
return list;
};
return fa(data);
}
}
};
</script>
<style>
.el-input.el-input--suffix {
cursor: pointer;
overflow: hidden;
}
.el-input.el-input--suffix.rotate .el-input__suffix {
transform: rotate(180deg);
}
.select-tree {
max-height: 350px;
overflow-y: scroll;
}
/* 菜单滚动条 */
.select-tree::-webkit-scrollbar {
z-index: 11;
width: 6px;
}
.select-tree::-webkit-scrollbar-track,
.select-tree::-webkit-scrollbar-corner {
background: #fff;
}
.select-tree::-webkit-scrollbar-thumb {
border-radius: 5px;
width: 6px;
background: #b4bccc;
}
.select-tree::-webkit-scrollbar-track-piece {
background: #fff;
width: 6px;
}
</style>
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<el-menu-item :index="subitem.index" <el-menu-item :index="subitem.index"
v-for="(subitem, index) in item.children" v-for="(subitem, index) in item.children"
:key="index" :key="index"
v-permission="subitem.newAuth"
@click="goDetail(subitem)"><i class="iconfont iconquanxianjiesuo" @click="goDetail(subitem)"><i class="iconfont iconquanxianjiesuo"
v-show="subitem.disabled"></i>{{ subitem.label }}</el-menu-item> v-show="subitem.disabled"></i>{{ subitem.label }}</el-menu-item>
</el-submenu> </el-submenu>
...@@ -56,13 +57,13 @@ ...@@ -56,13 +57,13 @@
<div class="queryContent" <div class="queryContent"
:style="{ width: isCollapse == true ? 'calc(100% - 72px)' : 'calc(100% - 200px)' }"> :style="{ width: isCollapse == true ? 'calc(100% - 72px)' : 'calc(100% - 200px)' }">
<div class="main_top"> <div class="main_top">
<div class="top_left"> <!-- <div class="top_left">
<i :class="isCollapse == true ? 'el-icon-s-unfold':'el-icon-s-fold'" <i :class="isCollapse == true ? 'el-icon-s-unfold':'el-icon-s-fold'"
@click="isCollapseBtn"></i> @click="isCollapseBtn"></i>
<i class="iconfont icon-shuaxin" <i class="iconfont icon-shuaxin"
@click="reFresh"></i> @click="reFresh"></i>
</div> </div> -->
<div class="top_right"> <i class="iconfont icon-youjian"></i> <div class="top_right"> <i class="iconfont icon-youjian"></i>
<div class="full" <div class="full"
@click="full"> @click="full">
...@@ -74,17 +75,67 @@ ...@@ -74,17 +75,67 @@
v-show="!isFull"></i> v-show="!isFull"></i>
</div> </div>
</div> </div>
<el-menu class="el-menu-demo"
mode="horizontal">
<el-submenu index="2">
<template slot="title">
<span>{{userAuth.userName}}</span>
</template>
<el-menu-item index="2-1"
@click="editMm">修改密码</el-menu-item>
<el-menu-item index="2-2"
@click="loginOut">退出</el-menu-item>
</el-submenu>
</el-menu>
</div> </div>
<div class="rightContent"> <div class="rightContent">
<router-view v-if="isActive" /> <router-view v-if="isActive" />
</div> </div>
</div> </div>
<!-- 修改密码 -->
<el-dialog title="修改密码"
class="dialogPass"
:visible.sync="dialogVisibleMzxg"
width="30%">
<div class="name">
<el-form ref="form"
:model="form"
label-width="120px"
:rules="rules">
<el-form-item label="请输入旧密码: "
prop="oldPassword">
<el-input placeholder="请输入旧密码"
v-model="form.oldPassword"></el-input>
</el-form-item>
<el-form-item label="请输入新密码: "
prop="newPassword">
<el-input placeholder="请输入新密码"
show-password
v-model="form.newPassword"></el-input>
</el-form-item>
<el-form-item label="请确定新密码: "
prop="newPassword1">
<el-input placeholder="请确定新密码"
show-password
v-model="form.newPassword1"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer"
class="dialog-footer">
<el-button @click="dialogVisibleMzxg = false">取 消</el-button>
<el-button type="primary"
:loading="loadingPass"
@click="submitMaa">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import screenfull from "screenfull"; import screenfull from "screenfull";
import { updateUserMm } from "@/api/userAuth/addUser.js";
export default { export default {
name: "leftMenu_components", name: "leftMenu_components",
...@@ -92,7 +143,48 @@ export default { ...@@ -92,7 +143,48 @@ export default {
isCollapseP: Boolean, isCollapseP: Boolean,
}, },
data () { data () {
const ma = (rule, value, callback) => {
let patter =
/^\S*(?=\S{8,32})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/;
if (!patter.test(value)) {
return callback(
new Error(
"密码中必须包含大小写字母、数字、特殊字符,且长度在8-32位,请重新修改密码!"
)
);
} else {
callback(); //必须有此项回调,否则验证会一直不通过
}
};
var validatePass2 = (rule, value, callback) => {
if (value === "") {
callback(new Error("请再次输入密码"));
} else if (value !== this.form.newPassword) {
callback(new Error("两次输入密码不一致!"));
} else {
callback();
}
};
return { return {
loadingPass: false,
dialogVisibleMzxg: false,
form: {
id: "",
oldPassword: "",
newPassword: "",
newPassword1: "",
},
rules: {
oldPassword: [
{ required: true, message: "请输入旧密码", trigger: "blur" },
],
newPassword: [{ required: true, trigger: "blur" }],
newPassword1: [
{ required: true, trigger: "blur" },
],
},
// validator: ma,
// validator: validatePass2,
isFull: false, //是否全屏 isFull: false, //是否全屏
isActive: true, isActive: true,
NavActive: this.$route.path, NavActive: this.$route.path,
...@@ -140,7 +232,7 @@ export default { ...@@ -140,7 +232,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapGetters(["topMenu", "leftMenu", "header"]), ...mapGetters(["topMenu", "leftMenu", "header", "userAuth"]),
}, },
created () { created () {
console.log(this.$route.path, `'/' + ${this.$route.path.split('/')[1]} + '/' + ${this.$route.path.split('/')[2]}`, 11); console.log(this.$route.path, `'/' + ${this.$route.path.split('/')[1]} + '/' + ${this.$route.path.split('/')[2]}`, 11);
...@@ -149,6 +241,32 @@ export default { ...@@ -149,6 +241,32 @@ export default {
if (this.leftMenu.length && this.leftMenu.length > 0) { this.leftMenus = this.leftMenu; } if (this.leftMenu.length && this.leftMenu.length > 0) { this.leftMenus = this.leftMenu; }
}, },
methods: { methods: {
editMm () {
this.dialogVisibleMzxg = true;
this.$set(this.form, "id", this.userAuth.userId);
},
submitMaa () {
this.$refs.form.validate((valid) => {
if (valid) {
this.loadingPass = true
updateUserMm(this.form).then((res) => {
try {
if (res.data.code == 200) {
this.dialogVisibleMzxg = false;
this.$message.success("密码修改成功!");
this.loadingPass = false
} else {
this.$message.error(res.data.message);
}
} catch (err) {
console.log(err);
this.$message.error(res.data.message);
}
});
}
});
},
// 是否全屏 // 是否全屏
full () { full () {
screenfull.toggle(); screenfull.toggle();
...@@ -182,6 +300,18 @@ export default { ...@@ -182,6 +300,18 @@ export default {
changeSidebar (index) { changeSidebar (index) {
sessionStorage.setItem("routerPath", index); sessionStorage.setItem("routerPath", index);
}, },
loginOut () {
this.$confirm("此操作将退出登录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
localStorage.removeItem("userInfo")
localStorage.removeItem('token')
this.$router.replace('/login')
}).catch(() => { });
}
}, },
watch: { watch: {
isCollapseP (val) { isCollapseP (val) {
...@@ -204,7 +334,14 @@ export default { ...@@ -204,7 +334,14 @@ export default {
}; };
</script> </script>
<style> <style lang="scss">
.el-menu--horizontal {
.el-menu--popup {
min-width: 90px !important;
}
}
.dialogPass {
}
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
@import "../assets/styles/leftMenu.scss"; @import "../assets/styles/leftMenu.scss";
...@@ -224,4 +361,14 @@ export default { ...@@ -224,4 +361,14 @@ export default {
.el-menu-item { .el-menu-item {
padding-left: 14px !important; padding-left: 14px !important;
} }
.get-user {
/deep/.el-menu--popup {
min-width: 90px !important;
}
}
::v-deep .dialogPass {
.el-dialog__body {
padding: 24px !important;
}
}
</style> </style>
...@@ -10,7 +10,9 @@ import Watermark from "@/utils/watermark.js" ...@@ -10,7 +10,9 @@ import Watermark from "@/utils/watermark.js"
import Driver from 'driver.js' import Driver from 'driver.js'
import 'driver.js/dist/driver.min.css' import 'driver.js/dist/driver.min.css'
import '@/assets/font/iconfont.css' import '@/assets/font/iconfont.css'
import rules from "./utils/rules.js";
import moments from 'moment' import moments from 'moment'
Vue.prototype.$rules = rules;
Vue.prototype.$moment = moments; Vue.prototype.$moment = moments;
//全局导出excel //全局导出excel
import htmlToExcel from './excel/htmlToExcel'; import htmlToExcel from './excel/htmlToExcel';
...@@ -45,7 +47,7 @@ if (userInfo) { ...@@ -45,7 +47,7 @@ if (userInfo) {
let zjhm = userInfo.identitycard.replace(/^(.{10})(?:\d+)(.{4})$/, "$1****$2") let zjhm = userInfo.identitycard.replace(/^(.{10})(?:\d+)(.{4})$/, "$1****$2")
let name = userInfo.realname.substring(0, userInfo.realname.length - 1) let name = userInfo.realname.substring(0, userInfo.realname.length - 1)
let names = userInfo.realname.replace(name, '***') let names = userInfo.realname.replace(name, '***')
let xmmc = '统计分析子系统' let xmmc = '跨区域协作平台'
let time = Util.timeStampTurnTime(new Date().getTime()) let time = Util.timeStampTurnTime(new Date().getTime())
let one = `${zjhm} ${names}` let one = `${zjhm} ${names}`
......
...@@ -22,4 +22,13 @@ export default [ ...@@ -22,4 +22,13 @@ export default [
}, },
component: () => import("@/views/login.vue") component: () => import("@/views/login.vue")
}, },
{
path: "/userRegister",
name: "userRegister",
meta: {
title: "注册",
auth: "5"
},
component: () => import("@/views/userRegister.vue")
},
] ]
\ No newline at end of file
...@@ -4,13 +4,51 @@ const menuLayouts = [ ...@@ -4,13 +4,51 @@ const menuLayouts = [
path: "/queryBaxz", path: "/queryBaxz",
name: "queryBaxz", name: "queryBaxz",
meta: { meta: {
title: '办案协作', title: '协作列表',
auth: "5", auth: "5",
}, },
component: () => import("@/views/baxz/queryBaxz.vue") component: () => import("@/views/baxz/queryBaxz.vue")
}, },
{
path: "/queryDshxz",
name: "queryDshxz",
meta: {
title: '待审核协作',
auth: "5",
},
component: () => import("@/views/baxz/queryDshxz.vue")
},
{
path: "/queryDbxz",
name: "queryDbxz",
meta: {
title: '待办协作',
auth: "5",
},
component: () => import("@/views/baxz/queryDbxz.vue")
},
{
path: "/queryYbxz",
name: "queryYbxz",
meta: {
title: '已办协作',
auth: "5",
},
component: () => import("@/views/baxz/queryYbxz.vue")
},
{
path: "/queryApproval",
name: "queryApproval",
meta: {
isAdd: false,
title: '注册审核管理'
},
component: () => import( /* webpackChunkName: "userAuth" */ "@/views/userAuth/approval/queryApproval.vue")
},
] ]
export default [{ export default [{
path: "/right", path: "/right",
...@@ -27,4 +65,43 @@ export default [{ ...@@ -27,4 +65,43 @@ export default [{
}, },
component: () => import("@/views/baxz/addBaxz.vue") component: () => import("@/views/baxz/addBaxz.vue")
}, },
{
path: "/editBaxz",
name: "editBaxz",
meta: {
title: '修改协作',
auth: "5",
},
component: () => import("@/views/baxz/editBaxz.vue")
},
{
path: "/addZhrxx",
name: "addZhrxx",
meta: {
title: '录入抓获人信息',
auth: "5",
},
component: () => import("@/views/baxz/addZhrxx.vue")
},
{
path: "/baxzDetail",
name: "baxzDetail",
meta: {
title: '协作详情',
auth: "5",
},
component: () => import("@/views/baxz/baxzDetail.vue")
},
{
path: "/userApproval",
name: "userApproval",
meta: {
isAdd: false,
title: '用户审批'
},
component: () => import( /* webpackChunkName: "userAuth" */ "@/views/userAuth/approval/userApproval.vue")
},
] ]
\ No newline at end of file
...@@ -3,9 +3,11 @@ ...@@ -3,9 +3,11 @@
*/ */
const validateisSFZH = (rule, value, callback) => { const validateisSFZH = (rule, value, callback) => {
// let patter = new RegExp("/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/");//验证是否身份证号 // let patter = new RegExp("/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/");//验证是否身份证号
let patter = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;//验证是否手机号 // let patter = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;//验证是否手机号
let patter = /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/
if (!patter.test(value)) { if (!patter.test(value)) {
return callback(new Error("请输入正确格式的身份证号!")); return callback(new Error("请输入正确格式的证件号码!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
} }
...@@ -19,18 +21,14 @@ const validateisNoiDentity = (rule, value, callback) => { ...@@ -19,18 +21,14 @@ const validateisNoiDentity = (rule, value, callback) => {
callback() callback()
} }
if (!patter.test(value)) { if (!patter.test(value)) {
return callback(new Error("请输入正确格式的身份证号!")); return callback(new Error("请输入正确格式的证件号码!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
} }
}; };
const validateisIphone = (rule, value, callback) => { const validateisIphone = (rule, value, callback) => {
// let patter = new RegExp("/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/");//验证是否身份证号 // let patter = new RegExp("/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/");//验证是否身份证号
let patter = /^1[345789]\d{9}$/;//验证是否手机号 let patter = /^1[3456789]\d{9}$/;//验证是否手机号
if (!value) {
callback()
}
if (!patter.test(value)) { if (!patter.test(value)) {
return callback(new Error("请输入正确格式的手机号!")); return callback(new Error("请输入正确格式的手机号!"));
} else { } else {
...@@ -42,7 +40,7 @@ const validateisPhone = (rule, value, callback) => { ...@@ -42,7 +40,7 @@ const validateisPhone = (rule, value, callback) => {
let patter = /^1[345789]\d{9}$/;//验证是否手机号 let patter = /^1[345789]\d{9}$/;//验证是否手机号
console.log(value) console.log(value)
// let patter = new RegExp("/^1[345789]\d{9}$/");//验证是否手机号 // let patter = new RegExp("/^1[345789]\d{9}$/");//验证是否手机号
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确格式的手机号!")); return callback(new Error("请输入正确格式的手机号!"));
} else { } else {
...@@ -52,15 +50,23 @@ const validateisPhone = (rule, value, callback) => { ...@@ -52,15 +50,23 @@ const validateisPhone = (rule, value, callback) => {
}; };
const validateisNumber = (rule, value, callback) => { const validateisNumber = (rule, value, callback) => {
let patter = /^[0-9]*$/;//验证是否是数字 let patter = /^[0-9]*$/;//验证是否是数字
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确的数字!")); return callback(new Error("请输入正确的数字!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
} }
}; };
const validateisNumberLen = (rule, value, callback) => {
let patter = /^[0-9]{0,6}$///验证是否是六位以内警号
if (value && !patter.test(value)) {
return callback(new Error("请输入六位以内的数字!"));
} else {
callback();//必须有此项回调,否则验证会一直不通过
}
};
const validateisWeight = (rule, value, callback) => { const validateisWeight = (rule, value, callback) => {
let patter = /^(0(\.\d{1}){0,1}|[1-8]\d{1,3}(\.\d{1}){0,1}|9\d{1,2}(\.\d{1}){0,1}|999(\.0){0,1}|.{0})$/; let patter = /^(0(\.\d{1}){0,1}|[1-8]\d{1,3}(\.\d{1}){0,1}|9\d{1,2}(\.\d{1}){0,1}|999(\.0){0,1}|.{0})$/;
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确的体重!")); return callback(new Error("请输入正确的体重!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
...@@ -68,7 +74,31 @@ const validateisWeight = (rule, value, callback) => { ...@@ -68,7 +74,31 @@ const validateisWeight = (rule, value, callback) => {
}; };
const validateisAj = (rule, value, callback) => { const validateisAj = (rule, value, callback) => {
let patter = /^A[0-9]{22}$/;//验证是否是案件编号 let patter = /^A[0-9]{22}$/;//验证是否是案件编号
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确的案件编号!"));
} else {
callback();//必须有此项回调,否则验证会一直不通过
}
};
const validateisXk = (rule, value, callback) => {
let patter = /^K[0-9]{22}$/;//验证是否是案件编号
if (value && !patter.test(value)) {
return callback(new Error("请输入正确的现勘编号!"));
} else {
callback();//必须有此项回调,否则验证会一直不通过
}
};
const validateisRy = (rule, value, callback) => {
let patter = /^P[0-9]{22}$/;//验证是否是案件编号
if (value && !patter.test(value)) {
return callback(new Error("请输入正确的人员编号!"));
} else {
callback();//必须有此项回调,否则验证会一直不通过
}
};
const validateisWP = (rule, value, callback) => {
let patter = /^W[0-9]{22}$/;//验证是否是案件编号
if (value && !patter.test(value)) {
return callback(new Error("请输入正确的案件编号!")); return callback(new Error("请输入正确的案件编号!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
...@@ -76,7 +106,7 @@ const validateisAj = (rule, value, callback) => { ...@@ -76,7 +106,7 @@ const validateisAj = (rule, value, callback) => {
}; };
const validateisYczc = (rule, value, callback) => { const validateisYczc = (rule, value, callback) => {
let patter = /^[A-Za-z0-9]{6}$/;//验证是否是车牌号 let patter = /^[A-Za-z0-9]{6}$/;//验证是否是车牌号
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确的车牌号!")); return callback(new Error("请输入正确的车牌号!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
...@@ -84,15 +114,25 @@ const validateisYczc = (rule, value, callback) => { ...@@ -84,15 +114,25 @@ const validateisYczc = (rule, value, callback) => {
}; };
const validateisPassword = (rule, value, callback) => { const validateisPassword = (rule, value, callback) => {
let patter = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6}$/;//验证是否是正确的6位密码 let patter = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6}$/;//验证是否是正确的6位密码
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确的正确的6位密码!")); return callback(new Error("请输入正确的正确的6位密码!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
} }
}; };
const validateisPasswordNew = (rule, value, callback) => {
let patter = /^\S*(?=\S{8,32})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/;
if (!value) {
return callback(new Error('不能为空'));
} else if (value && !patter.test(value)) {
return callback(new Error("密码必须包含大小写字母、数字、特殊字符,且长度在8-32位!"));
} else {
callback();//必须有此项回调,否则验证会一直不通过
}
};
const validateLowerCase = (rule, value, callback) => { const validateLowerCase = (rule, value, callback) => {
let patter = /^[a-z]+$/;//验证是否是小写字母 let patter = /^[a-z]+$/;//验证是否是小写字母
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确的是小写字母!")); return callback(new Error("请输入正确的是小写字母!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
...@@ -100,7 +140,7 @@ const validateLowerCase = (rule, value, callback) => { ...@@ -100,7 +140,7 @@ const validateLowerCase = (rule, value, callback) => {
}; };
const validatePowerCase = (rule, value, callback) => { const validatePowerCase = (rule, value, callback) => {
let patter = /^[A-Z]+$/;//验证是否是大写字母 let patter = /^[A-Z]+$/;//验证是否是大写字母
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确的大写字母!")); return callback(new Error("请输入正确的大写字母!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
...@@ -108,7 +148,7 @@ const validatePowerCase = (rule, value, callback) => { ...@@ -108,7 +148,7 @@ const validatePowerCase = (rule, value, callback) => {
}; };
const validatAlphabets = (rule, value, callback) => { const validatAlphabets = (rule, value, callback) => {
let patter = /^[A-Za-z]+$/;//验证是否是大小写字母 let patter = /^[A-Za-z]+$/;//验证是否是大小写字母
if (!patter.test(value)) { if (value && !patter.test(value)) {
return callback(new Error("请输入正确的大小写字母!")); return callback(new Error("请输入正确的大小写字母!"));
} else { } else {
callback();//必须有此项回调,否则验证会一直不通过 callback();//必须有此项回调,否则验证会一直不通过
...@@ -126,8 +166,17 @@ const checkEmpty = (rule, value, callback) => { ...@@ -126,8 +166,17 @@ const checkEmpty = (rule, value, callback) => {
} }
}; };
export default { const twentyTwoZwbh = (rule, value, callback) => {
let patter = /^[0-9]{22}/;//验证是否22位数字
if (value && !patter.test(value)) {
return callback(new Error("请输入22位数字指纹编号!"));
} else {
callback();//必须有此项回调,否则验证会一直不通过
}
};
export default {
//必填
checkEmpty: [ checkEmpty: [
{ {
required: true, required: true,
...@@ -135,28 +184,50 @@ export default { ...@@ -135,28 +184,50 @@ export default {
trigger: "blur" trigger: "blur"
} }
], ],
//手机号
emptyAbleIphone: [{ emptyAbleIphone: [{
validator: validateisIphone, validator: validateisIphone,
trigger: "blur", trigger: "blur",
message: "请输入正确格式的手机号" message: "请输入正确格式的手机号",
}],
//登录密码
checkPassword: [{
validator: validateisPasswordNew,
trigger: "change",
message: "密码必须包含大小写字母、数字、特殊字符,且长度在8-32位!",
required: true,
}], }],
mustAbleIphone: [{
validator: validateisIphone,
trigger: "blur",
message: "请输入正确格式的手机号",
required: true,
}],
//身份证号
identity: [{ identity: [{
validator: validateisSFZH, validator: validateisSFZH,
trigger: "blur", trigger: "blur",
message: "请输入正确格式的身份证号" message: "请输入正确格式的证件号码"
}], }],
emptyAbleIdentity: [{ emptyAbleIdentity: [{
validator: validateisNoiDentity, validator: validateisNoiDentity,
trigger: "blur", trigger: "blur",
required: true, required: true,
message: "请输入正确格式的身份证号" message: "请输入正确格式的证件号码"
}],
//必填身份证号
emptyAbleIdentityBT: [{
validator: validateisSFZH,
trigger: "blur",
required: true,
message: "请输入正确格式的证件号码"
}], }],
mobilePhone: [{ mobilePhone: [{
validator: validateisPhone, validator: validateisPhone,
trigger: "blur", trigger: "blur",
required: true,
message: "请输入正确格式的手机号" message: "请输入正确格式的手机号"
}], }],
number: [{ number: [{
...@@ -167,6 +238,20 @@ export default { ...@@ -167,6 +238,20 @@ export default {
trigger: "blur", trigger: "blur",
message: "请输入正确的数字" message: "请输入正确的数字"
}], }],
numbersOptional: [{
message: "数字不能为空"
}, {
validator: validateisNumber,
trigger: "blur",
message: "请输入正确的数字"
}],
//警号
alarmLen: [{
validator: validateisNumberLen,
trigger: "blur",
message: "请输入六位以内的数字"
}],
//案件
caseNumber: [{ caseNumber: [{
required: true, required: true,
message: "案件编号不能为空" message: "案件编号不能为空"
...@@ -175,12 +260,65 @@ export default { ...@@ -175,12 +260,65 @@ export default {
trigger: "blur", trigger: "blur",
message: "请输入正确格式的案件编号" message: "请输入正确格式的案件编号"
}], }],
caseNumbers: [{
validator: validateisAj,
trigger: "blur",
message: "请输入正确格式的案件编号"
}],
//现勘
xkNumber: [{
required: true,
message: "现勘编号不能为空"
}, {
validator: validateisXk,
trigger: "blur",
message: "请输入正确格式的现勘编号"
}],
xkNumbers: [{
validator: validateisXk,
trigger: "blur",
message: "请输入正确格式的现勘编号"
}],
//人员
ryNumber: [{
required: true,
message: "人员编号不能为空"
}, {
validator: validateisRy,
trigger: "blur",
message: "请输入正确格式的人员编号"
}],
ryNumbers: [{
validator: validateisRy,
trigger: "blur",
message: "请输入正确格式的人员编号"
}],
//物品
wpNumber: [{
required: true,
message: "物品编号不能为空"
}, {
validator: validateisWP,
trigger: "blur",
message: "请输入正确格式的物品编号"
}],
wpNumbers: [{
validator: validateisWP,
trigger: "blur",
message: "请输入正确格式的物品编号"
}],
//体重 //体重
weight: [{ weight: [{
validator: validateisWeight, validator: validateisWeight,
trigger: "blur", trigger: "blur",
message: "请输入正确的数字" message: "请输入正确的数字"
}], }],
weights: [{
validator: validateisWeight,
trigger: "blur",
required: true,
message: "请输入正确的数字"
}],
carNumber: [{ carNumber: [{
required: true, required: true,
message: "车牌号不能为空" message: "车牌号不能为空"
...@@ -226,4 +364,9 @@ export default { ...@@ -226,4 +364,9 @@ export default {
validatStraightly: [{ validatStraightly: [{
trigger: "blur", trigger: "blur",
}], }],
} twentyTwoZwbh: [{
\ No newline at end of file validator: twentyTwoZwbh,
trigger: "blur",
message: "请输入正确的编号"
}]
}
/**
* Created by jiachenpan on 16/11/18.
*/
export function isvalidUsername(str) {
const valid_map = ['admin', 'editor']
return valid_map.indexOf(str.trim()) >= 0
}
/* 合法uri*/
export function validateURL(textval) {
const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
return urlregex.test(textval)
}
/**
* 邮箱
* @param {*} s
*/
export function isEmail(s) {
return /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s)
}
/**
* 手机号码
* @param {*} s
*/
export function isMobile(s) {
return /^1(3[0-9]|5[0-3,5-9]|7[1-3,5-8]|8[0-9])\d{8}$/.test(s)
}
/**
* 电话号码
* @param {*} s
*/
export function isPhone(s) {
return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s)
}
/**
* URL地址
* @param {*} s
*/
export function isURL(s) {
return /^http[s]?:\/\/.*/.test(s)
}
/* 小写字母*/
export function validateLowerCase(str) {
const reg = /^[a-z]+$/
return reg.test(str)
}
/* 大写字母*/
export function validateUpperCase(str) {
const reg = /^[A-Z]+$/
return reg.test(str)
}
/* 大小写字母*/
export function validatAlphabets(str) {
const reg = /^[A-Za-z]+$/
return reg.test(str)
}
/*验证pad还是pc*/
export const vaildatePc = function() {
const userAgentInfo = navigator.userAgent;
const Agents = ["Android", "iPhone",
"SymbianOS", "Windows Phone",
"iPad", "iPod"
];
let flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
/**
* validate email
* @param email
* @returns {boolean}
*/
export function validateEmail(email) {
const re = /^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return re.test(email)
}
/**
* 判断身份证号码
*/
export function cardid(code) {
let list = [];
let result = true;
let msg = '';
var city = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
23: "黑龙江 ",
31: "上海",
32: "江苏",
33: "浙江",
34: "安徽",
35: "福建",
36: "江西",
37: "山东",
41: "河南",
42: "湖北 ",
43: "湖南",
44: "广东",
45: "广西",
46: "海南",
50: "重庆",
51: "四川",
52: "贵州",
53: "云南",
54: "西藏 ",
61: "陕西",
62: "甘肃",
63: "青海",
64: "宁夏",
65: "新疆",
71: "台湾",
81: "香港",
82: "澳门",
91: "国外 "
};
if (!validatenull(code)) {
if (code.length == 18) {
if (!code || !/(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(code)) {
msg = "证件号码格式错误";
} else if (!city[code.substr(0, 2)]) {
msg = "地址编码错误";
} else {
//18位身份证需要验证最后一位校验位
code = code.split('');
//∑(ai×Wi)(mod 11)
//加权因子
var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
//校验位
var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2, 'x'];
var sum = 0;
var ai = 0;
var wi = 0;
for (var i = 0; i < 17; i++) {
ai = code[i];
wi = factor[i];
sum += ai * wi;
}
if (parity[sum % 11] != code[17]) {
msg = "证件号码校验位错误";
} else {
result = false;
}
}
} else {
msg = "证件号码长度不为18位";
}
} else {
msg = "证件号码不能为空";
}
list.push(result);
list.push(msg);
return list;
}
/**
* 判断手机号码是否正确
*/
export function isvalidatemobile(phone) {
let list = [];
let result = true;
let msg = '';
var isPhone = /^0\d{2,3}-?\d{7,8}$/;
//增加134 减少|1349[0-9]{7},增加181,增加145,增加17[678]
if (!validatenull(phone)) {
if (phone.length == 11) {
if (isPhone.test(phone)) {
msg = '手机号码格式不正确';
} else {
result = false;
}
} else {
msg = '手机号码长度不为11位';
}
} else {
msg = '手机号码不能为空';
}
list.push(result);
list.push(msg);
return list;
}
/**
* 判断姓名是否正确
*/
export function validatename(name) {
var regName = /^[\u4e00-\u9fa5]{2,8}$/;
if (!regName.test(name)) return false;
return true;
}
/**
* 判断是否为整数
*/
export function validatenum(num, type) {
let regName = /[^\d.]/g;
if (type == 1) {
if (!regName.test(num)) return false;
} else if (type == 2) {
regName = /[^\d]/g;
if (!regName.test(num)) return false;
}
return true;
}
/**
* 判断是否为小数
*/
export function validatenumord(num, type) {
let regName = /[^\d.]/g;
if (type == 1) {
if (!regName.test(num)) return false;
} else if (type == 2) {
regName = /[^\d.]/g;
if (!regName.test(num)) return false;
}
return true;
}
/**
* 判断是否为空
*/
export function validatenull(val) {
if (typeof val == 'boolean') {
return false;
}
if (typeof val == 'number') {
return false;
}
if (val instanceof Array) {
if (val.length == 0) return true;
} else if (val instanceof Object) {
if (JSON.stringify(val) === '{}') return true;
} else {
if (val == 'null' || val == null || val == 'undefined' || val == undefined || val == '') return true;
return false;
}
return false;
}
\ No newline at end of file
...@@ -58,6 +58,21 @@ export const mixinsZd = { ...@@ -58,6 +58,21 @@ export const mixinsZd = {
} }
} }
}); });
self.propQueryFieldAjlb.forEach((val) => {
if (val.type == "codeTree" || val.type == "codeTreeDialog") {
if (val.codeOptions.length == 0) {
axios
.get(`JsonData/${val.codeTree}.json`)
.then((res) => {
console.log(res, 1111);
self.$set(val, "codeOptions", res.data.data.rows);
})
.catch((err) => {
console.log(err);
});
}
}
});
}, },
}, },
......
<template>
<div class="content_box">
<div class="content_box_container">
<div class="box_header">
发起协作
</div>
<div class="box_form">
<el-form ref="form"
:rules="rules"
label-position="left"
:model="form"
label-width="116px">
<!-- 基本信息 -->
<div class="form_line1">
<el-form-item label="协作名称:"
prop="xzmc">
<el-input v-model="form.xzmc"
size="small"></el-input>
</el-form-item>
<el-form-item label="案件名称:"
prop="ajmc">
<el-input v-model="form.ajmc"
size="small"></el-input>
</el-form-item>
<el-form-item label="案件编号:"
prop="ajbh">
<el-input v-model="form.ajbh"
size="small"></el-input>
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="办案单位:"
prop="ssdwcode">
<select-tree-dialog v-for="item in propQueryField"
:key="item.id"
:placeholder="'请选择'"
:sendId="item.id"
:formData="form"
:currentItem="item" />
</el-form-item>
<el-form-item label="案件类型:"
prop="ajlbmc">
<select-tree-dialog v-for="item in propQueryFieldAjlb"
:key="item.id"
:placeholder="'请选择'"
:sendId="item.id"
:formData="form"
:currentItem="item" />
</el-form-item>
<el-form-item></el-form-item>
</div>
<div class="form_line1">
<el-form-item label="简要案情:"
prop="jayq">
<el-input v-model="form.jayq"
size="small"></el-input>
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="受案登记表:"
prop="imageUrlSa">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="form.imageUrlSa"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'sadjb');
}
">
<img v-if="form.imageUrlSa"
:src="form.imageUrlSa"
class="avatar">
<span v-if="form.imageUrlSa"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(form.imageUrlSa,'sadjb')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('sadjb')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<el-form-item label="立案决定书:"
prop="imageUrlLa">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="form.imageUrlLa"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'lajds');
}
">
<img v-if="form.imageUrlLa"
:src="form.imageUrlLa"
class="avatar">
<span v-if="form.imageUrlLa"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(form.imageUrlLa,'lajds')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('lajds')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<el-form-item label="协作函:"
prop="imageUrlXz">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="form.imageUrlXz"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'xzh');
}
">
<img v-if="form.imageUrlXz"
:src="form.imageUrlXz"
class="avatar">
<span v-if="form.imageUrlXz"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(form.imageUrlXz,'xzh')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('xzh')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
</div>
<!-- 民警信息 -->
<div class="box_table">
<addMjInfo @getMjData="getMjData"></addMjInfo>
</div>
<!-- 嫌疑人信息 -->
<div class="box_table">
<addXyrInfo @getXyrData="getXyrData"></addXyrInfo>
</div>
</el-form>
</div>
</div>
<div class="form_footer">
<div class="footer">
<!-- <el-button size="small"
@click="resetForm('form')">清空重置</el-button> -->
<el-button size="small"
type="primary"
:loading="loadingBtn"
:disabled="loadingBtn"
@click="addForm('form')"
icon="el-icon-s-promotion">提交新增</el-button>
</div>
</div>
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%"
:src="dialogImageUrl"
alt="" />
</el-dialog>
</div>
</template>
<script>
import {
insertXzqqXx,//协助新增
} from "@/api/statistical.js"
import SelectTreeDialog from "@c/treeCode_components.vue";
import addMjInfo from "./components/addMjInfo.vue";
import addXyrInfo from "./components/addXyrInfo.vue";
import { mixinsZd } from '@/utils/zdList.js'
import LazySelectTreeDialog from "@c/lazy_treeCode_components.vue";
export default {
components: {
SelectTreeDialog, addMjInfo, addXyrInfo, LazySelectTreeDialog
},
data () {
return {
tableDataMj: [],
tableDataXyr: [],
dialogImageUrl: '',
dialogVisibleImg: false,
loadingBtn: false,
// 表单信息
isCjcs: false,
form: {
imageUrlSa: '',
imageUrlLa: '',
imageUrlXz: '',
ssdwcode: '',
xzmc: '',
ajmc: '',
ajbh: '',
ajlbmc: '',
jayq: '',
},
rules: {
xzmc: [
{ required: true, message: '请填写协作名称', trigger: 'change' }
],
ajmc: [
{ required: true, message: '请填写案件名称', trigger: 'change' }
],
imageUrlSa: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
imageUrlLa: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
imageUrlXz: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
ajbh: [
{ required: true, message: '请填写案件编号', trigger: 'change' }
],
ajlbmc: [
{ required: true, message: '请选择案件类型', trigger: 'change' }
],
ssdwcode: [
{ required: true, message: '请选择单位', trigger: 'blur' },
],
jayq: [
{ required: true, message: '请填写简要案情', trigger: 'change' }
],
},
//字典码
propQueryField: [{
name: "所属单位",
id: "ssdwcode",
props: "checkEmpty",
type: "codeTreeDialogs",
readonly: false,
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_UNIT",
},],
//字典码
propQueryFieldAjlb: [{
name: "案件类型",
id: "ajlbmc",
props: "checkEmpty",
type: "codeTreeDialog",
readonly: false,
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_AJLB",
},],
zdObj: {} // 厂商字典码对象
}
},
mixins: [mixinsZd],
mounted () {
const userInfo = JSON.parse(sessionStorage.getItem("userInfo"))
},
watch: {
},
methods: {
// 获取民警数据
getMjData (item) {
this.tableDataMj = item
},
// 获取嫌疑人数据
getXyrData (item) {
this.tableDataXyr = item
},
removePhoto (item) {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (item == 'sadjb') {
this.form.imageUrlSa = '';
} else if (item == 'lajds') {
this.form.imageUrlLa = '';
} else if (item == 'xzh') {
this.form.imageUrlXz = '';
}
})
.catch(() => {
});
},
handlePictureCardPreview (file, item) {
this.dialogImageUrl = file;
this.dialogVisibleImg = true;
},
onChangeSa (file, fileList, item) {
const index = file.name.lastIndexOf(".");
const isJPG = /^.*\.(jpg|png|JPG|PNG|pdf|PDF)$/i.test(
file.name.substring(index)
);
if (!isJPG) {
this.$message.error("图片类型必须是jpg,png,pdf中的一种!");
return;
}
if (item == 'sadjb') {
this.form.imageUrlSa = URL.createObjectURL(file.raw);
this.form.sadjbfile = fileList;
} else if (item == 'lajds') {
this.form.imageUrlLa = URL.createObjectURL(file.raw);
this.form.lajdsfile = fileList;
} else if (item == 'xzh') {
this.form.imageUrlXz = URL.createObjectURL(file.raw);
this.form.xzhfile = fileList;
}
console.log(this.form.imageUrlSa, 11);
},
// 厂商型号字典码
async getCsxhList (val) {
let params = { cjsbCode: val }
let res = await getCsxh(params)
console.log(res, 3333333);
this.formConfig[val - 1].option2 = [...res]
},
// 厂商字典码
async getQueryClientCs (val) {
let params = { cjsbCode: val }
let res = await getQueryClientCsBySblx(params)
this.formConfig[val - 1].option = [...res]
},
// 保存
addForm (formName) {
if (this.tableDataMj && this.tableDataMj.length == 0) {
this.$alert("请填写民警信息再提交", "提示", {
confirmButtonText: "确定",
type: "warning",
})
return
} else if (this.tableDataXyr && this.tableDataXyr.length == 0) {
this.$alert("请填写嫌疑人信息再提交", "提示", {
confirmButtonText: "确定",
type: "warning",
})
return
}
this.$refs[formName].validate(async (valid) => {
if (valid) {
this.loadingBtn = true
let params = new FormData()
params.append('xzmc', this.form.xzmc)
params.append('ajmc', this.form.ajmc)
params.append('badwdm', this.form.ssdwcode)
params.append('asjbh', this.form.ajbh)
params.append('ajlbdm', this.form.ajlbmc)
params.append('jayq', this.form.jayq)
params.append('sadjbfile', this.form.sadjbfile[0].raw)
params.append('lajdsfile', this.form.lajdsfile[0].raw)
params.append('xzhfile', this.form.xzhfile[0].raw)
for (let i = 0, len = this.tableDataMj.length; i < len; i++) {
let locationInfo = this.tableDataMj[i];
params.append('mjxxs[' + i + '].xm', locationInfo.xm);
params.append('mjxxs[' + i + '].identitycard', locationInfo.identitycard);
params.append('mjxxs[' + i + '].policemanid', locationInfo.policemanid);
params.append('mjxxs[' + i + '].lxdh', locationInfo.lxdh);
params.append('mjxxs[' + i + '].zmjgzp', locationInfo.imageUrlZm);
params.append('mjxxs[' + i + '].fmjgzp', locationInfo.imageUrlFm);
}
for (let i = 0, len = this.tableDataXyr.length; i < len; i++) {
let locationInfo = this.tableDataXyr[i];
params.append('xyrs[' + i + '].rylx', locationInfo.rylx || '');
params.append('xyrs[' + i + '].waxz', locationInfo.waxz || '');
params.append('xyrs[' + i + '].rwbh', locationInfo.rwbh);
params.append('xyrs[' + i + '].lyzmcl', locationInfo.lyzmcl || '');
params.append('xyrs[' + i + '].lxdh', locationInfo.lxdh || '');
params.append('xyrs[' + i + '].xyrxm', locationInfo.xyrxm || '');
params.append('xyrs[' + i + '].xyrsfzh', locationInfo.xyrsfzh || '');
params.append('xyrs[' + i + '].xyrxb', locationInfo.xyrxb || '');
params.append('xyrs[' + i + '].xyrhjd', locationInfo.xyrhjd || '');
params.append('xyrs[' + i + '].xyrsxzm', locationInfo.xyrsxzm || '');
params.append('xyrs[' + i + '].xyrszwz', locationInfo.xyrszwz || '');
params.append('xyrs[' + i + '].xyrjqhdgj', locationInfo.xyrjqhdgj || '');
params.append('xyrs[' + i + '].xyrxzd', locationInfo.xyrxzd || '');
params.append('xyrs[' + i + '].wzxxmq', locationInfo.wzxxmq || '');
params.append('xyrs[' + i + '].xnsfmq', locationInfo.xnsfmq || '');
params.append('xyrs[' + i + '].dwgsmq', locationInfo.dwgsmq || '');
params.append('xyrs[' + i + '].qtmq', locationInfo.qtmq || '');
}
let res = await insertXzqqXx(params)
if (res && res.code == 200) {
this.loadingBtn = false
this.$alert("保存成功", "提示", {
confirmButtonText: "确定",
type: "success",
}).then(() => {
this.$message.success('提交成功!');
window.opener.postMessage("appReloadData", location.origin);
window.close()
}).catch(() => {
})
} else {
this.loadingBtn = false
}
} else {
return false;
}
});
},
resetForm (formName) {
this.$refs[formName].resetFields();
this.form = {}
},
},
}
</script>
<style lang="scss" scoped>
.content_box {
height: 100vh;
display: flex;
flex-direction: column;
background: #f1f2f5;
box-sizing: border-box;
.content_box_container {
flex: 1;
overflow: auto;
padding: 19px 24px;
}
.box_header {
font-size: 14px;
font-weight: 500;
color: #383838;
line-height: 18px;
margin-bottom: 19px;
.el-breadcrumb__item:nth-child(1) {
/deep/.el-breadcrumb__inner {
color: #8b8b8b !important;
}
}
}
.box_form {
padding: 32px 40px;
background: #ffffff;
margin-bottom: 1px;
.el-form {
/deep/.el-form-item {
/* display: inline-block; */
.el-form-item__label {
font-size: 16px;
font-weight: 400;
color: #4b4b4b;
}
.el-form-item__content {
/* height: 32px; */
/* line-height: 32px; */
}
}
.form_line1 {
display: flex;
justify-content: space-between;
/deep/.el-form-item {
display: inline-block;
width: 28%;
}
}
.form_line2 {
/deep/.el-form-item {
margin-bottom: 0;
}
}
.searchBtn {
float: right;
}
}
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
border-top: 1px solid #f1f2f5;
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
}
}
}
.form_footer {
border-top: 1px solid #e5e6e8;
display: flex;
justify-content: flex-end;
height: 64px;
line-height: 64px;
background: #ffffff;
margin-left: -20px;
}
}
/deep/ .update-img {
margin-bottom: 8px;
position: relative;
.el-upload-list {
.el-upload-list__item {
overflow: initial;
}
}
img {
width: 118px;
height: 118px;
object-fit: cover;
}
&.on-upload {
// width: 118px;
height: 118px;
.el-upload {
display: none;
width: 118px;
height: 118px;
}
}
.el-upload {
width: 118px;
height: 118px;
border-radius: 0;
position: relative;
background: #eeeeee;
border: 1px dashed #dcdcdc;
}
.el-icon-plus {
width: 118px;
height: 118px;
line-height: 118px;
}
.el-upload-list {
.el-upload-list__item {
width: 118px;
height: 118px;
border-radius: 0;
.show-name {
position: absolute;
bottom: -25px;
z-index: 9;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
color: #4b4b4b;
font-size: 14px;
overflow: hidden;
}
}
}
}
.el-upload-action {
position: absolute;
top: 0;
left: 0;
display: block;
width: 118px;
height: 118px;
font-size: 0;
color: #fff;
text-align: center;
line-height: 120px;
}
.el-upload-action:hover {
font-size: 20px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.6);
}
</style>
\ No newline at end of file
...@@ -12,6 +12,11 @@ ...@@ -12,6 +12,11 @@
label-width="116px"> label-width="116px">
<!-- 基本信息 --> <!-- 基本信息 -->
<div class="form_line1"> <div class="form_line1">
<el-form-item label="协作名称:"
prop="xzmc">
<el-input v-model="form.xzmc"
size="small"></el-input>
</el-form-item>
<el-form-item label="案件名称:" <el-form-item label="案件名称:"
prop="ajmc"> prop="ajmc">
<el-input v-model="form.ajmc" <el-input v-model="form.ajmc"
...@@ -22,36 +27,56 @@ ...@@ -22,36 +27,56 @@
<el-input v-model="form.ajbh" <el-input v-model="form.ajbh"
size="small"></el-input> size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="案件类型:"
prop="ajlx">
<el-select v-model="form.ajlx"
style="width:100%;"
size="small"
placeholder="请选择">
<el-option label="是"
value="是"></el-option>
<el-option label="否"
value="否"></el-option>
</el-select>
</el-form-item>
</div> </div>
<div class="form_line1"> <div class="form_line1">
<el-form-item label="办案单位:" <el-form-item label="办案单位:"
prop="ssdwcode"> prop="ssdwcode">
<select-tree-dialog v-for="item in propQueryField" <lazy-select-tree-dialog v-for="item in propQueryFieldQg"
:key="item.id"
:placeholder="'请选择'"
:sendId="item.id"
@getDialogSeleted="getDialogSeleted"
:formData="form"
:currentItem="item" />
</el-form-item>
<el-form-item label="案件类型:"
prop="ajlbmc">
<select-tree-dialog v-for="item in propQueryFieldAjlb"
:key="item.id" :key="item.id"
:placeholder="'请选择'" :placeholder="'请选择'"
:sendId="item.id" :sendId="item.id"
:formData="form" :formData="form"
:currentItem="item" /> :currentItem="item" />
</el-form-item> </el-form-item>
<el-form-item label="协作单位:"
prop="xzdwdm">
<select-tree-dialog v-for="item in propQueryField"
:key="item.id"
:placeholder="'请选择'"
:sendId="item.id"
:formData="form"
:currentItem="item" />
</el-form-item>
</div> </div>
<div class="form_line1"> <div class="form_line1">
<el-form-item label="简要案情:" <el-form-item label="简要案情:"
prop="jyaq"> style="width:38%;"
<el-input v-model="form.jyaq" prop="jayq">
<el-input v-model="form.jayq"
type="textarea"
:rows="4"
size="small"></el-input>
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="协作描述:"
style="width:38%;"
prop="xzblnr">
<el-input v-model="form.xzblnr"
type="textarea"
:rows="4"
size="small"></el-input> size="small"></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -76,7 +101,7 @@ ...@@ -76,7 +101,7 @@
class="el-upload-action" class="el-upload-action"
@click.stop="() => {}"> @click.stop="() => {}">
<i class="el-icon-zoom-in" <i class="el-icon-zoom-in"
@click="handlePictureCardPreview(form.imageUrlSa,'lajds','sadjb')"></i> @click="handlePictureCardPreview(form.imageUrlSa,'sadjb')"></i>
<i class="el-icon-delete" <i class="el-icon-delete"
@click.stop="removePhoto('sadjb')"></i> @click.stop="removePhoto('sadjb')"></i>
...@@ -92,7 +117,7 @@ ...@@ -92,7 +117,7 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="立案决定书:" <el-form-item label="立案决定书:"
prop="imageUrlSa"> prop="imageUrlLa">
<el-upload class="update-img" <el-upload class="update-img"
action="#" action="#"
:auto-upload="false" :auto-upload="false"
...@@ -163,22 +188,11 @@ ...@@ -163,22 +188,11 @@
</div> </div>
<!-- 民警信息 --> <!-- 民警信息 -->
<div class="box_table"> <div class="box_table">
<div class="tableBtn"> <addMjInfo @getMjData="getMjData"></addMjInfo>
<el-button size="small" </div>
@click="addBaxz" <!-- 嫌疑人信息 -->
icon="el-icon-plus">发起协作</el-button> <div class="box_table">
<addXyrInfo @getXyrData="getXyrData"></addXyrInfo>
</div>
<div class="table_contanier">
<Mytable v-loading="downLoading"
element-loading-text="下载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
@rowOperation="rowOperation"></Mytable>
</div>
</div> </div>
</el-form> </el-form>
</div> </div>
...@@ -204,22 +218,26 @@ ...@@ -204,22 +218,26 @@
</template> </template>
<script> <script>
// import { import {
// getSaveClientVp,//新增 insertXzqqXx,//协助新增
// getQueryClientCsBySblx,//厂商字典码 } from "@/api/statistical.js"
// getCsxh,//厂商型号
// } from "@/api/device/index.js"
import SelectTreeDialog from "@c/treeCode_components.vue"; import SelectTreeDialog from "@c/treeCode_components.vue";
import addMjInfo from "./components/addMjInfo.vue";
import addXyrInfo from "./components/addXyrInfo.vue";
import { mixinsZd } from '@/utils/zdList.js' import { mixinsZd } from '@/utils/zdList.js'
import LazySelectTreeDialog from "@c/lazy_treeCode_components.vue";
export default { export default {
components: { components: {
SelectTreeDialog, SelectTreeDialog, addMjInfo, addXyrInfo, LazySelectTreeDialog
}, },
data () { data () {
return { return {
qgdwmc: '',
tableDataMj: [],
tableDataXyr: [],
dialogImageUrl: '', dialogImageUrl: '',
dialogVisibleImg: false, dialogVisibleImg: false,
loadingBtn: false, loadingBtn: false,
...@@ -230,49 +248,82 @@ export default { ...@@ -230,49 +248,82 @@ export default {
imageUrlLa: '', imageUrlLa: '',
imageUrlXz: '', imageUrlXz: '',
ssdwcode: '', ssdwcode: '',
zrmjname: '', xzmc: '',
ip: '', ajmc: '',
mac: 'F8-75-A4-91-46-BA', ajbh: '',
zrmjlxdh: '', ajlbmc: '',
ifythcjy: '', xzdwdm: '',
ythcjcs: '1', xzblnr: '',
cgsjStr: '', jayq: '',
sbpp: '',
checkList: [],//采集设备选择
edzcpxh: '',
}, },
rules: { rules: {
xzmc: [
{ required: true, message: '请填写协作名称', trigger: 'change' }
],
ajmc: [ ajmc: [
{ required: true, message: '请填写案件名称', trigger: 'change' } { required: true, message: '请填写案件名称', trigger: 'change' }
], ],
imageUrlSa: [ imageUrlSa: [
{ required: true, message: '请上传文件', trigger: 'change' } { required: true, message: '请上传文件', trigger: 'change' }
], ],
imageUrlLa: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
imageUrlXz: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
ajbh: [ ajbh: [
{ required: true, message: '请填写案件编号', trigger: 'change' } { required: true, message: '请填写案件编号', trigger: 'change' }
], ],
ajlx: [ ajlbmc: [
{ required: true, message: '请选择案件类型', trigger: 'change' } { required: true, message: '请选择案件类型', trigger: 'change' }
], ],
ssdwcode: [ ssdwcode: [
{ required: true, message: '请选择单位', trigger: 'blur' }, { required: true, message: '请选择单位', trigger: 'change' },
],
xzdwdm: [
{ required: true, message: '请选择单位', trigger: 'change' },
], ],
jyaq: [ xzblnr: [
{ required: true, message: '请填写协作描述', trigger: 'change' },
],
jayq: [
{ required: true, message: '请填写简要案情', trigger: 'change' } { required: true, message: '请填写简要案情', trigger: 'change' }
], ],
}, },
//字典码 //字典码
propQueryField: [{ propQueryFieldQg: [{
name: "所属单位", name: "所属单位",
id: "ssdwcode", id: "ssdwcode",
props: "checkEmpty", props: "checkEmpty",
type: "lazyCodeTreeDialog",
readonly: false,
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_QGUNIT",
},],
//字典码
propQueryFieldAjlb: [{
name: "案件类型",
id: "ajlbmc",
props: "checkEmpty",
type: "codeTreeDialog",
readonly: false,
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_AJLB",
},],
//字典码
propQueryField: [{
name: "协作单位",
id: "xzdwdm",
props: "checkEmpty",
type: "codeTreeDialogs", type: "codeTreeDialogs",
readonly: false, readonly: false,
value: "", value: "",
...@@ -280,7 +331,6 @@ export default { ...@@ -280,7 +331,6 @@ export default {
col: "3", col: "3",
codeOptions: [], codeOptions: [],
codeTree: "CODE_UNIT", codeTree: "CODE_UNIT",
},], },],
zdObj: {} // 厂商字典码对象 zdObj: {} // 厂商字典码对象
} }
...@@ -288,12 +338,23 @@ export default { ...@@ -288,12 +338,23 @@ export default {
mixins: [mixinsZd], mixins: [mixinsZd],
mounted () { mounted () {
const userInfo = JSON.parse(sessionStorage.getItem("userInfo")) const userInfo = JSON.parse(sessionStorage.getItem("userInfo"))
this.form.ip = userInfo.ip
}, },
watch: { watch: {
}, },
methods: { methods: {
getDialogSeleted (item) {
console.log(item, 1111222);
this.qgdwmc = item
},
// 获取民警数据
getMjData (item) {
this.tableDataMj = item
},
// 获取嫌疑人数据
getXyrData (item) {
this.tableDataXyr = item
},
removePhoto (item) { removePhoto (item) {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", { this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
...@@ -329,10 +390,13 @@ export default { ...@@ -329,10 +390,13 @@ export default {
} }
if (item == 'sadjb') { if (item == 'sadjb') {
this.form.imageUrlSa = URL.createObjectURL(file.raw); this.form.imageUrlSa = URL.createObjectURL(file.raw);
this.form.sadjbfile = fileList;
} else if (item == 'lajds') { } else if (item == 'lajds') {
this.form.imageUrlLa = URL.createObjectURL(file.raw); this.form.imageUrlLa = URL.createObjectURL(file.raw);
this.form.lajdsfile = fileList;
} else if (item == 'xzh') { } else if (item == 'xzh') {
this.form.imageUrlXz = URL.createObjectURL(file.raw); this.form.imageUrlXz = URL.createObjectURL(file.raw);
this.form.xzhfile = fileList;
} }
console.log(this.form.imageUrlSa, 11); console.log(this.form.imageUrlSa, 11);
}, },
...@@ -354,15 +418,76 @@ export default { ...@@ -354,15 +418,76 @@ export default {
// 保存 // 保存
addForm (formName) { addForm (formName) {
if (this.tableDataMj && this.tableDataMj.length == 0) {
this.$alert("请填写民警信息再提交", "提示", {
confirmButtonText: "确定",
type: "warning",
})
return
} else if (this.tableDataXyr && this.tableDataXyr.length == 0) {
this.$alert("请填写嫌疑人信息再提交", "提示", {
confirmButtonText: "确定",
type: "warning",
})
return
}
this.$refs[formName].validate(async (valid) => { this.$refs[formName].validate(async (valid) => {
if (valid) { if (valid) {
this.loadingBtn = true this.loadingBtn = true
let params = { ...this.form, ...this.zdObj } let params = new FormData()
let res = await getSaveClientVp(params) params.append('xzmc', this.form.xzmc)
params.append('ajmc', this.form.ajmc)
params.append('badwdm', this.form.ssdwcode)
params.append('badwmc', this.qgdwmc)
params.append('asjbh', this.form.ajbh)
params.append('ajlbdm', this.form.ajlbmc)
params.append('xzdwdm', this.form.xzdwdm)
params.append('xzblnr', this.form.xzblnr)
params.append('jayq', this.form.jayq)
params.append('sadjbfile', this.form.sadjbfile[0].raw)
params.append('lajdsfile', this.form.lajdsfile[0].raw)
params.append('xzhfile', this.form.xzhfile[0].raw)
for (let i = 0, len = this.tableDataMj.length; i < len; i++) {
let locationInfo = this.tableDataMj[i];
params.append('mjxxs[' + i + '].xm', locationInfo.xm);
params.append('mjxxs[' + i + '].identitycard', locationInfo.identitycard);
params.append('mjxxs[' + i + '].policemanid', locationInfo.policemanid);
params.append('mjxxs[' + i + '].lxdh', locationInfo.lxdh);
params.append('mjxxs[' + i + '].zmjgzp', locationInfo.imageUrlZm);
params.append('mjxxs[' + i + '].fmjgzp', locationInfo.imageUrlFm);
}
for (let i = 0, len = this.tableDataXyr.length; i < len; i++) {
let locationInfo = this.tableDataXyr[i];
params.append('xyrs[' + i + '].rylx', locationInfo.rylx || '');
params.append('xyrs[' + i + '].waxz', locationInfo.waxz || '');
params.append('xyrs[' + i + '].rwbh', locationInfo.rwbh);
params.append('xyrs[' + i + '].lyzmcl', locationInfo.lyzmcl || '');
params.append('xyrs[' + i + '].lxdh', locationInfo.lxdh || '');
params.append('xyrs[' + i + '].xyrxm', locationInfo.xyrxm || '');
params.append('xyrs[' + i + '].xyrsfzh', locationInfo.xyrsfzh || '');
params.append('xyrs[' + i + '].xyrxb', locationInfo.xyrxb || '');
params.append('xyrs[' + i + '].xyrhjd', locationInfo.xyrhjd || '');
params.append('xyrs[' + i + '].xyrsxzm', locationInfo.xyrsxzm || '');
params.append('xyrs[' + i + '].xyrszwz', locationInfo.xyrszwz || '');
params.append('xyrs[' + i + '].xyrjqhdgj', locationInfo.xyrjqhdgj || '');
params.append('xyrs[' + i + '].xyrxzd', locationInfo.xyrxzd || '');
params.append('xyrs[' + i + '].wzxxmq', locationInfo.wzxxmq || '');
params.append('xyrs[' + i + '].xnsfmq', locationInfo.xnsfmq || '');
params.append('xyrs[' + i + '].dwgsmq', locationInfo.dwgsmq || '');
params.append('xyrs[' + i + '].qtmq', locationInfo.qtmq || '');
}
let res = await insertXzqqXx(params)
if (res && res.code == 200) { if (res && res.code == 200) {
this.loadingBtn = false this.loadingBtn = false
this.$message.success('提交成功!'); this.$alert("保存成功", "提示", {
this.$router.go(-1) confirmButtonText: "确定",
type: "success",
}).then(() => {
this.$message.success('提交成功!');
window.opener.postMessage("appReloadData", location.origin);
window.close()
}).catch(() => {
})
} else { } else {
this.loadingBtn = false this.loadingBtn = false
} }
...@@ -392,7 +517,7 @@ export default { ...@@ -392,7 +517,7 @@ export default {
.content_box_container { .content_box_container {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
padding: 19px 20px; padding: 19px 24px;
} }
.box_header { .box_header {
font-size: 14px; font-size: 14px;
...@@ -412,7 +537,7 @@ export default { ...@@ -412,7 +537,7 @@ export default {
margin-bottom: 1px; margin-bottom: 1px;
.el-form { .el-form {
/deep/.el-form-item { /deep/.el-form-item {
display: inline-block; /* display: inline-block; */
.el-form-item__label { .el-form-item__label {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
...@@ -467,7 +592,7 @@ export default { ...@@ -467,7 +592,7 @@ export default {
} }
} }
/deep/ .update-img { /deep/ .update-img {
margin-bottom: 40px; margin-bottom: 8px;
position: relative; position: relative;
.el-upload-list { .el-upload-list {
......
<template>
<div class="content_box">
<div class="content_box_container">
<div class="box_header">
录入抓获人信息
</div>
<div class="box_form">
<el-form ref="form"
:rules="rules"
label-position="left"
label-width="116px">
<!-- 嫌疑人信息 -->
<div class="box_table">
<div class="contentTitle">抓获人信息:</div>
<div class="tableBtn">
<el-button size="small"
@click="addZhrBtn"
icon="el-icon-plus">抓获人编辑</el-button>
</div>
<Mytable v-loading="downLoadingXyr"
element-loading-text="加载中..."
:tableData="tableDataXyr"
:columObj="columObjXyr"
:pageObj="pageObjXyr"
@rowOperation="rowOperation"
@handleSizeChange="handleSizeChangeXyr"
@handleCurrentChange="handleCurrentChangeXyr"></Mytable>
</div>
</el-form>
</div>
</div>
<!-- 抓获人编辑 -->
<el-dialog title=""
class="dialogPer"
:before-close="handleClose"
:visible.sync="dialogVisible"
width="53%">
<span slot="title">
<!-- <img src="../../../assets/img/user/user01.png" /> -->
<span>抓获人编辑</span>
</span>
<el-form ref="ruleForm"
:model="ruleForm"
size="medium"
label-width="120px"
label-position="left"
:rules="rules">
<el-form-item label="姓名"
prop="xyrxm">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrxm"></el-input>
</el-form-item>
<el-form-item label="身份证号"
prop="xyrsfzh">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrsfzh"></el-input>
</el-form-item>
<el-form-item label="户籍地"
prop="xyrhjd">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrhjd"></el-input>
</el-form-item>
<el-form-item label="抓获地址"
prop="xyrzhdz">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrzhdz"></el-input>
</el-form-item>
<el-form-item label="关联案件编号"
prop="glasjbh">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.glasjbh"></el-input>
</el-form-item>
<el-form-item label="涉嫌罪名"
prop="xyrsxzm">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrsxzm"></el-input>
</el-form-item>
<el-form-item label="刑事强制措施"
prop="xsqzcs">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xsqzcs"></el-input>
</el-form-item>
<el-form-item label="角色地位"
prop="jsdw">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.jsdw"></el-input>
</el-form-item>
<el-form-item label="询问笔录:"
prop="imageUrlXwbl">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="ruleForm.imageUrlXwbl"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'xwbl');
}
">
<img v-if="ruleForm.imageUrlXwbl"
:src="ruleForm.imageUrlXwbl"
class="avatar">
<span v-if="ruleForm.imageUrlXwbl"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(ruleForm.imageUrlXwbl,'xwbl')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('xwbl')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<el-form-item label="强制措施文书:"
prop="imageUrlQzws">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="ruleForm.imageUrlQzws"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'qzws');
}
">
<img v-if="ruleForm.imageUrlQzws"
:src="ruleForm.imageUrlQzws"
class="avatar">
<span v-if="ruleForm.imageUrlQzws"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(ruleForm.imageUrlQzws,'qzws')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('qzws')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
style="backgroundColor:#266FE8;"
:loading="loadingAll"
@click="submitBtn('ruleForm')">确 定</el-button>
<el-button @click="dialogVisible=false">取 消</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%"
:src="dialogImageUrl"
alt="" />
</el-dialog>
</div>
</template>
<script>
import {
selectAllZhr,//抓获人列表
insertZhryxx,//抓获人新增
updateZhryxx,//抓获人修改
deleteByIdZhr,//抓获人删除
} from "@/api/statistical.js"
import Mytable from '@/components/Mytable.vue'
export default {
components: {
Mytable
},
data () {
return {
removeXxzjbh: [],
editType: 0,
ruleForm: {
imageUrlXwbl: '',
imageUrlQzws: '',
xyrxm: '',
xyrsfzh: '',
xyrhjd: '',
xyrzhdz: '',
glasjbh: '',
xyrsxzm: '',
xsqzcs: '',
jsdw: '',
xwbl: '',
qzcsws: '',
},
rules: {
xyrxm: [
{ required: true, message: '请填写姓名', trigger: 'change' }
],
xyrsfzh: [
{ required: true, message: '请填写身份证号', trigger: 'change' }
],
xyrhjd: [
{ required: true, message: '请填写户籍地', trigger: 'change' }
],
xyrzhdz: [
{ required: true, message: '请填写抓获地址', trigger: 'change' }
],
xyrsxzm: [
{ required: true, message: '请填写涉嫌罪名', trigger: 'change' }
],
xsqzcs: [
{ required: true, message: '请填写刑事强制措施', trigger: 'change' }
],
jsdw: [
{ required: true, message: '请填写角色地位', trigger: 'change' }
],
imageUrlXwbl: [
{ required: true, message: '请上传询问笔录', trigger: 'change' }
],
imageUrlQzws: [
{ required: true, message: '请上传强制措施文书', trigger: 'change' }
],
},
dialogVisible: false,
loadingAll: false,
baseInfoDetail: {},
baseInfoDetailImg: [],
dialogImageUrl: '',
dialogVisibleImg: false,
loadingBtn: false,
// 嫌疑人
pageObjXyr: { //分页对象
total: 0,
pageData: {
page: 1,
size: 10
}
},
downLoadingXyr: false,
tableDataXyr: [{
}],
columObjXyr: {
visble: false,
loading: false,
columnData: [
{
text: true,
prop: "xyrxm",
editRow: undefined,
label: "姓名",
width: "",
align: "center",
},
{
text: true,
prop: "xyrsfzh",
editRow: undefined,
label: "身份证号",
width: "",
align: "center",
},
{
text: true,
prop: "xyrhjd",
editRow: undefined,
label: "户籍地",
width: "",
align: "center",
},
{
text: true,
prop: "xyrzhdz",
editRow: undefined,
label: "抓获地址",
width: "",
align: "center",
},
{
text: true,
prop: "glasjbh",
editRow: undefined,
label: "关联案件编号",
width: "",
align: "center",
},
{
text: true,
prop: "xyrsxzm",
editRow: undefined,
label: "涉嫌罪名",
width: "",
align: "center",
},
{
text: true,
prop: "xsqzcs",
editRow: undefined,
label: "刑事强制措施",
width: "",
align: "center",
},
{
text: true,
prop: "jsdw",
editRow: undefined,
label: "角色地位",
width: "",
align: "center",
},
{
spwj: true,
prop: "wj",
editRow: undefined,
label: "询问笔录",
width: "220",
align: "center",
},
{
spwj: true,
prop: "wj2",
editRow: undefined,
label: "强制措施文书",
width: "220",
align: "center",
},
{
isOperation: true,
type: 'basic',
label: "操作",
width: "180",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "修改",
icon: "",
option: 'xiugai',
color: '#1a81e1',
}, {
operation: "edit",
type: "text",
label: "删除",
icon: "",
option: 'shanchu',
color: '#1a81e1',
}
]
}
]
},
}
},
mounted () {
this.getZhrList()
const userInfo = JSON.parse(sessionStorage.getItem("userInfo"))
},
watch: {
},
methods: {
rowOperation (row, index, item) {
if (index == 0) {
// 修改
console.log(row, 888);
this.editType = 1
this.ruleForm.xyrxm = row.xyrxm
this.ruleForm.xyrsfzh = row.xyrsfzh
this.ruleForm.rwbh = row.rwbh
this.ruleForm.xyrhjd = row.xyrhjd
this.ruleForm.xyrzhdz = row.xyrzhdz
this.ruleForm.glasjbh = row.glasjbh
this.ruleForm.xyrsxzm = row.xyrsxzm
this.ruleForm.xsqzcs = row.xsqzcs
this.ruleForm.jsdw = row.jsdw
this.ruleForm.xwbl = ''
this.ruleForm.qzcsws = ''
row.wj.forEach(item => {
if (item.fjlx == '5') {
this.ruleForm.imageUrlXwbl = item.dzwjnrBase64
this.ruleForm.removeXwbl = item.xxzjbh
} else if (item.fjlx == '6') {
this.ruleForm.imageUrlQzws = item.dzwjnrBase64
this.ruleForm.removeQzws = item.xxzjbh
}
})
this.xxzjbh = row.xxzjbh
this.dialogVisible = true
} else {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
const paramas = new FormData()
paramas.append('xxzjbh', row.xxzjbh)
let res = await deleteByIdZhr(paramas)
if (res && res.code == 200) {
this.$message.success('删除成功')
this.getZhrList()
}
})
.catch(() => {
});
}
},
addZhrBtn () {
this.ruleForm = {
imageUrlXwbl: '',
imageUrlQzws: '',
xyrxm: '',
xyrsfzh: '',
xyrhjd: '',
xyrzhdz: '',
glasjbh: '',
xyrsxzm: '',
xsqzcs: '',
jsdw: '',
xwbl: '',
qzcsws: '',
}
this.editType = 0
this.dialogVisible = true
},
handleClose () {
this.dialogVisible = false
},
handlePictureCardPreview (file, item) {
this.dialogImageUrl = file;
this.dialogVisibleImg = true;
},
onChangeSa (file, fileList, item) {
const index = file.name.lastIndexOf(".");
const isJPG = /^.*\.(jpg|png|JPG|PNG|pdf|PDF)$/i.test(
file.name.substring(index)
);
if (!isJPG) {
this.$message.error("图片类型必须是jpg,png,pdf中的一种!");
return;
}
if (item == 'xwbl') {
this.ruleForm.imageUrlXwbl = URL.createObjectURL(file.raw);
this.ruleForm.xwbl = file.raw
console.log(this.ruleForm.xwbl, 1111);
} else if (item == 'qzws') {
this.ruleForm.imageUrlQzws = URL.createObjectURL(file.raw);
this.ruleForm.qzcsws = file.raw
console.log(this.ruleForm.qzcsws, 222);
}
},
removePhoto (item) {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (item == 'xwbl') {
this.ruleForm.imageUrlXwbl = '';
this.removeXxzjbh.push(this.ruleForm.removeXwbl)
} else if (item == 'qzws') {
this.ruleForm.imageUrlQzws = '';
this.removeXxzjbh.push(this.ruleForm.removeQzws)
}
console.log(this.removeXxzjbh, 3333);
})
.catch(() => {
});
},
submitBtn (ruleForm) {
this.$refs[ruleForm].validate(async (valid) => {
if (valid) {
this.loadingAll = true
let params = new FormData()
console.log(this.ruleForm.xwbl, 888);
console.log(this.ruleForm.qzcsws, 999);
params.append('glxxzjbh', this.$route.query.id)
params.append('xyrxm', this.ruleForm.xyrxm)
params.append('xyrsfzh', this.ruleForm.xyrsfzh)
params.append('xyrhjd', this.ruleForm.xyrhjd)
params.append('xyrzhdz', this.ruleForm.xyrzhdz)
params.append('glasjbh', this.ruleForm.glasjbh)
params.append('xyrsxzm', this.ruleForm.xyrsxzm)
params.append('xsqzcs', this.ruleForm.xsqzcs)
params.append('jsdw', this.ruleForm.jsdw)
if (this.ruleForm.xwbl != '') {
params.append('xwbl', this.ruleForm.xwbl)
}
if (this.ruleForm.qzcsws != '') {
params.append('qzcsws', this.ruleForm.qzcsws)
}
if (this.editType == 0) {
let res = await insertZhryxx(params)
if (res && res.code == 200) {
this.loadingAll = false
this.$message.success('提交成功!');
this.getZhrList()
} else {
this.loadingAll = false
}
} else if (this.editType == 1) {
params.append('xxzjbh', this.xxzjbh || '')
params.append('removezpStr', this.removeXxzjbh && this.removeXxzjbh.join(',') || '')
let res = await updateZhryxx(params)
if (res && res.code == 200) {
this.loadingAll = false
this.$message.success('提交成功!');
this.getZhrList()
} else {
this.loadingAll = false
}
}
this.editType == 0
this.dialogVisible = false
}
})
},
//页码变化
handleCurrentChangeXyr (e) {
this.pageObj.pageData.page = e;
this.getZhrList()
},
//条数变化
handleSizeChangeXyr (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getZhrList()
},
async getZhrList () {
this.downLoading = true
const paramas = new FormData()
paramas.append('glxxzjbh', this.$route.query.id)
paramas.append('page', this.pageObjXyr.pageData.page)
paramas.append('limit', this.pageObjXyr.pageData.size)
let res = await selectAllZhr(paramas)
if (res && res.code == 200) {
this.downLoading = false
this.tableDataXyr = res.data.rows
this.pageObjXyr.total = res.data.total
console.log(this.ruleForm, 12343543534);
}
},
// 表格获取人员类型
getRylx (item) {
console.log(item, 123);
if (item.rylx == 0) {
return '身份信息明确'
} else if (item.rylx == 1) {
return '仅位置明确'
} else if (item.rylx == 2) {
return '仅虚拟身份明确'
} else if (item.rylx == 3) {
return '单位/公司'
} else if (item.rylx == 4) {
return '其他'
}
},
},
}
</script>
<style lang="scss" scoped>
.content_box {
height: 100vh;
display: flex;
flex-direction: column;
background: #f1f2f5;
box-sizing: border-box;
.content_box_container {
flex: 1;
overflow: auto;
padding: 19px 24px;
}
.box_header {
font-size: 14px;
font-weight: 500;
color: #383838;
line-height: 18px;
margin-bottom: 19px;
.el-breadcrumb__item:nth-child(1) {
/deep/.el-breadcrumb__inner {
color: #8b8b8b !important;
}
}
}
.box_form {
padding: 32px 40px;
background: #ffffff;
margin-bottom: 1px;
.el-form {
/deep/.el-form-item {
/* display: inline-block; */
.el-form-item__label {
font-size: 16px;
font-weight: 400;
color: #4b4b4b;
}
.el-form-item__content {
/* height: 32px; */
/* line-height: 32px; */
}
}
.form_line1 {
display: flex;
justify-content: space-between;
/deep/.el-form-item {
display: inline-block;
width: 28%;
}
}
.form_line2 {
/deep/.el-form-item {
margin-bottom: 0;
}
}
.searchBtn {
float: right;
}
}
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
.contentTitle {
font-size: 18px;
font-weight: 500;
margin-bottom: 8px;
}
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
}
}
}
.form_footer {
border-top: 1px solid #e5e6e8;
display: flex;
justify-content: flex-end;
height: 64px;
line-height: 64px;
background: #ffffff;
margin-left: -20px;
}
}
/deep/ .update-img {
margin-bottom: 8px;
position: relative;
.el-upload-list {
.el-upload-list__item {
overflow: initial;
}
}
img {
width: 118px;
height: 118px;
object-fit: cover;
}
&.on-upload {
// width: 118px;
height: 118px;
.el-upload {
display: none;
width: 118px;
height: 118px;
}
}
.el-upload {
width: 118px;
height: 118px;
border-radius: 0;
position: relative;
background: #eeeeee;
border: 1px dashed #dcdcdc;
}
.el-icon-plus {
width: 118px;
height: 118px;
line-height: 118px;
}
.el-upload-list {
.el-upload-list__item {
width: 118px;
height: 118px;
border-radius: 0;
.show-name {
position: absolute;
bottom: -25px;
z-index: 9;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
color: #4b4b4b;
font-size: 14px;
overflow: hidden;
}
}
}
}
.el-upload-action {
position: absolute;
top: 0;
left: 0;
display: block;
width: 118px;
height: 118px;
font-size: 0;
color: #fff;
text-align: center;
line-height: 120px;
}
.el-upload-action:hover {
font-size: 20px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.6);
}
.imgDel {
display: flex;
p {
/* display: inline-block; */
display: flex;
flex-direction: column;
//margin-right: 16px;
.el-image,
img {
width: 116px;
height: 116px;
border-radius: 3px 3px 3px 3px;
margin-bottom: 8px;
}
span {
height: 20px;
font-size: 14px;
color: #4b4b4b;
line-height: 20px;
width: auto;
}
}
}
.dialogPer {
/deep/.el-checkbox {
display: flex;
/* align-items: center; */
.el-checkbox__input {
line-height: inherit !important;
}
.el-checkbox__label {
position: relative;
width: 80%;
margin-bottom: 8px;
padding-top: 4px;
> span {
display: inline-block;
width: 80px;
margin-right: 50px;
white-space: pre-wrap;
}
> div {
display: inline-block;
/* position: absolute;
top: -1px; */
width: 490px;
}
}
}
/deep/.el-dialog {
max-height: 620px;
overflow: hidden;
border-radius: 8px;
}
/deep/.el-dialog__header {
height: 56px;
line-height: 56px;
padding: 0;
padding-left: 16px;
font-size: 18px;
font-weight: 500;
color: #242424;
img {
margin-right: 8px;
}
}
/deep/.el-dialog__body {
height: 440px;
overflow-y: auto;
padding: 10px 20px 0 20px !important;
}
/deep/.el-dialog__footer {
height: 64px;
line-height: 64px;
padding: 0 !important;
border-top: 1px solid #ccc;
text-align: center;
.el-button {
margin-right: 16px !important;
}
}
/deep/.el-textarea__inner {
height: 50px !important;
}
/deep/.el-form-item {
margin-bottom: 18px !important;
}
/deep/.el-form-item__label {
height: 32px;
}
.el-checkbox-group {
display: flex;
flex-direction: column;
}
}
</style>
\ No newline at end of file
<template>
<div class="content_box">
<div class="content_box_container"
v-loading="loadings"
element-loading-text="加载中...">
<div class="box_header">
协作详情
</div>
<div class="box_form">
<el-form ref="form"
label-position="left"
label-width="116px">
<!-- 基本信息 -->
<div class="form_line1">
<el-form-item label="协作名称:"
prop="xzmc">
{{baseInfoDetail.xzmc||'--'}}
</el-form-item>
<el-form-item label="案件名称:"
prop="ajmc">
{{baseInfoDetail.ajmc||'--'}}
</el-form-item>
<el-form-item label="案件编号:"
prop="ajbh">
{{baseInfoDetail.asjbh||'--'}}
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="办案单位:"
prop="ssdwcode">
{{baseInfoDetail.badwmc||'--'}}
</el-form-item>
<el-form-item label="案件类型:">
{{baseInfoDetail.ajlbmc||'--'}}
</el-form-item>
<el-form-item label="协作单位:">
{{baseInfoDetail.xzdwmc||'--'}}
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="简要案情:"
style="width:38%"
prop="jayq">
{{baseInfoDetail.jayq||'--'}}
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="协作描述:"
style="width:38%">
{{baseInfoDetail.xzblnr||'--'}}
</el-form-item>
</div>
<div class="form_line1">
<el-form-item v-for="(item,index) in baseInfoDetailImg"
:key="index"
:label="item.fjlx==1?'受案登记表':item.fjlx==2?'立案决定书':'协作函'">
<div class="imgDel"
style="width: 50%;">
<p style="width: 100%;">
<el-image :src="item.dzwjnrBase64"
:preview-src-list="[item.dzwjnrBase64]"
alt=""></el-image>
<span style="cursor: pointer; width:110px;word-wrap: break-word;">{{ item.dzwjbt || '--' }}</span>
<!-- @click="downLoad(item,'调取证据通知书')" -->
</p>
</div>
</el-form-item>
</div>
<!-- 民警信息 -->
<div class="box_table">
<div class="contentTitle">民警信息:</div>
<Mytable v-loading="downLoadingMj"
element-loading-text="加载中..."
:tableData="tableDataMj"
:columObj="columObjMj"
:pageObj="pageObjMj"
@handleSizeChange="handleSizeChangeMj"
@handleCurrentChange="handleCurrentChangeMj"></Mytable>
</div>
<!-- 嫌疑人信息 -->
<div class="box_table">
<div class="contentTitle">嫌疑人信息:</div>
<Mytable v-loading="downLoadingXyr"
element-loading-text="加载中..."
:tableData="tableDataXyr"
:columObj="columObjXyr"
:pageObj="pageObjXyr"
@handleSizeChange="handleSizeChangeXyr"
@handleCurrentChange="handleCurrentChangeXyr"></Mytable>
</div>
</el-form>
</div>
</div>
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%"
:src="dialogImageUrl"
alt="" />
</el-dialog>
</div>
</template>
<script>
import {
selectOne,//
imgInfo,//
selectAllMj,//
selectAllXyr,//
} from "@/api/statistical.js"
import Mytable from '@/components/Mytable.vue'
export default {
components: {
Mytable
},
data () {
return {
loadings: false,
baseInfoDetail: {},
baseInfoDetailImg: [],
dialogImageUrl: '',
dialogVisibleImg: false,
loadingBtn: false,
pageObjMj: { //分页对象
total: 0,
pageData: {
page: 1,
size: 10
}
},
downLoadingMj: false,
tableDataMj: [{
}],
columObjMj: {
visble: false,
loading: false,
columnData: [
{
text: true,
prop: "xm",
editRow: undefined,
label: "姓名",
width: "",
align: "center",
},
{
text: true,
prop: "identitycard",
editRow: undefined,
label: "身份证号",
width: "",
align: "center",
}, {
text: true,
prop: "policemanid",
editRow: undefined,
label: "警号",
width: "",
align: "center",
}, {
text: true,
prop: "lxdh",
editRow: undefined,
label: "联系电话",
width: "",
align: "center",
}, {
spwj: true,
prop: "zmjgzp",
editRow: undefined,
label: "警官证正面",
width: "",
align: "center",
}, {
spwj: true,
prop: "fmjgzp",
editRow: undefined,
label: "警官证反面",
width: "",
align: "center",
},
]
},
// 嫌疑人
pageObjXyr: { //分页对象
total: 0,
pageData: {
page: 1,
size: 10
}
},
downLoadingXyr: false,
tableDataXyr: [{
}],
columObjXyr: {
visble: false,
loading: false,
columnData: [
{
ownDefined: true,
prop: "rylx",
editRow: undefined,
label: "人员类型",
width: "",
align: "center",
ownDefinedReturn: (row) => { return this.getRylx(row) }
},
{
ownDefined: true,
prop: "waxz",
editRow: undefined,
label: "网安协助",
width: "",
align: "center",
ownDefinedReturn: (row, index) => { return row.waxz == 0 ? '不需要' : '需要' }
}, {
text: true,
prop: "rwbh",
editRow: undefined,
label: "任务编号",
width: "",
align: "center",
}, {
spwj: true,
prop: "wj",
editRow: undefined,
label: "来源证明材料",
width: "220",
align: "center",
},
{
text: true,
prop: "xyrxm",
editRow: undefined,
label: "姓名",
width: "",
align: "center",
},
{
text: true,
prop: "xyrsfzh",
editRow: undefined,
label: "身份证号",
width: "",
align: "center",
},
{
ownDefined: true,
prop: "xyrxb",
editRow: undefined,
label: "性别",
width: "",
align: "center",
ownDefinedReturn: (row, index) => { return row.xyrxb == 0 ? '男' : '女' }
},
{
text: true,
prop: "xyrhjd",
editRow: undefined,
label: "户籍地",
width: "",
align: "center",
},
{
text: true,
prop: "xyrsxzm",
editRow: undefined,
label: "涉嫌罪名",
width: "",
align: "center",
},
{
text: true,
prop: "xyrszwz",
editRow: undefined,
label: "所在位置",
width: "",
align: "center",
},
{
text: true,
prop: "xyrjqhdgj",
editRow: undefined,
label: "近期活动轨迹",
width: "",
align: "center",
},
]
},
}
},
mounted () {
this.getJbInfo()
this.getJbInfoImg()
this.getMjList()
this.getXyrList()
const userInfo = JSON.parse(sessionStorage.getItem("userInfo"))
},
watch: {
},
methods: {
handlePictureCardPreview (file, item) {
this.dialogImageUrl = file;
this.dialogVisibleImg = true;
},
async getJbInfo () {
this.loadings = true
const paramas = new FormData()
paramas.append('id', this.$route.query.id)
let res = await selectOne(paramas)
if (res && res.code == 200) {
this.baseInfoDetail = res.data.rows
this.loadings = false
}
},
async getJbInfoImg () {
const paramas = new FormData()
paramas.append('xxzjbh', this.$route.query.id)
let res = await imgInfo(paramas)
if (res && res.code == 200) {
this.baseInfoDetailImg = res.data.detail
}
},
async getMjList () {
const paramas = new FormData()
paramas.append('glxxzjbh', this.$route.query.id)
paramas.append('page', this.pageObjMj.pageData.page)
paramas.append('limit', this.pageObjMj.pageData.size)
let res = await selectAllMj(paramas)
if (res && res.code == 200) {
this.tableDataMj = res.data.rows
this.pageObjMj.total = res.data.total
}
},
async getXyrList () {
const paramas = new FormData()
paramas.append('glxxzjbh', this.$route.query.id)
paramas.append('page', this.pageObjMj.pageData.page)
paramas.append('limit', this.pageObjMj.pageData.size)
let res = await selectAllXyr(paramas)
if (res && res.code == 200) {
this.tableDataXyr = res.data.rows
this.pageObjXyr.total = res.data.total
}
},
// 表格获取人员类型
getRylx (item) {
console.log(item, 123);
if (item.rylx == 0) {
return '身份信息明确'
} else if (item.rylx == 1) {
return '仅位置明确'
} else if (item.rylx == 2) {
return '仅虚拟身份明确'
} else if (item.rylx == 3) {
return '单位/公司'
} else if (item.rylx == 4) {
return '其他'
}
},
//页码变化
handleCurrentChangeXyr (e) {
this.pageObjXyr.pageData.page = e;
this.getXyrList()
},
//条数变化
handleSizeChangeXyr (e) {
this.pageObjXyr.pageData.size = e;
this.pageObjXyr.pageData.page = 1;
this.getXyrList()
},
//页码变化
handleCurrentChangeMj (e) {
this.pageObjMj.pageData.page = e;
this.getMjList()
},
//条数变化
handleSizeChangeMj (e) {
this.pageObjMj.pageData.size = e;
this.pageObjMj.pageData.page = 1;
this.getMjList()
},
},
}
</script>
<style lang="scss" scoped>
.content_box {
height: 100vh;
display: flex;
flex-direction: column;
background: #f1f2f5;
box-sizing: border-box;
.content_box_container {
flex: 1;
overflow: auto;
padding: 19px 24px;
}
.box_header {
font-size: 14px;
font-weight: 500;
color: #383838;
line-height: 18px;
margin-bottom: 19px;
.el-breadcrumb__item:nth-child(1) {
/deep/.el-breadcrumb__inner {
color: #8b8b8b !important;
}
}
}
.box_form {
padding: 32px 40px;
background: #ffffff;
margin-bottom: 1px;
.el-form {
/deep/.el-form-item {
/* display: inline-block; */
.el-form-item__label {
font-size: 16px;
font-weight: 400;
color: #4b4b4b;
}
.el-form-item__content {
/* height: 32px; */
/* line-height: 32px; */
}
}
.form_line1 {
display: flex;
justify-content: space-between;
/deep/.el-form-item {
display: inline-block;
width: 28%;
}
}
.form_line2 {
/deep/.el-form-item {
margin-bottom: 0;
}
}
.searchBtn {
float: right;
}
}
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
border-top: 1px solid #f1f2f5;
.contentTitle {
font-size: 18px;
font-weight: 500;
margin-bottom: 8px;
}
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
}
}
}
.form_footer {
border-top: 1px solid #e5e6e8;
display: flex;
justify-content: flex-end;
height: 64px;
line-height: 64px;
background: #ffffff;
margin-left: -20px;
}
}
/deep/ .update-img {
margin-bottom: 8px;
position: relative;
.el-upload-list {
.el-upload-list__item {
overflow: initial;
}
}
img {
width: 118px;
height: 118px;
object-fit: cover;
}
&.on-upload {
// width: 118px;
height: 118px;
.el-upload {
display: none;
width: 118px;
height: 118px;
}
}
.el-upload {
width: 118px;
height: 118px;
border-radius: 0;
position: relative;
background: #eeeeee;
border: 1px dashed #dcdcdc;
}
.el-icon-plus {
width: 118px;
height: 118px;
line-height: 118px;
}
.el-upload-list {
.el-upload-list__item {
width: 118px;
height: 118px;
border-radius: 0;
.show-name {
position: absolute;
bottom: -25px;
z-index: 9;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
color: #4b4b4b;
font-size: 14px;
overflow: hidden;
}
}
}
}
.el-upload-action {
position: absolute;
top: 0;
left: 0;
display: block;
width: 118px;
height: 118px;
font-size: 0;
color: #fff;
text-align: center;
line-height: 120px;
}
.el-upload-action:hover {
font-size: 20px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.6);
}
.imgDel {
display: flex;
p {
/* display: inline-block; */
display: flex;
flex-direction: column;
//margin-right: 16px;
.el-image,
img {
width: 116px;
height: 116px;
border-radius: 3px 3px 3px 3px;
margin-bottom: 8px;
}
span {
height: 20px;
font-size: 14px;
color: #4b4b4b;
line-height: 20px;
width: auto;
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<div class="contentTitle">民警信息:</div>
<div class="tableBtn">
<el-button size="small"
@click="addMjBtn"
icon="el-icon-plus">民警编辑</el-button>
</div>
<div class="table_contanier">
<Mytable v-loading="downLoading"
element-loading-text="加载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@rowOperation="rowOperation"></Mytable>
</div>
<!-- 编辑民警 -->
<el-dialog title=""
class="dialogPer"
:before-close="handleClose"
:visible.sync="dialogVisible"
width="53%">
<span slot="title">
<!-- <img src="../../../assets/img/user/user01.png" /> -->
<span>民警编辑</span>
</span>
<el-form ref="ruleForm"
:model="ruleForm"
size="medium"
label-width="110px"
label-position="left"
:rules="rules">
<el-form-item label="姓名"
prop="xm">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xm"></el-input>
</el-form-item>
<el-form-item label="身份证号"
prop="identitycard">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.identitycard"></el-input>
</el-form-item>
<el-form-item label="警号"
prop="policemanid">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.policemanid"></el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="lxdh">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.lxdh"></el-input>
</el-form-item>
<el-form-item label="警官证正面:"
prop="imageUrlZm">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="ruleForm.imageUrlZm"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'jgzm');
}
">
<img v-if="ruleForm.imageUrlZm"
:src="ruleForm.imageUrlZm"
class="avatar">
<span v-if="ruleForm.imageUrlZm"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(ruleForm.imageUrlZm,'jgzm')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('jgzm')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<el-form-item label="警官证反面:"
prop="imageUrlFm">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="ruleForm.imageUrlFm"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'jgfm');
}
">
<img v-if="ruleForm.imageUrlFm"
:src="ruleForm.imageUrlFm"
class="avatar">
<span v-if="ruleForm.imageUrlFm"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(ruleForm.imageUrlFm,'jgfm')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('jgfm')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
style="backgroundColor:#266FE8;"
:loading="loadingAll"
@click="submitBtn('ruleForm')">确 定</el-button>
<el-button @click="cancelBtn">取 消</el-button>
</span>
</el-dialog>
<!-- 图片放大 -->
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%"
:src="dialogImageUrl"
alt="" />
</el-dialog>
</div>
</template>
<script>
import Mytable from '@/components/Mytable.vue'
export default {
components: {
Mytable
},
data () {
return {
editType: 0,
dialogVisibleImg: false,
dialogImageUrl: '',
ruleForm: {
xm: '',
policemanid: '',
identitycard: '',
lxdh: '',
imageUrlZm: '',
imageUrlFm: ''
},
rules: {
xm: [
{ required: true, message: '请填写姓名', trigger: 'change' }
],
identitycard: [
{ required: true, message: '请填写身份证号', trigger: 'change' }
],
policemanid: [
{ required: true, message: '请填写警号', trigger: 'change' }
],
lxdh: [
{ required: true, message: '请填写联系电话', trigger: 'change' }
],
xm: [
{ required: true, message: '请填写姓名', trigger: 'change' }
],
imageUrlZm: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
imageUrlFm: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
},
dialogVisible: false,
loadingAll: false,
pageObj: { //分页对象
total: 10,
pageData: {
page: 1,
size: 10
}
},
downLoading: false,
tableData: [],
columObj: {
visble: false,
loading: false,
pagination: 'noPage',
columnData: [
{
text: true,
prop: "xm",
editRow: undefined,
label: "姓名",
width: "",
align: "center",
}, {
text: true,
prop: "identitycard",
editRow: undefined,
label: "身份证号",
width: "",
align: "center",
}, {
text: true,
prop: "policemanid",
editRow: undefined,
label: "警号",
width: "",
align: "center",
}, {
text: true,
prop: "lxdh",
editRow: undefined,
label: "联系电话",
width: "",
align: "center",
}, {
spwj: true,
prop: "imageUrlZm",
editRow: undefined,
label: "警官证正面",
width: "",
align: "center",
}, {
spwj: true,
prop: "imageUrlFm",
editRow: undefined,
label: "警官证反面",
width: "",
align: "center",
},
{
isOperation: true,
type: 'basic',
label: "操作",
width: "180",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "修改",
icon: "",
option: 'xiugai',
color: '#1a81e1',
}, {
operation: "edit",
type: "text",
label: "删除",
icon: "",
option: 'shanchu',
color: '#1a81e1',
}
]
}]
},
}
},
methods: {
removePhoto (item) {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (item == 'jgzm') {
this.ruleForm.imageUrlZm = '';
} else if (item == 'jgfm') {
this.ruleForm.imageUrlFm = '';
}
})
.catch(() => {
});
},
handlePictureCardPreview (file, item) {
this.dialogImageUrl = file;
this.dialogVisibleImg = true;
},
async onChangeSa (file, fileList, item) {
const index = file.name.lastIndexOf(".");
const isJPG = /^.*\.(jpg|png|JPG|PNG|pdf|PDF)$/i.test(
file.name.substring(index)
);
if (!isJPG) {
this.$message.error("图片类型必须是jpg,png,pdf中的一种!");
return;
}
if (item == 'jgzm') {
this.ruleForm.imageUrlZm = URL.createObjectURL(file.raw);
this.ruleForm.zmjgzp = await this.getBase(fileList[0])
} else if (item == 'jgfm') {
this.ruleForm.imageUrlFm = URL.createObjectURL(file.raw);
this.ruleForm.fmjgzp = await this.getBase(fileList[0])
}
},
handleClose () {
this.dialogVisible = false
},
addMjBtn () {
this.ruleForm = {
xm: '',
policemanid: '',
identitycard: '',
lxdh: '',
imageUrlZm: '',
imageUrlFm: ''
}
this.editType = 0
this.dialogVisible = true
},
//页码变化
handleCurrentChange (e) {
this.pageObj.pageData.page = e;
this.getSysClientVp()
},
//条数变化
handleSizeChange (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getSysClientVp()
},
rowOperation (row, index, item) {
// 修改
if (index == 0) {
console.log(row, 222);
this.editType = 1
this.rowItem = row
this.ruleForm = { ...row }
this.dialogVisible = true
} else {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.tableData = this.tableData.filter(item => item.xm != row.xm)
this.$emit('getMjData', this.tableData)
})
.catch(() => {
});
}
},
submitBtn (ruleForm) {
const params = {
xm: this.ruleForm.xm,
identitycard: this.ruleForm.identitycard,
policemanid: this.ruleForm.policemanid,
lxdh: this.ruleForm.lxdh,
imageUrlZm: this.ruleForm.zmjgzp,
imageUrlFm: this.ruleForm.fmjgzp,
}
this.$refs[ruleForm].validate(async (valid) => {
if (valid) {
if (this.editType == 0) {
this.tableData.push(params)
} else if (this.editType == 1) {
console.log(this.tableData.indexOf(this.rowItem), 1111);
this.tableData[this.tableData.indexOf(this.rowItem)] = this.ruleForm;
this.tableData = [...this.tableData]
}
this.$emit('getMjData', this.tableData)
this.editType == 0
this.dialogVisible = false
}
})
},
cancelBtn () {
this.dialogVisible = false
},
// 文件流转base64
getBase (e) {
let val = ''
return new Promise(resolve => {
var reader = new FileReader();
reader.readAsDataURL(e.raw);
reader.onload = () => {
val = reader.result
resolve(val)
};
})
},
},
}
</script>
<style lang="scss" scoped>
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
.contentTitle {
font-size: 18px;
font-weight: 500;
margin-bottom: 8px;
&:before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
/* text-align: center; */
}
}
.dialogPer {
/deep/.el-checkbox {
display: flex;
/* align-items: center; */
.el-checkbox__input {
line-height: inherit !important;
}
.el-checkbox__label {
position: relative;
width: 80%;
margin-bottom: 8px;
padding-top: 4px;
> span {
display: inline-block;
width: 80px;
margin-right: 50px;
white-space: pre-wrap;
}
> div {
display: inline-block;
/* position: absolute;
top: -1px; */
width: 490px;
}
}
}
/deep/.el-dialog {
max-height: 620px;
overflow: hidden;
border-radius: 8px;
}
/deep/.el-dialog__header {
height: 56px;
line-height: 56px;
padding: 0;
padding-left: 16px;
font-size: 18px;
font-weight: 500;
color: #242424;
img {
margin-right: 8px;
}
}
/deep/.el-dialog__body {
height: 440px;
overflow-y: auto;
padding: 10px 20px 0 20px !important;
}
/deep/.el-dialog__footer {
height: 64px;
line-height: 64px;
padding: 0 !important;
border-top: 1px solid #ccc;
text-align: center;
.el-button {
margin-right: 16px !important;
}
}
/deep/.el-textarea__inner {
height: 50px !important;
}
/deep/.el-form-item {
margin-bottom: 18px !important;
}
/deep/.el-form-item__label {
height: 32px;
}
.el-checkbox-group {
display: flex;
flex-direction: column;
}
}
.el-upload-action {
position: absolute;
top: 0;
left: 0;
display: block;
width: 118px;
height: 118px;
font-size: 0;
color: #fff;
text-align: center;
line-height: 120px;
}
.el-upload-action:hover {
font-size: 20px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.6);
}
</style>
\ No newline at end of file
<template>
<div>
<div class="contentTitle">嫌疑人信息:</div>
<div class="tableBtn">
<el-button size="small"
@click="addMjBtn"
icon="el-icon-plus">嫌疑人编辑</el-button>
</div>
<div class="table_contanier">
<Mytable v-loading="downLoading"
element-loading-text="加载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@rowOperation="rowOperation"></Mytable>
</div>
<!-- 嫌疑人编辑 -->
<el-dialog title=""
class="dialogPer"
:before-close="handleClose"
:visible.sync="dialogVisible"
width="53%">
<span slot="title">
<!-- <img src="../../../assets/img/user/user01.png" /> -->
<span>嫌疑人编辑</span>
</span>
<el-form ref="ruleForm"
:model="ruleForm"
size="medium"
label-width="130px"
label-position="left"
:rules="rules">
<el-form-item label="人员类型:"
prop="rylx">
<el-select v-model="ruleForm.rylx"
style="width:50%;"
size="small"
placeholder="请选择">
<el-option label="身份信息明确"
value="0"></el-option>
<el-option label="仅位置明确"
value="1"></el-option>
<el-option label="仅虚拟身份明确"
value="2"></el-option>
<el-option label="单位/公司"
value="3"></el-option>
<el-option label="其他"
value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="网安协助"
prop="waxz">
<el-radio-group v-model="ruleForm.waxz">
<el-radio :label="'0'">{{'不需要'}}</el-radio>
<el-radio :label="'1'">{{'需要'}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="任务编号"
prop="rwbh">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.rwbh"></el-input>
</el-form-item>
<el-form-item label="来源证明材料:"
prop="imageUrlZmcl">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="ruleForm.imageUrlZmcl"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'zmcl');
}
">
<img v-if="ruleForm.imageUrlZmcl"
:src="ruleForm.imageUrlZmcl"
class="avatar">
<span v-if="ruleForm.imageUrlZmcl"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(ruleForm.imageUrlZmcl,'zmcl')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('zmcl')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<template v-if="ruleForm.rylx==0">
<el-form-item label="姓名"
prop="xyrxm">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrxm"></el-input>
</el-form-item>
<el-form-item label="身份证号"
prop="xyrsfzh">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrsfzh"></el-input>
</el-form-item>
<el-form-item label="性别"
prop="xyrxb">
<el-radio-group v-model="ruleForm.xyrxb">
<el-radio :label="0">{{'男'}}</el-radio>
<el-radio :label="1">{{'女'}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="户籍地"
prop="xyrhjd">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrhjd"></el-input>
</el-form-item>
<el-form-item label="涉嫌罪名"
prop="xyrsxzm">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrsxzm"></el-input>
</el-form-item>
<el-form-item label="所在位置"
prop="xyrszwz">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrszwz"></el-input>
</el-form-item>
<el-form-item label="近期活动轨迹"
prop="xyrjqhdgj">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrjqhdgj"></el-input>
</el-form-item>
</template>
<template v-if="ruleForm.rylx==1">
<el-form-item label="位置信息"
prop="wzxxmq">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.wzxxmq"></el-input>
</el-form-item>
</template>
<template v-if="ruleForm.rylx==2">
<el-form-item label="虚拟身份信息"
prop="xnsfmq">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xnsfmq"></el-input>
</el-form-item>
</template>
<template v-if="ruleForm.rylx==3">
<el-form-item label="单位/公司信息"
prop="dwgsmq">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.dwgsmq"></el-input>
</el-form-item>
</template>
<template v-if="ruleForm.rylx==4">
<el-form-item label="其他信息"
prop="qtmq">
<el-input type="textarea"
style="width:50%;"
v-model="ruleForm.qtmq"></el-input>
</el-form-item>
</template>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
style="backgroundColor:#266FE8;"
:loading="loadingAll"
@click="submitBtn('ruleForm')">确 定</el-button>
<el-button @click="cancelBtn">取 消</el-button>
</span>
</el-dialog>
<!-- 图片放大 -->
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%"
:src="dialogImageUrl"
alt="" />
</el-dialog>
</div>
</template>
<script>
import Mytable from '@/components/Mytable.vue'
export default {
components: {
Mytable
},
data () {
return {
editType: 0,
dialogVisibleImg: false,
dialogImageUrl: '',
ruleForm: {
rylx: '',
waxz: '',
rwbh: '',
imageUrlZmcl: '',
lxdh: '',
xyrxm: '',
xyrsfzh: '',
xyrxb: '',
xyrhjd: '',
xyrsxzm: '',
xyrszwz: '',
xyrjqhdgj: '',
wzxxmq: '',
xnsfmq: '',
dwgsmq: '',
qtmq: '',
},
rules: {
rylx: [
{ required: true, message: '请选择人员类型', trigger: 'change' }
],
xyrxm: [
{ required: true, message: '请填写姓名', trigger: 'change' }
],
xyrsfzh: [
{ required: true, message: '请填写身份证号', trigger: 'change' }
],
xyrxb: [
{ required: true, message: '请填写性别', trigger: 'change' }
],
xyrhjd: [
{ required: true, message: '请填写户籍地', trigger: 'change' }
],
xyrsxzm: [
{ required: true, message: '请填写涉嫌罪名', trigger: 'change' }
],
xyrszwz: [
{ required: true, message: '请填写所在位置', trigger: 'change' }
],
xyrjqhdgj: [
{ required: true, message: '请填写近期活动轨迹', trigger: 'change' }
],
wzxxmq: [
{ required: true, message: '请填写位置信息', trigger: 'change' }
],
xnsfmq: [
{ required: true, message: '请填写虚拟身份信息', trigger: 'change' }
],
dwgsmq: [
{ required: true, message: '请填写单位/公司信息', trigger: 'change' }
],
qtmq: [
{ required: true, message: '请填写其他信息', trigger: 'change' }
],
},
dialogVisible: false,
loadingAll: false,
pageObj: { //分页对象
total: 10,
pageData: {
page: 1,
size: 10
}
},
downLoading: false,
tableData: [],
columObj: {
visble: false,
loading: false,
pagination: 'noPage',
columnData: [
{
ownDefined: true,
prop: "rylx",
editRow: undefined,
label: "人员类型",
width: "",
align: "center",
ownDefinedReturn: (row) => { return this.getRylx(row) }
},
{
ownDefined: true,
prop: "waxz",
editRow: undefined,
label: "网安协助",
width: "",
align: "center",
ownDefinedReturn: (row, index) => { return row.waxz == '0' ? '不需要' : '需要' }
}, {
text: true,
prop: "rwbh",
editRow: undefined,
label: "任务编号",
width: "",
align: "center",
}, {
spwj: true,
prop: "imageUrlZmcl",
editRow: undefined,
label: "来源证明材料",
width: "220",
align: "center",
},
{
text: true,
prop: "xyrxm",
editRow: undefined,
label: "姓名",
width: "",
align: "center",
},
{
text: true,
prop: "xyrsfzh",
editRow: undefined,
label: "身份证号",
width: "",
align: "center",
},
{
ownDefined: true,
prop: "xyrxb",
editRow: undefined,
label: "性别",
width: "",
align: "center",
ownDefinedReturn: (row, index) => { return row.xyrxb == 0 ? '男' : '女' }
},
{
text: true,
prop: "xyrhjd",
editRow: undefined,
label: "户籍地",
width: "",
align: "center",
},
{
text: true,
prop: "xyrsxzm",
editRow: undefined,
label: "涉嫌罪名",
width: "",
align: "center",
},
{
text: true,
prop: "xyrszwz",
editRow: undefined,
label: "所在位置",
width: "",
align: "center",
},
{
text: true,
prop: "xyrjqhdgj",
editRow: undefined,
label: "近期活动轨迹",
width: "",
align: "center",
},
{
text: true,
prop: "wzxxmq",
editRow: undefined,
label: "位置信息",
width: "",
align: "center",
},
{
text: true,
prop: "xnsfmq",
editRow: undefined,
label: "虚拟身份信息",
width: "",
align: "center",
},
{
text: true,
prop: "dwgsmq",
editRow: undefined,
label: "单位/公司信息",
width: "",
align: "center",
},
{
text: true,
prop: "qtmq",
editRow: undefined,
label: "其他信息",
width: "",
align: "center",
},
{
isOperation: true,
type: 'basic',
label: "操作",
width: "180",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "修改",
icon: "",
option: 'xiugai',
color: '#1a81e1',
}, {
operation: "edit",
type: "text",
label: "删除",
icon: "",
option: 'shanchu',
color: '#1a81e1',
}
]
}]
},
}
},
methods: {
removePhoto (item) {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.ruleForm.imageUrlZmcl = '';
})
.catch(() => {
});
},
handlePictureCardPreview (file, item) {
this.dialogImageUrl = file;
this.dialogVisibleImg = true;
},
onChangeSa (file, fileList, item) {
const index = file.name.lastIndexOf(".");
const isJPG = /^.*\.(jpg|png|JPG|PNG|pdf|PDF)$/i.test(
file.name.substring(index)
);
if (!isJPG) {
this.$message.error("图片类型必须是jpg,png,pdf中的一种!");
return;
}
this.ruleForm.imageUrlZmcl = URL.createObjectURL(file.raw);
this.ruleForm.lyzmcl = file.raw
},
handleClose () {
this.dialogVisible = false
},
addMjBtn () {
this.ruleForm = {
rylx: '',
waxz: '',
rwbh: '',
imageUrlZmcl: '',
lxdh: '',
xyrxm: '',
xyrsfzh: '',
xyrxb: '',
xyrhjd: '',
xyrsxzm: '',
xyrszwz: '',
xyrjqhdgj: '',
wzxxmq: '',
xnsfmq: '',
dwgsmq: '',
qtmq: '',
}
this.editType = 0
this.dialogVisible = true
},
//页码变化
handleCurrentChange (e) {
this.pageObj.pageData.page = e;
this.getSysClientVp()
},
//条数变化
handleSizeChange (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getSysClientVp()
},
rowOperation (row, index, item) {
if (index == 0) {
// 修改
this.editType = 1
this.rowItem = row
this.ruleForm = { ...row }
this.dialogVisible = true
} else {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.tableData = this.tableData.filter(item => item.xm != row.xm)
this.$emit('getXyrData', this.tableData)
})
.catch(() => {
});
}
},
// 添加
submitBtn (ruleForm) {
const params = {
rylx: this.ruleForm.rylx,
waxz: this.ruleForm.waxz,
rwbh: this.ruleForm.rwbh,
imageUrlZmcl: this.ruleForm.imageUrlZmcl,
lxdh: this.ruleForm.lxdh,
xyrxm: this.ruleForm.xyrxm,
xyrsfzh: this.ruleForm.xyrsfzh,
xyrhjd: this.ruleForm.xyrhjd,
xyrxb: this.ruleForm.xyrxb,
xyrsxzm: this.ruleForm.xyrsxzm,
xyrszwz: this.ruleForm.xyrszwz,
xyrjqhdgj: this.ruleForm.xyrjqhdgj,
wzxxmq: this.ruleForm.wzxxmq,
xnsfmq: this.ruleForm.xnsfmq,
dwgsmq: this.ruleForm.dwgsmq,
qtmq: this.ruleForm.qtmq,
lyzmcl: this.ruleForm.lyzmcl
}
this.$refs[ruleForm].validate(async (valid) => {
if (valid) {
if (this.editType == 0) {
this.tableData.push(params)
} else if (this.editType == 1) {
this.tableData[this.tableData.indexOf(this.rowItem)] = this.ruleForm;
this.tableData = [...this.tableData]
}
this.$emit('getXyrData', this.tableData)
this.editType == 0
this.dialogVisible = false
}
})
},
cancelBtn () {
this.dialogVisible = false
},
// 表格获取人员类型
getRylx (item) {
console.log(item, 123);
if (item.rylx == 0) {
return '身份信息明确'
} else if (item.rylx == 1) {
return '仅位置明确'
} else if (item.rylx == 2) {
return '仅虚拟身份明确'
} else if (item.rylx == 3) {
return '单位/公司'
} else if (item.rylx == 4) {
return '其他'
}
},
},
}
</script>
<style lang="scss" scoped>
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
.contentTitle {
font-size: 18px;
font-weight: 500;
margin-bottom: 8px;
&:before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
/* text-align: center; */
}
}
.dialogPer {
/deep/.el-checkbox {
display: flex;
/* align-items: center; */
.el-checkbox__input {
line-height: inherit !important;
}
.el-checkbox__label {
position: relative;
width: 80%;
margin-bottom: 8px;
padding-top: 4px;
> span {
display: inline-block;
width: 80px;
margin-right: 50px;
white-space: pre-wrap;
}
> div {
display: inline-block;
/* position: absolute;
top: -1px; */
width: 490px;
}
}
}
/deep/.el-dialog {
max-height: 620px;
overflow: hidden;
border-radius: 8px;
}
/deep/.el-dialog__header {
height: 56px;
line-height: 56px;
padding: 0;
padding-left: 16px;
font-size: 18px;
font-weight: 500;
color: #242424;
img {
margin-right: 8px;
}
}
/deep/.el-dialog__body {
height: 440px;
overflow-y: auto;
padding: 10px 20px 0 20px !important;
}
/deep/.el-dialog__footer {
height: 64px;
line-height: 64px;
padding: 0 !important;
border-top: 1px solid #ccc;
text-align: center;
.el-button {
margin-right: 16px !important;
}
}
/deep/.el-textarea__inner {
height: 50px !important;
}
/deep/.el-form-item {
margin-bottom: 18px !important;
}
/deep/.el-form-item__label {
height: 32px;
}
.el-checkbox-group {
display: flex;
flex-direction: column;
}
}
.el-upload-action {
position: absolute;
top: 0;
left: 0;
display: block;
width: 118px;
height: 118px;
font-size: 0;
color: #fff;
text-align: center;
line-height: 120px;
}
.el-upload-action:hover {
font-size: 20px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.6);
}
</style>
\ No newline at end of file
<template>
<div>
<div class="contentTitle">民警信息:</div>
<div class="tableBtn">
<el-button size="small"
@click="addMjBtn"
icon="el-icon-plus">民警编辑</el-button>
</div>
<div class="table_contanier">
<Mytable v-loading="downLoading"
element-loading-text="加载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@rowOperation="rowOperation"></Mytable>
</div>
<!-- 编辑民警 -->
<el-dialog title=""
class="dialogPer"
:before-close="handleClose"
:visible.sync="dialogVisible"
width="53%">
<span slot="title">
<!-- <img src="../../../assets/img/user/user01.png" /> -->
<span>民警编辑</span>
</span>
<el-form ref="ruleForm"
:model="ruleForm"
size="medium"
label-width="110px"
label-position="left"
:rules="rules">
<el-form-item label="姓名"
prop="xm">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xm"></el-input>
</el-form-item>
<el-form-item label="身份证号"
prop="identitycard">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.identitycard"></el-input>
</el-form-item>
<el-form-item label="警号"
prop="policemanid">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.policemanid"></el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="lxdh">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.lxdh"></el-input>
</el-form-item>
<el-form-item label="警官证正面:"
prop="imageUrlZm">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="ruleForm.imageUrlZm"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'jgzm');
}
">
<img v-if="ruleForm.imageUrlZm"
:src="ruleForm.imageUrlZm"
class="avatar">
<span v-if="ruleForm.imageUrlZm"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(ruleForm.imageUrlZm,'jgzm')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('jgzm')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<el-form-item label="警官证反面:"
prop="imageUrlFm">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="ruleForm.imageUrlFm"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'jgfm');
}
">
<img v-if="ruleForm.imageUrlFm"
:src="ruleForm.imageUrlFm"
class="avatar">
<span v-if="ruleForm.imageUrlFm"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(ruleForm.imageUrlFm,'jgfm')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('jgfm')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
style="backgroundColor:#266FE8;"
:loading="loadingAll"
@click="submitBtn('ruleForm')">确 定</el-button>
<el-button @click="cancelBtn">取 消</el-button>
</span>
</el-dialog>
<!-- 图片放大 -->
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%"
:src="dialogImageUrl"
alt="" />
</el-dialog>
</div>
</template>
<script>
import {
insertMjxx,//民警新增
selectAllMj,//列表
updateMjxx,//民警修改
deleteByIdMj,//删除嫌疑人
} from "@/api/statistical.js"
import Mytable from '@/components/Mytable.vue'
export default {
components: {
Mytable
},
data () {
return {
editType: 0,
dialogVisibleImg: false,
dialogImageUrl: '',
ruleForm: {
xm: '',
identitycard: '',
policemanid: '',
lxdh: '',
imageUrlZm: '',
imageUrlFm: ''
},
rules: {
xm: [
{ required: true, message: '请填写姓名', trigger: 'change' }
],
identitycard: [
{ required: true, message: '请填写身份证号', trigger: 'change' }
],
policemanid: [
{ required: true, message: '请填写警号', trigger: 'change' }
],
lxdh: [
{ required: true, message: '请填写联系电话', trigger: 'change' }
],
xm: [
{ required: true, message: '请填写姓名', trigger: 'change' }
],
imageUrlZm: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
imageUrlFm: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
},
dialogVisible: false,
loadingAll: false,
pageObj: { //分页对象
total: 10,
pageData: {
page: 1,
size: 10
}
},
downLoading: false,
tableData: [],
columObj: {
visble: false,
loading: false,
pagination: 'noPage',
columnData: [
{
text: true,
prop: "xm",
editRow: undefined,
label: "姓名",
width: "",
align: "center",
}, {
text: true,
prop: "identitycard",
editRow: undefined,
label: "身份证号",
width: "",
align: "center",
}, {
text: true,
prop: "policemanid",
editRow: undefined,
label: "警号",
width: "",
align: "center",
}, {
text: true,
prop: "lxdh",
editRow: undefined,
label: "联系电话",
width: "",
align: "center",
}, {
spwj: true,
prop: "imageUrlZm",
editRow: undefined,
label: "警官证正面",
width: "",
align: "center",
}, {
spwj: true,
prop: "imageUrlFm",
editRow: undefined,
label: "警官证反面",
width: "",
align: "center",
},
{
isOperation: true,
type: 'basic',
label: "操作",
width: "180",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "修改",
icon: "",
option: 'xiugai',
color: '#1a81e1',
}, {
operation: "edit",
type: "text",
label: "删除",
icon: "",
option: 'shanchu',
color: '#1a81e1',
}
]
}]
},
}
},
mounted () {
this.getMjList();
},
methods: {
removePhoto (item) {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (item == 'jgzm') {
this.ruleForm.imageUrlZm = '';
} else if (item == 'jgfm') {
this.ruleForm.imageUrlFm = '';
}
})
.catch(() => {
});
},
handlePictureCardPreview (file, item) {
this.dialogImageUrl = file;
this.dialogVisibleImg = true;
},
async onChangeSa (file, fileList, item) {
const index = file.name.lastIndexOf(".");
const isJPG = /^.*\.(jpg|png|JPG|PNG|pdf|PDF)$/i.test(
file.name.substring(index)
);
if (!isJPG) {
this.$message.error("图片类型必须是jpg,png,pdf中的一种!");
return;
}
if (item == 'jgzm') {
this.ruleForm.imageUrlZm = URL.createObjectURL(file.raw);
this.ruleForm.zmjgzp = await this.getBase(file)
} else if (item == 'jgfm') {
this.ruleForm.imageUrlFm = URL.createObjectURL(file.raw);
this.ruleForm.fmjgzp = await this.getBase(file)
}
},
handleClose () {
this.dialogVisible = false
},
addMjBtn () {
this.ruleForm = {
xm: '',
identitycard: '',
policemanid: '',
lxdh: '',
imageUrlZm: '',
imageUrlFm: ''
}
this.editType = 0
this.dialogVisible = true
},
//页码变化
handleCurrentChange (e) {
this.pageObj.pageData.page = e;
this.getMjList()
},
//条数变化
handleSizeChange (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getMjList()
},
rowOperation (row, index, item) {
// 修改
if (index == 0) {
this.editType = 1
this.rowItem = row
this.ruleForm = { ...row }
this.xxzjbh = row.xxzjbh
this.dialogVisible = true
} else {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
const paramas = new FormData()
paramas.append('xxzjbh', row.xxzjbh)
let res = await deleteByIdMj(paramas)
if (res && res.code == 200) {
this.$message.success('删除成功')
this.getMjList()
}
})
.catch(() => {
});
}
},
submitBtn (ruleForm) {
this.$refs[ruleForm].validate(async (valid) => {
if (valid) {
this.loadingAll = true
const paramas = new FormData()
paramas.append('xm', this.ruleForm.xm)
paramas.append('identitycard', this.ruleForm.identitycard)
paramas.append('policemanid', this.ruleForm.policemanid)
paramas.append('lxdh', this.ruleForm.lxdh)
paramas.append('zmjgzp', this.ruleForm.zmjgzp)
paramas.append('fmjgzp', this.ruleForm.fmjgzp)
paramas.append('glxxzjbh', this.$route.query.id)
if (this.editType == 0) {
let res = await insertMjxx(paramas)
if (res && res.code == 200) {
this.loadingAll = false
this.dialogVisible = false
this.getMjList()
}
} else if (this.editType == 1) {
paramas.append('xxzjbh', this.xxzjbh || '')
let res = await updateMjxx(paramas)
if (res && res.code == 200) {
this.loadingAll = false
this.dialogVisible = false
this.getMjList()
}
}
}
})
},
async getMjList () {
this.downLoading = true
const paramas = new FormData()
paramas.append('glxxzjbh', this.$route.query.id)
paramas.append('page', this.pageObj.pageData.page)
paramas.append('limit', this.pageObj.pageData.size)
let res = await selectAllMj(paramas)
if (res && res.code == 200) {
res.data.rows.forEach(item => {
item.imageUrlZm = item.zmjgzp
item.imageUrlFm = item.fmjgzp
})
this.tableData = res.data.rows
this.pageObj.total = res.data.total
this.downLoading = false
}
},
cancelBtn () {
this.dialogVisible = false
},
// 文件流转base64
getBase (e) {
let val = ''
return new Promise(resolve => {
var reader = new FileReader();
reader.readAsDataURL(e.raw);
reader.onload = () => {
val = reader.result
resolve(val)
};
})
},
},
}
</script>
<style lang="scss" scoped>
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
.contentTitle {
font-size: 18px;
font-weight: 500;
margin-bottom: 8px;
&:before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
/* text-align: center; */
}
}
.dialogPer {
/deep/.el-checkbox {
display: flex;
/* align-items: center; */
.el-checkbox__input {
line-height: inherit !important;
}
.el-checkbox__label {
position: relative;
width: 80%;
margin-bottom: 8px;
padding-top: 4px;
> span {
display: inline-block;
width: 80px;
margin-right: 50px;
white-space: pre-wrap;
}
> div {
display: inline-block;
/* position: absolute;
top: -1px; */
width: 490px;
}
}
}
/deep/.el-dialog {
max-height: 620px;
overflow: hidden;
border-radius: 8px;
}
/deep/.el-dialog__header {
height: 56px;
line-height: 56px;
padding: 0;
padding-left: 16px;
font-size: 18px;
font-weight: 500;
color: #242424;
img {
margin-right: 8px;
}
}
/deep/.el-dialog__body {
height: 440px;
overflow-y: auto;
padding: 10px 20px 0 20px !important;
}
/deep/.el-dialog__footer {
height: 64px;
line-height: 64px;
padding: 0 !important;
border-top: 1px solid #ccc;
text-align: center;
.el-button {
margin-right: 16px !important;
}
}
/deep/.el-textarea__inner {
height: 50px !important;
}
/deep/.el-form-item {
margin-bottom: 18px !important;
}
/deep/.el-form-item__label {
height: 32px;
}
.el-checkbox-group {
display: flex;
flex-direction: column;
}
}
.el-upload-action {
position: absolute;
top: 0;
left: 0;
display: block;
width: 118px;
height: 118px;
font-size: 0;
color: #fff;
text-align: center;
line-height: 120px;
}
.el-upload-action:hover {
font-size: 20px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.6);
}
</style>
\ No newline at end of file
<template>
<div>
<div class="contentTitle">嫌疑人信息:</div>
<div class="tableBtn">
<el-button size="small"
@click="addMjBtn"
icon="el-icon-plus">嫌疑人编辑</el-button>
</div>
<div class="table_contanier">
<Mytable v-loading="downLoading"
element-loading-text="加载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@rowOperation="rowOperation"></Mytable>
</div>
<!-- 嫌疑人编辑 -->
<el-dialog title=""
class="dialogPer"
:before-close="handleClose"
:visible.sync="dialogVisible"
width="53%">
<span slot="title">
<!-- <img src="../../../assets/img/user/user01.png" /> -->
<span>嫌疑人编辑</span>
</span>
<el-form ref="ruleForm"
:model="ruleForm"
size="medium"
label-width="130px"
label-position="left"
:rules="rules">
<el-form-item label="人员类型:">
<el-select v-model="ruleForm.rylx"
style="width:50%;"
size="small"
placeholder="请选择">
<el-option label="身份信息明确"
value="0"></el-option>
<el-option label="仅位置明确"
value="1"></el-option>
<el-option label="仅虚拟身份明确"
value="2"></el-option>
<el-option label="单位/公司"
value="3"></el-option>
<el-option label="其他"
value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="网安协助"
prop="waxz">
<el-radio-group v-model="ruleForm.waxz">
<el-radio :label="'0'">{{'不需要'}}</el-radio>
<el-radio :label="'1'">{{'需要'}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="任务编号"
prop="rwbh">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.rwbh"></el-input>
</el-form-item>
<el-form-item label="来源证明材料:"
prop="imageUrlZmcl">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="ruleForm.imageUrlZmcl"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'zmcl');
}
">
<img v-if="ruleForm.imageUrlZmcl"
:src="ruleForm.imageUrlZmcl"
class="avatar">
<span v-if="ruleForm.imageUrlZmcl"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(ruleForm.imageUrlZmcl,'zmcl')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('zmcl')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<template v-if="ruleForm.rylx==0">
<el-form-item label="姓名"
prop="xyrxm">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrxm"></el-input>
</el-form-item>
<el-form-item label="身份证号"
prop="xyrsfzh">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrsfzh"></el-input>
</el-form-item>
<el-form-item label="性别"
prop="xyrxb">
<el-radio-group v-model="ruleForm.xyrxb">
<el-radio :label="0">{{'男'}}</el-radio>
<el-radio :label="1">{{'女'}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="户籍地"
prop="xyrhjd">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrhjd"></el-input>
</el-form-item>
<el-form-item label="涉嫌罪名"
prop="xyrsxzm">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrsxzm"></el-input>
</el-form-item>
<el-form-item label="所在位置"
prop="xyrszwz">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrszwz"></el-input>
</el-form-item>
<el-form-item label="近期活动轨迹"
prop="xyrjqhdgj">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xyrjqhdgj"></el-input>
</el-form-item>
</template>
<template v-if="ruleForm.rylx==1">
<el-form-item label="位置信息"
prop="wzxxmq">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.wzxxmq"></el-input>
</el-form-item>
</template>
<template v-if="ruleForm.rylx==2">
<el-form-item label="虚拟身份信息"
prop="xnsfmq">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.xnsfmq"></el-input>
</el-form-item>
</template>
<template v-if="ruleForm.rylx==3">
<el-form-item label="单位/公司信息"
prop="dwgsmq">
<el-input type="text"
style="width:50%;"
v-model="ruleForm.dwgsmq"></el-input>
</el-form-item>
</template>
<template v-if="ruleForm.rylx==4">
<el-form-item label="其他信息"
prop="qtmq">
<el-input type="textarea"
style="width:50%;"
v-model="ruleForm.qtmq"></el-input>
</el-form-item>
</template>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
style="backgroundColor:#266FE8;"
:loading="loadingAll"
@click="submitBtn('ruleForm')">确 定</el-button>
<el-button @click="cancelBtn">取 消</el-button>
</span>
</el-dialog>
<!-- 图片放大 -->
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%"
:src="dialogImageUrl"
alt="" />
</el-dialog>
</div>
</template>
<script>
import {
insertXyrxx,//民警新增
selectAllXyr,//列表
updateXyrxx,//民警修改
deleteByIdXyr,//删除嫌疑人
} from "@/api/statistical.js"
import Mytable from '@/components/Mytable.vue'
export default {
components: {
Mytable
},
data () {
return {
editType: 0,
dialogVisibleImg: false,
dialogImageUrl: '',
ruleForm: {
rylx: '',
waxz: '',
rwbh: '',
imageUrlZmcl: '',
xyrxm: '',
xyrsfzh: '',
xyrxb: '',
xyrhjd: '',
xyrsxzm: '',
xyrszwz: '',
xyrjqhdgj: '',
wzxxmq: '',
xnsfmq: '',
dwgsmq: '',
qtmq: '',
},
rules: {
rylx: [
{ required: true, message: '请选择人员类型', trigger: 'change' }
],
xyrxm: [
{ required: true, message: '请填写姓名', trigger: 'change' }
],
xyrsfzh: [
{ required: true, message: '请填写身份证号', trigger: 'change' }
],
xyrxb: [
{ required: true, message: '请填写性别', trigger: 'change' }
],
xyrhjd: [
{ required: true, message: '请填写户籍地', trigger: 'change' }
],
xyrsxzm: [
{ required: true, message: '请填写涉嫌罪名', trigger: 'change' }
],
xyrszwz: [
{ required: true, message: '请填写所在位置', trigger: 'change' }
],
xyrjqhdgj: [
{ required: true, message: '请填写近期活动轨迹', trigger: 'change' }
],
wzxxmq: [
{ required: true, message: '请填写位置信息', trigger: 'change' }
],
xnsfmq: [
{ required: true, message: '请填写虚拟身份信息', trigger: 'change' }
],
dwgsmq: [
{ required: true, message: '请填写单位/公司信息', trigger: 'change' }
],
qtmq: [
{ required: true, message: '请填写其他信息', trigger: 'change' }
],
},
dialogVisible: false,
loadingAll: false,
pageObj: { //分页对象
total: 10,
pageData: {
page: 1,
size: 10
}
},
downLoading: false,
tableData: [{
}],
columObj: {
visble: false,
loading: false,
pagination: 'noPage',
columnData: [
{
ownDefined: true,
prop: "rylx",
editRow: undefined,
label: "人员类型",
width: "",
align: "center",
ownDefinedReturn: (row) => { return this.getRylx(row) }
},
{
ownDefined: true,
prop: "waxz",
editRow: undefined,
label: "网安协助",
width: "",
align: "center",
ownDefinedReturn: (row, index) => { return row.waxz == '0' ? '不需要' : '需要' }
}, {
text: true,
prop: "rwbh",
editRow: undefined,
label: "任务编号",
width: "",
align: "center",
}, {
spwj: true,
prop: "wj",
editRow: undefined,
label: "来源证明材料",
width: "220",
align: "center",
},
{
text: true,
prop: "xyrxm",
editRow: undefined,
label: "姓名",
width: "",
align: "center",
},
{
text: true,
prop: "xyrsfzh",
editRow: undefined,
label: "身份证号",
width: "",
align: "center",
},
{
ownDefined: true,
prop: "xyrxb",
editRow: undefined,
label: "性别",
width: "",
align: "center",
ownDefinedReturn: (row, index) => { return row.xyrxb == 0 ? '男' : '女' }
},
{
text: true,
prop: "xyrhjd",
editRow: undefined,
label: "户籍地",
width: "",
align: "center",
},
{
text: true,
prop: "xyrsxzm",
editRow: undefined,
label: "涉嫌罪名",
width: "",
align: "center",
},
{
text: true,
prop: "xyrszwz",
editRow: undefined,
label: "所在位置",
width: "",
align: "center",
},
{
text: true,
prop: "xyrjqhdgj",
editRow: undefined,
label: "近期活动轨迹",
width: "",
align: "center",
},
{
text: true,
prop: "wzxxmq",
editRow: undefined,
label: "位置信息",
width: "",
align: "center",
},
{
text: true,
prop: "xnsfmq",
editRow: undefined,
label: "虚拟身份信息",
width: "",
align: "center",
},
{
text: true,
prop: "dwgsmq",
editRow: undefined,
label: "单位/公司信息",
width: "",
align: "center",
},
{
text: true,
prop: "qtmq",
editRow: undefined,
label: "其他信息",
width: "",
align: "center",
},
{
isOperation: true,
type: 'basic',
label: "操作",
width: "180",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "修改",
icon: "",
option: 'xiugai',
color: '#1a81e1',
}, {
operation: "edit",
type: "text",
label: "删除",
icon: "",
option: 'shanchu',
color: '#1a81e1',
}
]
}]
},
}
},
mounted () {
this.getXyrList();
},
methods: {
removePhoto (item) {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.removeXxzjbh = this.ruleForm.removeWj
this.ruleForm.imageUrlZmcl = '';
this.ruleForm.lyzmcl = ''
})
.catch(() => {
});
},
handlePictureCardPreview (file, item) {
this.dialogImageUrl = file;
this.dialogVisibleImg = true;
},
onChangeSa (file, fileList, item) {
const index = file.name.lastIndexOf(".");
const isJPG = /^.*\.(jpg|png|JPG|PNG|pdf|PDF)$/i.test(
file.name.substring(index)
);
if (!isJPG) {
this.$message.error("图片类型必须是jpg,png,pdf中的一种!");
return;
}
this.ruleForm.imageUrlZmcl = URL.createObjectURL(file.raw);
this.ruleForm.lyzmcl = file
console.log(fileList, file, 2211112);
},
handleClose () {
this.dialogVisible = false
},
addMjBtn () {
this.ruleForm = {
rylx: '',
waxz: '',
rwbh: '',
imageUrlZmcl: '',
xyrxm: '',
xyrsfzh: '',
xyrxb: '',
xyrhjd: '',
xyrsxzm: '',
xyrszwz: '',
xyrjqhdgj: '',
wzxxmq: '',
xnsfmq: '',
dwgsmq: '',
qtmq: '',
}
this.editType = 0
this.dialogVisible = true
},
//页码变化
handleCurrentChange (e) {
this.pageObj.pageData.page = e;
this.getXyrList()
},
//条数变化
handleSizeChange (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getXyrList()
},
rowOperation (row, index, item) {
if (index == 0) {
// 修改
console.log(row, 888);
this.editType = 1
// this.ruleForm = { ...row }
this.ruleForm.rylx = row.rylx
this.ruleForm.waxz = row.waxz
this.ruleForm.rwbh = row.rwbh
this.ruleForm.lyzmcl = row.lyzmcl
this.ruleForm.xyrxm = row.xyrxm
this.ruleForm.xyrsfzh = row.xyrsfzh
this.ruleForm.xyrhjd = row.xyrhjd
this.ruleForm.xyrszwz = row.xyrszwz
this.ruleForm.xyrhjd = row.xyrhjd
this.ruleForm.xyrjqhdgj = row.xyrjqhdgj
this.ruleForm.wzxxmq = row.wzxxmq
this.ruleForm.xnsfmq = row.xnsfmq
this.ruleForm.dwgsmq = row.dwgsmq
this.ruleForm.qtmq = row.qtmq
this.ruleForm.imageUrlZmcl = row.wj[0].dzwjnrBase64
this.ruleForm.removeWj = row.wj[0].xxzjbh
this.xxzjbh = row.xxzjbh
this.dialogVisible = true
} else {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
const paramas = new FormData()
paramas.append('xxzjbh', row.xxzjbh)
let res = await deleteByIdXyr(paramas)
if (res && res.code == 200) {
this.$message.success('删除成功')
this.getXyrList()
}
})
.catch(() => {
});
}
},
// 添加
submitBtn (ruleForm) {
this.$refs[ruleForm].validate(async (valid) => {
if (valid) {
this.loadingAll = true
const paramas = new FormData()
paramas.append('glxxzjbh', this.$route.query.id)
paramas.append('rylx', this.ruleForm.rylx)
paramas.append('waxz', this.ruleForm.waxz)
paramas.append('rwbh', this.ruleForm.rwbh)
console.log(this.ruleForm.lyzmcl, 333);
if (JSON.stringify(this.ruleForm.lyzmcl) != '{}') {
paramas.append('lyzmcl', this.ruleForm.lyzmcl.raw)
}
paramas.append('xyrxm', '')
paramas.append('xyrsfzh', '')
paramas.append('xyrhjd', '')
paramas.append('xyrszwz', '')
paramas.append('xyrjqhdgj', '')
if (this.ruleForm.rylx == '0') {
paramas.set('xyrxm', this.ruleForm.xyrxm)
paramas.set('xyrsfzh', this.ruleForm.xyrsfzh)
paramas.set('xyrhjd', this.ruleForm.xyrhjd)
paramas.set('xyrszwz', this.ruleForm.xyrszwz)
paramas.set('xyrjqhdgj', this.ruleForm.xyrjqhdgj)
} else if (this.ruleForm.rylx == '1') {
paramas.append('wzxxmq', this.ruleForm.wzxxmq)
} else if (this.ruleForm.rylx == '2') {
paramas.append('xnsfmq', this.ruleForm.xnsfmq)
} else if (this.ruleForm.rylx == '3') {
paramas.append('dwgsmq', this.ruleForm.dwgsmq)
} else if (this.ruleForm.rylx == '4') {
paramas.append('qtmq', this.ruleForm.qtmq)
}
if (this.editType == 0) {
let res = await insertXyrxx(paramas)
if (res && res.code == 200) {
this.loadingAll = false
this.dialogVisible = false
this.getXyrList()
}
} else if (this.editType == 1) {
paramas.append('xxzjbh', this.xxzjbh || '')
paramas.append('removezpStr', this.removeXxzjbh || '')
let res = await updateXyrxx(paramas)
if (res && res.code == 200) {
this.loadingAll = false
this.dialogVisible = false
this.getXyrList()
}
}
this.$emit('getXyrData', this.tableData)
this.editType == 0
this.dialogVisible = false
}
})
},
async getXyrList () {
this.downLoading = true
const paramas = new FormData()
paramas.append('glxxzjbh', this.$route.query.id)
paramas.append('page', this.pageObj.pageData.page)
paramas.append('limit', this.pageObj.pageData.size)
let res = await selectAllXyr(paramas)
if (res && res.code == 200) {
this.tableData = res.data.rows
this.pageObj.total = res.data.total
this.downLoading = false
}
},
cancelBtn () {
this.dialogVisible = false
},
// 表格获取人员类型
getRylx (item) {
if (item.rylx == 0) {
return '身份信息明确'
} else if (item.rylx == 1) {
return '仅位置明确'
} else if (item.rylx == 2) {
return '仅虚拟身份明确'
} else if (item.rylx == 3) {
return '单位/公司'
} else if (item.rylx == 4) {
return '其他'
}
},
},
}
</script>
<style lang="scss" scoped>
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
.contentTitle {
font-size: 18px;
font-weight: 500;
margin-bottom: 8px;
&:before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
/* text-align: center; */
}
}
.dialogPer {
/deep/.el-checkbox {
display: flex;
/* align-items: center; */
.el-checkbox__input {
line-height: inherit !important;
}
.el-checkbox__label {
position: relative;
width: 80%;
margin-bottom: 8px;
padding-top: 4px;
> span {
display: inline-block;
width: 80px;
margin-right: 50px;
white-space: pre-wrap;
}
> div {
display: inline-block;
/* position: absolute;
top: -1px; */
width: 490px;
}
}
}
/deep/.el-dialog {
max-height: 620px;
overflow: hidden;
border-radius: 8px;
}
/deep/.el-dialog__header {
height: 56px;
line-height: 56px;
padding: 0;
padding-left: 16px;
font-size: 18px;
font-weight: 500;
color: #242424;
img {
margin-right: 8px;
}
}
/deep/.el-dialog__body {
height: 440px;
overflow-y: auto;
padding: 10px 20px 0 20px !important;
}
/deep/.el-dialog__footer {
height: 64px;
line-height: 64px;
padding: 0 !important;
border-top: 1px solid #ccc;
text-align: center;
.el-button {
margin-right: 16px !important;
}
}
/deep/.el-textarea__inner {
height: 50px !important;
}
/deep/.el-form-item {
margin-bottom: 18px !important;
}
/deep/.el-form-item__label {
height: 32px;
}
.el-checkbox-group {
display: flex;
flex-direction: column;
}
}
.el-upload-action {
position: absolute;
top: 0;
left: 0;
display: block;
width: 118px;
height: 118px;
font-size: 0;
color: #fff;
text-align: center;
line-height: 120px;
}
.el-upload-action:hover {
font-size: 20px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.6);
}
</style>
\ No newline at end of file
<template>
<div class="content_box">
<div class="content_box_container">
<div class="box_header">
发起协作
</div>
<div class="box_form">
<el-form ref="form"
:rules="rules"
label-position="left"
:model="form"
label-width="116px">
<!-- 基本信息 -->
<div class="form_line1">
<el-form-item label="协作名称:"
prop="xzmc">
<el-input v-model="form.xzmc"
size="small"></el-input>
</el-form-item>
<el-form-item label="案件名称:"
prop="ajmc">
<el-input v-model="form.ajmc"
size="small"></el-input>
</el-form-item>
<el-form-item label="案件编号:"
prop="ajbh">
<el-input v-model="form.ajbh"
size="small"></el-input>
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="办案单位:"
prop="ssdwcode">
<lazy-select-tree-dialog v-for="item in propQueryFieldQg"
:key="item.id"
:placeholder="'请选择'"
:sendId="item.id"
:formData="form"
:currentItem="item" />
</el-form-item>
<el-form-item label="案件类型:"
prop="ajlbmc">
<select-tree-dialog v-for="item in propQueryFieldAjlb"
:key="item.id"
:placeholder="'请选择'"
:sendId="item.id"
:formData="form"
:currentItem="item" />
</el-form-item>
<el-form-item label="协作单位:"
prop="xzdwdm">
<select-tree-dialog v-for="item in propQueryField"
:key="item.id"
:placeholder="'请选择'"
:sendId="item.id"
:formData="form"
:currentItem="item" />
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="简要案情:"
prop="jayq">
<el-input v-model="form.jayq"
size="small"></el-input>
</el-form-item>
</div>
<div class="form_line1">
<el-form-item label="受案登记表:"
prop="imageUrlSa">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="form.imageUrlSa"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'sadjb');
}
">
<img v-if="form.imageUrlSa"
:src="form.imageUrlSa"
class="avatar">
<span v-if="form.imageUrlSa"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(form.imageUrlSa,'sadjb')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('sadjb')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<el-form-item label="立案决定书:"
prop="imageUrlLa">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="form.imageUrlLa"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'lajds');
}
">
<img v-if="form.imageUrlLa"
:src="form.imageUrlLa"
class="avatar">
<span v-if="form.imageUrlLa"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(form.imageUrlLa,'lajds')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('lajds')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
<el-form-item label="协作函:"
prop="imageUrlXz">
<el-upload class="update-img"
action="#"
:auto-upload="false"
accept=".png,.jpg,.PNG,.JPG,.pdf,.PDF"
:show-file-list="false"
v-model="form.imageUrlXz"
:on-change="
(flie, fileList) => {
onChangeSa(flie, fileList,'xzh');
}
">
<img v-if="form.imageUrlXz"
:src="form.imageUrlXz"
class="avatar">
<span v-if="form.imageUrlXz"
class="el-upload-action"
@click.stop="() => {}">
<i class="el-icon-zoom-in"
@click="handlePictureCardPreview(form.imageUrlXz,'xzh')"></i>
<i class="el-icon-delete"
@click.stop="removePhoto('xzh')"></i>
</span>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
<span style="color: rgb(247,138,13);
font-size: 13px;
display: block;
line-height: 20px;
text-align: left;
">支持jpg,jpeg,png格式,且不大于1M</span>
</el-upload>
</el-form-item>
</div>
<!-- 民警信息 -->
<div class="box_table">
<addMjInfo @getMjData="getMjData"></addMjInfo>
</div>
<!-- 嫌疑人信息 -->
<div class="box_table">
<addXyrInfo @getXyrData="getXyrData"></addXyrInfo>
</div>
</el-form>
</div>
</div>
<div class="form_footer">
<div class="footer">
<!-- <el-button size="small"
@click="resetForm('form')">清空重置</el-button> -->
<el-button size="small"
type="primary"
:loading="loadingBtn"
:disabled="loadingBtn"
@click="addForm('form')"
icon="el-icon-s-promotion">修改提交</el-button>
</div>
</div>
<el-dialog :visible.sync="dialogVisibleImg">
<img width="100%"
:src="dialogImageUrl"
alt="" />
</el-dialog>
</div>
</template>
<script>
import {
updateXzqqXx,//协助新增
selectOne,//
imgInfo,//
selectAllMj,//
selectAllXyr,//
} from "@/api/statistical.js"
import SelectTreeDialog from "@c/treeCode_components.vue";
import addMjInfo from "./components/editMjInfo.vue";
import addXyrInfo from "./components/editXyrInfo.vue";
import { mixinsZd } from '@/utils/zdList.js'
import LazySelectTreeDialog from "@c/lazy_treeCode_components.vue";
export default {
components: {
SelectTreeDialog, addMjInfo, addXyrInfo, LazySelectTreeDialog
},
data () {
return {
tableDataMj: [],
tableDataXyr: [],
dialogImageUrl: '',
dialogVisibleImg: false,
loadingBtn: false,
// 表单信息
isCjcs: false,
form: {
imageUrlSa: '',
imageUrlLa: '',
imageUrlXz: '',
ssdwcode: '',
xzmc: '',
ajmc: '',
ajbh: '',
ajlbmc: '',
xzdwdm: '',
xzblnr: '',
jayq: '',
},
rules: {
xzmc: [
{ required: true, message: '请填写协作名称', trigger: 'change' }
],
ajmc: [
{ required: true, message: '请填写案件名称', trigger: 'change' }
],
imageUrlSa: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
imageUrlLa: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
imageUrlXz: [
{ required: true, message: '请上传文件', trigger: 'change' }
],
ajbh: [
{ required: true, message: '请填写案件编号', trigger: 'change' }
],
ajlbmc: [
{ required: true, message: '请选择案件类型', trigger: 'change' }
],
ssdwcode: [
{ required: true, message: '请选择单位', trigger: 'change' },
],
xzdwdm: [
{ required: true, message: '请选择单位', trigger: 'change' },
],
xzblnr: [
{ required: true, message: '请填写协作描述', trigger: 'change' },
],
jayq: [
{ required: true, message: '请填写简要案情', trigger: 'change' }
],
},
//字典码
propQueryFieldAjlb: [{
name: "案件类型",
id: "ajlbmc",
props: "checkEmpty",
type: "codeTreeDialog",
readonly: false,
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_AJLB",
},],
//字典码
propQueryField: [{
name: "协作单位",
id: "xzdwdm",
props: "checkEmpty",
type: "codeTreeDialogs",
readonly: false,
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_UNIT",
},],
zdObj: {}, // 厂商字典码对象
baseInfoDetail: {},
removeXxzjbh: [],
}
},
mixins: [mixinsZd],
mounted () {
this.getJbInfo()
this.getJbInfoImg()
const userInfo = JSON.parse(sessionStorage.getItem("userInfo"))
},
watch: {
},
methods: {
async getJbInfo () {
this.loadings = true
const paramas = new FormData()
paramas.append('id', this.$route.query.id)
let res = await selectOne(paramas)
if (res && res.code == 200) {
this.form.xzmc = res.data.rows.xzmc
this.form.ajmc = res.data.rows.ajmc
this.form.ajbh = res.data.rows.asjbh
this.form.ssdwcode = res.data.rows.badwdm
this.form.ajlbmc = res.data.rows.ajlbdm
this.form.xzdwdm = res.data.rows.xzdwdm
this.form.xzblnr = res.data.rows.xzblnr
this.form.jayq = res.data.rows.jayq
this.loadings = false
}
},
async getJbInfoImg () {
const paramas = new FormData()
paramas.append('xxzjbh', this.$route.query.id)
let res = await imgInfo(paramas)
if (res && res.code == 200) {
res.data.detail && res.data.detail.forEach(item => {
if (item.fjlx == 1) {
this.form.imageUrlSa = item.dzwjnrBase64
this.form.removeSa = item.xxzjbh
} else if (item.fjlx == 2) {
this.form.imageUrlLa = item.dzwjnrBase64
this.form.removeLa = item.xxzjbh
} else if (item.fjlx == 3) {
this.form.imageUrlXz = item.dzwjnrBase64
this.form.removeXz = item.xxzjbh
}
});
}
},
// 获取民警数据
getMjData (item) {
this.tableDataMj = item
},
// 获取嫌疑人数据
getXyrData (item) {
this.tableDataXyr = item
},
removePhoto (item) {
this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (item == 'sadjb') {
this.form.imageUrlSa = '';
this.removeXxzjbh.push(this.form.removeSa)
this.form.sadjbfile = ''
this.form.removeSa = ''
} else if (item == 'lajds') {
this.form.imageUrlLa = '';
this.removeXxzjbh.push(this.form.removeLa)
this.form.lajdsfile = ''
this.form.removeLa = ''
} else if (item == 'xzh') {
this.form.imageUrlXz = '';
this.removeXxzjbh.push(this.form.removeXz)
this.form.xzhfile = ''
this.form.removeXz = ''
}
console.log(this.removeXxzjbh, this.removeXxzjbh.join(','), 11);
})
.catch(() => {
});
},
handlePictureCardPreview (file, item) {
this.dialogImageUrl = file;
this.dialogVisibleImg = true;
},
onChangeSa (file, fileList, item) {
const index = file.name.lastIndexOf(".");
const isJPG = /^.*\.(jpg|png|JPG|PNG|pdf|PDF)$/i.test(
file.name.substring(index)
);
if (!isJPG) {
this.$message.error("图片类型必须是jpg,png,pdf中的一种!");
return;
}
if (item == 'sadjb') {
this.form.imageUrlSa = URL.createObjectURL(file.raw);
this.form.sadjbfile = file.raw;
} else if (item == 'lajds') {
this.form.imageUrlLa = URL.createObjectURL(file.raw);
this.form.lajdsfile = file.raw;
} else if (item == 'xzh') {
this.form.imageUrlXz = URL.createObjectURL(file.raw);
this.form.xzhfile = file.raw;
}
},
// 保存
addForm (formName) {
this.$refs[formName].validate(async (valid) => {
if (valid) {
this.loadingBtn = true
let params = new FormData()
params.append('xxzjbh', this.$route.query.id)
params.append('xzmc', this.form.xzmc)
params.append('ajmc', this.form.ajmc)
params.append('badwdm', this.form.ssdwcode)
params.append('asjbh', this.form.ajbh)
params.append('ajlbdm', this.form.ajlbmc)
params.append('xzdwdm', this.form.xzdwdm)
params.append('xzblnr', this.form.xzblnr)
params.append('jayq', this.form.jayq)
params.append('sadjbfile', this.form.sadjbfile)
params.append('lajdsfile', this.form.lajdsfile)
params.append('xzhfile', this.form.xzhfile)
params.append('removezpStr', this.removeXxzjbh && this.removeXxzjbh.join(',') || '')
let res = await updateXzqqXx(params)
if (res && res.code == 200) {
this.loadingBtn = false
this.$alert("保存成功", "提示", {
confirmButtonText: "确定",
type: "success",
}).then(() => {
console.log(this.form, 11);
this.$message.success('提交成功!');
window.opener.postMessage("appReloadData", location.origin);
window.close()
}).catch(() => {
})
} else {
this.loadingBtn = false
}
} else {
return false;
}
});
},
resetForm (formName) {
this.$refs[formName].resetFields();
this.form = {}
},
},
}
</script>
<style lang="scss" scoped>
.content_box {
height: 100vh;
display: flex;
flex-direction: column;
background: #f1f2f5;
box-sizing: border-box;
.content_box_container {
flex: 1;
overflow: auto;
padding: 19px 24px;
}
.box_header {
font-size: 14px;
font-weight: 500;
color: #383838;
line-height: 18px;
margin-bottom: 19px;
.el-breadcrumb__item:nth-child(1) {
/deep/.el-breadcrumb__inner {
color: #8b8b8b !important;
}
}
}
.box_form {
padding: 32px 40px;
background: #ffffff;
margin-bottom: 1px;
.el-form {
/deep/.el-form-item {
/* display: inline-block; */
.el-form-item__label {
font-size: 16px;
font-weight: 400;
color: #4b4b4b;
}
.el-form-item__content {
/* height: 32px; */
/* line-height: 32px; */
}
}
.form_line1 {
display: flex;
justify-content: space-between;
/deep/.el-form-item {
display: inline-block;
width: 28%;
}
}
.form_line2 {
/deep/.el-form-item {
margin-bottom: 0;
}
}
.searchBtn {
float: right;
}
}
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
border-top: 1px solid #f1f2f5;
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
}
}
}
.form_footer {
border-top: 1px solid #e5e6e8;
display: flex;
justify-content: flex-end;
height: 64px;
line-height: 64px;
background: #ffffff;
margin-left: -20px;
}
}
/deep/ .update-img {
margin-bottom: 8px;
position: relative;
.el-upload-list {
.el-upload-list__item {
overflow: initial;
}
}
img {
width: 118px;
height: 118px;
object-fit: cover;
}
&.on-upload {
// width: 118px;
height: 118px;
.el-upload {
display: none;
width: 118px;
height: 118px;
}
}
.el-upload {
width: 118px;
height: 118px;
border-radius: 0;
position: relative;
background: #eeeeee;
border: 1px dashed #dcdcdc;
}
.el-icon-plus {
width: 118px;
height: 118px;
line-height: 118px;
}
.el-upload-list {
.el-upload-list__item {
width: 118px;
height: 118px;
border-radius: 0;
.show-name {
position: absolute;
bottom: -25px;
z-index: 9;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
color: #4b4b4b;
font-size: 14px;
overflow: hidden;
}
}
}
}
.el-upload-action {
position: absolute;
top: 0;
left: 0;
display: block;
width: 118px;
height: 118px;
font-size: 0;
color: #fff;
text-align: center;
line-height: 120px;
}
.el-upload-action:hover {
font-size: 20px;
background-color: #000;
background-color: rgba(0, 0, 0, 0.6);
}
</style>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</header> </header>
<Mytable v-loading="downLoading" <Mytable v-loading="downLoading"
element-loading-text="载中..." element-loading-text="载中..."
:tableData="tableData" :tableData="tableData"
:columObj="columObj" :columObj="columObj"
:pageObj="pageObj" :pageObj="pageObj"
...@@ -339,7 +339,7 @@ export default { ...@@ -339,7 +339,7 @@ export default {
//左侧导航(模块第一个页面需要) //左侧导航(模块第一个页面需要)
{ {
id: "queryBaxz", id: "queryBaxz",
label: "办案管理", label: "协作管理",
newAuth: ["F01"], newAuth: ["F01"],
index: "/queryBaxz", index: "/queryBaxz",
className: "iconfont icon-ziyuanliebiao1", className: "iconfont icon-ziyuanliebiao1",
...@@ -347,7 +347,7 @@ export default { ...@@ -347,7 +347,7 @@ export default {
children: [ children: [
{ {
id: "queryBaxz", id: "queryBaxz",
label: "办案协作", label: "协作列表",
newAuth: ["F02"], newAuth: ["F02"],
index: "/queryBaxz", index: "/queryBaxz",
className: "iconfont icon-shenpi", className: "iconfont icon-shenpi",
...@@ -362,7 +362,7 @@ export default { ...@@ -362,7 +362,7 @@ export default {
created () { created () {
this.$store.commit("user/SET_LeftMenu", this.leftMenus); this.$store.commit("user/SET_LeftMenu", this.leftMenus);
this.$store.commit("user/SET_Header", '办案协作'); this.$store.commit("user/SET_Header", '协作列表');
}, },
mounted () { mounted () {
......
<template> <template>
<div class="content_box"> <div class="content_box">
<div class="box_header">办案协作</div> <div class="box_header">协作列表</div>
<div class="box_form"> <div class="box_form">
<el-form ref="form" <el-form ref="form"
:model="form" :model="form"
label-width="150px"> label-width="">
<div class="form_line1"> <div class="form_line1">
<el-form-item> <el-form-item>
<el-input v-model.trim="form.ip" <el-input v-model.trim="form.gjzss"
placeholder="请输入" placeholder="请输入关键字搜索"
clearable
size="small"></el-input> size="small"></el-input>
</el-form-item> </el-form-item>
<div class="searchBtn">
</div> <el-button type="primary"
<div class="form_line2"> icon="el-icon-search"
@click="clickSearch"
</div> size="small">查询</el-button>
<div class="form_lineInner" <!-- <el-button size="small"
v-if="form.checkList.length>0"> @click="searchReset">重置</el-button> -->
<div class="form_line3"
:style="item.visible?'width:25%':''"
v-for="(item ) in formConfig"
:key="item.label1">
<template v-if="item.visible">
<el-form-item :label="item.label1">
<el-select v-model="form[item.prop1]"
style="width:100%"
size="small"
placeholder="请选择">
<el-option v-for="(item,index) in item.option"
:key="index"
:label="item.cjsbname"
:value="item.cjsblx"></el-option>
</el-select>
</el-form-item>
</template>
</div> </div>
</div> </div>
<div class="searchBtn">
<el-button type="primary"
icon="el-icon-search"
@click="clickSearch"
size="small">查询</el-button>
<el-button size="small"
@click="searchReset">重置</el-button>
</div>
</el-form> </el-form>
</div> </div>
<div class="box_table"> <div class="box_table">
...@@ -65,13 +40,14 @@ ...@@ -65,13 +40,14 @@
icon="el-icon-delete">删除设备</el-button> --> icon="el-icon-delete">删除设备</el-button> -->
</div> </div>
<div class="table_contanier"> <div class="table_contanier">
<Mytable v-loading="downLoading" <Mytable v-loading="loadings"
element-loading-text="载中..." element-loading-text="载中..."
:tableData="tableData" :tableData="tableData"
:columObj="columObj" :columObj="columObj"
:pageObj="pageObj" :pageObj="pageObj"
@handleSizeChange="handleSizeChange" @handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange" @handleCurrentChange="handleCurrentChange"
@rowBtn="rowBtn"
@rowOperation="rowOperation"></Mytable> @rowOperation="rowOperation"></Mytable>
</div> </div>
</div> </div>
...@@ -81,7 +57,7 @@ ...@@ -81,7 +57,7 @@
<script> <script>
import Mytable from '@/components/Mytable.vue' import Mytable from '@/components/Mytable.vue'
import { import {
selectAll,//线索组查询 selectAll,//协助查询
} from "@/api/statistical.js" } from "@/api/statistical.js"
import SelectTreeDialog from "@c/treeCode_components.vue"; import SelectTreeDialog from "@c/treeCode_components.vue";
import { mapGetters } from "vuex" import { mapGetters } from "vuex"
...@@ -96,39 +72,60 @@ export default { ...@@ -96,39 +72,60 @@ export default {
//左侧导航(模块第一个页面需要) //左侧导航(模块第一个页面需要)
{ {
id: "queryBaxz", id: "queryBaxz",
label: "办案管理", label: "协作管理",
newAuth: ["F01"], newAuth: ["C1901", "F010101"],
index: "/queryBaxz", index: "/queryBaxz",
className: "iconfont icon-ziyuanliebiao1", className: "iconfont icon-ziyuanliebiao1",
hasChildren: true, hasChildren: true,
children: [ children: [
{ {
id: "queryBaxz", id: "queryBaxz",
label: "办案协作", label: "协作列表",
newAuth: ["F02"], newAuth: ["C1901", "F010101"],
index: "/queryBaxz", index: "/queryBaxz",
className: "iconfont icon-shenpi", className: "iconfont icon-shenpi",
hasChildren: false, hasChildren: false,
}, },
{
id: "queryDshxz",
label: "待审核协作",
newAuth: ["C1901", "C1902", "F010101"],
index: "/queryDshxz",
className: "iconfont icon-shenpi",
hasChildren: false,
},
{
id: "queryDbxz",
label: "待办协作",
newAuth: ["C1901", "F010101"],
index: "/queryDbxz",
className: "iconfont icon-shenpi",
hasChildren: false,
},
{
id: "queryYbxz",
label: "已办协作",
newAuth: ["C1901", "F010101"],
index: "/queryYbxz",
className: "iconfont icon-shenpi",
hasChildren: false,
},
] ]
}, },
{
id: "queryApproval",
label: "注册审核管理",
newAuth: ["C1901", "C1903", "F010101"],
index: "/queryApproval",
className: "iconfont icon-ziyuanliebiao1",
hasChildren: false,
},
], ],
value1: true,//启用 value1: true,//启用
value2: false,//禁用 value2: false,//禁用
form: { form: {
ip: '', gjzss: '',
mac: '',
spzt: '',
sbztstr: '',
ssdwcode: '',
zwcjycode: '',
sftzzzcjycode: '',
sjcjycode: '',
zjcjycode: '',
hmcjycode: '',
swcjycode: '',
checkList: [],
}, },
page: { page: {
page: 1, page: 1,
...@@ -143,7 +140,7 @@ export default { ...@@ -143,7 +140,7 @@ export default {
size: 10 size: 10
} }
}, },
downLoading: false, loadings: false,
tableData: [], tableData: [],
columObj: { columObj: {
visble: false, visble: false,
...@@ -151,21 +148,21 @@ export default { ...@@ -151,21 +148,21 @@ export default {
columnData: [ columnData: [
{ {
edit: true, edit: true,
prop: "dzbh", prop: "xzmc",
editRow: undefined, editRow: undefined,
label: "协作名称", label: "协作名称",
width: "", width: "",
align: "center", align: "center",
}, { }, {
text: true, text: true,
prop: "dzywText", prop: "asjbh",
editRow: undefined, editRow: undefined,
label: "案件编号", label: "案件编号",
width: "", width: "",
align: "center", align: "center",
}, { }, {
edit: true, text: true,
prop: "asjbh", prop: "xxdjdwGajgmc",
editRow: undefined, editRow: undefined,
label: "提交单位", label: "提交单位",
width: "", width: "",
...@@ -173,14 +170,14 @@ export default { ...@@ -173,14 +170,14 @@ export default {
}, { }, {
text: true, text: true,
prop: "ajmc", prop: "djsj",
editRow: undefined, editRow: undefined,
label: "提交时间", label: "提交时间",
width: "", width: "",
align: "center", align: "center",
}, { }, {
text: true, text: true,
prop: "ajlbmc", prop: "xzztStr",
editRow: undefined, editRow: undefined,
label: "状态", label: "状态",
width: "", width: "",
...@@ -189,21 +186,24 @@ export default { ...@@ -189,21 +186,24 @@ export default {
}, },
{ {
isOperation: true, isOperation: true,
type: 'basic', type: 'basicXz',
label: "操作", label: "操作",
width: "180", width: "180",
align: "center", align: "center",
fixed: "right", fixed: "right",
sortable: false, sortable: false,
operation: [ operation: [
{ {
operation: "edit", operation: "edit",
type: "text", type: "text",
label: "查看详情", label: "修改",
icon: "", icon: "",
option: 'tiQingShenPi', shztList: ['1'],
option: 'xg',
color: '#1a81e1', color: '#1a81e1',
}] },
]
}] }]
}, },
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
}, },
created () { created () {
this.$store.commit("user/SET_LeftMenu", this.leftMenus); this.$store.commit("user/SET_LeftMenu", this.leftMenus);
this.$store.commit("user/SET_Header", '办案协作'); this.$store.commit("user/SET_Header", '协作列表');
}, },
computed: { computed: {
...@@ -219,47 +219,80 @@ export default { ...@@ -219,47 +219,80 @@ export default {
}, },
mounted () { mounted () {
document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至"; document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
this.getSysClientVp() this.getList()
window.addEventListener("message", this.messageReciver, false);
}, },
beforeDestroy () {
window.removeEventListener("message", this.messageReciver, false);
},
methods: { methods: {
messageReciver (e) {
if (e.origin == location.origin && e.data == 'appReloadData') {
this.getList();
}
},
// 查询 // 查询
clickSearch () { clickSearch () {
this.getSysClientVp() this.getList()
}, },
//重置 //重置
searchReset () { searchReset () {
this.form = { this.form = {
ip: '', gjzss: '',
mac: '',
spzt: '',
sbztstr: '',
} }
this.getSysClientVp() this.getList()
}, },
//页码变化 //页码变化
handleCurrentChange (e) { handleCurrentChange (e) {
this.pageObj.pageData.page = e; this.pageObj.pageData.page = e;
this.getSysClientVp() this.getList()
}, },
//条数变化 //条数变化
handleSizeChange (e) { handleSizeChange (e) {
this.pageObj.pageData.size = e; this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1; this.pageObj.pageData.page = 1;
this.getSysClientVp() this.getList()
},
rowOperation (row, index, item) {
if (item == 'ckxq') {
this.$router.pushToTab({
path: '/baxzDetail',
query: {
id: row.xxzjbh,
}
})
} else if (item == 'xg') {
this.$router.pushToTab({
path: '/editBaxz',
query: {
id: row.xxzjbh,
}
})
}
},
rowBtn (row, index) {
this.$router.pushToTab({
path: '/baxzDetail',
query: {
id: row.xxzjbh,
}
})
}, },
rowOperation (row, index, item) { },
//列表 //列表
async getSysClientVp () { async getList () {
try { try {
this.loadings = true; this.loadings = true;
let params = { ...this.form, ...this.page } const params = new FormData()
params.append('page', this.pageObj.pageData.page)
params.append('limit', this.pageObj.pageData.size)
params.append('gjzss', this.form.gjzss)
let res = await selectAll(params) let res = await selectAll(params)
if (res && res.code == 200) { if (res && res.code == 200) {
this.tableData = res.data.rows this.tableData = res.data.rows
this.total = res.data.total this.pageObj.total = res.data.total
this.loadings = false; this.loadings = false;
} else { } else {
...@@ -317,6 +350,7 @@ export default { ...@@ -317,6 +350,7 @@ export default {
} }
} }
.form_line1 { .form_line1 {
text-align: center;
/deep/.el-form-item { /deep/.el-form-item {
display: inline-block; display: inline-block;
width: 25%; width: 25%;
...@@ -336,8 +370,8 @@ export default { ...@@ -336,8 +370,8 @@ export default {
} }
} }
.searchBtn { .searchBtn {
display: flex; display: inline-block;
justify-content: center; margin-left: 16px;
.el-button { .el-button {
width: 98px; width: 98px;
} }
......
<template>
<div class="content_box">
<div class="box_header">待办协作</div>
<div class="box_form">
<el-form ref="form"
:model="form"
label-width="">
<div class="form_line1">
<el-form-item>
<el-input v-model.trim="form.gjzss"
placeholder="请输入关键字搜索"
size="small"></el-input>
</el-form-item>
<div class="searchBtn">
<el-button type="primary"
icon="el-icon-search"
@click="clickSearch"
size="small">查询</el-button>
<!-- <el-button size="small"
@click="searchReset">重置</el-button> -->
</div>
</div>
</el-form>
</div>
<div class="box_table">
<div class="tableBtn">
<!-- @click="addDevice" -->
<!-- <el-button size="small"
@click="addBaxz"
icon="el-icon-plus">发起协作</el-button> -->
<!-- <el-button size="small"
@click="editDevice"
icon="el-icon-edit-outline">修改设备</el-button>
<el-button size="small"
@click="deleteDevice"
icon="el-icon-delete">删除设备</el-button> -->
</div>
<div class="table_contanier">
<Mytable v-loading="loadings"
element-loading-text="加载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
@rowBtn="rowBtn"
@rowOperation="rowOperation"></Mytable>
</div>
</div>
<!-- 审核 -->
<el-dialog title=""
class="dialogPer"
:before-close="handleClose"
:visible.sync="dialogVisiblePermisson"
width="53%">
<span class="titleTips"
slot="title">
<span style="font-size:20px;">审批</span>
</span>
<el-form ref="ruleForm"
:model="formPer"
size="small"
label-width="100px"
label-position="left"
:rules="rulesPer">
<el-form-item label="审核状态"
prop="result">
<el-radio-group v-model="formPer.result">
<el-radio :label="2">{{'通过'}}</el-radio>
<el-radio :label="4">{{'不通过'}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见"
prop="spsm">
<el-input type="textarea"
style="width:80%;"
:rows="2"
v-model="formPer.spsm"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
:loading="loadingPer"
style="backgroundColor:#266FE8;"
@click="submitPer('ruleForm')">确认审核</el-button>
<el-button @click="cancelBtn">取 消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Mytable from '@/components/Mytable.vue'
import {
selectAll,//协助查询
shXzqqXx,//审批
} from "@/api/statistical.js"
import SelectTreeDialog from "@c/treeCode_components.vue";
import { mapGetters } from "vuex"
export default {
components: {
SelectTreeDialog, Mytable
},
data () {
return {
// 权限
dialogVisiblePermisson: false,
loadingPer: false,
formPer: {
result: '',
spsm: '',
},
rulesPer: {
result: [
{ required: true, message: "请选择审核状态", trigger: "change" },
],
spsm: [
{ required: true, message: "请输入审核意见", trigger: "change" },
],
},
value1: true,//启用
value2: false,//禁用
form: {
gjzss: '',
},
page: {
page: 1,
limit: 10,
},
total: null,
collectionConfig: [{ labe: "指纹", value: "1" }, { labe: "身高体重", value: "3" }, { labe: "手机", value: "4" }, { labe: "足迹", value: "5" }, { labe: "声纹", value: "6" }, { labe: "虹膜", value: "7" }],
pageObj: { //分页对象
total: 10,
pageData: {
page: 1,
size: 10
}
},
loadings: false,
tableData: [],
columObj: {
visble: false,
loading: false,
columnData: [
{
edit: true,
prop: "xzmc",
editRow: undefined,
label: "协作名称",
width: "",
align: "center",
}, {
text: true,
prop: "asjbh",
editRow: undefined,
label: "案件编号",
width: "",
align: "center",
}, {
text: true,
prop: "xxdjdwGajgmc",
editRow: undefined,
label: "提交单位",
width: "",
align: "center",
}, {
text: true,
prop: "djsj",
editRow: undefined,
label: "提交时间",
width: "",
align: "center",
}, {
text: true,
prop: "xzztStr",
editRow: undefined,
label: "状态",
width: "",
align: "center",
},
{
isOperation: true,
type: 'basic',
label: "操作",
width: "180",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "协作完成",
icon: "",
option: 'tiQingShenPi',
color: '#1a81e1',
}]
}]
},
}
},
created () {
this.$store.commit("user/SET_Header", '待办协作');
},
computed: {
...mapGetters(["userInfo"])
},
mounted () {
document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
this.getList()
},
methods: {
// 审批
cancelBtn () {
this.$refs['ruleForm'].resetFields();
this.dialogVisiblePermisson = false;
},
handleClose () {
this.$refs['ruleForm'].resetFields();
this.dialogVisiblePermisson = false;
},
async submitPer (searchForm) {
this.$refs[searchForm].validate(async (valid) => {
if (valid) {
this.loadingPer = true
const params = new FormData()
params.append('spyj', this.formPer.spsm)
params.append('xzzt', this.formPer.result)
let res = await shXzqqXx(params)
if (res && res.code == 200) {
this.$message.success('审核成功')
this.dialogVisiblePermisson = false;
this.loadingPer = false
this, this.getList()
}
}
})
},
// 查询
clickSearch () {
this.getList()
},
//重置
searchReset () {
this.form = {
gjzss: '',
}
this.getList()
},
//页码变化
handleCurrentChange (e) {
this.pageObj.pageData.page = e;
this.getList()
},
//条数变化
handleSizeChange (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getList()
},
async rowOperation (row, index, item) {
if (index == 0) {
const params = new FormData()
params.append('xxzjbh', row.xxzjbh)
params.append('xzzt', '3')
let res = await shXzqqXx(params)
if (res && res.code == 200) {
this.$message.success('已协作完成!')
this.getList()
}
}
},
rowBtn (row, index) {
this.$router.pushToTab({
path: '/baxzDetail',
query: {
id: row.xxzjbh,
}
})
},
//列表
async getList () {
try {
this.loadings = true;
const params = new FormData()
params.append('xzzt', '2')
params.append('page', this.pageObj.pageData.page)
params.append('limit', this.pageObj.pageData.size)
params.append('gjzss', this.form.gjzss)
let res = await selectAll(params)
if (res && res.code == 200) {
this.tableData = res.data.rows
this.total = res.data.total
this.loadings = false;
} else {
this.loadings = false;
}
} catch (error) {
this.loadings = false;
// this.$message.error('服务器异常')
}
},
//新增设备
addBaxz () {
this.$router.pushToTab({ path: '/addBaxz' })
},
},
}
</script>
<style lang="scss" scoped>
.content_box {
height: 100%;
overflow-y: auto;
background: #f1f2f5;
padding: 19px 20px;
box-sizing: border-box;
.box_header {
font-size: 14px;
font-weight: 500;
color: #383838;
line-height: 18px;
margin-bottom: 19px;
}
.box_form {
padding: 24px 24px 20px;
background: #ffffff;
margin-bottom: 1px;
.el-form {
/deep/.el-form-item {
display: inline-block;
.el-form-item__label {
height: 32px;
line-height: 32px;
font-size: 16px;
font-weight: 400;
color: #4b4b4b;
}
.el-form-item__content {
height: 32px;
line-height: 32px;
}
}
.form_line1 {
text-align: center;
/deep/.el-form-item {
display: inline-block;
width: 25%;
}
}
.form_line2 {
/deep/.el-form-item {
/* margin-bottom: 0; */
}
}
.form_lineInner {
}
.form_line3 {
display: inline-block;
.el-form-item {
width: 100%;
}
}
.searchBtn {
display: inline-block;
margin-left: 16px;
.el-button {
width: 98px;
}
}
}
}
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
/* text-align: center; */
}
}
}
::v-deep .dialogPer {
.el-dialog__body {
padding: 24px !important;
}
}
</style>
\ No newline at end of file
<template>
<div class="content_box">
<div class="box_header">待办协作</div>
<div class="box_form">
<el-form ref="form"
:model="form"
label-width="">
<div class="form_line1">
<el-form-item>
<el-input v-model.trim="form.gjzss"
placeholder="请输入关键字搜索"
size="small"></el-input>
</el-form-item>
<div class="searchBtn">
<el-button type="primary"
icon="el-icon-search"
@click="clickSearch"
size="small">查询</el-button>
<!-- <el-button size="small"
@click="searchReset">重置</el-button> -->
</div>
</div>
</el-form>
</div>
<div class="box_table">
<div class="tableBtn">
<!-- @click="addDevice" -->
<!-- <el-button size="small"
@click="addBaxz"
icon="el-icon-plus">发起协作</el-button> -->
<!-- <el-button size="small"
@click="editDevice"
icon="el-icon-edit-outline">修改设备</el-button>
<el-button size="small"
@click="deleteDevice"
icon="el-icon-delete">删除设备</el-button> -->
</div>
<div class="table_contanier">
<Mytable v-loading="loadings"
element-loading-text="加载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@rowBtn="rowBtn"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
@rowOperation="rowOperation"></Mytable>
</div>
</div>
<!-- 审核 -->
<el-dialog title=""
class="dialogPer"
:before-close="handleClose"
:visible.sync="dialogVisiblePermisson"
width="53%">
<span class="titleTips"
slot="title">
<span style="font-size:20px;">审批</span>
</span>
<el-form ref="ruleForm"
:model="formPer"
size="small"
label-width="100px"
label-position="left"
:rules="rulesPer">
<el-form-item label="审核状态"
prop="result">
<el-radio-group v-model="formPer.result">
<el-radio :label="2">{{'通过'}}</el-radio>
<el-radio :label="4">{{'不通过'}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见"
prop="spsm">
<el-input type="textarea"
style="width:80%;"
:rows="2"
v-model="formPer.spsm"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
:loading="loadingPer"
style="backgroundColor:#266FE8;"
@click="submitPer('ruleForm')">确认审核</el-button>
<el-button @click="cancelBtn">取 消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Mytable from '@/components/Mytable.vue'
import {
selectAll,//协助查询
shXzqqXx,//审批
} from "@/api/statistical.js"
import SelectTreeDialog from "@c/treeCode_components.vue";
import { mapGetters } from "vuex"
export default {
components: {
SelectTreeDialog, Mytable
},
data () {
return {
// 权限
dialogVisiblePermisson: false,
loadingPer: false,
formPer: {
result: '',
spsm: '',
},
rulesPer: {
result: [
{ required: true, message: "请选择审核状态", trigger: "change" },
],
spsm: [
{ required: true, message: "请输入审核意见", trigger: "change" },
],
},
value1: true,//启用
value2: false,//禁用
form: {
gjzss: '',
},
page: {
page: 1,
limit: 10,
},
total: null,
collectionConfig: [{ labe: "指纹", value: "1" }, { labe: "身高体重", value: "3" }, { labe: "手机", value: "4" }, { labe: "足迹", value: "5" }, { labe: "声纹", value: "6" }, { labe: "虹膜", value: "7" }],
pageObj: { //分页对象
total: 10,
pageData: {
page: 1,
size: 10
}
},
loadings: false,
tableData: [],
columObj: {
visble: false,
loading: false,
columnData: [
{
edit: true,
prop: "xzmc",
editRow: undefined,
label: "协作名称",
width: "",
align: "center",
}, {
text: true,
prop: "asjbh",
editRow: undefined,
label: "案件编号",
width: "",
align: "center",
}, {
text: true,
prop: "xxdjdwGajgmc",
editRow: undefined,
label: "提交单位",
width: "",
align: "center",
}, {
text: true,
prop: "djsj",
editRow: undefined,
label: "提交时间",
width: "",
align: "center",
}, {
text: true,
prop: "xzztStr",
editRow: undefined,
label: "状态",
width: "",
align: "center",
},
{
isOperation: true,
type: 'basic',
label: "操作",
width: "180",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "审核",
icon: "",
option: 'tiQingShenPi',
color: '#1a81e1',
}]
}]
},
}
},
created () {
this.$store.commit("user/SET_Header", '待办协作');
},
computed: {
...mapGetters(["userInfo"])
},
mounted () {
document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
this.getList()
},
methods: {
// 审批
cancelBtn () {
this.$refs['ruleForm'].resetFields();
this.dialogVisiblePermisson = false;
},
handleClose () {
this.$refs['ruleForm'].resetFields();
this.dialogVisiblePermisson = false;
},
async submitPer (searchForm) {
this.$refs[searchForm].validate(async (valid) => {
if (valid) {
this.loadingPer = true
const params = new FormData()
params.append('xxzjbh', this.xxzjbh)
params.append('spyj', this.formPer.spsm)
params.append('xzzt', this.formPer.result)
let res = await shXzqqXx(params)
if (res && res.code == 200) {
this.$message.success('审核成功')
this.dialogVisiblePermisson = false;
this.loadingPer = false
this, this.getList()
}
}
})
},
// 查询
clickSearch () {
this.getList()
},
//重置
searchReset () {
this.form = {
gjzss: '',
}
this.getList()
},
//页码变化
handleCurrentChange (e) {
this.pageObj.pageData.page = e;
this.getList()
},
//条数变化
handleSizeChange (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getList()
},
rowOperation (row, index, item) {
if (index == 0) {
this.xxzjbh = row.xxzjbh
this.dialogVisiblePermisson = true
}
},
rowBtn (row, index) {
this.$router.pushToTab({
path: '/baxzDetail',
query: {
id: row.xxzjbh,
}
})
},
//列表
async getList () {
try {
this.loadings = true;
const params = new FormData()
params.append('xzzt', '1')
params.append('page', this.pageObj.pageData.page)
params.append('limit', this.pageObj.pageData.size)
params.append('gjzss', this.form.gjzss)
let res = await selectAll(params)
if (res && res.code == 200) {
this.tableData = res.data.rows
this.total = res.data.total
this.loadings = false;
} else {
this.loadings = false;
}
} catch (error) {
this.loadings = false;
// this.$message.error('服务器异常')
}
},
//新增设备
addBaxz () {
this.$router.pushToTab({ path: '/addBaxz' })
},
},
}
</script>
<style lang="scss" scoped>
.content_box {
height: 100%;
overflow-y: auto;
background: #f1f2f5;
padding: 19px 20px;
box-sizing: border-box;
.box_header {
font-size: 14px;
font-weight: 500;
color: #383838;
line-height: 18px;
margin-bottom: 19px;
}
.box_form {
padding: 24px 24px 20px;
background: #ffffff;
margin-bottom: 1px;
.el-form {
/deep/.el-form-item {
display: inline-block;
.el-form-item__label {
height: 32px;
line-height: 32px;
font-size: 16px;
font-weight: 400;
color: #4b4b4b;
}
.el-form-item__content {
height: 32px;
line-height: 32px;
}
}
.form_line1 {
text-align: center;
/deep/.el-form-item {
display: inline-block;
width: 25%;
}
}
.form_line2 {
/deep/.el-form-item {
/* margin-bottom: 0; */
}
}
.form_lineInner {
}
.form_line3 {
display: inline-block;
.el-form-item {
width: 100%;
}
}
.searchBtn {
display: inline-block;
margin-left: 16px;
.el-button {
width: 98px;
}
}
}
}
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
/* text-align: center; */
}
}
}
::v-deep .dialogPer {
.el-dialog__body {
padding: 24px !important;
}
}
</style>
\ No newline at end of file
<template>
<div class="content_box">
<div class="box_header">已办协作</div>
<div class="box_form">
<el-form ref="form"
:model="form"
label-width="">
<div class="form_line1">
<el-form-item>
<el-input v-model.trim="form.gjzss"
placeholder="请输入关键字搜索"
size="small"></el-input>
</el-form-item>
<div class="searchBtn">
<el-button type="primary"
icon="el-icon-search"
@click="clickSearch"
size="small">查询</el-button>
<!-- <el-button size="small"
@click="searchReset">重置</el-button> -->
</div>
</div>
</el-form>
</div>
<div class="box_table">
<div class="tableBtn">
<!-- @click="addDevice" -->
<!-- <el-button size="small"
@click="addBaxz"
icon="el-icon-plus">发起协作</el-button> -->
<!-- <el-button size="small"
@click="editDevice"
icon="el-icon-edit-outline">修改设备</el-button>
<el-button size="small"
@click="deleteDevice"
icon="el-icon-delete">删除设备</el-button> -->
</div>
<div class="table_contanier">
<Mytable v-loading="loadings"
element-loading-text="加载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange"
@rowBtn="rowBtn"
@rowOperation="rowOperation"></Mytable>
</div>
</div>
</div>
</template>
<script>
import Mytable from '@/components/Mytable.vue'
import {
selectAll,//协助查询
} from "@/api/statistical.js"
import SelectTreeDialog from "@c/treeCode_components.vue";
import { mapGetters } from "vuex"
export default {
components: {
SelectTreeDialog, Mytable
},
data () {
return {
value1: true,//启用
value2: false,//禁用
form: {
gjzss: '',
},
page: {
page: 1,
limit: 10,
},
total: null,
collectionConfig: [{ labe: "指纹", value: "1" }, { labe: "身高体重", value: "3" }, { labe: "手机", value: "4" }, { labe: "足迹", value: "5" }, { labe: "声纹", value: "6" }, { labe: "虹膜", value: "7" }],
pageObj: { //分页对象
total: 10,
pageData: {
page: 1,
size: 10
}
},
loadings: false,
tableData: [],
columObj: {
visble: false,
loading: false,
columnData: [
{
edit: true,
prop: "xzmc",
editRow: undefined,
label: "协作名称",
width: "",
align: "center",
}, {
text: true,
prop: "asjbh",
editRow: undefined,
label: "案件编号",
width: "",
align: "center",
}, {
text: true,
prop: "xxdjdwGajgmc",
editRow: undefined,
label: "提交单位",
width: "",
align: "center",
}, {
text: true,
prop: "djsj",
editRow: undefined,
label: "提交时间",
width: "",
align: "center",
}, {
text: true,
prop: "xzztStr",
editRow: undefined,
label: "状态",
width: "",
align: "center",
},
{
isOperation: true,
type: 'basic',
label: "操作",
width: "180",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "录入抓获人信息",
icon: "",
option: 'zhr',
color: '#1a81e1',
}]
}]
},
}
},
created () {
this.$store.commit("user/SET_Header", '已办协作');
},
computed: {
...mapGetters(["userInfo"])
},
mounted () {
document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
this.getList()
},
methods: {
// 查询
clickSearch () {
this.getList()
},
//重置
searchReset () {
this.form = {
gjzss: '',
}
this.getList()
},
//页码变化
handleCurrentChange (e) {
this.pageObj.pageData.page = e;
this.getList()
},
//条数变化
handleSizeChange (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getList()
},
rowOperation (row, index, item) {
if (item == 'zhr') {
this.$router.pushToTab({
path: '/addZhrxx',
query: {
id: row.xxzjbh,
}
})
}
},
rowBtn (row, index) {
this.$router.pushToTab({
path: '/baxzDetail',
query: {
id: row.xxzjbh,
}
})
},
//列表
async getList () {
try {
this.loadings = true;
const params = new FormData()
params.append('xzzt', '3')
params.append('page', this.pageObj.pageData.page)
params.append('limit', this.pageObj.pageData.size)
params.append('gjzss', this.form.gjzss)
let res = await selectAll(params)
if (res && res.code == 200) {
this.tableData = res.data.rows
this.total = res.data.total
this.loadings = false;
} else {
this.loadings = false;
}
} catch (error) {
this.loadings = false;
// this.$message.error('服务器异常')
}
},
//新增设备
addBaxz () {
this.$router.pushToTab({ path: '/addBaxz' })
},
},
}
</script>
<style lang="scss" scoped>
.content_box {
height: 100%;
overflow-y: auto;
background: #f1f2f5;
padding: 19px 20px;
box-sizing: border-box;
.box_header {
font-size: 14px;
font-weight: 500;
color: #383838;
line-height: 18px;
margin-bottom: 19px;
}
.box_form {
padding: 24px 24px 20px;
background: #ffffff;
margin-bottom: 1px;
.el-form {
/deep/.el-form-item {
display: inline-block;
.el-form-item__label {
height: 32px;
line-height: 32px;
font-size: 16px;
font-weight: 400;
color: #4b4b4b;
}
.el-form-item__content {
height: 32px;
line-height: 32px;
}
}
.form_line1 {
text-align: center;
/deep/.el-form-item {
display: inline-block;
width: 25%;
}
}
.form_line2 {
/deep/.el-form-item {
/* margin-bottom: 0; */
}
}
.form_lineInner {
}
.form_line3 {
display: inline-block;
.el-form-item {
width: 100%;
}
}
.searchBtn {
display: inline-block;
margin-left: 16px;
.el-button {
width: 98px;
}
}
}
}
.box_table {
background: #ffffff;
padding: 16px 20px 28px;
.tableBtn {
margin-bottom: 16px;
}
.pagination {
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 48px;
line-height: 48px;
/* text-align: center; */
}
}
}
</style>
\ No newline at end of file
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
</div> </div>
<div class="login_content_right"> <div class="login_content_right">
<div class="login_content_right_top"> <div class="login_content_right_top">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName"
:before-leave='leaveTab'>
<el-tab-pane label="账号登录" <el-tab-pane label="账号登录"
name="1"> name="1">
<div class="login_content_rightCon"> <div class="login_content_rightCon">
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
@click="handleSubmit" @click="handleSubmit"
:loading="logining">登录</el-button> :loading="logining">登录</el-button>
</el-form-item> </el-form-item>
<div class="login_content_rightCon_rigster"><span>没有账号?</span><span>注册账号</span></div> <div class="login_content_rightCon_rigster"><span>没有账号?</span><span @click="registerBtn">注册账号</span></div>
</el-form> </el-form>
<el-form :model="ruleForm3" <el-form :model="ruleForm3"
:rules="rules3" :rules="rules3"
...@@ -210,6 +211,13 @@ export default { ...@@ -210,6 +211,13 @@ export default {
}; };
}, },
methods: { methods: {
leaveTab (activeName, oldActiveName) {
console.log(activeName, oldActiveName, 11);
if (activeName == '2') {
this.$message.info('暂未开放,请使用账号密码登录!')
return false
}
},
// 用户注册 // 用户注册
registerBtn () { registerBtn () {
this.$router.pushToTab('/userRegister') this.$router.pushToTab('/userRegister')
...@@ -384,6 +392,8 @@ export default { ...@@ -384,6 +392,8 @@ export default {
.login_content_rightCon { .login_content_rightCon {
margin-top: 20px; margin-top: 20px;
.login_content_rightCon_rigster { .login_content_rightCon_rigster {
position: relative;
z-index: 999;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
height: 24px; height: 24px;
......
<template>
<div class="Content">
<right-content :pageBs="pageBs"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
ref="rightContent"
@toInfor="toInfor">
<template #btnGroup="scope">
<span @click="editInfo(scope.scope)"
class="edit"
v-if="scope.scope.row.shzt=='待办理'"
style="margin-right: 19px">办理</span>
</template>
</right-content>
</div>
</template>
<script>
import rightContent from "@c/ptCxForm_components.vue";
// import {
// deleteUserNew,
// openUserXx,
// getUnitcode,
// resetPassword,
// getSysTree,//角色列表
// getUserUnitAndGrade,//获取用户单位和级别
// getRoleOfUser,//获取用户单位和级别
// } from "@/api/userAuth/addUser.js";
// import {
// tree,
// getRoleTree,
// insertUserRoles,
// updateUserMm,
// queryXzTreeData,
// } from "@/api/userAuth/role.js";
export default {
name: "queryUser",
components: {
rightContent,
},
data () {
return {
form: {
id: "",
oldPassword: "",
newPassword: "",
newPassword1: "",
},
hasPermission: false,
dialogVisibleMzxg: false,
header: "用户管理",
pageBs: "queryApproval",
cxFormData: {
username: "",
limit: 10,
page: 1,
policemanid: "",
trueName: "",
sfbhxj: "",
shzt: 1,
},
cxQueryField: [
{
name: "用户名",
id: "username",
type: "text",
value: "",
placeholder: "",
col: "3",
},
{
name: "警号",
id: "policemanid",
type: "text",
value: "",
placeholder: "",
col: "3",
},
{
name: "用户姓名",
id: "trueName",
type: "text",
value: "",
placeholder: "",
col: "3",
},
{
name: "所属单位",
id: "unitcode",
type: "codeTreeDialog",
props: "checkEmpty",
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_UNIT",
},
{
name: "审批状态",
id: "shzt",
type: "radio",
value: "",
placeholder: "",
col: "3",
radioData: [
{
label: "待办理",
val: 1,
},
{
label: "同意",
val: 2,
},
{
label: "不同意",
val: 3,
},
],
},
],
cxDefaultFormThead: [
{
label: "用户姓名",
prop: "trueName",
},
{
label: "用户单位",
prop: "unitname",
},
{
label: "警号",
prop: "policemanid",
},
{
label: "联系电话",
prop: "telephone",
},
{
label: "审核状态",
prop: "shzt",
},
{
label: "申请注册时间",
prop: "lrsj",
},
],
cxUrl: "/sysuser/getUserShList",
Menu: [
{
id: "queryUser",
label: "用户管理",
index: "queryUser",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
],
};
},
created () {
this.$store.commit("user/SET_Menu", this.Menu);
this.identitycard = JSON.parse(
sessionStorage.getItem("userInfo")
).identitycard;
const roles = this.$store.getters && this.$store.getters.roles;
const permissionRoles = ["F0101", "admin", "A0000"];
this.hasPermission = roles.some((role) => {
return permissionRoles.includes(role);
});
this.getThead();
},
async mounted () {
window.addEventListener("message", this.messageReciver, false);
},
beforeDestroy () {
window.removeEventListener("message", this.messageReciver, false);
},
methods: {
messageReciver (e) {
if (e.origin == location.origin && e.data == 'appReloadData') {
this.$refs.rightContent.doQuery("yes");
}
},
editInfo (scope) {
this.$router.pushToTab({
path: "/userApproval",
query: {
xxzjbh: scope.row.id,
},
});
},
getThead () {
if (this.isPremission >= 0 || this.isAdmin) {
let obj = {
label: "用户状态",
prop: "openFlag",
};
this.cxDefaultFormThead.push(obj);
}
},
editMa (scope) {
this.$set(this.form, "id", scope.row.id);
this.dialogVisibleMzxg = true;
},
submitMaa () {
if (this.form.newPassword == this.form.newPassword1) {
updateUserMm({
...this.form,
type: this.hasPermission ? "2" : "1",
}).then((res) => {
if (res.code == 200) {
this.dialogVisibleMzxg = false;
this.$message.success("密码修改成功!");
this.form = {};
} else {
this.$message.error(res.message);
}
});
} else {
this.$message.error("两次密码输入不一样,请重新确定密码!");
this.form.newPassword1 = "";
}
},
toInfor (obj) {
this.$router.pushToTab({
path: "/userDetail",
query: {
id: obj.id,
},
});
},
},
};
</script>
<style lang="scss">
.dialogPer {
.el-tabs__item {
height: 44px !important;
line-height: 44px !important;
}
.el-tree--highlight-current
.el-tree-node.is-current
> .el-tree-node__content {
// 设置颜色
background-color: #e5eefb;
}
}
.el-dialog__body {
padding: 10px 15px !important;
}
.rightContent .el-input__inner,
#formCommonPage .el-input__inner {
height: 32px;
line-height: 32px;
font-family: inherit;
}
.el-table__header-wrapper th,
.el-table__header-wrapper tr {
background: #f4f6f7;
}
.rightContent .el-input__icon,
#formCommonPage .el-input__icon,
.el-input__suffix-inner {
line-height: 36px;
}
.rightContent .el-range-separator {
position: relative;
top: -4px;
}
.rightContent .el-textarea__inner,
#formCommonPage .el-textarea__inner {
width: 100%;
font-family: inherit;
}
.rightContent .el-range-input,
#formCommonPage .el-range-input {
vertical-align: top;
}
.rightContent .el-date-editor .el-range__close-icon {
margin-top: -4px;
}
/* .rightContent .el-form-item__error {
left: calc(66% - 27px);
top: 12px;
} */
.success-row {
background-color: #fbf9f4 !important;
}
.Content .el-input,
.Content .el-date-editor--daterange.el-input__inner {
width: 100% !important;
}
</style>
<style scoped lang="scss">
@import "@/assets/styles/rightContent.scss";
.hbyps {
width: 64px;
height: 24px;
margin-right: 10px;
background: #ffffff;
border: 1px solid #007aff;
opacity: 1;
border-radius: 4px;
text-align: center;
align-items: center;
display: inline-block;
font-size: 12px !important;
font-weight: 400 !important;
color: #007aff !important;
cursor: pointer;
}
.name {
margin: 20px;
.el-form-item {
margin-bottom: 22px;
display: flex;
}
/deep/.el-form-item__label {
text-align: right;
vertical-align: middle;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px;
padding: 0 12px 0 0;
width: 150px !important;
box-sizing: border-box;
}
/deep/.el-form-item__content {
margin: 0 0 0 10px !important;
}
}
.dialogPer {
/deep/.el-checkbox {
display: flex;
/* align-items: center; */
.el-checkbox__input {
line-height: inherit !important;
}
.el-checkbox__label {
position: relative;
width: 80%;
margin-bottom: 8px;
padding-top: 4px;
> span {
display: inline-block;
width: 80px;
margin-right: 50px;
white-space: pre-wrap;
}
> div {
display: inline-block;
/* position: absolute;
top: -1px; */
width: 490px;
}
}
}
/deep/.el-dialog {
max-height: 620px;
overflow: hidden;
border-radius: 8px;
}
/deep/.el-dialog__header {
height: 56px;
line-height: 56px;
padding: 0;
padding-left: 16px;
font-size: 18px;
font-weight: 500;
color: #242424;
img {
margin-right: 8px;
}
}
/deep/.el-dialog__body {
height: 440px;
overflow-y: auto;
padding: 10px 20px 0 20px !important;
}
/deep/.el-dialog__footer {
height: 64px;
line-height: 64px;
padding: 0 !important;
border-top: 1px solid #ccc;
text-align: center;
.el-button {
margin-right: 16px !important;
}
}
/deep/.el-textarea__inner {
height: 50px !important;
}
/deep/.el-form-item {
margin-bottom: 18px !important;
}
/deep/.el-form-item__label {
height: 32px;
}
.el-checkbox-group {
display: flex;
flex-direction: column;
}
/* 节点样式 */
/deep/ .el-tree > .el-tree-node > .el-tree-node__content {
height: 48px;
line-height: 48px;
font-size: 15px;
color: #383838;
}
//二级节点选择器
/deep/
.el-tree
> .el-tree-node
> .el-tree-node__children
> .el-tree-node
> .el-tree-node__content {
height: 40px;
line-height: 40px;
color: #4b4b4b;
/* background-color: #f3f3f3;
&:hover {
background-color: #f0f7ff;
} */
}
//三级节点选择器
/deep/
.el-tree
> .el-tree-node
> .el-tree-node__children
> .el-tree-node
> .el-tree-node__children
> .el-tree-node
> .el-tree-node__content {
height: 40px;
line-height: 40px;
color: #4b4b4b;
/* background-color: #f3f3f3;
&:hover {
background-color: #f0f7ff;
} */
}
}
.el-tabs {
> .el-tabs__header {
border-bottom: none;
}
/deep/.el-tabs__content {
padding-top: 20px;
margin-bottom: 20px;
.el-tree-node__content {
height: 56px;
&:hover {
background-color: #e5eefb;
}
.el-checkbox {
margin-left: 8px;
}
}
}
}
</style>
<template>
<div class="content_box">
<div class="content_form">
<header>
<p>查询条件</p>
</header>
<myForm :labelWidth="labelWidth"
:isActive="true"
:formConfig="formConfig"
:formData="formData"
:searchHandle="searchHandle"
ref="ruleForm"></myForm>
</div>
<div class="content_table">
<header>
<p>查询结果</p>
<span>{{ pageObj.total || '0' }}</span>
</header>
<Mytable v-loading="downLoading"
element-loading-text="加载中..."
:tableData="tableData"
:columObj="columObj"
:pageObj="pageObj"
@handleSizeChange="handleSizeChange"
@handleCurrentChange="handleCurrentChange">
<template #btnGroup="scope">
<el-button class="hbyp"
type="text"
v-if="scope.scope.shzt=='待办理'||scope.scope.shzt=='不同意'"
size="mini"
@click="approvalBtn(scope.scope)">审核</el-button>
</template>
</Mytable>
</div>
</div>
</template>
<script>
import myForm from '@/components/myForm.vue'
import Mytable from '@/components/Mytable.vue'
import {
getUserShList, //列表
} from '@/api/userAuth/addUser.js'
import axios from "axios";
import base from "@/api/base";
import checkPermission from '@/utils/permission' // 权限判断函数
import { mapGetters } from "vuex";
import encry from "@/utils/encry";
export default {
components: {
myForm, Mytable
},
data () {
return {
columnType: '1',
downLoading: false,
// 表单域标签的宽度
labelWidth: '100px',
// 表单配置
formConfig: [
{
label: '用户名:',
prop: 'username',
type: 'input',
}, {
label: '警号:',
prop: 'policemanid',
type: 'input',
}, {
label: '用户姓名:',
prop: 'trueName',
type: 'input',
},
{
label: '所属单位:',
id: 'unitcode',
type: 'codeTreeDialog',
props: [], //字典弹框需要的字段
value: "",
width: '100%',
codeOptions: [],
codeTree: "CODE_UNIT",
}, {
label: '审批状态:',
prop: 'shzt',
type: 'radio',
value: [],
width: '100%',
radios: [{
label: "待办理",
val: '1',
},
{
label: "同意",
val: '2',
},
{
label: "不同意",
val: '3',
},
]
},
],
// 表单数据
formData: {
username: '',
policemanid: '',
trueName: '',
unitcode: '',
shzt: '1',
},
searchHandle: [
{
label: '查询',
show: true,
icon: 'el-icon-search',
type: 'primary',
handle: () => {
this.searchData()
},
},
{
label: '重置',
show: true,
handle: () => {
this.resetData()
},
},
],
rules: [],
pageObj: { //分页对象
total: 10,
pageData: {
page: 1,
size: 10
}
},
tableData: [],
columObj: {
visble: false,
loading: false,
columnData: [
{
text: true,
prop: "trueName",
editRow: undefined,
label: "用户姓名",
width: "",
align: "center",
}, {
text: true,
prop: "unitname",
editRow: undefined,
label: "用户单位",
width: "",
align: "center",
}, {
text: true,
prop: "policemanid",
editRow: undefined,
label: "警号",
width: "",
align: "center",
}, {
text: true,
prop: "telephone",
editRow: undefined,
label: "联系电话",
width: "",
align: "center",
}, {
text: true,
prop: "shzt",
editRow: undefined,
label: "审核状态",
width: "",
align: "center",
}, {
text: true,
prop: "lrsj",
editRow: undefined,
label: "申请注册时间",
width: "",
align: "center",
},
{
isOperation: true,
type: 'basicSlot',
label: "操作",
width: "",
align: "center",
fixed: "right",
sortable: false,
operation: [
{
operation: "edit",
type: "text",
label: "审核",
icon: "",
option: 'tiQingShenPi',
color: '#1a81e1',
},]
}]
},
}
},
created () {
this.$store.commit("user/SET_Header", '协作列表');
},
mounted () {
this.getList();
document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
window.addEventListener("message", this.messageReciver, false);
},
beforeDestroy () {
window.removeEventListener("message", this.messageReciver, false);
},
methods: {
messageReciver (e) {
if (e.origin == location.origin && e.data == 'appReloadData') {
this.getList();
}
},
checkPermission,
async getList () {
this.columObj.loading = true;
let params = new FormData()
params.append('page', this.pageObj.pageData.page)
params.append('limit', this.pageObj.pageData.size)
params.append('username', this.formData.username)
params.append('trueName', this.formData.trueName)
params.append('unitcode', this.formData.unitcode)
params.append('shzt', this.formData.shzt)
let res = await getUserShList(params)
if (res && res.code == 200) {
this.columObj.loading = false;
this.pageObj.total = res.data.total;
this.tableData = res.data.rows
}
},
// 操作按钮
approvalBtn (row) {
this.$router.pushToTab({
path: "/userApproval",
query: {
xxzjbh: row.id,
},
});
},
//页码变化
handleCurrentChange (e) {
this.pageObj.pageData.page = e;
this.getList()
},
//条数变化
handleSizeChange (e) {
this.pageObj.pageData.size = e;
this.pageObj.pageData.page = 1;
this.getList()
},
searchData () {
this.pageObj.pageData.size = 10;
this.pageObj.pageData.page = 1;
this.getList()
},
resetData () {
this.pageObj.pageData.size = 10;
this.pageObj.pageData.page = 1;
this.formData = {
username: '',
policemanid: '',
trueName: '',
unitcode: '',
shzt: '1',
}
this.getList()
},
},
}
</script>
<style lang="scss" scoped>
.content_box {
padding: 24px;
font-weight: 400;
overflow: auto;
width: 100%;
height: 94vh;
box-sizing: border-box;
}
header {
display: flex;
align-items: center;
height: 48px;
line-height: 48px;
border-bottom: 1px solid #dcdcdc;
padding-left: 48px;
margin-bottom: 16px;
p {
display: inline-block;
height: 24px;
font-size: 18px;
color: #5e5e5e;
line-height: 24px;
margin-right: 16px;
}
span {
height: 24px;
font-size: 14px;
color: #5e5e5e;
line-height: 24px;
}
}
.content_form {
height: 224px;
background: #ffffff;
border-radius: 8px 8px 8px 8px;
margin-bottom: 16px;
/deep/ .el-form {
padding: 0 32px;
.el-form-item__content {
height: 32px;
}
}
}
.content_table {
background: #ffffff;
border-radius: 8px 8px 8px 8px;
/deep/ .tableCon {
padding: 0 20px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<right-content :cxQueryField="cxQueryField"
:pageObject="pageObject"
:pageFooterProps="pageFooterProps"
labelWidth="110px"
title="用户注册详情">
</right-content>
<div class="rightContent"
id="personInfor">
<div class="Content paneDiv paneDiv2">
<div class="header">
<span class="title">{{ "审核信息" }}</span>
</div>
<div class="Boxcontent">
<div class="content">
<section>
<el-form :model="ruleForm"
:rules="rules"
ref="ruleForm"
size="small"
label-width="120px">
<el-row>
<el-col :span="8">
<el-form-item label="办理单位:"
prop="title">
<el-input style="width:70%;font-size: larger"
disabled
v-model="ruleForm.title"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="办理人姓名:"
prop="name">
<el-input style="width:70%;font-size: larger"
disabled
v-model="ruleForm.sprName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="办理时间:"
prop="date">
<el-date-picker v-model="ruleForm.date"
disabled
type="datetime"
style="font-size: larger"
placeholder="选择时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="办理结果:"
prop="shzt">
<el-radio-group v-model="ruleForm.shzt">
<el-radio :label="'2'">同意
</el-radio>
<el-radio :label="'3'">不同意
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="办理意见:"
prop="blyj">
<el-input type="textarea"
placeholder="请输入"
style="height:100px;"
v-model="ruleForm.blyj"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label=""
prop="name">
<el-button @click="toAproval">保存
</el-button>
</el-form-item>
</el-form>
</section>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import rightContent from "@c/PersonInfor.vue";
import axios from "axios";
import base from "@/api/base";
import {
shUserDetail,
shUser,
applyfjlist,//审批页面获取附件列表
} from "@/api/userAuth/addUser.js";
export default {
name: "addUser",
components: {
rightContent
},
data () {
return {
imgList: [],
cxQueryField: [
{
title: "用户审批",
id: 1,
objStr: "", //对象中的对应字段
data: [
{
label: "用户单位:",
prop: "unitname",
col: "3",
},
{
label: "身份证号:",
prop: "identitycard",
col: "3",
},
{
label: "警号:",
prop: "policemanid",
col: "3",
},
{
label: "真实姓名:",
prop: "trueName",
col: "3",
},
{
label: "电话:",
prop: "telephone",
col: "3",
},
{
label: "",
prop: "",
col: "3",
},
{
label: "警官正面照:",
prop: "zmjgzp",
col: "3",
type: "photoSp",
},
{
label: "警官反面照:",
prop: "fmjgzp",
col: "3",
type: "photoSp",
},
{
label: "申请注册时间:",
prop: "lrsj",
col: "10",
},
],
},
],
pageFooterProps: [],
pageObject: {},
Loading: null,
unitname: "",
userInfo: {},
fdId: "",
ruleForm: {
unitname: '',
phone: '',
title: '',
sprName: '',
name: '',
date: '',
shzt: '2',
blyj: '',
spsj: '',
sqsj: ''
},
rules: {
shzt: [
{ required: true, message: '请输入审核结果', trigger: 'change' },
],
blyj: [
{ required: true, message: '请输入审核意见', trigger: 'change' },
],
},
};
},
methods: {
handleClose () {
this.$nextTick(() => {
let domImageView = document.querySelector(".el-image-viewer__mask"); // 获取遮罩层dom
if (!domImageView) {
return;
}
domImageView.addEventListener("click", () => {
// 点击遮罩层时调用关闭按钮的 click 事件
document.querySelector(".el-image-viewer__close").click();
});
});
},
toAproval () {
if (this.ruleForm.shzt == '2' && !this.ruleForm.blyj) {
this.ruleForm.blyj = '审核通过'
}
this.$refs['ruleForm'].validate(async (valid) => {
if (valid) {
let loading = this.$loading({
lock: true,
text: "正在保存...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
const parmas = {
id: this.$route.query.xxzjbh,
shzt: this.ruleForm.shzt,
blyj: this.ruleForm.blyj,
policemanid: this.pageObject.policemanid,
}
let res = await shUser(parmas);
if (res.data && res.data.code == 200) {
if (this.ruleForm.shzt == '2') {
this.$alert("审批通过", "提示", {
confirmButtonText: "确定",
showClose: false,
type: "success",
}).then(res => {
window.opener.postMessage("appReloadData", location.origin);
loading.close();
window.close()
});
} else {
this.$alert("审批不通过成功", "提示", {
confirmButtonText: "确定",
showClose: false,
type: "success",
}).then(res => {
window.opener.postMessage("appReloadData", location.origin);
loading.close();
window.close()
});
}
} else {
console.log(123, res);
this.$message.error(`${res.data.message}`)
loading.close();
}
} else {
loading.close();
return false;
}
});
},
getInfor () {
shUserDetail({
id: this.$route.query.xxzjbh,
}).then((res) => {
console.log(res, 1111);
if (res.data.success && res.data.code == 200) {
res.data.data.data.gradeStr =
res.data.data.data.grade == "S"
? "省级"
: res.data.data.data.grade == "D"
? "地市级"
: "县级";
res.data.data.data.fmjgzp = res.data.data.data.fmjgzp
? `data:image/png;base64,${res.data.data.data.fmjgzp}`
: "";
res.data.data.data.zmjgzp = res.data.data.data.zmjgzp
? `data:image/png;base64,${res.data.data.data.zmjgzp}`
: "";
this.pageObject = res.data.data.data;
}
this.Loading.close();
});
},
},
created () {
this.$store.commit("user/SET_Breadcrumb", this.breadcrumbList);
this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
this.ruleForm.date = window.util.timeStampTurnTime(new Date());
this.ruleForm.title = this.userInfo.unitname;
this.ruleForm.sprName = this.userInfo.realname
if (this.$route.query.xxzjbh) {
this.Loading = this.$loading({
lock: true,
text: "正在获取数据...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
this.title = "用户信息修改";
this.xxzjbh = this.$route.query.xxzjbh;
this.getInfor();
}
},
mounted () {
},
};
</script>
<style scoped lang="scss">
@mixin pageStyle() {
padding: 13px 50px;
}
@mixin photoStyle() {
display: flex;
align-items: center;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.18);
}
/deep/ .rightContent {
flex: 1;
height: 100%;
width: 1200px;
margin: 0 auto;
overflow-y: auto;
.paneDiv {
background: #ffffff;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.18);
opacity: 1;
border-radius: 4px;
margin: 16px 20px 2px !important;
position: relative;
}
.paneDiv2 {
background: #ffffff;
border: 1px solid #eaeaea;
box-shadow: none;
opacity: 1;
border-radius: 8px;
}
.header {
padding: 13px 20px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #e4e4e4;
.title {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 600;
color: #363636;
}
}
.Boxcontent {
@include pageStyle();
.content {
height: auto;
display: block;
.pt0 {
padding-top: 0;
}
}
}
.module {
padding: 10px 0;
}
.photoBox {
@include photoStyle();
width: 100%;
}
}
section {
font-weight: 400;
padding: 24px 0px;
.el-button {
width: 140px;
height: 48px;
background: #266fe8;
border-radius: 7px 7px 7px 7px;
font-size: 16px;
font-weight: 400;
color: #ffffff;
}
}
.el-image {
width: 178px;
height: 178px;
vertical-align: middle;
}
.sqImg {
display: flex !important;
.imgSty {
margin-right: 8px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<form-compontent :formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
:propTitle="title"
@getDialogSeletesd="getDialogSeletesd"
:base64Transform="true"
@removePhoto="removePhoto"
:fileBase64="fileBase64"
@onBase64Transform="onBase64Transform">
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/addForm.vue";
import axios from "axios";
import {
insertUserNew,
getUserXxByxxzjbh,
updateUserXx
} from "@/api/userAuth/addUser.js";
export default {
name: "addUser",
components: {
formCompontent,
},
data () {
return {
title: "用户新增",
propFormField: [
//基本信息
{
title: "新增用户",
id: 1,
objStr: "",
index: 0,
data: [
{
name: "用户单位",
id: "unitcode",
type: "lazyCodeTreeDialog",
prop: "checkEmpty", //字典弹框需要的字段
props: "checkEmpty",
placeholder: "请选择",
value: "",
col: "2",
codeOptions: [],
codeTree: "CODE_QGUNIT",
},
{
name: "身份证号:",
id: "identitycard",
type: "text",
prop: "emptyAbleIdentityBT",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "警号:",
id: "policemanid",
type: "text",
prop: "checkEmpty",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "真实姓名:",
id: "trueName",
type: "text",
prop: "checkEmpty",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "密码:",
id: "password",
type: "text",
prop: "checkPassword",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "电话:",
id: "telephone",
type: "text",
prop: "mustAbleIphone",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "警官正面照:",
id: "zmjgzp",
type: "photo",
prop: "checkEmpty",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "2",
acceptType: ".jpg,.jpeg,.png",
isbase64: true,
},
{
name: "警官反面照:",
id: "fmjgzp",
type: "photo",
prop: "checkEmpty",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "2",
acceptType: ".jpg,.jpeg,.png",
isbase64: true,
},
],
},
],
fileBase64: {},
formLabelAlign: {
unitcode: ''
},
Loading: null,
unitname: "",
userInfo: {},
fdId: "",
};
},
methods: {
onBase64Transform (p) {
this.fileBase64 = p;
},
removePhoto (item) {
let loading = this.$loading({
lock: true,
text: "正在删除...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
let id = item.id;
this.$set(this.formLabelAlign, id, "");
loading.close();
},
getDialogSeletesd (label) {
this.unitname = label;
console.log(this.unitname, 999999999);
},
submit (params) {
clearTimeout(this.fdId);
let self = this;
let loading = this.$loading({
lock: true,
text: "正在保存...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
self.fdId = setTimeout(() => {
params.set("identitycard", self.formLabelAlign.identitycard);
params.append("username", self.formLabelAlign.policemanid);
params.append("unitname", self.unitname);
if (!self.xxzjbh) {
self.addSubmit(params, loading);
} else {
self.editSubmit(params, loading);
}
}, 500);
},
addSubmit (params, loading) {
insertUserNew(params).then((res) => {
console.log(res, 11111111);
if (res && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
window.close()
// this.$router.push("login");
},
});
} else {
this.$message.error(res.message);
loading.close();
}
});
},
editSubmit (params, loading) {
// params.append("unitname", this.unitname);
params.append("id", this.xxzjbh);
updateUserXx(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
this.$router.push("queryUser");
},
});
} else {
this.$message.error(res.message);
loading.close();
}
});
},
getshuju () {
var self = this;
getUserXxByxxzjbh({
id: this.xxzjbh,
}).then((res) => {
if (res.success && res.code == 200) {
var result = res.data.rows;
self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => {
this.$set(this.formLabelAlign, i.id, result[i.id]);
});
}
this.$forceUpdate();
});
self.$forceUpdate();
}
setTimeout(() => {
self.Loading.close();
}, 500);
});
},
handleChildren (data, dwdm) {
let arr = [];
data.forEach((item) => {
if (item.id == dwdm) {
arr.push(item);
debugger;
} else {
this.handleChildren(item.children, dwdm);
}
});
return arr;
},
},
created () {
this.$store.commit("user/SET_Breadcrumb", this.breadcrumbList);
this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
if (this.$route.query.xxzjbh) {
this.Loading = this.$loading({
lock: true,
text: "正在获取数据...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
this.title = "用户信息修改";
this.xxzjbh = this.$route.query.xxzjbh;
this.getshuju();
}
},
mounted () {
},
};
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file
...@@ -44,13 +44,21 @@ module.exports = { ...@@ -44,13 +44,21 @@ module.exports = {
}, },
proxy: { proxy: {
"/api": { "/api": {
target: "http://192.168.1.108:9023", target: "http://192.168.1.111:9023",
changeOrigin: true, changeOrigin: true,
secure: false, secure: false,
pathRewrite: { pathRewrite: {
'^/api': '/' '^/api': '/'
} }
}, },
"/alyzd": {
target: "http://192.168.1.111:9023",
changeOrigin: true,
secure: false,
pathRewrite: {
'^/alyzd': '/'
}
},
}, },
}, },
css: { css: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment