Browse Source

pc首页业务改造

dev
是小王呀\24601 12 months ago
parent
commit
2f90d05857
  1. 524
      src/views/modules/base/facilities/index.vue
  2. 616
      src/views/modules/base/vehicleManger/add.vue
  3. 776
      src/views/modules/base/vehicleManger/index.vue
  4. 590
      src/views/modules/base/vehicleManger/info.vue
  5. 484
      src/views/modules/home/index.vue
  6. 156
      src/views/modules/shequ/chaxun.vue
  7. 1
      src/views/modules/shequ/index.vue
  8. 2
      src/views/modules/volunteer/pointsRedemption/index.vue

524
src/views/modules/base/facilities/index.vue

@ -1,130 +1,134 @@
<template>
<div>
<div class="g-main" style="flex-direction: column">
<div class="m-search" style="flex-direction: column">
<section :class="boxHeight ? 'm-form-box-height' : 'm-form-box-height-auto'">
<el-form :inline="true" class="communityHeight" ref="ref_searchform" :label-width="'100px'">
<el-form-item label="所属区划" prop="ownerName">
<el-input v-model.trim="ownerName" class="u-item-width-normal" size="small" clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-form-item label="设施类别" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="设施名称" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="设施地点" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="所属单位" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="负责人姓名" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="负责人电话" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
</el-form>
</section>
<el-row>
<el-col :span="24" align="right">
<el-button style="margin-left: 10px" size="small" type="primary"
@click="handleSearch">查询</el-button>
<el-button size="small" class="diy-button--white" @click="resetSearch">重置</el-button>
</el-col>
</el-row>
</div>
<div class="m-table">
<div class="u-table-btn2">
<div class="u-table-btn2-left">
<el-button style="" class="diy-button--blue" icon="el-icon-plus" size="small"
@click="handleAdd">新增设备</el-button>
<!-- <el-button style="margin-left:10px" class="diy-button--white" size="small"
<div>
<div class="g-main" style="flex-direction: column">
<div class="m-search" style="flex-direction: column">
<section :class="boxHeight ? 'm-form-box-height' : 'm-form-box-height-auto'">
<el-form :inline="true" class="communityHeight" ref="ref_searchform" :label-width="'100px'">
<el-form-item label="所属区划" prop="ownerName">
<el-cascader class="u-item-width-normal" ref="myCascader" clearable size="small"
v-model.trim="formData.redeemOrgId" :options="orgOptions" :props="orgOptionProps"
@change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item label="设施类别" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="设施名称" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="设施地点" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="所属单位" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="负责人姓名" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="负责人电话" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
</el-form>
</section>
<el-row>
<el-col :span="24" align="right">
<el-button style="margin-left: 10px" size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" class="diy-button--white" @click="resetSearch">重置</el-button>
</el-col>
</el-row>
</div>
<div class="m-table">
<div class="u-table-btn2">
<div class="u-table-btn2-left">
<el-button style="" class="diy-button--blue" icon="el-icon-plus" size="small"
@click="handleAdd">新增设备</el-button>
<!-- <el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="handleExport">导出</el-button> -->
<!-- <el-button style="margin-left:10px" class="diy-button--white" size="small"
<!-- <el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="deleteBatch">批量删除</el-button> -->
</div>
<el-button @click="handleExport" class="diy-button--white" size="small">导出</el-button>
<el-button class="diy-button--white" size="small">
<el-upload :headers="$getElUploadHeaders()" 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-upload>
</el-button>
<el-button style="margin-left: 10px" size="small" class="diy-button--add" type="parimary"
@click="deleteBatch">批量删除</el-button>
</div>
</div>
</div>
<div class="m-table-item">
<el-table :data="tableData" border :show-overflow-tooltip="true" style="width: 100%" selectable>
<el-table-column width="55">
</el-table-column>
<el-table-column fixed="left" width="70" type="index" label="序号" header-align="center" align="center">
</el-table-column>
<div class="m-table-item">
<el-table :data="tableData" border :show-overflow-tooltip="true" style="width: 100%">
<el-table-column width="55">
</el-table-column>
<el-table-column fixed="left" width="70" type="index" label="序号" header-align="center"
align="center">
</el-table-column>
<el-table-column prop="buildingName" fixed="left" label="所属区划" header-align="left" align="left"
min-width="180">
<template slot-scope="scope">
<a class="name-a" @click="handleToNextLevel(scope.row)">
{{ scope.row.buildingName }}
</a>
</template>
</el-table-column>
<el-table-column prop="neighborHoodName" label="" header-align="left" align="left" min-width="160">
</el-table-column>
<el-table-column prop="buildingType" label="设施类别" header-align="left" align="left" width="90">
</el-table-column>
<el-table-column prop="buildingLeaderName" label="设施名称" header-align="left" align="left" min-width="90">
</el-table-column>
<el-table-column prop="buildingLeaderMobile" label="设施地点" header-align="left" align="left" min-width="110">
</el-table-column>
<el-table-column prop="totalUnitNum" header-align="left" align="left" label="所属单位">
</el-table-column>
<el-table-column prop="totalFloorNum" header-align="left" align="left" label="负责人姓名">
</el-table-column>
<el-table-column prop="realTotalHouseNum" header-align="left" align="left" width="90" label="负责人电话">
</el-table-column>
<el-table-column label="操作" fixed="right" width="220" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-table-column prop="buildingName" fixed="left" label="所属区划" header-align="left" align="left"
min-width="180">
<template slot-scope="scope">
<a class="name-a" @click="handleToNextLevel(scope.row)">
{{ scope.row.buildingName }}
</a>
</template>
</el-table-column>
<el-table-column prop="neighborHoodName" label="" header-align="left" align="left"
min-width="160">
</el-table-column>
<el-table-column prop="buildingType" label="设施类别" header-align="left" align="left" width="90">
</el-table-column>
<el-table-column prop="buildingLeaderName" label="设施名称" header-align="left" align="left"
min-width="90">
</el-table-column>
<el-table-column prop="buildingLeaderMobile" label="设施地点" header-align="left" align="left"
min-width="110">
</el-table-column>
<el-table-column prop="totalUnitNum" header-align="left" align="left" label="所属单位">
</el-table-column>
<el-table-column prop="totalFloorNum" header-align="left" align="left" label="负责人姓名">
</el-table-column>
<el-table-column prop="realTotalHouseNum" header-align="left" align="left" width="90"
label="负责人电话">
</el-table-column>
<el-table-column label="操作" fixed="right" width="220" header-align="center" align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDel(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
>
</div>
<!-- 新增/修改弹出框 -->
<el-dialog :visible.sync="showAdd" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="750px" top="10vh" class="dialog-h" @closed="showAddClose">
<add ref="ref_form" v-if="showAdd" @showAddClose="showAddClose" />
</el-dialog>
<!--查看弹出框 -->
<el-dialog :visible.sync="showinfo" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="750px" top="10vh" class="dialog-h" @closed="showAddClose">
<info ref="ref_form" v-if="showinfo" @showAddClose="showAddClose" />
</el-dialog>
<!-- 导出弹出框 -->
<!-- <el-dialog :visible.sync="diyDialog" :close-on-click-modal="false" :close-on-press-escape="false"
</div>
<!-- 新增/修改弹出框 -->
<el-dialog :visible.sync="showAdd" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="750px" top="10vh" class="dialog-h" @closed="showAddClose">
<add ref="ref_form" v-if="showAdd" @showAddClose="showAddClose" />
</el-dialog>
<!--查看弹出框 -->
<el-dialog :visible.sync="showinfo" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="750px" top="10vh" class="dialog-h" @closed="showAddClose">
<info ref="ref_form" v-if="showinfo" @showAddClose="showAddClose" />
</el-dialog>
<!-- 导出弹出框 -->
<!-- <el-dialog :visible.sync="diyDialog" :close-on-click-modal="false" :close-on-press-escape="false"
width="1150px" title="导出模板" top="5vh" class="dialog-h">
<community-export-info v-if="diyDialog" ref="ref_diy" :list="exportList" :search="{
formCode: 'community_info',
@ -133,13 +137,22 @@
conditions: queryConditions
}" :orgId="agencyObj.id" @close="handleDiyClose"></community-export-info>
</el-dialog> -->
</div>
</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>
</template>
<script>
import axios from "axios";
import CDialog from "@c/CDialog";
import add from "./add.vue";
// import info from "./info.vue";
@ -172,6 +185,7 @@
boxHeight: true,
showAdd:false,
formTitle:"",
formData:{},
tableData: [
{
buildingName: '区划A',
@ -224,6 +238,15 @@
realTotalHouseNum: '987654',
}
],//
orgOptions:[],//
orgOptionProps: {
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
emitPath: false,
multiple: false,
checkStrictly: true
},//
};
},
@ -231,6 +254,8 @@
add,info
},
async mounted() {
this.getTableData()
this.getOrgTreeList()
await this.loadOrgData();
},
computed: {
@ -262,6 +287,264 @@
},
methods: {
//
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
//
deleteBatch() {
if (this.selection.length > 0) {
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteresiBatch();
})
.catch((err) => {
if (err == "cancel") {
}
});
} else {
this.$message.warning("请先选择要删除的居民");
}
},
//
async deleteresiBatch() {
if (this.selection.length === 0)
return this.$message.error("请选择之后进行操作");
let userIds = this.selection.map((item) => item.resiId);
this.$http
.post("/actual/base/residentBaseInfo/batchdel", userIds)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.$message.success("删除成功");
this.handleSearchFrom();
}
})
.catch((err) => {
return this.$message.error("网络错误");
});
},
handleProgress(event, file, fileList) {
},
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = '正在上传中...';
this.$message({
showClose: true,
dangerouslyUseHTMLString: true,
message: "导入中,请到系统管理-<a id='clickA' style='cursor: pointer;'>导入记录</a>中查看进度",
duration: 3000
});
let than = this;
document.getElementById('clickA').addEventListener('click', function () {
than.$router.replace('/main/importRecord-index');
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append('file', file.file); //
formData.append('code', ''); //
let url = '/governance/icEvent/importEvent'
if (this.importType == 2) {
url = '/governance/icEvent/importAwo'
}
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
...Object.keys(data.option.exist).map(k => {
return {
index: k,
srcField: data.option.exist[k],
exist: true,
field: data.option.exist[k]
};
}),
...Object.keys(data.option.notExist).map(k => {
return {
index: k,
srcField: data.option.notExist[k],
exist: false,
field: ''
};
})
];
this.importOption = data.option;
this.importCode = data.code;
this.fileData = file;
} else this.$message.error(res.data.msg);
})
.catch(err => {
console.log('失败', err);
file.onError(); //
});
this.importLoading = false;
this.importBtnTitle = '导入';
this.$refs.upload.clearFiles();
this.getTableData();
},
handleExcelSuccess(res, file) {
if (!res.code === 0 && !res.msg === 'success') {
this.$message.error(res.msg);
}
},
//
beforeExcelUpload(file) {
const isType = file.type === 'application/vnd.ms-excel';
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!');
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!');
}
return fileType && isLt1M;
},
//
async handleExport() {
const url = "/governance/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]
);
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) => {
return this.$message.error("网络错误");
});
},
//
handleDel(row) {
this.$confirm("删除之后无法回复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
console.log(row.id, "online");
let url = "/voluntary/pointsAward/admin/delete"
let params = {
id: row.id
}
requestPost(url, params).then((res) => {
console.log(res, "res");
this.getTableData()
})
})
.catch(err => {
if (err == "cancel") {
}
});
},
//
async getTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/voluntary/pointsAward/admin/list";
let params = {
pageNo: this.pageNo,
shelveOnTimeFrom: this.formData.shelveOnTimeFrom,
redeemOrgId: this.formData.redeemOrgId,
pageTo: this.pageSize,
classKey: this.formData.classKey,
shelveOnTimeTo: this.formData.shelveOnTimeTo
}
const { data, code, msg } = await requestGet(url, params)
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
// this.tableData = data.list
// // console.log(this.tableData, "this.tableData");
// this.tableData.forEach(item => {
// console.log(item,"item");
// this.starList.forEach(item2 => {
// console.log(item2,"item2");
// if (item.starLevel == item2.id) {
// console.log(item.starId,item2.id, "item2.name");
// item.starName = item2.name
// console.log(item2.name, "item2.name");
// }
// })
// })
console.log(this.tableData, "this.tableData1");
} else {
}
},
//
getOrgTreeList() {
this.$http
.post("/gov/org/customeragency/agencygridtree", {orgTypeFilter:this.orgTypeFilter})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.orgOptions = [];
this.orgOptions.forEach(item => {
item.subAgencyList.forEach(item2 => {
})
})
this.orgOptions.push(res.data);
console.log(this.orgOptions,"this.orgOptions");
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
//
handleChangeAgency(val) {
console.log(val);
this.redeemerOrgId = val
},
handleDetail(){
this.formTitle = '查看'
this.showinfo = true
@ -303,6 +586,7 @@ async loadOrgData() {
},
//
handleSearch() {
this.getTableData()
},
//
resetSearch() {

616
src/views/modules/base/vehicleManger/add.vue

@ -0,0 +1,616 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form" :inline="true" :model="formData" :rules="dataRule" class="form">
<el-row>
<!-- <el-col :span="12">
<el-form-item label="所属区域" prop="typeName" label-width="100px">
<el-select v-model="formData.positionId" placeholder="请选择" clearable>
<el-option v-for="item in SiteData" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="车牌号码" label-width="100px" prop="name">
<el-input v-model.trim="formData.name" size="small" clearable placeholder="请输入活动名称"
:disabled="showdisabled" class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车主姓名" label-width="100px" prop="name">
<el-input v-model.trim="formData.name" size="small" clearable placeholder="请输入活动名称"
:disabled="showdisabled" class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车主电话" label-width="100px" prop="name">
<el-input v-model.trim="formData.name" size="small" clearable placeholder="请输入活动名称"
:disabled="showdisabled" class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车主身份证" label-width="100px" prop="name">
<el-input v-model.trim="formData.name" size="small" clearable placeholder="请输入活动名称"
:disabled="showdisabled" class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车辆品牌" label-width="100px" prop="name">
<el-input v-model.trim="formData.name" size="small" clearable placeholder="请输入活动名称"
:disabled="showdisabled" class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备名称" prop="linkPhone" label-width="100px">
<el-select class="u-item-width-normal" v-model="formData.classKey" placeholder="请选择"
clearable>
<el-option v-for="item in optionsStatus" :key="item.value" :label="item.lable"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车辆颜色" prop="linkPhone" label-width="100px">
<el-select class="u-item-width-normal" v-model="formData.classKey" placeholder="请选择"
clearable>
<el-option v-for="item in optionsStatus" :key="item.value" :label="item.lable"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="核载人数" prop="linkPhone" label-width="100px">
<el-input-number v-model="num" @change="handleChange" :min="1" :max="10"
label="描述文字"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="购置日期" prop="linkPhone" label-width="100px">
<el-date-picker v-model="formData.shelveOnTimeFrom" type="datetime" placeholder="开始时间"
format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
<!-- <span style="margin: 0 10px"></span><el-date-picker
v-model="formData.shelveOnTimeTo" type="datetime" placeholder="结束时间"
format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker> -->
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" label-width="100px" prop="name">
<el-input type="textarea" style="width: 580px" v-model.trim="formData.name" size="small" clearable
placeholder="请输入活动名称" :disabled="showdisabled" class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
</el-row></el-form>
<div class="div_btn">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" type="primary" @click="handleComfirm">
</el-button>
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
// import { Loading } from 'element-ui' // Loading
import { requestPost,requestGet } from '@/js/dai/request'
import Tinymce from '@c/tinymce2/index.vue'
import daiMap from "@/utils/dai-map";
import util from '@js/util.js';
// import UploadImage from './upload-image.vue'
import UploadImage from '@/views/modules/plugins/rent/upload-image.vue'
var map
var search
var markers
var infoWindowList
var geocoder //
export default {
data() {
return {
showdisabled:false,
searchOptions:[],
fileList:[],
searchValue:"",
Organizationaltype:[
{ label: "社区", value: 1 },
{ label: "企业", value: 2 },
{ label: "学校", value: 3 },
],
SiteData:[],
tableDate:{},
formData:
{
attrs:[],
positionId:"",//
address: "",//
longitude: this.$store.state.user.longitude, //
latitude: this.$store.state.user.latitude,//
},
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
customerId: localStorage.getItem('customerId'),
}
},
components: { Tinymce, UploadImage },
mounted() {
this.getSiteTableData()
this.formData.agencyId=this.$store.state.user.agencyId
this.formData.agencyName=this.$store.state.user.agencyName
let { latitude, longitude } = this.$store.state.user;
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.formData.latitude = latitude;
this.formData.longitude = longitude;
this.activityType()
},
methods: {
//
async getSiteTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/voluntary/position/list";
let params = {
name: "",
type: "",
pageNo: "",
pageSize: ""
}
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
// this.total = data.total || 0;
this.SiteData = data.list
} else {
}
},
//
async initForm(type, unitId) {
console.log(type, unitId,"i就理解哦i");
if(type=="info"){
this.showdisabled=true
this.getTableDetail(unitId)
}
if (type == "edit") {
this.getTableDetail(unitId)
}
},
//
getTableDetail(id) {
console.log(id,"dskljfksdljf");
let url = `/voluntary/positionVenues/edit/${id}`;
requestGet(url).then((res) => {
console.log(res);
if (res.code == 0) {
this.formData = res.data
this.searchValue= res.data.address
this.fileList=[{fileUrl:res.data.attrs[0].url}]
} else {
this.$message.error(res.msg)
}
})
},
async activityType() {
this.$nextTick(() => {
if (!map) {
this.initMap(this.formData.latitude, this.formData.longitude);
console.log("map", map,this.formData.latitude, this.formData.longitude)
} else {
map.setCenter(this.formData.latitude, this.formData.longitude);
map.setMarker(this.formData.latitude, this.formData.longitude);
console.log("mapmapmap", map)
}
})
},
handleOnlineRegistration(value) {
//
if (value) {
this.online = true;
this.formData.online = 1;
} else {
this.online = false;
this.formData.cutOffTime = ''
this.formData.online = 0;
}
},
onChangeFileList(e) {
console.log(e, 'sssssb');
this.fileList = e.length > 0 ? e.map(item => ({
fileType: '0',
type:'image',
fileType: '0',
name:item.response.data.fileName,
fileUrl: item.response.data.url,
format: item.response.data.fileName.split('.').pop(),
url: item.response.data.url
})) : []; // efileList
if (e.length > 0) {
console.log(this.fileList,"this.fileList");
this.formData.attrs=this.fileList;
console.log(this.formData.attrs,"this.fileList");
} else {
this.formData.coverPic = '';
}
},
removedImg() {
this.formData.coverPic = ''
},
onChangeFileList1(e) {
console.log(e, 'sssssb');
this.fileList1 = e.length > 0 ? e.map(item => ({
fileType: '0',
fileUrl: item.response.data.url
})) : []; // efileList
if (e.length > 0) {
this.formData.brandImg = e[0].response.data.url;
} else {
this.formData.brandImg = '';
}
},
onChangeImgs(e, rowIndex = 0) {
console.log('onChangeFileList', e)
if (e.length > 0) {
this.activityImgs = []
e.forEach(item => {
let ob = {
fileType: '0',
fileUrl: item.response.data.url
}
this.activityImgs.push(ob)
})
}
},
// onChangeImgs(e) {
// this.activityImgs = [];
// if (e.length > 0) {
// e.forEach(item => {
// let ob = {
// fileType: '0',
// fileUrl: item.response.data.url
// };
// this.activityImgs.push(ob);
// });
// console.log('this.activityImgs',this.activityImgs)
// }
// },
handleChange(value) {},
handleTimeChange(time) {
if (time) {
const startTimeArray = util.dateFormatter(time[0], 'time').split('-')
console.log(startTimeArray);
const endTimeArray = util.dateFormatter(time[1], 'time').split('-')
console.log(endTimeArray);
this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2]
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2]
// this.startTimeShow = startTimeArray[0] + '' + startTimeArray[1] + '' + startTimeArray[2] + ''
// this.endTimeShow = endTimeArray[0] + '' + endTimeArray[1] + '' + endTimeArray[2] + ''
} else {
this.formData.startTime = ''
this.formData.endTime = ''
}
},
async getDemandOptions() {
this.$http
.post("/actual/base/serviceitem/listAllCategory")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log(res.data);
this.demandOptions = this.getFlagData(
this.getTreeData(res.data),
"usableFlag"
);
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getFlagData(data, flag) {
if (!Array.isArray(data)) return [];
let arr1 = data.filter((item) => item[flag]);
let arr2 = arr1.map((item) => {
if (item.childCateList)
return { ...item, childCateList: this.getFlagData(item.childCateList, flag) };
else return item;
});
return arr2;
},
getTreeData(data) {
if (!Array.isArray(data)) return [];
let arr = data.map((item) => {
let _item = {};
if (item.childCateList) {
if (item.childCateList.length === 0)
_item = { ...item, childCateList: undefined };
else _item = { ...item, childCateList: this.getTreeData(item.childCateList) };
} else {
_item = { ...item };
}
return _item;
});
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 handleComfirm() {
console.log(this.formData," this.formData");
if (!this.formData.address) {
this.$message.error('请输入具体位置');
return;
}
if (!this.formData.attrs ) {
this.$message.error('请上传图片');
return;
}
if (!this.formData.linkPhone) {
this.$message.error('请填写联系电话');
return;
}
if (!this.formData.positionId) {
this.$message.error('请选择挂靠阵地');
return;
}
this.addActivity()
},
//
async addActivity() {
let url = '/voluntary/positionVenues/saveOrUpdate'
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
// this.resetData()
this.$emit('showAddClose')
} else {
this.$message.error(msg)
}
},
handleCancle() {
console.log("sdlkfjklsdf ");
this.$emit('showAddClose')
},
// init
initMap(latitude, longitude) {
console.log(latitude, longitude,"564564568");
map = new daiMap(
document.getElementById("app_activity"),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45, //
}
);
//
/* map.on("dragend", (e) => {
this.handleMoveCenter(e);
});*/
map.on("click", (e) => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
},
async handleMoveCenter(e) {
//
// const { lat, lng } = map.getCenter();
const { lat, lng } = e.latLng;
this.formData.latitude = lat;
this.formData.longitude = lng;
map.setMarker(lat, lng);
let { msg, data } = await map.getAddress(lat, lng);
if (msg == "success") {
this.formData.address = data.address;
this.searchValue=data.address
console.log(this.formData.address," this.formData.address ");
this.searchValue = data.address
this.searchOptions = []
// console.log('data,this.searchValue ', this.searchValue)
}
},
async remoteMethod(query) {
console.log(query, "sfsvsdv");
if (query !== '') {
const { msg, data } = await map.searchNearby(query);
this.resultList = []
if (msg == "success" && data.resultList && data.resultList.length > 0) {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList
console.log(this.resultList, "this.resultList");
this.searchOptions = this.resultList.map(item => {
return { value: `${item.id}`, label: `${item.address + item.title}` };
});
console.log(this.searchOptions, "this.searchOptions");
}
} else {
this.searchOptions = [
{
value: '0',
label: '未检索到结果'
}
]
}
} else {
this.searchOptions = [];
}
},
handleClickKey(index) {
let selPosition = this.resultList[index]
let lonlat = selPosition.lonlat.split(" ")
map.setCenter(lonlat[1], lonlat[0]);
map.setMarker(lonlat[1], lonlat[0]);
this.formData.latitude = lonlat[1];
this.formData.longitude = lonlat[0];
this.formData.address=selPosition.address + selPosition.nam
this.searchValue = selPosition.address + selPosition.name
console.log(this.formData.address," this.formData.address ");
},
},
computed: {
dataRule() {
return {
positionId: [
{ required: true, message: '请选择挂靠组织', trigger: 'blur' }
],
name: [
{ required: true, message: '请填写名称', trigger: 'blur' }
],
linkPhone: [
{ required: true, message: '电话不能为空不能为空', trigger: 'blur' },
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
],
fileList: [
{ required: true, message: '请选择封面图片', trigger: 'blur' }
],
address: [
{ required: true, message: '请选择位置', trigger: 'blur' }
],
}
},
},
props: {
},
destroyed () {
map = null
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>
<style lang="scss" scoped>
.item_width_1 {
width: 634px;
/deep/.tox .tox-dialog {
z-index: 20000;
}
}
.u-item-width-normal{
width: 222px;
}
.tinymce_view {
::v-deep .tox .tox-dialog {
z-index: 2000000000;
}
}
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
.tinymce_view {
height: 400px;
overflow: auto;
}
.text_p {
margin: 0;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 5px;
>p {
margin: 0;
}
}
.div_btn {
height: 50px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
</style>

776
src/views/modules/base/vehicleManger/index.vue

@ -0,0 +1,776 @@
<template>
<div>
<div class="g-main" style="flex-direction: column">
<div class="m-search" style="flex-direction: column">
<section :class="boxHeight ? 'm-form-box-height' : 'm-form-box-height-auto'">
<el-form :inline="true" class="communityHeight" ref="ref_searchform" :label-width="'100px'">
<el-form-item label="所属组织" prop="ownerName">
<el-cascader class="u-item-width-normal" ref="myCascader" clearable size="small"
v-model.trim="formData.redeemOrgId" :options="orgOptions" :props="orgOptionProps"
@change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item label="车辆类型" prop="ownerPhone">
<el-select class="u-item-width-normal" v-model="formData.classKey" placeholder="请选择" clearable>
<el-option v-for="item in optionsStatus" :key="item.value" :label="item.lable" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车牌号码" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="车牌品牌" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="车主姓名" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="车主电话" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="车主证件号" prop="ownerPhone">
<el-input v-model.trim="ownerPhone" class="u-item-width-normal" size="small" clearable
placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="录入时间" prop="ownerPhone">
<el-date-picker class="u-item-width-normal" v-model="formData.shelveOnTimeFrom" type="datetime"
placeholder="开始时间" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker><span style="margin: 0 10px"></span><el-date-picker v-model="formData.shelveOnTimeTo"
class="u-item-width-normal" type="datetime" placeholder="结束时间" format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-form>
</section>
<el-row>
<el-col :span="24" align="right">
<el-button style="margin-left: 10px" size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" class="diy-button--white" @click="resetSearch">重置</el-button>
</el-col>
</el-row>
</div>
<div class="m-table">
<div class="u-table-btn2">
<div class="u-table-btn2-left">
<el-button style="" class="diy-button--blue" icon="el-icon-plus" size="small"
@click="handleAdd">添加车辆</el-button>
<!-- <el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="handleExport">导出</el-button> -->
<!-- <el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="deleteBatch">批量删除</el-button> -->
<el-button @click="handleExport" class="diy-button--white" size="small">导出</el-button>
<el-button class="diy-button--white" size="small">
<el-upload :headers="$getElUploadHeaders()" 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-upload>
</el-button>
<el-button style="margin-left: 10px" size="small" class="diy-button--add" type="parimary"
@click="deleteBatch">批量删除</el-button>
</div>
</div>
<div class="m-table-item">
<el-table :data="tableData" border :show-overflow-tooltip="true" style="width: 100%">
<el-table-column width="55">
</el-table-column>
<el-table-column fixed="left" width="70" type="index" label="序号" header-align="center" align="center">
</el-table-column>
<el-table-column prop="buildingName" fixed="left" label="所属组织" header-align="left" align="left"
min-width="180">
<!-- <template slot-scope="scope">
<a class="name-a" @click="handleToNextLevel(scope.row)">
{{ scope.row.buildingName }}
</a>
</template> -->
</el-table-column>
<el-table-column prop="neighborHoodName" label="车牌号码" header-align="left" align="left" min-width="160">
</el-table-column>
<el-table-column prop="buildingType" label="车辆类型" header-align="left" align="left" width="90">
</el-table-column>
<el-table-column prop="buildingLeaderName" label="车辆颜色" header-align="left" align="left" min-width="90">
</el-table-column>
<el-table-column prop="buildingLeaderMobile" label="核载人数" header-align="left" align="left" min-width="110">
</el-table-column>
<el-table-column prop="totalUnitNum" header-align="left" align="left" label="车辆品牌">
</el-table-column>
<el-table-column prop="totalFloorNum" header-align="left" align="left" label="姓购置日期">
</el-table-column>
<el-table-column prop="realTotalHouseNum" header-align="left" align="left" width="90" label="车主姓名">
</el-table-column>
<el-table-column prop="realTotalHouseNum" header-align="left" align="left" width="90" label="车主电话">
</el-table-column>
<el-table-column prop="realTotalHouseNum" header-align="left" align="left" width="90" label="车主证件号">
</el-table-column>
<el-table-column prop="realTotalHouseNum" header-align="left" align="left" width="90" label="录入时间">
</el-table-column>
<el-table-column label="操作" fixed="right" width="220" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDel(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 新增/修改弹出框 -->
<el-dialog :visible.sync="showAdd" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="750px" top="10vh" class="dialog-h" @closed="showAddClose">
<add ref="ref_form" v-if="showAdd" @showAddClose="showAddClose" />
</el-dialog>
<!--查看弹出框 -->
<el-dialog :visible.sync="showinfo" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="750px" top="10vh" class="dialog-h" @closed="showAddClose">
<info ref="ref_form" v-if="showinfo" @showAddClose="showAddClose" />
</el-dialog>
<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>
</template>
<script>
import CDialog from "@c/CDialog";
import add from "./add.vue";
// import info from "./info.vue";
import info from "./info.vue"
// import buildTable from "./buildTable";
// import roomTable from "./roomTable";
import { requestPost, requestGet } from "@/js/dai/request";
import { mapGetters } from "vuex";
import { Loading } from "element-ui"; // Loading
import nextTick from "dai-js/tools/nextTick";
import debounce from "lodash/debounce";
let loading; //
export default {
data() {
return {
//
optionsStatus:[
{
value: '1',
label: '自有'
},
{
value: '2',
label: '租赁'
},
{
value: '3',
label: '挂靠'
},
{
value: '4',
label: '其他'
}
],
formData:{
redeemOrgId:"",
},
showinfo:false,
pageSize:20,
pageNo:1,
total:0,
ownerName:"",
ownerPhone:"",
buildingName:"",
neighborHoodName:"",
buildingType:"",
buildingLeaderName:"",
buildingLeaderMobile:"",
totalUnitNum:"",
totalFloorNum:"",
realTotalHouseNum:"",
boxHeight: true,
showAdd:false,
formTitle:"",
tableData: [
{
buildingName: '区划A',
neighborHoodName: '小区1',
buildingType: '住宅',
buildingLeaderName: '张三',
buildingLeaderMobile: '13812345678',
totalUnitNum: '单位A',
totalFloorNum: '5层',
realTotalHouseNum: '123456',
},
{
buildingName: '区划B',
neighborHoodName: '小区2',
buildingType: '商用',
buildingLeaderName: '李四',
buildingLeaderMobile: '13898765432',
totalUnitNum: '单位B',
totalFloorNum: '8层',
realTotalHouseNum: '654321',
},
{
buildingName: '区划C',
neighborHoodName: '小区3',
buildingType: '住宅',
buildingLeaderName: '王五',
buildingLeaderMobile: '13812349876',
totalUnitNum: '单位C',
totalFloorNum: '3层',
realTotalHouseNum: '123789',
},
{
buildingName: '区划D',
neighborHoodName: '小区4',
buildingType: '工业',
buildingLeaderName: '赵六',
buildingLeaderMobile: '13867891234',
totalUnitNum: '单位D',
totalFloorNum: '12层',
realTotalHouseNum: '789123',
},
{
buildingName: '区划E',
neighborHoodName: '小区5',
buildingType: '住宅',
buildingLeaderName: '钱七',
buildingLeaderMobile: '13854321098',
totalUnitNum: '单位E',
totalFloorNum: '6层',
realTotalHouseNum: '987654',
}
],//
orgOptions:[],//
orgOptionProps: {
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
emitPath: false,
multiple: false,
checkStrictly: true
},//
};
},
components: {
add,info
},
async mounted() {
this.getOrgTreeList()
await this.loadOrgData();
},
computed: {
rowHeight() {
return this.$store.state.inIframe
? this.clientHeight - 140 + this.iframeHeight + "px"
: this.clientHeight - 140 + "px";
},
treeHeight() {
return this.$store.state.inIframe
? this.clientHeight - 245 + this.iframeHeight + "px"
: this.clientHeight - 245 + "px";
},
...mapGetters(["clientHeight", "iframeHeight"]),
showIcons() {
return function (data) {
if (data.level == "building") {
let arr = data.showNum.split("/");
if (arr[0] !== arr[1]) {
return true;
} else {
return false;
}
}
};
},
},
watch: {
},
methods: {
//
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
//
deleteBatch() {
if (this.selection.length > 0) {
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteresiBatch();
})
.catch((err) => {
if (err == "cancel") {
}
});
} else {
this.$message.warning("请先选择要删除的居民");
}
},
//
async deleteresiBatch() {
if (this.selection.length === 0)
return this.$message.error("请选择之后进行操作");
let userIds = this.selection.map((item) => item.resiId);
this.$http
.post("/actual/base/residentBaseInfo/batchdel", userIds)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.$message.success("删除成功");
this.handleSearchFrom();
}
})
.catch((err) => {
return this.$message.error("网络错误");
});
},
handleProgress(event, file, fileList) {
},
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = '正在上传中...';
this.$message({
showClose: true,
dangerouslyUseHTMLString: true,
message: "导入中,请到系统管理-<a id='clickA' style='cursor: pointer;'>导入记录</a>中查看进度",
duration: 3000
});
let than = this;
document.getElementById('clickA').addEventListener('click', function () {
than.$router.replace('/main/importRecord-index');
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append('file', file.file); //
formData.append('code', ''); //
let url = '/governance/icEvent/importEvent'
if (this.importType == 2) {
url = '/governance/icEvent/importAwo'
}
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
...Object.keys(data.option.exist).map(k => {
return {
index: k,
srcField: data.option.exist[k],
exist: true,
field: data.option.exist[k]
};
}),
...Object.keys(data.option.notExist).map(k => {
return {
index: k,
srcField: data.option.notExist[k],
exist: false,
field: ''
};
})
];
this.importOption = data.option;
this.importCode = data.code;
this.fileData = file;
} else this.$message.error(res.data.msg);
})
.catch(err => {
console.log('失败', err);
file.onError(); //
});
this.importLoading = false;
this.importBtnTitle = '导入';
this.$refs.upload.clearFiles();
this.getTableData();
},
handleExcelSuccess(res, file) {
if (!res.code === 0 && !res.msg === 'success') {
this.$message.error(res.msg);
}
},
//
beforeExcelUpload(file) {
const isType = file.type === 'application/vnd.ms-excel';
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!');
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!');
}
return fileType && isLt1M;
},
//
async handleExport() {
const url = "/governance/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]
);
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) => {
return this.$message.error("网络错误");
});
},
//
handleDel(row){
this.$confirm("删除之后无法回复,确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
console.log(row.id,"online");
let url="/voluntary/pointsAward/admin/delete"
let params={
id:row.id
}
requestPost(url,params).then((res)=>{
console.log(res,"res");
this.getTableData()
})
})
.catch(err => {
if (err == "cancel") {
}
});
},
//
async getTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/voluntary/pointsAward/admin/list";
let params = {
pageNo: this.pageNo,
shelveOnTimeFrom: this.formData.shelveOnTimeFrom,
redeemOrgId: this.formData.redeemOrgId,
pageTo: this.pageSize,
classKey: this.formData.classKey,
shelveOnTimeTo: this.formData.shelveOnTimeTo
}
const { data, code, msg } = await requestGet(url, params)
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
this.tableData = data.list
// console.log(this.tableData, "this.tableData");
this.tableData.forEach(item => {
console.log(item,"item");
this.starList.forEach(item2 => {
console.log(item2,"item2");
if (item.starLevel == item2.id) {
console.log(item.starId,item2.id, "item2.name");
item.starName = item2.name
console.log(item2.name, "item2.name");
}
})
})
console.log(this.tableData, "this.tableData1");
} else {
}
},
//
handleChangeAgency(val) {
console.log(val);
this.redeemerOrgId = val
},
//
getOrgTreeList() {
this.$http
.post("/gov/org/customeragency/agencygridtree", {orgTypeFilter:this.orgTypeFilter})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.orgOptions = [];
this.orgOptions.forEach(item => {
item.subAgencyList.forEach(item2 => {
})
})
this.orgOptions.push(res.data);
console.log(this.orgOptions,"this.orgOptions");
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
handleDetail(){
this.formTitle = '查看'
this.showinfo = true
// this.$nextTick(() => {
// this.$refs.ref_form.initForm("info", "");
// });
},
showAddClose(){
console.log("23132132d");
this.showAdd = false
},
handleAdd() {
this.formTitle ='新增'
this.showAdd = true
this.$nextTick(() => {
this.$refs.ref_form.initForm("add", "");
});
},
handleEdit() {
this.formTitle ='编辑'
this.showAdd = true
this.$nextTick(() => {
this.$refs.ref_form.initForm("edit", row);
})
},
// //
async loadOrgData() {
const url = "/gov/org/agency/maporg";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg"
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.centerPoint = [];
this.centerPoint.push(data.latitude);
this.centerPoint.push(data.longitude);
} else {
this.$message.error(msg);
}
},
//
handleSearch(val) {
this.pageNo = 1;
this.getTableData();
},
//
resetSearch() {
this.ownerName = "";
this.ownerPhone = "";
this.rentFlag = "";
this.purpose = "";
this.remark = "";
this.updateStartDate = "";
this.updateEndDate = "";
this.neighborHoodId = "";
this.buildingId = "";
this.buildingUnitId = "";
this.houseId = "";
this.resiNumber ="";
this.pageSize = 10;
this.pageNo = 1;
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
</style>
<style lang="scss" scoped>
.item_width_1 {
width: 260px;
}
.m-search ::v-deep .el-row {
margin-right: 0;
}
.g-main {
display: flex;
}
.scrollar {
margin-top: 30px;
/deep/ .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
background: #e6f0ff;
border-radius: 2px;
}
/deep/ .el-tree-node:focus>.el-tree-node__content {
color: #0056d6;
// background-color: #e6f0ff;
}
// /deep/ .el-tree-node__expand-icon {
// color: #0043c8;
// border: 1px solid #e1ecff;
// background-color: #e1ecff;
// padding: 0px;
// margin-right: 8px;
// font-size: 9px;
// }
/deep/.el-tree {
flex: 1;
.el-tree-node {
margin-left: 2px;
}
//
// .el-icon svg {
// display: none;
// height: 0;
// width: 0;
// }
//
// .el-tree-node__expand-icon {
// // position: absolute;
// // left: 2px;
// // 90
// .expanded {
// transform: rotate(90deg);
// }
// //
// &:before {
// // content: "\008B";
// // content: "\008B";
// font-size: 12px;
// color: #0043c8;
// }
// }
//
.is-leaf.el-tree-node__expand-icon::before {
// display: none;
// background: none !important;
// border: 0px;
// content: "";
// width: 18px;
// height: 18px;
}
}
}
.div_tree {
margin: 7px 8px 7px 7px;
width: 200px;
padding: 24px 15px;
background: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
// border-radius: 5px;
overflow-y: hidden;
/deep/ .el-scrollbar__wrap {
overflow-x: hidden !important;
}
/deep/ .el-scrollbar__bar {
right: -2px;
}
//
/deep/ .el-input--medium .el-input__inner {
height: 32px;
background: rgba(0, 0, 0, 0.05);
border-radius: 4px;
}
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
overflow: hidden;
}
.over-ellipsis {
display: block;
width: 140PX;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
-webkit-line-clamp: 1;
}
.filter_tree {
overflow-x: auto;
// background-color: #f6f6f6;
margin-top: 5px;
}
.div_left {
// flex: 1;
width: calc(100% - 200px);
}
::v-deep .el-dialog__body {
padding: 0;
}
</style>

590
src/views/modules/base/vehicleManger/info.vue

@ -0,0 +1,590 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form" :inline="true" :model="formData" :rules="dataRule" class="form">
<el-row>
<el-col :span="12">
<el-form-item label="车牌号码" label-width="100px" prop="name">
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车主姓名" label-width="100px" prop="name">
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车主电话" label-width="100px" prop="name">
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车主身份证" label-width="100px" prop="name">
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车辆品牌" label-width="100px" prop="name">
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备名称" prop="linkPhone" label-width="100px">
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车辆颜色" prop="linkPhone" label-width="100px">
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="核载人数" prop="linkPhone" label-width="100px">
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="购置日期" prop="linkPhone" label-width="100px">
<!-- <span style="margin: 0 10px"></span><el-date-picker
v-model="formData.shelveOnTimeTo" type="datetime" placeholder="结束时间"
format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker> -->
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" label-width="100px" prop="name">
</el-form-item>
</el-col>
</el-row></el-form>
<!-- <div class="div_btn">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button size="small" type="primary" @click="handleComfirm">
</el-button>
</div> -->
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
// import { Loading } from 'element-ui' // Loading
import { requestPost,requestGet } from '@/js/dai/request'
import Tinymce from '@c/tinymce2/index.vue'
import daiMap from "@/utils/dai-map";
import util from '@js/util.js';
// import UploadImage from './upload-image.vue'
import UploadImage from '@/views/modules/plugins/rent/upload-image.vue'
var map
var search
var markers
var infoWindowList
var geocoder //
export default {
data() {
return {
showdisabled:false,
searchOptions:[],
fileList:[],
searchValue:"",
Organizationaltype:[
{ label: "社区", value: 1 },
{ label: "企业", value: 2 },
{ label: "学校", value: 3 },
],
SiteData:[],
tableDate:{},
formData:
{
attrs:[],
positionId:"",//
address: "",//
longitude: this.$store.state.user.longitude, //
latitude: this.$store.state.user.latitude,//
},
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
customerId: localStorage.getItem('customerId'),
}
},
components: { Tinymce, UploadImage },
mounted() {
this.getSiteTableData()
this.formData.agencyId=this.$store.state.user.agencyId
this.formData.agencyName=this.$store.state.user.agencyName
let { latitude, longitude } = this.$store.state.user;
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.formData.latitude = latitude;
this.formData.longitude = longitude;
this.activityType()
},
methods: {
//
async getSiteTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/voluntary/position/list";
let params = {
name: "",
type: "",
pageNo: "",
pageSize: ""
}
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
// this.total = data.total || 0;
this.SiteData = data.list
} else {
}
},
//
async initForm(type, unitId) {
console.log(type, unitId,"i就理解哦i");
if(type=="info"){
this.showdisabled=true
this.getTableDetail(unitId)
}
if (type == "edit") {
this.getTableDetail(unitId)
}
},
//
getTableDetail(id) {
console.log(id,"dskljfksdljf");
let url = `/voluntary/positionVenues/edit/${id}`;
requestGet(url).then((res) => {
console.log(res);
if (res.code == 0) {
this.formData = res.data
this.searchValue= res.data.address
this.fileList=[{fileUrl:res.data.attrs[0].url}]
} else {
this.$message.error(res.msg)
}
})
},
async activityType() {
this.$nextTick(() => {
if (!map) {
this.initMap(this.formData.latitude, this.formData.longitude);
console.log("map", map,this.formData.latitude, this.formData.longitude)
} else {
map.setCenter(this.formData.latitude, this.formData.longitude);
map.setMarker(this.formData.latitude, this.formData.longitude);
console.log("mapmapmap", map)
}
})
},
handleOnlineRegistration(value) {
//
if (value) {
this.online = true;
this.formData.online = 1;
} else {
this.online = false;
this.formData.cutOffTime = ''
this.formData.online = 0;
}
},
onChangeFileList(e) {
console.log(e, 'sssssb');
this.fileList = e.length > 0 ? e.map(item => ({
fileType: '0',
type:'image',
fileType: '0',
name:item.response.data.fileName,
fileUrl: item.response.data.url,
format: item.response.data.fileName.split('.').pop(),
url: item.response.data.url
})) : []; // efileList
if (e.length > 0) {
console.log(this.fileList,"this.fileList");
this.formData.attrs=this.fileList;
console.log(this.formData.attrs,"this.fileList");
} else {
this.formData.coverPic = '';
}
},
removedImg() {
this.formData.coverPic = ''
},
onChangeFileList1(e) {
console.log(e, 'sssssb');
this.fileList1 = e.length > 0 ? e.map(item => ({
fileType: '0',
fileUrl: item.response.data.url
})) : []; // efileList
if (e.length > 0) {
this.formData.brandImg = e[0].response.data.url;
} else {
this.formData.brandImg = '';
}
},
onChangeImgs(e, rowIndex = 0) {
console.log('onChangeFileList', e)
if (e.length > 0) {
this.activityImgs = []
e.forEach(item => {
let ob = {
fileType: '0',
fileUrl: item.response.data.url
}
this.activityImgs.push(ob)
})
}
},
// onChangeImgs(e) {
// this.activityImgs = [];
// if (e.length > 0) {
// e.forEach(item => {
// let ob = {
// fileType: '0',
// fileUrl: item.response.data.url
// };
// this.activityImgs.push(ob);
// });
// console.log('this.activityImgs',this.activityImgs)
// }
// },
handleChange(value) {},
handleTimeChange(time) {
if (time) {
const startTimeArray = util.dateFormatter(time[0], 'time').split('-')
console.log(startTimeArray);
const endTimeArray = util.dateFormatter(time[1], 'time').split('-')
console.log(endTimeArray);
this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2]
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2]
// this.startTimeShow = startTimeArray[0] + '' + startTimeArray[1] + '' + startTimeArray[2] + ''
// this.endTimeShow = endTimeArray[0] + '' + endTimeArray[1] + '' + endTimeArray[2] + ''
} else {
this.formData.startTime = ''
this.formData.endTime = ''
}
},
async getDemandOptions() {
this.$http
.post("/actual/base/serviceitem/listAllCategory")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log(res.data);
this.demandOptions = this.getFlagData(
this.getTreeData(res.data),
"usableFlag"
);
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getFlagData(data, flag) {
if (!Array.isArray(data)) return [];
let arr1 = data.filter((item) => item[flag]);
let arr2 = arr1.map((item) => {
if (item.childCateList)
return { ...item, childCateList: this.getFlagData(item.childCateList, flag) };
else return item;
});
return arr2;
},
getTreeData(data) {
if (!Array.isArray(data)) return [];
let arr = data.map((item) => {
let _item = {};
if (item.childCateList) {
if (item.childCateList.length === 0)
_item = { ...item, childCateList: undefined };
else _item = { ...item, childCateList: this.getTreeData(item.childCateList) };
} else {
_item = { ...item };
}
return _item;
});
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 handleComfirm() {
console.log(this.formData," this.formData");
if (!this.formData.address) {
this.$message.error('请输入具体位置');
return;
}
if (!this.formData.attrs ) {
this.$message.error('请上传图片');
return;
}
if (!this.formData.linkPhone) {
this.$message.error('请填写联系电话');
return;
}
if (!this.formData.positionId) {
this.$message.error('请选择挂靠阵地');
return;
}
this.addActivity()
},
//
async addActivity() {
let url = '/voluntary/positionVenues/saveOrUpdate'
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
// this.resetData()
this.$emit('showAddClose')
} else {
this.$message.error(msg)
}
},
handleCancle() {
console.log("sdlkfjklsdf ");
this.$emit('showAddClose')
},
// init
initMap(latitude, longitude) {
console.log(latitude, longitude,"564564568");
map = new daiMap(
document.getElementById("app_activity"),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45, //
}
);
//
/* map.on("dragend", (e) => {
this.handleMoveCenter(e);
});*/
map.on("click", (e) => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
},
async handleMoveCenter(e) {
//
// const { lat, lng } = map.getCenter();
const { lat, lng } = e.latLng;
this.formData.latitude = lat;
this.formData.longitude = lng;
map.setMarker(lat, lng);
let { msg, data } = await map.getAddress(lat, lng);
if (msg == "success") {
this.formData.address = data.address;
this.searchValue=data.address
console.log(this.formData.address," this.formData.address ");
this.searchValue = data.address
this.searchOptions = []
// console.log('data,this.searchValue ', this.searchValue)
}
},
async remoteMethod(query) {
console.log(query, "sfsvsdv");
if (query !== '') {
const { msg, data } = await map.searchNearby(query);
this.resultList = []
if (msg == "success" && data.resultList && data.resultList.length > 0) {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList
console.log(this.resultList, "this.resultList");
this.searchOptions = this.resultList.map(item => {
return { value: `${item.id}`, label: `${item.address + item.title}` };
});
console.log(this.searchOptions, "this.searchOptions");
}
} else {
this.searchOptions = [
{
value: '0',
label: '未检索到结果'
}
]
}
} else {
this.searchOptions = [];
}
},
handleClickKey(index) {
let selPosition = this.resultList[index]
let lonlat = selPosition.lonlat.split(" ")
map.setCenter(lonlat[1], lonlat[0]);
map.setMarker(lonlat[1], lonlat[0]);
this.formData.latitude = lonlat[1];
this.formData.longitude = lonlat[0];
this.formData.address=selPosition.address + selPosition.nam
this.searchValue = selPosition.address + selPosition.name
console.log(this.formData.address," this.formData.address ");
},
},
computed: {
dataRule() {
return {
positionId: [
{ required: true, message: '请选择挂靠组织', trigger: 'blur' }
],
name: [
{ required: true, message: '请填写名称', trigger: 'blur' }
],
linkPhone: [
{ required: true, message: '电话不能为空不能为空', trigger: 'blur' },
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
],
fileList: [
{ required: true, message: '请选择封面图片', trigger: 'blur' }
],
address: [
{ required: true, message: '请选择位置', trigger: 'blur' }
],
}
},
},
props: {
},
destroyed () {
map = null
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>
<style lang="scss" scoped>
.item_width_1 {
width: 634px;
/deep/.tox .tox-dialog {
z-index: 20000;
}
}
.u-item-width-normal{
width: 222px;
}
.tinymce_view {
::v-deep .tox .tox-dialog {
z-index: 2000000000;
}
}
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
.tinymce_view {
height: 400px;
overflow: auto;
}
.text_p {
margin: 0;
padding: 0 10px;
border: 1px solid #d9d9d9;
border-radius: 5px;
>p {
margin: 0;
}
}
.div_btn {
height: 50px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
</style>

484
src/views/modules/home/index.vue

@ -1,6 +1,6 @@
<template>
<div>
<div class="g-row">
<div class="g-row" v-show="!showedFuncPanel">
<div class="g-row-left">
<div class="m-box m-search">
<div class="wrap">
@ -10,6 +10,8 @@
<div class="tabs">
<div :class="{ 'z-on': searchData.type == 'jumin' }" @click="searchDataTab('jumin')">查居民</div>
<div :class="{ 'z-on': searchData.type == 'fangwu' }" @click="searchDataTab('fangwu')">查房屋</div>
<div :class="{ 'z-on': searchData.type == 'xuqiu' }" @click="searchDataTab('xuqiu')">查需求</div>
</div>
<div class="search">
@ -25,8 +27,8 @@
<div class="btn" @click="handleClickSearchBtn">查询</div>
</div>
</div>
</div>
</div>
<div class="mewq">
<div class="boxss">
<div style="margin-top: 10px;" @click="handelClickToResi">
@ -82,6 +84,52 @@
</div>
</div>
</div>
<div class="m-box flex_box">
<div class="header" style="padding-top: 10px;" >
<div class="newqsa" ><span>常用功能</span></div>
<!-- <img src="@/assets/images/index/title-icon-zntb.png" /> -->
</div>
<div class="wrap" style="padding: 10px;">
<div class="m-list" v-if="searchStatus == 'ini'">
<div class="list">
<div
class="item"
:key="item.menuId"
@click="handleClickFunc(item)"
v-for="item in funcList"
>
<div class="icon">
<div
class="icon-wrap"
:style="{
color: item.color ? '#fff' : '#333',
backgroundColor: item.color || '#f4f4f4',
}"
>
<svg
class="icon-svg aui-sidebar__menu-icon"
aria-hidden="true"
>
<use :xlink:href="`#${item.icon}`" />
</svg>
</div>
</div>
<p>{{ item.menuName }}</p>
</div>
<div class="item" @click="showedFuncPanel = true">
<div class="icon">
<img
src="@/assets/img/shequ/function/tianjiayingyong.png"
/>
</div>
<p>添加应用</p>
</div>
</div>
</div>
</div>
</div>
<div class="m-pan">
<div class="m-box flex_box m-pan">
<div class="header">
@ -185,8 +233,148 @@
</el-table>
</div>
</div>
<div class="m-box m-tx" style="position: relative;">
<div class="header" style="display: flex;align-items: center;justify-content: space-between;"> <div class="newqsa"><span >人员预警</span> <span style="color: #cccccc;">数据截止到{{yesterdayDate}}</span></div> <div class="update-settings" @click="jumpToJuMin()" v-show="showAll"><img referrerpolicy="no-referrer"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/pskhmf0717eflwg54wn73s6spnsg6u48r0f69e94b-2bc8-4156-8330-902087b72e0b" />更新设置</div>
</div>
<div style="width: 100%;margin-top:26px;overflow-y: scroll; height:calc(100% - 79px);padding-bottom:15px; box-sizing: border-box" >
<el-table :data="tableList"
border :cell-style="columnbackgroundStyle" class="m-table-item">
<el-table-column label="社区" align="center" width="105">
<template slot-scope="scope">
<span style="color:#989898">{{ scope.row.residentCategoryName }}</span>
</template>
</el-table-column>
<el-table-column label="小区" width="105" align="center">
<template slot-scope="scope">
<span style="color:#006fd6;cursor: pointer;" @click="handelClickToResi(scope.row)">{{scope.row.total}}</span>
</template>
</el-table-column>
<el-table-column label="楼栋" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span style="color:#ff1200;cursor: pointer;" @click="handelCLickJump(scope.row,'cateNonIntegrity')">{{scope.row.nonIntegratedNum}}</span>
</template>
</el-table-column>
<el-table-column label="分类人员" :show-overflow-tooltip="true" align="center" v-if="showAll">
<template slot-scope="scope">
<span style="color:#989898;">{{scope.row.userName}}</span>
</template>
</el-table-column>
<el-table-column label="预警人数" align="center" width="105">
<template slot-scope="scope">
<span style="color:#989898;">{{ scope.row.updatePeriod ? scope.row.updatePeriod
== 'month' ? '每自然月' : scope.row.updatePeriod == 'halfMonth' ? '每半自然月' : scope.row.updatePeriod
== 'week' ? '每周' : '' : '' }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
<!-- 修改弹出框 -->
<div
v-show="showedFuncPanel"
v-if="
Array.isArray($store.state.sidebarMenuList) &&
$store.state.sidebarMenuList.length > 0
"
>
<div class="m-panel">
<div
class="m-list"
v-if="selectedFuncList && selectedFuncList.length > 0"
>
<div class="list-title">常用功能</div>
<div class="list">
<div
class="item"
:key="item.menuId"
@click="selectFuncItem(item.menuId)"
v-for="item in selectedFuncList"
>
<div class="corner-mark z-on">
<i class="el-icon-success"></i>
</div>
<div class="icon">
<div
class="icon-wrap"
:style="{
color: item.color ? '#fff' : '#333',
backgroundColor: item.color || '#f4f4f4',
}"
>
<svg
class="icon-svg aui-sidebar__menu-icon"
aria-hidden="true"
>
<use :xlink:href="`#${item.icon}`" />
</svg>
</div>
</div>
<p>{{ item.menuName }}</p>
</div>
</div>
</div>
<div class="m-list">
<div class="list-title">所有功能</div>
<div
:key="'one' + menu.id"
v-show="menu.children && menu.children.length > 0"
v-for="menu in $store.state.sidebarMenuList"
>
<div class="list-title2">{{ menu.name }}</div>
<div class="list">
<div
class="item"
:key="'two' + item.id"
@click="selectFuncItem(item.id)"
v-for="item in menu.children"
>
<div
class="corner-mark"
:class="{
'z-on': selectedFuncIdList.indexOf(item.id) !== -1,
}"
>
<i class="el-icon-success"></i>
</div>
<div class="icon">
<div
class="icon-wrap"
:style="{
color: item.color ? '#fff' : '#333',
backgroundColor: item.color || '#f4f4f4',
}"
>
<svg
class="icon-svg aui-sidebar__menu-icon"
aria-hidden="true"
>
<use :xlink:href="`#${item.icon}`" />
</svg>
</div>
</div>
<p>{{ item.name }}</p>
</div>
</div>
</div>
</div>
<div class="operate">
<el-button round @click="showedFuncPanel = false">返回</el-button>
<el-button type="primary" round @click="editFuncList"
>确认</el-button
>
</div>
</div>
</div>
<fastcall ref="fastcall" />
</div>
</template>
@ -203,6 +391,16 @@ export default {
data() {
return {
selectedFuncIdList: [],
showedFuncPanel:false,
funcList: [
// {
// url: '',
// menuId: '',
// menuName: '',
// icon: '',
// }
],
yesterdayDate:null,
searchStatus: "ini", //ing over
searchData: {
@ -251,9 +449,51 @@ export default {
agencyLevel: '',
yData: [],
myChartStyle: { float: "left", width: "140%", height: "100%" },
activeIndex: 0,
activeLevel: "1",
warningTb: {
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
list: [],
},
}
},
computed: {},
computed: {
selectedFuncList() {
const {
selectedFuncIdList,
$store: {
state: { sidebarMenuList },
},
} = this;
let obj = {};
sidebarMenuList.forEach((menu) => {
if (selectedFuncIdList.indexOf(menu.id) !== -1) {
obj[menu.id] = {
menuId: menu.id,
menuName: menu.name,
icon: menu.icon,
url: menu.url,
};
}
if (menu.children && menu.children.length > 0) {
menu.children.forEach((item) => {
if (selectedFuncIdList.indexOf(item.id) !== -1) {
obj[item.id] = {
menuId: item.id,
menuName: item.name,
icon: item.icon,
url: item.url,
};
}
});
}
});
return selectedFuncIdList.map((id) => obj[id]);
},
},
watch: {
"searchData.searchKey": function (val) {
if (val == "") {
@ -274,6 +514,10 @@ export default {
created() {
},
mounted() {
this.getWarningTb()
this.getBuildingwarnlist()
this.getFuncList()
this.getUserwarnlist()
// this.ehso();
//
@ -283,6 +527,7 @@ export default {
this.initChart()
this.initEcharts();
})
this.getYesterdayDate()
// this.agencyLevel = localStorage.getItem("level", data.level);
console.log(
@ -291,6 +536,137 @@ export default {
);
},
methods: {
//
async getWarningTb() {
const url = "/epmetuser/icresiuser/personwarn/rightlist";
const {
warningTb: { pageSize, pageNo },
} = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
categoryCode: this.currentCategoryCode,
});
if (code === 0) {
this.warningTb.total = data.total || 0;
this.warningTb.list = data.list
? data.list.map((item) => {
item.typeName = item.type.join("、");
return item;
})
: [];
} else {
}
},
//
async getUserwarnlist() {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
pageNo: 1,
pageSize: 20,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
data.list.forEach((item, index) => {
tableData.push([
index + 1,
item.gridName,
item.neighborhoodName,
item.buildingName,
item.count,
{
type: "btn",
name: "查看人员",
buildingId: item.buildingId,
configId: item.configId,
gridName: item.gridName,
},
]);
});
this.tableData = tableData;
this.total = data.total;
} else {
}
},
//
//
async getBuildingwarnlist() {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
} else {
}
},
//
selectFuncItem(id) {
let index = this.selectedFuncIdList.indexOf(id);
if (index === -1) {
this.selectedFuncIdList.push(id);
} else {
this.selectedFuncIdList.splice(index, 1);
}
},
//
async getFuncList() {
const url = "/gov/access/icoftenusefunction/oftenusefunctionlist";
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.funcList = data || [];
this.selectedFuncIdList = this.funcList.map((item) => item.menuId);
} else {
this.$message.error(msg);
}
},
//
async editFuncList() {
const url = "/gov/access/icoftenusefunction/addoftenusefunction";
const { selectedFuncIdList } = this;
let params = selectedFuncIdList.map((menuId, sort) => {
return { menuId, sort };
});
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("修改成功");
this.showedFuncPanel = false;
this.getFuncList();
} else {
this.$message.error(msg);
}
},
//
handleClickFunc(menu) {
console.log(menu,"dskjlfdsjkljkfs");
const menuId = menu.menuId;
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0];
if (route) {
if (route.meta.iframeURL.endsWith("【跳转新页面】")) {
window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
},
//
getYesterdayDate() {
const now = new Date();
@ -780,8 +1156,110 @@ export default {
</script>
<style lang="scss" src="@/assets/scss/modules/index.scss" scoped></style>
<style lang="scss" scoped>
.z-on{
margin-left: 0 !important;
}
.m-list {
.list-title {
margin-bottom: 20px;
font-size: 24px;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.list-title2 {
margin-bottom: 10px;
font-size: 16px;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.list {
display: flex;
flex-wrap: wrap;
.item {
position: relative;
margin-right: 46px;
margin-bottom: 20px;
width: 80px;
text-align: center;
cursor: pointer;
.corner-mark {
position: absolute;
top: -4px;
right: -4px;
color: #ccc;
font-size: 20px;
z-index: 1;
&.z-on {
color: #0082fb;
}
}
.icon {
position: relative;
display: block;
margin: 0 auto;
width: 78px;
height: 78px;
.icon-wrap {
position: absolute;
z-index: 0;
display: block;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
width: 64px;
height: 64px;
border-radius: 10px;
background-color: #f4f4f4;
}
img {
position: relative;
width: 78px;
height: 78px;
object-fit: cover;
}
.icon-svg {
position: relative;
display: block;
margin: auto;
width: 64px;
height: 64px;
object-fit: cover;
}
}
p {
margin: 0;
line-height: 24px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #333333;
}
}
}
}
.m-panel {
background-color: #fff;
border-radius: 10px;
padding: 30px 40px;
.operate {
text-align: right;
}
}
</style>

156
src/views/modules/shequ/chaxun.vue

@ -23,7 +23,7 @@
:class="searchData.type == 'xuqiu' ? 'z-on' : ''"
@click="handelClickTab('xuqiu')"
>
</div>
</div>
<div class="search">
@ -88,10 +88,10 @@
>导出</el-button
>
</div>
<div v-if="
searchData.type == 'jumin' &&
<div v-if=" searchData.type == 'jumin' &&
searchData.searchKey != '' &&
searchStatus == 'ing'
"
>
<div class="tb">
@ -177,6 +177,8 @@
</el-pagination>
</div>
</div>
</div>
<div
class="m-tb"
@ -255,11 +257,11 @@
</div>
</div>
</div>
<div
<div
class="m-tb"
v-if="
searchData.type == 'xuqiu' &&
searchData.keyword != '' &&
searchData.searchKey != '' &&
searchStatus == 'ing'
"
>
@ -324,6 +326,7 @@
</div>
</div>
</div>
</div>
<el-dialog title="密码验证" :visible.sync="showCheckPassword">
<el-form :model="checkPasswordFrom" :rules="checkPasswordRulse" ref="checkPasswordFrom">
@ -399,6 +402,116 @@ export default {
data() {
return {
//
searchXuqiu: {
header: [
{
label: "所属组织",
align: "center",
columnName: "statusName",
width: "120",
options: [
{
label: "待处理",
value: "pending",
},
{
label: "已取消",
value: "canceled",
},
{
label: "已派单",
value: "assigned",
},
{
label: "已接单",
value: "have_order",
},
{
label: "已完成",
value: "finished",
},
],
},
{
label: "事件来源",
columnName: "gridName",
align: "center",
width: "",
options: [],
},
{
label: "事件类别",
columnName: "categoryName",
align: "center",
width: "",
options: [],
},
{
label: "事件描述",
columnName: "content",
align: "center",
width: "",
options: [],
},
{
label: "上报人",
columnName: "reportTypeName",
align: "center",
width: "120",
options: [
{
label: "社区帮办",
value: "community",
},
{
label: "楼长帮办",
value: "building_caption",
},
{
label: "党员帮办",
value: "party",
},
{
label: "自身上报",
value: "self_help",
},
],
},
{
label: "上报人电话",
columnName: "reportUserName",
align: "center",
width: "120",
options: [],
},
{
label: "催办状态",
columnName: "reportTime",
align: "center",
width: "180",
options: [],
},
{
label: "办理状态",
columnName: "demandUserName",
align: "center",
width: "80",
options: [],
},
{
label: "办结时限",
columnName: "serviceShowName",
align: "center",
width: "120",
options: [],
},
],
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
list: [],
},
btnLoading:false,
searchStatus: "ini", //ing over
searchData: {
@ -547,6 +660,30 @@ export default {
this.getHotHouseSearch()
},
methods: {
//
async getSearchXuqiu() {
const url = "/governance/userdemand/search";
const {
searchData: { keyword },
searchXuqiu: { pageSize, pageNo },
} = this;
console.log(this.searchData,"sdklfklsjklsjdfkljd");
const { data, code, msg } = await requestPost(url, {
keyword,
pageSize,
pageNo,
});
if (code === 0) {
this.searchXuqiu.total = data.total || 0;
this.searchXuqiu.list = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
}
},
handleDel(row) {
console.log("row1", row);
this.$http
@ -689,13 +826,11 @@ export default {
const {
searchData: { type, searchKey },
} = this;
console.log(type, searchKey,"dslkdsfklsz");
console.log( type, searchKey,"dsjknfkjsjf");
localStorage.setItem("homeSearchType", type);
localStorage.setItem("homeSearchKey", searchKey);
if (!searchKey) return;
if (!this.smatrFlag) this.childrenRulesData = [];
if (type == "jumin") {
this.searchJumin.pageNo = 1;
this.searchJumin.total = 0;
@ -705,6 +840,11 @@ export default {
this.searchFangwu.total = 0;
this.getSearchFangwu();
}
else if (type == "xuqiu") {
this.searchFangwu.pageNo = 1;
this.searchFangwu.total = 0;
this.getSearchXuqiu();
}
// if (this.smatrFlag && this.childrenRulesData.length === 0) {
// this.getRulesList();
// }

1
src/views/modules/shequ/index.vue

@ -29,7 +29,6 @@
<el-dropdown-item command="xuqiu">需求</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<input
type="text"
:placeholder="typePlaceholder[searchData.type]"

2
src/views/modules/volunteer/pointsRedemption/index.vue

@ -4,7 +4,7 @@
<el-form :inline="true" ref="ref_searchform" :label-width="'100px'">
<div>
<el-form-item label="发布区域">
<el-cascader class="list_item_width_1" ref="myCascader" clearable size="small"
<el-cascader ref="myCascader" clearable size="small"
v-model.trim="formData.redeemOrgId" :options="orgOptions" :props="orgOptionProps"
@change="handleChangeAgency"></el-cascader>
</el-form-item>

Loading…
Cancel
Save