26805
This commit is contained in:
59
packages/2.0.5/AppGridMember/components/add.vue
vendored
59
packages/2.0.5/AppGridMember/components/add.vue
vendored
@@ -34,6 +34,7 @@
|
||||
<el-date-picker
|
||||
v-model="forms.selectionDate"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="medium"
|
||||
placeholder="选择日期">
|
||||
@@ -56,6 +57,7 @@
|
||||
<el-date-picker
|
||||
v-model="forms.birthday"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="medium"
|
||||
placeholder="选择日期">
|
||||
@@ -67,7 +69,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<el-form-item label="性别" prop="sex" >
|
||||
<el-select size="medium" v-model="forms.sex" placeholder="请选择..." clearable>
|
||||
<el-select size="medium" style="width: 100%" v-model="forms.sex" placeholder="请选择..." clearable>
|
||||
<el-option
|
||||
v-for="(item,i) in dict.getDict('sex')"
|
||||
:key="i"
|
||||
@@ -147,7 +149,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="政治面貌" prop="politicsStatus" >
|
||||
<el-select v-model="forms.politicsStatus" size="medium" placeholder="请选择..." clearable>
|
||||
<el-select v-model="forms.politicsStatus" size="medium" style="width: 100%" placeholder="请选择..." clearable>
|
||||
<el-option v-for="(item,i) in dict.getDict('politicsStatus')" :key="i" :label="item.dictName" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -159,7 +161,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学历" prop="education" >
|
||||
<el-select v-model="forms.education" size="medium" placeholder="请选择..." clearable>
|
||||
<el-select v-model="forms.education" style="width: 100%" size="medium" placeholder="请选择..." clearable>
|
||||
<el-option v-for="(item,i) in dict.getDict('education')" :key="i" :label="item.dictName" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -388,36 +390,43 @@ export default {
|
||||
this.$refs["rules"].validate((valid) => {
|
||||
if (valid) {
|
||||
for (let i = 0; i < this.forms.girdInfoList.length; i++) {
|
||||
if (!this.forms.girdInfoList[i].checkType) {
|
||||
const currInfo = this.forms.girdInfoList[i]
|
||||
const arr = JSON.parse(JSON.stringify(this.forms.girdInfoList))
|
||||
arr.splice(i, 1)
|
||||
const sameInfo = arr.filter(v => v.id === currInfo.id)
|
||||
if (!currInfo.checkType) {
|
||||
return this.$message.error('请选择网格员类型')
|
||||
}
|
||||
if (!this.forms.girdInfoList[i].id) {
|
||||
|
||||
if (!currInfo.id) {
|
||||
return this.$message.error('请选择网格')
|
||||
}
|
||||
|
||||
if (currInfo.checkType === '1' && currInfo.girdLevel !== '2') {
|
||||
return this.$message.error(`一级、二级网格不能添加网格员`)
|
||||
}
|
||||
|
||||
if (sameInfo.length) {
|
||||
return this.$message.error('不能选择同一网格')
|
||||
}
|
||||
}
|
||||
|
||||
this.instance
|
||||
.post(
|
||||
`/app/appgirdmemberinfo/addOrUpdate`,
|
||||
{
|
||||
...this.forms,
|
||||
girdInfoListStr: this.forms.girdInfoList.map(v => v.girdName).join(',')
|
||||
},
|
||||
null
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (this.title == "添加网格员") {
|
||||
this.cancel(true)
|
||||
} else {
|
||||
this.editOne = false;
|
||||
this.editTwo = false;
|
||||
this.searchDetail();
|
||||
}
|
||||
this.instance.post(`/app/appgirdmemberinfo/addOrUpdate`,{
|
||||
...this.forms,
|
||||
girdInfoListStr: this.forms.girdInfoList.map(v => v.girdName).join(',')
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (this.title == "添加网格员") {
|
||||
this.cancel(true)
|
||||
} else {
|
||||
this.editOne = false
|
||||
this.editTwo = false
|
||||
this.searchDetail()
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<ai-list class="notice">
|
||||
<template slot="title">
|
||||
<ai-title title="风险配置" isShowBottomBorder></ai-title>
|
||||
<ai-title title="风险区域配置" isShowBottomBorder></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
|
||||
Reference in New Issue
Block a user