+
+
+
+ 场所区域:
+ {{ formData.gridName||'--' }}
+
+
+
+ 场所类型:
+ {{ formData.placeOrgName||'--' }}
+
+
+
+ 场所名称:
+ {{ formData.ninePlaceName||'--'}}
+
+
+
+ 分队名称:
+ {{ formData.placePatrolTeamName||'--' }}
+
+
+ 检查人员:
+ {{ formData.inspectorsNames||'--' }}
+
+
+ 首次巡查时间:
+ {{ formData.firstTime||'--' }}
+
+
+ 隐患明细:
+ {{ formData.detailed||'--' }}
+
+
+ 首次检查结论:
+ {{ formData.firstResult==='0'?'合格':'不合格' }}
+
+
+ 拟复查时间:
+ {{ formData.reviewTime||'--' }}
+
+
+
-
+
@@ -162,8 +68,9 @@ let loading // 加载动画
export default {
data () {
return {
- formType: 'add', //表单操作类型 add新增,edit编辑,detail详情
- btnDisable: false,
+
+
+ initLoading: false,
placesList: [],//场景列表
teamsList: [],//分队列表
@@ -192,104 +99,21 @@ export default {
methods: {
- async initForm (type, placePatrolRecordId) {
- this.$refs.ref_form.resetFields();
- this.startLoading()
- await this.loadPlaces()
- await this.loadTeams()
-
- this.formType = type
- if (placePatrolRecordId) {
- this.placePatrolRecordId = placePatrolRecordId
- this.formData.placePatrolRecordId = placePatrolRecordId
- await this.loadFormData()
- await this.loadInspectors()
- }
- this.endLoading()
- },
-
- //改变场所区域
- handleChangeGrid () {
- this.formData.placeOrgId = ''
- this.loadPlaces()
- },
-
- //改变场所类型
- handleChangeType () {
- this.formData.placeOrgId = ''
- this.loadPlaces()
- },
-
-
- //加载场所
- async loadPlaces () {
- const url = '/gov/org/placeorg/getlist'
-
- let params = {
- gridId: this.formData.gridId,//场所区域【网格Id】
- ninePlaceVal: this.formData.ninePlaceVal,//场所类型【九小场所Value值】
- isPage: false
- }
-
- const { data, code, msg } = await requestPost(url, params)
-
- if (code === 0) {
- this.placesList = data.list
-
- } else {
- this.$message.error(msg)
- }
- },
-
+ async initForm (placePatrolRecordId) {
- //加载分队
- async loadTeams () {
- const url = '/gov/org/placepatrolteam/getlist'
- // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/getlist'
- let params = {
- isPage: false
- }
+ this.startLoading()
- const { data, code, msg } = await requestPost(url, params)
- if (code === 0) {
- this.teamsList = data.list
- if (this.teamsList.length > 0) {
- this.formData.placePatrolTeamId = this.teamsList[0].teamId
+ this.placePatrolRecordId = placePatrolRecordId
+ this.formData.placePatrolRecordId = placePatrolRecordId
+ await this.loadFormData()
- this.hancleChangeTeam(0)
- }
- } else {
- this.$message.error(msg)
- }
+ this.initLoading = true
+ this.endLoading()
},
- //点击分队切换人员
- async hancleChangeTeam (index) {
- let array = []
- this.formData.inspectorArray = [...array]
- // this.formData.placePatrolTeamId = this.teamsList[index].teamId
- await this.loadInspectors()
- },
- //加载分队下人员
- async loadInspectors () {
- const url = '/gov/org/placepatrolteamstaff/getlist'
- // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist'
- let params = {
- teamId: this.formData.placePatrolTeamId
- }
-
- const { data, code, msg } = await requestPost(url, params)
-
- if (code === 0) {
- this.inspectorsList = data
-
- } else {
- this.$message.error(msg)
- }
- },
//加载form
async loadFormData () {
const url = '/gov/org/placepatrolrecord/detail'
@@ -311,47 +135,6 @@ export default {
}
},
-
- async handleComfirm () {
-
- this.btnDisable = true
- setTimeout(() => {
- this.btnDisable = false
- }, 10000)
- this.$refs['ref_form'].validate((valid, messageObj) => {
- if (!valid) {
- app.util.validateRule(messageObj)
- this.btnDisable = false
- } else {
- this.addRecord()
- }
-
- })
-
- },
- async addRecord () {
-
- let url = "/gov/org/placepatrolrecord/add"
- // let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add"
- this.formData.inspectors = this.formData.inspectorArray.join(',')
-
- const { data, code, msg } = await requestPost(url, this.formData)
-
- if (code === 0) {
- this.$message({
- type: 'success',
- message: '操作成功'
- })
- this.resetData()
- this.$emit('dialogOk')
- this.btnDisable = false
- } else {
- this.btnDisable = false
- this.$message.error(msg)
- }
-
- },
-
handleCancle () {
this.resetData()
@@ -360,18 +143,7 @@ export default {
},
resetData () {
- this.formData = {
- gridId: '',//网格Id
- ninePlaceVal: '',//九小场所类型value值
- placeOrgId: '',//场所下的组织Id-场所名称
- placePatrolTeamId: '',//场所下分队Id
- inspectorArray: [],//检查人员数组
- inspectors: '',//检查人员Id,逗号分隔
- firstTime: '',//首次巡查时间
- detailed: '',//隐患明细
- firstResult: '',//首次检查结果【0:合格 1:不合格】
- reviewTime: '',//拟复查时间
- }
+ this.formData = {}
},
// 开启加载动画
startLoading () {
@@ -440,7 +212,7 @@ export default {
}
-
diff --git a/src/views/modules/communityService/ninePlaces/places/places.vue b/src/views/modules/communityService/ninePlaces/places/places.vue
index 88bb6db95..36c6af69f 100644
--- a/src/views/modules/communityService/ninePlaces/places/places.vue
+++ b/src/views/modules/communityService/ninePlaces/places/places.vue
@@ -194,6 +194,7 @@
@dialogCancle="addFormCancle"
@dialogOk="addFormOk">
+
{
- this.$refs.ref_form.initForm('detail', row.id)
- })
+ // handleDetail (row) {
+ // // this.formTitle = '详情'
+ // this.detailShow = true
+ // this.$nextTick(() => {
+ // this.$refs.ref_detail.initForm( row.id)
+ // })
+ // },
+
+ diaDetailClose () {
+
+ this.detailShow = false
},
handleAdd () {
@@ -392,9 +398,9 @@ export default {
},
handleDetail (row) {
this.formTitle = '详情'
- this.formShow = true
+ this.detailShow = true
this.$nextTick(() => {
- this.$refs.ref_form.initForm('detail', row.placeOrgId)
+ this.$refs.ref_detail.initForm(row.placeOrgId)
})
},
diff --git a/src/views/modules/communityService/ninePlaces/places/placesDetail.vue b/src/views/modules/communityService/ninePlaces/places/placesDetail.vue
index ae7bb8e0c..dbac5af92 100644
--- a/src/views/modules/communityService/ninePlaces/places/placesDetail.vue
+++ b/src/views/modules/communityService/ninePlaces/places/placesDetail.vue
@@ -1,107 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 场所类型:
+ {{ formData.ninePlaceName||'--' }}
+
+
+
+ 场所区域:
+ {{ formData.gridName||'--' }}
+
+
+
+ 场所名称:
+ {{ formData.placeOrgName}}
+
+
+
+ 场所地址:
+ {{ formData.address||'--' }}
+
+
+ 规模:
+ {{ formData.scaleName||'--' }}
+
+
+ 负责人:
+ {{ formData.personInCharge||'--' }}
+
+
+ 联系电话:
+ {{ formData.mobile||'--' }}
+
+
+
+
-
+
@@ -125,8 +64,10 @@ export default {
formType: 'add', //表单操作类型 add新增,edit编辑,detail详情
btnDisable: false,
+ initLoading: false,
placeOrgId: '',
+ gridList: [],
formData: {
gridId: '',
ninePlaceVal: '',
@@ -146,25 +87,26 @@ export default {
methods: {
- async initForm (type, placeOrgId) {
- this.$refs.ref_form.resetFields();
+ async initForm (placeOrgId) {
+
this.loadGrid()
- this.formType = type
- if (placeOrgId) {
- this.placeOrgId = placeOrgId
- this.formData.placeOrgId = placeOrgId
- await this.loadFormData()
- }
+
+ this.placeOrgId = placeOrgId
+ this.formData.placeOrgId = placeOrgId
+ await this.loadFormData()
+
+ this.initLoading = true
+
},
- async loadGrid () {
+ async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId,
- purpose:"addorupdate"
+ purpose: "addorupdate"
}
const { data, code, msg } = await requestPost(url, params)
@@ -198,63 +140,6 @@ export default {
- async handleComfirm () {
-
- this.btnDisable = true
- setTimeout(() => {
- this.btnDisable = false
- }, 10000)
- this.$refs['ref_form'].validate((valid, messageObj) => {
- if (!valid) {
- app.util.validateRule(messageObj)
- this.btnDisable = false
- } else {
- this.addPlace()
- }
-
- })
-
-
- },
- async addPlace () {
- // const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码
- // if (regPhone.test(this.formData.mobile) === false) {
- // this.btnDisable = false
- // this.$message({
- // type: 'warning',
- // message: '请输入正确的手机号码'
- // })
- // return false;
- // }
-
- let url = ''
-
- if (this.formType === 'edit') {
- url = '/gov/org/placeorg/edit'
- // url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/edit'
-
- } else {
- url = "/gov/org/placeorg/add"
- // url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/add"
- }
-
- const { data, code, msg } = await requestPost(url, this.formData)
-
- if (code === 0) {
- this.$message({
- type: 'success',
- message: '操作成功'
- })
- this.resetData()
- this.$emit('dialogOk')
- this.btnDisable = false
- } else {
- this.btnDisable = false
- this.$message.error(msg)
- }
-
- },
-
handleCancle () {
this.resetData()
@@ -336,15 +221,6 @@ export default {
}
}
-
-
-
diff --git a/src/views/modules/communityService/ninePlaces/team/team.vue b/src/views/modules/communityService/ninePlaces/team/team.vue
index cab0c4601..37791495d 100644
--- a/src/views/modules/communityService/ninePlaces/team/team.vue
+++ b/src/views/modules/communityService/ninePlaces/team/team.vue
@@ -341,13 +341,18 @@ export default {
},
handleDetail (row) {
- this.formTitle = '详情'
- this.formShow = true
+ // this.formTitle = '详情'
+ this.detailShow = true
this.$nextTick(() => {
- this.$refs.ref_form.initForm('detail', row.teamId, this.agencyId)
+ this.$refs.ref_detail.initForm( row.teamId, this.agencyId)
})
},
+ diaDetailClose () {
+
+ this.detailShow = false
+ },
+
handleAdd () {
this.formTitle = '新增'
this.formShow = true
diff --git a/src/views/modules/communityService/ninePlaces/team/teamDetail.vue b/src/views/modules/communityService/ninePlaces/team/teamDetail.vue
index 66732ebe0..3ddad9351 100644
--- a/src/views/modules/communityService/ninePlaces/team/teamDetail.vue
+++ b/src/views/modules/communityService/ninePlaces/team/teamDetail.vue
@@ -1,146 +1,57 @@
+
+
+
+ 分队名称:
+ {{ formData.teamName||'--' }}
+
+
+
+ 负责区域:
+ {{ formData.gridNames||'--' }}
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.label}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
姓名
-
-
-
{{item.name}}
-
-
联系电话
-
-
-
{{item.mobile}}
-
-
删除
+
+ 负责场所类型:
+ {{ formData.ninePlaceNames }}
-
-
+
+ 巡查计划:
+ {{ formData.plan||'--' }}
+
+
+ 创建时间:
+ {{ formData.time||'--' }}
+
+
+ 负责人:
+ {{ formData.personInCharge||'--' }}
+
+
+ 联系电话:
+ {{ formData.mobile||'--' }}
+
+
+
成员:
+
+
+ {{ item.name||'--' }}
+ {{ item.mobile||'--' }}
+
+
+
+
+
+
+
-
+
@@ -162,9 +73,9 @@ let loading // 加载动画
export default {
data () {
return {
- formType: 'add', //表单操作类型 add新增,edit编辑,detail详情
btnDisable: false,
+ initLoading: false,
teamId: '',
formData: {
@@ -193,15 +104,15 @@ export default {
methods: {
- async initForm (type, teamId, agencyId) {
- this.$refs.ref_form.resetFields();
+ async initForm (teamId, agencyId) {
+
this.formData.agencyId = agencyId
- this.formType = type
- if (teamId) {
- this.teamId = teamId
- this.formData.teamId = teamId
- await this.loadFormData()
- }
+
+ this.teamId = teamId
+ this.formData.teamId = teamId
+ await this.loadFormData()
+
+ this.initLoading = true
},
@@ -384,32 +295,7 @@ export default {
}
},
computed: {
- dataRule () {
- return {
- teamName: [
- { required: true, message: '分队名称不能为空', trigger: 'blur' }
- ],
- gridIdArray: [
- { required: true, message: '负责区域不能为空', trigger: 'blur' },
- ],
- ninePlaceArray: [
- { required: true, message: '场所类型不能为空', trigger: 'blur' }
- ],
-
- plan: [
- { required: true, message: '巡查计划 不能为空', trigger: 'blur' }
- ],
- personInCharge: [
- { required: true, message: '负责人不能为空', trigger: 'blur' }
- ],
- mobile: [
- { required: true, message: '联系电话不能为空', trigger: 'blur' }
- ],
- member: [
- { required: true, message: '成员不能为空', trigger: 'blur' }
- ]
- }
- },
+
},
props: {
@@ -426,55 +312,6 @@ export default {
}
-
-
-
-
-
+
\ No newline at end of file