-
-
+
+
-
- {{ $t('query') }}
+
+
+
- {{ $t('add') }}
+ {{ $t('query') }}
- {{ $t('deleteBatch') }}
+ {{ $t('export') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
- {{ $t('update') }}
- {{ $t('delete') }}
+ 详情
@@ -67,13 +62,66 @@ export default {
data () {
return {
mixinViewModuleOptions: {
- getDataListURL: '/kpi/kpiresultgrid/page',
+ getDataListURL: '/kpi/gridResult/page',
getDataListIsPage: true,
- deleteURL: '/kpi/kpiresultgrid',
- deleteIsBatch: true
+ deleteURL: '/kpi/gridResult',
+ deleteIsBatch: true,
+ exportURL: '/kpi/gridResult/export'
},
dataForm: {
- id: ''
+ id: '',
+ gridId: '',
+ scoreStartDate: ''
+ },
+ // 所属机构配置
+ deptIdList: [],
+ options: [],
+ streetList: [],
+ communityList: [],
+ gridList: []
+ }
+ },
+ created () {
+ this.$http
+ .get(`/sys/user/deptOptions/getByLoginUser`)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.options = res.data.options
+ })
+ .catch(() => {})
+ },
+ methods: {
+ detailQuery (id) {
+ this.addOrUpdateVisible = true
+ this.$nextTick(() => {
+ this.$refs.addOrUpdate.dataForm.id = id
+ this.$refs.addOrUpdate.init()
+ })
+ }
+ },
+ watch: {
+ 'deptIdList': function (val) {
+ if (val.length === 0) {
+ this.dataForm.streetId = ''
+ this.dataForm.communityId = ''
+ this.dataForm.gridId = ''
+ }
+ if (val.length === 1) {
+ this.dataForm.streetId = this.deptIdList[0]
+ this.dataForm.communityId = ''
+ this.dataForm.gridId = ''
+ }
+ if (val.length === 2) {
+ this.dataForm.streetId = this.deptIdList[0]
+ this.dataForm.communityId = this.deptIdList[1]
+ this.dataForm.gridId = ''
+ }
+ if (val.length === 3) {
+ this.dataForm.streetId = this.deptIdList[0]
+ this.dataForm.communityId = this.deptIdList[1]
+ this.dataForm.gridId = this.deptIdList[2]
}
}
},