Commit 411a054a by liyuhang19990520

服务标识号模块

parent 82263fad
/*
* @Author: your name
* @Date: 2021-09-01 10:46:56
* @LastEditTime: 2021-09-10 15:06:00
* @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 insertgzrySyfwbzh = params =>
postform(`${base.alyIP}/gzrySyfwbzh/insertgzrySyfwbzh`, params);
//人员使用服务标识号信息修改模块
export const updategzrySyfwbzh = params =>
postform(`${base.alyIP}/gzrySyfwbzh/updategzrySyfwbzh`, params);
//人员使用服务标识号删除模块
export const deletegzrySyfwbzhById = params =>
post(`${base.alyIP}/gzrySyfwbzh/deletegzrySyfwbzhById`, params);
//查询人员使用服务标识号详情信息
export const selectSyfwbzhById = params =>
post(`${base.alyIP}/gzrySyfwbzh/selectSyfwbzhById`, params);
......@@ -160,11 +160,29 @@ const menuLayouts = [
path: "/queryFwbsh",
name: "queryFwbsh",
meta: {
title: '服务标识号信息管理'
title: '服务标识号信息列表'
},
component: () => import("@/views/xxtk/fwbsh/queryFwbsh.vue")
},
{
path: "/addFwbsh",
name: "addFwbsh",
meta: {
title: '服务标识号信息管理',
isAdd: true
},
component: () => import("@/views/xxtk/fwbsh/addFwbsh.vue")
},
{
path: "/detailFwbsh",
name: "detailFwbsh",
meta: {
title: '服务标识号信息详情',
isAdd: true
},
component: () => import("@/views/xxtk/fwbsh/detailFwbsh.vue")
},
{
path: "/queryJdc",
name: "queryJdc",
meta: {
......
<template>
<div>
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/form.vue";
import {
insertgzrySyfwbzh,
updategzrySyfwbzh,
selectSyfwbzhById,
} from "@/api/xxtk/fwbsh.js";
import { fwbs } from "@/utils/params.js";
export default {
name: "addGzry",
components: {
formCompontent,
},
data() {
return {
propFormField: [
//基本信息
{
title: "新增服务标识号",
id: 1,
objStr: "",
index: 0,
data: fwbs,
},
],
formLabelAlign: {},
breadcrumbList: [
{
name: "刑嫌列控管理",
to: "/queryGzry",
isActive: false,
},
{
name: "服务标识号列表",
to: "/queryFwbsh",
isActive: false,
},
{
name: this.$route.query.xxzjbh ? "修改服务标识号" : "新增服务标识号",
to: "/addFwbsh",
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) {
insertgzrySyfwbzh(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
this.$router.push("queryFwbsh");
},
});
} else {
this.$message.error("添加失败,请检查数据格式是否正确");
}
});
},
editSubmit(params, loading) {
params.append("xxzjbh", this.xxzjbh);
updategzrySyfwbzh(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
this.$router.push("queryFwbsh");
},
});
} else {
this.$message.error("添加失败,请检查数据格式是否正确");
}
});
},
getshuju() {
var self = this;
selectSyfwbzhById({
xxzjbh: this.xxzjbh,
}).then((res) => {
var result = res.data.syfwbzh;
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:24:02
* @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 { selectSyfwbzhById } from "@/api/xxtk/fwbsh.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: "/queryFwbsh",
isActive: false,
},
{
name: "服务标识号详情",
to: "/detailFwbsh",
isActive: true,
},
],
};
},
mounted() {},
methods: {
getInfor() {
let _this = this;
selectSyfwbzhById({
xxzjbh: _this.xxzjbh,
}).then((res) => {
var result = res.data.syfwbzh;
_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>
......@@ -5,14 +5,19 @@
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
ref="rightContent"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
@add="add"
@dele="dele"
@toInfor="toInfor"
@edit="edit"
></right-content>
</div>
</template>
<script>
import { deletegzrySyfwbzhById } from "@/api/xxtk/fwbsh.js";
import rightContent from "@c/ptCxForm_components.vue";
export default {
name: "queryYdtx",
......@@ -81,6 +86,10 @@ export default {
],
cxDefaultFormThead: [
{
label: "信息主键编号",
prop: "xxzjbh",
},
{
label: "常用证件",
prop: "cyzjCyzjdm",
},
......@@ -105,10 +114,6 @@ export default {
label: "登记时间",
prop: "djsj",
},
{
label: "xxzjbh",
prop: "xxzjbh",
},
],
cxUrl: "/gzrySyfwbzh/selectgzrySyfwbzh",
};
......@@ -116,7 +121,49 @@ export default {
created() {},
methods: {
add() {
this.$router.push("addGzry");
this.$router.push("addFwbsh");
},
dele(obj) {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deletegzrySyfwbzhById({
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: "/detailFwbsh",
query: {
xxzjbh: obj.xxzjbh,
},
});
},
edit(obj) {
this.$router.push({
path: "/addFwbsh",
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