Browse Source

Merge branch 'dev-jichu' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-jichu

shibei_prod
dai 4 years ago
parent
commit
f4c3dbfb26
  1. 29
      src/views/modules/communityService/measure/index.vue
  2. 441
      src/views/modules/communityService/ninePlaces/inspect/inspect.vue
  3. 441
      src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue
  4. 439
      src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue
  5. 553
      src/views/modules/communityService/ninePlaces/inspect/unitsForm.vue
  6. 17
      src/views/modules/communityService/ninePlaces/places/places.vue
  7. 22
      src/views/modules/communityService/ninePlaces/places/placesForm.vue
  8. 39
      src/views/modules/communityService/ninePlaces/team/team.vue
  9. 99
      src/views/modules/communityService/ninePlaces/team/teamForm.vue

29
src/views/modules/communityService/measure/index.vue

@ -58,7 +58,7 @@
</el-select>
</el-form-item>
<el-form-item label="服务类型" prop="serviceType">
<el-select v-model="searchForm.serviceType" filterable placeholder="请选择" clearable @change="handleServiceChange">
<el-select v-model="searchForm.serviceType" filterable placeholder="请选择" clearable @change="handleServiceChange('query', $event)">
<el-option
v-for="item in serviceOptions"
:key="item.value"
@ -68,7 +68,8 @@
</el-select>
</el-form-item>
<el-form-item prop="serverId">
<el-select v-model="searchForm.serverId" filterable placeholder="请选择" clearable>
<el-select v-model="searchForm.serverId" filterable
:disabled="searchForm.serviceType ? false : true" placeholder="请选择" clearable>
<el-option
v-for="item in serviceOptiondList"
:key="item.value"
@ -249,7 +250,7 @@
</el-form-item>
<el-form-item label="上报人手机号" prop="reportUserMobile">
<el-input v-model="form.reportUserMobile" :disabled="disabled"
placeholder="请输入" class="input-width" clearable></el-input>
placeholder="请输入" class="input-width" maxlength="11" clearable></el-input>
</el-form-item>
<el-form-item label="上报时间" prop="reportTime">
<el-date-picker
@ -310,7 +311,7 @@
placeholder="请选择"
clearable
:disabled="disabled && addType !== 'appoint'"
@change="handleServiceChange">
@change="handleServiceChange('add', $event)">
<el-option
v-for="item in serviceOptions"
:key="item.value"
@ -670,13 +671,13 @@ export default {
handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1
if (this.reportTime.length > 0) {
if (Array.isArray(this.reportTime) && this.reportTime.length > 0) {
this.searchForm.reportStartTime = this.reportTime[0]
this.searchForm.reportEndTime = this.reportTime[1]
}
if (this.serviceTime.length > 0) {
if (Array.isArray(this.serviceTime) && this.serviceTime.length > 0) {
this.searchForm.wantServiceStartTime = this.serviceTime[0]
this.searchForm.wantServiceTime = this.serviceTime[1]
this.searchForm.wantServiceEndTime = this.serviceTime[1]
}
this.getTableData()
},
@ -688,8 +689,12 @@ export default {
}
},
handleServiceChange(val) {
this.getServiceuserList(val)
handleServiceChange(type, val) {
if (val === 'social_org') {
if (type === 'add') this.getServiceuserList(val, 'add_demand')
else this.getServiceuserList(val, 'query_demand')
} else this.getServiceuserList(val, '')
},
handleGridChange(val) {
this.getDemandUserList()
@ -969,12 +974,12 @@ export default {
return this.$message.error('网络错误')
})
},
async getServiceuserList(serviceType) {
if (!serviceType) return this.$message.error('服务方不能为空')
async getServiceuserList(serviceType, query) {
if (!serviceType) return false
const params = {
serviceName: '',
serviceType: serviceType,
queryPurpose: ''
queryPurpose: query
}
await this.$http
.post('/heart/userdemand/servicelist', params)

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

@ -6,7 +6,33 @@
ref="ref_searchform"
:label-width="'100px'">
<div>
<el-form-item label="所属网格"
<el-form-item label="场所名称"
prop="placeOrgName">
<el-input v-model="formData.placeOrgName"
class="item_width_1"
size="small"
clearable
placeholder="请输入九小场所名称">
</el-input>
</el-form-item>
<el-form-item label="首次检查结果"
prop="firstResult">
<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="场所区域"
prop="gridId">
<el-select class="item_width_1"
v-model="formData.gridId"
@ -20,23 +46,17 @@
</el-select>
</el-form-item>
<el-form-item label="单位名称"
prop="unitName">
<el-input v-model="formData.unitName"
class="item_width_1"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-form-item label="服务事项"
prop="serviceMatter">
</div>
<div>
<el-form-item label="场所类型"
prop="ninePlacsVal">
<el-select class="item_width_1"
v-model="formData.serviceMatter"
v-model="formData.ninePlacsVal"
placeholder="请选择"
clearable>
<el-option v-for="item in serviceList"
<el-option v-for="item in placeTypeList"
:key="item.value"
:label="item.label"
:value="item.value">
@ -44,42 +64,19 @@
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="分类"
prop="type">
<el-form-item label="最终结果"
prop="finalResult">
<el-select class="item_width_1"
v-model="formData.type"
v-model="formData.finalResult"
placeholder="请选择"
clearable>
<el-option v-for="item in typeList"
<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="contact">
<el-input v-model="formData.contact"
class="item_width_1"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="contactMobile">
<el-input v-model="formData.contactMobile"
class="item_width_1"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-button style="margin-left:10px"
@ -94,32 +91,9 @@
</el-form>
</div>
<div class="div_table">
<div class="div_btn">
<el-button style="float:left"
type="green"
size="small"
@click="handleAdd">新增</el-button>
<el-upload ref="upload"
:multiple='false'
:show-file-list='false'
:before-upload="beforeUpload"
action=""
accept=".xls,.xlsx"
:limit="1"
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
type="red">导入</el-button>
<el-button style="float:left"
type="yellow"
size="small"
@click="handleExport">导出</el-button>
</el-upload>
</div>
<el-button type="green"
size="small"
@click="handleAdd">新增</el-button>
<el-table class="table"
:data="tableData"
@ -133,82 +107,88 @@
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="gridName"
<el-table-column prop="placeOrgName"
header-align="center"
align="center"
label="所属网格"
width="180">
label="场所名称"
min-width="180">
</el-table-column>
<el-table-column prop="unitName"
<el-table-column prop="ninePlaceName"
header-align="center"
align="center"
label="单位名称"
width="180">
label="场所类型"
min-width="180">
</el-table-column>
<el-table-column prop="type"
<el-table-column prop="placePatrolTeamName"
header-align="center"
align="center"
label="分"
width="180">
label="分队名称"
min-width="180">
</el-table-column>
<el-table-column prop="serviceMatter"
<el-table-column prop="inspectorsNames"
header-align="center"
align="center"
label="服务事项"
width="180">
label="检察人员"
min-width="180">
</el-table-column>
<el-table-column prop="contact"
<el-table-column prop="firstTime"
header-align="center"
align="center"
label="联系人"
width="100">
label="首次巡检时间"
min-width="150">
</el-table-column>
<el-table-column prop="contactMobile"
<el-table-column prop="detailed"
header-align="center"
align="center"
label="联系电话"
width="110">
label="隐患明细"
min-width="280">
</el-table-column>
<el-table-column prop="memberCount"
<el-table-column prop="firstResult"
header-align="center"
align="center"
label="在职党员数"
width="150">
label="首次检查结果"
min-width="180">
</el-table-column>
<el-table-column prop="satisfaction"
<el-table-column prop="reviewTime"
header-align="center"
align="center"
label="群众满意度"
width="150">
label="拟复查时间"
min-width="110">
</el-table-column>
<el-table-column prop="remark"
<el-table-column prop="finalResult"
header-align="center"
align="center"
label="备注"
:show-overflow-tooltip="true"
width="150">
label="最新结果"
min-width="110">
</el-table-column>
<el-table-column prop="finalTime"
header-align="center"
align="center"
label="最新检查时间"
min-width="110">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
width="180"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text"
style="color:#00A7A9;text-decoration: underline;"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text"
style="color:#D51010;text-decoration: underline;"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button type="text"
style="color:#00A7A9;text-decoration: underline;"
size="small"
@click="handleReview(scope.row)">复查记录</el-button>
</template>
</el-table-column>
</el-table>
@ -216,7 +196,7 @@
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[10, 20, 50]"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
@ -232,12 +212,25 @@
width="850px"
top="5vh"
@closed="diaClose">
<units-form ref="ref_form"
:gridList="gridList"
:serviceList="serviceList"
:typeList="typeList"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></units-form>
<inspect-form ref="ref_form"
:gridList="gridList"
:resultList="resultList"
:placeTypeList="placeTypeList"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></inspect-form>
</el-dialog>
<!-- 复查记录弹出框 -->
<el-dialog :visible.sync="reviewShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'复查记录'"
width="80%"
top="5vh"
@closed="reviewDiaClose">
<inspect-review ref="ref_review"
:resultList="resultList"
@reviewDiaClose="reviewDiaClose"></inspect-review>
</el-dialog>
</div>
@ -245,7 +238,8 @@
<script>
import unitsForm from './unitsForm'
import inspectForm from './inspectForm'
import inspectReview from './inspectReview'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
@ -260,63 +254,48 @@ export default {
pageSize: 10,
pageNo: 0,
tableLoading: false,
agencyId: '',
gridList: [],//list
unitList: [],//list
serviceList: [
gridList: [],//list--
resultList: [
{
id: "1",
name: '积极配合社区安全巡查员进行场所消防、安全等方面的检查。'
value: '0',
label: '合格'
},
{
id: "2",
name: '积极配合'
},
{
id: "3",
name: '积极配合社区安全巡查员进行'
},
{
id: "4",
name: '积极配合社区安全巡查员进行场所消防、安全等方面的检查。并具备安全意识及设备设施'
},
],//list
typeList: [],//list
value: '1',
label: '不合格'
}
],//list
placeTypeList: [],//list
unitId: '',
formData: {
gridId: '',
unitName: '',
serviceMatter: '',
type: '',
contact: '',
contactMobile: ''
placeOrgName: '',//
firstResult: '',//0: 1:
gridId: '',//Id
ninePlacsVal: '',//Value
finalResult: '',//0: 1:
},
tableData: [],
//form
formShow: false,
formTitle: '新增单位',
formTitle: '新增巡查',
files: "",
fileName: "",
uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import'
reviewShow: false
}
},
components: {
unitsForm
inspectForm, inspectReview
},
async created () {
},
async mounted () {
//
await this.loadService()
//
await this.loadType()
//
await this.loadPlaceType()
const { user } = this.$store.state
this.agencyId = user.agencyId
@ -349,37 +328,18 @@ export default {
},
//
async loadService () {
// const url = "/heart/icresidemanddict/subcodelist"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icresidemanddict/subcodelist"
let params = {
parentCategoryCode: '1010'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceList = data
} else {
this.$message.error(msg)
}
},
//
async loadType () {
//
async loadPlaceType () {
const url = "/sys/dict/data/dictlist"
let params = {
dictType: 'party_unit_type'
dictType: 'nine_small_places'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.typeList = data
this.placeTypeList = data
} else {
this.$message.error(msg)
@ -390,12 +350,11 @@ export default {
async loadTable () {
this.tableLoading = true
// const url = "/heart/icpartyunit/list"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/list"
// const url = "/gov/org/placepatrolrecord/getlist"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/getlist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
agencyId: this.agencyId,
...this.formData
}
@ -417,11 +376,15 @@ export default {
this.formShow = false
},
reviewDiaClose () {
this.reviewShow = false
},
handleDetail (row) {
this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.id)
this.$refs.ref_form.initForm('detail', row.placePatrolRecordId)
})
},
@ -433,21 +396,20 @@ export default {
})
},
handleEdit (row) {
this.formTitle = '修改'
this.formShow = true
handleReview (row) {
this.reviewShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row.id)
this.$refs.ref_review.initTable(row.placePatrolRecordId)
})
},
addFormCancle () {
this.formShow = false
},
addFormOk () {
this.formShow = false
this.loadTable()
},
async handleDelete (row) {
@ -458,7 +420,7 @@ export default {
type: "warning"
})
.then(() => {
this.deleteUnit(row)
this.deleteRecord(row)
})
.catch(err => {
if (err == "cancel") {
@ -468,12 +430,12 @@ export default {
});
},
async deleteUnit (row) {
// const url = "/heart/icpartyunit/delete"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/delete"
async deleteRecord (row) {
// const url = "/gov/org/placepatrolrecord/del"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/del"
let params = {
id: row.id
placePatrolRecordId: row.placePatrolRecordId
}
const { data, code, msg } = await requestPost(url, params)
@ -493,118 +455,15 @@ export default {
//
resetSearch () {
this.formData = {
gridId: '',
unitName: '',
serviceMatter: '',
type: '',
contact: '',
contactMobile: ''
placeOrgName: '',//
mobile: '',//
scale: '',// 0:10 1:10-20 2:21-40 3:41-100 4:100
gridId: '',//Id
ninePlacsVal: '',//Value
isPage: true,//(:true :false)
}
},
//
async handleExport () {
let title = '联建单位列表'
const url = "/partyunit/export"
let params = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
level: this.agencyObj.level,
id: this.agencyObj.id
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
download (data, fileName) {
if (!data) {
return
}
var csvData = new Blob([data])
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName);
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement('a');
document.body.appendChild(a);
a.style = 'display: none';
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = fileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
}
},
//
beforeUpload (file) {
this.files = file;
const isText = file.type === 'application/vnd.ms-excel'
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件')
return false
} else {
this.fileName = file.name;
return true
}
},
//
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
},
async uploadFile () {
this.loading = true
if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false
}
//
this.$refs['upload'].clearFiles()
var url = '/partyunit/import'
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
const { data, code, msg } = await requestPost(url, fileFormData)
if (code === 0) {
this.$message({
type: "success",
message: "导入成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
handleSizeChange (val) {
this.pageSize = val

441
src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue

@ -0,0 +1,441 @@
<template>
<div>
<div>
<div>
<el-form ref="ref_form"
:inline="true"
:model="formData"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="场所区域"
prop="gridId"
label-width="150px"
style="display: block">
<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="场所类型"
label-width="150px"
prop="ninePlaceVal">
<el-select class="item_width_1"
v-model="formData.ninePlaceVal"
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="场所名称"
label-width="150px"
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.name"
:label="item.name">{{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"
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"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
</div>
</div>
<div class="div_btn">
<el-button @click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
placesList: [],//
teamsList: [],//
inspectorsList: [],//
placePatrolRecordId: '',
formData: {
gridId: '',//Id
ninePlaceVal: '',//value
placeOrgId: '',//Id-
placePatrolTeamId: '',//Id
inspectorArray: [],//
inspectors: '',//Id
firstTime: '',//
detailed: '',//
firstResult: '',//0: 1:
reviewTime: '',//
},
}
},
components: {},
mounted () {
},
methods: {
async initForm (type, placeOrgId) {
this.$refs.ref_form.resetFields();
await this.loadPlaces()
await this.loadTeams()
this.formType = type
if (placeOrgId) {
this.placeOrgId = placeOrgId
this.formData.placeOrgId = placeOrgId
await this.loadFormData()
}
},
//
async loadPlaces () {
// const url = '/gov/org/placeorg/getlist'
const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist'
let params = {
isPage: false
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.placesList = data.list
} else {
this.$message.error(msg)
}
},
//
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.teamsList = data.list
if (this.teamsList.length > 0) {
this.formData.placePatrolTeamId = this.teamsList[0].teamId
this.hancleChangeTeam(0)
}
} else {
this.$message.error(msg)
}
},
//
async hancleChangeTeam (index) {
// 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/placeorg/detail'
const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/detail'
let params = {
placeOrgId: this.placeOrgId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.formData = data
} else {
this.$message.error(msg)
}
},
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()
this.$emit('dialogCancle')
},
resetData () {
this.formData = {
gridId: '',//Id
ninePlaceVal: '',//value
placeOrgId: '',//Id-
placePatrolTeamId: '',//Id
inspectorArray: [],//
inspectors: '',//Id
firstTime: '',//
detailed: '',//
firstResult: '',//0: 1:
reviewTime: '',//
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
gridId: [
{ required: true, message: '场所网格不能为空', trigger: 'blur' }
],
ninePlaceVal: [
{ required: true, message: '场所类型不能为空', trigger: 'blur' },
],
placeOrgName: [
{ required: true, message: '场所名称不能为空', trigger: 'blur' }
],
placePatrolTeamId: [
{ required: true, message: '分队不能为空', trigger: 'blur' }
],
inspectorArray: [
{ required: true, message: '巡检人员不能为空', trigger: 'blur' }
],
firstTime: [
{ required: true, message: '首次巡查时间不能为空', trigger: 'blur' }
],
detailed: [
{ required: true, message: '隐患明细不能为空', trigger: 'blur' }
],
firstResult: [
{ required: true, message: '首次巡检结果不能为空', trigger: 'blur' }
]
}
},
},
props: {
gridList: {
type: Array,
default: []
},
resultList: {
type: Array,
default: []
},
placeTypeList: {
type: Array,
default: []
},
}
}
</script>
<style scoped>
.item_width_1 {
width: 500px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_btn {
display: flex;
justify-content: flex-end;
}
.form {
margin-top: 30px;
}
</style>

439
src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue

@ -0,0 +1,439 @@
<template>
<div>
<div class="div_table">
<el-button type="green"
size="small"
@click="handleAdd">新增</el-button>
<el-table class="table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50">
</el-table-column>
<el-table-column prop="reviewTime"
header-align="center"
align="center"
label="复查时间"
width="250">
<template slot-scope="scope">
<div v-if="scope.row.isSet">
<el-date-picker v-model="scope.row.reviewTime"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期">
</el-date-picker>
</div>
<span v-else>{{scope.row.reviewTime}}</span>
</template>
</el-table-column>
<el-table-column prop="ninePlaceName"
header-align="center"
align="center"
label="分队名称"
width="280">
<template slot-scope="scope">
<div v-if="scope.row.isSet">
<el-select class="item_width_1"
v-model="scope.row.placePatrolTeamId"
placeholder="请选择"
clearable>
<el-option v-for="(item,index) in teamsList"
@click.native="hancleChangeTeam(scope.row,index)"
:key="item.teamId"
:label="item.teamName"
:value="item.teamId">
</el-option>
</el-select>
</div>
<span v-else>{{scope.row.placePatrolTeamName}}</span>
</template>
</el-table-column>
<el-table-column prop="inspectorsNames"
header-align="center"
align="center"
label="检查人员"
min-width="380">
<template slot-scope="scope">
<div v-if="scope.row.isSet">
<!-- <el-select class="item_width_1"
multiple
v-model="inspectorArray"
placeholder="请选择"
clearable>
<el-option v-for="item in scope.row.inspectorsList"
:key="item.name"
:label="item.name"
:value="item.name">
</el-option>
</el-select> -->
<el-checkbox-group style="display:flex;flex-wrap:wrap"
v-model="inspectorArray[scope.$index]">
<el-checkbox v-for="item in scope.row.inspectorsList"
:key="item.name"
:label="item.name">{{item.name}}</el-checkbox>
</el-checkbox-group>
</div>
<span v-else>{{scope.row.inspectorsNames}}</span>
</template>
</el-table-column>
<el-table-column prop="reviewResult"
header-align="center"
align="center"
label="复查结论"
width="120">
<template slot-scope="scope">
<div v-if="scope.row.isSet">
<el-select class="item_width_2"
v-model="scope.row.reviewResult"
placeholder="全部"
clearable>
<el-option v-for="item in resultList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<span v-else>{{scope.row.reviewResult==='0'?'合格':'不合格'}}</span>
</template>
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="180"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleEdit(scope.row,scope.$index)">修改</el-button>
<el-button type="text"
style="color:#D51010;text-decoration: underline;"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="div_btn">
<el-button @click="handleCancle"> </el-button>
<el-button type="primary"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
let loading //
export default {
data () {
return {
tableLoading: false,
placePatrolRecordId: '',
tableData: [],
inspectorArray: [],
inspectorsList1: [
{
name: '张三'
},
{
name: '李四'
},
{
name: '王二麻'
},
],
inspectorsList2: [
{
name: '张三2'
},
{
name: '李四2'
},
{
name: '王二麻2'
},
],
inspectorsList3: [
{
name: '张三3'
},
{
name: '李四3'
},
{
name: '王二麻3'
},
]
}
},
components: {},
mounted () {
},
methods: {
async initTable (placePatrolRecordId) {
this.placePatrolRecordId = placePatrolRecordId
await this.loadTeams()
await this.loadTable()
},
//
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.teamsList = data.list
} else {
this.$message.error(msg)
}
},
//
async hancleChangeTeam (index) {
// this.formData.placePatrolTeamId = this.teamsList[index].teamId
await this.loadInspectors()
},
//
async loadInspectors (index) {
// const url = '/gov/org/placepatrolteamstaff/getlist'
const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist'
let params = {
teamId: this.tableData[index].placePatrolTeamId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let obj = this.tableData[index]
obj.isSet = true
obj.inspectorsList = this.inspectorsList1
this.$set(this.tableData, index, obj)
console.log(this.tableData)
} else {
this.$message.error(msg)
}
},
//form
async loadTable () {
this.tableLoading = true
// const url = /gov/org/placepatrolreviewrecord/getlist'
const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolreviewrecord/getlist'
let params = {
placePatrolRecordId: this.placePatrolRecordId
}
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (code === 0) {
this.tableData = data.list
this.tableData.forEach(item => {
item.isSet = false
let array = item.inspectors.split(',')
this.inspectorArray.push(array)
});
} else {
this.$message.error(msg)
}
},
handleAdd () {
let obj = {
isSet: true,
reviewTime: '',
placePatrolTeamId: '',
inspectors: '',
inspectorArray: [],
reviewResult: '',
}
this.tableData.push(obj)
},
handleEdit (row, index) {
this.loadInspectors(index)
},
async handleComfirm () {
this.addReview()
},
async addReview () {
// 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.$emit('dialogOk')
} else {
this.$message.error(msg)
}
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteRecord(row)
})
.catch(err => {
if (err == "cancel") {
}
});
},
async deleteRecord (row) {
// const url = "/gov/org/placepatrolrecord/delreview"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/delreview"
let params = {
placePatrolReviewRecordId: row.placePatrolReviewRecordId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
handleCancle () {
this.$emit('dialogCancle')
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return (this.clientHeight - 360)
},
...mapGetters(['clientHeight'])
},
props: {
resultList: {
type: Array,
default: []
}
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/buttonstyle.scss";
.item_width_1 {
width: 250px;
}
.item_width_2 {
width: 100px;
}
.div_table {
// background: #ffffff;
// box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
// border-radius: 4px;
.table {
margin-top: 20px;
}
}
.div_btn {
margin-top: 10px;
display: flex;
justify-content: flex-end;
}
</style>

553
src/views/modules/communityService/ninePlaces/inspect/unitsForm.vue

@ -1,553 +0,0 @@
<template>
<div>
<div>
<div>
<el-form ref="ref_form"
:inline="true"
:model="formData"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="所属网格"
prop="gridId"
label-width="150px"
style="display: block">
<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="unitName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入单位名称"
v-model="formData.unitName">
</el-input>
</el-form-item>
<el-form-item label="分类"
prop="type"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="formData.type"
placeholder="请选择"
filterable
clearable>
<el-option v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="服务事项"
prop="serviceMatter"
label-width="150px"
style="display: block">
<el-checkbox-group class="item_width_1"
style="display:flex;flex-wrap:wrap"
v-model="formData.serviceMatter">
<el-checkbox v-for="item in serviceList"
:key="item.value"
:label="item.value">{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="联系人"
prop="contact"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入联系人姓名"
v-model="formData.contact">
</el-input>
</el-form-item>
<el-form-item label="联系电话"
prop="contactMobile"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入联系人电话"
v-model="formData.contactMobile">
</el-input>
</el-form-item>
<el-form-item label="在职党员"
style="display: block"
prop="memberCount"
label-width="150px">
<el-input-number class="item_width_1"
v-model="formData.memberCount"
:min="1"
label="单元数"></el-input-number>
</el-form-item>
<el-form-item label="备注"
prop="remark"
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.remark"></el-input>
</el-form-item>
<el-form-item label="位置坐标"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width:500px">
<div class="div_map">
<div id="app">
</div>
<div class="div_searchmap">
<el-input class="item_width_4"
maxlength="50"
size="mini"
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="mini"
@click="handleSearchMap">查询</el-button>
</div>
</div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="formData.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="formData.latitude">
</el-input>
</div>
</div>
</el-form-item>
<el-form-item label="地理位置"
prop="address"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
v-model="formData.address">
</el-input>
</el-form-item>
</el-form>
</div>
</div>
<div class="div_btn">
<el-button @click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
unitId: '',
keyWords: '',
formData: {
gridId: '',
unitName: '',
serviceMatter: [],
type: '',
contact: '',
contactMobile: '',
memberCount: 0,
remark: '', //500
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519 //
},
}
},
components: {},
mounted () {
this.initMap()
},
methods: {
async initForm (type, unitId) {
this.$refs.ref_form.resetFields();
// debugger
// map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
this.formType = type
if (unitId) {
this.unitId = unitId
this.formData.id = unitId
await this.loadFormData()
}
},
//
async loadFormData () {
// const url = '/heart/icpartyunit/detail'
const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/detail'
let params = {
id: this.unitId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.formData = data
} else {
this.$message.error(msg)
}
},
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.addUnit()
}
})
},
async addUnit () {
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
// if (regPhone.test(this.formData.contactMobile) === false) {
// this.btnDisable = false
// this.$message({
// type: 'warning',
// message: ''
// })
// return false;
// }
// let url = '/heart/icpartyunit/save'
let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/save"
// if (this.formType === 'edit') {
// this.formData.id = this.unitId
// }
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()
this.$emit('dialogCancle')
},
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
])
},
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
})
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.formData.address = result.result.address
//
});
},
resetData () {
this.unitId = ''
this.keyWords = ''
this.formData = {
gridId: '',
unitName: '',
serviceMatter: [],
type: '',
contact: '',
contactMobile: '',
memberCount: 0,
remark: '', //500
address: '', //
longitude: '', //
latitude: '' //
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
gridId: [
{ required: true, message: '所属网格不能为空', trigger: 'blur' }
],
unitName: [
{ required: true, message: '单位名称不能为空', trigger: 'blur' },
],
type: [
{ required: true, message: '分类不能为空', trigger: 'blur' }
],
contact: [
{ required: true, message: '联系人不能为空', trigger: 'blur' }
],
contactMobile: [
{ required: true, message: '联系电话不能为空', trigger: 'blur' }
],
memberCount: [
{ required: true, message: '在职党员数不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '详细地址不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
}
},
},
props: {
gridList: {
type: Array,
default: []
},
typeList: {
type: Array,
default: []
},
serviceList: {
type: Array,
default: []
},
}
}
</script>
<style scoped>
.item_width_1 {
width: 500px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
.div_btn {
display: flex;
justify-content: flex-end;
}
.el-tabs {
margin: 0 20px;
}
.el-upload__tip {
color: rgb(155, 155, 155);
margin: 0;
}
.form {
margin-top: 30px;
}
</style>
<style lang=scss>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

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

@ -61,9 +61,9 @@
</el-form-item>
<el-form-item label="场所类型"
prop="ninePlacsVal">
prop="ninePlaceVal">
<el-select class="item_width_1"
v-model="formData.ninePlacsVal"
v-model="formData.ninePlaceVal"
placeholder="请选择"
clearable>
<el-option v-for="item in placeTypeList"
@ -219,7 +219,7 @@ export default {
mobile: '',//
scale: '',// 0:10 1:10-20 2:21-40 3:41-100 4:100
gridId: '',//Id
ninePlacsVal: '',//Value
ninePlaceVal: '',//Value
isPage: true,//(:true :false)
},
@ -313,10 +313,11 @@ export default {
},
async loadTable () {
this.tableLoading = true
// const url = "/gov/org/placeorg/getlist"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist"
const url = "/gov/org/placeorg/getlist"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
@ -393,8 +394,8 @@ export default {
},
async deletePlace (row) {
// const url = "/gov/org/placeorg/del"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/del"
const url = "/gov/org/placeorg/del"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/del"
let params = {
placeOrgId: row.placeOrgId
@ -421,7 +422,7 @@ export default {
mobile: '',//
scale: '',// 0:10 1:10-20 2:21-40 3:41-100 4:100
gridId: '',//Id
ninePlacsVal: '',//Value
ninePlaceVal: '',//Value
isPage: true,//(:true :false)
}
},

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

@ -11,9 +11,9 @@
<el-form-item label="场所类型"
label-width="150px"
prop="ninePlacsVal">
prop="ninePlaceVal">
<el-select class="item_width_1"
v-model="formData.ninePlacsVal"
v-model="formData.ninePlaceVal"
placeholder="请选择"
clearable>
<el-option v-for="item in placeTypeList"
@ -128,7 +128,7 @@ export default {
placeOrgId: '',
formData: {
gridId: '',
ninePlacsVal: '',
ninePlaceVal: '',
placeOrgName: '',
address: '',
scale: '',
@ -159,8 +159,8 @@ export default {
//
async loadFormData () {
// const url = '/gov/org/placeorg/detail'
const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/detail'
const url = '/gov/org/placeorg/detail'
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/detail'
let params = {
placeOrgId: this.placeOrgId
}
@ -209,12 +209,12 @@ export default {
let url = ''
if (this.formType === 'edit') {
// url = '/gov/org/placeorg/edit'
url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/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"
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)
@ -245,7 +245,7 @@ export default {
this.placeOrgId = ''
this.formData = {
gridId: '',
ninePlacsVal: '',
ninePlaceVal: '',
placeOrgName: '',
address: '',
scale: '',
@ -275,7 +275,7 @@ export default {
gridId: [
{ required: true, message: '所属网格不能为空', trigger: 'blur' }
],
ninePlacsVal: [
ninePlaceVal: [
{ required: true, message: '场所类型不能为空', trigger: 'blur' },
],
placeOrgName: [

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

@ -46,9 +46,9 @@
</el-form-item>
<el-form-item label="场所类型"
prop="ninePlacsVal">
prop="ninePlaceVal">
<el-select class="item_width_1"
v-model="formData.ninePlacsVal"
v-model="formData.ninePlaceVal"
placeholder="请选择"
clearable>
<el-option v-for="item in placeTypeList"
@ -88,43 +88,43 @@
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="placeOrgName"
<el-table-column prop="teamName"
header-align="center"
align="center"
label="分队名称"
min-width="180">
</el-table-column>
<el-table-column prop="address"
<el-table-column prop="personInCharge"
header-align="center"
align="center"
label="负责人"
min-width="180">
width="180">
</el-table-column>
<el-table-column prop="ninePlaceName"
<el-table-column prop="mobile"
header-align="center"
align="center"
label="联系电话"
min-width="110">
width="110">
</el-table-column>
<el-table-column prop="scale"
<el-table-column prop="gridNames"
header-align="center"
align="center"
label="负责区域"
min-width="280">
</el-table-column>
<el-table-column prop="personInCharge"
<el-table-column prop="ninePlaceNames"
header-align="center"
align="center"
label="负责场所类型"
min-width="180">
</el-table-column>
<el-table-column prop="mobile"
<el-table-column prop="plan"
header-align="center"
align="center"
label="监察计划"
min-width="180">
</el-table-column>
<el-table-column prop="mobile"
<el-table-column prop="time"
header-align="center"
align="center"
label="创建时间"
@ -212,7 +212,7 @@ export default {
personInCharge: '',//
mobile: '',//
gridId: '',//Id
ninePlacsVal: '',//Value
ninePlaceVal: '',//Value
isPage: true,//(:true :false)
},
@ -287,8 +287,8 @@ export default {
async loadTable () {
this.tableLoading = true
// const url = "/gov/org/placeorg/getlist"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist"
const url = "/gov/org/placepatrolteam/getlist"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
@ -300,6 +300,11 @@ export default {
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.tableData.forEach(item => {
let timeArray = item.time.split(' ')
item.time = timeArray[0]
});
} else {
this.$message.error(msg)
}
@ -365,8 +370,8 @@ export default {
},
async deleteTeam (row) {
// const url = "/gov/org/placepatrolteam/del"
const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/del"
const url = "/gov/org/placepatrolteam/del"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/del"
let params = {
teamId: row.teamId
@ -392,7 +397,7 @@ export default {
personInCharge: '',//
mobile: '',//
gridId: '',//Id
ninePlacsVal: '',//Value
ninePlaceVal: '',//Value
isPage: true,//(:true :false)
}
},

99
src/views/modules/communityService/ninePlaces/team/teamForm.vue

@ -37,12 +37,12 @@
</el-form-item>
<el-form-item label="负责场所类型"
prop="ninePlacsArray"
prop="ninePlaceArray"
label-width="150px"
style="display: block">
<el-checkbox-group class="item_width_1"
style="display:flex;flex-wrap:wrap"
v-model="formData.ninePlacsArray">
v-model="formData.ninePlaceArray">
<el-checkbox v-for="item in placeTypeList"
:key="item.value"
:label="item.value">{{item.label}}</el-checkbox>
@ -69,7 +69,7 @@
prop="time"
label-width="150px">
<el-date-picker v-model="formData.time"
value-format="yyyyMMdd"
value-format="yyyy-MM-dd HH:mm:ss"
type="date"
placeholder="选择日期">
</el-date-picker>
@ -102,7 +102,6 @@
prop="member">
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
size="mini"
icon="el-icon-plus"
@click="handleAddPerson"></el-button>
@ -110,24 +109,24 @@
:key="index"
class="div_person_list">
<span style="font-weight: bold">姓名</span>
<el-input v-if="item.isEdit"
<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-if="!item.isEdit">{{item.name}}</span>
v-else>{{item.name}}</span>
<span style="font-weight: bold;margin-left:20px">联系电话</span>
<el-input v-if="item.isEdit"
<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-if="!item.isEdit">{{item.mobile}}</span>
v-else>{{item.mobile}}</span>
<el-button style="margin-left:30px"
type="red"
@ -169,28 +168,18 @@ export default {
agencyId: '',//Id
teamName: '',//
gridIds: '',//
ninePlaceArray: [],
ninePlaceVals: '',//
gridIdArray: [],
ninePlacsVals: '',//
ninePlacsArray: [],
plan: '',//
time: '',//
personInCharge: '',//
mobile: '',//
memberList: ''//
memberList: [],//
member: '1'//
},
memberList: [
{
name: '成吉思汗',
mobile: '19999999999',
isEdit: false,
},
{
name: '成吉思汗',
mobile: '17465666567',
isEdit: true,
}
],
memberList: [],
}
},
@ -215,24 +204,32 @@ export default {
//
async loadFormData () {
// const url = '/gov/org/placepatrolteam/detail'
const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/detail'
const url = '/gov/org/placepatrolteam/detail'
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/detail'
let params = {
placePatrolTeamId: this.teamId
teamId: this.teamId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.formData = data
data.ninePlaceArray = data.ninePlaceVals.split(',')
data.gridIdArray = data.gridIds.split(',')
data.member = '1'
this.formData = { ...data }
this.memberList = this.formData.memberList
this.memberList.forEach(item => {
item.isSet = false
});
} else {
this.$message.error(msg)
}
},
async handleComfirm () {
this.btnDisable = true
@ -255,7 +252,7 @@ export default {
let obj = {
name: '',
mobile: '',
isEdit: true
isSet: true
}
this.memberList.push(obj)
@ -278,21 +275,32 @@ export default {
} else {
return false
}
if (this.formData.ninePlacsArray.length > 0) {
this.formData.ninePlacsVals = this.formData.ninePlacsArray.join(',')
if (this.formData.ninePlaceArray.length > 0) {
this.formData.ninePlaceVals = this.formData.ninePlaceArray.join(',')
} else {
return false
}
let msgMember = this.validataMemeberList()
if (msgMember) {
this.$message({
type: 'warning',
message: msgMember
})
return false
}
this.formData.memberList = this.memberList
let url = ''
if (this.formType === 'edit') {
// url = '/gov/org/placeorg/edit'
url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/edit'
url = '/gov/org/placepatrolteam/edit'
// url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/edit'
} else {
// url = "/gov/org/placepatrolteam/add"
url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/add"
url = "/gov/org/placepatrolteam/add"
// url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/add"
}
const { data, code, msg } = await requestPost(url, this.formData)
@ -312,6 +320,18 @@ export default {
},
validataMemeberList () {
if (this.memberList.length === 0) {
return '成员列表不能为空'
}
this.memberList.forEach(element => {
if (!element.mobile || !element.name) {
return '成员的姓名和电话不能为空'
}
});
return ''
},
handleCancle () {
this.resetData()
@ -326,14 +346,15 @@ export default {
teamName: '',//
gridIds: '',//
gridIdArray: [],
ninePlacsVals: '',//
ninePlacsArray: [],
ninePlaceVals: '',//
ninePlaceArray: [],
plan: '',//
time: '',//
personInCharge: '',//
mobile: '',//
member: '1'//
}
this.memberList = []
},
//
startLoading () {
@ -360,7 +381,7 @@ export default {
gridIdArray: [
{ required: true, message: '负责区域不能为空', trigger: 'blur' },
],
ninePlacsArray: [
ninePlaceArray: [
{ required: true, message: '场所类型不能为空', trigger: 'blur' }
],

Loading…
Cancel
Save