Browse Source

Merge branch 'master' into shibei_master

shibei_master
dai 3 years ago
parent
commit
329d35eeab
  1. 132
      src/views/modules/communityService/dqfwzx/index.vue

132
src/views/modules/communityService/dqfwzx/index.vue

@ -2,25 +2,26 @@
<div> <div>
<el-card class="resi-card-table"> <el-card class="resi-card-table">
<div class="resi-row-btn"> <div class="resi-row-btn">
<el-button class="diy-button--add" <el-button class="diy-button--add" size="small" @click="handleAdd"
size="small" >新增</el-button
@click="handleAdd">新增</el-button> >
</div> </div>
<div class="m-center" <div class="m-center" v-if="tableData.length > 0">
v-if="tableData.length > 0">
<div class="center-left"> <div class="center-left">
<div class="list"> <div class="list">
<div @click="currentIndex = index" <div
@click="currentIndex = index"
class="item" class="item"
:class="{ 'z-on': currentIndex == index }" :class="{ 'z-on': currentIndex == index }"
:key="'ct' + index" :key="'ct' + index"
v-for="(item, index) in tableData"> v-for="(item, index) in tableData"
<div class="item-btn" >
v-if="currentIndex == index" <div class="item-btns">
@click="handleEdit"> <a v-if="currentIndex == index" @click="handleEdit">修改</a>
修改 <a v-if="currentIndex == index" @click="handleDel">删除</a>
</div> </div>
<div class="item-name">{{ item.centerName }}</div> <div class="item-name">{{ item.centerName }}</div>
<div class="item-prop"> <div class="item-prop">
<div class="prop-field">社区地址</div> <div class="prop-field">社区地址</div>
@ -48,95 +49,114 @@
> >
</div> --> </div> -->
<div id="centerIndexApp" <div id="centerIndexApp" class="div_map"></div>
class="div_map"></div>
<el-table :data="tableData[currentIndex].matterList" <el-table
:data="tableData[currentIndex].matterList"
border border
style="width: 100%" style="width: 100%"
class="resi-table" class="resi-table"
:max-height="maxTableHeight"> :max-height="maxTableHeight"
<el-table-column label="序号" >
<el-table-column
label="序号"
type="index" type="index"
align="center" align="center"
width="50" /> width="50"
<el-table-column prop="matterName" />
label="事项名称"> <el-table-column prop="matterName" label="事项名称">
</el-table-column> </el-table-column>
<el-table-column prop="allowTime" <el-table-column prop="allowTime" label="可预约时间 ">
label="可预约时间 ">
</el-table-column> </el-table-column>
<el-table-column fixed="right" <el-table-column
fixed="right"
label="操作" label="操作"
align="center" align="center"
width="120"> width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleOrder(scope.$index)" <el-button
@click="handleOrder(scope.$index)"
type="text" type="text"
size="small" size="small"
style="color: #1c6afd">预约</el-button> style="color: #1c6afd"
>预约</el-button
>
<el-button @click="handleOrderList(scope.$index)" <el-button
@click="handleOrderList(scope.$index)"
type="text" type="text"
size="small" size="small"
style="margin-right: 10px; color: #1c6afd">预约记录</el-button> style="margin-right: 10px; color: #1c6afd"
>预约记录</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<div class="m-hint" <div class="m-hint" v-else>
v-else> <el-empty description="暂无内容" :image-size="200"></el-empty>
<el-empty description="暂无内容"
:image-size="200"></el-empty>
</div> </div>
</el-card> </el-card>
<!-- 修改弹出框 --> <!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow" <el-dialog
:visible.sync="formShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="formTitle" :title="formTitle"
width="850px" width="850px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="handleClose"> @closed="handleClose"
<edit-form ref="eleEditForm" >
<edit-form
ref="eleEditForm"
@dialogCancle="handleClose" @dialogCancle="handleClose"
@dialogOk="handleEditSuccess"></edit-form> @dialogOk="handleEditSuccess"
></edit-form>
</el-dialog> </el-dialog>
<!-- 修改弹出框 --> <!-- 修改弹出框 -->
<el-dialog :visible.sync="form2Show" <el-dialog
:visible.sync="form2Show"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
title="预约" title="预约"
width="850px" width="850px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="handleCloseForm2"> @closed="handleCloseForm2"
<order-form ref="eleOrderForm" >
<order-form
ref="eleOrderForm"
@dialogCancle="handleCloseForm2" @dialogCancle="handleCloseForm2"
@dialogOk="handleOrderSuccess"></order-form> @dialogOk="handleOrderSuccess"
></order-form>
</el-dialog> </el-dialog>
<!-- 修改弹出框 --> <!-- 修改弹出框 -->
<el-dialog :visible.sync="orderListShow" <el-dialog
:visible.sync="orderListShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
title="预约记录" title="预约记录"
width="850px" width="850px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="handleCloseOrderList"> @closed="handleCloseOrderList"
<order-list ref="eleOrderList" >
@dialogCancle="handleCloseOrderList"></order-list> <order-list
ref="eleOrderList"
@dialogCancle="handleCloseOrderList"
></order-list>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request2";
import nextTick from "dai-js/tools/nextTick"; import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import editForm from "./cpts/edit"; import editForm from "./cpts/edit";
@ -292,21 +312,19 @@ export default {
this.$refs.eleOrderList.init(this.tableData[this.currentIndex], index); this.$refs.eleOrderList.init(this.tableData[this.currentIndex], index);
}, },
async handleDel (rowData, rowIndex) { async handleDel() {
console.log(rowData, rowIndex); if (!confirm("删除后不可恢复,确定删除?")) return;
const url =
"/heart/iccommunityselforganization/delcommunityselforganization";
const { tableData } = this;
const { data, code, msg } = await requestPost(url, { const item = this.tableData[this.currentIndex];
orgId: tableData[rowIndex].orgId, const url = "/gov/org/icpartyservicecenter/del";
});
const { data, code, msg } = await requestPost(url, [
item.partyServiceCenterId,
]);
if (code === 0) { if (code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.getTableData(); this.getTableData();
} else {
this.$message.success("操作失败!");
} }
}, },
@ -339,8 +357,6 @@ export default {
if (code === 0) { if (code === 0) {
this.agencyId = data.agencyId; this.agencyId = data.agencyId;
} else {
this.$message.error(msg);
} }
}, },
}, },
@ -394,7 +410,8 @@ export default {
background-color: #ffffff; background-color: #ffffff;
box-shadow: 0 0 10px #6aa; box-shadow: 0 0 10px #6aa;
} }
.item-btn {
.item-btns {
position: absolute; position: absolute;
top: 5px; top: 5px;
right: 5px; right: 5px;
@ -423,6 +440,7 @@ export default {
} }
} }
} }
.item-name { .item-name {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;

Loading…
Cancel
Save