Browse Source

九小场所调整

shibei_master
jiangyy 3 years ago
parent
commit
baacfe68da
  1. 20
      src/views/modules/communityService/ninePlaces/places/places.vue
  2. 28
      src/views/modules/communityService/ninePlaces/places/placesForm.vue

20
src/views/modules/communityService/ninePlaces/places/places.vue

@ -148,12 +148,16 @@
class="operate"> class="operate">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="agencyId===scope.row.agencyId" type="text"
class="div-table-button--edit" class="div-table-button--edit"
size="small" size="small"
@click="handleEdit(scope.row)">修改</el-button> @click="handleEdit(scope.row)">修改</el-button>
<el-button type="text" <el-button v-if="agencyId===scope.row.agencyId" type="text"
class="div-table-button--delete" class="div-table-button--delete"
size="small" size="small"
@click="handleDelete(scope.row)">删除</el-button> @click="handleDelete(scope.row)">删除</el-button>
@ -182,7 +186,7 @@
class="dialog-h" class="dialog-h"
@closed="diaClose"> @closed="diaClose">
<places-form ref="ref_form" <places-form ref="ref_form"
:gridList="gridList" :agencyId="agencyId"
:scaleList="scaleList" :scaleList="scaleList"
:placeTypeList="placeTypeList" :placeTypeList="placeTypeList"
@dialogCancle="addFormCancle" @dialogCancle="addFormCancle"
@ -262,7 +266,8 @@ export default {
const url = "/gov/org/customergrid/gridoption" const url = "/gov/org/customergrid/gridoption"
let params = { let params = {
agencyId: this.agencyId agencyId: this.agencyId,
purpose:"query"
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
@ -366,6 +371,13 @@ export default {
this.$refs.ref_form.initForm('edit', row.placeOrgId) this.$refs.ref_form.initForm('edit', row.placeOrgId)
}) })
}, },
handleDetail (row) {
this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.placeOrgId)
})
},
addFormCancle () { addFormCancle () {
this.formShow = false this.formShow = false

28
src/views/modules/communityService/ninePlaces/places/placesForm.vue

@ -148,6 +148,7 @@ export default {
async initForm (type, placeOrgId) { async initForm (type, placeOrgId) {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.loadGrid()
this.formType = type this.formType = type
if (placeOrgId) { if (placeOrgId) {
@ -156,6 +157,25 @@ export default {
await this.loadFormData() await this.loadFormData()
} }
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId,
purpose:"addorupdate"
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
}, },
// //
@ -301,10 +321,6 @@ export default {
}, },
props: { props: {
gridList: {
type: Array,
default: []
},
scaleList: { scaleList: {
type: Array, type: Array,
default: [] default: []
@ -313,6 +329,10 @@ export default {
type: Array, type: Array,
default: [] default: []
}, },
agencyId: {
type: String,
default: ""
},
} }
} }
</script> </script>

Loading…
Cancel
Save