Commit 1a6a58d5 by chenqiang

相关案件、添加案件界面

parent 99e1607b
{
"success": true,
"code": 200,
"message": "成功",
"data": {
"total": 12,
"rows": [
{
"id": "01",
"label": "标识号串并[01]",
"parentId": "",
"children": []
},
{
"id": "03",
"label": "现勘串并[03]",
"parentId": "",
"children": [
{
"id": "0301",
"label": "指纹串并[0301]",
"parentId": "03",
"children": []
},
{
"id": "0302",
"label": "DNA串并[0302]",
"parentId": "03",
"children": []
},
{
"id": "0303",
"label": "足迹串并[0303]",
"parentId": "03",
"children": []
},
{
"id": "0304",
"label": "声纹串并[0304]",
"parentId": "03",
"children": []
},
{
"id": "0305",
"label": "虹膜串并[0305]",
"parentId": "03",
"children": []
}
]
},
{
"id": "0301",
"label": "指纹串并[0301]",
"parentId": "03",
"children": []
},
{
"id": "0302",
"label": "DNA串并[0302]",
"parentId": "03",
"children": []
},
{
"id": "0303",
"label": "足迹串并[0303]",
"parentId": "03",
"children": []
},
{
"id": "0304",
"label": "声纹串并[0304]",
"parentId": "03",
"children": []
},
{
"id": "0305",
"label": "虹膜串并[0305]",
"parentId": "03",
"children": []
},
{
"id": "09",
"label": "人工串并[09]",
"parentId": "",
"children": [
{
"id": "0901",
"label": "手段串并[0901]",
"parentId": "09",
"children": []
},
{
"id": "0902",
"label": "人像串并[0902]",
"parentId": "09",
"children": []
},
{
"id": "0903",
"label": "视频串并[0903]",
"parentId": "09",
"children": []
},
{
"id": "0904",
"label": "综合串并[0904]",
"parentId": "09",
"children": []
}
]
},
{
"id": "0901",
"label": "手段串并[0901]",
"parentId": "09",
"children": []
},
{
"id": "0902",
"label": "人像串并[0902]",
"parentId": "09",
"children": []
},
{
"id": "0903",
"label": "视频串并[0903]",
"parentId": "09",
"children": []
},
{
"id": "0904",
"label": "综合串并[0904]",
"parentId": "09",
"children": []
}
]
}
}
\ No newline at end of file
<template>
<div class="rightContent rightContent2">
<div class="Content paneDiv paneDiv2" style="margin: 8px 20px">
<div class="cxtjWrap">
<el-form label-position="right" label-width="140px" ref="queryForm" :model="formData" :class="propQueryField.length < 3 ? 'inlineBtn' : ''">
<div class="zdyLine">
<el-form-item :label="item.name + ':'" v-for="item in propQueryField" :key="item.id" :prop="item.id" v-show="!item.hidden" :class="'demo-input-suffix zdycol' + item.col">
<!--输入框-->
<el-input clearable :placeholder="item.placeholder" v-model="formData[item.id]" v-if="item.type == 'text'">
</el-input>
<div class="text-btn" v-if="item.type == 'text-btn'">
<el-input class="txt" clearable :placeholder="item.placeholder" v-model="formData[item.id]">
</el-input>
<el-button type="primary" size="mini" @click="createMc">生成名称</el-button>
<el-button type="danger" size="mini" @click="reset">重置</el-button>
</div>
<!--输入框area-->
<el-input clear="area" clearable type="textarea" :placeholder="item.placeholder" v-model="formData[item.id]" v-if="item.type == 'textarea'">
</el-input>
<!--输入框-最大值与最小值-->
<div class="zdyInputW zdyInputCol2" v-else-if="item.type == 'zdyText'">
<el-input :placeholder="item.placeholder" v-model="formData[item.id]">
</el-input>
<el-input :placeholder="item.placeholder2" v-model="formData[item.id2]" style="width: calc((100% - 150) / 2)">
</el-input>
</div>
<div class="zdyInputW zdyInputCol2" v-else-if="item.type == 'zdyDate'">
<el-date-picker v-model="formData[item.id]" type="date" align="right" :picker-options="item.pickerOptions" unlink-panels value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
<el-date-picker v-model="formData[item.id2]" type="date" align="right" :picker-options="item.pickerOptions2" unlink-panels value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</div>
<!--下拉框-->
<el-select v-model="formData[item.id]" clearable :placeholder="item.placeholder" v-else-if="item.type == 'select'">
<el-option v-for="item3 in item.selectData" :key="item3.value" :label="item3.name" :value="item3.value">
</el-option>
</el-select>
<!--日期框 日期时间-->
<el-date-picker v-model="formData[item.id]" type="datetime" align="right" :picker-options="item.pickerOptions" unlink-panels suffix-icon="el-icon-date" value-format="yyyy-MM-dd HH:mm:ss" v-else-if="item.type == 'datetime'">
</el-date-picker>
<!--日期框-->
<el-date-picker v-model="formData[item.id]" type="daterange" align="right" :picker-options="item.pickerOptions" unlink-panels range-separator="至" start-placeholder="开始日期" value-format="yyyy-MM-dd" end-placeholder="结束日期" suffix-icon="el-icon-date" v-else-if="item.type == 'date'">
</el-date-picker>
<el-date-picker v-model="formData[item.id]" type="datetimerange" align="right" :picker-options="item.pickerOptions" unlink-panels range-separator="至" start-placeholder="开始日期" value-format="yyyy-MM-dd HH:mm:ss" end-placeholder="结束日期" prefix-icon="el-icon-date" v-else-if="item.type == 'datetimerange'">
</el-date-picker>
<!--多选框-->
<div class="zdyInputW" v-else-if="item.type == 'checkbox'">
<el-checkbox-group v-model="formData[item.id]" size="small">
<el-checkbox v-for="item2 in item.checkboxData" :label="item2" :key="item2">{{ item2 }}
</el-checkbox>
</el-checkbox-group>
</div>
<!--单选框-->
<div class="zdyInputW" v-else-if="item.type == 'radio'">
<el-radio-group v-model="formData[item.id]" size="small">
<el-radio :label="item2.val" v-for="item2 in item.radioData" :key="item2.val">{{ item2.label }}
</el-radio>
</el-radio-group>
</div>
<!--字典框 @emitValue="getLbValue"-->
<div class="zdyInputW" v-else-if="item.type == 'code' || item.type == 'jlCode'">
<select-tree v-model="formData[item.id]" :placeholder="'请选择' + item.name" :options="item.codeOptions" :sendId="item.id" />
</div>
<!--字典弹框 @emitValue="getLbValue"-->
<div class="zdyInputW" v-else-if="item.type == 'codeTreeDialog'">
<select-tree-dialog :placeholder="'请选择' + item.name" :sendId="item.id" :formData="formData" :currentItem="item" />
</div>
<!--字典弹框懒加载 @emitValue="getLbValue"-->
<div class="zdyInputW" v-else-if="item.type == 'lazyCodeTreeDialog'">
<lazy-select-tree-dialog :placeholder="'请选择' + item.name" :sendId="item.id" :formData="formData" :currentItem="item" />
</div>
</el-form-item>
</div>
</el-form>
<!--按钮-->
<div class="btm-btns">
<el-button type="primary" size="small" style="width: 100px" @click="saveAj">确定
</el-button>
<el-button size="small" @click="clearData" style="width: 100px">取消
</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
import Bus from '@/utils/Bus'
import SelectTree from "@c/tree_components.vue";
import SelectTreeDialog from "@c/treeCode_components.vue";
import LazySelectTreeDialog from "@c/lazy_treeCode_components.vue";
import Http from "@/utils/http.js";
import axios from "axios";
import { esAsjQuery } from "@/api/queryAj.js";
import { toQueryXszxx, updateCbxsz } from "@/api/cbyp.js";
import { get, post, postform } from "@/utils/http.js";
import { addxszglasj } from "@/api/cbyp.js";
export default {
name: "ptCxForm",
components: {
SelectTree,
SelectTreeDialog,
LazySelectTreeDialog,
},
props: {
pageBs: String,
cxQueryField: {
type: Array,
default: () => [],
},
cxDefaultFormThead: {
type: Array,
default: () => [],
},
cxDefaultFormTheads: {
type: Array,
default: () => [],
},
cxFormData: Object,
cxUrl: String,
childrenUrl: String,
header: String,
pageFlag: String,
},
data () {
return {
tPage: null,
checkResult: true,
asjbh: "",
spType: "",
pageBszfc: this.pageBs,
tableLoading: true, //loading
currentPage1: 1, //表格页码
page_size: 10, //每页显示多少条
pageShow: true, //是否显示分页
formData: this.cxFormData, //查询条件form
propQueryField: this.cxQueryField, //查询条件
key: 1, //table得key
tableDataLength: 0, //表格总数
talbeBhgCount: "", // 不合格
talbehgCount: "", // 合格
tableData: [], //表格数据
propdefaultFormThead: this.cxDefaultFormThead, //表格表头
propdefaultFormTheads: this.cxDefaultFormTheads, //子表格表头
excelHeader: "案件标注",
cz: this.pageFlag,
};
},
methods: {
saveAj() {
this.$emit('saveAj')
},
reset() {
console.log(111);
this.$emit('reset')
Bus.$emit('reset')
},
createMc() {
this.$emit('addmc')
},
turnToEdit (val, type) {
if (type == "delete") {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
updateCbxsz({
cbxszbhs: val.xszajbh,
}).then((res) => {
if (res.code == 200) {
this.doQuery("yes");
} else {
this.$message({
type: "error",
message: "删除失败",
});
}
this.$options.methods.doQuery();
});
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
} else if (type == "add") {
debugger;
this.$router.pushToTab({
path: "cbaAdd",
query: {
xszajbh: row.xszajbh,
cbxgfwbzh: row.xszajbh,
},
});
}
},
rowClick (row, column, event) {
var self = this;
self.showLoading();
let formData = {};
(formData.xszajbh = row.xszajbh),
(formData.start = 1),
(formData.length = 10);
var index = self.tableData.findIndex(
(item) => item.xszajbh == row.xszajbh
);
post(this.childrenUrl, formData).then((response) => {
if (response.code == 200) {
self.tableData[index].children = response.data.data;
self.closeLoading();
} else {
/*self.$message({
type: "error",
message: response.data.message
});*/
self.closeLoading();
}
});
},
goDetail (scope, type) {
if (type == "detail") {
this.$router.pushToTab({
path: "ajbzDetail",
query: {
asjbh: scope.asjbh,
},
});
} else if (type == "qg") {
this.$router.pushToTab({
path: "qgaj",
query: {
xszajbh: scope.xszajbh,
cbxgfwbzh: scope.cbxgfwbzh,
},
});
} else if (type == "xsz") {
this.$router.pushToTab({
path: "hbxsz",
query: {
xszajbh: scope.xszajbh,
hbxszType: scope.hbxszType,
},
});
}
},
export2Excel () {
/*导出*/
let self = this,
tHeader = [],
filterVal = [];
if (self.tableDataLength > 5000) {
self.$message({
type: "error",
message: "最多只能导出5000条",
});
} else {
const loading = this.$loading({
lock: true,
text: "正在导出...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
let formDatas = {};
for (let i in self.formData) {
if (i != "cxSj") {
formDatas[i] = self.formData[i];
} else {
formDatas[i] =
self.formData[i] != "" && self.formData[i] != null
? self.formData[i].join(" - ")
: "";
}
}
formDatas.page = 1;
formDatas.rows = 5000;
tHeader = [];
filterVal = [];
self.propdefaultFormThead.forEach((val) => {
tHeader.push(val.label);
filterVal.push(val.prop);
});
post(this.cxUrl, formDatas).then((res) => {
if (res.status === 200) {
require.ensure([], () => {
const { export_json_to_excel } = require("../utils/Export2Excel");
const list = res.data;
const data = self.formatJson(filterVal, list);
export_json_to_excel(tHeader, data, self.excelHeader);
});
// loading.close();
} else {
// loading.close();
self.$message({
type: "error",
message: "查询失败",
});
}
self.tableLoadingEmit = false;
});
}
},
delectByAjbh (asjbh) {
var self = this;
this.$confirm("删除后不可恢复,是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
message: "删除成功!",
})
.then(() => { })
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
toXg (item, type) {
let routeData = this.$router.resolve({
path: "/malamodify",
query: { asjbh: item.asjbh, type: type },
});
window.open(routeData.href, "_blank");
},
toLasxxg (asjbh, type, type2) {
let routeData = this.$router.resolve({
path: "/malasxmodify",
query: { asjbh: asjbh, type: type, type2 },
});
window.open(routeData.href, "_blank");
},
closeLoading () {
this.tableLoading = false;
},
showLoading () {
this.tableLoading = true;
},
handleSizeChange (val) {
this.page_size = val;
this.formData.rows = val;
this.doQuery("yes");
},
clearData () {
Bus.$emit('reset')
let self = this;
for (let i in self.formData) {
if (
i != "rows" &&
i != "page" &&
i != "typeFlag" &&
i != "unitcode" &&
i != "grade" &&
i != "flwssfhgpdbz"
) {
self.formData[i] = "";
}
}
self.formData["rows"] = 10;
self.formData["page"] = 1;
},
formatJson (filterVal, jsonData) {
let arr = [];
jsonData.map((v) => {
let arr1 = [];
filterVal.map((j) => {
if (j.indexOf(",") != -1) {
let arr = j.split(",");
let data = "";
for (let i = 0; i <= arr.length - 1; i++) {
data += arr[i].split(":")[0] + ":" + v[arr[i].split(":")[1]];
}
arr1.push(data);
} else {
arr1.push(v[j]);
}
});
arr.push(arr1);
});
return arr;
},
handleCurrentChange (val) {
this.currentPage1 = val;
this.formData.page = val;
this.doQuery("yes");
},
tableRowClassName ({ rowIndex }) {
if (rowIndex % 2 == 0) {
return "";
} else {
return "success-row";
}
},
doQueryBtn (val) {
if (val) {
this.formData.sfhgpdbz = "";
}
this.formData.page = 1;
this.doQuery("yes");
},
doQuery (flag) {
this.showLoading();
let self = this,
formDatas = {};
for (let i in self.formData) {
if (i != "cxSj") {
formDatas[i] = self.formData[i];
} else {
formDatas[i] =
self.formData[i] != "" && self.formData[i] != null
? self.formData[i].join(" - ")
: "";
}
}
if (flag) {
post(this.cxUrl, formDatas).then((response) => {
if (response.code == 200) {
response.data.data.forEach((item) => {
item.children = [];
item.xszmc = `${item.cbajAjmc}(组号:${item.xszajbh})`;
item.cbajAjmc = `${item.cbajAjmc}(组号:${item.xszajbh})`;
});
self.tableData = response.data.data;
self.tableDataLength = response.data.iTotalRecords;
self.tPage = Math.ceil(
response.data.iTotalRecords / self.page_size
);
self.closeLoading();
} else {
/*self.$message({
type: "error",
message: response.data.message
});*/
self.closeLoading();
}
});
}
},
},
mounted () {
let self = this;
/*获取字典*/
self.propQueryField.forEach((val) => {
if (val.type == "code" || val.type == "codeTreeDialog") {
if (val.codeOptions.length == 0) {
axios
.get(`JsonData/${val.codeTree}.json`)
.then((res) => {
self.$set(val, "codeOptions", res.data.data.rows);
})
.catch((err) => {
console.log(err);
});
}
}
});
self.doQuery("yes");
},
computed: {
//过滤掉重大伤亡重复人员等的操作列
ifShowOperation () {
return (
this.pageBszfc != "zczjcfry" &&
this.pageBszfc != "zdswxxgl" &&
this.pageBszfc != "cfryIndex" &&
this.pageBszfc != "jsbhgl"
);
},
},
};
</script>
<style lang="scss">
@import url("../assets/styles/iconfont.css");
.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: 32px;
}
.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;
}
.rightContent2 {
.zdyLine {
display: flex;
flex-direction: column;
align-items: center;
}
.text-btn {
display: flex;
.txt {
margin-right: 20px;
width: 100% !important;
}
}
.zdycol3 {
display: inline-block;
width: 50% !important;
}
.zdyInputW {
width: 77% !important;
}
.el-textarea__inner {
width: 77% !important;
}
.btm-btns {
margin-left: calc(50% - 100px) !important;
margin-top: 50px !important;
}
}
</style>
<style scoped lang="scss">
@import "@/assets/styles/rightContent.scss";
</style>
<template>
<div class="formWrap">
<!-- <div>
<span class="flTtitle">查询条件</span>
<span class="pageGuide">页面引导</span>
<span class="settingField" @click="centerDialogVisible = true"
><i class="iconfont icontiaojie"></i>配置查询条件</span
>
</div> -->
{{formD}}
<el-form
label-position="right"
label-width="140px"
ref="ajxxForm"
:model="formD"
>
<form-item
ref="formItem1"
:formField="ajxxDefaultField"
:formDa="formD"
:deleteIdKey="deleteIdKey"
v-show="ajxxDefaultField.data.length != 0"
@getSelected="getSelected"
></form-item>
<form-item
ref="formItem2"
:formField="xyrxxDefaultField"
:formDa="formD"
:deleteIdKey="deleteIdKey"
v-show="xyrxxDefaultField.data.length != 0"
@getSelected="getSelected"
></form-item>
<!-- <form-item
ref="formItem3"
:formField="shrxxDefaultField"
:formDa="formD"
:deleteIdKey="deleteIdKey"
v-show="shrxxDefaultField.data.length != 0"
@getSelected="getSelected"
></form-item>
<form-item
ref="formItem4"
:formField="flxxDefaultField"
:formDa="formD"
:deleteIdKey="deleteIdKey"
v-show="flxxDefaultField.data.length != 0"
@getSelected="getSelected"
></form-item> -->
</el-form>
<div class="ar" style="margin-top:20px;margin-right:34px;">
<el-button
type="primary"
size="small"
style="width: 100px"
@click="doQueryBtn('xyrxx')"
>查询
</el-button>
<el-button size="small" @click="clearData" style="width: 100px"
>清空
</el-button>
<!-- <el-button plain size="small" class="zdybtn delete" @click="deleteField"
>清空</el-button
>-->
</div>
<el-dialog
:visible.sync="centerDialogVisible"
width="1000px"
:show-close="false"
:close-on-click-modal="false"
custom-class="cxtjDialog"
center
>
<template slot="title">
<div class="fs16"><i class="iconfont icontiaojie"></i>配置查询条件</div>
</template>
<setting-dialog
@emitDialog="emitDialog"
@close="close"
:AjxxDefaultFormField="ajxxDefaultField"
:xyrxxDefaultField="xyrxxDefaultField"
:shrxxDefaultField="shrxxDefaultField"
:flxxDefaultField="flxxDefaultField"
:waitAjxxField="waitAjxxField"
:waitShrxxField="waitShrxxField"
:waitXyrxxField="waitXyrxxField"
:waitFlxxField="waitFlxxField"
@loading="loading"
></setting-dialog>
</el-dialog>
</div>
</template>
<script>
import formItem from "./formItem_components.vue";
import settingDialog from "@/views/dwcx/dialog.vue";
import "@/assets/styles/iconfont.css";
import {saveTableTitleRedis,queryTreeDataByType} from "@/api/dictionaryCode.js";
import axios from "axios";
export default {
name: "formWrap",
components: {
formItem,
settingDialog
},
props: {
formData: Object,
AjxxFormField: Object,
XyrxxFormField: Object,
ShrxxFormField: Object,
FlxxFormField: Object,
AjxxDefaultFormField: Object,
XyrxxDefaultFormField: Object,
ShrxxDefaultFormField: Object,
FlxxDefaultFormField: Object,
fieldType: String,
deleteId: String
},
data() {
return {
initNum:0,
deleteIdKey:this.deleteId,
formD: this.formData,
ajxxField: this.AjxxFormField,
xyrxxField: this.XyrxxFormField,
shrxxField: this.ShrxxFormField,
flxxField: this.FlxxFormField,
ajxxDefaultField: this.AjxxDefaultFormField,
xyrxxDefaultField: this.XyrxxDefaultFormField,
shrxxDefaultField: this.ShrxxDefaultFormField,
flxxDefaultField: this.FlxxDefaultFormField,
isMultiple: false,
centerDialogVisible: false,
waitAjxxField: [],
waitShrxxField: [],
waitXyrxxField: [],
waitFlxxField: [],
type: this.fieldType
};
},
methods: {
doQueryBtn(){
let self = this;
self.formD.page = 1;
self.$emit("doQueryList", self.formD,);
},
clearData(){
let self = this;
for (let i in self.formD) {
self.formD[i] = "";
}
},
childMethods(id){
this.$refs.formItem1.clearZdyAll(id);
this.$refs.formItem2.clearZdyAll(id);
this.$refs.formItem3.clearZdyAll(id);
this.$refs.formItem4.clearZdyAll(id);
},
clearSearchValue(){
this.$refs.formItem1.clearSearchValue();
this.$refs.formItem2.clearSearchValue();
this.$refs.formItem3.clearSearchValue();
this.$refs.formItem4.clearSearchValue();
},
delete(){//清空所有得时候
this.$refs.formItem1.deleteValue();
this.$refs.formItem2.deleteValue();
this.$refs.formItem3.deleteValue();this.$refs.formItem4.deleteValue();
},
deleteField() {
let self = this;
for (let i in self.formD) {
if (i == "flxx") {
self.formD[i] = [];
} else if (i == "page") {
self.formD[i] = "1";
} else if (i == "rows") {
self.formD[i] = "10";
} else if (i == "desc") {
self.formD[i] = "larq";
} else {
self.formD[i] = "";
}
}
},
loading(data) {
this.$emit("emitLoading", data);
},
getSelected(data, index) {
this.$emit("getSeletedList", data, index);
},
doQuery(type) {
let self = this;
self.formD.page = 1;
self.$emit("doQueryList", type, self.formD, "isButton");
},
emitDialog(flag, ajxxL, xyrL, shrL, flxxL, ajxxO, xyrO, shrO, flxxO) {
/*保存的字段匹配*/
let self = this;
let obj1 = JSON.parse(ajxxL);
let obj2 = JSON.parse(xyrL);
let obj3 = JSON.parse(shrL);
let obj4 = JSON.parse(flxxL);
self.centerDialogVisible = flag;
/*保存*/
let params = {};
params.name = "基础查询保存查询字段";
params.type = self.type;
params.list = [];
self.$set(params.list, 0, obj1);
self.$set(params.list, 1, obj2);
self.$set(params.list, 2, obj3);
self.$set(params.list, 3, obj4);
saveTableTitleRedis(JSON.stringify(params)).then(res => {
if (res.success === true) {
self.$message({
type: "success",
message: "保存成功"
});
self.ajxxDefaultField = JSON.parse(ajxxO);
self.xyrxxDefaultField = JSON.parse(xyrO);
self.shrxxDefaultField = JSON.parse(shrO);
self.flxxDefaultField = JSON.parse(flxxO);
self.init();
self.initCode();
self.$emit("closeLoading", false);
} else {
self.$message({
type: "error",
message: "保存失败"
});
self.$emit("closeLoading", false);
}
});
},
close(flag) {
this.centerDialogVisible = flag;
},
init() {
let self = this;
console.log(self.ajxxField);
self.waitAjxxField = self.ajxxField.data.filter(
item => !self.ajxxDefaultField.data.some(ele => ele.name === item.name)
);
self.initNum++;
self.waitShrxxField = self.shrxxField.data.filter(
item => !self.shrxxDefaultField.data.some(ele => ele.name === item.name)
);
self.initNum++;
self.waitXyrxxField = self.xyrxxField.data.filter(
item => !self.xyrxxDefaultField.data.some(ele => ele.name === item.name)
);
self.initNum++;
self.waitFlxxField = self.flxxField.data.filter(
item => !self.flxxDefaultField.data.some(ele => ele.name === item.name)
);
self.initNum++;
},
initCode() {
let self = this;
self.ajxxDefaultField.data.forEach((val,index) => {
if (val.type == "code"||val.type == "codeTreeDialog") {
if (val.codeOptions.length == 0) {
axios.get(`JsonData/${val.codeTree}.json`).then(response => {
if (response.success === true) {
self.$set(val, "codeOptions", response.data.rows);
}
});
}
}
if(index==self.ajxxDefaultField.data.length-1){
self.initNum++;
}
});
self.xyrxxDefaultField.data.forEach((val,index2) => {
if (val.type == "code"||val.type == "codeTreeDialog") {
if (val.codeOptions.length == 0) {
axios.get(`JsonData/${val.codeTree}.json`).then(response => {
if (response.success === true) {
self.$set(val, "codeOptions", response.data.rows);
}
});
}
}
if(index2==self.xyrxxDefaultField.data.length-1){
self.initNum++;
}
});
self.shrxxDefaultField.data.forEach((val,index3) => {
if (val.type == "code"||val.type == "codeTreeDialog") {
if (val.codeOptions.length == 0) {
axios.get(`JsonData/${val.codeTree}.json`).then(response => {
if (response.success === true) {
self.$set(val, "codeOptions", response.data.rows);
}
});
}
}
if(index3==self.shrxxDefaultField.data.length-1){
self.initNum++;
}
});
}
},
mounted() {
let self = this;
self.init();
self.initCode();
},
watch: {
initNum(val){
if(val>=7){
this.$emit("closeInitLoading");
}
},
deleteId(val){
this.deleteIdKey=val;
},
AjxxDefaultFormField(val) {
this.ajxxDefaultField = val;
},
XyrxxDefaultFormField(val) {
this.xyrxxDefaultField = val;
},
ShrxxDefaultFormField(val) {
this.shrxxDefaultField = val;
},
FlxxDefaultFormField(val) {
this.flxxDefaultField = val;
this.initCode();
this.init();
},
formData(data) {
this.formD = data;
}
}
};
</script>
<style scoped lang="scss">
@import "../assets/styles/form.scss";
</style>
/*
* @Author: your name
* @Date: 2021-08-25 15:59:14
* @LastEditTime: 2021-08-25 15:59:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\utils\Bus.js
*/
import Vue from 'vue'
const bus = new Vue()
export default bus
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-25 09:47:35
* @LastEditTime: 2021-08-25 18:46:37
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\cba\djwzba.vue
-->
<template>
<div class="djwzba" id="djwzba">
<div class="header">
<i class="el-icon-edit"></i>
<span>填写案件</span>
</div>
<div class="content-search" v-if="$route.path==='/djwzba/xgaj'">
<right-content @saveAj="saveAj" @addmc="createMc" class="input-txt" :cxFormData="cxFormData" :cxQueryField="cxQueryField"></right-content>
</div>
<div class="tabs">
<div :class="{tabItem: true, active: $route.path===item.path}" v-for="(item, index) in routerList" :key="index" @click="switchTab(item.path)">
<span>{{item.title}}</span>
</div>
</div>
<router-view></router-view>
</div>
</template>
<script>
import Bus from '@/utils/Bus'
import rightContent from "@c/bshChildrenQuery_cba.vue";
import { addxszglasj } from "@/api/cbyp.js";
export default {
components: {
rightContent,
},
data () {
return {
xszajbh: this.$route.query.xszajbh,
routerList: [
{ path: '/djwzba/xgaj', title: '相关案件' },
{ path: '/djwzba/tjaj', title: '添加案件' },
// { path: '/djwzba/', title: '我的收藏案件' }
],
cxFormData: {
typeFlag: "all",
unitcode: sessionStorage.getItem("unitcode"),
grade: sessionStorage.getItem("grade"),
typeFlag: "bshcb",
cbmc: '',
cblx: [],
cbxxms: ''
},
cxQueryField: [
{
name: "串并名称",
id: "cbmc",
type: "text-btn",
value: "11",
placeholder: "请输入",
col: "3",
},
{
name: "串并类型",
id: "cblx",
// type: "codeTreeDialog",
type: "lazyCodeTreeDialog",
props: [], //字典弹框需要的字段
value: "",
col: "3",
codeOptions: [],
codeTree: "CODE_CBYP_CBLX",
multiple: true
},
{
name: "串并依据描述",
id: "cbxxms",
type: "textarea",
value: "",
placeholder: "请输入",
col: "3",
},
],
};
},
mounted () {
this.cxQueryField[0]
Bus.$on('addCbmc', (cbmcList) => {
console.log(cbmcList)
let arr = []
cbmcList.forEach(element => {
arr.push(element.ajmc)
});
this.str = arr.join(',')
})
Bus.$on('reset', () => {
this.createMc()
})
},
methods: {
async saveAj() {
let obj = {
cbmc: this.cxFormData.cbmc,
cblx: this.cxFormData.cblx,
cbxxms: this.cxFormData.cbxxms,
glxxXszajbh: this.$route.query.xszajbh
}
let res = await addxszglasj(obj)
console.log(res);
Bus.$emit('updataTable')
this.cxFormData.cbmc = ''
this.cxFormData.cblx = []
this.cxFormData.cbxxms = ''
},
switchTab (path) {
this.$router.push(
{
path: path,
query: {
xszajbh: this.xszajbh
}
}
)
},
createMc() {
this.$set(this.cxFormData, 'cbmc', this.str)
console.log(this.cxQueryField);
}
},
}
</script>
<style lang="scss" scoped>
.djwzba {
.header {
padding: 8px;
border-bottom: 1px dashed #000;
font-weight: 800;
}
.tabs {
height: 40px;
display: flex;
align-items: center;
font-size: 16px;
background: #fff;
border-bottom: 1px dashed #ccc;
padding: 0 8px;
margin-bottom: 5px;
.tabItem {
height: 100%;
line-height: 40px;
padding: 0 10px;
cursor: pointer;
&.active {
border: 1px solid #ccc;
border-top: 2px solid orangered;
border-bottom: none;
}
}
}
}
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-25 10:14:13
* @LastEditTime: 2021-08-25 18:34:54
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\tjaj.vue
-->
<template>
<div class="Content">
<list-form
ref="form"
:formData="formData"
:AjxxDefaultFormField="AjxxDefaultFormField"
:AjxxFormField="AjxxFormField"
:XyrxxDefaultFormField="XyrxxDefaultFormField"
:jccxXyrxxFormField="jccxXyrxxFormField"
@doQueryList="doQueryList"
></list-form>
<el-table
stripe
:key="key"
v-loading="tableLoading"
element-loading-text="拼命加载中"
ref="itsmDataTable"
tooltip-effect="dark"
max-height="550"
style="width: 99%; margin: 0 auto"
width="100%"
size="small"
:data="bztjDataList"
>
<el-table-column label="操作" align="center" >
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handlePath(scope.$index, scope.row)"
>添加</el-button
>
</template>
</el-table-column>
<el-table-column
align="center"
v-for="columnTitle in bztjFormThead"
:prop="columnTitle.prop"
:key="columnTitle.label"
:label="columnTitle.label"
:width="columnTitle.width"
>
</el-table-column>
</el-table>
</div>
</template>
<script>
import listForm from "@c/tjajForm.vue";
export default {
components: {
listForm,
},
data() {
return {
tableLoading:false,
// 表格数据
bztjDataList: [],
// 表格表头
bztjFormThead: [
{
label: "案事件编号",
prop: "asjbh",
width: "auto",
},
{
label: "简要案情",
prop: "jyaq",
width: "auto",
},
{
/*table默认得表头*/
label: "主案类别",
prop: "ajzlb",
width: "auto",
},
// {
// label: "主要类别",
// prop: "time",
// width: "auto",
// },
{
label: "刑事类案类别",
prop: "cph",
width: "auto",
},
{
label: "刑事次案类别",
prop: "cphl",
width: "auto",
},
{
label: "按事件名称",
prop: "cph",
width: "auto",
},
{
label: "发案地点 ",
prop: "cph",
width: "auto",
},
{
label: "损失价值 ",
prop: "cph",
width: "auto",
},
{
label: "立案日期 ",
prop: "cph",
width: "auto",
},
{
label: "案件发生开始时间 ",
prop: "cph",
width: "auto",
},
],
header: "刑事次案类别",
pageBs: "bshcb",
formData: {
flxx:[],
asjbh: "",
sldwGajgjgdm:'',
asjfsddXzqhdm:'',
ajlbdm:'',
larq:'', //立案时间
asjfssjAsjfskssj:'',//案发时间
ajzlb:'',
ajxzlb:'',
xalbdmbcms:'',
zhfzxyrAsjxgrybh:'',
zhfzxyrCyzj:'',
zhfzxyrXm:'',
zhfzxyrCym:'',
zhfzxyrXbdm:'',
zhfzxyrBmch:'',
bhrCsrqRqgzxx:'', //出生日期
bhrMzdm:'',
bhrGjdm:'',
zhfzxyrHjdzXzqhdm:'',
zhfzxyrHjdzDzmc:'',
zhfzxyrXzzXzqhdm:'',
zhfzxyrXzzDzmc:'',
zhfzxyrFzxyrdaztdm:'',
zhfsZhfsdm:'',
zhddDzmc:'',
zhdwGajgjgdm:'',
zhrq:'', //抓获时间
page: "1",
rows: "10",
desc: "larq" /*降序*/,
},
AjxxDefaultFormField: {
title: "案件特征",
id: "1",
data: [
/*立案信息 侦查终结信息 立案信息审批 侦查终结审批通用开始*/
{
name: "案(事)件编号",
id: "asjbh",
type: "text",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "受理单位",
id: "sldwGajgjgdm",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_AJLB",
value: "",
col: "3",
},
{
name: "案发地取区划",
id: "asjfsddXzqhdm",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_AJLB",
value: "",
col: "3",
},
{
name: "案(事)件类别",
id: "ajlbdm",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_AJLB",
value: "",
col: "3",
},
{
name: "立案时间",
id: "larq",
type: "daterange",
value: "",
placeholder: "请选择",
col: "3",
pickerOptions: {
shortcuts: [
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth();
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 2;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近六个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 5;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近一年",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 11;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
],
},
},
{
name: "案发时间",
id: "asjfssjAsjfskssj",
type: "daterange",
value: "",
placeholder: "请选择",
col: "3",
pickerOptions: {
shortcuts: [
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth();
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 2;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近六个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 5;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近一年",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 11;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
],
},
},
{
name: "主案类别",
id: "ajzlb",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_AJLB",
value: "",
col: "3",
},
{
name: "类案类别",
id: "ajxzlb",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_AJLB",
value: "",
col: "3",
},
{
name: "次类案类别",
id: "xalbdmbcms",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_AJLB",
value: "",
col: "3",
},
],
},
XyrxxDefaultFormField: {
title: "人员特征",
id: "2",
data: [
{
name: "人员编号",
id: "zhfzxyrAsjxgrybh",
type: "text",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "证件号码",
id: "zhfzxyrCyzj",
type: "text",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "姓名",
id: "zhfzxyrXm",
type: "text",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "曾用名",
id: "zhfzxyrCym",
type: "text",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "性别",
id: "zhfzxyrXbdm",
type: "code",
codeOptions: [],
codeTree: "CODE_XB",
value: "",
col: "3",
},
{
name: "其他名称",
id: "zhfzxyrBmch",
type: "text",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "出生日期",
id: "bhrCsrqRqgzxx",
type: "daterange",
value: "",
placeholder: "请选择",
col: "3",
pickerOptions: {
shortcuts: [
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth();
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 2;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近六个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 5;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近一年",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 11;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
],
},
},
{
name: "民族",
id: "bhrMzdm",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_MZ",
value: "",
col: "3",
},
{
name: "国籍",
id: "bhrGjdm",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_GJ",
value: "",
col: "3",
},
{
name: "户籍地区划",
id: "zhfzxyrHjdzXzqhdm",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: "CODE_XZQH",
value: "",
col: "3",
},
{
name: "户籍地名称",
id: "zhfzxyrHjdzDzmc",
type: "text",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "现住址行政区划",
id: "zhfzxyrXzzXzqhdm",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
placeholder: "请选择",
codeTree: "CODE_XZQH",
value: "",
col: "3",
},
{
name: "现住址名称",
id: "zhfzxyrXzzDzmc",
type: "text",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "到案状态",
id: "zhfzxyrFzxyrdaztdm",
type: "codeTreeDialog", //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
placeholder: "请选择",
codeTree: "CODE_DAZT",
value: "",
col: "3",
},
{
name: "抓获方式",
id: "zhfsZhfsdm",
type: "code",
codeOptions: [],
codeTree: "CODE_ZHFS",
value: "",
col: "3",
},
{
name: "抓获地点",
id: "zhddDzmc",
type: "code",
codeOptions: [],
codeTree: "CODE_ZHFS",
value: "",
col: "3",
},
{
name: "抓获单位",
id: "zhdwGajgjgdm",
// type: "lazyCodeTreeDialog", //字典弹框
type: "codeTreeDialog", //字典弹框
codeTree: "CODE_QGUNIT",
props: [], //字典弹框需要的字段
codeOptions: [],
placeholder: "请选择",
value: "",
col: "3",
},
{
name: "抓获日期",
id: "zhrq",
type: "daterange",
value: "",
placeholder: "请选择",
col: "3",
pickerOptions: {
shortcuts: [
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth();
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 2;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近六个月",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 5;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
{
text: "最近一年",
onClick(picker) {
const end = new Date();
const start = new Date();
let year = start.getFullYear();
let month = start.getMonth() - 11;
if (month === 0) {
month = 12;
year = year - 1;
}
if (month < 0) {
month = 12 + month;
year = year - 1;
}
if (month < 10 && month > 0) {
month = "0" + month;
}
let firstDayOfPreMonth =
year + "-" + month + "-" + start.getDate();
firstDayOfPreMonth = new Date(firstDayOfPreMonth);
picker.$emit("pick", [firstDayOfPreMonth, end]);
},
},
],
},
},
],
},
cxUrl: "/api/cbxsz/toQueryXszxx",
updateCbxszUrl: "/api/cbxsz/updateCbxsz",
childrenUrl: "/api/cbxsz/listCbxszGlAsjxx",
jccxXyrxxFormField: {
title: '嫌疑人信息',
id: '2',
data: [
{
name: '抓获日期',
id: 'zhrq',
type: 'daterange',
value: '',
placeholder: '请选择',
col: '3',
pickerOptions: {
shortcuts: [
{
text: '最近一个月',
onClick (picker) {
const end = new Date()
const start = new Date()
let year = start.getFullYear()
let month = start.getMonth()
if (month === 0) {
month = 12
year = year - 1
}
if (month < 0) {
month = 12 + month
year = year - 1
}
if (month < 10 && month > 0) {
month = '0' + month
}
let firstDayOfPreMonth =
year + '-' + month + '-' + start.getDate()
firstDayOfPreMonth = new Date(firstDayOfPreMonth)
picker.$emit('pick', [firstDayOfPreMonth, end])
}
},
{
text: '最近三个月',
onClick (picker) {
const end = new Date()
const start = new Date()
let year = start.getFullYear()
let month = start.getMonth() - 2
if (month === 0) {
month = 12
year = year - 1
}
if (month < 0) {
month = 12 + month
year = year - 1
}
if (month < 10 && month > 0) {
month = '0' + month
}
let firstDayOfPreMonth =
year + '-' + month + '-' + start.getDate()
firstDayOfPreMonth = new Date(firstDayOfPreMonth)
picker.$emit('pick', [firstDayOfPreMonth, end])
}
},
{
text: '最近六个月',
onClick (picker) {
const end = new Date()
const start = new Date()
let year = start.getFullYear()
let month = start.getMonth() - 5
if (month === 0) {
month = 12
year = year - 1
}
if (month < 0) {
month = 12 + month
year = year - 1
}
if (month < 10 && month > 0) {
month = '0' + month
}
let firstDayOfPreMonth =
year + '-' + month + '-' + start.getDate()
firstDayOfPreMonth = new Date(firstDayOfPreMonth)
picker.$emit('pick', [firstDayOfPreMonth, end])
}
},
{
text: '最近一年',
onClick (picker) {
const end = new Date()
const start = new Date()
let year = start.getFullYear()
let month = start.getMonth() - 11
if (month === 0) {
month = 12
year = year - 1
}
if (month < 0) {
month = 12 + month
year = year - 1
}
if (month < 10 && month > 0) {
month = '0' + month
}
let firstDayOfPreMonth =
year + '-' + month + '-' + start.getDate()
firstDayOfPreMonth = new Date(firstDayOfPreMonth)
picker.$emit('pick', [firstDayOfPreMonth, end])
}
}
]
}
},
{
name: '抓获地区划',
id: 'zhddXzqhdm',
type: 'codeTreeDialog', //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: 'CODE_XZQH',
value: '',
col: '3'
},
{
name: '抓获地名称',
id: 'zhddDzmc',
type: 'text',
value: '',
placeholder: '请输入',
col: '3'
},
{
name: '抓获单位',
id: 'zhdwGajgjgdm',
type: 'codeTreeDialog', //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
placeholder: '请选择',
codeTree: 'CODE_UNIT',
value: '',
col: '3'
},
{
name: '抓获方式',
id: 'zhfsZhfsdm',
type: 'code',
codeOptions: [],
codeTree: 'CODE_ZHFS',
value: '',
col: '3'
},
{
name: '到案状态',
id: 'zhfzxyrFzxyrdaztdm',
type: 'code',
codeOptions: [],
codeTree: 'CODE_DAZT',
value: '',
col: '3'
},
{
name: '姓名',
id: 'zhfzxyrXm',
type: 'text',
value: '',
placeholder: '请输入',
col: '3'
},
{
name: '曾用名',
id: 'zhfzxyrCym',
type: 'text',
value: '',
placeholder: '请输入',
col: '3'
},
{
name: '证件号码',
id: 'zhfzxyrCyzjZjhm',
type: 'text',
value: '',
placeholder: '请输入',
col: '3'
},
{
name: '出生日期',
id: 'zhfzxyrCsrqRqgzxx',
type: 'daterange',
value: '',
placeholder: '请选择',
col: '3',
pickerOptions: {
shortcuts: [
{
text: '最近一个月',
onClick (picker) {
const end = new Date()
const start = new Date()
let year = start.getFullYear()
let month = start.getMonth()
if (month === 0) {
month = 12
year = year - 1
}
if (month < 0) {
month = 12 + month
year = year - 1
}
if (month < 10 && month > 0) {
month = '0' + month
}
let firstDayOfPreMonth =
year + '-' + month + '-' + start.getDate()
firstDayOfPreMonth = new Date(firstDayOfPreMonth)
picker.$emit('pick', [firstDayOfPreMonth, end])
}
},
{
text: '最近三个月',
onClick (picker) {
const end = new Date()
const start = new Date()
let year = start.getFullYear()
let month = start.getMonth() - 2
if (month === 0) {
month = 12
year = year - 1
}
if (month < 0) {
month = 12 + month
year = year - 1
}
if (month < 10 && month > 0) {
month = '0' + month
}
let firstDayOfPreMonth =
year + '-' + month + '-' + start.getDate()
firstDayOfPreMonth = new Date(firstDayOfPreMonth)
picker.$emit('pick', [firstDayOfPreMonth, end])
}
},
{
text: '最近六个月',
onClick (picker) {
const end = new Date()
const start = new Date()
let year = start.getFullYear()
let month = start.getMonth() - 5
if (month === 0) {
month = 12
year = year - 1
}
if (month < 0) {
month = 12 + month
year = year - 1
}
if (month < 10 && month > 0) {
month = '0' + month
}
let firstDayOfPreMonth =
year + '-' + month + '-' + start.getDate()
firstDayOfPreMonth = new Date(firstDayOfPreMonth)
picker.$emit('pick', [firstDayOfPreMonth, end])
}
},
{
text: '最近一年',
onClick (picker) {
const end = new Date()
const start = new Date()
let year = start.getFullYear()
let month = start.getMonth() - 11
if (month === 0) {
month = 12
year = year - 1
}
if (month < 0) {
month = 12 + month
year = year - 1
}
if (month < 10 && month > 0) {
month = '0' + month
}
let firstDayOfPreMonth =
year + '-' + month + '-' + start.getDate()
firstDayOfPreMonth = new Date(firstDayOfPreMonth)
picker.$emit('pick', [firstDayOfPreMonth, end])
}
}
]
}
},
{
name: '性别',
id: 'zhfzxyrXbdm',
type: 'code',
codeOptions: [],
codeTree: 'CODE_XB',
value: '',
col: '3'
},
{
name: '国籍',
id: 'zhfzxyrGjdm',
type: 'codeTreeDialog', //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: 'CODE_GJ',
value: '',
col: '3'
},
{
name: '民族',
id: 'zhfzxyrMzdm',
type: 'codeTreeDialog', //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: 'CODE_MZ',
value: '',
col: '3'
},
{
name: '户籍地行政区划',
id: 'zhfzxyrHjdzXzqhdm',
type: 'codeTreeDialog', //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
codeTree: 'CODE_XZQH',
value: '',
col: '3'
},
{
name: '户籍地名称',
id: 'zhfzxyrHjdzDzmc',
type: 'text',
value: '',
placeholder: '请输入',
col: '3'
},
{
name: '现住址行政区划',
id: 'zhfzxyrXzzXzqhdm',
type: 'codeTreeDialog', //字典弹框
props: [], //字典弹框需要的字段
codeOptions: [],
placeholder: '请选择',
codeTree: 'CODE_XZQH',
value: '',
col: '3'
},
{
name: '现住址名称',
id: 'zhfzxyrXzzDzmc',
type: 'text',
value: '',
placeholder: '请输入',
col: '3'
},
{
name: '身高',
id: 'zhfzxyrSgMin',
id2: 'zhfzxyrSgMax',
type: 'zdyText',
value: '',
placeholder: '请输入',
value2: '',
placeholder2: '请输入',
col: '3'
},
{
name: '体重',
id: 'zhfzxyrTzMin',
id2: 'zhfzxyrTzMax',
type: 'zdyText',
value: '',
placeholder: '请输入',
value2: '',
placeholder2: '请输入',
col: '3'
},
{
name: '足长',
id: 'zhfzxyrZcMin',
id2: 'zhfzxyrZcMax',
type: 'zdyText',
value: '',
placeholder: '请输入',
value2: '',
placeholder2: '请输入',
col: '3'
},
{
name: '工作单位',
id: 'zhfzxyrGzdw',
type: 'text',
value: '',
placeholder: '请输入',
col: '3'
},
{
name: '学历',
id: 'zhfzxyrXldm',
type: 'code',
codeOptions: [],
placeholder: '请选择',
codeTree: 'CODE_WHCD',
value: '',
col: '3'
},
{
name: '违法犯罪经历',
id: 'zhfzxyrWffzjlms',
type: 'text',
value: '',
placeholder: '请输入',
col: '3'
},
{
name: '特殊专长',
id: 'zhfzxyrFzxyrtszcFzxyrtszcdm',
type: 'code',
codeOptions: [],
placeholder: '请选择',
codeTree: 'CODE_FZXYRTSZC',
value: '',
col: '3'
},
{
name: '人员身份',
id: 'zhfzxyrAsjxgrysfAsjxgrysfdm',
type: 'code',
codeOptions: [],
codeTree: 'CODE_SF',
value: '',
col: '3'
},
{
name: '职业类别',
id: 'zhfzxyrZyZylbdm',
type: 'code',
codeOptions: [],
codeTree: 'CODE_HYLB',
value: '',
col: '3'
},
{
name: '作案次数',
id: 'zacsXyrMin',
id2: 'zacsXyrMax',
type: 'zdyText',
value: '',
placeholder: '请输入',
value2: '',
placeholder2: '请输入',
col: '3'
}
]
}
};
},
methods: {
doQueryList(data) {
console.log(data);
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-25 09:47:52
* @LastEditTime: 2021-08-25 18:03:06
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\cba\xgaj.vue
-->
<template>
<div class="xgal">
<el-button type="danger" class="btn" @click="delAj">删除案件</el-button>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column label="案件编号" width="265" align="center">
<template slot-scope="scope">{{ scope.row.asjbh }}</template>
</el-table-column>
<el-table-column label="案件名称" width="160" align="center">
<template slot-scope="scope">{{ scope.row.ajmc }}</template>
</el-table-column>
<el-table-column label="案件类别" width="100" align="center">
<template slot-scope="scope">{{ scope.row.ajlbdmStr }}</template>
</el-table-column>
<el-table-column label="比中号码" width="180" align="center">
<template slot-scope="scope">{{ scope.row.cbxgfwbzh }}</template>
</el-table-column>
<el-table-column label="案件状态" width="160" align="center">
<template slot-scope="scope">{{ scope.row.zcjddmStr }}</template>
</el-table-column>
<el-table-column label="发案时间" width="160" align="center">
<template slot-scope="scope">{{ scope.row.asjfssjKssj }}</template>
</el-table-column>
<el-table-column label="发案地点" width="100" align="center">
<template slot-scope="scope">{{ scope.row.asjfsddXzqhdm }}</template>
</el-table-column>
<el-table-column label="受理单位" width="160" align="center">
<template slot-scope="scope">{{ scope.row.sldw }}</template>
</el-table-column>
<el-table-column label="立案单位" width="160" align="center">
<template slot-scope="scope">{{ scope.row.ladwGajgjgdm }}</template>
</el-table-column>
<el-table-column label="简要案情" width="420" align="center">
<template slot-scope="scope">{{ scope.row.jyaq }}</template>
</el-table-column>
</el-table>
<el-pagination background layout="prev, pager, next" @current-change="changePage" :total="total">
</el-pagination>
</div>
</template>
<script>
import Bus from '@/utils/Bus'
import { queryxszglasj, delxszglasj } from "@/api/cbyp.js";
export default {
data () {
return {
tableData: [],
multipleSelection: [],
total: 10
}
},
mounted () {
console.log(this.$route);
this.getData(1, 10);
Bus.$on('reset', () => {
this.$refs.multipleTable.clearSelection();
})
Bus.$on('updataTable', () => {
this.getData(1, 10);
})
},
methods: {
async delAj() {
let arr = []
this.multipleSelection.forEach(item => {
arr.push(item.asjbh)
})
let str = arr.join(',')
console.log(str);
let sfscxsz = 0
if(this.multipleSelection.length == this.total) {
sfscxsz = 1
} else {
sfscxsz = 0
}
let obj = {
asjbhs: str,
xszajbh: this.$route.query.xszajbh,
sfscxsz: sfscxsz
}
let res = await delxszglasj(obj)
console.log(res);
if(res == 200) {
this.$message.success('删除成功!')
this.getData(1, 10)
} else {
this.$message.error('删除失败!')
}
},
async getData (start, length) {
let fromData = {
start,
length,
xszajbh: this.$route.query.xszajbh
}
let res = await queryxszglasj(fromData)
console.log(res);
if (res.code == 200) {
this.tableData = res.data.data
this.total = res.data.recordsTotal
} else {
this.$message.error('请求数据失败!')
}
},
toggleSelection (rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
handleSelectionChange (val) {
this.multipleSelection = val;
Bus.$emit('addCbmc', this.multipleSelection)
},
changePage (page) {
console.log(page);
this.getData(page, 10)
}
}
}
</script>
<style lang="scss" scoped>
.xgal {
button {
margin: 5px;
}
}
</style>
\ No newline at end of file
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