Browse Source

九小场所巡查详情

dev-map-local
jiangyy 3 years ago
parent
commit
99c5962c14
  1. 3
      src/assets/scss/modules/management/detail-main.scss
  2. 177
      src/views/modules/communityService/ninePlaces/inspect/inspect.vue
  3. 350
      src/views/modules/communityService/ninePlaces/inspect/inspectDetail.vue
  4. 22
      src/views/modules/communityService/ninePlaces/places/places.vue
  5. 232
      src/views/modules/communityService/ninePlaces/places/placesDetail.vue
  6. 11
      src/views/modules/communityService/ninePlaces/team/team.vue
  7. 283
      src/views/modules/communityService/ninePlaces/team/teamDetail.vue

3
src/assets/scss/modules/management/detail-main.scss

@ -141,6 +141,9 @@
.info-title-3{ .info-title-3{
flex: 0 0 150px; flex: 0 0 150px;
} }
.info-title-4{
flex: 0 0 110px;
}
> span, > span,
> div { > div {

177
src/views/modules/communityService/ninePlaces/inspect/inspect.vue

@ -4,93 +4,89 @@
<el-form :inline="true" <el-form :inline="true"
:model="formData" :model="formData"
ref="ref_searchform" ref="ref_searchform"
:label-width="'100px'"> :label-width="'120px'">
<div>
<el-form-item label="场所名称"
<el-form-item label="场所名称" prop="placeOrgName">
prop="placeOrgName"> <el-input v-model="formData.placeOrgName"
<el-input v-model="formData.placeOrgName" size="small"
size="small" class="item_width_1"
class="item_width_1" clearable
clearable placeholder="请输入九小场所名称">
placeholder="请输入九小场所名称"> </el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item label="首次检查结果"
<el-form-item label="首次检查结果" prop="firstResult">
prop="firstResult"> <el-select class="item_width_1"
<el-select class="item_width_1" v-model="formData.firstResult"
v-model="formData.firstResult"
size="small"
placeholder="请选择"
clearable>
<el-option v-for="item in resultList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="场所区域"
prop="gridId">
<el-select class="item_width_1"
v-model="formData.gridId"
placeholder="全部"
clearable>
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="场所类型"
prop="ninePlaceVal">
<el-select class="item_width_1"
v-model="formData.ninePlaceVal"
size="small"
placeholder="请选择"
clearable>
<el-option v-for="item in placeTypeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="最新结果"
prop="finalResult">
<el-select class="item_width_1"
v-model="formData.finalResult"
size="small"
placeholder="请选择"
clearable>
<el-option v-for="item in resultList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button style="margin-left:30px"
size="small" size="small"
class="diy-button--search" placeholder="请选择"
@click="handleSearch">查询</el-button> clearable>
<el-button style="margin-left:10px" <el-option v-for="item in resultList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="场所区域"
prop="gridId">
<el-select class="item_width_1"
v-model="formData.gridId"
placeholder="全部"
clearable>
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="场所类型"
prop="ninePlaceVal">
<el-select class="item_width_1"
v-model="formData.ninePlaceVal"
size="small" size="small"
class="diy-button--reset" placeholder="请选择"
@click="resetSearch">重置</el-button> clearable>
</div> <el-option v-for="item in placeTypeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="最新结果"
prop="finalResult">
<el-select class="item_width_1"
v-model="formData.finalResult"
size="small"
placeholder="请选择"
clearable>
<el-option v-for="item in resultList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</el-form> </el-form>
</div> </div>
<div class="div_table"> <div class="div_table">
@ -454,13 +450,18 @@ export default {
}, },
handleDetail (row) { handleDetail (row) {
this.formTitle = '详情' // this.formTitle = ''
this.formShow = true this.detailShow = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.placePatrolRecordId) this.$refs.ref_detail.initForm(row.placePatrolRecordId)
}) })
}, },
diaDetailClose () {
this.detailShow = false
},
handleAdd () { handleAdd () {
this.formTitle = '新增' this.formTitle = '新增'
this.formShow = true this.formShow = true

350
src/views/modules/communityService/ninePlaces/inspect/inspectDetail.vue

@ -1,147 +1,53 @@
<template> <template>
<div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<div v-if="initLoading"
<el-form ref="ref_form" class="m-row">
:inline="true" <div class="m-info">
:model="formData" <div class="info-prop">
:rules="dataRule" <span class="info-title-4">场所区域</span>
:disabled="formType === 'detail'" <span>{{ formData.gridName||'--' }}</span>
class="form"> </div>
<el-form-item label="场所区域" <div class="info-prop">
prop="gridId" <span class="info-title-4">场所类型</span>
label-width="150px" <span>{{ formData.placeOrgName||'--' }}</span>
style="display: block"> </div>
<el-select class="item_width_1"
v-model="formData.gridId" <div class="info-prop">
placeholder="全部" <span class="info-title-4">场所名称</span>
clearable> <span>{{ formData.ninePlaceName||'--'}}</span>
<el-option v-for="item in gridList" </div>
@click.native="handleChangeGrid"
:key="item.value" <div class="info-prop">
:label="item.label" <span class="info-title-4">分队名称</span>
:value="item.value"> <span>{{ formData.placePatrolTeamName||'--' }}</span>
</el-option> </div>
</el-select> <div class="info-prop">
</el-form-item> <span class="info-title-4">检查人员</span>
<span>{{ formData.inspectorsNames||'--' }}</span>
<el-form-item label="场所类型" </div>
label-width="150px" <div class="info-prop">
prop="ninePlaceVal"> <span class="info-title-4">首次巡查时间</span>
<el-select class="item_width_1" <span>{{ formData.firstTime||'--' }}</span>
v-model="formData.ninePlaceVal" </div>
placeholder="请选择" <div class="info-prop">
clearable> <span class="info-title-4">隐患明细</span>
<el-option v-for="item in placeTypeList" <span>{{ formData.detailed||'--' }}</span>
@click.native="handleChangeType" </div>
:key="item.value" <div class="info-prop">
:label="item.label" <span class="info-title-4">首次检查结论</span>
:value="item.value"> <span>{{ formData.firstResult==='0'?'合格':'不合格' }}</span>
</el-option> </div>
</el-select> <div class="info-prop">
<span class="info-title-4">拟复查时间</span>
</el-form-item> <span>{{ formData.reviewTime||'--' }}</span>
</div>
<el-form-item label="场所名称"
label-width="150px" </div>
prop="placeOrgId">
<el-select class="item_width_1"
v-model="formData.placeOrgId"
placeholder="请选择"
clearable>
<el-option v-for="item in placesList"
:key="item.placeOrgId"
:label="item.placeOrgName"
:value="item.placeOrgId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分队名称"
label-width="150px"
prop="placePatrolTeamId">
<el-select class="item_width_1"
v-model="formData.placePatrolTeamId"
placeholder="请选择"
clearable>
<el-option v-for="(item,index) in teamsList"
@click.native="hancleChangeTeam(index)"
:key="item.teamId"
:label="item.teamName"
:value="item.teamId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="检查人员"
prop="inspectorArray"
label-width="150px"
style="display: block">
<el-checkbox-group class="item_width_1"
style="display:flex;flex-wrap:wrap"
v-model="formData.inspectorArray">
<el-checkbox v-for="item in inspectorsList"
:key="item.id"
:label="item.id">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="首次巡查时间"
style="display: block"
prop="firstTime"
label-width="150px">
<el-date-picker v-model="formData.firstTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="隐患明细"
prop="detailed"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="formData.detailed"></el-input>
</el-form-item>
<el-form-item label="首次检查结论"
prop="firstResult"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="formData.firstResult"
placeholder="全部"
clearable>
<el-option v-for="item in resultList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="拟复查时间"
style="display: block"
prop="reviewTime"
label-width="150px">
<el-date-picker v-model="formData.reviewTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
</div> </div>
<div class="div_btn"> <!-- <div class="div_btn">
<el-button size="small" <el-button size="small"
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
<el-button size="small" <el-button size="small"
@ -149,7 +55,7 @@
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
</div> </div> -->
</div> </div>
</template> </template>
@ -162,8 +68,9 @@ let loading // 加载动画
export default { export default {
data () { data () {
return { return {
formType: 'add', // addeditdetail
btnDisable: false,
initLoading: false,
placesList: [],// placesList: [],//
teamsList: [],// teamsList: [],//
@ -192,104 +99,21 @@ export default {
methods: { methods: {
async initForm (type, placePatrolRecordId) { async initForm (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)
}
},
// this.startLoading()
async loadTeams () {
const url = '/gov/org/placepatrolteam/getlist'
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/getlist'
let params = {
isPage: false
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) { this.placePatrolRecordId = placePatrolRecordId
this.teamsList = data.list this.formData.placePatrolRecordId = placePatrolRecordId
if (this.teamsList.length > 0) { await this.loadFormData()
this.formData.placePatrolTeamId = this.teamsList[0].teamId
this.hancleChangeTeam(0)
}
} else { this.initLoading = true
this.$message.error(msg) 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 //form
async loadFormData () { async loadFormData () {
const url = '/gov/org/placepatrolrecord/detail' 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 () { handleCancle () {
this.resetData() this.resetData()
@ -360,18 +143,7 @@ export default {
}, },
resetData () { resetData () {
this.formData = { this.formData = {}
gridId: '',//Id
ninePlaceVal: '',//value
placeOrgId: '',//Id-
placePatrolTeamId: '',//Id
inspectorArray: [],//
inspectors: '',//Id
firstTime: '',//
detailed: '',//
firstResult: '',//0: 1:
reviewTime: '',//
}
}, },
// //
startLoading () { startLoading () {
@ -440,7 +212,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManageForm.scss"; @import "@/assets/scss/modules/management/detail-main.scss";
</style> </style>

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

@ -194,6 +194,7 @@
@dialogCancle="addFormCancle" @dialogCancle="addFormCancle"
@dialogOk="addFormOk"></places-form> @dialogOk="addFormOk"></places-form>
</el-dialog> </el-dialog>
<!-- 详情弹出框 --> <!-- 详情弹出框 -->
<el-dialog :visible.sync="detailShow" <el-dialog :visible.sync="detailShow"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -367,12 +368,17 @@ export default {
this.formShow = false this.formShow = false
}, },
handleDetail (row) { // handleDetail (row) {
this.formTitle = '详情' // // this.formTitle = ''
this.formShow = true // this.detailShow = true
this.$nextTick(() => { // this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.id) // this.$refs.ref_detail.initForm( row.id)
}) // })
// },
diaDetailClose () {
this.detailShow = false
}, },
handleAdd () { handleAdd () {
@ -392,9 +398,9 @@ export default {
}, },
handleDetail (row) { handleDetail (row) {
this.formTitle = '详情' this.formTitle = '详情'
this.formShow = true this.detailShow = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.placeOrgId) this.$refs.ref_detail.initForm(row.placeOrgId)
}) })
}, },

232
src/views/modules/communityService/ninePlaces/places/placesDetail.vue

@ -1,107 +1,46 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<div v-if="initLoading"
<el-form ref="ref_form" class="m-row">
:inline="true" <div class="m-info">
:model="formData" <div class="info-prop">
:rules="dataRule" <span class="info-title-2">场所类型</span>
:disabled="formType === 'detail'" <span>{{ formData.ninePlaceName||'--' }}</span>
class="form"> </div>
<el-form-item label="场所类型" <div class="info-prop">
label-width="150px" <span class="info-title-2">场所区域</span>
prop="ninePlaceVal"> <span>{{ formData.gridName||'--' }}</span>
<el-select class="item_width_1" </div>
v-model="formData.ninePlaceVal"
placeholder="请选择" <div class="info-prop">
clearable> <span class="info-title-2">场所名称</span>
<el-option v-for="item in placeTypeList" <span>{{ formData.placeOrgName}}</span>
:key="item.value" </div>
:label="item.label"
:value="item.value"> <div class="info-prop">
</el-option> <span class="info-title-2">场所地址</span>
</el-select> <span>{{ formData.address||'--' }}</span>
</div>
</el-form-item> <div class="info-prop">
<span class="info-title-2">规模</span>
<el-form-item label="场所区域" <span>{{ formData.scaleName||'--' }}</span>
prop="gridId" </div>
label-width="150px" <div class="info-prop">
style="display: block"> <span class="info-title-2">负责人</span>
<el-select class="item_width_1" <span>{{ formData.personInCharge||'--' }}</span>
v-model="formData.gridId" </div>
placeholder="全部" <div class="info-prop">
clearable> <span class="info-title-2">联系电话</span>
<el-option v-for="item in gridList" <span>{{ formData.mobile||'--' }}</span>
:key="item.value" </div>
:label="item.label"
:value="item.value"> </div>
</el-option> </div>
</el-select>
</el-form-item>
<el-form-item label="场所名称"
label-width="150px"
prop="placeOrgName">
<el-input v-model="formData.placeOrgName"
class="item_width_1"
clearable
placeholder="请输入九小场所名称">
</el-input>
</el-form-item>
<el-form-item label="场所地址"
label-width="150px"
prop="address">
<el-input v-model="formData.address"
class="item_width_1"
clearable
placeholder="请输入场所地址">
</el-input>
</el-form-item>
<el-form-item label="规模"
label-width="150px"
prop="scale">
<el-select class="item_width_1"
v-model="formData.scale"
placeholder="请选择"
clearable>
<el-option v-for="item in scaleList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="负责人"
label-width="150px"
prop="personInCharge">
<el-input v-model="formData.personInCharge"
class="item_width_1"
clearable
placeholder="请输入负责人姓名">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
label-width="150px"
prop="mobile">
<el-input v-model="formData.mobile"
class="item_width_1"
type='number'
clearable
placeholder="请输入电话">
</el-input>
</el-form-item>
</el-form>
</div> </div>
<div class="div_btn"> <!-- <div class="div_btn">
<el-button size="small" <el-button size="small"
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
<el-button size="small" <el-button size="small"
@ -109,7 +48,7 @@
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
</div> </div> -->
</div> </div>
</template> </template>
@ -125,8 +64,10 @@ export default {
formType: 'add', // addeditdetail formType: 'add', // addeditdetail
btnDisable: false, btnDisable: false,
initLoading: false,
placeOrgId: '', placeOrgId: '',
gridList: [],
formData: { formData: {
gridId: '', gridId: '',
ninePlaceVal: '', ninePlaceVal: '',
@ -146,25 +87,26 @@ export default {
methods: { methods: {
async initForm (type, placeOrgId) { async initForm (placeOrgId) {
this.$refs.ref_form.resetFields();
this.loadGrid() this.loadGrid()
this.formType = type
if (placeOrgId) { this.placeOrgId = placeOrgId
this.placeOrgId = placeOrgId this.formData.placeOrgId = placeOrgId
this.formData.placeOrgId = placeOrgId await this.loadFormData()
await this.loadFormData()
} this.initLoading = true
}, },
async loadGrid () { async loadGrid () {
const url = "/gov/org/customergrid/gridoption" const url = "/gov/org/customergrid/gridoption"
let params = { let params = {
agencyId: this.agencyId, agencyId: this.agencyId,
purpose:"addorupdate" purpose: "addorupdate"
} }
const { data, code, msg } = await requestPost(url, params) 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 () { handleCancle () {
this.resetData() this.resetData()
@ -336,15 +221,6 @@ export default {
} }
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.div_searchmap { @import "@/assets/scss/modules/management/detail-main.scss";
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
</style>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style> </style>

11
src/views/modules/communityService/ninePlaces/team/team.vue

@ -341,13 +341,18 @@ export default {
}, },
handleDetail (row) { handleDetail (row) {
this.formTitle = '详情' // this.formTitle = ''
this.formShow = true this.detailShow = true
this.$nextTick(() => { 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 () { handleAdd () {
this.formTitle = '新增' this.formTitle = '新增'
this.formShow = true this.formShow = true

283
src/views/modules/communityService/ninePlaces/team/teamDetail.vue

@ -1,146 +1,57 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<div v-if="initLoading"
class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-4">分队名称</span>
<span>{{ formData.teamName||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-4">负责区域</span>
<span>{{ formData.gridNames||'--' }}</span>
</div>
<el-form ref="ref_form" <div class="info-prop">
:inline="true" <span class="info-title-4">负责场所类型</span>
:model="formData" <span>{{ formData.ninePlaceNames }}</span>
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="分队名称"
label-width="150px"
prop="teamName">
<el-input v-model="formData.teamName"
class="item_width_1"
clearable
placeholder="请输入分队名称">
</el-input>
</el-form-item>
<el-form-item label="负责区域"
prop="gridIdArray"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="formData.gridIdArray"
placeholder="全部"
multiple
clearable>
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="负责场所类型"
prop="ninePlaceArray"
label-width="150px"
style="display: block">
<el-checkbox-group class="item_width_1"
style="display:flex;flex-wrap:wrap"
v-model="formData.ninePlaceArray">
<el-checkbox v-for="item in placeTypeList"
:key="item.value"
:label="item.value">{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="巡查计划"
prop="plan"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="formData.plan"></el-input>
</el-form-item>
<el-form-item label="创建时间"
style="display: block"
prop="time"
label-width="150px">
<el-date-picker v-model="formData.time"
value-format="yyyy-MM-dd HH:mm:ss"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="负责人"
label-width="150px"
prop="personInCharge">
<el-input v-model="formData.personInCharge"
class="item_width_1"
clearable
placeholder="请输入负责人姓名">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
label-width="150px"
prop="mobile">
<el-input v-model="formData.mobile"
class="item_width_1"
type='number'
clearable
placeholder="请输入电话">
</el-input>
</el-form-item>
<el-form-item label="成员"
label-width="150px"
prop="member">
<el-button v-if="formType != 'detail'"
type="primary"
size="mini"
icon="el-icon-plus"
@click="handleAddPerson"></el-button>
<div v-for="(item,index) in memberList"
:key="index"
class="div_person_list"
:class="[{'margin10':formType !== 'detail'}]">
<span class="div_person_list_title">姓名</span>
<el-input v-if="item.isSet"
v-model="item.name"
class="item_width_3"
clearable
placeholder="请输入姓名">
</el-input>
<span class="item_width_span_3"
v-else>{{item.name}}</span>
<span class="div_person_list_title2">联系电话</span>
<el-input v-if="item.isSet"
v-model="item.mobile"
class="item_width_4"
clearable
placeholder="请输入电话">
</el-input>
<span class="item_width_span_4"
v-else>{{item.mobile}}</span>
<el-button v-if="formType !== 'detail'"
style="margin-left:30px"
type="red"
size="mini"
@click="handleDelPerson(index)">删除</el-button>
</div> </div>
</el-form-item> <div class="info-prop">
</el-form> <span class="info-title-4">巡查计划</span>
<span>{{ formData.plan||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-4">创建时间</span>
<span>{{ formData.time||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-4">负责人</span>
<span>{{ formData.personInCharge||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-4">联系电话</span>
<span>{{ formData.mobile||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-4">成员</span>
<div>
<div v-for="(item,index) in formData.memberList"
:key="index">
<span>{{ item.name||'--' }}</span>
<span style="margin-left:20px">{{ item.mobile||'--' }}</span>
</div>
</div>
</div>
</div>
</div>
</div> </div>
<div class="div_btn"> <!-- <div class="div_btn">
<el-button size="small" <el-button size="small"
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
<el-button size="small" <el-button size="small"
@ -148,7 +59,7 @@
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
</div> </div> -->
</div> </div>
</template> </template>
@ -162,9 +73,9 @@ let loading // 加载动画
export default { export default {
data () { data () {
return { return {
formType: 'add', // addeditdetail
btnDisable: false, btnDisable: false,
initLoading: false,
teamId: '', teamId: '',
formData: { formData: {
@ -193,15 +104,15 @@ export default {
methods: { methods: {
async initForm (type, teamId, agencyId) { async initForm (teamId, agencyId) {
this.$refs.ref_form.resetFields();
this.formData.agencyId = agencyId this.formData.agencyId = agencyId
this.formType = type
if (teamId) { this.teamId = teamId
this.teamId = teamId this.formData.teamId = teamId
this.formData.teamId = teamId await this.loadFormData()
await this.loadFormData()
} this.initLoading = true
}, },
@ -384,32 +295,7 @@ export default {
} }
}, },
computed: { 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: { props: {
@ -426,55 +312,6 @@ export default {
} }
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManageForm.scss"; @import "@/assets/scss/modules/management/detail-main.scss";
</style> </style>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.item_width_1 {
width: 500px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 120px;
}
.item_width_4 {
margin-left: 10px;
width: 150px;
}
.item_width_span_3 {
margin-left: 10px;
width: 160px;
}
.item_width_span_4 {
margin-left: 10px;
width: 150px;
}
.margin10 {
margin-top: 10px;
}
.div_person_list {
width: 500px;
display: flex;
.div_person_list_title {
width: 40px;
font-weight: bold;
}
.div_person_list_title2 {
width: 90px;
font-weight: bold;
margin-left: 20px;
}
}
</style>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>
Loading…
Cancel
Save