diff --git a/src/views/modules/user/tag-property.vue b/src/views/modules/user/tag-property.vue index 7a26f1c..72cc41e 100644 --- a/src/views/modules/user/tag-property.vue +++ b/src/views/modules/user/tag-property.vue @@ -9,8 +9,8 @@
- - + + @@ -41,9 +41,8 @@ export default { }, visible: false, dataForm: { - id: '', tagid: '', - tagPropertyid: '' + tagPropertyids: [] }, paramNameArr: [], isAble: false @@ -51,18 +50,15 @@ export default { }, methods: { // 获取数据列表 - init (tagId, propertyId, relationId) { + init (tagId, propertyIds) { this.visible = true this.isAble = false this.$nextTick(() => { // 调用获取标签属性下拉信息接口 this.getParamListInfo() this.dataForm.tagid = tagId - if (propertyId !== '' || propertyId !== null) { - this.dataForm.tagPropertyid = propertyId - } - if (relationId !== '' || relationId !== null) { - this.dataForm.id = relationId + if (propertyIds !== null) { + this.dataForm.tagPropertyids = propertyIds } }) }, @@ -77,7 +73,7 @@ export default { }, // 表单提交 dataFormSubmitHandle: debounce(function () { - if (this.dataForm.tagPropertyid === '' || this.dataForm.tagPropertyid === null) { + if (this.dataForm.tagPropertyids === null || this.dataForm.tagPropertyids.length === 0) { this.$message({ message: '请选择标签属性!', type: 'warning' @@ -85,7 +81,7 @@ export default { return false } this.isAble = true - this.$http[!this.dataForm.id ? 'post' : 'put']('/app-user/tagproperty/', this.dataForm).then(({ data: res }) => { + this.$http['post']('/app-user/tagproperty/', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { this.isAble = false return this.$message.error(res.msg) diff --git a/src/views/modules/user/user-tag1.vue b/src/views/modules/user/user-tag1.vue index f671703..85d18fc 100644 --- a/src/views/modules/user/user-tag1.vue +++ b/src/views/modules/user/user-tag1.vue @@ -75,7 +75,7 @@ export default { partyFlagOptions: [{ id: '0', name: '不是' }, { id: '1', name: '是' }], cadreOptions: [{ cadreFlag: '1', cadreTitle: '是' }, { cadreFlag: '0', cadreTitle: '否' }], tagOptions: [], - userGridList: [], + userGridList: [] } }, computed: { diff --git a/src/views/modules/user/usertag.vue b/src/views/modules/user/usertag.vue index b49e432..4bf429e 100644 --- a/src/views/modules/user/usertag.vue +++ b/src/views/modules/user/usertag.vue @@ -24,10 +24,9 @@ - @@ -45,7 +44,7 @@ - +
@@ -75,24 +74,11 @@ export default { MasterUser }, methods: { - addProperty (id, propertyId, relationId) { + addProperty (id, propertyIds) { this.masterUserVisible = true this.$nextTick(() => { - this.$refs.masterUser.init(id, propertyId, relationId) + this.$refs.masterUser.init(id, propertyIds) }) - }, - // dialog回调函数 - connectResponse (connectResponse) { - for (var i = 0; i < connectResponse.length; i++) { - let item = connectResponse[i] - let nickname = item.username - this.$set(item, 'nickName', nickname) - } - if (connectResponse.length === 1) { - this.formData.splice(this.updateIndex, 1, connectResponse[0]) - } else { - this.formData = connectResponse - } } } }