Commit 7c0ea8d1 by xue_wengang

重点人员,组件子集处理

parent ad1dbbcb
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="formContent" style="margin-top: 20px"> <div class="formContent" style="margin-top: 20px">
<div style="margin: 0px auto; border-radius: 8px"> <div style="margin: 0px auto; border-radius: 8px">
<div class="groupTitleBox"> <div class="groupTitleBox">
<span class="groupTitle">{{ propFormField[0].title }}</span> <span class="groupTitle">{{ propTitle }}</span>
</div> </div>
<el-form <el-form
ref="formLabelAlign" ref="formLabelAlign"
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
:key="groupItem.index" :key="groupItem.index"
> >
<div> <div>
<div class="subTitle">
<div>{{ groupItem.title }}</div>
<!-- <div class="bottomLine"></div> -->
</div>
<div class="zdyLine"> <div class="zdyLine">
<el-form-item <el-form-item
:rules="rules[item.id]" :rules="rules[item.id]"
...@@ -339,10 +343,8 @@ ...@@ -339,10 +343,8 @@
v-for="(item2, index2) in item.childrenAsAdd" v-for="(item2, index2) in item.childrenAsAdd"
:key="index2" :key="index2"
> >
<div v-if="item2.flag" id="childrenAsAdd"> <div v-if="item2.flag">
<div v-if="!item2.flag2">
<div v-for="(item3, ind) in item2.list" :key="ind"> <div v-for="(item3, ind) in item2.list" :key="ind">
<div>
<div <div
v-for="(reakData, realIndex) in formLabelAlign[ v-for="(reakData, realIndex) in formLabelAlign[
item2.id item2.id
...@@ -352,38 +354,30 @@ ...@@ -352,38 +354,30 @@
> >
<span class="addName" <span class="addName"
>{{ >{{
item2.name.substring( item2.name.substring(0, item2.name.length - 1)
0,
item2.name.length - 1
)
}}{{ realIndex + 1 }}:</span }}{{ realIndex + 1 }}:</span
> >
<span class="addContent"> <span class="addContent">
<i <!-- <i
:class="'zdyicon ' + item2.iconClass" :class="'zdyicon ' + item2.iconClass"
@click="deleteObj(reakData)" v-if="!type2"
v-if="realIndex != 0" @click="deleteObj(reakData, item2)"
></i> ></i> -->
<el-form-item <el-form-item
v-for="item4 in item3.name" v-for="item4 in item3.name"
:label="item4.name" :label="item4.name"
v-show="!item4.hidden"
:prop="`${item2.id}[${realIndex}].${item4.id}`" :prop="`${item2.id}[${realIndex}].${item4.id}`"
:key="item4.id" :key="item4.id"
:ref="`${item2.id}[${realIndex}].${item4.id}`" :ref="`${item2.id}[${realIndex}].${item4.id}`"
:class="[ :class="[
'item' + item4.col, 'item' + item4.col
item4.prop == 'checkEmpty'
? redColor
: '',
]" ]"
:rules=" :rules="
rules[ rules[`${item2.id}${realIndex}.${item4.id}`]
`${item2.id}${realIndex}.${item4.id}`
]
" "
:style="{ :style="{
height: height: item4.id == 'ryzp' ? '185px' : '36px',
item4.id == 'ryzp' ? '185px' : '36px',
}" }"
> >
<!--输入框--> <!--输入框-->
...@@ -403,10 +397,7 @@ ...@@ -403,10 +397,7 @@
slot="suffix" slot="suffix"
class="el-input__icon" class="el-input__icon"
:class="item4.icon" :class="item4.icon"
style=" style="cursor: pointer; color: #3670ff"
cursor: pointer;
color: #3670ff;
"
title="被害人信息提取" title="被害人信息提取"
></i> ></i>
<i <i
...@@ -415,10 +406,7 @@ ...@@ -415,10 +406,7 @@
slot="suffix" slot="suffix"
class="el-input__icon" class="el-input__icon"
:class="item4.icon" :class="item4.icon"
style=" style="cursor: pointer; color: #3670ff"
cursor: pointer;
color: #3670ff;
"
title="犯罪嫌疑人信息提取" title="犯罪嫌疑人信息提取"
></i> ></i>
</el-input> </el-input>
...@@ -487,9 +475,7 @@ ...@@ -487,9 +475,7 @@
<!--字典弹框懒加载 @emitValue="getLbValue"--> <!--字典弹框懒加载 @emitValue="getLbValue"-->
<div <div
class="zdyInputW" class="zdyInputW"
v-else-if=" v-else-if="item4.type == 'lazyCodeTreeDialog'"
item4.type == 'lazyCodeTreeDialog'
"
> >
<lazy-select-tree-dialog <lazy-select-tree-dialog
:placeholder="'请选择' + item4.name" :placeholder="'请选择' + item4.name"
...@@ -499,6 +485,31 @@ ...@@ -499,6 +485,31 @@
:currentItem="item4" :currentItem="item4"
/> />
</div> </div>
<!--字典框 @emitValue="getLbValue"-->
<div
class="zdyInputW"
v-else-if="item4.type == 'code'"
>
<select-tree
v-model="reakData[item4.id]"
:placeholder="'请选择' + item4.name"
:options="item4.codeOptions"
:sendId="item4.id"
/>
</div>
<!--字典弹框 @emitValue="getLbValue"-->
<div
class="zdyInputW"
v-else-if="item4.type == 'codeTree'"
>
<select-tree-dialog
:placeholder="'请选择' + item4.name"
:sendId="item4.id"
:formData="reakData"
:currentItem="item4"
v-model="reakData[item4.id]"
/>
</div>
<div <div
class="zdyInputW" class="zdyInputW"
v-else-if="item4.type == 'checkboxBotton'" v-else-if="item4.type == 'checkboxBotton'"
...@@ -548,7 +559,6 @@ ...@@ -548,7 +559,6 @@
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
@change="dateChange(reakData[item4.id])"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
v-else-if="item4.type == 'datearea'" v-else-if="item4.type == 'datearea'"
> >
...@@ -569,7 +579,6 @@ ...@@ -569,7 +579,6 @@
action="#" action="#"
ref="uploadFile" ref="uploadFile"
:accept="item4.acceptType" :accept="item4.acceptType"
:auto-upload="false"
:before-upload=" :before-upload="
normalPictureBeforeAvatarUpload normalPictureBeforeAvatarUpload
" "
...@@ -603,6 +612,7 @@ ...@@ -603,6 +612,7 @@
realIndex realIndex
) )
" "
:auto-upload="false"
:http-request="httpRequest" :http-request="httpRequest"
:on-preview=" :on-preview="
(flie, fileList) => (flie, fileList) =>
...@@ -617,9 +627,7 @@ ...@@ -617,9 +627,7 @@
:file-list=" :file-list="
fileLists[item2.id] && fileLists[item2.id] &&
fileLists[item2.id][realIndex] fileLists[item2.id][realIndex]
? fileLists[item2.id][realIndex][ ? fileLists[item2.id][realIndex][item4.id]
item4.id
]
: [] : []
" "
v-model="reakData[item4.id + '1']" v-model="reakData[item4.id + '1']"
...@@ -693,7 +701,6 @@ ...@@ -693,7 +701,6 @@
class="avatar2" class="avatar2"
/> />
</div> </div>
<el-upload <el-upload
v-else v-else
class="avatar-uploader" class="avatar-uploader"
...@@ -718,9 +725,7 @@ ...@@ -718,9 +725,7 @@
> >
<div slot="file" slot-scope="{ file }"> <div slot="file" slot-scope="{ file }">
<img <img
class=" class="el-upload-list__item-thumbnail"
el-upload-list__item-thumbnail
"
:src="file.url" :src="file.url"
alt="" alt=""
/> />
...@@ -728,17 +733,13 @@ ...@@ -728,17 +733,13 @@
<img <img
v-if="reakData.src" v-if="reakData.src"
:src=" :src="
'data:image/gif;base64,' + 'data:image/gif;base64,' + reakData.src
reakData.src
" "
class="avatar" class="avatar"
/> />
<i <i
v-else v-else
class=" class="el-icon-plus avatar-uploader-icon"
el-icon-plus
avatar-uploader-icon
"
></i> ></i>
</el-upload> </el-upload>
</div> </div>
...@@ -763,9 +764,7 @@ ...@@ -763,9 +764,7 @@
> >
<div <div
class="shadow" class="shadow"
@click=" @click="deleteZp('fzxyr', realIndex, 1)"
deleteZp('fzxyr', realIndex, 1)
"
></div> ></div>
<img <img
:src=" :src="
...@@ -841,9 +840,7 @@ ...@@ -841,9 +840,7 @@
> >
<div <div
class="shadow" class="shadow"
@click=" @click="deleteZp('fzxyr', realIndex, 2)"
deleteZp('fzxyr', realIndex, 2)
"
></div> ></div>
<img <img
:src=" :src="
...@@ -919,9 +916,7 @@ ...@@ -919,9 +916,7 @@
> >
<div <div
class="shadow" class="shadow"
@click=" @click="deleteZp('fzxyr', realIndex, 3)"
deleteZp('fzxyr', realIndex, 3)
"
></div> ></div>
<img <img
:src=" :src="
...@@ -990,29 +985,7 @@ ...@@ -990,29 +985,7 @@
</span> </span>
</div> </div>
</div> </div>
</div> <div class="addChildBtn">
</div>
<div v-else style="position: absolute; top: -25px">
<span class="addName"
>{{
item2.name.substring(0, item2.name.length - 1)
}}:</span
>
<span style="display: inline-block">
<i
class="iconfont icontiqu"
style="
cursor: pointer;
font-size: 20px;
position: absolute;
top: 34px;
right: -25px;
"
title="提取"
></i>
</span>
</div>
<div class="addChildBtn" v-show="item2.noshowMoreBtn">
<el-button type="primary" @click="handelFrom(item2)"> <el-button type="primary" @click="handelFrom(item2)">
<i class="el-icon-plus"></i><span>添加</span> <i class="el-icon-plus"></i><span>添加</span>
</el-button> </el-button>
...@@ -1062,6 +1035,7 @@ export default { ...@@ -1062,6 +1035,7 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
propTitle: String,
}, },
data() { data() {
return { return {
...@@ -1188,14 +1162,8 @@ export default { ...@@ -1188,14 +1162,8 @@ export default {
//1.1二级字典处理 //1.1二级字典处理
if (item.type == "lazyCodeTree" || item.type == "codeTree") { if (item.type == "lazyCodeTree" || item.type == "codeTree") {
if (item.multiple) { if (item.multiple) {
// self.formLabelAlign[item.id].forEach((subitmes) => { let str = `#${self.formLabelAlign[item.id].join("#")}`;
// params.append(objStr + item.id, subitmes); params.append(objStr + item.id, str);
// });
let str = `#${self.formLabelAlign[item.id].join('#')}`
params.append(
objStr + item.id,
str
);
} else { } else {
params.append( params.append(
objStr + item.id, objStr + item.id,
...@@ -1212,11 +1180,8 @@ export default { ...@@ -1212,11 +1180,8 @@ export default {
} }
} else if (item.type == "setValue") { } else if (item.type == "setValue") {
if (item.multiple) { if (item.multiple) {
let str = `#${self.formLabelAlign[item.id].join('#')}` let str = `#${self.formLabelAlign[item.id].join("#")}`;
params.append( params.append(objStr + item.id, str);
objStr + item.id,
str
);
} else { } else {
if (item.id == "jsrXm") { if (item.id == "jsrXm") {
let arr = item.codeOptions.filter( let arr = item.codeOptions.filter(
...@@ -1420,8 +1385,9 @@ export default { ...@@ -1420,8 +1385,9 @@ export default {
} }
//2.有childrenAsAdd表单数据处理 //2.有childrenAsAdd表单数据处理
if (item.childrenAsAdd) { if (item.childrenAsAdd) {
debugger
item.childrenAsAdd.forEach((subItem) => { item.childrenAsAdd.forEach((subItem) => {
if (subItem.flag == self.formLabelAlign[item.id]) { debugger
//如果遍历到的编号和所选择的编号一致 //如果遍历到的编号和所选择的编号一致
self.formLabelAlign[subItem.id].forEach((val5, index) => { self.formLabelAlign[subItem.id].forEach((val5, index) => {
//遍历每一个数组的值 //遍历每一个数组的值
...@@ -1493,7 +1459,6 @@ export default { ...@@ -1493,7 +1459,6 @@ export default {
} }
} }
}); });
}
}); });
} }
}); });
...@@ -1552,6 +1517,50 @@ export default { ...@@ -1552,6 +1517,50 @@ export default {
debugger; debugger;
}, },
httpRequest() {}, httpRequest() {},
//新增表单数据
handelFrom(obj) {
let self = this,
addObj;
if (obj.flag2) {
obj.flag2 = false;
} else {
self.propFormField.forEach((groupItem) => {
groupItem.data.forEach((val) => {
if (val.childrenAsAdd) {
val.childrenAsAdd.forEach((val2, index2) => {
//遍历list数组
if (val2 == obj) {
//通过比较两个对象是否相等 将formLabelAlign里绑定的数据复制了一份
addObj = JSON.parse(
JSON.stringify(self.formLabelAlign[val2.id][0])
);
//实现深拷贝赋值
for (var val3 in addObj) {
addObj[val3] = "";
}
self.$set(
self.formLabelAlign[val2.id],
self.formLabelAlign[val2.id].length,
addObj
);
for (var f = 0; f < val2.list[0].name.length; f++) {
if (val2.list[0].name[f].type == "file") {
self.fileLists[val2.id][
self.formLabelAlign[val2.id].length - 1
] = {};
self.fileLists[val2.id][
self.formLabelAlign[val2.id].length - 1
][val2.list[0].name[f].id] == [];
}
}
this.$message.success("新增成功");
}
});
}
});
});
}
},
}, },
mounted() { mounted() {
var self = this; var self = this;
...@@ -1629,6 +1638,17 @@ $-header-fontSize: 18px; ...@@ -1629,6 +1638,17 @@ $-header-fontSize: 18px;
} }
#formCommonPage { #formCommonPage {
width: 100% !important; width: 100% !important;
.subTitle {
div {
font-size: 14px;
font-family: Source Han Sans CN;
font-weight: 600;
line-height: 48px;
height: 48px;
color: #363636;
opacity: 1;
}
}
.sjjcShadow { .sjjcShadow {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
...@@ -1680,7 +1700,7 @@ $-header-fontSize: 18px; ...@@ -1680,7 +1700,7 @@ $-header-fontSize: 18px;
background: #fdfdfd !important; background: #fdfdfd !important;
} }
/deep/.el-input__inner { /deep/.el-input__inner {
height: 29px; height: 32px;
} }
/deep/.el-checkbox-button, /deep/.el-checkbox-button,
/deep/.el-checkbox-button__inner { /deep/.el-checkbox-button__inner {
...@@ -1711,7 +1731,6 @@ $-header-fontSize: 18px; ...@@ -1711,7 +1731,6 @@ $-header-fontSize: 18px;
height: 48px; height: 48px;
font-size: 16px; font-size: 16px;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
border-bottom: 1px solid #e4e4e4;
font-weight: bold; font-weight: bold;
line-height: 48px; line-height: 48px;
color: #363636; color: #363636;
...@@ -1724,9 +1743,13 @@ $-header-fontSize: 18px; ...@@ -1724,9 +1743,13 @@ $-header-fontSize: 18px;
//分块组级卡片 //分块组级卡片
.paneGroupDiv { .paneGroupDiv {
background: #ffffff; background: #ffffff;
padding: 0 40px;
padding-bottom: 20px;
// 表单元素的真实容器 // 表单元素的真实容器
.zdyLine { .zdyLine {
padding: 0px 20px 20px 20px; padding-bottom: 20px;
border-bottom: 1px solid #e4e4e4;
/deep/.el-form-item { /deep/.el-form-item {
margin-bottom: 0px !important; margin-bottom: 0px !important;
.el-form-item__label { .el-form-item__label {
...@@ -1747,7 +1770,7 @@ $-header-fontSize: 18px; ...@@ -1747,7 +1770,7 @@ $-header-fontSize: 18px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.el-input__inner { .el-input__inner {
border-radius: 2px; border-radius: 4px;
} }
.codeTree { .codeTree {
.el-select { .el-select {
......
...@@ -422,9 +422,13 @@ ...@@ -422,9 +422,13 @@
</div> </div>
<div <div
v-else-if=" v-else-if="
((pageBs != 'rwbd' && pageBs != 'rwbdjs') && (columnTitle.prop == 'xxzjbh' || columnTitle.prop == 'asjbh' || columnTitle.prop == 'xm' )) || (pageBs != 'rwbd' &&
((pageBs == 'rwbd' || pageBs == 'rwbdjs') && columnTitle.prop == 'rwmc') pageBs != 'rwbdjs' &&
(columnTitle.prop == 'xxzjbh' ||
columnTitle.prop == 'asjbh' ||
columnTitle.prop == 'xm')) ||
((pageBs == 'rwbd' || pageBs == 'rwbdjs') &&
columnTitle.prop == 'rwmc')
" "
> >
<!-- 暂时修改成这样 --> <!-- 暂时修改成这样 -->
...@@ -474,6 +478,22 @@ ...@@ -474,6 +478,22 @@
}} }}
</el-tag> </el-tag>
</div> </div>
<div
v-else-if="columnTitle.prop == 'zjhm'"
style="font-size: 13px !important"
>
<span
style="border: 1px solid rgb(64, 158, 255); padding: 0px 4px"
>{{
columnTitle["gradeLev"] == 10
? "一般"
: columnTitle["gradeLev"] == 20
? "危险"
: "高危"
}}</span
>
{{ scope.row[columnTitle.prop] }}
</div>
<div v-else v-html="scope.row[columnTitle.prop]"> <div v-else v-html="scope.row[columnTitle.prop]">
{{ columnTitle.prop }} {{ columnTitle.prop }}
</div> </div>
...@@ -500,7 +520,12 @@ ...@@ -500,7 +520,12 @@
class="edit" class="edit"
style="margin-right: 16px" style="margin-right: 16px"
v-if=" v-if="
!(pageBs == 'rySp' || pageBs == 'yhkxsGl' || pageBs == 'rwbd'|| pageBs == 'rwbdjs') !(
pageBs == 'rySp' ||
pageBs == 'yhkxsGl' ||
pageBs == 'rwbd' ||
pageBs == 'rwbdjs'
)
" "
>修改</span >修改</span
> >
......
...@@ -18,6 +18,7 @@ import zdryRoutes from "./modules/zdry"; ...@@ -18,6 +18,7 @@ import zdryRoutes from "./modules/zdry";
import rlqbxsRoutes from "./modules/rlqbxs"; import rlqbxsRoutes from "./modules/rlqbxs";
import xsjsdbRoutes from "./modules/xsjsdb"; import xsjsdbRoutes from "./modules/xsjsdb";
import zjclRoutes from "./modules/zjcl"; import zjclRoutes from "./modules/zjcl";
import userAuthRoutes from "./modules/userAuth";
const originalPush = VueRouter.prototype.push; const originalPush = VueRouter.prototype.push;
...@@ -49,6 +50,7 @@ const mainRouters = [ ...@@ -49,6 +50,7 @@ const mainRouters = [
rlqbxsRoutes, rlqbxsRoutes,
xsjsdbRoutes, xsjsdbRoutes,
zjclRoutes, zjclRoutes,
userAuthRoutes,
{ {
path: "*", path: "*",
name: "error", name: "error",
......
import menuLayout from "@/layout/menuLayout.vue";
const menuLayouts = [
{
path: "/queryUser",
name: "queryUser",
meta: {
isAdd: true,
title: '用户管理'
},
component: () => import("@/views/userAuth/queryUser.vue")
}
];
export default {
path: "/right",
component: menuLayout,
children: [...menuLayouts]
};
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
:formField="formField" :formField="formField"
:formLabelAligns="formLabelAlign" :formLabelAligns="formLabelAlign"
@submit="submit" @submit="submit"
:propTitle="title"
> >
</form-compontent> </form-compontent>
</div> </div>
...@@ -20,16 +21,43 @@ export default { ...@@ -20,16 +21,43 @@ export default {
}, },
data() { data() {
return { return {
title: "可疑线索管理",
formField: [ formField: [
//基本信息 //基本信息
{ {
title: "可疑线索管理", title: "可疑线索",
id: 1, id: 1,
objStr: "", objStr: "",
index: 0, index: 0,
data: kysscj, data: kysscj,
}, },
{ {
title: "可疑线索0000",
id: 10,
objStr: "",
index: 20,
data: [
{
name: "测试:",
col: "1",
noshowMoreBtn: false, //是否显示添加按钮
childrenAsAdd: [
{
name: "测试:",
id: "test",
flag: true,
list: [
{
name: kysscj,
},
],
iconClass: "el-icon-close",
},
],
},
],
},
{
title: "线索提供者", title: "线索提供者",
id: 2, id: 2,
objStr: "", objStr: "",
......
<template>
<div class="Content">
<right-content
:pageBs="pageBs"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
@add="add"
></right-content>
</div>
</template>
<script>
import rightContent from "@c/ptCxForm_components.vue";
export default {
name: "jdcxsGl",
components: {
rightContent
},
data() {
return {
header: "用户管理",
pageBs: "queryUser",
cxFormData: {
username: "",
limit: 10,
page: 1,
policemanid:""
},
cxQueryField: [
{
name: "用户名",
id: "username",
type: "text",
value: "",
placeholder: "",
col: "3",
},
{
name: "警号",
id: "policemanid",
type: "text",
value: "",
placeholder: "",
col: "3",
},
],
cxDefaultFormThead: [
{
label: "登录名",
prop: "username",
},
{
label: "用户姓名",
prop: "trueName",
},
{
label: "用户单位",
prop: "unitname"
},
{
label: "警号",
prop: "policemanid",
},
{
label: "用户状态",
prop: "openFlag",
},
],
cxUrl: "/sysuser/selectUserNewList",
Menu: [
{
id: "queryUser",
label: "用户管理",
index: "queryUser",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
],
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
// debugger
},
methods: {
add() {
this.$router.pushToTab("addJdcxs");
},
},
};
</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>
...@@ -181,6 +181,7 @@ export default { ...@@ -181,6 +181,7 @@ export default {
{ {
label: "身份证号", label: "身份证号",
prop: "zjhm", prop: "zjhm",
width: '230px'
}, },
{ {
label: "作案年龄", label: "作案年龄",
......
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