diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue
index 422df400c..e7d9257b8 100644
--- a/src/views/modules/communityParty/elegant/index.vue
+++ b/src/views/modules/communityParty/elegant/index.vue
@@ -13,15 +13,26 @@
+
+
+
+
+
+
-
+
+
@@ -139,6 +150,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -215,6 +246,8 @@ export default {
value: '',
optionsEditG: [],
optionsG: [],
+ optionsC: [],
+ optionsEditC: [],
options: [
{
label: '是',
@@ -238,6 +271,12 @@ export default {
columnName: 'gridName',
width: '300',
options: []
+ }, {
+ label: '分类类别',
+ align: 'center',
+ columnName: 'categoryName',
+ width: '200',
+ options: []
}, {
label: '主要事迹',
columnName: 'mainDeed',
@@ -249,6 +288,7 @@ export default {
customerId: '',
searchForm: {
gridId: '',
+ categoryId: '',
mainDeed: '',
name: ''
},
@@ -256,11 +296,13 @@ export default {
agencyId: '',
gridId: '',
name: '',
+ categoryId: '',
mainDeed: '',
imageList: []
},
rules: {
gridId: [{ required: true, message: '网格不能为空', trigger: 'blur' }],
+ categoryId: [{ required: true, message: '分类类别不能为空', trigger: 'blur' }],
name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
mainDeed: [{ required: true, message: '主要事迹不能为空', trigger: 'blur' }],
}
@@ -272,6 +314,8 @@ export default {
this.getTableData()
this.getGridList('query')
this.getGridList('addorupdate')
+ this.getCateList('query')
+ this.getCateList('addorupdate')
}, 200)
this.pageLoading = true
},
@@ -439,6 +483,7 @@ export default {
this.handleSearch()
},
handleAdd() {
+
this.dialogVisible = true
},
@@ -527,6 +572,12 @@ export default {
return this.$message.error(res.msg)
} else {
this.form = { ...res.data }
+ const _arr = this.optionsEditC.map(item => item.categoryId)
+
+ if (!_arr.includes(res.data.categoryId) && !this.disabled) this.form.categoryId = ''
+ // this.optionsEditC.forEach(item => {
+ // if (item.categoryId === res.data.categoryId)
+ // })
this.dialogVisible = true
}
})
@@ -555,6 +606,30 @@ export default {
return this.$message.error('网络错误')
})
},
+ async getCateList(type) {
+ const { user } = await this.$store.state
+ console.log('user---ppp', user)
+ const params = {
+ customerId: this.customerId,
+ type
+ }
+ // addorupdate query
+ await this.$http
+ .post('/resi/partymember/stylecategorydict/select-list', params)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ } else {
+ console.log('获取查询详情成功', res.data)
+
+ if (type === 'query') this.optionsC = res.data
+ else this.optionsEditC = res.data
+ }
+ })
+ .catch(() => {
+ return this.$message.error('网络错误')
+ })
+ },
async getTableData() {
this.tableLoading = true
const { user } = await this.$store.state