Browse Source

合并冲突

shibei_master
jiangyy 4 years ago
parent
commit
5ec86b8f1e
  1. 2
      .env.production
  2. 2
      public/index.html
  3. 4
      src/assets/scss/modules/search.scss
  4. 1
      src/js/dai/request.js
  5. 33
      src/views/main-shuju/main.vue
  6. 38
      src/views/main.vue
  7. 134
      src/views/modules/base/community/buildTable.vue
  8. 40
      src/views/modules/base/community/community.vue
  9. 62
      src/views/modules/base/community/communityTable.vue
  10. 101
      src/views/modules/base/community/roomTable.vue
  11. 16
      src/views/modules/shequ/index.vue

2
.env.production

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

2
public/index.html

@ -64,7 +64,7 @@
<!-- 生产环境 -->
<% if (process.env.VUE_APP_NODE_ENV==='prod' ) { %>
<script>
window.SITE_CONFIG['apiURL'] = 'https://epdc-shibei.elinkservice.cn/api'
window.SITE_CONFIG['apiURL'] = 'https://epmet-cloud.elinkservice.cn/api'
</script>
<% } %>
</head>

4
src/assets/scss/modules/search.scss

@ -26,13 +26,15 @@
.input {
position: relative;
select {
.select-show {
border: none;
display: block;
font-size: 16px;
width: 90px;
line-height: 32px;
text-align: center;
color: #0082fb;
cursor: default;
}
input {

1
src/js/dai/request.js

@ -2,7 +2,6 @@
| 请求接口封装 |
---------------------------------------------------------------*/
import axios from "axios";
import curry from "dai-js/tools/curry";
import { Message } from "element-ui";

33
src/views/main-shuju/main.vue

@ -1,22 +1,18 @@
<template>
<div
v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
<div v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
'g-bd',
{ 'z-sidebar--fold': $store.state.sidebarFold },
{
'z-sidebar--noside': true,
},
]"
>
]">
<template v-if="!loading">
<main-navbar ref="ref_navbar" />
<div class="g-cnt">
<main-content
v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName"
/>
<main-content v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName" />
</div>
</template>
</div>
@ -31,10 +27,10 @@ import nextTick from "dai-js/tools/nextTick";
import { requestPost } from "@/js/dai/request";
export default {
provide() {
provide () {
return {
//
refresh() {
refresh () {
this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false;
@ -42,7 +38,7 @@ export default {
},
};
},
data() {
data () {
return {
loading: true,
userType: localStorage.getItem("userType"),
@ -56,7 +52,7 @@ export default {
watch: {
$route: "routeHandle",
},
async created() {
async created () {
this.windowResizeHandle();
this.routeHandle(this.$route);
Promise.all([this.getWorkUserInfo()]).then(() => {
@ -65,11 +61,11 @@ export default {
},
computed: {},
methods: {
changeCustomerName(customerName) {
changeCustomerName (customerName) {
this.$refs["ref_navbar"].changeCustomerName(customerName);
},
//
windowResizeHandle() {
windowResizeHandle () {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener(
@ -81,7 +77,7 @@ export default {
);
},
// ,
routeHandle(route) {
routeHandle (route) {
if (!route.meta.isTab) {
return false;
}
@ -105,7 +101,7 @@ export default {
},
//
async getWorkUserInfo() {
async getWorkUserInfo () {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
const { data, code, msg } = await requestPost(url, params);
@ -115,6 +111,7 @@ export default {
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
localStorage.setItem("agencyId", data.agencyId);
if (!localStorage.getItem("customerName")) {
localStorage.setItem("customerName", data.customerName || "");
}

38
src/views/main.vue

@ -1,8 +1,7 @@
<template>
<div
v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
<div v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
'aui-wrapper',
{ 'aui-sidebar--fold': $store.state.sidebarFold },
{
@ -10,16 +9,14 @@
$store.state.sidebarActiveSubMenuList.length == 0 || $store.state.inIframe,
},
{ 'z-iframe': $store.state.inIframe },
]"
>
]">
<template v-if="!loading">
<main-navbar ref="ref_navbar" v-if="!$store.state.inIframe" />
<main-navbar ref="ref_navbar"
v-if="!$store.state.inIframe" />
<main-sidebar v-if="!$store.state.inIframe" />
<div class="aui-content__wrapper">
<main-content
v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName"
/>
<main-content v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName" />
</div>
<main-theme-tools v-if="!$store.state.inIframe" />
</template>
@ -37,10 +34,10 @@ import nextTick from "dai-js/tools/nextTick";
import { requestPost } from "@/js/dai/request";
export default {
provide() {
provide () {
return {
//
refresh() {
refresh () {
this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false;
@ -48,7 +45,7 @@ export default {
},
};
},
data() {
data () {
return {
loading: true,
userType: localStorage.getItem("userType"),
@ -64,7 +61,7 @@ export default {
watch: {
$route: "routeHandle",
},
async created() {
async created () {
this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
console.log(this.$store.state.sidebarMenuList);
@ -76,11 +73,11 @@ export default {
},
computed: {},
methods: {
changeCustomerName(customerName) {
changeCustomerName (customerName) {
this.$refs["ref_navbar"].changeCustomerName(customerName);
},
//
windowResizeHandle() {
windowResizeHandle () {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener(
@ -92,7 +89,7 @@ export default {
);
},
// ,
routeHandle(route) {
routeHandle (route) {
if (!route.meta.isTab) {
return false;
}
@ -115,7 +112,7 @@ export default {
this.$store.state.contentTabsActiveName = tab.name;
this.syncLevelOneMenuActive(tab.menuId);
},
async syncLevelOneMenuActive(menuId) {
async syncLevelOneMenuActive (menuId) {
await nextTick();
console.log(
"*******************************",
@ -138,7 +135,7 @@ export default {
idx !== -1 ? this.$store.state.sidebarMenuList[idx].children : [];
},
//
async getWorkUserInfo() {
async getWorkUserInfo () {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
const { data, code, msg } = await requestPost(url, params);
@ -148,6 +145,7 @@ export default {
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
localStorage.setItem("agencyId", data.agencyId);
if (!localStorage.getItem("customerName")) {
localStorage.setItem("customerName", data.customerName || "");
}

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

@ -41,47 +41,49 @@
size="small"
icon="el-icon-plus"
@click="handleAdd">新增楼宇</el-button>
<el-button style=";margin-left:10px"
type="blue"
size="small"
icon="el-icon-download"
@click="handleExportModule('building')">下载楼宇模板</el-button>
<el-upload style=""
ref="upload_building"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'building')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'building')})">
<el-button style="margin-left:10px"
<div class="btn_upload"
v-if="showImportBtn">
<el-button style=";margin-left:10px"
type="blue"
size="small"
icon="el-icon-upload2"
:loading="importBuildingLoading"
type="red">导入楼宇数据</el-button>
</el-upload>
<el-button style=";margin-left:10px"
type="blue"
size="small"
icon="el-icon-download"
@click="handleExportModule('room')">下载房屋模板</el-button>
<el-upload style=""
ref="upload_room"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'room')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'room')})">
<el-button style="margin-left:10px"
icon="el-icon-download"
@click="handleExportModule('building')">下载楼宇模板</el-button>
<el-upload style=""
ref="upload_building"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'building')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'building')})">
<el-button style="margin-left:10px"
size="small"
icon="el-icon-upload2"
:loading="importBuildingLoading"
type="red">导入楼宇数据</el-button>
</el-upload>
<el-button style=";margin-left:10px"
type="blue"
size="small"
icon="el-icon-upload2"
:loading="importRoomLoading"
type="red">导入房屋数据</el-button>
</el-upload>
icon="el-icon-download"
@click="handleExportModule('room')">下载房屋模板</el-button>
<el-upload style=""
ref="upload_room"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'room')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'room')})">
<el-button style="margin-left:10px"
size="small"
icon="el-icon-upload2"
:loading="importRoomLoading"
type="red">导入房屋数据</el-button>
</el-upload>
</div>
</div>
<div class="div_table">
@ -134,12 +136,14 @@
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text"
<el-button v-if="scope.row.showBtn"
type="text"
style="color:#00A7A9;text-decoration: underline;"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text"
<el-button v-if="scope.row.showBtn"
type="text"
style="color:#D51010;text-decoration: underline;"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
@ -206,6 +210,7 @@ export default {
tableLoading: true,
selAllFlag: false,
isIndeterminate: false,//
// showImportBtn: false,//
agencyObj: {},//
ownerName: '',
@ -242,8 +247,17 @@ export default {
async loadTable (fromTree, treeObj) {
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
// if (this.agencyObj.pid === this.staffAgencyId) {//idid
// this.showImportBtn = true
// } else {
// this.showImportBtn = false
// }
}
console.log(this.agencyObj)
const url = "/gov/org/building/buildinglist"
let params = {
@ -258,6 +272,14 @@ export default {
if (code === 0) {
this.total = data.total
data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
} else {
item.showBtn = false
}
});
this.tableData = data.list
} else {
this.$message.error(msg)
@ -410,10 +432,11 @@ export default {
this.$emit('refreshTree')
this.loadTable()
} else if (code > 8000) {
// this.$message({
// type: "success",
// message: msg
// });
this.$message({
showClose: true,
message: msg,
duration: 0
})
this.$emit('refreshTree')
this.loadTable()
} else {
@ -590,12 +613,12 @@ export default {
if (data.code === 0 && data.msg == 'success') {
// this.$message.success('')
} else {
this.$message({
showClose: true,
message: rspMsg,
duration: 0,
type: "error"
})
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.$emit('refreshTree')
@ -660,7 +683,14 @@ export default {
}
},
props: {
staffAgencyId: {
type: String,
default: '',
},
showImportBtn: {
type: Boolean,
default: false,
},
}
}
</script>

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

@ -29,13 +29,18 @@
<build-table v-if="selTreeObj.level==='neighborHood'"
ref="ref_neighTable"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
@toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table>
<room-table v-else-if="selTreeObj.level==='building'"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table>
<community-table v-else
@toNextLevel="toNextLevel"
:staffAgencyId="staffAgencyId"
ref="ref_communityTable"
@refreshTree="refreshTree"></community-table>
@ -67,7 +72,9 @@ export default {
selTreeObj: {},
centerPoint: []
centerPoint: [],
staffAgencyId: localStorage.getItem("agencyId"),
showImportBtn: false
}
},
@ -78,6 +85,7 @@ export default {
this.treeLoading = true
await this.loadOrgData()
await this.loadTree()
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj)
if (this.treeData.length > 0) {
this.$nextTick(() => {
@ -147,7 +155,12 @@ export default {
handleNodeClick (obj) {
this.getTreeObj(obj)
this.$nextTick(() => {
if (obj.level === 'building') {//
this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj)
@ -196,18 +209,31 @@ export default {
// idtypeidid
// idtypeid
if (obj.level === 'building') {//
let communityNode = this.$refs.ref_tree.getNode(obj.pid)
obj.communityId = communityNode.data.id
obj.communityName = communityNode.data.label
let neighborHoodNode = this.$refs.ref_tree.getNode(obj.pid)//
} else if (obj.level === 'neighborHood') {//
let gridNode = this.$refs.ref_tree.getNode(neighborHoodNode.data.pid)//
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)//
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else if (obj.level === 'neighborHood') {//
let gridNode = this.$refs.ref_tree.getNode(obj.pid)
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)
obj.gridId = gridNode.data.id
obj.gridName = gridNode.data.label
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else {
}
@ -276,8 +302,8 @@ export default {
.div_table {
margin-left: 15px;
flex: 1;
// width: calc(100vw - 550px);
// flex: 1;
width: calc(100vw - 550px);
background-color: #ffffff;
border-radius: 5px;
padding: 10px;

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

@ -42,7 +42,7 @@
icon="el-icon-plus"
@click="handleAdd">新增小区</el-button>
<div class="btn_upload"
v-if="agencyObj.level==='community'||agencyObj.level==='grid'">
v-if="showImportBtn">
<el-button style=""
type="blue"
size="small"
@ -157,12 +157,14 @@
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text"
<el-button v-if="scope.row.showBtn"
type="text"
style="color:#00A7A9;text-decoration: underline;"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text"
<el-button v-if="scope.row.showBtn"
type="text"
style="color:#D51010;text-decoration: underline;"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
@ -229,6 +231,7 @@ export default {
tableLoading: true,
selAllFlag: false,
isIndeterminate: false,//
showImportBtn: false,//
agencyObj: {},//
ownerName: '',
@ -236,6 +239,7 @@ export default {
tableData: [],
selection: [],
//form
formShow: false,
formTitle: '新增小区',
@ -254,7 +258,6 @@ export default {
},
computed: {
tableHeight () {
return (this.clientHeight - 300)
},
@ -269,9 +272,26 @@ export default {
this.loadTable()
},
async loadTable (fromTree, treeObj) {
console.log(111, this.staffAgencyId)
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
if (this.agencyObj.level === 'community') {//
if (this.agencyObj.id === this.staffAgencyId) {//idid
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else if (this.agencyObj.level === 'grid') {//
if (this.agencyObj.pid === this.staffAgencyId) {//idid
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else {
this.showImportBtn = false
}
}
const url = "/gov/org/neighborhood/neighborhoodlist"
@ -289,6 +309,14 @@ export default {
if (code === 0) {
this.total = data.total
data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
} else {
item.showBtn = false
}
});
this.tableData = data.list
} else {
this.$message.error(msg)
@ -440,11 +468,11 @@ export default {
this.$emit('refreshTree')
this.loadTable()
} else if (code > 8000) {
// this.$message({
// showClose: true,
// message: msg,
// duration: 0
// })
this.$message({
showClose: true,
message: msg,
duration: 0
})
this.$emit('refreshTree')
this.loadTable()
} else {
@ -624,12 +652,12 @@ export default {
if (data.code === 0 && data.msg == 'success') {
// this.$message.success('')
} else {
this.$message({
showClose: true,
message: rspMsg,
duration: 0,
type: "error"
})
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.$emit('refreshTree')
@ -702,6 +730,10 @@ export default {
}
},
props: {
staffAgencyId: {
type: String,
default: '',
},
}
}

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

@ -41,26 +41,29 @@
icon="el-icon-plus"
size="small"
@click="handleAdd">新增房屋</el-button>
<el-button style="float:left"
type="blue"
size="small"
icon="el-icon-download"
@click="handleExportModule">下载房屋模板</el-button>
<el-upload ref="upload"
:multiple='false'
:show-file-list='false'
:before-upload="beforeUpload"
action=""
accept=".xls,.xlsx"
:limit="1"
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style="margin-left:10px"
<div class="btn_upload"
v-if="showImportBtn">
<el-button style="float:left"
type="blue"
size="small"
icon="el-icon-upload2"
:loading="importRoomLoading"
type="red">导入房屋数据</el-button>
</el-upload>
icon="el-icon-download"
@click="handleExportModule">下载房屋模板</el-button>
<el-upload ref="upload"
:multiple='false'
:show-file-list='false'
:before-upload="beforeUpload"
action=""
accept=".xls,.xlsx"
:limit="1"
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
icon="el-icon-upload2"
:loading="importRoomLoading"
type="red">导入房屋数据</el-button>
</el-upload>
</div>
</div>
<div class="div_table">
@ -125,12 +128,14 @@
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text"
<el-button v-if="scope.row.showBtn"
type="text"
style="color:#00A7A9;text-decoration: underline;"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button type="text"
<el-button v-if="scope.row.showBtn"
type="text"
style="color:#D51010;text-decoration: underline;"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
@ -195,6 +200,7 @@ export default {
tableLoading: true,
selAllFlag: false,
isIndeterminate: false,//
// showImportBtn: false,//
agencyObj: {},//
ownerName: '',
@ -234,6 +240,21 @@ export default {
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
// if (this.agencyObj.level === 'community') {//
// if (this.agencyObj.id === this.staffAgencyId) {//idid
// this.showImportBtn = true
// } else {
// this.showImportBtn = false
// }
// } else if (this.agencyObj.level === 'grid') {//
// if (this.agencyObj.pid === this.staffAgencyId) {//idid
// this.showImportBtn = true
// } else {
// this.showImportBtn = false
// }
// } else {
// this.showImportBtn = false
// }
}
const url = "/gov/org/house/houselist"
@ -250,6 +271,14 @@ export default {
if (code === 0) {
this.total = data.total
data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
} else {
item.showBtn = false
}
});
this.tableData = data.list
} else {
this.$message.error(msg)
@ -397,10 +426,11 @@ export default {
this.$emit('refreshTree')
this.loadTable()
} else if (code > 8000) {
// this.$message({
// type: "success",
// message: msg
// });
this.$message({
showClose: true,
message: msg,
duration: 0
})
this.$emit('refreshTree')
this.loadTable()
} else {
@ -553,12 +583,12 @@ export default {
if (data.code === 0 && data.msg == 'success') {
// this.$message.success('')
} else {
this.$message({
showClose: true,
message: rspMsg,
duration: 0,
type: "error"
})
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.$emit('refreshTree')
@ -615,7 +645,14 @@ export default {
}
},
props: {
staffAgencyId: {
type: String,
default: '',
},
showImportBtn: {
type: Boolean,
default: false,
},
}
}
</script>

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

@ -9,11 +9,17 @@
<div class="search">
<div class="input">
<select v-model="searchData.type">
<option value="jumin">居民</option>
<option value="fangwu">房屋</option>
<option value="xuqiu">需求</option>
</select>
<el-dropdown class="select"
placement="bottom" v-model="searchData.type" @command="type => searchData.type = type">
<span class="select-show">
{{{jumin:'居民', fangwu: '房屋', xuqiu:'需求'}[searchData.type]}}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="jumin">居民</el-dropdown-item>
<el-dropdown-item command="fangwu">房屋</el-dropdown-item>
<el-dropdown-item command="xuqiu">需求</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<input
type="text"

Loading…
Cancel
Save