Commit de8c1db6 by liyuhang19990520

机动车信息管理

parent ce1c5a71
/*
* @Author: your name
* @Date: 2021-09-01 10:46:56
* @LastEditTime: 2021-09-10 15:33:39
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\api\bkwpxx.js
*/
import { get, post, postform } from "@/utils/http.js";
import base from "@/api/base";
//人员驾驶机动车信息采集模块
export const insertgzryJsjdc = params =>
postform(`${base.alyIP}/gzryJsjdc/insertgzryJsjdc`, params);
//关注人员驾驶机动车信息修改
export const updategzryJsjdc = params =>
postform(`${base.alyIP}/gzryJsjdc/updategzryJsjdc`, params);
//人员驾驶机动车信息删除模块
export const deletegzryJsjdcById = params =>
post(`${base.alyIP}/gzryJsjdc/deletegzryJsjdcById`, params);
//查询人员驾驶机动车详情信息
export const selectJsjdcById = params =>
post(`${base.alyIP}/gzryJsjdc/selectJsjdcById`, params);
...@@ -186,11 +186,29 @@ const menuLayouts = [ ...@@ -186,11 +186,29 @@ const menuLayouts = [
path: "/queryJdc", path: "/queryJdc",
name: "queryJdc", name: "queryJdc",
meta: { meta: {
title: '机动车信息管理' title: '机动车信息列表'
}, },
component: () => import("@/views/xxtk/jdc/queryJdc.vue") component: () => import("@/views/xxtk/jdc/queryJdc.vue")
}, },
{ {
path: "/detailJdc",
name: "detailJdc",
meta: {
title: '机动车信息详情',
isAdd: true
},
component: () => import("@/views/xxtk/jdc/detailJdc.vue")
},
{
path: "/addJdc",
name: "addJdc",
meta: {
title: '机动车信息管理',
isAdd: true
},
component: () => import("@/views/xxtk/jdc/addJdc.vue")
},
{
path: "/queryBshgj", path: "/queryBshgj",
name: "queryBshgj", name: "queryBshgj",
meta: { meta: {
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
:header="header" :header="header"
:cxFormData="cxFormData" :cxFormData="cxFormData"
:cxQueryField="cxQueryField" :cxQueryField="cxQueryField"
ref="rightContent"
:cxDefaultFormThead="cxDefaultFormThead" :cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl" :cxUrl="cxUrl"
@add="add" @add="add"
@dele="dele" @dele="dele"
@toInfor="toInfor" @toInfor="toInfor"
@edit="edit" @edit="edit"
ref="rightContent"
></right-content> ></right-content>
</div> </div>
</template> </template>
......
<template>
<div>
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/form.vue";
import {
insertgzryJsjdc,
updategzryJsjdc,
selectJsjdcById,
} from "@/api/xxtk/jdc.js";
import { jsjdc } from "@/utils/params.js";
export default {
name: "addGzry",
components: {
formCompontent,
},
data() {
return {
propFormField: [
//基本信息
{
title: "新增机动车信息",
id: 1,
objStr: "",
index: 0,
data: jsjdc,
},
],
formLabelAlign: {},
breadcrumbList: [
{
name: "刑嫌列控管理",
to: "/queryGzry",
isActive: false,
},
{
name: "机动车信息列表",
to: "/queryJdc",
isActive: false,
},
{
name: this.$route.query.xxzjbh ? "修改机动车信息" : "新增机动车信息",
to: "/addJdc",
isActive: true,
},
],
};
},
methods: {
submit(params) {
let loading = this.$loading({
lock: true,
text: "正在保存...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
if (!this.xxzjbh) {
this.addSubmit(params, loading);
} else {
this.editSubmit(params, loading);
}
},
addSubmit(params, loading) {
insertgzryJsjdc(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
this.$router.push("queryJdc");
},
});
} else {
this.$message.error("添加失败,请检查数据格式是否正确");
}
});
},
editSubmit(params, loading) {
params.append("xxzjbh", this.xxzjbh);
updategzryJsjdc(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
this.$router.push("queryJdc");
},
});
} else {
this.$message.error("添加失败,请检查数据格式是否正确");
}
});
},
getshuju() {
var self = this;
selectJsjdcById({
xxzjbh: this.xxzjbh,
}).then((res) => {
var result = res.data.jsjdc;
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.$set(self.formLabelAlign, "editing", true);
self.$forceUpdate();
});
setTimeout(() => {
self.loading = false;
}, 1000);
},
},
created() {
this.$store.commit("user/SET_Breadcrumb", this.breadcrumbList);
if (this.$route.query.xxzjbh) {
this.$set(this.propFormField[0], "title", "修改机动车信息");
this.xxzjbh = this.$route.query.xxzjbh;
this.getshuju();
}
},
};
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-31 09:52:33
* @LastEditTime: 2021-09-10 15:35:41
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\hnksh\ceshi.vue
-->
<template>
<div class="Content" id="hmxsDetail">
<right-content
:cxQueryField="cxQueryField"
:pageObject="pageObject"
:pageFooterProps="pageFooterProps"
labelWidth="110px"
title="机动车信息详情"
>
</right-content>
</div>
</template>
<script>
import rightContent from "@c/PersonInfor.vue";
import { selectJsjdcById } from "@/api/xxtk/jdc.js";
import axios from "@/utils/http.js";
export default {
name: "queryAj",
components: {
rightContent,
},
data() {
return {
cxQueryField: [
{
label: "信息编号:",
prop: "xxzjbh",
col: "3",
},
{
label: "关联信息编号:",
prop: "glxxXxzjbh",
col: "3",
},
{
label: "常用证件:",
prop: "cyzjCyzjdm",
col: "3",
type: "codeTree",
codeTree: "CODE_ZJ",
},
{
label: "常用证件补充描述:",
prop: "cyzjDmbcms",
col: "6",
},
{
label: "证件号码:",
prop: "zjhm",
col: "3",
},
{
label: "IP地址:",
prop: "rysyfwbzhIpFwbzh",
col: "3",
},
{
label: "IP归属地名称:",
prop: "rysyfwbzhIpgsdmc",
col: "3",
},
{
label: "MAC地址:",
prop: "rysyfwbzhMacWpbzh",
col: "3",
},
{
label: "ICCID:",
prop: "rysyfwbzhIccidWpbzh",
col: "3",
},
{
label: "IMEI:",
prop: "rysyfwbzhImeiWpbzh",
col: "3",
},
{
label: "IMSI:",
prop: "rysyfwbzhImsiFwbzh",
col: "3",
},
{
label: "名称:",
prop: "rysyfwbzhMc",
col: "3",
},
{
label: "联系电话:",
prop: "rysyfwbzhDhhmFwbzh",
col: "3",
},
{
label: "服务标识号类别:",
prop: "rysyfwbzhFwbzhFwbzhlbdm",
type: "codeTree",
codeTree: "CODE_FWBSHLB",
col: "3",
},
{
label: "服务标识号补充描述:",
prop: "rysyfwbzhFwbzhDmbcms",
col: "6",
},
{
label: "服务标识号_服务标识号:",
prop: "rysyfwbzhFwbzhFwbzh",
col: "3",
},
{
label: "服务标识号_登记时间:",
prop: "rysyfwbzhFwbzhDjsj",
col: "3",
},
{
label: "服务注册地_国家和地区:",
prop: "rysyfwbzhFwzcdGjhdqdm",
type: "codeTree",
codeTree: "CODE_GJ",
col: "3",
},
{
label: "服务注册地_行政区划:",
prop: "rysyfwbzhFwzcdXzqhdm",
type: "codeTree",
codeTree: "CODE_XZQH",
col: "3",
},
{
label: "服务注册地_地址名称:",
prop: "rysyfwbzhFwzcdDzmc",
col: "3",
},
{
label: "服务单位_单位名称:",
prop: "rysyfwbzhFwdwDwmc",
col: "3",
},
{
label: "有效期开始日期:",
prop: "rysyfwbzhYxqksrq",
col: "3",
},
{
label: "有效期截止日期:",
prop: "rysyfwbzhYxqjzrq",
col: "3",
},
{
label: "注册关联服务标识号类别:",
prop: "zcglfwbzhFwbzhFwbzhlbdm",
type: "codeTree",
codeTree: "CODE_FWBSHLB",
col: "3",
},
{
label: "注册关联服务标识号补充描述:",
prop: "zcglfwbzhFwbzhDmbcms",
col: "6",
},
{
label: "注册关联服务标识号补充描述:",
prop: "zcglfwbzhFwbzhDmbcms",
col: "6",
},
{
label: "注册关联服务标识号:",
prop: "zcglfwbzhFwbzhFwbzh",
col: "3",
},
{
label: "物权类别:",
prop: "rysyfwbzhWqlbdm",
type: "codeTree",
codeTree: "CODE_WQLB",
col: "3",
},
],
pageFooterProps: [
{
label: "填表单位:",
prop: "xxdjdwGajgmc",
col: "3",
},
{
label: "填表人:",
prop: "xxdjryXm",
col: "3",
},
{
label: "填表时间:",
prop: "djsj",
col: "3",
},
],
defaultProps: {
parent: "parentId", // 父级唯一标识
value: "id", // 唯一标识
label: "label", // 标签显示
children: "children", // 子级
},
pageObject: {},
xxzjbh: "",
breadcrumbList: [
{
name: "刑嫌列控管理",
to: "/queryGzry",
isActive: false,
},
{
name: "机动车信息列表",
to: "/queryJdc",
isActive: false,
},
{
name: "机动车信息详情",
to: "/detailJdc",
isActive: true,
},
],
};
},
mounted() {},
methods: {
getInfor() {
let _this = this;
selectJsjdcById({
xxzjbh: _this.xxzjbh,
}).then((res) => {
var result = res.data.jsjdc;
_this.filterTreeCode(result);
});
},
filterTreeCode(obj) {
let _this = this;
let arr = [..._this.cxQueryField, ..._this.pageFooterProps];
arr.forEach((i) => {
if (i.type && i.type == "codeTree") {
axios
.get(`JsonData/${i.codeTree}.json`)
.then((codRes) => {
let value = _this.queryTree(codRes.data.rows, obj[i.prop]);
_this.$set(_this.pageObject, i.prop, value);
})
.catch((err) => {
console.log(err);
});
} else {
_this.$set(_this.pageObject, i.prop, obj[i.prop]);
}
});
console.log(_this.pageObject);
},
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 "";
},
},
created() {
this.$store.commit("user/SET_Breadcrumb", this.breadcrumbList);
this.xxzjbh = this.$route.query.xxzjbh;
this.getInfor();
},
};
</script>
<style scoped lang="scss">
</style>
...@@ -8,14 +8,19 @@ ...@@ -8,14 +8,19 @@
:cxDefaultFormThead="cxDefaultFormThead" :cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl" :cxUrl="cxUrl"
@add="add" @add="add"
@dele="dele"
@toInfor="toInfor"
@edit="edit"
ref="rightContent"
></right-content> ></right-content>
</div> </div>
</template> </template>
<script> <script>
import rightContent from "@c/ptCxForm_components.vue"; import rightContent from "@c/ptCxForm_components.vue";
import { deletegzryJsjdcById } from "@/api/xxtk/jdc.js";
export default { export default {
name: "queryYdtx", name: "queryJdc",
components: { components: {
rightContent, rightContent,
}, },
...@@ -83,6 +88,10 @@ export default { ...@@ -83,6 +88,10 @@ export default {
], ],
cxDefaultFormThead: [ cxDefaultFormThead: [
{ {
label: "信息主键编号",
prop: "xxzjbh",
},
{
label: "常用证件", label: "常用证件",
prop: "cyzjCyzjdm", prop: "cyzjCyzjdm",
}, },
...@@ -107,18 +116,56 @@ export default { ...@@ -107,18 +116,56 @@ export default {
label: "登记时间", label: "登记时间",
prop: "djsj", prop: "djsj",
}, },
{
label: "xxzjbh",
prop: "xxzjbh",
},
], ],
cxUrl: "/gzrySyfwbzh/selectgzrySyfwbzh", cxUrl: "/gzryJsjdc/selectgzryJsjdc",
}; };
}, },
created() {}, created() {},
methods: { methods: {
add() { add() {
this.$router.push("addGzry"); this.$router.push("addJdc");
},
dele(obj) {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deletegzryJsjdcById({
xxzjbh: obj.row.xxzjbh,
}).then((res) => {
if (res.success && res.code == 200) {
this.$message({
type: "success",
message: "删除成功",
});
this.$refs.rightContent.doQuery("yes");
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
toInfor(obj) {
this.$router.push({
path: "/detailJdc",
query: {
xxzjbh: obj.xxzjbh,
},
});
},
edit(obj) {
this.$router.push({
path: "/addJdc",
query: {
xxzjbh: obj.row.xxzjbh,
},
});
}, },
}, },
}; };
......
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