|
|
|
<template>
|
|
|
|
<div class="div_main">
|
|
|
|
<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="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="qudao">
|
|
|
|
<el-select v-model.trim="qudao"
|
|
|
|
placeholder="请选择"
|
|
|
|
size="small"
|
|
|
|
clearable
|
|
|
|
class="item_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="titleTemp">
|
|
|
|
<el-input v-model="content"
|
|
|
|
class="resi-cell-input"
|
|
|
|
size="small"
|
|
|
|
clearable
|
|
|
|
placeholder="请输入">
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<el-form-item label="变更时间"
|
|
|
|
prop="startDate">
|
|
|
|
<el-date-picker v-model="timeRange"
|
|
|
|
size="small"
|
|
|
|
type="daterange"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
@change="handleTimeChange"
|
|
|
|
range-separator="至"
|
|
|
|
start-placeholder="开始时间"
|
|
|
|
end-placeholder="结束时间">
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
</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="resi-row-btn">
|
|
|
|
<el-button v-if="false"
|
|
|
|
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="name"
|
|
|
|
fixed="left"
|
|
|
|
label="姓名"
|
|
|
|
align="center">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<a class="name-a"
|
|
|
|
@click="handleWatch(scope.$index)">
|
|
|
|
{{ scope.row.name }}
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="gridName"
|
|
|
|
align="center"
|
|
|
|
label="所属网格"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="home"
|
|
|
|
label="所属房屋"
|
|
|
|
align="center"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="mobile"
|
|
|
|
width="100"
|
|
|
|
align="center"
|
|
|
|
label="手机号"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="idCard"
|
|
|
|
align="center"
|
|
|
|
label="身份证号"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="gender"
|
|
|
|
align="center"
|
|
|
|
label="性别">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="birthday"
|
|
|
|
align="center"
|
|
|
|
label="出生日期"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="birthplace"
|
|
|
|
align="center"
|
|
|
|
label="出生地"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="parentName"
|
|
|
|
align="center"
|
|
|
|
label="出生人父/母姓名"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="count"
|
|
|
|
align="center"
|
|
|
|
label="胎次">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="reportDate"
|
|
|
|
align="center"
|
|
|
|
label="申报户口日期"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="householderName"
|
|
|
|
align="center"
|
|
|
|
label="户主姓名"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="householderRelation"
|
|
|
|
align="center"
|
|
|
|
label="与户主关系"
|
|
|
|
:show-overflow-tooltip="true">
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column fixed="right"
|
|
|
|
label="操作"
|
|
|
|
align="center"
|
|
|
|
width="160">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button @click="handleWatch(scope.$index)"
|
|
|
|
type="text"
|
|
|
|
size="small">查看</el-button>
|
|
|
|
|
|
|
|
<el-button @click="handleEdit(scope.$index)"
|
|
|
|
type="text"
|
|
|
|
size="small"
|
|
|
|
class="div-table-button--edit">处理</el-button>
|
|
|
|
|
|
|
|
<el-popconfirm v-if="false"
|
|
|
|
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>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g-page"
|
|
|
|
v-if="pageType == 'edit' || pageType == 'info'">
|
|
|
|
<project-info ref="eleEditForm"
|
|
|
|
:type="pageType"
|
|
|
|
:projectId="currentProject.projectId"
|
|
|
|
@dialogCancle="handleClose"
|
|
|
|
@dialogOk="handleEditSuccess" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { requestPost } from "@/js/dai/request";
|
|
|
|
import nextTick from "dai-js/tools/nextTick";
|
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
import projectInfo from "./cpts/project-info";
|
|
|
|
import axios from "axios";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: { projectInfo },
|
|
|
|
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
pageType: "list", // 列表list 处理dispose 详情info 议题详情issue-info
|
|
|
|
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: window.localStorage.getItem("pageSize") || 20,
|
|
|
|
total: 1,
|
|
|
|
|
|
|
|
agencyId: '',
|
|
|
|
gridList: [],//所属网格list--场所区域
|
|
|
|
|
|
|
|
tableData: [],
|
|
|
|
|
|
|
|
statusArray: [
|
|
|
|
{
|
|
|
|
value: "1",
|
|
|
|
label: "处理中",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: "0",
|
|
|
|
label: "已完成",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
qudaoArray: [
|
|
|
|
{
|
|
|
|
value: "0",
|
|
|
|
label: "随手拍/随时讲",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: "1",
|
|
|
|
label: "多媒体反应",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: "2",
|
|
|
|
label: "社区电话",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: "3",
|
|
|
|
label: "12345",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: "4",
|
|
|
|
label: "网络员手持终端",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
gridId: '',
|
|
|
|
qudao: '',
|
|
|
|
content: '',
|
|
|
|
fmData: {
|
|
|
|
title: "",
|
|
|
|
status: "",
|
|
|
|
birthdayStart: "",
|
|
|
|
birthdayEnd: "",
|
|
|
|
birthdayTime: ["", ""],
|
|
|
|
},
|
|
|
|
|
|
|
|
currentProject: {
|
|
|
|
projectId: "",
|
|
|
|
userId: "",
|
|
|
|
categoryCodes: [],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
maxTableHeight () {
|
|
|
|
return this.$store.state.inIframe
|
|
|
|
? this.clientHeight - 360 + this.iframeHeigh
|
|
|
|
: this.clientHeight - 360;
|
|
|
|
},
|
|
|
|
...mapGetters(["clientHeight", "iframeHeight"]),
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
"fmData.birthdayTime": function (val) {
|
|
|
|
if (Array.isArray(val) && val.length == 2) {
|
|
|
|
this.fmData.birthdayStart = val[0];
|
|
|
|
this.fmData.birthdayEnd = val[1];
|
|
|
|
} else {
|
|
|
|
this.fmData.birthdayStart = "";
|
|
|
|
this.fmData.birthdayEnd = "";
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted () {
|
|
|
|
const { user } = this.$store.state
|
|
|
|
this.agencyId = user.agencyId
|
|
|
|
this.loadGrid();
|
|
|
|
this.getTableData();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
handleSearch (val) {
|
|
|
|
console.log(this.fmData);
|
|
|
|
this.pageNo = 1;
|
|
|
|
this.getTableData();
|
|
|
|
},
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleSizeChange (val) {
|
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
|
this.pageSize = val;
|
|
|
|
window.localStorage.setItem("pageSize", val);
|
|
|
|
this.getTableData();
|
|
|
|
},
|
|
|
|
handleCurrentChange (val) {
|
|
|
|
console.log(`当前页: ${val}`);
|
|
|
|
this.pageNo = val;
|
|
|
|
this.getTableData();
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
resetForm (formName) {
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
this.handleSearch();
|
|
|
|
},
|
|
|
|
|
|
|
|
async handleExport () {
|
|
|
|
const url = "/epmetuser/icBirthRecord/export";
|
|
|
|
const { pageSize, pageNo, fmData } = this;
|
|
|
|
axios({
|
|
|
|
url: window.SITE_CONFIG["apiURL"] + url,
|
|
|
|
method: "post",
|
|
|
|
data: {
|
|
|
|
pageSize,
|
|
|
|
pageNo,
|
|
|
|
...fmData,
|
|
|
|
},
|
|
|
|
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 () { },
|
|
|
|
async handleWatch (rowIndex) {
|
|
|
|
let item = this.tableData[rowIndex];
|
|
|
|
this.currentProject = {
|
|
|
|
projectId: item.projectId,
|
|
|
|
};
|
|
|
|
this.pageType = "info";
|
|
|
|
},
|
|
|
|
|
|
|
|
async handleEdit (rowIndex) {
|
|
|
|
let item = this.tableData[rowIndex];
|
|
|
|
this.currentProject = {
|
|
|
|
projectId: item.projectId,
|
|
|
|
};
|
|
|
|
this.pageType = "edit";
|
|
|
|
},
|
|
|
|
|
|
|
|
handleClose () {
|
|
|
|
this.pageType = "list";
|
|
|
|
this.currentProject = {
|
|
|
|
projectId: "",
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
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.success("操作失败!");
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
async getTableData () {
|
|
|
|
const url = "/epmetuser/icBirthRecord/page";
|
|
|
|
const { pageSize, pageNo, fmData } = this;
|
|
|
|
const { data, code, msg } = await requestPost(url, {
|
|
|
|
pageSize,
|
|
|
|
pageNo,
|
|
|
|
...fmData,
|
|
|
|
});
|
|
|
|
if (code === 0) {
|
|
|
|
console.log("列表请求成功!!!!!!!!!!!!!!");
|
|
|
|
this.total = data.total || 0;
|
|
|
|
this.tableData = data.list
|
|
|
|
? data.list.map((item) => {
|
|
|
|
return item;
|
|
|
|
})
|
|
|
|
: [];
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import "@/assets/scss/buttonstyle.scss";
|
|
|
|
@import "@/assets/scss/modules/management/list-main.scss";
|
|
|
|
|
|
|
|
.item_width_1 {
|
|
|
|
width: 260px;
|
|
|
|
}
|
|
|
|
</style>
|