diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js
index 98c68df2..5994243e 100644
--- a/src/i18n/zh-CN.js
+++ b/src/i18n/zh-CN.js
@@ -14,6 +14,7 @@ t.query = '查询'
t.export = '导出'
t.handle = '操作'
t.confirm = '确定'
+t.import = '导入'
t.cancel = '取消'
t.logout = '退出'
diff --git a/src/views/modules/user/partymembers-add-or-update.vue b/src/views/modules/user/partymembers-add-or-update.vue
index 017de84b..0788c694 100755
--- a/src/views/modules/user/partymembers-add-or-update.vue
+++ b/src/views/modules/user/partymembers-add-or-update.vue
@@ -10,47 +10,37 @@
-
-
+
+
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
-
-
+
+
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
-
-
+
+
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+ {{item.tagName}}
@@ -89,17 +74,25 @@ export default {
realName: '',
mobile: '',
identityNo: '',
- post: '',
cadreFlag: '',
+ streetId: '',
streetName: '',
+ communityId: '',
communityName: '',
- gridName: ''
+ gridId: '',
+ gridName: '',
+ tagIds: []
},
streetOptions: [],
communityOptions: [],
gridOptions: [],
- postOptions: [],
- cadreOptions: [],
+ cadreOptions: [{
+ cadreFlag: '1',
+ cadreTitle: '是'
+ }, {
+ cadreFlag: '0',
+ cadreTitle: '否'
+ }],
tagOptions: []
}
},
@@ -114,12 +107,29 @@ export default {
],
identityNo: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
+ ],
+ streetId: [
+ { required: true, message: this.$t('validate.required'), trigger: 'blur' }
+ ],
+ communityId: [
+ { required: true, message: this.$t('validate.required'), trigger: 'blur' }
+ ],
+ gridId: [
+ { required: true, message: this.$t('validate.required'), trigger: 'blur' }
+ ],
+ cadreFlag: [
+ { required: true, message: this.$t('validate.required'), trigger: 'blur' }
+ ],
+ tagIds: [
+ { required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
+ this.getStreetList()
+ this.getTagOptions()
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
@@ -128,6 +138,50 @@ export default {
}
})
},
+ getTagOptions () {
+ this.$http.get(`/app-user/usertag/list`).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.tagOptions = res.data
+ console.log(this.tagOptions)
+ }).catch(() => {})
+ },
+ getStreetList () {
+ this.$http.get(`/sys/dept/sublist/0`).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.streetOptions = res.data
+ }).catch(() => {})
+ },
+ getCommunityList () {
+ let choosenItem = this.streetOptions.filter(item => item.id === this.dataForm.streetId)[0]
+ this.dataForm.streetName = choosenItem.name
+ this.dataForm.communityId = ''
+ this.dataForm.gridId = ''
+ this.$http.get(`/sys/dept/sublist/` + this.dataForm.streetId).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.communityOptions = res.data
+ }).catch(() => {})
+ },
+ getGridList () {
+ let choosenItem = this.communityOptions.filter(item => item.id === this.dataForm.communityId)[0]
+ this.dataForm.communityName = choosenItem.name
+ this.dataForm.gridId = ''
+ this.$http.get(`/sys/dept/sublist/` + this.dataForm.communityId).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.gridOptions = res.data
+ }).catch(() => {})
+ },
+ evaluation () {
+ let choosenItem = this.gridOptions.filter(item => item.id === this.dataForm.gridId)[0]
+ this.dataForm.gridName = choosenItem.name
+ },
// 获取信息
getInfo () {
this.$http.get(`/app-user/partymembers/${this.dataForm.id}`).then(({ data: res }) => {
@@ -138,6 +192,18 @@ export default {
...this.dataForm,
...res.data
}
+ this.$http.get(`/sys/dept/sublist/` + this.dataForm.streetId).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.communityOptions = res.data
+ }).catch(() => {})
+ this.$http.get(`/sys/dept/sublist/` + this.dataForm.communityId).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.gridOptions = res.data
+ }).catch(() => {})
}).catch(() => {})
},
// 表单提交
diff --git a/src/views/modules/user/partymembers.vue b/src/views/modules/user/partymembers.vue
index 3566aa3f..d00adf1f 100755
--- a/src/views/modules/user/partymembers.vue
+++ b/src/views/modules/user/partymembers.vue
@@ -36,9 +36,9 @@
+ :key="item.dictValue"
+ :label="item.dictName"
+ :value="item.dictValue">
@@ -56,20 +56,22 @@
+ :key="item.dictValue"
+ :label="item.dictName"
+ :value="item.dictValue">
+ end-placeholder="结束日期"
+ value-format="yyyy-MM-dd"
+ :default-time="['00:00:00', '23:59:59']"
+ @change="selectedTime">
@@ -96,7 +98,7 @@
-
+
@@ -147,13 +149,15 @@ export default {
gridId: '',
registFlag: '',
postId: '',
- timeRange: ''
+ startTime: '',
+ endTime: ''
},
streetOptions: [],
communityOptions: [],
gridOptions: [],
registOptions: [],
- postOptions: []
+ postOptions: [],
+ timeRange: []
}
},
components: {
@@ -161,8 +165,14 @@ export default {
},
created: function () {
this.getStreetList()
+ this.getRegistOptions()
+ this.getPostOptions()
},
methods: {
+ selectedTime () {
+ this.dataForm.startTime = this.timeRange[0]
+ this.dataForm.endTime = this.timeRange[1]
+ },
getStreetList () {
this.$http.get(`/sys/dept/sublist/0`).then(({ data: res }) => {
if (res.code !== 0) {
@@ -190,11 +200,28 @@ export default {
this.gridOptions = res.data
}).catch(() => {})
},
+ getRegistOptions () {
+ this.$http.get(`/sys/dict/sublist/1168769645576179713`).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.registOptions = res.data
+ }).catch(() => {})
+ },
+ getPostOptions () {
+ this.$http.get(`/sys/dict/sublist/1168770417290366977`).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.postOptions = res.data
+ }).catch(() => {})
+ },
formatCadre: function (row, column) {
- return row.cadreFlag === 1 ? '是' : row.cadreFlag === 0 ? '否' : '未知'
+ return row.cadreFlag === '1' ? '是' : row.cadreFlag === '0' ? '否' : '未知'
},
formatRegist: function (row, column) {
- return row.registFlag === 1 ? '是' : row.registFlag === 0 ? '否' : '未知'
+ console.log(row.registFlag)
+ return row.registFlag === '1' ? '是' : row.registFlag === '0' ? '否' : '未知'
},
importData () {
},