Browse Source

Merge branch 'dev-mapconfig' into shibei_master

shibei_master
jiangyy 4 years ago
parent
commit
5296758328
  1. 2
      .env.production
  2. 67
      src/assets/scss/buttonstyle copy.scss
  3. 24
      src/assets/scss/modules/visual/incident-info.scss
  4. 381
      src/views/modules/communityService/sqzzz/index.vue
  5. 757
      src/views/modules/shequzhili/event copy/cpts/add.vue
  6. 350
      src/views/modules/shequzhili/event copy/cpts/event-detail.vue
  7. 624
      src/views/modules/shequzhili/event copy/cpts/event-info.vue
  8. 665
      src/views/modules/shequzhili/event copy/cpts/process-form-demand.vue
  9. 603
      src/views/modules/shequzhili/event copy/cpts/process-form-project.vue
  10. 236
      src/views/modules/shequzhili/event copy/cpts/process-form-replay.vue
  11. 236
      src/views/modules/shequzhili/event copy/cpts/process-form.vue
  12. 663
      src/views/modules/shequzhili/event copy/eventList.vue
  13. 4
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  14. 2
      src/views/modules/shequzhili/event/eventList.vue
  15. 2
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  16. 10
      src/views/modules/visual/communityGovern/shijianchuli/event-info.vue
  17. 357
      src/views/modules/workSys/mapConfig.vue

2
.env.production

@ -1,4 +1,4 @@
NODE_ENV=production
VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api
VUE_APP_NODE_ENV=prod
VUE_APP_PUBLIC_PATH=epmet-oper
VUE_APP_PUBLIC_PATH=epmet-oper

67
src/assets/scss/buttonstyle copy.scss

@ -1,67 +0,0 @@
//新增
.el-button--add {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--add:hover {
color: #fff;
background-color: #05b1b4;
border-color: #05b1b4;
}
.el-button--add:focus {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
//删除导入
.el-button--delete {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
.el-button--delete:hover {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
.el-button--delete:focus {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
//重置导出
.el-button--reset {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--reset:hover {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--reset:focus {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
//查询确定
.el-button--search:hover {
color: #fff;
background-color: #3e8ef7;
border-color: #3e8ef7;
}
.el-button--search:focus {
color: #fff;
background-color: #3e8ef7;
border-color: #3e8ef7;
}
.el-button--search {
color: #fff;
background-color: #3e8ef7;
border-color: #3e8ef7;
}

24
src/assets/scss/modules/visual/incident-info.scss

@ -103,17 +103,7 @@
.info-content {
margin: 20px 0;
}
.info-pics {
display: flex;
margin: 20px 0;
img {
display: block;
width: 32%;
height: 90px;
margin-right: 9px;
object-fit: cover;
}
}
.info-prop {
position: relative;
@ -144,6 +134,18 @@
border-radius: 3px;
margin-right: 10px;
}
.info-pics {
display: flex;
margin: 20px 0;
img {
display: block;
width: 32%;
height: 90px;
margin-right: 9px;
object-fit: cover;
}
}
}
}

381
src/views/modules/communityService/sqzzz/index.vue

@ -1,149 +1,135 @@
<template>
<div class="resi-container">
<el-card ref="searchCard" class="search-card">
<el-form
ref="searchForm"
:inline="true"
:model="fmData"
class="demo-form-inline"
>
<el-form-item label="组织名称" prop="organizationName">
<el-input
v-model="fmData.organizationName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
<el-card ref="searchCard"
class="search-card">
<el-form ref="searchForm"
:inline="true"
:model="fmData"
class="demo-form-inline">
<el-form-item label="组织名称"
prop="organizationName">
<el-input v-model="fmData.organizationName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="fmData.createTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
>
<el-form-item label="创建时间"
prop="createTime">
<el-date-picker v-model="fmData.createTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="fmData.remark"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
<el-form-item label="备注"
prop="remark">
<el-input v-model="fmData.remark"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item>
<el-button
class="diy-button--search"
size="small"
@click="handleSearch"
>查询</el-button
>
<el-button
class="diy-button--reset"
size="small"
@click="resetForm('searchForm')"
>重置</el-button
>
<el-button class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button class="diy-button--reset"
size="small"
@click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button class="diy-button--add" size="small" @click="handleAdd"
>新增</el-button
>
<el-button
class="diy-button--export"
size="small"
@click="handleExportModule('room')"
>下载模板</el-button
>
<el-upload
ref="upload"
class="upload-btn"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button
size="small"
class="diy-button--delete"
:loading="importLoading"
>{{ importBtnTitle }}</el-button
>
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
<el-button class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload ref="upload"
class="upload-btn"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
<el-button size="small"
class="diy-button--delete"
:loading="importLoading">{{ importBtnTitle }}</el-button>
</el-upload>
<el-button @click="handleChu" class="diy-button--reset" size="small"
>导出</el-button
>
<el-button @click="handleChu"
class="diy-button--reset"
size="small">导出</el-button>
</div>
<el-table
:data="tableData"
border
style="width: 100%"
class="resi-table"
:height="maxTableHeight"
>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column
prop="organizationName"
label="组织名称"
align="center"
>
<el-table :data="tableData"
border
style="width: 100%"
class="resi-table"
:height="maxTableHeight">
<el-table-column label="序号"
type="index"
align="center"
width="50" />
<el-table-column prop="organizationName"
label="组织名称"
align="center">
<template slot-scope="scope">
<a class="name-a" @click="handleWatch(scope.$index)">
<a class="name-a"
@click="handleWatch(scope.$index)">
{{ scope.row.organizationName }}
</a>
</template>
</el-table-column>
<el-table-column
prop="categoryName"
align="center"
label="分类名称"
>
<el-table-column prop="categoryName"
align="center"
label="分类名称">
</el-table-column>
<el-table-column
prop="organizationPersonCount"
align="center"
label="组织人数"
>
<el-table-column prop="organizationPersonCount"
align="center"
label="组织人数">
</el-table-column>
<el-table-column
prop="serviceItem"
label="服务事项"
align="center"
:show-overflow-tooltip="true"
>
<el-table-column prop="serviceItem"
label="服务事项"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="score" width="100" align="center" label="积分">
<el-table-column prop="score"
width="100"
align="center"
label="积分">
</el-table-column>
<el-table-column prop="principalName" align="center" label="负责人">
<el-table-column prop="principalName"
align="center"
label="负责人">
</el-table-column>
<el-table-column prop="principalPhone" align="center" label="联系电话">
<el-table-column prop="principalPhone"
align="center"
label="联系电话">
</el-table-column>
<el-table-column prop="remark" align="center" label="备注">
<el-table-column prop="remark"
align="center"
label="备注">
</el-table-column>
<el-table-column
prop="organizationCreatedTime"
align="center"
label="创建时间"
>
<el-table-column prop="organizationCreatedTime"
align="center"
label="创建时间">
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="160">
<el-table-column fixed="right"
label="操作"
align="center"
width="160">
<template slot-scope="scope">
<!-- <el-button
@click="handleWatch(scope.$index)"
@ -151,85 +137,64 @@
size="small"
>查看</el-button
> -->
<el-button
type="text"
class="div-table-button--detail"
size="small"
@click="handleScore(scope.row)"
>积分记录</el-button
>
<el-button
@click="handleEdit(scope.$index)"
type="text"
size="small"
class="div-table-button--edit"
>修改</el-button
>
<el-popconfirm
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row, scope.$index)"
@confirm="handleDel(scope.row, scope.$index)"
>
<el-button
slot="reference"
type="text"
size="small"
class="div-table-button--delete"
style="margin-left: 10px"
>删除</el-button
>
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleScore(scope.row)">积分记录</el-button>
<el-button @click="handleEdit(scope.$index)"
type="text"
size="small"
class="div-table-button--edit">修改</el-button>
<el-popconfirm title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row, scope.$index)"
@confirm="handleDel(scope.row, scope.$index)">
<el-button slot="reference"
type="text"
size="small"
class="div-table-button--delete"
style="margin-left: 10px">删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</el-card>
<!-- 修改弹出框 -->
<el-dialog
:visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleClose"
>
<edit-form
ref="eleEditForm"
@dialogCancle="handleClose"
@dialogOk="handleEditSuccess"
></edit-form>
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleClose">
<edit-form ref="eleEditForm"
@dialogCancle="handleClose"
@dialogOk="handleEditSuccess"></edit-form>
</el-dialog>
<!-- 积分记录 -->
<el-dialog
:visible.sync="scoreDiaShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="scoreDiaTitle"
width="70%"
top="5vh"
@closed="diaClose"
>
<score-record
ref="ref_score"
:serviceType="'community_org'"
></score-record>
<el-dialog :visible.sync="scoreDiaShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="scoreDiaTitle"
width="70%"
top="5vh"
@closed="diaClose">
<score-record ref="ref_score"
:serviceType="'community_org'"></score-record>
</el-dialog>
</div>
</template>
@ -244,7 +209,7 @@ import scoreRecord from "../../../components/scoreRecord.vue";
export default {
components: { editForm, scoreRecord },
data() {
data () {
return {
openSearch: false,
@ -274,7 +239,7 @@ export default {
};
},
computed: {
maxTableHeight() {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 360 + this.iframeHeigh
: this.clientHeight - 360;
@ -292,11 +257,11 @@ export default {
}
},
},
mounted() {
mounted () {
this.getTableData();
},
methods: {
async handleExportModule() {
async handleExportModule () {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {};
@ -333,18 +298,18 @@ export default {
});
},
//
handleExcelSuccess(res, file) {
handleExcelSuccess (res, file) {
if (res.code === 0 && res.msg === "success") {
console.log("resss---ppp", res);
} else {
this.$message.error(res.msg);
}
},
handleProgress(event, file, fileList) {
handleProgress (event, file, fileList) {
console.log("percentage", file.percentage);
},
beforeExcelUpload(file) {
beforeExcelUpload (file) {
console.log("file", file);
const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer =
@ -361,7 +326,7 @@ export default {
}
return fileType && isLt1M;
},
async uploadHttpRequest(file) {
async uploadHttpRequest (file) {
this.importLoading = true;
this.importBtnTitle = "正在上传中...";
this.$message({
@ -416,38 +381,38 @@ export default {
this.$refs.upload.clearFiles();
},
handleSizeChange(val) {
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
handleClose() {
handleClose () {
this.formShow = false;
},
handleSearch(val) {
handleSearch (val) {
console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
resetForm(formName) {
resetForm (formName) {
this.$refs[formName].resetFields();
this.handleSearch();
},
async handleAdd() {
async handleAdd () {
this.formShow = true;
await nextTick();
console.log(this.$refs);
this.$refs.eleEditForm.initForm("add");
},
async handleChu() {
async handleChu () {
const url =
"/heart/iccommunityselforganization/exportcommunityselforganization";
const { pageSize, pageNo, fmData } = this;
@ -483,23 +448,23 @@ export default {
});
},
async handleWatch(rowIndex) {
async handleWatch (rowIndex) {
this.formShow = true;
await nextTick();
this.$refs.eleEditForm.initForm("detail", this.tableData[rowIndex]);
},
async handleEdit(rowIndex) {
async handleEdit (rowIndex) {
this.formShow = true;
await nextTick();
this.$refs.eleEditForm.initForm("edit", this.tableData[rowIndex]);
},
handleEditSuccess() {
handleEditSuccess () {
this.handleClose();
this.getTableData();
},
async handleDel(rowData, rowIndex) {
async handleDel (rowData, rowIndex) {
console.log(rowData, rowIndex);
const url =
"/heart/iccommunityselforganization/delcommunityselforganization";
@ -513,11 +478,12 @@ export default {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.success("操作失败!");
this.$message.error(msg)
// this.$message.success("");
}
},
async getTableData() {
async getTableData () {
const url =
"/heart/iccommunityselforganization/communityselforganizationlist";
const { pageSize, pageNo, fmData } = this;
@ -531,22 +497,23 @@ export default {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
return item;
})
: [];
} else {
this.$message.error(msg)
}
},
//
handleScore(row) {
handleScore (row) {
this.scoreDiaShow = true;
this.$nextTick(() => {
this.$refs.ref_score.initForm(row.orgId);
});
},
diaClose() {
diaClose () {
this.scoreDiaShow = false;
},
},

757
src/views/modules/shequzhili/event copy/cpts/add.vue

@ -1,757 +0,0 @@
<template>
<div class="g-add">
<div class="g-add-page">
<div class="g-left">
<el-form ref="ref_form1"
:inline="true"
:model="formData"
:rules="dataRule"
class="form">
<el-form-item label="所属网格 "
prop="gridId"
label-width="150px"
style="display: block">
<el-select v-model.trim="formData.gridId"
placeholder="请选择"
clearable
class="cell-width-1">
<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="name"
label-width="150px"
style="display: block">
<el-input class="cell-width-1"
maxlength="10"
placeholder="请输入报事人姓名"
v-model="formData.name">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="mini"
@click="handleShowPersonList">居民信息中选择</el-button>
</el-form-item>
<el-form-item label="手机号"
prop="mobile"
label-width="150px"
style="display: block">
<el-input class="cell-width-1"
maxlength="30"
placeholder="请输入手机号 "
v-model="formData.mobile">
</el-input>
</el-form-item>
<el-form-item label="身份证号"
prop="idCard"
label-width="150px"
style="display: block">
<el-input class="cell-width-1"
maxlength="30"
placeholder="请输入身份证号"
v-model="formData.idCard"></el-input>
</el-form-item>
<el-form-item label="反应渠道"
label-width="150px"
prop="sourceType">
<el-select v-model="formData.sourceType"
placeholder="请选择"
size="small"
clearable
class="cell-width-1">
<el-option v-for="item in qudaoArray"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="发生时间"
prop="happenTime"
label-width="150px"
style="display: block">
<el-date-picker v-model="formData.happenTime"
class="cell-width-1"
type="datetime"
placeholder="发生时间"
value-format="yyyy-MM-dd hh:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="事件内容"
prop="eventContent"
label-width="150px"
style="display: block">
<el-input class="cell-width-2"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入事件内容,不超过500字"
v-model="formData.eventContent"></el-input>
</el-form-item>
</el-form>
</div>
<div class="g-right">
<el-form ref="ref_form2"
:inline="true"
:model="formData"
:rules="dataRule"
class="form">
<el-form-item label="图片"
label-width="150px"
style="display:block">
<el-upload :class="['avatar-uploader', {'hide': hideUploadBtn}] "
ref="uploadPic"
:action="uploadUlr"
list-type="picture-card"
:on-exceed="exceedPic"
:on-remove="removePic"
:file-list="replayImgList"
:on-change="handleEditChange"
:on-success="handleSuccess"
:limit="3">
<span class="font-14">选择图片</span>
<div slot="tip"
class="upload_tip">最多上传3张图片图片支持jpgjpegbmpgit或png格式</div>
</el-upload>
</el-form-item>
<el-form-item label="地理位置"
prop="address"
label-width="150px"
style="display: block">
<el-input class="cell-width-1"
v-model="formData.address">
</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="cell-width-map"
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>
</div>
</div>
<!-- 新增弹出框 -->
<el-dialog :visible.sync="personTableShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
title="选择居民"
width="550px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<div style="padding:10px 30px">
<el-form :inline="false"
ref="ref_formSearch"
:label-width="'90px'">
<el-form-item label="所属网格"
label-width="150px">
<el-select class="cell-width-1"
v-model.trim="selGridId"
placeholder="请选择"
clearable>
<el-option v-for="item in gridList"
@click.native="handleChangeGrid"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="居民"
label-width="150px"
prop="selPersonIndex">
<el-select v-model="selPersonIndex"
class="cell-width-1"
filterable
placeholder="请选择"
clearable>
<el-option v-for="(item,index) in demandUserList"
:key="item.demandUserId"
:label="item.label"
:value="index">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="div-btn ">
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirmSelPerson">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { isCard } from "@/utils/validate";
let loading; //
var map
var search
var markers
var infoWindowList
var geocoder //
function iniFmData () {
return {
gridId: '',//
reportUserId: '',// ID
name: '',//
mobile: '',//
idCard: '',//
sourceType: '',//
happenTime: '',//
eventContent: '',//
imageList: [],//
// categoryList: [],// Id
address: '',//
latitude: '',//
longitude: '',//
// operationType: '',//
// content: '',//
// status: '',// processingclosed_case
};
}
export default {
data () {
return {
formType: "add", // addeditdetail
btnDisable: false,
gridList: [],//list--
qudaoArray: [
{
value: "1",
label: "多媒体反应",
},
{
value: "2",
label: "社区电话",
},
{
value: "3",
label: "12345",
},
{
value: "4",
label: "网络员手持终端",
},
],
formData: iniFmData(),
//
keyWords: '',
isFirst: true,//
// oss/file/uploadvariedfile
dialogImageUrl: 'oss/file/uploadvariedfile',
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
// upload_url: '', // URL
upload_name: '', //
replayImgList: [],
okflag: false,
formDataSearch: {
gridId: '',
name: ''
},
personTableShow: false,
selGridId: '',
selPersonIndex: '',
selPerson: {},
demandUserList: [],
hideUploadBtn: false
};
},
components: {},
computed: {
dataRule () {
let checkIdCard = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入身份证"));
} else {
if (!isCard(value)) {
callback(new Error("身份证号格式不正确"));
}
callback();
}
};
return {
gridId: [
{ required: true, message: "所属网格不能为空", trigger: "blur" },
],
name: [
{ required: true, message: "报事人不能为空", trigger: "blur" },
],
mobile: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
// idCard: [
// { required: true, message: "", trigger: "blur" },
// { required: true, validator: checkIdCard, trigger: "blur" },
// ],
sourceType: [
{ required: true, message: "反映渠道不能为空", trigger: "blur" },
],
eventContent: [
{ required: true, message: "事件内容不能为空", trigger: "blur" },
],
happenTime: [
{ required: true, message: "发生时间不能为空", trigger: "blur" },
],
address: [
{ required: true, message: "事件地址不能为空", trigger: "blur" },
],
longitude: [
{ required: true, message: "坐标位置不能为空", trigger: "blur" },
],
};
},
},
props: {},
watch: {
"formData.name": function (val) {
this.$emit("changeName", val)
},
"formData.mobile": function (val) {
this.$emit("changeMobile", val)
},
"formData.reportUserId": function (val) {
this.$emit("changeUserId", val)
},
"formData.gridId": function (val) {
this.selGridId = val
this.$emit("changeGridId", val)
}
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
this.loadGrid();
this.getCategoryList()
this.initMap()
},
methods: {
async handleShowPersonList () {
if (this.formData.gridId) {
await this.handleChangeGrid()
this.personTableShow = true
} else {
this.$message.info("请先选择网格");
}
},
diaClose () {
this.personTableShow = false;
},
handleComfirmSelPerson () {
if (this.selPersonIndex === 0 || this.selPersonIndex) {
let selPerson = this.demandUserList[this.selPersonIndex]
this.formData.name = selPerson.demandUserName
this.formData.mobile = selPerson.demandUserMobile
this.formData.reportUserId = selPerson.demandUserId
this.formData.idCard = selPerson.idCard
this.personTableShow = false;
} else {
this.$message.info("请选择人员");
}
},
async handleChangeGrid () {
const url = "/epmetuser/icresiuser/demandusers"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
agencyId: '',
gridId: this.selGridId,
name: "",
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.demandUserList = data;
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId,
purpose: "addorupdate"
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
// this.categrayList = data
//
++this.iscascaderShow
this.casOptions = []
this.selCategoryArray = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
handleChangeAgency (value) {
// this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
// this.orgId = this.selCategoryArray.length > 0 ? this.selCategoryArray[this.selCategoryArray.length - 1] : ''
},
async getEventInfo () {
this.okflag = false
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
return false
} else {
this.$refs["ref_form2"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
return false
} else {
if (!formVltHelper.userOrMobile(this.formData.mobile)) {
this.$message({
type: "error",
message: "手机号格式有误",
});
return false
}
const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //1518151817X
if (this.formData.idCard && regCard.test(this.formData.idCard) === false) {
this.$message({
type: 'warning',
message: '请输入正确的身份证号码'
})
return false;
}
this.okflag = true
}
});
}
});
},
removePic (file, fileList) {
this.formData.imageList.splice(this.formData.imageList.findIndex(item => item === file.url), 1)
this.replayImgList.splice(this.replayImgList.findIndex(item => item.uid === file.uid), 1)
this.hideUploadBtn = fileList.length >= 3;
},
// 3
handleEditChange (file, fileList) {
this.hideUploadBtn = fileList.length >= 3;
},
exceedPic () {
this.$message.warning("最多上传3张预览图片")
},
handleSuccess (response, file, fileList) {
this.replayImgList.push(file)
this.formData.imageList.push(response.data.url)
},
// 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) => {
if (!this.isFirst) {//
this.formData.address = result.result.address
}
if (this.isFirst) {
this.isFirst = false
}
//
});
},
resetData () {
this.formData = iniFmData();
this.replayImgList = []
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>
<style lang="scss">
.el-dialog__body {
padding: 0 10px 20px !important;
}
.hide {
.el-upload--picture-card {
display: none !important;
}
}
</style>

350
src/views/modules/shequzhili/event copy/cpts/event-detail.vue

@ -1,350 +0,0 @@
<template>
<div ref="ref_detail">
<el-card class="m-card-detail"
v-if="showType==''">
<h3 class="m-h3">事件详情</h3>
<div class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">上报时间</span>
<span>{{ info.createdTime }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">事件内容</span>
<span>{{ info.eventContent }}</span>
</div>
<div v-if="info.imageList&&info.imageList.length>0"
class="info-prop">
<span class="info-title-2">图片</span>
<img :src="src"
:key="src"
style="width:100px;height:100px;padding-right:10px"
v-for="src in info.imageList"
@click="watchImg(src)" />
</div>
<div v-if="info.voiceList&&info.voiceList.length>0"
class="info-prop">
<span class="info-title-2">语音</span>
<audio controls>
<source :src="item"
type=""
:key="item"
v-for="item in info.voiceList" />
</audio>
</div>
<div class="info-prop">
<span class="info-title-2">反映渠道</span>
<span>{{ info.sourceTypeName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">地址</span>
<span>{{ info.address }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">报事人</span>
<span>{{ info.name }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">手机号</span>
<span>{{ info.mobile }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">身份证号</span>
<span>{{ info.idCard?info.idCard:'--' }}</span>
</div>
<div v-if="info.operationType==='1'"
class="info-prop">
<span class="info-title-2">已立项</span>
<div class="line"
@click="handleToProject">查看项目</div>
</div>
<div v-if="info.operationType==='2'"
class="info-prop">
<span class="info-title-2">已转需求</span>
<div class="line"
@click="handleToDemand">查看需求</div>
</div>
<div v-if="info.satisfactionName"
class="info-prop">
<span class="info-title-2">满意度</span>
<div @click="handleToDemand">{{info.satisfactionName}}</div>
</div>
</div>
</div>
<div v-if="info.operationId&&!(info.status==='closed_case'&&!info.satisfactionName && user.id===info.createdUserId)"
class="div-btn ">
<el-button size="small"
@click="handleCloseEvent">关闭</el-button>
</div>
<!-- <div class="div-btn ">
<el-button size="small"
@click="handleCloseEvent">关闭</el-button>
</div> -->
</el-card>
<el-card v-if="info.status==='closed_case'&&!info.satisfactionName && user.id===info.createdUserId">
<h3>满意度评价</h3>
<div class="m-row">
<div class="m-info">
<div class="div-satisfy">
<div>
<img :src="selBad?badurl_light:badurl"
@click="clickSatisfy('bad')" />
<div class="tip-satisfy">不满意</div>
</div>
<div>
<img :src="selGood?goodurl_light:goodurl"
@click="clickSatisfy('good')" />
<div class="tip-satisfy">满意</div>
</div>
<div>
<img :src="selPerfect?perfecturl_light:perfecturl"
@click="clickSatisfy('perfect')" />
<div class="tip-satisfy">非常满意</div>
</div>
</div>
</div>
</div>
<div class="div-btn ">
<el-button size="small"
@click="handleCloseEvent">关闭</el-button>
<el-button size="small"
type="primary"
@click="handleComfirmSatisfy">确定</el-button>
</div>
</el-card>
<el-dialog :visible.sync="showSatisfy"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="满意度评价"
width="550px"
top="15vh"
class="dialog-h"
@closed="showSatisfy=false">
<div class="div-btn">
<el-button size="small"
@click="showSatisfy=false">关闭</el-button>
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirmSatisfy">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import foldText from "@/views/components/foldText";
import projectInfo from "../../xiangmu/cpts/project-info";
import dateFormat from "dai-js/tools/dateFormat";
function iniData () {
return {
user: {},
projectPageType: 'info',
info: {},
eventDetailCopy: {},
showType: '',
projectId: '',
demandForm: {
gridId: "",
categoryCode: "",
parentCode: "",
content: "",
reportType: "",
reportUserName: "",
reportUserMobile: "",
reportTime: "",
wantServiceTime: "",
demandUserId: "",
demandUserName: "",
demandUserMobile: "",
},
//
showSatisfy: false,
selBad: false,
selGood: false,
selPerfect: false,
badurl: require('@/assets/img/satisfy-images/face1.png'),
badurl_light: require('@/assets/img/satisfy-images/face1_light.png'),
goodurl: require('@/assets/img/satisfy-images/face2.png'),
goodurl_light: require('@/assets/img/satisfy-images/face2_light.png'),
perfecturl: require('@/assets/img/satisfy-images/face3.png'),
perfecturl_light: require('@/assets/img/satisfy-images/face3_light.png'),
};
}
export default {
name: "issueInfo",
props: {
eventId: {
type: String,
default: "",
},
pageType: {
type: String,
default: "info",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
components: {
foldText, projectInfo
},
data: iniData,
computed: {},
watch: {
},
mounted () {
this.user = this.$store.state.user
if (this.eventId) {
this.info = JSON.parse(JSON.stringify(this.eventDetailData));
//
// if (this.info.status === 'closed_case' && this.info.satisfactionName) {
// this.changeSatisfyType(this.info.satisfaction)
// }
}
// this.getApiData();
},
methods: {
totalHeight () {
return this.$refs.ref_detail.offsetHeight
},
watchImg (src) {
window.open(src);
},
handleClose () {
this.showType = ''
},
handleCloseEvent () {
this.$emit("handleClose");
},
async getApiData () {
},
handleToProject () {
this.$emit("handleToProject")
// if (this.info.status === 'processing') {
// this.projectPageType = 'edit'
// } else {
// this.projectPageType = 'info'
// }
// this.showType = 'project'
},
handleToDemand () {
this.$emit("handleToDemand")
},
//
handleSatisfy () {
this.showSatisfy = true
},
clickSatisfy (type) {
if (this.info.satisfactionName) {
return false
}
this.changeSatisfyType(type)
},
changeSatisfyType (type) {
if (type === 'bad') {
this.selGood = false
this.selPerfect = false
this.selBad = true
} else if (type === 'good') {
this.selGood = true
this.selPerfect = false
this.selBad = false
} else if (type === 'perfect') {
this.selGood = false
this.selPerfect = true
this.selBad = false
}
},
async handleComfirmSatisfy () {
let satisfyLevel = ''
if (!this.selBad && !this.selGood && !this.selPerfect) {
this.$message.info("请选择评价级别");
} else {
if (this.selBad) {
satisfyLevel = 'bad'
} else if (this.selGood) {
satisfyLevel = 'good'
} else if (this.selPerfect) {
satisfyLevel = 'perfect'
}
}
const url = "/gov/project/icEvent/comment"
let params = {
icEventId: this.eventId,
satisfaction: satisfyLevel
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message.success("评价成功");
this.info.satisfactionName = '111'
this.showSatisfy = false
} else {
this.$message.error(msg)
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>

624
src/views/modules/shequzhili/event copy/cpts/event-info.vue

@ -1,624 +0,0 @@
<template>
<div class="">
<!-- 新增 -->
<div v-if="pageTypeCopy == 'add'">
<div ref="ref_card_add">
<el-card>
<h3 class="m-h3">新增事件</h3>
<event-add ref="ref_add"
@changeName="changeName"
@changeMobile="changeMobile"
@changeUserId="changeUserId"
@changeGridId="changeGridId"></event-add>
</el-card>
</div>
<!-- 处理 -->
<div v-if="addProcessOk"
class="process-form">
<el-card :style="{minHeight:addProcessHeight+'px'}">
<h3 class="m-h3">处理</h3>
<process-form ref="ref_processinfo_add"
:demandUserId="demandUserId"
:demandUserName="demandUserName"
:demandUserMobile="demandUserMobile"
:gridId="gridId"></process-form>
<div class="div-btn ">
<el-button size="small"
@click="handleClose">关闭</el-button>
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirm">确定</el-button>
</div>
</el-card>
</div>
</div>
<!-- 详情 + 处理进展 -->
<div v-if="pageTypeCopy == 'dispose'||pageTypeCopy == 'info'"
class="g-page">
<div :class="['g-total',{'g-left':projectProcess.length>0}]">
<event-detail ref="ref_detail"
:pageType="pageType"
:eventId="eventId"
:eventDetailData="eventDetailData"
@handleToProject="handleToProject"
@handleToDemand="handleToDemand"
@handleClose="handleClose"></event-detail>
<div v-if="detailProcessOk&&!eventDetailData.operationId &&pageTypeCopy == 'dispose' "
class="process-form">
<el-card :style="{minHeight:detailProcessHeight+'px'}">
<h3 class="m-h3">处理</h3>
<process-form ref="ref_processinfo_dispose"
:eventId="eventId"
:eventDetailData="eventDetailData"></process-form>
<div class="div-btn ">
<el-button size="small"
@click="handleClose">关闭</el-button>
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirm">确定</el-button>
</div>
</el-card>
</div>
</div>
<!-- 处理进展 -->
<div v-if="projectProcess.length>0"
class="g-right">
<el-card class="m-card m-card-process">
<h3 class="m-h3">事件处理进展</h3>
<div class="m-process">
<div class="list">
<div class="item"
:class="index === 0 ? 'z-on' : ''"
:key="item.processId"
v-for="(item, index) in projectProcess">
<div class="item-row">
<div class="name">{{ item.processName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div v-if="item.type==='event'">
<div class="detail">
<div class="detail-field">回复人</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail">
<div class="detail-field">回复内容</div>
<div class="detail-value">{{ item.publicReply }}</div>
</div>
</div>
<div v-if="item.type==='project'">
<div v-if="item.processName==='回复'">
<div class="detail">
<div class="detail-field">回复人</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail">
<div class="detail-field">回复内容</div>
<div class="detail-value">{{ item.publicReply }}</div>
</div>
</div>
<div v-else>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail"
v-if="item.processName == '处理响应' && item.assistanceUnitName">
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.assistanceUnitName }}</fold-text>
</div>
</div>
<div class="detail"
v-if="item.processName != '转项目' && item.publicReply">
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.publicReply }}</fold-text>
</div>
</div>
<div class="detail"
v-if="item.processName != '转项目' && item.internalRemark">
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{ item.internalRemark }}</fold-text>
</div>
</div>
<div v-if="item.internalFile&&item.internalFile.length>0"
class="detail">
<div class="attachement-list">
<a :href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile">
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
<div v-if="item.type==='demand'">
<div v-if="item.processName==='回复'">
<div class="detail">
<div class="detail-field">回复人</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail">
<div class="detail-field">回复内容</div>
<div class="detail-value">{{ item.publicReply }}</div>
</div>
</div>
<div v-if="item.processName==='需求完成'">
<div class="detail">
<div class="detail-field">服务方</div>
<div class="detail-value">{{ item.serviceParty }}</div>
</div>
<div class="detail">
<div class="detail-field">实际服务时间</div>
<div class="detail-value">{{ item.actualServiceTime }}</div>
</div>
</div>
<div v-if="item.processName==='转服务'">
<div class="detail">
<div class="detail-field">服务时间</div>
<div class="detail-value">{{ item.serviceTime }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</el-card>
</div>
</div>
<!-- 项目详情 -->
<div v-if="pageTypeCopy == 'project'">
<project-info-origin ref="eleEditForm"
:type="projectPageType"
:projectId="eventDetailCopy.operationId"
@close="handleCloseProject"
@afterEdit="handleCloseProject" />
</div>
<!-- 需求详情 -->
<div v-if="pageTypeCopy == 'demand'">
<demand-info-origin ref="demandEditForm"
:demandRecId="eventDetailCopy.operationId"
@close="handleCloseProject" />
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import { Loading } from "element-ui"; // Loading
import foldText from "@/views/components/foldText";
import projectInfoOrigin from "../../xiangmu/cpts/project-info";
import demandInfoOrigin from "@/views/modules/communityService/measure/info";
import { mapGetters } from 'vuex'
import dateFormat from "dai-js/tools/dateFormat";
import eventAdd from "./add";
import eventDetail from "./event-detail";
import processForm from "./process-form";
let loading; //
function iniData () {
return {
formData: {
operationType: '',
},
eventInfoData: {},
replayInfo: {},
demand: {},
project: {},
//
demandUserId: '',
demandUserName: '',
demandUserMobile: '',
gridId: '',
eventDetailCopy: {},
projectProcess: [],
projectPageType: 'info',
pageTypeCopy: '',
//
addProcessOk: false,
addProcessHeight: 0,
detailProcessOk: false,
detailProcessHeight: 0,
};
}
export default {
name: "projectInfo",
props: {
eventId: {
type: String,
default: "",
},
pageType: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
components: {
foldText,
eventAdd,
eventDetail,
processForm,
projectInfoOrigin,
demandInfoOrigin
},
created () {
this.$nextTick(() => {
if (this.pageTypeCopy === 'add') {//+
let addheight = this.$refs.ref_card_add.offsetHeight
console.log('addheight', addheight, this.clientHeight - addheight)
// let clientHeight = document.documentElement.clientHeight
this.addProcessHeight = this.clientHeight - addheight - 380
this.addProcessOk = true
} else if (!this.eventDetailData.operationId && this.pageTypeCopy == 'dispose') {//+
let detailheight = this.$refs.ref_detail.totalHeight()
console.log('detailheight', detailheight, this.clientHeight - detailheight)
// let clientHeight = document.documentElement.clientHeight
this.detailProcessHeight = this.clientHeight - detailheight - 150
this.detailProcessOk = true
} else {//
}
})
},
data: iniData,
computed: {
//
// addProcessHeight () {
// this.$nextTick(() => {
// let aaa = this.$refs.ref_card_add.offsetHeight
// console.log('aaa', aaa, this.clientHeight - aaa)
// // let clientHeight = document.documentElement.clientHeight
// return this.clientHeight - aaa
// this.addProcessOk=true
// })
// },
...mapGetters(['clientHeight'])
},
watch: {
eventId () {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData();
},
},
mounted () {
this.pageTypeCopy = this.pageType
if (this.pageTypeCopy !== 'add') {
this.getProjectProcess()
}
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
},
methods: {
changeName (val) {
this.demandUserName = val
},
changeMobile (val) {
this.demandUserMobile = val
},
changeUserId (val) {
this.demandUserId = val
},
changeGridId (val) {
this.gridId = val
},
//
async getProjectProcess () {
const url = "/gov/project/icEvent/process";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/process";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.projectProcess = data.map((item) => {
item.processTime = dateFormat(
new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
this.$message.error(msg);
}
},
getEventInfo () {
this.$refs.ref_add.getEventInfo()
if (this.$refs.ref_add.okflag) {
this.eventInfoData = this.$refs.ref_add.formData
} else {
return false
}
console.log('eventInfo', this.eventInfoData)
},
async handleComfirm () {
this.startLoading()
if (this.pageTypeCopy === 'add') {
await this.handelAdd()
}
if (this.pageTypeCopy === 'dispose') {
await this.handelDispose()
}
this.endLoading()
},
async handelAdd () {
this.$refs.ref_add.getEventInfo()
if (this.$refs.ref_add.okflag) {
this.eventInfoData = this.$refs.ref_add.formData
} else {
return false
}
console.log('eventInfo', this.eventInfoData)
this.$refs.ref_processinfo_add.getProcessInfo()
if (this.$refs.ref_processinfo_add.okflag) {
this.formData.operationType = this.$refs.ref_processinfo_add.operationType
this.eventInfoData.operationType = this.$refs.ref_processinfo_add.operationType
if (this.formData.operationType === '0') {
this.project = {}
this.demand = {}
this.replayInfo = this.$refs.ref_processinfo_add.replayInfo
console.log('replayInfo', this.replayInfo)
//
this.eventInfoData.content = this.replayInfo.content
this.eventInfoData.status = this.replayInfo.status
if (this.replayInfo.categoryId) {
this.eventInfoData.categoryList = []
this.eventInfoData.categoryList.push(this.replayInfo.categoryId)
}
} else if (this.formData.operationType === '1') {
this.replayInfo = {}
this.demand = {}
this.project = this.$refs.ref_processinfo_add.project
//
this.project.gridId = this.eventInfoData.gridId
if (this.project.categoryList && this.project.categoryList.length > 0) {
this.eventInfoData.categoryList = []
this.eventInfoData.categoryList.push(this.project.categoryList[0].id)
}
console.log('projectInfo', this.project)
} else if (this.formData.operationType === '2') {
this.replayInfo = {}
this.project = {}
this.demand = this.$refs.ref_processinfo_add.demand
this.demand.gridId = this.eventInfoData.gridId
//
this.eventInfoData.categoryList = []
this.eventInfoData.categoryList.push(this.demand.categoryId)
console.log('demond', this.demand)
}
}
this.formData = {
...this.eventInfoData,
// replayInfo: this.replayInfo,
project: this.project,
demand: this.demand
}
console.log('this.formData', this.formData)
await this.submit()
},
async submit () {
const url = "/gov/project/icEvent/add";
const { formData } = this;
const { data, code, msg } = await requestPost(url, {
...formData,
});
if (code === 0) {
this.$message.success("操作成功!");
if (this.pageTypeCopy === 'add') {
this.eventInfo = this.$refs.ref_add.resetData()
}
this.$emit("handleOk");
} else {
this.$message.error(msg);
}
},
async handelDispose () {
this.$refs.ref_processinfo_dispose.getProcessInfo()
if (this.$refs.ref_processinfo_dispose.okflag) {
this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType
if (this.formData.operationType === '0') {
this.project = {}
this.demand = {}
this.replayInfo = this.$refs.ref_processinfo_dispose.replayInfo
this.replayInfo.icEventId = this.eventId
console.log('replayInfo', this.replayInfo)
//
let url = '/gov/project/icEvent/reply'
await this.submitDispose(url, this.replayInfo)
} else if (this.formData.operationType === '1') {
this.replayInfo = {}
this.demand = {}
this.project = this.$refs.ref_processinfo_dispose.project
//
this.project.icEventId = this.eventId
console.log('projectInfo', this.project)
let url = '/gov/project/icEvent/icEventToProject'
await this.submitDispose(url, this.project)
} else if (this.formData.operationType === '2') {
this.replayInfo = {}
this.project = {}
this.demand = this.$refs.ref_processinfo_dispose.demand
//
this.demand.icEventId = this.eventId
console.log('demond', this.demand)
let url = '/gov/project/icEvent/icEventToDemand'
await this.submitDispose(url, this.demand)
} else {
this.$message.info("请选择一种处理方式");
}
} else {
return false
}
},
async submitDispose (url, params) {
const { data, code, msg } = await requestPost(url, {
...params,
});
if (code === 0) {
this.$message.success("操作成功!");
this.$emit("handleOk");
} else {
this.$message.error(msg);
}
},
handleClose () {
if (this.pageTypeCopy === 'add') {
this.eventInfo = this.$refs.ref_add.resetData()
}
this.$emit("handleClose");
},
handleToProject () {
if (this.eventDetailCopy.status === 'processing') {
this.projectPageType = 'edit'
} else {
this.projectPageType = 'info'
}
this.pageTypeCopy = 'project'
},
handleToDemand () {
// if (this.eventDetailCopy.status === 'processing') {
// this.projectPageType = 'edit'
// } else {
// this.projectPageType = 'info'
// }
this.pageTypeCopy = 'demand'
},
handleCloseProject () {
this.getProjectProcess()
this.pageTypeCopy = 'info'
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>

665
src/views/modules/shequzhili/event copy/cpts/process-form-demand.vue

@ -1,665 +0,0 @@
<template>
<div class="">
<el-form ref="ref_form"
:inline="false"
:model="formData"
:rules="dataRule"
label-width="100px">
<el-form-item label="事件分类"
label-width="150px"
prop="categoryId">
<el-cascader class="cell-width-2"
ref="myCascader"
v-model="selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeCate"></el-cascader>
</el-form-item>
<el-form-item label="服务内容"
label-width="150px"
prop="content">
<el-input v-model="formData.content"
:autosize="{ minRows: 2, maxRows: 10 }"
type="textarea"
clearable
class="cell-width-area"
placeholder="请输入内容"></el-input>
</el-form-item>
<el-form-item label="服务类型"
label-width="150px"
prop="categoryCode">
<el-cascader v-model="formData.categoryCode"
:options="demandOptions"
clearable
class="cell-width-1"
@change="handleCateSlect"></el-cascader>
</el-form-item>
<el-form-item label="服务时间"
label-width="150px"
prop="wantServiceTime">
<el-date-picker v-model="formData.wantServiceTime"
type="datetime"
class="cell-width-1"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="服务人"
label-width="150px"
prop="demandUserName">
<el-input v-model="formData.demandUserName"
class="cell-width-1"></el-input>
</el-form-item>
<el-form-item label="联系电话"
label-width="150px"
prop="demandUserMobile">
<el-input v-model="formData.demandUserMobile"
class="cell-width-1"></el-input>
</el-form-item>
<el-form-item label="服务地点"
prop="serviceLocation"
label-width="150px"
style="display: block">
<el-input class="cell-width-1"
v-model="formData.serviceLocation">
</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_map">
</div>
<div class="div_searchmap">
<el-input class="cell-width-map"
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="门牌号"
label-width="150px"
prop="locationDetail">
<el-input v-model="formData.locationDetail"
class="cell-width-1"></el-input>
</el-form-item>
<el-form-item label="服务方"
label-width="150px"
prop="serverId">
<template>
<el-select v-model="formData.serviceType"
class="cell-width-1"
placeholder="请选择"
clearable
@change="handleServiceChange('add', $event)">
<el-option v-for="item in serviceOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
-
<el-select v-model="formData.serverId"
class="cell-width-1"
filterable
placeholder="请选择"
clearable>
<el-option v-for="item in serviceOptiondList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { isCard } from "@/utils/validate";
let loading; //
var map
var search
var markers
var infoWindowList
var geocoder //
function iniFmData () {
return {
operationType: '2',//[0: 1: 2:]
icEventId: '',//Id
gridId: '',//
categoryCode: '',//
parentCode: '',//
content: '',// 1000
reportType: 'self_help',// communitybuilding_caption;party;self_help
reportUserName: '',//
reportUserMobile: '',//
reportTime: '',//
demandUserId: '',// user.idic_resi_user.id
demandUserName: '',//
demandUserMobile: '',//
wantServiceTime: '',//
serviceType: '',
serverId: '',
locationDetail: '',
serviceLocation: '',//
latitude: '',//
longitude: '',//
categoryId: ''
};
}
export default {
data () {
return {
btnDisable: false,
customerId: localStorage.getItem("customerId"),
demandOptions: [],
serviceOptions: [
],
serviceOptiondList: [],
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
formData: iniFmData(),
okflag: false,
//
keyWords: '',
eventDetailCopy: {}
};
},
components: {},
computed: {
dataRule () {
return {
categoryId: [
{ required: true, message: "请填写事件分类", trigger: "blur" },
],
content: [
{ required: true, message: "服务内容不能为空", trigger: "blur" },
],
categoryCode: [
{ required: true, message: "服务类型不能为空", trigger: "blur" },
],
wantServiceTime: [
{ required: true, message: "服务时间不能为空", trigger: "blur" },
],
demandUserName: [
{ required: true, message: "服务人不能为空", trigger: "blur" },
],
demandUserMobile: [
{ required: true, message: "联系电话不能为空", trigger: "blur" },
],
serviceLocation: [
{ required: true, message: "服务地点不能为空", trigger: "blur" },
],
serverId: [
{ required: true, message: "服务方不能为空", trigger: "blur" },
],
};
},
},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
type: String,
default: "",
},
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: {
demandUserName: function (val) {
this.formData.reportUserName = val
this.formData.demandUserName = val
},
demandUserMobile: function (val) {
this.formData.reportUserMobile = val
this.formData.demandUserMobile = val
},
demandUserId: function (val) {
this.formData.demandUserId = val
},
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getCategoryList();
this.getDemandOptions();
this.getServiceOption()
// this.formData = { ...this.formDataTemp }
this.initMap()
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
this.formData.reportUserMobile = this.eventDetailCopy.mobile
this.formData.reportUserName = this.eventDetailCopy.name
this.formData.reportTime = this.eventDetailCopy.happenTime
this.formData.gridId = this.eventDetailCopy.gridId
this.formData.demandUserId = this.eventDetailCopy.reportUserId
this.formData.demandUserName = this.eventDetailCopy.name
this.formData.demandUserMobile = this.eventDetailCopy.mobile
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = []
this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
this.selCategoryArray.push(this.eventDetailCopy.categoryId)
this.formData.categoryId = this.eventDetailCopy.categoryId
this.selCateObj = {
name: this.eventDetailCopy.categoryName,
id: this.eventDetailCopy.categoryId
}
}
} else {
this.formData.demandUserName = this.demandUserName
this.formData.demandUserMobile = this.demandUserMobile
this.formData.demandUserId = this.demandUserId
}
},
methods: {
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
//
++this.iscascaderShow
this.casOptions = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
this.formData.categoryId = this.selCateObj.id
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
async getDemandOptions () {
const url = "/heart/icresidemanddict/demandoption"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.demandOptions = this.getFlagData(
this.getTreeData(data),
"usableFlag"
);
} else {
this.$message.error(msg)
}
},
async getServiceOption () {
const url = "/sys/dict/data/dictlist"
let params = { dictType: "user_demand_service_type", }
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceOptions = data;
} else {
this.$message.error(msg)
}
},
getTreeData (data) {
if (!Array.isArray(data)) return [];
let arr = data.map((item) => {
let _item = {};
if (item.children) {
if (item.children.length === 0)
_item = { ...item, children: undefined };
else _item = { ...item, children: this.getTreeData(item.children) };
} else {
_item = { ...item };
}
return _item;
});
return arr;
},
getFlagData (data, flag) {
if (!Array.isArray(data)) return [];
let arr1 = data.filter((item) => item[flag]);
let arr2 = arr1.map((item) => {
if (item.children)
return { ...item, children: this.getFlagData(item.children, flag) };
else return item;
});
// console.log('arrr-oppp', arr2)
return arr2;
},
handleCateSlect (val) {
console.log("val", val);
if (val.length === 1) {
this.demandOptions.forEach((item) => {
if (item.value == val[0]) this.formData.parentCode = item.pvalue;
});
this.formData.categoryCode = val[0];
} else {
this.formData.parentCode = val[0];
this.formData.categoryCode = val[1];
}
},
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, "");
},
async getServiceuserList (serviceType, query) {
if (!serviceType) return false;
const { demandUserId } = this.formData;
const params = {
serviceName: "",
serviceType: serviceType,
queryPurpose: query,
};
const url = "/heart/userdemand/servicelist"
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceOptiondList = data.filter(
(item) => item.value != demandUserId
);
} else {
this.$message.error(msg)
}
},
async getDemandInfo () {
this.okflag = false
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
// this.formData.categoryId = this.selCateObj.id
} else {
this.okflag = true
}
});
},
resetData () {
},
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app_map'), {
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.serviceLocation = result.result.address
//
});
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

603
src/views/modules/shequzhili/event copy/cpts/process-form-project.vue

@ -1,603 +0,0 @@
<template>
<div class="">
<el-form ref="ref_form"
:inline="false"
:model="formData"
:rules="dataRule"
label-width="100px">
<el-form-item label="事件分类"
label-width="150px"
prop="categoryList">
<el-cascader class="cell-width-2"
ref="myCascader"
v-model="selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeCate"></el-cascader>
</el-form-item>
<el-form-item label="项目标题"
prop="title"
label-width="150px"
style="display: block">
<el-input class="cell-width-1"
maxlength="50"
placeholder="请输入项目标题"
v-model="formData.title">
</el-input>
</el-form-item>
<el-form-item label="所属网格 "
prop="gridId"
label-width="150px"
style="display: block">
<el-select v-model.trim="formData.gridId"
placeholder="请选择"
clearable
class="cell-width-1">
<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="staffList">
<el-popover placement="bottom"
width="400"
height="400"
v-model="visibleStaffPanel">
<div class="f">
<select-staff @confirm="(ret) => (formData.staffList = ret)"
@close="visibleStaffPanel = false" />
</div>
<div slot="reference">
<a v-if="formData.staffList.length == 0"
style="cursor: pointer">点击选择</a>
<a v-else
style="cursor: pointer">已选 {{ formData.staffList.length }} </a>
</div>
</el-popover>
</el-form-item>
<el-form-item label="协办单位"
label-width="150px"
prop="assistanceUnitIndex">
<el-select v-model.trim="formData.assistanceUnitIndex"
placeholder="请选择"
class="cell-width-1">
<el-option v-for="(item, index) in assistanceUnitList"
:key="item.assistanceUnitId"
:label="item.assistanceUnitName"
:value="index">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="项目方案"
label-width="150px"
prop="publicReply">
<el-input type="textarea"
class="cell-width-area"
:rows="2"
placeholder="请输入项目方案"
v-model="formData.publicReply">
</el-input>
</el-form-item>
<el-form-item label="内部备注"
label-width="150px"
prop="internalRemark">
<el-input type="textarea"
class="cell-width-area"
:rows="2"
placeholder="请输入内部备注"
v-model="formData.internalRemark">
</el-input>
</el-form-item>
<el-form-item label="图片/附件:"
label-width="150px"
prop="internalFile">
<el-upload class="avatar-uploader"
:action="uploadUlr"
:data="{ customerId: customerId }"
:show-file-list="true"
:on-success="handleImgSuccess"
:on-remove="handleImgRemove"
:before-upload="beforeImgUpload">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="标签"
label-width="150px"
prop="tagList">
<fold-text v-if="tagList.length>0"
style="width: 300px"
:row="3">
<div :key="item.name"
v-for="item in tagList">
{{ item.name }}
</div>
</fold-text>
<el-popover placement="top"
width="450"
height="450"
v-model="visibleTagPanel">
<div class="f"
style="min-height: 120px">
<h2>选择标签</h2>
<el-select style="width: 350px"
v-model="selectedTagData"
multiple
allow-create
filterable
placeholder="请选择"
@change="handleTagChange">
<el-option-group label="自定义标签">
<el-option v-for="item in tagOptions.customized"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-option-group>
<el-option-group label="常用标签">
<el-option v-for="item in tagOptions.defaulted"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-option-group>
</el-select>
<el-button style="margin-left: 10px"
size="small"
type="danger"
@click="updateProjectTag">关闭</el-button>
</div>
<div slot="reference">
<el-button size="small"
type="">选择</el-button>
</div>
</el-popover>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import selectStaff from "@/views/components/selectStaff";
import formVltHelper from "dai-js/tools/formVltHelper";
import foldText from "@/views/components/foldText";
import { isCard } from "@/utils/validate";
let loading; //
function iniFmData () {
return {
operationType: '1',//[0: 1: 2:]
publicReply: '',// 1000
internalRemark: '',// 1000
gridId: '',//
assistanceUnitIndex: '',
assistanceUnitId: '',// Id
assistanceUnitType: '',// 12
staffList: [],//
categoryList: [],//
tagList: [],//
internalFile: [],//
title: '',//
publicFile: [],//
locateAddress: '',//
locateLongitude: '',//
locateDimension: '',//
eventId: '',//
};
}
export default {
data () {
return {
btnDisable: false,
customerId: localStorage.getItem("customerId"),
gridList: [],//list--
myDepartmentList: [],//
visibleStaffPanel: false,
assistanceUnitList: [],//
tagList: [],//
tagOptions: [],
visibleTagPanel: false,
selectedTagData: [],
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
formData: iniFmData(),
formDataTemp: {
assistanceUnitIndex: 0,
assistanceUnitId: '',// Id
assistanceUnitType: '',// 12
eventId: "",
gridId: "63d5ff92ea981b1c58e4914ac894c610",
internalRemark: "内部备注",
operationType: "1",
projectStaffId: "1514068005825622017",
publicReply: "项目方案",
title: "3123123",
internalFile: [],
staffList: [],
tagList: [{
id: "46294b3c9f96ee4d0b00e997e06c8f97",
isDisable: "enable",
name: "车行道、人行道、盲道、无障碍通道、路名牌",
},
{
id: "953bafc1191f784841d9b8da61ec7b9b",
isDisable: "enable",
name: "城市广场管理",
}],
},
okflag: false,
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
eventDetailCopy: {}
};
},
components: { selectStaff, foldText },
computed: {
dataRule () {
return {
categoryList: [
{ required: true, message: "请填写事件分类", trigger: "blur" },
],
title: [
{ required: true, message: "标题不能为空", trigger: "blur" },
],
gridId: [
{ required: true, message: "所属网格不能为空", trigger: "blur" },
],
staffList: [
{ required: true, message: "处理部门不能为空", trigger: "blur" },
],
publicReply: [
{ required: true, message: "项目方案不能为空", trigger: "blur" },
],
};
},
},
props: {
gridId: {//id
type: String,
default: "",
},
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: {
gridId: function (val) {
this.formData.gridId = val
},
"formData.assistanceUnitIndex": function (val) {
if (val === "" || this.assistanceUnitList.length === 0) {
this.formData.assistanceUnitId = "";
this.formData.assistanceUnitType = "";
} else {
this.formData.assistanceUnitId =
this.assistanceUnitList[val].assistanceUnitId;
this.formData.assistanceUnitType =
this.assistanceUnitList[val].assistanceUnitType;
}
},
async selectedTagData (val) {
const { tagOptions } = this;
this.tagList = await Promise.all(
val.map(async (id) => {
let ele = [...tagOptions.customized, ...tagOptions.defaulted].find(
(item) => item.id == id || item.name == id
);
if (!ele) {
await this.createTag(id);
ele = [
...this.tagOptions.customized,
...this.tagOptions.defaulted,
].find((item) => item.name == id);
if (!ele)
return {
id: "",
name: ele.name,
};
}
return {
id: ele.id,
name: ele.name,
};
})
);
this.tagList = this.tagList.filter((item) => item.id);
console.log(this.tagList)
},
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getCategoryList();
this.loadGrid();
this.getMyDepartmentList();
this.getAssistanceUnitList();
this.getTagList()
// this.formData = { ...this.formDataTemp }
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
this.formData.gridId = this.eventDetailCopy.gridId
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = []
this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
this.selCategoryArray.push(this.eventDetailCopy.categoryId)
this.selCateObj = {
name: this.eventDetailCopy.categoryName,
id: this.eventDetailCopy.categoryId
}
this.formData.categoryList = []
this.formData.categoryList.push(this.selCateObj)
}
} else {
this.formData.gridId = this.gridId
}
},
methods: {
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
//
++this.iscascaderShow
this.casOptions = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
this.formData.categoryList = []
this.formData.categoryList.push(this.selCateObj)
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
//
async getMyDepartmentList () {
const url = "/gov/project/trace/approvalagencylist";
const { data, code, msg } = await requestPost(url, {
issueId: '',
projectStaffId: '',
});
if (code === 0) {
this.myDepartmentList = data.subAgencyList;
} else {
this.$message.error(msg);
}
},
//
async getAssistanceUnitList () {
const url = "/heart/icpartyunit/assistanceUnitList";
const { data, code, msg } = await requestPost(url, {
// projectId: this.projectIdCopy,
});
if (code === 0) {
this.assistanceUnitList = data;
} else {
this.$message.error(msg);
}
},
//
async getTagList () {
const url = "/gov/issue/issueprojecttagdict/list";
const { data, code, msg } = await requestPost(url, {
});
if (code === 0) {
this.tagOptions = {
customized: data.customized,
defaulted: data.defaulted,
};
} else {
this.$message.error(msg);
}
},
handleTagChange (val) {
console.log(val);
},
updateProjectTag () {
this.visibleTagPanel = false;
},
async getProjectInfo () {
this.okflag = false
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.formData.tagList = this.tagList
this.okflag = true
}
});
},
beforeImgUpload (file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
resetData () {
},
handleImgSuccess (res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.formData.internalFile.push({
format: file.name.split(".").pop(),
name: file.name,
size: file.size,
type: file.raw.type,
url: res.data.url,
});
console.log(this.formData.internalFile);
} else {
this.$message.error(res.msg);
}
},
handleImgRemove (file) {
let index = this.formData.internalFile.findIndex(
(item) => item.url == file.response.data.url
);
this.formData.internalFile.splice(index, 1);
console.log(this.formData.internalFile);
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/project-info.scss"
scoped
></style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

236
src/views/modules/shequzhili/event copy/cpts/process-form-replay.vue

@ -1,236 +0,0 @@
<template>
<div class="">
<el-form ref="ref_form1"
:inline="false"
:model="formData"
:rules="dataRule"
class="form">
<el-form-item label="事件分类"
label-width="150px"
prop="categoryList">
<el-cascader class="cell-width-2"
ref="myCascader"
v-model="selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeCate"></el-cascader>
</el-form-item>
<el-form-item label="回复内容"
prop="content"
label-width="150px"
style="display: block">
<el-input class="cell-width-area"
type="textarea"
maxlength="500"
show-word-limit
:rows="5"
placeholder="请输入回复内容,不超过500字"
v-model="formData.content"></el-input>
</el-form-item>
<el-form-item label=""
label-width="150px"
style="display: block">
<el-checkbox v-model="status">已完成</el-checkbox>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { isCard } from "@/utils/validate";
let loading; //
export default {
data () {
return {
btnDisable: false,
formData: {
operationType: '0',//[0: 1: 2:]
content: '',
status: ''
},
status: false,
okflag: false,
eventDetailCopy: {},
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
};
},
components: {},
computed: {
dataRule () {
return {
content: [
{ required: true, message: "回复内容不能为空", trigger: "blur" },
],
};
},
},
props: {
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: {},
async mounted () {
this.getCategoryList()
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) {
this.selCategoryArray = []
this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
this.selCategoryArray.push(this.eventDetailCopy.categoryId)
this.selCateObj = {
name: this.eventDetailCopy.categoryName,
id: this.eventDetailCopy.categoryId
}
}
}
},
methods: {
async getCategoryList () {
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let treeDataNew = this.filterTree(data)
//
++this.iscascaderShow
this.casOptions = []
this.casOptions = treeDataNew
} else {
this.$message.error(msg)
}
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
},
//
filterTree (arr) {
let childs = arr
for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) {
if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory)
} else {
delete childs[i].subCategory
}
}
}
return arr
},
async getReplayInfo () {
this.okflag = false
this.$refs["ref_form1"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
if (this.status) {
if (!this.selCateObj || !this.selCateObj.id) {
this.$message.info("请填写事件分类");
return false
}
this.formData.status = 'closed_case'
} else {
this.formData.status = 'processing'
}
this.formData.categoryId = this.selCateObj.id
this.formData.categoryList = []
this.formData.categoryList.push(this.selCateObj)
this.okflag = true
}
});
},
resetData () {
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

236
src/views/modules/shequzhili/event copy/cpts/process-form.vue

@ -1,236 +0,0 @@
<template>
<div class="">
<div class="g-process-info">
<el-form ref="ref_form1"
:inline="false"
:rules="dataRule"
class="form">
<el-form-item label="处理方式"
label-width="150px"
prop="operationType">
<el-radio-group v-model="operationType"
@change="handleChangeOperationType">
<el-radio v-if="!eventId"
label="">暂不处理</el-radio>
<el-radio label="0">回复</el-radio>
<el-radio label="1">立项</el-radio>
<el-radio label="2">转服务</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div v-if="operationType==='0'">
<process-form-replay ref="ref_process_form_replay"
:eventDetailData="eventDetailData"
:eventId="eventId"></process-form-replay>
</div>
<div v-if="operationType==='1'">
<process-form-project ref="ref_process_form_project"
:eventDetailData="eventDetailData"
:gridId="gridId"
:eventId="eventId"></process-form-project>
</div>
<div v-if="operationType==='2'">
<process-form-demand ref="ref_process_form_demond"
:eventId="eventId"
:demandUserId="demandUserId"
:demandUserName="demandUserName"
:demandUserMobile="demandUserMobile"
:eventDetailData="eventDetailData"></process-form-demand>
</div>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import processFormReplay from "./process-form-replay";
import processFormProject from "./process-form-project";
import processFormDemand from "./process-form-demand";
let loading; //
export default {
data () {
return {
casOptions: [],
iscascaderShow: 0,
selCategoryArray: [],
selCateObj: {},
optionProps: {
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
operationType: '',
replayInfo: {},
demand: {},
project: {},
okflag: false,
eventDetailCopy: {}
};
},
components: {
processFormReplay,
processFormProject,
processFormDemand
},
computed: {
dataRule () {
return {
operationType: [
{ required: true, message: "处理方式不能为空", trigger: "blur" },
],
};
},
},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
type: String,
default: "",
},
gridId: {
type: String,
default: "",
},
eventId: {
type: String,
default: "",
},
eventDetailData: {
type: Object,
default () {
return {}
}
},
},
watch: {
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
}
},
methods: {
handleChangeOperationType (val) {
},
async getProcessInfo () {
this.okflag = false
if (this.operationType === '0') {
this.$refs.ref_process_form_replay.getReplayInfo()
if (this.$refs.ref_process_form_replay.okflag) {
this.replayInfo = this.$refs.ref_process_form_replay.formData
this.okflag = true
} else {
return false
}
} else if (this.operationType === '1') {
this.$refs.ref_process_form_project.getProjectInfo()
if (this.$refs.ref_process_form_project.okflag) {
this.project = this.$refs.ref_process_form_project.formData
//
this.okflag = true
} else {
return false
}
} else if (this.operationType === '2') {
this.$refs.ref_process_form_demond.getDemandInfo()
if (this.$refs.ref_process_form_demond.okflag) {
this.demand = this.$refs.ref_process_form_demond.formData
this.okflag = true
} else {
return false
}
}
},
handleCancle () {
this.resetData();
},
resetData () {
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

663
src/views/modules/shequzhili/event copy/eventList.vue

@ -1,663 +0,0 @@
<template>
<div class="div_main">
<div v-show="pageType == 'list'">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'80px'">
<div>
<el-form-item label="所属网格"
prop="gridId">
<el-select class="item_width_1"
v-model="formData.gridId"
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="sourceType">
<el-select v-model="formData.sourceType"
placeholder="请选择"
size="small"
clearable
class="item_width_2">
<el-option v-for="item in qudaoArray"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="事件内容"
prop="eventContent">
<el-input v-model="formData.eventContent"
class="item_width_1"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="报事人"
prop="name">
<el-input v-model="formData.name"
class="item_width_2"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="手机号"
prop="mobile">
<el-input v-model="formData.mobile"
class="item_width_2"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="上报时间"
prop="startTime">
<el-date-picker v-model="formData.startTime"
:picker-options="startPickerOptions"
class="item_width_2"
size="small"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.endTime"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
size="small"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态"
prop="status">
<el-select class="item_width_2"
v-model="formData.status"
placeholder="全部"
size="small"
clearable>
<el-option v-for="item in statusArray"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<div class="div_btn">
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
<el-button @click="handleExport"
class="diy-button--reset"
size="small">导出</el-button>
</div>
<el-table :data="tableData"
border
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
class="table"
style="width: 100%"
:height="maxTableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="gridName"
align="center"
label="所属网格"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="eventContent"
label="事件内容"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="imageList"
align="center"
width="80"
label="图片">
<template slot-scope="scope">
<el-image v-if="scope.row.imageList&&scope.row.imageList.length>0"
style="width: 40px; height: 40px"
:src="scope.row.imageList[0]"
:preview-src-list="scope.row.imageList">
</el-image>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="voiceList"
align="center"
width="80"
label="音频">
<template slot-scope="scope">
<img @click="handleShowVoice(scope.row.voiceList[0])"
class="img-voice"
v-if="scope.row.voiceList&&scope.row.voiceList.length>0"
src="@/assets/img/icon-voice.png" />
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="sourceTypeName"
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 prop="name"
align="center"
width="100"
label="报事人"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="mobile"
align="center"
width="110"
label="手机号"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="satisfactionName"
align="center"
width="100"
label="满意度"
:show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.satisfactionName">--</span>
</template> -->
</el-table-column>
<el-table-column prop="createdTime"
align="center"
width="140"
:show-overflow-tooltip="true"
label="上报时间">
</el-table-column>
<el-table-column prop="operationTypeShow"
align="center"
width="100"
:show-overflow-tooltip="true"
label="结点">
</el-table-column>
<el-table-column prop="status"
align="center"
label="状态"
width="80"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.status==='processing'">处理中</span>
<span v-else-if="scope.row.status==='closed_case'">已办结</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button v-if="scope.row.status==='processing'&&!scope.row.operationId "
@click="handleDispose(scope.row)"
type="text"
size="small"
class="div-table-button--edit">处理</el-button>
<el-button v-else-if="scope.row.status==='closed_case' && !scope.row.satisfactionName && user.id===scope.row.createdUserId"
@click="handleWatch(scope.row)"
type="text"
size="small"
class="div-table-button--edit">去评价</el-button>
<el-button v-else
@click="handleWatch(scope.row)"
type="text"
size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
</div>
<div v-if="pageType == 'dispose' || pageType == 'info'|| pageType == 'add'">
<event-info ref="eleEditForm"
:pageType="pageType"
:eventId="eventId"
:eventDetailData="eventDetailData"
@handleClose="handleClose"
@handleOk="handleOk"
@dialogOk="handleEditSuccess" />
</div>
<el-dialog :title="'播放语音'"
:visible.sync="showVoice"
width="40%"
top="5vh"
append-to-body
class="dialog-h"
:close-on-click-modal="false">
<div class="dialog-h-content scroll-h">
<div style="display:flex;justify-content:center;margin:50px">
<audio controls>
<source :src="selVoiceUrl"
type="" />
</audio>
</div>
</div>
<div class="resi-btns">
<el-button size="small"
@click="showVoice=false">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import eventInfo from "./cpts/event-info";
import axios from "axios";
export default {
components: { eventInfo },
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.formData.startTime) {
let startTime = new Date(this.formData.startTime)
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
pageType: "list", // list add dispose info
user: {},
agencyId: '',
gridList: [],//list--
tableData: [],
statusArray: [
{
value: "processing",
label: "处理中",
},
{
value: "closed_case",
label: "已完成",
},
],
qudaoArray: [
{
value: "0",
label: "随手拍/随时讲",
},
{
value: "1",
label: "多媒体反应",
},
{
value: "2",
label: "社区电话",
},
{
value: "3",
label: "12345",
},
{
value: "4",
label: "网络员手持终端",
},
],
formData: {
gridId: '',
sourceType: '',
eventContent: '',
name: '',
mobile: '',
startTime: '',
endTime: '',
status: '',
},
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
eventId: '',
eventDetailData: {},
showVoice: false,
selVoiceUrl: '',
};
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 410 + this.iframeHeigh
: this.clientHeight - 410;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
"formData.endTime": function (val) {
if (val && val != '') {
let arrayTemp = val.split(' ')
this.formData.endTime = arrayTemp[0] + ' 23:59:59'
}
},
},
mounted () {
console.log(this.$store.state)
this.user = this.$store.state.user
this.agencyId = this.user.agencyId
this.loadGrid();
this.getTableData();
},
methods: {
handleSearch (val) {
console.log(this.formData);
this.pageNo = 1;
this.getTableData();
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId,
purpose: "query"
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
async handleExport () {
const url = "/gov/project/icEvent/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...formData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
async handleAdd () {
this.pageType = "add";
},
async handleWatch (row) {
this.eventId = row.icEventId
this.eventId = row.icEventId
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = "info";
} else {
this.$message.error(msg);
}
},
//
async handleDispose (row) {
this.eventId = row.icEventId
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = "dispose";
} else {
this.$message.error(msg);
}
},
//
handleShowVoice (url) {
this.selVoiceUrl = url
this.showVoice = true
},
handleClose () {
this.pageType = "list";
this.eventId = ""
this.getTableData()
},
handleOk () {
this.pageType = "list";
this.eventId = ""
this.pageNo = 1
this.getTableData()
},
handleEditSuccess () {
this.handleClose();
this.getTableData();
},
async handleDel (rowData, rowIndex) {
console.log(rowData, rowIndex);
const url =
"/heart/iccommunityselforganization/delcommunityselforganization";
const { tableData } = this;
const { data, code, msg } = await requestPost(url, {
orgId: tableData[rowIndex].orgId,
});
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async getTableData () {
const url = "/gov/project/icEvent/list";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...formData,
});
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
this.tableData.forEach(item => {
if (item.operationType === '2') {
item.operationTypeShow = '已转需求'
}
if (item.operationType === '1') {
item.operationTypeShow = '已立项'
}
if (item.operationType === '0') {
item.operationTypeShow = '已回复'
}
});
} else {
this.$message.error(msg);
}
},
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
this.pageNo = val;
this.getTableData();
},
resetSearch () {
this.formData = {
gridId: '',
sourceType: '',
eventContent: '',
name: '',
mobile: '',
startTime: '',
endTime: '',
status: '',
}
// this.pageNo = 1
// this.loadTable()
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss";
</style>

4
src/views/modules/shequzhili/event/cpts/event-detail.vue

@ -31,9 +31,9 @@
class="info-prop">
<span class="info-title-2">语音</span>
<audio controls>
<source :src="item"
<source :src="item.url"
type=""
:key="item"
:key="item.url"
v-for="item in info.voiceList" />
</audio>
</div>

2
src/views/modules/shequzhili/event/eventList.vue

@ -169,7 +169,7 @@
width="80"
label="音频">
<template slot-scope="scope">
<img @click="handleShowVoice(scope.row.voiceList[0])"
<img @click="handleShowVoice(scope.row.voiceList[0].url)"
class="img-voice"
v-if="scope.row.voiceList&&scope.row.voiceList.length>0"
src="@/assets/img/icon-voice.png" />

2
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -157,7 +157,7 @@ import People from "./people";
import cptCard from "@/views/modules/visual/cpts/card";
import ScreenLoading from "@/views/modules/visual/cpts/loading";
var centerPointGlobal = [120.38945519, 36.0722275]
var centerPointGlobal = [120.664619, 36.504963]
let loading;//

10
src/views/modules/visual/communityGovern/shijianchuli/event-info.vue

@ -44,9 +44,13 @@
class="info-prop">
<span>音频</span>
<div class="info-pics">
<audio :src="src"
:key="src"
v-for="src in eventInfo.voiceList" />
<audio controls>
<source :src="item.url"
type=""
:key="item.url"
v-for="item in eventInfo.voiceList" />
</audio>
</div>
<!-- <span><audio :src="eventInfo.aud" loop="loop">}</span>-->
</div>

357
src/views/modules/workSys/mapConfig.vue

@ -1,49 +1,154 @@
<template>
<div style="position: relative">
<div class="div_search">
<el-select v-model="selAgencyId"
placeholder="请选择或点击区域选择">
<el-option @click.native="orgChange(index)"
v-for="(item,index) in subAgencyArray"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<div v-if="selAgencyId && subAgencyArray.length>0">
<el-button v-if="showBtn&&!hasPolygon"
style="margin-left:10px"
type="primary"
icon="el-icon-plus"
@click="handleAddPolygon">{{method==='mAddPolygon'?'取消绘制':'绘制区域'}}</el-button>
<el-button v-if="showBtn&&hasPolygon"
<div>
<div style="position: relative">
<div class="div_search">
<el-select v-model="selAgencyId"
size="small"
placeholder="请选择或点击区域选择">
<el-option @click.native="orgChange(index)"
v-for="(item,index) in subAgencyArray"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<div v-if="selAgencyId && subAgencyArray.length>0">
<el-button v-if="showBtn&&!hasPolygon"
size="small"
style="margin-left:10px"
type="primary"
icon="el-icon-plus"
@click="handleAddPolygon">{{method==='mAddPolygon'?'取消绘制':'绘制区域'}}</el-button>
<el-button v-if="showBtn&&hasPolygon"
size="small"
style="margin-left:10px"
type="primary"
icon="el-icon-edit"
@click="handleEditPolygon">{{method==='mEditPolygon'?'取消绘制':'重新绘制'}}</el-button>
<!-- <el-button v-if="showBtn&&hasPolygon"
size="small"
style="margin-left:10px"
type="primary"
icon="el-icon-delete"
@click="handleDelPolygon">删除区域</el-button> -->
<el-button v-if="showBtn"
size="small"
style="margin-left:10px"
type="primary"
icon="el-icon-upload2"
@click="handleManually">手动录入</el-button>
<!-- <el-button v-if="showBtn"
style="margin-left:10px"
type="primary"
icon="el-icon-delete"
@click="handleSetOffset">设置偏差</el-button> -->
<span v-if="showBtn&&hasPolygon"> 经度偏差</span>
<el-input-number v-if="showBtn&&hasPolygon"
resize="none"
size="small"
style="width:200px"
:precision="5"
:step="0.0001"
placeholder='请输入经度偏差'
v-model="xOffset">
</el-input-number>
<span v-if="showBtn&&hasPolygon"> 纬度偏差</span>
<el-input-number v-if="showBtn&&hasPolygon"
resize="none"
size="small"
:precision="5"
:step="0.0001"
style="width:200px"
placeholder='请输入维度偏差'
v-model="yOffset">
</el-input-number>
<el-button v-if="showBtn&&hasPolygon"
style="margin-left:10px"
type="primary"
size="small"
icon="el-icon-folder-add"
@click="handleOffsetOk">保存</el-button>
<!-- <el-button v-if="showBtn"
style="margin-left:10px"
type="primary"
size="mini"
icon="el-icon-delete"
@click="handleOffsetCancel">预览</el-button> -->
</div>
</div>
<div class="div_back">
<el-button v-if="runNum>0"
style="margin-left:10px"
type="primary"
icon="el-icon-edit"
@click="handleEditPolygon">{{method==='mEditPolygon'?'取消绘制':'重新绘制'}}</el-button>
<!-- <el-button v-if="showBtn&&hasPolygon"
style="margin-left:10px"
type="primary"
icon="el-icon-delete"
@click="handleDelPolygon">删除区域</el-button> -->
icon="el-icon-back"
@click="handleBack">返回上一级</el-button>
</div>
<div class="div_tip">
<span>按住alt键单击标注可以进入下一级地图</span>
</div>
<div id="map"
class="div_map"
:style="{height:mapHeight+'px'}"></div>
</div>
<div class="div_back">
<el-button v-if="runNum>0"
style="margin-left:10px"
type="primary"
icon="el-icon-back"
@click="handleBack">返回上一级</el-button>
</div>
<div class="div_tip">
<span>按住alt键单击标注可以进入下一级地图</span>
</div>
<div id="map"
class="div_map"
:style="{height:mapHeight+'px'}"></div>
<el-dialog title="手动录入"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose">
<div class="div_textarea">
<div style="margin-top:10px">
<span> 中心点经度</span>
<el-input-number size="small"
style="width:250px"
v-model="longitude">
</el-input-number>
<span style="margin-left:15px"> 中心点纬度</span>
<el-input-number size="small"
style="width:250px"
v-model="latitude">
</el-input-number>
</div>
<div style="margin-top:20px">
<el-input type="textarea"
:rows="15"
style="width:600px;max-height:500px"
placeholder='请复制坐标数据'
v-model="polygonManullyString">
</el-input>
</div>
<div style="margin-top:20px">
<span> 经度偏差</span>
<el-input-number resize="none"
size="small"
style="width:200px"
:precision="5"
:step="0.0001"
placeholder='请输入经度偏差'
v-model="xOffset_customize">
</el-input-number>
<span style="margin-left:15px"> 纬度偏差</span>
<el-input-number resize="none"
size="small"
:precision="5"
:step="0.0001"
style="width:200px"
placeholder='请输入维度偏差'
v-model="yOffset_customize">
</el-input-number>
</div>
</div>
<span slot="footer"
class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary"
@click="handleManuallyOk"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -67,7 +172,7 @@ import { Loading } from 'element-ui'; //引入Loading服务
import { requestPost } from "@/js/dai/request";
import { altKeyOnly, click, pointerMove } from 'ol/events/condition';
var centerPointGlobal = [120.38945519, 36.0722275]
var centerPointGlobal = [120.664619, 36.504963]
let loading;//
let x = 1500
@ -85,15 +190,15 @@ let mapView;
let gaodeMapLayer;//
let parentLayer;//
let parentSource;//
let polygonLayer;//
let polygonSource;//
let polygonLayer;//
let polygonSource;//
let draw;//handle
let select;//
let selectAltClick;
let selectedFeatures;
//
//
var createTextStyle = function (feature) {
return new Text({
textAlign: undefined,
@ -101,7 +206,7 @@ var createTextStyle = function (feature) {
//fontFamily: "Courier New, monospace",
fontWeight: "bold",
text: feature.values_.name,
//text: "",
//text: "",
fill: new Fill({ color: "#007ab9" }),
stroke: new Stroke({ color: "#ffffff", width: 3 }),
offsetY: 0,
@ -172,6 +277,21 @@ const vueGis = {
zoom: null,
parentPolygon: [],
//
dialogVisible: false,
showOffset: false,
// polygonManullyString: "POLYGON (( 120.33902844 36.10290786, 120.33928218 36.10292997, 120.33956336 36.10316381, 120.34016675 36.10367715, 120.34044913 36.10391476, 120.34045707 36.10392145, 120.34068696 36.10411489, 120.34103181 36.10436285, 120.34117309 36.10441824, 120.34134613 36.10447927, 120.34164715 36.10465122, 120.34124679 36.10507284, 120.34088128 36.10538902, 120.34076198 36.10549222, 120.34053890 36.10520966, 120.34044967 36.10507284, 120.34030632 36.10494761, 120.34019091 36.10484679, 120.33976558 36.10448095, 120.33966658 36.10439980, 120.33947147 36.10425822, 120.33932037 36.10417613, 120.33913002 36.10411307, 120.33895751 36.10406073, 120.33879451 36.10403693, 120.33864104 36.10403158, 120.33864031 36.10395235, 120.33863211 36.10305897, 120.33902175 36.10290728, 120.33902844 36.10290786))",
polygonManullyString: "",
xOffset: 0,
yOffset: 0,
xOffset_customize: 0,
yOffset_customize: 0,
// xOffset_customize: 0.0051,//
// yOffset_customize: 0.0002,//
longitude: undefined,
latitude: undefined,
}
},
async mounted () {
@ -292,7 +412,7 @@ const vueGis = {
//
loadParentPolygon () {
parentSource.clear()//
parentSource.clear()//
let featureData = []//
if (this.parentPolygon && this.parentPolygon.length > 0) {//
@ -348,7 +468,7 @@ const vueGis = {
},
//
loadPolygon (subAgencyArray) {
polygonSource.clear()//
polygonSource.clear()//
let featureData = []//
if (subAgencyArray && subAgencyArray.length > 0) {//
@ -464,9 +584,15 @@ const vueGis = {
if (element.id_ === this.selAgencyId) {
selectedFeatures.push(element)
let polygon = element.getGeometry();
map.getView().fit(polygon, map.getSize());
this.zoom = map.getView().getZoom() - 2
mapView.setZoom(this.zoom);
}
});
},
//
setMapLocation () {
@ -548,7 +674,7 @@ const vueGis = {
},
//
//
addParentLayer () {
parentSource = new VectorSource({
//features: (new GeoJSON()).readFeatures(geojsonObject)
@ -565,7 +691,7 @@ const vueGis = {
},
//
//
addPolygonLayer () {
polygonSource = new VectorSource({
//features: (new GeoJSON()).readFeatures(geojsonObject)
@ -628,6 +754,114 @@ const vueGis = {
});
},
//
handleManually () {
this.dialogVisible = true
this.polygonManullyString = ''
this.longitude = undefined
this.latitude = undefined
if (this.selAgency) {
if (this.selAgency.longitude) {
this.longitude = this.selAgency.longitude
}
if (this.selAgency.latitude) {
this.latitude = this.selAgency.latitude
}
}
},
//
handleClose () {
this.dialogVisible = false
},
handleManuallyOk () {
if (this.longitude || this.latitude) {
if (!(this.longitude && this.latitude)) {
this.$message({
type: "warning",
message: "请同时填写中心点经纬度,或不填写"
});
return false
}
}
//
//120.54033616308595,36.53603370922851,120.69620469335939,36.5408402277832,120.63166001562502,36.46771248120117,120.52728989843752,36.458786089599606,120.54033616308595,36.53603370922851
//
// 73°33E135°05E
// 3°51N53°33N
const arrayString = this.polygonManullyString
let array = arrayString.split(/[, ]/)
console.log(array)
let polygonStringResult = ''
array.forEach(element => {
let num = Number(element)
if (num) {
polygonStringResult = polygonStringResult + element + ','
}
});
polygonStringResult = polygonStringResult.substring(0, polygonStringResult.length - 1)
if (this.xOffset_customize !== 0 || this.yOffset_customize !== 0) {
this.saveOffset(this.xOffset_customize, this.yOffset_customize, polygonStringResult)
} else {
this.addPolygon(polygonStringResult)
}
},
handleSetOffset () {
this.showOffset = true
},
handleOffsetOk () {
let selPolygonString = ""
this.subAgencyArray.forEach(element => {
if (element.id === this.selAgencyId && element.coordinates && element.coordinates.length > 0) {
selPolygonString = element.coordinates
}
});
if (selPolygonString) {
this.saveOffset(tyhis.xOffset, this.yOffset, selPolygonString)
}
},
saveOffset (xOffset, yOffset, selPolygonString) {
let offsetPolygonString = ''//
let tempArray = selPolygonString.split(',')
tempArray.forEach((element, index) => {
let aaa = 0
if (index % 2 === 0) {//
aaa = parseFloat(element) + parseFloat(xOffset)
} else {
aaa = parseFloat(element) + parseFloat(yOffset)
}
if (index % 2 !== 0) {//
}
offsetPolygonString = offsetPolygonString + aaa + ','
});
offsetPolygonString = offsetPolygonString.substring(0, offsetPolygonString.length - 1)
this.addPolygon(offsetPolygonString)
},
handleSetOffset () {
this.handleOffsetCancel = false
},
//
handleAddPolygon () {
@ -732,6 +966,7 @@ const vueGis = {
})
.then(() => {
this.addPolygon(coorString)
})
.catch(err => {
this.loadPolygon(this.subAgencyArray)
@ -751,12 +986,15 @@ const vueGis = {
//
async addPolygon (coorString) {
console.log(coorString)
const url = "/gov/org/agency/mapaddarea"
let params = {
orgId: this.selAgency.id,
level: this.selAgency.level,
coordinates: coorString
coordinates: coorString,
longitude: this.longitude,
latitude: this.latitude
}
const { data, code, msg } = await requestPost(url, params)
@ -766,7 +1004,10 @@ const vueGis = {
type: "success",
message: "绘制成功"
});
if (this.dialogVisible) {
this.polygonManullyString = ''
this.dialogVisible = false
}
this.refreshMap(false)
} else {
this.$message({
@ -846,7 +1087,7 @@ const vueGis = {
},
mapHeight () {
return this.clientHeight - 120;
return this.clientHeight - 170;
},
// zoom: {
@ -872,16 +1113,14 @@ export default vueGis;
<style scoped>
.div_search {
z-index: 10;
position: absolute;
top: 20px;
left: 20px;
display: flex;
}
.div_back {
z-index: 10;
right: 10px;
top: 1px;
position: absolute;
top: 20px;
right: 20px;
display: flex;
}
.div_tip {
@ -894,8 +1133,12 @@ export default vueGis;
font-size: 15px;
}
.div_map {
margin-top: 15px;
width: 100%;
}
.div_textarea {
text-align: center;
}
</style>
<style>
.ol-overlaycontainer-stopevent {

Loading…
Cancel
Save