Browse Source

页面调整

V1.0
tianq 3 years ago
parent
commit
07d3ff2b0c
  1. 95
      src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/addForm.vue
  2. 8
      src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/index.vue
  3. 89
      src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/record.vue
  4. 38
      src/views/modules/shequzhili/tuceng/anquan/shebei/addForm.vue
  5. 8
      src/views/modules/shequzhili/tuceng/anquan/shebei/index.vue
  6. 87
      src/views/modules/shequzhili/tuceng/anquan/yinhuan/addForm.vue
  7. 11
      src/views/modules/shequzhili/tuceng/anquan/yinhuan/index.vue
  8. 38
      src/views/modules/shequzhili/tuceng/chengshiguanli/addForm.vue
  9. 8
      src/views/modules/shequzhili/tuceng/chengshiguanli/index.vue
  10. 38
      src/views/modules/shequzhili/tuceng/gonggong/addForm.vue
  11. 8
      src/views/modules/shequzhili/tuceng/gonggong/index.vue
  12. 40
      src/views/modules/shequzhili/tuceng/gonggongfuwu/addForm.vue
  13. 10
      src/views/modules/shequzhili/tuceng/gonggongfuwu/index.vue
  14. 40
      src/views/modules/shequzhili/tuceng/yingji/changsuo/addForm.vue
  15. 8
      src/views/modules/shequzhili/tuceng/yingji/changsuo/index.vue
  16. 40
      src/views/modules/shequzhili/tuceng/yingji/wuzi/addForm.vue
  17. 8
      src/views/modules/shequzhili/tuceng/yingji/wuzi/index.vue
  18. 40
      src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue
  19. 24
      src/views/modules/shequzhili/tuceng/yingji/zizuzhi/index.vue

95
src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/addForm.vue

@ -10,36 +10,31 @@
<el-form-item label="占地面积" prop="areaCovered">
<el-input v-model="formData.areaCovered" :disabled="disabled" class="u-item-width-normal" size="small" clearable placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="场所类别" prop="placeCategory">
<el-select v-model="formData.placeCategory" :disabled="disabled" placeholder="请选择" size="small" clearable class="u-item-width-normal">
<el-option v-for="item in placeCategoryArray" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="场所类型" prop="placeType">
<el-select class="u-item-width-normal" :disabled="disabled" v-model="formData.placeType" placeholder="全部" size="small" 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="result">
<el-select v-model="formData.result" :disabled="disabled" placeholder="请选择" size="small" clearable class="u-item-width-normal">
<el-option v-for="item in resultArray" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="场所规模" prop="scaleTotal">
<el-input
<el-input-number
v-model="formData.scaleTotal"
:disabled="disabled"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入可容纳人数"
></el-input>
></el-input-number>
</el-form-item>
<el-form-item label="所属组织" prop="gridId">
<el-select v-model="formData.gridId" class="u-item-width-normal" :disabled="disabled" placeholder="全部" size="small" 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="placeCategory">
<el-select v-model="formData.placeCategory" :disabled="disabled" placeholder="请选择" size="small" clearable class="u-item-width-normal">
<el-option v-for="item in placeCategoryArray" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="场所类型" prop="placeType">
<el-select class="u-item-width-normal" :disabled="disabled" v-model="formData.placeType" placeholder="全部" size="small" 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="personInCharge">
<el-input v-model="formData.personInCharge" :disabled="disabled" class="u-item-width-normal" size="small" clearable placeholder="请输入"></el-input>
@ -79,18 +74,16 @@
<el-col :span="8">
<el-form-item label="场所名称" prop="placeOrgName">{{ formData.placeOrgName }}</el-form-item>
<el-form-item label="占地面积" prop="areaCovered">{{ formData.areaCovered }}</el-form-item>
<el-form-item label="场所类别" prop="placeCategory">{{ formData.placeCategoryName }}</el-form-item>
<el-form-item label="场所类型" prop="placeType">{{ formData.placeTypeName }}</el-form-item>
<el-form-item label="巡查结果" prop="result">{{ formData.latestResultName }}</el-form-item>
<el-form-item label="场所规模" prop="scaleTotal">{{ formData.scaleTotal }}</el-form-item>
<el-form-item label="所属组织" prop="gridId">{{ formData.gridName }}</el-form-item>
<el-form-item label="场所类别" prop="placeCategory">{{ formData.placeCategoryName }}</el-form-item>
<el-form-item label="场所类型" prop="placeType">{{ formData.placeTypeName }}</el-form-item>
<el-form-item label="负责人" prop="personInCharge">{{ formData.personInCharge }}</el-form-item>
<el-form-item label="联系电话" prop="mobile">{{ formData.areaCovered }}</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="场所地址" prop="address" style="display: block">
{{ formData.address }}
<div id="app_event" class="div_map"></div>
</el-form-item>
</el-col>
@ -99,7 +92,7 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div>
@ -179,6 +172,7 @@ export default {
placeOrgName: '',
scaleTotal: '',
gridId: '',
latestResult: '',
placeCategory: '',
placeType: '',
personInCharge: '',
@ -210,7 +204,7 @@ export default {
components: { record },
created() {},
async mounted() {
console.log('detailId', this.detailId);
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.startLoading();
@ -257,23 +251,14 @@ export default {
const url = `/actual/base/enterprise/detail/${this.detailId}`;
const { data, code, msg } = await requestPost(url);
if (code === 0) {
console.log('详情数据', data);
this.formData = { ...data };
this.initMap();
} else {
this.$message.error(msg);
}
},
async getList() {
const url = `/actual/base/enterprise/patrollist/${this.detailId}`;
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.list = data;
} else {
this.$message.error(msg);
}
},
handleComfirm() {
this.save();
},
@ -304,8 +289,8 @@ export default {
},
async save() {
console.log('this.formData', this.formData);
this.formData.agencyId=this.agencyId;
this.formData.agencyId = this.agencyId;
var url = '';
var params = {};
url = '/actual/base/enterprise/addOrUpdate';
@ -313,7 +298,7 @@ export default {
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success('操作成功');
this.resetData();
this.handleCancle();
// // this.resetData();
// this.$emit('handleComfirm');
@ -322,7 +307,7 @@ export default {
}
},
handleCancle() {
this.resetData();
// this.resetData();
this.$emit('handleClose');
},
resetData() {
@ -356,22 +341,22 @@ export default {
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});
@ -401,7 +386,7 @@ export default {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList;
this.searchOptions = this.resultList.map(item => {
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` };
return { value: `${item.id}`, label: `${item.address + item.name}` };
});
}
} else {

8
src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/index.vue

@ -91,11 +91,13 @@
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>

89
src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/record.vue

@ -8,25 +8,25 @@
<div class="m-table-item">
<el-table :data="tableData" class="resi-table" row-key="id" border style="width: 100%">
<el-table-column label="序号" type="index" align="center" width="50"></el-table-column>
<el-table-column prop="inspectTime" label="检查时间" align="center" width="200px">
<el-table-column prop="patrolTime" label="检查时间" align="center" width="200px">
<template slot-scope="scope">
<el-date-picker
v-if="scope.row.isEdit"
v-model="scope.row.inspectTime"
v-model="scope.row.patrolTime"
type="date"
class="input-width"
value-format="yyyy-MM-dd"
placeholder="选择日期"
></el-date-picker>
<div v-else class="div-content">{{ scope.row.inspectTime }}</div>
<div v-else class="div-content">{{ scope.row.patrolTime }}</div>
</template>
</el-table-column>
<el-table-column prop="inspectStaffId" label="检查人员" align="center" width="200px">
<el-table-column prop="staffId" label="检查人员" align="center" width="200px">
<template slot-scope="scope">
<el-select
v-if="scope.row.isEdit"
v-model="scope.row.inspectStaffId"
v-model="scope.row.staffId"
placeholder="请选择"
class="input-width"
@change="handleChangeStaff(scope.row)"
@ -34,31 +34,23 @@
>
<el-option v-for="subItem in optionStaff" :key="subItem.value" :label="subItem.label" :value="subItem.value"></el-option>
</el-select>
<div v-else class="div-content">{{ scope.row.inspectStaffName }}</div>
<div v-else class="div-content">{{ scope.row.staffName }}</div>
</template>
</el-table-column>
<el-table-column prop="inspectStaffMobile" label="联系电话" align="center" width="200px">
<el-table-column prop="mobile" label="联系电话" align="center" width="200px">
<template slot-scope="scope">
<el-input
v-if="scope.row.isEdit"
type="number"
v-model="scope.row.inspectStaffMobile"
placeholder="请输入"
class="input-width"
clearable
disabled
></el-input>
<div v-else class="div-content">{{ scope.row.inspectStaffMobile }}</div>
<el-input v-if="scope.row.isEdit" type="number" v-model="scope.row.mobile" placeholder="请输入" class="input-width" clearable disabled></el-input>
<div v-else class="div-content">{{ scope.row.mobile }}</div>
</template>
</el-table-column>
<el-table-column prop="inspectResult" label="检查结果" align="center" width="200px">
<el-table-column prop="result" label="检查结果" align="center" width="200px">
<template slot-scope="scope">
<el-select v-if="scope.row.isEdit" v-model="scope.row.inspectResult" placeholder="请选择" class="input-width" size="small" clearable>
<el-select v-if="scope.row.isEdit" v-model="scope.row.result" placeholder="请选择" class="input-width" size="small" clearable>
<el-option v-for="subItem in optionResult" :key="subItem.value" :label="subItem.label" :value="subItem.value"></el-option>
</el-select>
<div v-else class="div-content">{{ scope.row.inspectResult == 1 ? '正常' : '异常' }}</div>
<div v-else class="div-content">{{ scope.row.result == 1 ? '正常' : '异常' }}</div>
</template>
</el-table-column>
@ -84,7 +76,7 @@
</template>
</el-table-column> -->
<el-table-column prop="imgList" label="图片列表" align="center" width="150px">
<el-table-column prop="imgList" label="图片列表" align="center" >
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-upload
@ -94,7 +86,7 @@
:data="{ customerId: customerId }"
:show-file-list="true"
:limit="3"
:file-list="scope.row.imgShowList"
:file-list="scope.row.imgList"
:on-success="res => handleImgSuccess(res, scope.row)"
:on-remove="res => handleImgRemove(res, scope.row)"
list-type="picture"
@ -117,17 +109,17 @@
</template>
</el-table-column>
<el-table-column prop="nextInspectTime" label="拟复查时间" align="center" width="200px">
<el-table-column prop="reviewTime" label="拟复查时间" align="center" width="200px">
<template slot-scope="scope">
<el-date-picker
v-if="scope.row.isEdit"
v-model="scope.row.nextInspectTime"
v-model="scope.row.reviewTime"
type="date"
class="input-width"
value-format="yyyy-MM-dd"
placeholder="选择日期"
></el-date-picker>
<div v-else class="div-content">{{ scope.row.nextInspectTime }}</div>
<div v-else class="div-content">{{ scope.row.reviewTime }}</div>
</template>
</el-table-column>
@ -221,7 +213,6 @@ export default {
watch: {
id: {
handler(val) {
console.log('val------points', val);
if (val.length > 0) {
this.btnDisabled = false;
this.getList();
@ -232,9 +223,7 @@ export default {
},
created() {
console.log('id', this.id);
this.getOptionStaff();
this.getList();
},
methods: {
@ -256,7 +245,6 @@ export default {
},
handleImgSuccess(res, row) {
console.log('handleImgSuccess', res);
if (res.code === 0 && res.msg === 'success') {
row.imgList.push(res.data.url);
this.computeImgShowList(row);
@ -272,7 +260,6 @@ export default {
},
handleImgRemove(file, row) {
console.log('handleImgRemove', file);
let url = file.url || file.response.data.url;
if (url) {
row.imgList = row.imgList.filter(item => item !== url);
@ -287,13 +274,11 @@ export default {
},
handleChange(row, type) {
console.log('type----', type);
if (type == 'cancle') {
row = { ...this.tempRow };
row.isEdit = false;
if (this.btnType == 'add') this.tableData.pop();
this.getList();
console.log('row----', row);
} else {
this.tempRow = { ...row };
row.isEdit = true;
@ -303,12 +288,12 @@ export default {
},
handleChangeStaff(row) {
const { inspectStaffId } = row;
const { staffId } = row;
const { optionStaff } = this;
let item = optionStaff.find(item => item.value == inspectStaffId);
let item = optionStaff.find(item => item.value == staffId);
if (item) {
row.inspectStaffName = item.name;
row.inspectStaffMobile = item.mobile;
row.staffName = item.name;
row.mobile = item.mobile;
}
},
@ -334,14 +319,14 @@ export default {
const item = {
isEdit: true,
id: this.id,
inspectTime: '',
inspectStaffId: '',
inspectStaffName: '',
inspectStaffMobile: '',
inspectResult: '',
imgList: [],
nextInspectTime: ''
enterpriseId: this.id,
patrolTime: '',
staffId: '',
staffName: '',
mobile: '',
result: '',
reviewTime: '',
imgList: []
};
this.computeImgShowList(item);
this.tableData.push(item);
@ -382,7 +367,7 @@ export default {
},
async del(row) {
const url = `/actual/base/enterprise/del-patrol/${this.id}`;
const url = `/actual/base/enterprise/del-patrol/${row.patrolId}`;
const { data, code, msg } = await requestPost(url);
if (code === 0) {
@ -394,17 +379,11 @@ export default {
},
async getList() {
const url = `/actual/base/enterprise/patrollist/`;
console.log('this.id', this.id);
const params = {
enterpriseId: this.id,
pageNo: 1,
pageSize: 10000
};
const { data, code, msg } = await requestPost(url, params);
const url = `/actual/base/enterprise/patrollist/${this.id}`;
console.log('getList---------------------------------------------------------------------------', url);
const { data, code, msg } = await requestPost(url);
if (code === 0) {
console.log('data', data);
this.tableData = data.list.map(item => {
this.computeImgShowList(item);
return {

38
src/views/modules/shequzhili/tuceng/anquan/shebei/addForm.vue

@ -66,7 +66,7 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div>
@ -301,7 +301,7 @@ export default {
}, // init
initMap() {
let { latitude, longitude } = this.$store.state.user;
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude;
longitude = this.formData.longitude;
@ -310,24 +310,24 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});

8
src/views/modules/shequzhili/tuceng/anquan/shebei/index.vue

@ -63,11 +63,13 @@
<el-table-column prop="contactNum" align="center" :show-overflow-tooltip="true" label="联系电话"></el-table-column>
<el-table-column prop="latestInspectTime" align="center" width="100" label="最新检查时间" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="latestInspectResultName" align="center" label="最新检查结果" :show-overflow-tooltip="true"></el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>

87
src/views/modules/shequzhili/tuceng/anquan/yinhuan/addForm.vue

@ -37,7 +37,7 @@
:action="uploadUrl"
:show-file-list="true"
:limit="3"
:file-list="formData.imgShowList"
:file-list="formData.imgList"
:on-success="res => handleImgSuccess(res, formData)"
:on-remove="res => handleImgRemove(res, formData)"
list-type="picture"
@ -74,7 +74,7 @@
<el-form-item label="隐患位置" prop="location" style="display: block">
<el-select
v-model="formData.location"
style="width: 200px;"
style="width: 500px;"
:disabled="disabled"
filterable
remote
@ -102,7 +102,18 @@
<el-form-item label="上报时间" prop="reportTime">{{ formData.reportTime }}</el-form-item>
<el-form-item label="隐患场所" prop="dangerPlaceName">{{ formData.dangerPlaceName }}</el-form-item>
<el-form-item label="所属网格" prop="gridId">{{ formData.gridName }}</el-form-item>
<el-form-item label="隐患内容" prop="dangerContent">{{ formData.dangerContent }}</el-form-item>
<el-form-item label="隐患内容" prop="dangerContent">
<div>{{ formData.dangerContent }}</div>
<div class="div-content">
<el-image
v-if="formData.imgList.length > 0"
style="width: 100px; height: 50px"
:src="formData.imgList[0]"
fit="cover"
:preview-src-list="formData.imgList"
></el-image>
</div>
</el-form-item>
<el-form-item label="处理情况" prop="handleStateName">{{ formData.handleStateName }}</el-form-item>
<el-form-item label="上报人" prop="reportPerson">{{ formData.reportPerson }}</el-form-item>
<el-form-item label="联系电话" prop="mobile">{{ formData.mobile }}</el-form-item>
@ -110,7 +121,7 @@
<el-col :span="16">
<el-form-item label="场所地址" prop="location" style="display: block">
{{ formData.location }}
<div id="app_event" class="div_map"></div>
<!-- <div id="app_event" class="div_map"></div> -->
</el-form-item>
</el-col>
</el-row>
@ -118,10 +129,10 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div>
<!-- <div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div> -->
</el-card>
</template>
@ -185,16 +196,14 @@ export default {
equipmentCategoryCodeArray: [{ value: '0', label: '九小场所' }, { value: '1', label: '企事业单位' }],
list: {},
formData: {
equipmentName: '',
scaleTotal: '',
reportTime: '',
dangerPlaceName: '',
gridId: '',
equipmentCategoryCode: '',
placeType: '',
principalName: '',
location: '',
contactNum: '',
// result: '',
remark: ''
dangerContent: '',
imgList: [],
reportPerson: '',
mobile: '',
location: ''
},
dataRule: {
reportTime: [{ required: true, message: '上报时间不能为空', trigger: 'bulr' }],
@ -209,7 +218,9 @@ export default {
//
loading: false,
searchValue: '',
searchOptions: []
searchOptions: [],
resultList: [],
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2'
};
},
watch: {},
@ -300,7 +311,7 @@ export default {
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success('操作成功');
this.handleCancle();
// // this.resetData();
} else if (code >= 8000) {
@ -328,7 +339,8 @@ export default {
if (loading) {
loading.close();
}
}, // init
},
// init
initMap() {
let { latitude, longitude } = this.$store.state.user;
@ -342,22 +354,22 @@ export default {
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});
@ -387,7 +399,7 @@ export default {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList;
this.searchOptions = this.resultList.map(item => {
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` };
return { value: `${item.id}`, label: `${item.address + item.name}` };
});
}
} else {
@ -412,7 +424,6 @@ export default {
this.formData.location = selPosition.address + selPosition.name;
},
handleImgSuccess(res, row) {
console.log('handleImgSuccess', res);
if (res.code === 0 && res.msg === 'success') {
row.imgList.push(res.data.url);
this.computeImgShowList(row);
@ -421,7 +432,6 @@ export default {
}
},
handleImgRemove(file, row) {
console.log('handleImgRemove', file);
let url = file.url || file.response.data.url;
if (url) {
row.imgList = row.imgList.filter(item => item !== url);
@ -430,7 +440,6 @@ export default {
},
beforeImgUpload(file) {
console.log(file);
const isLt1M = file.size / 1024 / 1024 < 10;
const srcType = file.type;
const format = file.name.split('.').pop();
@ -457,7 +466,7 @@ export default {
// border:none;background-color: transparent;
}
.div_map {
width: 100%;
width: 500px;
}
.form-item::v-deep .el-form-item__label {
color: #fff;

11
src/views/modules/shequzhili/tuceng/anquan/yinhuan/index.vue

@ -77,11 +77,13 @@
<el-table-column prop="dangerContent" align="center" :show-overflow-tooltip="true" label="隐患内容"></el-table-column>
<el-table-column prop="handleStateName" align="center" label="处理结果" :show-overflow-tooltip="true"></el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -148,7 +150,8 @@ export default {
detailId: '',
detailData: {},
multipleSelection: [],
rowObj: {}
rowObj: {},
};
},
components: { addForm },

38
src/views/modules/shequzhili/tuceng/chengshiguanli/addForm.vue

@ -65,7 +65,7 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div>
@ -313,7 +313,7 @@ export default {
}, // init
initMap() {
let { latitude, longitude } = this.$store.state.user;
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude;
longitude = this.formData.longitude;
@ -322,24 +322,24 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});

8
src/views/modules/shequzhili/tuceng/chengshiguanli/index.vue

@ -79,11 +79,13 @@
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>

38
src/views/modules/shequzhili/tuceng/gonggong/addForm.vue

@ -69,7 +69,7 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div>
@ -296,7 +296,7 @@ export default {
}, // init
initMap() {
let { latitude, longitude } = this.$store.state.user;
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude;
longitude = this.formData.longitude;
@ -305,24 +305,24 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});

8
src/views/modules/shequzhili/tuceng/gonggong/index.vue

@ -68,11 +68,13 @@
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>

40
src/views/modules/shequzhili/tuceng/gonggongfuwu/addForm.vue

@ -70,7 +70,7 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<!-- <div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div> -->
@ -292,7 +292,7 @@ export default {
}, // init
initMap() {
let { latitude, longitude } = this.$store.state.user;
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude;
longitude = this.formData.longitude;
@ -301,24 +301,24 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});
@ -349,7 +349,7 @@ export default {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList;
this.searchOptions = this.resultList.map(item => {
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` };
return { value: `${item.id}`, label: `${item.address + item.name}` };
});
}
} else {

10
src/views/modules/shequzhili/tuceng/gonggongfuwu/index.vue

@ -68,13 +68,13 @@
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text" v-if="agencyId == scope.row.agencyId">
编辑
</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="" v-if="agencyId == scope.row.agencyId">删除</el-button>
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>

40
src/views/modules/shequzhili/tuceng/yingji/changsuo/addForm.vue

@ -65,7 +65,7 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div>
@ -286,7 +286,7 @@ export default {
}, // init
initMap() {
let { latitude, longitude } = this.$store.state.user;
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude;
longitude = this.formData.longitude;
@ -295,24 +295,24 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});
@ -342,7 +342,7 @@ export default {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList;
this.searchOptions = this.resultList.map(item => {
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` };
return { value: `${item.id}`, label: `${item.address + item.name}` };
});
}
} else {

8
src/views/modules/shequzhili/tuceng/yingji/changsuo/index.vue

@ -59,11 +59,13 @@
<el-table-column prop="capacity" align="center" width="110" label="场所规模" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="address" align="center" :show-overflow-tooltip="true" label="场所地址"></el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>

40
src/views/modules/shequzhili/tuceng/yingji/wuzi/addForm.vue

@ -69,7 +69,7 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div>
@ -310,7 +310,7 @@ export default {
}, // init
initMap() {
let { latitude, longitude } = this.$store.state.user;
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude;
longitude = this.formData.longitude;
@ -319,24 +319,24 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});
@ -366,7 +366,7 @@ export default {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList;
this.searchOptions = this.resultList.map(item => {
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` };
return { value: `${item.id}`, label: `${item.address + item.name}` };
});
}
} else {

8
src/views/modules/shequzhili/tuceng/yingji/wuzi/index.vue

@ -76,11 +76,13 @@
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>

40
src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue

@ -66,7 +66,7 @@
</div>
<div class="div_btn">
<el-button size="small" @click="handleCancle">关闭</el-button>
<el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button>
<!-- <el-button size="small" @click="resetData" v-if="pageType != 'view'">重置</el-button> -->
<el-button size="small" type="primary" :disabled="btnDisable" @click="handleComfirm" v-if="pageType != 'view'"> </el-button>
</div>
<div style="margin-top: 30px;"><record v-if="pageType != 'add' && detailId" :formType="pageType" :id="detailId" :info="{ agencyId: agencyId }"></record></div>
@ -293,7 +293,7 @@ export default {
}, // init
initMap() {
let { latitude, longitude } = this.$store.state.user;
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude;
longitude = this.formData.longitude;
@ -302,24 +302,24 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
} else {
map.setCenter(latitude, longitude);
map = new daiMap(
document.getElementById('app_event'),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45 //
}
);
//
map.on('dragend', e => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
if (this.formData.latitude) {
map.setMarker(latitude, longitude);
}
});
@ -349,7 +349,7 @@ export default {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList;
this.searchOptions = this.resultList.map(item => {
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` };
return { value: `${item.id}`, label: `${item.address + item.name}` };
});
}
} else {

24
src/views/modules/shequzhili/tuceng/yingji/zizuzhi/index.vue

@ -69,11 +69,29 @@
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="130">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button>
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button>
<el-button @click="handleDel(scope.row)" type="text" size="small" class="">删除</el-button>
<el-button
v-if="scope.row.latitude && agencyId == scope.row.agencyId"
style="margin-right: 10px"
@click="handleAdd(scope.row, 'edit')"
size="small"
type="text"
>
编辑
</el-button>
<el-button
v-if="!scope.row.latitude && agencyId == scope.row.agencyId"
style="margin-right: 10px"
@click="handleAdd(scope.row, 'edit')"
size="small"
type="text"
>
待完善
</el-button>
<el-button @click="handleDel(scope.row)" v-if="agencyId == scope.row.agencyId" type="text" size="small" class="">删除</el-button>
</template>
</el-table-column>
</el-table>

Loading…
Cancel
Save