Commit 806eb2ff by 叶富雄

设置页面

parent c28dad7f
<template>
<div>
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
:propTitle="title"
@handleRemove="handleRemove"
pageBs="addsqfbzl"
ref="formCompontent"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/form.vue";
import { insertRyxx,selectRyxxById, selectRyzpList, updateRyxx} from "@/api/dswtzxx.js";
import {
insertDna,
} from "@/api/dswtz/dnaxx.js";
export default {
name: "addryxx",
components: {
formCompontent,
},
data() {
return {
title: "新增人员信息",
propFormField: [
{
title: "",
id: 1,
objStr: "",
index: 0,
data: [
{
name: "姓名:",
id: "xm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "公民身份号码:",
id: "gmsfhm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "DNA编号:",
id: "rydnabh",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "样本类型:",
id: "yblxdm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "采集状况标识:",
id: "cjzkbsdm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
/* {
name: "宗教信仰:",
id: "zjxydm",
type: "codeTree",
codeTree: "CODE_ZJXY",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
},*/
],
},
],
formLabelAlign: {
hjdzDzmc:'',
},
type: "",
xxzjbh: "",
result: "",
removeFileXxzjbh: [],
};
},
methods: {
submit(params) {
if(this.$route.query.rybh){
updateRyxx(params)
}
else {
let sd = 'R5400000000002021110009'
params.append('rybh',sd)
insertDna(params)
}
},
handleRemove(val) {
console.log(val);
this.removeFileXxzjbh.push(val.xxzjbh);
},
getshuju() {
let loading = this.$loading({
lock: true,
text: "正在加载...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
var self = this;
let params = new FormData();
let params1 = new FormData();
params.append("rybh", this.rybh);
params1.append("asjxgrybh", this.rybh);
selectRyzpList(params1).then(res=>{
if( res.code === 200){
let rows = res.data.rows
for(let i of rows.values()){
let zpbw = i.zpbw
let ryzpDzwjmc = i.ryzpDzwjmc.split('.')[1]
let arr = [
{
name: i.ryzpDzwjmc,
url: i.ryzpDzwjnr,
xxzjbh: i.xxzjbh,
}
]
if(zpbw == 2){
this.$set(this.formLabelAlign, 'R_ZMZP_File', arr);
}
else if(zpbw == 3){
this.$set(this.formLabelAlign, 'R_ZCMZP_File', arr);
}
else if(zpbw == 4){
this.$set(this.formLabelAlign, 'R_YCMZP_File', arr);
}
}
} else {
this.$message.error(res.message);
}
})
selectRyxxById(params).then((res) => {
var result = res.data.rows;
this.result = result;
self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => {
if (i.id == "R_ZMZP_File") {
if (res.data.fjlist && res.data.fjlist.length > 0) {
console.log(9999);
let arr = res.data.fjlist.map((i) => ({
name: i.dzwjmc,
url: i.dzwjwz,
xxzjbh: i.xxzjbh,
}));
this.$set(this.formLabelAlign, i.id, arr);
}
} else if (i.id == "zljsdwdm") {
this.$set(this.formLabelAlign, i.id, result[i.id].split(","));
} else {
this.$set(this.formLabelAlign, i.id, result[i.id]);
}
});
}
this.$forceUpdate();
});
self.$set(self.formLabelAlign, "editing", true);
self.$forceUpdate();
setTimeout(() => {
loading.close();
}, 500);
});
},
},
created() {
if (this.$route.query.type) {
this.type = this.$route.query.type;
}
if (this.$route.query.rybh) {
this.title = "修改人员信息";
this.rybh = this.$route.query.rybh;
this.getshuju();
}
},
};
</script>
<style scoped lang="scss">
</style>
<template>
</template>
<script>
export default {
name: "dnasx"
}
</script>
<style scoped>
</style>
<template>
<div>
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
:propTitle="title"
@handleRemove="handleRemove"
pageBs="addsqfbzl"
ref="formCompontent"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/form.vue";
import { insertRyxx,selectRyxxById, selectRyzpList, updateRyxx} from "@/api/dswtzxx.js";
import {
doAddZczlxx,
doEditZczlxx,
} from "@/api/zczl/zczl.js";
export default {
name: "addryxx",
components: {
formCompontent,
},
data() {
return {
title: "新增人员信息",
propFormField: [
{
title: "",
id: 1,
objStr: "",
index: 0,
data: [
{
name: "正面照片:",
id: "R_ZMZP_File",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "1",
},
{
name: "左侧面照片:",
id: "R_ZCMZP_File",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "1",
},
{
name: "右侧面照片:",
id: "R_YCMZP_File",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "1",
},
{
name: "姓名:",
id: "xm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
prop: 'checkEmpty'
},
{
name: "别名:",
id: "bmch",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "证件类型:",
id: "cyzjdm",
type: "codeTree",
codeTree: "CODE_ZJ",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
prop: 'checkEmpty'
},
{
name: "证件号码:",
id: "zjhm",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
prop: 'identity'
},
{
name: "出生日期:",
id: "csrqQsrq",
type: "dates",
value: "",
placeholder: "请输入",
col: "2",
prop: 'checkEmpty'
},
{
name: "性别:",
id: "xbdm",
type: "codeTree",
codeTree: "CODE_XB",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
prop: 'checkEmpty'
},
{
name: "民族:",
id: "mzdm",
type: "codeTree",
codeTree: "CODE_MZ",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
prop: 'checkEmpty'
},
{
name: "国籍:",
id: "gjdm",
type: "codeTree",
codeTree: "CODE_GJ",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
prop: 'checkEmpty'
},
{
name: "籍贯:",
id: "jgssxdm",
type: "codeTree",
codeTree: "CODE_XZQH",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
prop: 'checkEmpty'
},
{
name: "宗教信仰:",
id: "zjxydm",
type: "codeTree",
codeTree: "CODE_ZJXY",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "户籍地区:",
id: "hjdzXzqhdm",
type: "codeTree",
codeTree: "CODE_XZQH",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "户籍地地址:",
id: "hjdzDzmc",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "现住址:",
id: "xzzDzmc",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
],
},
],
formLabelAlign: {
hjdzDzmc:'',
},
type: "",
xxzjbh: "",
result: "",
removeFileXxzjbh: [],
};
},
methods: {
submit(params) {
console.log(this.formLabelAlign);
if (this.$refs.formCompontent.fileLists.R_ZMZP_File.length == 0) {
this.$message.error("请选择正面照片");
return;
}
if (this.$refs.formCompontent.fileLists.R_ZCMZP_File.length == 0) {
this.$message.error("左侧面照片");
return;
}
if (this.$refs.formCompontent.fileLists.R_YCMZP_File.length == 0) {
this.$message.error("右侧面照");
return;
}
if(this.$route.query.rybh){
updateRyxx(params)
}
else {
params.append('rybh',this.rybh)
insertRyxx(params)
}
},
handleRemove(val) {
console.log(val);
this.removeFileXxzjbh.push(val.xxzjbh);
},
getshuju() {
let loading = this.$loading({
lock: true,
text: "正在加载...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
var self = this;
let params = new FormData();
let params1 = new FormData();
params.append("rybh", this.rybh);
params1.append("asjxgrybh", this.rybh);
selectRyzpList(params1).then(res=>{
if( res.code === 200){
let rows = res.data.rows
for(let i of rows.values()){
let zpbw = i.zpbw
let ryzpDzwjmc = i.ryzpDzwjmc.split('.')[1]
let arr = [
{
name: i.ryzpDzwjmc,
url: i.ryzpDzwjnr,
xxzjbh: i.xxzjbh,
}
]
if(zpbw == 2){
this.$set(this.formLabelAlign, 'R_ZMZP_File', arr);
}
else if(zpbw == 3){
this.$set(this.formLabelAlign, 'R_ZCMZP_File', arr);
}
else if(zpbw == 4){
this.$set(this.formLabelAlign, 'R_YCMZP_File', arr);
}
}
} else {
this.$message.error(res.message);
}
})
selectRyxxById(params).then((res) => {
var result = res.data.rows;
this.result = result;
self.propFormField.forEach((fieldItem) => {
if (fieldItem.data && fieldItem.data.length > 0) {
fieldItem.data.forEach((i) => {
if (i.id == "R_ZMZP_File") {
if (res.data.fjlist && res.data.fjlist.length > 0) {
console.log(9999);
let arr = res.data.fjlist.map((i) => ({
name: i.dzwjmc,
url: i.dzwjwz,
xxzjbh: i.xxzjbh,
}));
this.$set(this.formLabelAlign, i.id, arr);
}
} else if (i.id == "zljsdwdm") {
this.$set(this.formLabelAlign, i.id, result[i.id].split(","));
} else {
this.$set(this.formLabelAlign, i.id, result[i.id]);
}
});
}
this.$forceUpdate();
});
self.$set(self.formLabelAlign, "editing", true);
self.$forceUpdate();
setTimeout(() => {
loading.close();
}, 500);
});
},
},
created() {
if (this.$route.query.type) {
this.type = this.$route.query.type;
}
if (this.$route.query.rybh) {
this.title = "修改人员信息";
this.rybh = this.$route.query.rybh;
this.getshuju();
}
},
};
</script>
<style scoped lang="scss">
</style>
<template>
<div class="Content">
<right-content
:tableOperation="tableOperation"
:tableOperationWidth="tableOperationWidth"
:pageBs="pageBs"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
@edit="edit"
@dele="dele"
@add="add"
@toInfor="toInfor"
ref="rightContent"
>
<template #btnGroup="scope">
<el-button @click="dele(scope.scope)" type="text">删除</el-button>
<el-button @click="RouteName(scope.scope,'addDnaxx')" type="text">人像信息管理</el-button>
<el-button @click="RouteName(scope.scope,'addDnaxx')" type="text">DNA信息管理</el-button>
<el-button @click="RouteName(scope.scope,'addHmxx')" type="text">虹膜信息管理</el-button>
<el-button @click="RouteName(scope.scope,'addDnaxx')" type="text">声纹信息管理</el-button>
<el-button @click="RouteName(scope.scope,'addDnaxx')" type="text">足迹信息管理</el-button>
<el-button @click="RouteName(scope.scope,'addDnaxx')" type="text">指纹信息管理</el-button>
</template>
</right-content>
</div>
</template>
<script>
import rightContent from "@c/ptCxForm_components.vue";
import { deleteRyxxById } from "@/api/dswtzxx.js";
export default {
name: "lbxx",
components: {
rightContent,
},
data() {
return {
tableOperation:true,
tableOperationWidth:800,
header: "人员信息列表",
pageBs: "dswtzxxlbxx",
cxFormData: {
rybh: "",
xm: "",
zjhm: "",
xbdm: "",
cyzjdm:"",
szzwbh:"",
page:'1',
limit:'10'
},
cxQueryField: [
{
name: "人员编号",
id: "rybh",
type: "text",
props: "checkEmpty",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "姓名",
id: "xm",
type: "text",
props: "checkEmpty",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "证件号码",
id: "zjhm",
type: "text",
props: "checkEmpty",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "十指指纹编号",
id: "szzwbh",
type: "text",
props: "checkEmpty",
value: "",
placeholder: "请输入",
col: "3",
},
{
name: "性别",
id: "xbdm",
type: "codeTreeDialog",
props: "checkEmpty",
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_XB",
},
{
name: "证件类型",
id: "cyzjdm",
type: "codeTreeDialog",
props: "checkEmpty",
value: "",
placeholder: "请选择",
col: "3",
codeOptions: [],
codeTree: "CODE_ZJ",
},
],
cxDefaultFormThead: [
{
label: "人员编号",
prop: "rybh",
toInfor: true,
},
{
label: "姓名",
prop: "xm",
},
{
label: "常用证件",
prop: "cyzjCyzjdmStr",
},
{
label: "证件号码",
prop: "zjhm",
},
{
label: "性别",
prop: "xbdmStr",
},
{
label: "十指指纹编号",
prop: "szzwbh",
},
],
// 需要转化table的显示
cxUrl: "/rycj/selectRyxxList",
Menu: [
{
id: "wfqdzczl",
label: "人员信息列表",
index: "wfqdzczl",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
],
leftMenus: [
//左侧导航(模块第一个页面需要)
{
id: "ryjbxx",
label: "人员基本信息",
newAuth: "M01",
index: "ryjbxx",
className: "iconfont icongongnengfuwu",
hasChildren: true,
children: [
{
id: "dswtzxxlbxx",
label: "人员信息列表",
index: "dswtzxxlbxx",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
],
},
],
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
this.$store.commit("user/SET_Header", this.header);
this.$store.commit("user/SET_LeftMenu", this.leftMenus);
},
methods: {
RouteName(scope,m){
this.$router.push({
path: m,
query: { rybh: scope.row.rybh },
});
},
add(){
this.$router.push("addryxx");
},
edit(scope) {
this.$router.push({
path: "addryxx",
query: { rybh: scope.row.rybh, type: "xd" },
});
},
dele(scope) {
console.log(scope);
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteRyxxById({
rybh: scope.row.rybh,
}).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(scope) {
this.$router.push({
path: "/queryRxxx",
query: {
rybh: scope.rybh,
type: "xdzl",
},
});
},
},
mounted() {},
};
</script>
<style>
.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";
</style>
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