Browse Source

Merge branch 'master' into dev-fangyi

shibei_master
jiangyy 3 years ago
parent
commit
d317d1c3ab
  1. 6
      src/js/store/modules/app.js
  2. 4
      src/views/modules/base/community/buildTable.vue
  3. 2
      src/views/modules/base/community/community.vue
  4. 10
      src/views/modules/base/community/communityTable.vue
  5. 4
      src/views/modules/base/community/roomTable.vue
  6. 184
      src/views/modules/communityService/dqfwzx/index.vue
  7. 8
      src/views/modules/communityService/ninePlaces/inspect/inspect.vue
  8. 8
      src/views/modules/communityService/ninePlaces/places/places.vue
  9. 8
      src/views/modules/communityService/ninePlaces/team/team.vue
  10. 161
      src/views/modules/communityService/sqzzz/index.vue

6
src/js/store/modules/app.js

@ -5,13 +5,15 @@ export default {
clientHeight: document.documentElement.clientHeight,
size: 'medium',
resolution: 'medium',
env: 'dev'
env: 'dev',
iframeHeight:120
},
getters: {
clientHeight: (state) => state.clientHeight,
size: (state) => state.size,
resolution: (state) => state.resolution,
env: (state) => state.env
env: (state) => state.env,
iframeHeight: (state) => state.iframeHeight
},
mutations: {
[type.client_height](state, payload) {

4
src/views/modules/base/community/buildTable.vue

@ -235,11 +235,11 @@ export default {
computed: {
tableHeight () {
return (this.clientHeight - 300)
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
},
...mapGetters(['clientHeight'])
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//

2
src/views/modules/base/community/community.vue

@ -307,7 +307,7 @@ export default {
.div_table {
margin-left: 15px;
// flex: 1;
width: calc(100vw - 550px);
width: calc(100% - 300px);
background-color: #ffffff;
border-radius: 5px;
padding: 10px;

10
src/views/modules/base/community/communityTable.vue

@ -285,13 +285,13 @@ export default {
},
computed: {
tableHeight () {
return (this.clientHeight - 300)
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
},
rowHeight () {
return (this.clientHeight - 200) + 'px'
},
...mapGetters(['clientHeight'])
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//

4
src/views/modules/base/community/roomTable.vue

@ -230,11 +230,11 @@ export default {
computed: {
tableHeight () {
return (this.clientHeight - 300)
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
},
...mapGetters(['clientHeight'])
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//

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

@ -2,25 +2,26 @@
<div>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
<el-button class="diy-button--add" size="small" @click="handleAdd"
>新增</el-button
>
</div>
<div class="m-center"
v-if="tableData.length > 0">
<div class="m-center" v-if="tableData.length > 0">
<div class="center-left">
<div class="list">
<div @click="currentIndex = index"
<div class="list" :class="{ 'z-iframe': $store.state.inIframe }">
<div
@click="currentIndex = index"
class="item"
:class="{ 'z-on': currentIndex == index }"
:key="'ct' + index"
v-for="(item, index) in tableData">
<div class="item-btn"
v-if="currentIndex == index"
@click="handleEdit">
修改
v-for="(item, index) in tableData"
>
<div class="item-btns">
<a v-if="currentIndex == index" @click="handleEdit">修改</a>
<a v-if="currentIndex == index" @click="handleDel">删除</a>
</div>
<div class="item-name">{{ item.centerName }}</div>
<div class="item-prop">
<div class="prop-field">社区地址</div>
@ -48,95 +49,114 @@
>
</div> -->
<div id="centerIndexApp"
class="div_map"></div>
<div id="centerIndexApp" class="div_map"></div>
<el-table :data="tableData[currentIndex].matterList"
<el-table
:data="tableData[currentIndex].matterList"
border
style="width: 100%"
class="resi-table"
:max-height="maxTableHeight">
<el-table-column label="序号"
:max-height="maxTableHeight"
>
<el-table-column
label="序号"
type="index"
align="center"
width="50" />
<el-table-column prop="matterName"
label="事项名称">
width="50"
/>
<el-table-column prop="matterName" label="事项名称">
</el-table-column>
<el-table-column prop="allowTime"
label="可预约时间 ">
<el-table-column prop="allowTime" label="可预约时间 ">
</el-table-column>
<el-table-column fixed="right"
<el-table-column
fixed="right"
label="操作"
align="center"
width="120">
width="120"
>
<template slot-scope="scope">
<el-button @click="handleOrder(scope.$index)"
<el-button
@click="handleOrder(scope.$index)"
type="text"
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"
size="small"
style="margin-right: 10px; color: #1c6afd">预约记录</el-button>
style="margin-right: 10px; color: #1c6afd"
>预约记录</el-button
>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="m-hint"
v-else>
<el-empty description="暂无内容"
:image-size="200"></el-empty>
<div class="m-hint" v-else>
<el-empty description="暂无内容" :image-size="200"></el-empty>
</div>
</el-card>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
<el-dialog
:visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleClose">
<edit-form ref="eleEditForm"
@closed="handleClose"
>
<edit-form
ref="eleEditForm"
@dialogCancle="handleClose"
@dialogOk="handleEditSuccess"></edit-form>
@dialogOk="handleEditSuccess"
></edit-form>
</el-dialog>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="form2Show"
<el-dialog
:visible.sync="form2Show"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="预约"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleCloseForm2">
<order-form ref="eleOrderForm"
@closed="handleCloseForm2"
>
<order-form
ref="eleOrderForm"
@dialogCancle="handleCloseForm2"
@dialogOk="handleOrderSuccess"></order-form>
@dialogOk="handleOrderSuccess"
></order-form>
</el-dialog>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="orderListShow"
<el-dialog
:visible.sync="orderListShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="预约记录"
width="850px"
top="5vh"
class="dialog-h"
@closed="handleCloseOrderList">
<order-list ref="eleOrderList"
@dialogCancle="handleCloseOrderList"></order-list>
@closed="handleCloseOrderList"
>
<order-list
ref="eleOrderList"
@dialogCancle="handleCloseOrderList"
></order-list>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import { requestPost } from "@/js/dai/request2";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import editForm from "./cpts/edit";
@ -151,7 +171,7 @@ let loading; // 加载动画
export default {
components: { editForm, orderForm, orderList },
data () {
data() {
return {
openSearch: false,
@ -168,23 +188,25 @@ export default {
};
},
computed: {
maxTableHeight () {
return this.clientHeight - 520;
maxTableHeight() {
return this.$store.state.inIframe
? this.clientHeight - 520 + 120
: this.clientHeight - 520;
},
...mapGetters(["clientHeight"]),
},
watch: {
currentIndex () {
currentIndex() {
this.setMap();
},
},
async mounted () {
async mounted() {
await this.loadAgency();
await this.getTableData();
},
methods: {
// init
initMap () {
initMap() {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519);
// map TMap.Map()
@ -204,7 +226,7 @@ export default {
infoWindowList = Array(10);
},
setMarker (lat, lng, centerName) {
setMarker(lat, lng, centerName) {
markers.setGeometries([]);
markers.add([
{
@ -218,11 +240,11 @@ export default {
]);
},
setCenter (lat, lng) {
setCenter(lat, lng) {
map.setCenter(new window.TMap.LatLng(lat, lng));
},
setMap () {
setMap() {
const { tableData, currentIndex } = this;
let item = tableData[currentIndex];
if (item) {
@ -231,24 +253,24 @@ export default {
}
},
handleClose () {
handleClose() {
this.formShow = false;
},
handleCloseForm2 () {
handleCloseForm2() {
this.form2Show = false;
},
handleCloseOrderList () {
handleCloseOrderList() {
this.orderListShow = false;
},
async handleAdd () {
async handleAdd() {
this.formShow = true;
await nextTick();
console.log(this.$refs);
this.$refs.eleEditForm.initForm("add");
},
async handleWatch () {
async handleWatch() {
this.formShow = true;
await nextTick();
this.$refs.eleEditForm.initForm(
@ -257,7 +279,7 @@ export default {
);
},
async handleEdit () {
async handleEdit() {
this.formShow = true;
await nextTick();
this.$refs.eleEditForm.initForm(
@ -266,12 +288,12 @@ export default {
);
},
handleEditSuccess () {
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
async handleOrder (index) {
async handleOrder(index) {
this.form2Show = true;
await nextTick();
this.$refs.eleOrderForm.initForm(
@ -281,36 +303,34 @@ export default {
);
},
handleOrderSuccess () {
handleOrderSuccess() {
this.handleCloseForm2();
},
async handleOrderList (index) {
async handleOrderList(index) {
this.orderListShow = true;
await nextTick(0);
console.log(this.$refs);
this.$refs.eleOrderList.init(this.tableData[this.currentIndex], index);
},
async handleDel (rowData, rowIndex) {
console.log(rowData, rowIndex);
const url =
"/heart/iccommunityselforganization/delcommunityselforganization";
const { tableData } = this;
async handleDel() {
if (!confirm("删除后不可恢复,确定删除?")) return;
const { data, code, msg } = await requestPost(url, {
orgId: tableData[rowIndex].orgId,
});
const item = this.tableData[this.currentIndex];
const url = "/gov/org/icpartyservicecenter/del";
const { data, code, msg } = await requestPost(url, [
item.partyServiceCenterId,
]);
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.success("操作失败!");
}
},
async getTableData () {
async getTableData() {
const oldLen = this.tableData.length;
const url = "/gov/org/icpartyservicecenter/partyservicecenterlist";
const { data, code, msg } = await requestPost(url, {
@ -331,7 +351,7 @@ export default {
},
//
async loadAgency () {
async loadAgency() {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
@ -339,8 +359,6 @@ export default {
if (code === 0) {
this.agencyId = data.agencyId;
} else {
this.$message.error(msg);
}
},
},
@ -362,6 +380,11 @@ export default {
padding-right: 10px;
height: calc(100vh - 210px);
overflow-y: auto;
&.z-iframe {
height: calc(100vh - 210px + 120px);
}
&::-webkit-scrollbar {
/*滚动条整体样式*/
width: 8px; /*高宽分别对应横竖滚动条的尺寸*/
@ -394,7 +417,8 @@ export default {
background-color: #ffffff;
box-shadow: 0 0 10px #6aa;
}
.item-btn {
.item-btns {
position: absolute;
top: 5px;
right: 5px;
@ -423,10 +447,12 @@ export default {
}
}
}
.item-name {
font-size: 16px;
font-weight: bold;
margin-bottom: 10px;
width: calc(100% - 70px);
}
.item-prop {
display: flex;

8
src/views/modules/communityService/ninePlaces/inspect/inspect.vue

@ -529,13 +529,11 @@ export default {
computed: {
tableHeight () {
return (this.clientHeight - 420)
return this.$store.state.inIframe ? this.clientHeight - 420 + this.iframeHeight : this.clientHeight - 420
},
rowHeight () {
return (this.clientHeight - 200) + 'px'
},
...mapGetters(['clientHeight'])
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {

8
src/views/modules/communityService/ninePlaces/places/places.vue

@ -464,13 +464,11 @@ export default {
computed: {
tableHeight () {
return (this.clientHeight - 420)
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
},
rowHeight () {
return (this.clientHeight - 200) + 'px'
},
...mapGetters(['clientHeight'])
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {

8
src/views/modules/communityService/ninePlaces/team/team.vue

@ -441,13 +441,11 @@ export default {
computed: {
tableHeight () {
return (this.clientHeight - 370)
return this.$store.state.inIframe ? this.clientHeight - 370 + this.iframeHeight : this.clientHeight - 370
},
rowHeight () {
return (this.clientHeight - 200) + 'px'
},
...mapGetters(['clientHeight'])
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {

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

@ -1,7 +1,12 @@
<template>
<div class="resi-container">
<el-card ref="searchCard" class="search-card">
<el-form ref="searchForm" :inline="true" :model="fmData" class="demo-form-inline">
<el-form
ref="searchForm"
:inline="true"
:model="fmData"
class="demo-form-inline"
>
<el-form-item label="组织名称" prop="organizationName">
<el-input
v-model="fmData.organizationName"
@ -24,11 +29,20 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="diy-button--search" size="small" @click="handleSearch">查询</el-button>
<el-button class="diy-button--reset" size="small" @click="resetForm('searchForm')">重置</el-button>
<el-button
class="diy-button--search"
size="small"
@click="handleSearch"
>查询</el-button
>
<el-button
class="diy-button--reset"
size="small"
@click="resetForm('searchForm')"
>重置</el-button
>
</el-form-item>
</el-form>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
@ -38,7 +52,9 @@
<el-button
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
@click="handleExportModule('room')"
>下载模板</el-button
>
<el-upload
ref="upload"
class="upload-btn"
@ -53,9 +69,12 @@
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button size="small" class="diy-button--delete" :loading="importLoading">{{
importBtnTitle
}}</el-button>
<el-button
size="small"
class="diy-button--delete"
:loading="importLoading"
>{{ importBtnTitle }}</el-button
>
</el-upload>
<el-button @click="handleChu" class="diy-button--reset" size="small"
@ -70,22 +89,41 @@
:height="maxTableHeight"
>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column prop="organizationName" label="组织名称" align="center">
<el-table-column
prop="organizationName"
label="组织名称"
align="center"
>
<template slot-scope="scope">
<a class="name-a" @click="handleWatch(scope.row)">
{{ scope.row.organizationName }}
</a>
</template>
</el-table-column>
<el-table-column prop="organizationPersonCount" align="center" label="组织人数">
<el-table-column
prop="organizationPersonCount"
align="center"
label="组织人数"
>
</el-table-column>
<el-table-column
prop="serviceItem"
label="服务事项"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="serviceItem" label="服务事项" align="center" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column prop="score" width="100" align="center" label="积分">
</el-table-column>
<el-table-column prop="principalName" align="center" label="负责人"> </el-table-column>
<el-table-column prop="principalName" align="center" label="负责人">
</el-table-column>
<el-table-column prop="principalPhone" align="center" label="联系电话">
</el-table-column>
<el-table-column prop="organizationCreatedTime" align="center" label="创建时间">
<el-table-column
prop="organizationCreatedTime"
align="center"
label="创建时间"
>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="160">
<template slot-scope="scope">
@ -121,7 +159,7 @@
type="text"
size="small"
class="div-table-button--delete"
style="margin-left: 10px;"
style="margin-left: 10px"
>删除</el-button
>
</el-popconfirm>
@ -218,7 +256,9 @@ export default {
},
computed: {
maxTableHeight() {
return this.clientHeight - 360;
return this.$store.state.inIframe
? this.clientHeight - 360 + 120
: this.clientHeight - 360;
},
...mapGetters(["clientHeight"]),
},
@ -237,38 +277,41 @@ export default {
this.getTableData();
},
methods: {
async handleExportModule () {
let url = "/heart/iccommunityselforganization/import-template-download"
async handleExportModule() {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {}
let params = {};
await this.$http({
method: 'POST',
method: "POST",
url,
responseType: 'blob',
data: params
responseType: "blob",
data: params,
})
.then(res => {
.then((res) => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
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
} else this.$message.error('下载失败')
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
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
} else this.$message.error("下载失败");
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
//
handleExcelSuccess(res, file) {
@ -304,23 +347,28 @@ export default {
this.importBtnTitle = "正在上传中...";
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0,
});
const formData = new FormData(); //FormDataappend('key', value)
formData.append("file", file.file); //
await this.$http
.post('/heart/iccommunityselforganization/importcommunityselforganization', formData).then(res => {
console.log('res-up', res)
if (res.data.code == 0 && res.data.msg == 'success') {
.post(
"/heart/iccommunityselforganization/importcommunityselforganization",
formData
)
.then((res) => {
console.log("res-up", res);
if (res.data.code == 0 && res.data.msg == "success") {
// this.$message.success('')
this.getTableData()
} else this.$message.error(res.data.msg)
}).catch(err => {
console.log('失败', err)
file.onError() //
// this.$message.error('')
this.getTableData();
} else this.$message.error(res.data.msg);
})
.catch((err) => {
console.log("失败", err);
file.onError(); //
// this.$message.error('')
});
// axios({
// url:
// window.SITE_CONFIG["apiURL"] +
@ -344,8 +392,8 @@ export default {
// .catch((err) => {
// console.log("", err);
// });
this.importLoading = false
this.importBtnTitle = '导入'
this.importLoading = false;
this.importBtnTitle = "导入";
this.$refs.upload.clearFiles();
},
@ -370,8 +418,8 @@ export default {
this.getTableData();
},
resetForm(formName) {
this.$refs[formName].resetFields()
this.handleSearch()
this.$refs[formName].resetFields();
this.handleSearch();
},
async handleAdd() {
this.formShow = true;
@ -521,5 +569,4 @@ export default {
position: relative;
overflow: visible;
}
</style>

Loading…
Cancel
Save