提交 7f5e1fa4 authored 作者: 赵明's avatar 赵明

关联小区 域名登录

上级 716de8b3
import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
import Vue from 'vue'
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
export const loginUrlCheck = (params)=>postAction("/sys/loginUrlCheck",params);
// 首页统计
const homeDataStatistics = (params)=>getAction("/community/homepage/dataStatistics",params);
const companyNoticeList = (params)=>getAction("/property-company/notice/companyNotice/list",params);
......
......@@ -14,7 +14,7 @@ import { axios } from '@/utils/request'
*/
export function login(parameter) {
return axios({
url: '/sys/login',
url: 'property-system/sys/shopLogin',
method: 'post',
data: parameter
})
......@@ -22,7 +22,7 @@ export function login(parameter) {
export function phoneLogin(parameter) {
return axios({
url: '/sys/phoneLogin',
url: 'property-system/sys/shopLogin',
method: 'post',
data: parameter
})
......@@ -48,7 +48,7 @@ export function getSmsCaptcha(parameter) {
export function logout(logoutToken) {
return axios({
url: '/sys/logout',
url: 'property-system/sys/shopLogout',
method: 'post',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
......
<template>
<div id="userLayout" :class="['user-layout-wrapper', device]">
<div class="container">
<div class="container" v-if="isPageUrlTrue">
<div class="top">
<div class="header">
<a href="/">
<!-- <img src="~@/assets/logo.svg" class="logo" alt="logo"> -->
<img src="~@/assets/logo.png" class="logo" alt="logo">
<img v-if="pageImage" :src="pageImage" class="logo" alt="logo">
<img v-else src="~@/assets/logo.png" class="logo" alt="logo">
<span class="title">欢迎登陆</span>
</a>
</div>
<div class="desc">
湖北汉江之星科技有限公司
</div>
<div class="desc">{{pageTitle}}</div>
</div>
<route-view></route-view>
......@@ -27,20 +26,26 @@
</div>
</div> -->
</div>
<div v-else>
<err-page />
</div>
</div>
</template>
<script>
import RouteView from "@/components/layouts/RouteView"
import { mixinDevice } from '@/utils/mixin.js'
import { mapGetters } from 'vuex'
import errPage from './urlErr.vue'
export default {
name: "UserLayout",
components: { RouteView },
components: { RouteView, errPage },
mixins: [mixinDevice],
data () {
return {}
},
computed: mapGetters(["isPageUrlTrue", "pageTitle", "pageImage"]),
mounted () {
document.body.classList.add('userLayout')
},
......
<template>
<div class="exception">
<div class="img">
<img src="https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg"/>
</div>
<div class="content">
<h1>404</h1>
<div class="desc">抱歉,你访问的页面地址错误</div>
<!-- <div class="action">
<a-button type="primary" @click="handleToHome">返回首页</a-button>
</div> -->
</div>
</div>
</template>
<script>
export default {
name: "ErrPage",
data() {
return {}
},
methods: {
}
}
</script>
<style lang="less" scoped>
.exception {
min-height: 500px;
height: 80%;
align-items: center;
text-align: center;
margin-top: 150px;
.img {
display: inline-block;
padding-right: 52px;
zoom: 1;
img {
height: 360px;
max-width: 430px;
}
}
.content {
display: inline-block;
flex: auto;
h1 {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
}
.desc {
color: rgba(0, 0, 0, .45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
}
}
}
.mobile {
.exception {
margin-top: 30px;
.img {
padding-right: unset;
img {
height: 40%;
max-width: 80%;
}
}
}
}
</style>
\ No newline at end of file
......@@ -40,7 +40,7 @@ export default {
type: Boolean,
default: false,
}
},
data() {
return {
......@@ -143,10 +143,13 @@ export default {
}
.house-content-box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.box {
box-sizing: border-box;
flex: none;
width: 300px;
margin-bottom: 30px;
height: 300px;
border-radius: 10px;
margin-right: 20px;
......
......@@ -18,7 +18,9 @@ const getters = {
return state.enhance.enhanceJs[code]
},
sysSafeMode: state => state.user.sysSafeMode,
isPageUrlTrue: state => state.loginurl.isPageUrlTrue,
pageTitle: state => state.loginurl.pageTitle,
pageImage: state => state.loginurl.pageImage
}
export default getters
......@@ -5,6 +5,7 @@ import app from './modules/app'
import user from './modules/user'
import permission from './modules/permission'
import enhance from './modules/enhance'
import loginurl from './modules/loginurl'
import online from './modules/online'
import getters from './getters'
......@@ -17,6 +18,7 @@ export default new Vuex.Store({
permission,
enhance,
online,
loginurl
},
state: {
......
import {loginUrlCheck} from '@/api/api'
import { getFileAccessHttpUrl } from '@/api/manage'
const enhance = {
state: {
isPageUrlTrue: true,
pageTitle: '湖北汉江之星科技有限公司',
pageImage: ''
},
mutations: {
SET_PAGE_URL_FLAG: (state, flag) => {
state.isPageUrlTrue = flag
},
SET_PAGE_TITLE: (state, name) => {
state.pageTitle = name
},
SET_PAGE_IMAGE: (state, image) => {
state.pageImage = image
}
},
actions: {
onLoginUrlCheck({ commit }, record) {
loginUrlCheck({platformType: 'shop'}).then(res=> {
if(res.result && res.result.logoUrl) {
commit('SET_PAGE_TITLE', res.result.name)
commit('SET_PAGE_IMAGE', getFileAccessHttpUrl(res.result.logoUrl))
} else {
commit('SET_PAGE_URL_FLAG', false)
}
})
}
}
}
export default enhance
\ No newline at end of file
......@@ -47,3 +47,7 @@ export const isValidPermit = permit=> {
const reg = /^[HMhm]{1}([0-9]{10}|[0-9]{8})$/; //港澳通行证
return reg.test(permit)
}
/* 校验字母*/
export function alphanumeric(s) {
return /^[a-zA-Z]+$/.test(s)
}
\ No newline at end of file
......@@ -26,7 +26,7 @@
<!-- <a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-menu-item key="1" @click="batchDels">
<a-icon type="delete"/>
删除关联
</a-menu-item>
......@@ -51,7 +51,7 @@
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
rowKey="communityCode"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
......@@ -91,6 +91,7 @@
// import { getPropertyListApi, getSystemSubmenu, getSystemSubmenuBatch } from '@/api/api'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import NoticeModal from './modules/NoticeModal'
import {deleteAction} from '@/api/manage'
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
const columns = [
......@@ -138,8 +139,8 @@ const columns = [
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center'
},
{
......@@ -162,47 +163,11 @@ export default {
// 表头
columns: columns,
deteleId: '',
dataSource: [
{
accessAddress: "hanjiangzhixing",
addressInfo: "十堰市电饭锅",
adminAvatar:"scott/pic/img01_1687743526373.png",
adminName: "扫地僧",
adminPassword:"123456",
adminPhone:"15586468632",
buildingNum:123,
chargingStation: 23423,
communityArea:"郧阳区",
communityCode:"P00082",
communityImage:"scott/pic/8b9eaa6e92ad56895430be936cc03896_1687746009641.jpg",
communityIntro:"",
communityName:"汉江之星小区",
completedDate:"2021-06-16",
councilsCode:null,
councilsName:null,
coverArea:23412,
createBy:"13177461177",
createTime:"2023-06-26 09:38:48",
delFlag:0,
houseNum:4532242,
id:"1673143741424750593",
lastPermissionIds:null,
parkingSpace:2334,
permissionIds:null,
platformCode:"P00081",
platformName:"汉江之星物业公司",
platformType:"company",
roleId:"1673143741215137794",
updateBy:"汉江之星物业公司管理员",
updateTime:"2023-07-20 14:35:35",
useTo:1,
userId:"1673143740938313730",
}
],
url: {
// list: "/property-company/community/companyCommunity/list",
// delete: '/property-company/community/companyCommunity/delete',
// deleteBatch: '/property-company/community/companyCommunity/deleteBatch'
list: "/property-central/shop/shopCommunity/getShopCommunity",
delete: '/property-central/shop/shopCommunity/deleteByCommunityCode',
deleteBatch: '/property-central/shop/shopCommunity/deleteBatch'
},
}
......@@ -212,20 +177,57 @@ export default {
this.$refs.modalUserRole.show(roleId);
},
showDeleteConfirm(record) {
this.deteleId = record.id;
var that = this;
this.$confirm({
title: '确定是否删除关联小区?',
okText: '删除',
okType: 'danger',
cancelText: '否',
onOk() {
console.log(record);
return deleteAction(that.url.delete, {communityCode: record.communityCode}).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.searchQuery()
}
})
},
onCancel() {
console.log('Cancel');
},
});
},
batchDels() {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return;
} else {
var ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
var that = this;
this.$confirm({
title: "确认删除",
content: "是否删除选中数据?",
onOk: function () {
that.loading = true;
deleteAction(that.url.deleteBatch, {communityCodes: ids}).then((res) => {
if (res.success) {
//重新计算分页问题
that.reCalculatePage(that.selectedRowKeys.length)
that.$message.success(res.message);
that.loadData();
that.onClearSelected();
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.loading = false;
});
}
});
}
}
}
}
......
......@@ -113,7 +113,7 @@ import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
import { isMobile,alphanumeric } from '@/utils/validate'
import LoginSwitchHouse from '@/components/tools/LoginSwitchHouse'
export default {
name: 'PropertyChargruleForm',
components: {
......@@ -191,9 +191,7 @@ export default {
adminAvatar: [{ required: true, message: '请上传管理员头像', trigger: 'blur' }]
},
url: {
add: "/property-company/community/companyCommunity/add",
edit: "/property-company/community/companyCommunity/edit",
queryById: "/property-company/community/companyCommunity/queryById"
add: "/property-central/shop/shopCommunity/add"
},
dictOptions: [
{label: '商用', value: 1},
......@@ -227,18 +225,16 @@ export default {
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
console.log(this.model)
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpurl+=this.url.add;
method = 'post';
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
......
......@@ -43,44 +43,8 @@ export default {
})
},
async updateCurrentDepart(){
// let { result } = await getAction('/property-company/community/companyCommunity/getCommunityList',{ })
let result =[
{
accessAddress: "hanjiangzhixing",
addressInfo: "十堰市电饭锅",
adminAvatar:"scott/pic/img01_1687743526373.png",
adminName: "扫地僧",
adminPassword:"123456",
adminPhone:"15586468632",
buildingNum:123,
chargingStation: 23423,
communityArea:"郧阳区",
communityCode:"P00082",
communityImage:"scott/pic/8b9eaa6e92ad56895430be936cc03896_1687746009641.jpg",
communityIntro:"",
communityName:"汉江之星小区",
completedDate:"2021-06-16",
councilsCode:null,
councilsName:null,
coverArea:23412,
createBy:"13177461177",
createTime:"2023-06-26 09:38:48",
delFlag:0,
houseNum:4532242,
id:"1673143741424750593",
lastPermissionIds:null,
parkingSpace:2334,
permissionIds:null,
platformCode:"P00081",
platformName:"汉江之星物业公司",
platformType:"company",
roleId:"1673143741215137794",
updateBy:"汉江之星物业公司管理员",
updateTime:"2023-07-20 14:35:35",
useTo:1,
userId:"1673143740938313730",
}
]
let { result } = await getAction('/property-company/community/companyCommunity/getList',{ })
this.$refs.loginSelect.show(result)
},
loginSelectOk(res) {
......
......@@ -64,10 +64,9 @@
</a-col>
</a-row>
<index-chart></index-chart>
<a-modal :visible="visible" title="商铺二维码" @ok="handleOk">
<a-space>
<a-modal :visible="visible" title="商铺二维码" @ok="handleOk" @cancel="handleCancel" okText="下载">
<a-space style='width: 100%'>
<img :src="shopQrcode" alt="商铺二维码" class="shopQrcode">
</a-space>
</a-modal>
</div>
......@@ -78,6 +77,9 @@ import IndexChart from './IndexChart'
import Bar from '@/components/chart/Bar'
import Pie from '@/components/chart/Pie'
import { homeDataStatistics } from '@/api/api'
import {axios} from '@/utils/request'
import {downloadFile} from '@/api/manage'
// const barData = []
// for (let i = 0; i < 12; i += 1) {
......@@ -101,11 +103,13 @@ export default {
typeCode: 'SFLX00001',
noticeTitle: '',
noticeContent: '',
shopQrcode:'',
visible: false,
}
},
created() {
this.onDetail()
this.shopQrcodes()
},
methods: {
async onDetail(typeCode) {
......@@ -113,6 +117,12 @@ export default {
this.pageForm = { ...result }
this.loading = !this.loading
},
shopQrcodes() {
axios('/property-central/shop/shopInfo/getQrCode?shopCode=shop&platformType=shop',{ responseType: 'blob'}).then(res=>{
this.shopQrcode = window.URL.createObjectURL(new Blob([res]))
console.log(this.shopQrcode)
})
},
toQuick(type) {
if (type == 1) {
this.clickQRcode()
......@@ -131,11 +141,19 @@ export default {
}
},
clickQRcode() {
this.visible=true
this.visible = true
},
handleOk (){
downloadFile('/property-central/shop/shopInfo/getQrCode','商铺二维码.png')
this.visible=false
}
this.$message.success('下载成功')
},
handleCancel () {
this.visible=false
},
},
......@@ -279,4 +297,11 @@ export default {
height: auto;
}
}
.ant-space-item{
width: 100%;
}
.shopQrcode{
display: block;
margin: 0 auto;
}
</style>
\ No newline at end of file
......@@ -38,7 +38,7 @@ import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types'
import LoginSelectHouse from "@/components/tools/LoginSelectHouse";
import { getEncryptedString } from '@/utils/encryption/aesEncrypt'
import { timeFix } from '@/utils/util'
import { mapActions } from 'vuex'
import LoginAccount from './LoginAccount'
import LoginPhone from './LoginPhone'
......@@ -64,8 +64,10 @@ export default {
Vue.ls.remove(ACCESS_TOKEN)
this.getRouterData();
this.rememberMe = true
this.onLoginUrlCheck()
},
methods:{
...mapActions(["onLoginUrlCheck"]),
handleTabClick(key){
this.customActiveKey = key
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论