提交 06520d8d authored 作者: 宋雄's avatar 宋雄

增加业委会

上级 da9cef67
NODE_ENV=development NODE_ENV=development
# VUE_APP_API_BASE_URL='http://192.168.0.119:9999' # VUE_APP_API_BASE_URL='http://192.168.0.119:9999'
# VUE_APP_API_BASE_URL='http://192.168.0.100:9999' VUE_APP_API_BASE_URL='http://192.168.0.103:9999'
VUE_APP_API_BASE_URL='http://220.203.25.212:9999' # VUE_APP_API_BASE_URL='http://220.203.25.212:9999'
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
......
...@@ -44,6 +44,7 @@ const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionB ...@@ -44,6 +44,7 @@ const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionB
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params); const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params); const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params); const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);
const queryTreeListByTypeForRole = (params)=>getAction("/sys/role/queryTreeListByType",{...params, platformType: 'committee'});
// 部门管理 // 部门管理
const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params); const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params);
...@@ -78,6 +79,10 @@ const addCommunityOwner = (params)=>postAction("/property-community/info/communi ...@@ -78,6 +79,10 @@ const addCommunityOwner = (params)=>postAction("/property-community/info/communi
const geCommunityOwnertInfoApi = (params)=>getAction("/property-community/info/communityOwner/queryById",params); const geCommunityOwnertInfoApi = (params)=>getAction("/property-community/info/communityOwner/queryById",params);
const auditCommunityOwnerApi = (params)=>postAction("/property-community/info/communityOwner/audit",params); const auditCommunityOwnerApi = (params)=>postAction("/property-community/info/communityOwner/audit",params);
const downloadOwnerTemplate = (params)=>postAction("/property-community/info/communityOwner/downloadOwnerTemplate",params); const downloadOwnerTemplate = (params)=>postAction("/property-community/info/communityOwner/downloadOwnerTemplate",params);
const setOwnerLabelApi = (params)=>postAction("/property-community/ownerlabel/ownerLabel/add",params);
const setCommunityOwnerLabelApi = (params)=>postAction("/property-community/info/communityOwner/setLabel",params);
const geQueryByOwnerIdApi = (params)=>getAction("/property-community/info/communityOwner/queryByOwnerId",params);
const geCommunityDeleteApi = (params)=>getAction("/property-community/ownerlabel/ownerLabel/delete",params);
// 生活缴费-费用规则 // 生活缴费-费用规则
const companyPropertyChargerulesApi = (params)=>getAction("/property-company/system/companyChargerule/companyPropertyChargerules",params); const companyPropertyChargerulesApi = (params)=>getAction("/property-company/system/companyChargerule/companyPropertyChargerules",params);
...@@ -97,6 +102,12 @@ const dispatchCommunityRepairApi = (params)=>postAction("/property-community/pro ...@@ -97,6 +102,12 @@ const dispatchCommunityRepairApi = (params)=>postAction("/property-community/pro
// 投诉管理 // 投诉管理
const querycommunityComplaintApi = (params)=>getAction("/property-community/property/communityComplaint/queryById",params); const querycommunityComplaintApi = (params)=>getAction("/property-community/property/communityComplaint/queryById",params);
const auditCommunityComplaintApi = (params)=>postAction("/property-community/property/communityComplaint/edit",params); const auditCommunityComplaintApi = (params)=>postAction("/property-community/property/communityComplaint/edit",params);
const auditMoveComplaintApi = (params)=>getAction("/property-community/property/communityComplaint/moveComplaint",params);
// 对账管理
const auditPropertyApi = (params)=>postAction("/property-central/property/propertySettled/audit",params);
const freezeOrPropertyApi = (params)=>getAction(`/property-central/property/propertySettled/freezeOrThaw/${params.id}/${params.status}`,{});
const getPropertyChargruleListApi = (params)=>getAction("/property-central/property/propertyChargrule/propertyChargruleList",params);
//数据字典 //数据字典
const addDict = (params)=>postAction("/sys/dict/add",params); const addDict = (params)=>postAction("/sys/dict/add",params);
...@@ -170,6 +181,7 @@ export { ...@@ -170,6 +181,7 @@ export {
loadAllRoleIds, loadAllRoleIds,
getPermissionRuleList, getPermissionRuleList,
queryPermissionRule, queryPermissionRule,
queryTreeListByTypeForRole,
queryDepartTreeList, queryDepartTreeList,
queryDepartTreeSync, queryDepartTreeSync,
queryIdTree, queryIdTree,
...@@ -225,6 +237,14 @@ export { ...@@ -225,6 +237,14 @@ export {
dispatchCommunityRepairApi, dispatchCommunityRepairApi,
querycommunityComplaintApi, querycommunityComplaintApi,
auditCommunityComplaintApi, auditCommunityComplaintApi,
auditMoveComplaintApi,
getPropertyChargruleListApi,
auditPropertyApi,
freezeOrPropertyApi,
setOwnerLabelApi,
setCommunityOwnerLabelApi,
geQueryByOwnerIdApi,
geCommunityDeleteApi
} }
......
...@@ -57,6 +57,26 @@ export const COMPLAINT_STATUS = [ ...@@ -57,6 +57,26 @@ export const COMPLAINT_STATUS = [
{label: '处理完成', value: 'finish'} {label: '处理完成', value: 'finish'}
] ]
// 业委会职位
export const INDUSTRY_JOB = [
{label: '业委会主任', value: 'labelCommitteeDirector'},
{label: '业委会副主任', value: 'labelCommitteeDeputy'},
{label: '委员', value: 'labelCommitteeMember'},
{label: '文员', value: 'labelCommitteeClerk'}
]
// 投诉状态
export const OWNER_LEBEL = [
{label: '留守儿童', value: 'labelDestituteEt'},
{label: '留守老人', value: 'labelDestituteLr'},
{label: '孤', value: 'labelDestituteGu'},
{label: '寡', value: 'labelDestituteGua'},
{label: '病', value: 'labelDestituteBing'},
{label: '弱', value: 'labelDestituteRuo'},
{label: '老', value: 'labelDestituteLao'},
{label: '残', value: 'labelDestituteCan'}
]
/** /**
* 翻译字段值对应的文本 * 翻译字段值对应的文本
* @param children * @param children
......
...@@ -67,15 +67,13 @@ ...@@ -67,15 +67,13 @@
fullscreen:false fullscreen:false
} }
}, },
created(){
this.loadDepart();
},
watch:{ watch:{
departId(){ departId(){
this.initDepartComponent() this.initDepartComponent()
}, },
visible: { visible: {
handler() { handler() {
this.loadDepart();
this.initDepartComponent(true) this.initDepartComponent(true)
} }
} }
......
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
}, },
compareToFirstPassword (rule, value, callback) { compareToFirstPassword (rule, value, callback) {
const form = this.form; const form = this.form;
if (value && value !== form.getFieldValue('password')) { if (value && form.getFieldValue('password') && value !== form.getFieldValue('password')) {
callback('两次输入的密码不一样!'); callback('两次输入的密码不一样!');
} else { } else {
callback() callback()
......
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
</div> </div>
<div class="item"> <div class="item">
<p>业主报修待处理</p> <p>业主报修待处理</p>
<p>{{pageForm.waitDispatch}}</p><a-button type="primary" size="small" @click="toOperation(4)" <p>{{pageForm.repairWaitHandle}}</p><a-button type="primary" size="small" @click="toOperation(4)"
:disabled="pageForm.waitDispatch == 0">去处理</a-button> :disabled="pageForm.repairWaitHandle == 0">去处理</a-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -241,7 +241,7 @@ export default { ...@@ -241,7 +241,7 @@ export default {
this.loading = !this.loading this.loading = !this.loading
}, },
async companyNotice() { async companyNotice() {
let { result } = await companyNoticeList({ pageNo: 1, pageSize: 5, order: 'desc', column: 'createTime' }) let { result } = await companyNoticeList({ pageNo: 1, pageSize: 5, order: 'desc', column: 'createTime', noticeStatus: 'published' })
this.noticeList = result.records this.noticeList = result.records
}, },
toOperation(type) { toOperation(type) {
......
<template>
<a-drawer
title="数据规则/按钮权限配置"
width="365"
:closable="false"
@close="onClose"
:visible="visible"
>
<a-tabs defaultActiveKey="1">
<a-tab-pane tab="数据规则" key="1">
<a-checkbox-group v-model="dataruleChecked" v-if="dataruleList.length>0">
<a-row>
<a-col :span="24" v-for="(item,index) in dataruleList" :key=" 'dr'+index ">
<a-checkbox :value="item.id">{{ item.ruleName }}</a-checkbox>
</a-col>
<a-col :span="24">
<div style="width: 100%;margin-top: 15px">
<a-button @click="saveDataruleForRole" type="primary" size="small" icon="save">点击保存</a-button>
</div>
</a-col>
</a-row>
</a-checkbox-group>
<div v-else><h3>无配置信息!</h3></div>
</a-tab-pane>
<!--<a-tab-pane tab="按钮权限" key="2">敬请期待!!!</a-tab-pane>-->
</a-tabs>
</a-drawer>
</template>
<script>
import { getAction,postAction } from '@/api/manage'
export default {
name: 'RoleDataruleModal',
data(){
return {
functionId:'',
roleId:'',
visible:false,
tabList: [{
key: '1',
tab: '数据规则',
}, {
key: '2',
tab: '按钮权限',
}],
activeTabKey: '1',
url:{
datarule:"/sys/role/datarule",
},
dataruleList:[],
dataruleChecked:[]
}
},
methods:{
loadData(){
getAction(`${this.url.datarule}/${this.functionId}/${this.roleId}`).then(res=>{
console.log(res)
if(res.success){
this.dataruleList = res.result.datarule
let drChecked = res.result.drChecked
if(drChecked){
this.dataruleChecked = drChecked.split(",")
}
}
})
},
saveDataruleForRole(){
if(!this.dataruleChecked || this.dataruleChecked.length==0){
this.$message.warning("请注意,现未勾选任何数据权限!")
}
let params = {
permissionId:this.functionId,
roleId:this.roleId,
dataRuleIds:this.dataruleChecked.join(",")
}
console.log("保存数据权限",params)
postAction(this.url.datarule,params).then(res=>{
if(res.success){
this.$message.success(res.message)
}else{
this.$message.error(res.message)
}
})
},
show(functionId,roleId){
this.onReset()
this.functionId = functionId
this.roleId = roleId
this.visible=true
this.loadData()
},
onClose(){
this.visible=false
this.onReset()
},
onTabChange (key) {
this.activeTabKey = key
},
onReset(){
this.functionId=''
this.roleId=''
this.dataruleList=[]
this.dataruleChecked=[]
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<a-drawer
:title="title"
:maskClosable="true"
width=650
placement="right"
:closable="true"
@close="close"
:visible="visible"
style="overflow: auto;padding-bottom: 53px;">
<a-form>
<a-form-item label='所拥有的权限'>
<a-tree
checkable
@check="onCheck"
:checkedKeys="checkedKeys"
:treeData="treeData"
@expand="onExpand"
@select="onTreeNodeSelect"
:selectedKeys="selectedKeys"
:expandedKeys="expandedKeysss"
:checkStrictly="checkStrictly">
<span slot="hasDatarule" slot-scope="{slotTitle,ruleFlag}">
{{ slotTitle }}<a-icon v-if="ruleFlag" type="align-left" style="margin-left:5px;color: red;"></a-icon>
</span>
</a-tree>
</a-form-item>
</a-form>
<div class="drawer-bootom-button">
<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">
<a-menu slot="overlay">
<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>
<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>
<a-menu-item key="3" @click="checkALL">全部勾选</a-menu-item>
<a-menu-item key="4" @click="cancelCheckALL">取消全选</a-menu-item>
<a-menu-item key="5" @click="expandAll">展开所有</a-menu-item>
<a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
</a-menu>
<a-button>
树操作 <a-icon type="up" />
</a-button>
</a-dropdown>
<a-popconfirm title="确定放弃编辑?" @confirm="close" okText="确定" cancelText="取消">
<a-button style="margin-right: .8rem">取消</a-button>
</a-popconfirm>
<a-button @click="handleSubmit(false)" type="primary" :loading="loading" ghost style="margin-right: 0.8rem">仅保存</a-button>
<a-button @click="handleSubmit(true)" type="primary" :loading="loading">保存并关闭</a-button>
</div>
<role-datarule-modal ref="datarule"></role-datarule-modal>
</a-drawer>
</template>
<script>
import {queryTreeListByTypeForRole,queryRolePermission,saveRolePermission} from '@/api/api'
import RoleDataruleModal from './RoleDataruleModal.vue'
export default {
name: "RoleModal",
components:{
RoleDataruleModal
},
data(){
return {
roleId:"",
treeData: [],
defaultCheckedKeys:[],
checkedKeys:[],
expandedKeysss:[],
allTreeKeys:[],
autoExpandParent: true,
checkStrictly: false,
title:"物业权限配置",
visible: false,
loading: false,
selectedKeys:[]
}
},
methods: {
onTreeNodeSelect(id){
if(id && id.length>0){
this.selectedKeys = id
}
this.$refs.datarule.show(this.selectedKeys[0],this.roleId)
},
onCheck (o) {
if(this.checkStrictly){
this.checkedKeys = o.checked;
}else{
this.checkedKeys = o
}
},
show(roleId){
this.roleId=roleId
this.visible = true;
},
close () {
this.reset()
this.$emit('close');
this.visible = false;
},
onExpand(expandedKeys){
this.expandedKeysss = expandedKeys;
this.autoExpandParent = false
},
reset () {
this.expandedKeysss = []
this.checkedKeys = []
this.defaultCheckedKeys = []
this.loading = false
},
expandAll () {
this.expandedKeysss = this.allTreeKeys
},
closeAll () {
this.expandedKeysss = []
},
checkALL () {
this.checkedKeys = this.allTreeKeys
},
cancelCheckALL () {
//this.checkedKeys = this.defaultCheckedKeys
this.checkedKeys = []
},
switchCheckStrictly (v) {
if(v==1){
this.checkStrictly = false
}else if(v==2){
this.checkStrictly = true
}
},
handleCancel () {
this.close()
},
handleSubmit(exit) {
let that = this;
let params = {
roleId:that.roleId,
permissionIds:that.checkedKeys.join(","),
lastpermissionIds:that.defaultCheckedKeys.join(","),
};
that.loading = true;
console.log("请求参数:",params);
saveRolePermission(params).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.loading = false;
if (exit) {
that.close()
}
}else {
that.$message.error(res.message);
that.loading = false;
if (exit) {
that.close()
}
}
this.loadData();
})
},
loadData(){
queryTreeListByTypeForRole().then((res) => {
this.treeData = res.result.treeList
this.allTreeKeys = res.result.ids
queryRolePermission({roleId: this.roleId}).then((res)=>{
this.checkedKeys = [...res.result];
this.defaultCheckedKeys = [...res.result];
this.expandedKeysss = this.allTreeKeys;
console.log(this.defaultCheckedKeys)
})
})
}
},
watch: {
visible () {
if (this.visible) {
this.loadData();
}
}
}
}
</script>
<style lang="less" scoped>
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
\ No newline at end of file
...@@ -194,7 +194,6 @@ ...@@ -194,7 +194,6 @@
}) })
}, },
onSelectRoom(value, node) { onSelectRoom(value, node) {
console.log(node)
let data = node.dataRef let data = node.dataRef
this.model.roomId = data.value this.model.roomId = data.value
this.model.roomName = data.label this.model.roomName = data.label
......
差异被折叠。
...@@ -81,6 +81,14 @@ ...@@ -81,6 +81,14 @@
<span slot="buildingName" slot-scope="text, record"> <span slot="buildingName" slot-scope="text, record">
<span>{{record.buildingName}}{{record.unitName}}{{record.roomName}}</span> <span>{{record.buildingName}}{{record.unitName}}{{record.roomName}}</span>
</span> </span>
<span slot="label" slot-scope="text, record">
<!-- <span>{{record.label | filterLabel}}</span> -->
<div>
<a-tag color="blue">业主</a-tag>
<a-tag color="red" v-if="record.labelCommitteeDesc">{{record.labelCommitteeDesc}}</a-tag>
<a-tag color="orange" v-if="record.labelDestituteDesc">{{record.labelDestituteDesc}}</a-tag>
</div>
</span>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<template v-if="record.auditStatus === 'waitAudit'"> <template v-if="record.auditStatus === 'waitAudit'">
<a @click="onRoutetAdd(record.id)">审核</a> <a @click="onRoutetAdd(record.id)">审核</a>
...@@ -101,12 +109,25 @@ ...@@ -101,12 +109,25 @@
更多 <a-icon type="down" /> 更多 <a-icon type="down" />
</a> </a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item v-if="!!record.labelCommitteeCode">
<a @click="handlePerssion(record.id)">授权</a>
</a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">详情</a> <a href="javascript:;" @click="handleDetail(record)">详情</a>
</a-menu-item> </a-menu-item>
<a-menu-item v-if="!record.labelCommitteeCode">
<a href="javascript:;" @click="onHandleSetting(record.id, '1')">设置业委会</a>
</a-menu-item>
<a-menu-item> <a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft"> <a href="javascript:;" @click="onHandleSetting(record.id, '2')">设置特困人员</a>
</a-menu-item>
<a-menu-item v-if="!!record.labelCommitteeCode">
<a-popconfirm title="确定撤销业委会吗?" @confirm="()=> onDeleteIndustry(record.id)" placement="topLeft">
<a>撤销业委会</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="()=> handleDelete(record.id)" placement="topLeft">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item> </a-menu-item>
...@@ -122,18 +143,21 @@ ...@@ -122,18 +143,21 @@
</div> </div>
<notice-modal ref="modalForm" @ok="modalFormOk"></notice-modal> <notice-modal ref="modalForm" @ok="modalFormOk"></notice-modal>
<!-- 右侧的角色权限配置 -->
<user-role-modal ref="modalUserRole"></user-role-modal>
</a-card> </a-card>
</template> </template>
<script> <script>
import { getBuildingListApi, getUnitListApi, getRoomListApi, downloadOwnerTemplate } from '@/api/api' import { getBuildingListApi, getUnitListApi, getRoomListApi, geQueryByOwnerIdApi, geCommunityDeleteApi } from '@/api/api'
import { downFile } from '@/api/manage' import { downFile } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import NoticeModal from './modules/NoticeModal' import NoticeModal from './modules/NoticeModal'
import UserRoleModal from './modules/UserRoleModal'
import { filterDictTextByCache } from '@/components/dict/JDictSelectUtil' import { filterDictTextByCache } from '@/components/dict/JDictSelectUtil'
import { RELATION_SHIP, filterDictTextByStatic } from '@/assets/static.js' import { RELATION_SHIP, filterDictTextByStatic, INDUSTRY_JOB, OWNER_LEBEL } from '@/assets/static.js'
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
const labelAllList = [{label: '业主', value: 'owner'}].concat(INDUSTRY_JOB, OWNER_LEBEL)
const columns = [ const columns = [
{ {
title: '业主', title: '业主',
...@@ -196,7 +220,23 @@ const columns = [ ...@@ -196,7 +220,23 @@ const columns = [
align: 'center', align: 'center',
customRender: function (text) { customRender: function (text) {
return filterDictTextByCache('auditStatus', text) return filterDictTextByCache('auditStatus', text)
}
}, },
{
title: '特困人员审批',
dataIndex: 'destituteAuditStatus',
key: 'destituteAuditStatus',
align: 'center',
customRender: function (text) {
return filterDictTextByCache('auditStatus', text)
}
},
{
title: '标签',
dataIndex: 'label',
key: 'label',
align: 'center',
scopedSlots: { customRender: 'label' }
}, },
{ {
title: '操作', title: '操作',
...@@ -213,6 +253,7 @@ export default { ...@@ -213,6 +253,7 @@ export default {
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
components: { components: {
NoticeModal, NoticeModal,
UserRoleModal
}, },
data() { data() {
return { return {
...@@ -233,6 +274,21 @@ export default { ...@@ -233,6 +274,21 @@ export default {
treeData: [], treeData: [],
} }
}, },
filters: {
filterLabel(value) {
if(value) {
let labelList = value.split(',')
let valueList = []
labelList.forEach(item=> {
let findValue = labelAllList.find(row=>row.value === item)
valueList.push(findValue.label)
})
return valueList.join(',')
} else {
return ''
}
}
},
created() { created() {
this.getBuildingList() this.getBuildingList()
this.initDictData() this.initDictData()
...@@ -329,7 +385,12 @@ export default { ...@@ -329,7 +385,12 @@ export default {
}, },
onRoutetAdd(id) { onRoutetAdd(id) {
this.$router.push({ this.$router.push({
path: '/information/owner-add?id=' + id, path: '/information/owner-add?id=' + id
})
},
onHandleSetting(id, type) {
this.$router.push({
path: `/information/owner-setting?id=${id}&type=${type}`
}) })
}, },
downloadExportXls() { downloadExportXls() {
...@@ -354,9 +415,27 @@ export default { ...@@ -354,9 +415,27 @@ export default {
} }
}) })
}, },
handlePerssion(ownerId) {
geQueryByOwnerIdApi({ownerId}).then(res=> {
let roleId = res.result.roleId
this.$refs.modalUserRole.show(roleId)
})
}, },
onDeleteIndustry(id) {
geCommunityDeleteApi({id}).then(res=> {
this.$message.success(res.message);
this.loadData()
})
}
}
} }
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.auditPass {
color: #67C23A;
}
.refuse {
color: #F56C6C;
}
</style> </style>
\ No newline at end of file
...@@ -49,6 +49,17 @@ ...@@ -49,6 +49,17 @@
:disabled="model.handleStatus == 'finish'"> :disabled="model.handleStatus == 'finish'">
<a-form-model ref="form" :model="form" slot="detail"> <a-form-model ref="form" :model="form" slot="detail">
<a-row> <a-row>
<a-col :span="24">
<a-form-model-item label="处理状态" :labelCol="{ xs: { span: 24 }, sm: { span: 2 } }" :wrapperCol="wrapperCol"
prop="type">
<a-radio-group name="radioGroup" v-model="form.type">
<a-radio :value="1">内部处理</a-radio>
<a-radio :value="2">外部处理(转给社区)</a-radio>
</a-radio-group>
</a-form-model-item>
</a-col>
</a-row>
<a-row v-if="form.type === 1">
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="处理状态" :labelCol="{ xs: { span: 24 }, sm: { span: 2 } }" :wrapperCol="wrapperCol" <a-form-model-item label="处理状态" :labelCol="{ xs: { span: 24 }, sm: { span: 2 } }" :wrapperCol="wrapperCol"
prop="handleStatus"> prop="handleStatus">
...@@ -77,7 +88,7 @@ ...@@ -77,7 +88,7 @@
</template> </template>
<script> <script>
import { querycommunityComplaintApi, auditCommunityComplaintApi } from '@/api/api' import { querycommunityComplaintApi, auditCommunityComplaintApi, auditMoveComplaintApi } from '@/api/api'
export default { export default {
name: 'PropertyChargruleForm', name: 'PropertyChargruleForm',
inject: ['closeCurrent'], inject: ['closeCurrent'],
...@@ -88,6 +99,7 @@ export default { ...@@ -88,6 +99,7 @@ export default {
form: { form: {
handleStatus: 'pending', handleStatus: 'pending',
handleResult: '', handleResult: '',
type: 1
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
...@@ -129,12 +141,19 @@ export default { ...@@ -129,12 +141,19 @@ export default {
this.closeCurrent() this.closeCurrent()
}, },
async onSubmit() { async onSubmit() {
if(this.form.type === 1) {
let res = await auditCommunityComplaintApi({ let res = await auditCommunityComplaintApi({
id: this.$route.query.id, id: this.$route.query.id,
handleStatus: this.form.handleStatus, handleStatus: this.form.handleStatus,
handleResult: this.form.handleResult, handleResult: this.form.handleResult,
}) })
this.$message.success(res.message) this.$message.success(res.message)
} else {
let res = await auditMoveComplaintApi({
id: this.$route.query.id
})
this.$message.success(res.message)
}
this.closeCurrent() this.closeCurrent()
}, },
}, },
......
...@@ -56,9 +56,8 @@ ...@@ -56,9 +56,8 @@
</template> </template>
<script> <script>
import { getPropertyChargruleListApi, getPropertyDetailApi, auditPropertyApi } from '@/api/api'
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { isMobile, validateCreditCode } from '@/utils/validate' import { isMobile } from '@/utils/validate'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
const columns = [ const columns = [
...@@ -136,13 +135,6 @@ export default { ...@@ -136,13 +135,6 @@ export default {
callback('请输入正确的联系人电话!') callback('请输入正确的联系人电话!')
} }
} }
const validateCode = (rule, value, callback) => {
if (value && validateCreditCode(value)) {
callback()
} else {
callback('社会统一信用代码输入错误')
}
}
return { return {
title: '', title: '',
...@@ -167,7 +159,7 @@ export default { ...@@ -167,7 +159,7 @@ export default {
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
propertyName: [{ required: true, message: '请输入物业集团名称', trigger: 'blur' }], propertyName: [{ required: true, message: '请输入物业集团名称', trigger: 'blur' }],
creditCode: [{ required: true, message: '请输入统一信用代码', trigger: 'blur' }, { validator: validateCode }], creditCode: [{ required: true, message: '请输入统一信用代码', trigger: 'blur' }],
legalName: [{ required: true, message: '请输入法人代表', trigger: 'blur' }], legalName: [{ required: true, message: '请输入法人代表', trigger: 'blur' }],
registCapital: [{ required: true, message: '请输入注册资本', trigger: 'blur' }], registCapital: [{ required: true, message: '请输入注册资本', trigger: 'blur' }],
contactName: [{ required: true, message: '请输入联系人', trigger: 'blur' }], contactName: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
...@@ -193,8 +185,6 @@ export default { ...@@ -193,8 +185,6 @@ export default {
list: '/property-central/property/communityReconciliation/communityAccountPage' list: '/property-central/property/communityReconciliation/communityAccountPage'
}, },
costList: [],
mapRef: null,
columns: columns, columns: columns,
...@@ -209,20 +199,16 @@ export default { ...@@ -209,20 +199,16 @@ export default {
} }
}, },
methods: { methods: {
async onLoadCostList() {
let data = await getPropertyChargruleListApi()
this.costList = data.result
},
async getPageDetail() { async getPageDetail() {
let { result } = await getPropertyDetailApi({ id: this.$route.query.id }) // let { result } = await getPropertyDetailApi({ id: this.$route.query.id })
this.edit(result) // this.edit(result)
if (result.provinceName) { // if (result.provinceName) {
this.getLongitude( // this.getLongitude(
result.provinceName, // result.provinceName,
result.provinceName + result.cityName + result.countyName + result.addressInfo, // result.provinceName + result.cityName + result.countyName + result.addressInfo,
mapZoom[3] // mapZoom[3]
) // )
} // }
}, },
onCancel() { onCancel() {
this.closeCurrent() this.closeCurrent()
...@@ -239,115 +225,6 @@ export default { ...@@ -239,115 +225,6 @@ export default {
}, },
onExamine(type) { onExamine(type) {
this.closeCurrent() this.closeCurrent()
// const that = this
// if (type == 1) {
// return auditPropertyApi({
// id: this.$route.query.id,
// auditStatus: 'auditPass',
// }).then((res) => {
// that.$message.success('审核通过成功')
// that.$emit('ok')
// this.closeCurrent()
// })
// } else if (type == 2) {
// return auditPropertyApi({
// id: this.$route.query.id,
// auditStatus: 'refuse',
// }).then((res) => {
// that.$message.success('审核驳回成功')
// this.closeCurrent()
// })
// }
},
addressChange(val) {
const province = Object.keys(val[0])[0]
const city = Object.keys(val[1])[0]
const county = Object.keys(val[2])[0]
this.model.provinceName = val[0][province]
this.model.provinceCode = province
this.model.cityName = val[1][city]
this.model.cityCode = city
this.model.countyName = val[2][county]
this.model.countyCode = county
if (this.model.addressInfo) {
this.getLongitude(
this.model.provinceName,
this.model.provinceName + this.model.cityName + this.model.countyName + this.model.addressInfo,
mapZoom[3]
)
}
},
addressBlur(val) {
if (this.model.provinceName) {
this.getLongitude(
this.model.provinceName,
this.model.provinceName + this.model.cityName + this.model.countyName + val.target.value,
mapZoom[3]
)
}
},
getAddress(e) {
let _this = this
// 创建地理编码实例
var myGeo = new BMapGL.Geocoder()
// 根据坐标得到地址描述
myGeo.getLocation(new BMapGL.Point(e.latlng.lng, e.latlng.lat), function (result) {
if (result) {
_this.mapRef.clearOverlays()
_this.model.registAdress = [
result.addressComponents.province,
result.addressComponents.city,
result.addressComponents.district,
]
_this.model.addressInfo = result.addressComponents.street + result.addressComponents.streetNumber
_this.model.longitude = result.point.lng
_this.model.latitude = result.point.lat
_this.positionMap(e.latlng.lng, e.latlng.lat, mapZoom[3], result.address)
console.log(result)
}
})
},
positionMap(mapCenterLng, mapCenterLat, mapzoom, address) {
var point = new BMapGL.Point(mapCenterLng, mapCenterLat) // 创建点坐标
this.mapRef.centerAndZoom(point, mapzoom)
var marker = new BMapGL.Marker(point, { title: address }) // 创建标注
this.mapRef.addOverlay(marker) // 将标注添加到地图中
let _this = this
// marker.addEventListener("click", function(){
var label = new BMapGL.Label(address, {
// 创建文本标注
position: point, // 设置标注的地理位置
offset: new BMapGL.Size(0, -55), // 设置标注的偏移量
})
_this.mapRef.addOverlay(label) // 将标注添加到地图中
label.setStyle({
// 设置label的样式
color: '#333',
fontSize: '14px',
padding: '4px 10px',
border: '1px solid #1E90FF',
borderRadius: '4px',
transform: 'translateX(-40%)',
})
// });
},
getLongitude(city, address, zoom) {
let _this = this
var myGeo = new BMapGL.Geocoder()
myGeo.getPoint(
address,
function (point) {
if (point) {
_this.mapRef.clearOverlays()
_this.model.longitude = point.lng
_this.model.latitude = point.lat
_this.positionMap(point.lng, point.lat, zoom, address)
} else {
console.log('您选择的地址没有解析到结果!')
}
},
city
)
}, },
submitForm() { submitForm() {
const that = this const that = this
...@@ -388,7 +265,6 @@ export default { ...@@ -388,7 +265,6 @@ export default {
mounted() { mounted() {
//备份model原始值 //备份model原始值
//this.modelDefault = JSON.parse(JSON.stringify(this.model)) //this.modelDefault = JSON.parse(JSON.stringify(this.model))
// this.onLoadCostList()
this.pageType = this.$route.query.type this.pageType = this.$route.query.type
if (this.$route.query.type == '1') { if (this.$route.query.type == '1') {
this.title = '详情' this.title = '详情'
......
<template>
<a-drawer
title="数据规则/按钮权限配置"
width="365"
:closable="false"
@close="onClose"
:visible="visible"
>
<a-tabs defaultActiveKey="1">
<a-tab-pane tab="数据规则" key="1">
<a-checkbox-group v-model="dataruleChecked" v-if="dataruleList.length>0">
<a-row>
<a-col :span="24" v-for="(item,index) in dataruleList" :key=" 'dr'+index ">
<a-checkbox :value="item.id">{{ item.ruleName }}</a-checkbox>
</a-col>
<a-col :span="24">
<div style="width: 100%;margin-top: 15px">
<a-button @click="saveDataruleForRole" type="primary" size="small" icon="save">点击保存</a-button>
</div>
</a-col>
</a-row>
</a-checkbox-group>
<div v-else><h3>无配置信息!</h3></div>
</a-tab-pane>
<!--<a-tab-pane tab="按钮权限" key="2">敬请期待!!!</a-tab-pane>-->
</a-tabs>
</a-drawer>
</template>
<script>
import ARow from 'ant-design-vue/es/grid/Row'
import ACol from 'ant-design-vue/es/grid/Col'
import { getAction,postAction } from '@/api/manage'
export default {
name: 'RoleDataruleModal',
components: { ACol, ARow },
data(){
return {
functionId:'',
roleId:'',
visible:false,
tabList: [{
key: '1',
tab: '数据规则',
}, {
key: '2',
tab: '按钮权限',
}],
activeTabKey: '1',
url:{
datarule:"/sys/role/datarule",
},
dataruleList:[],
dataruleChecked:[]
}
},
methods:{
loadData(){
getAction(`${this.url.datarule}/${this.functionId}/${this.roleId}`).then(res=>{
console.log(res)
if(res.success){
this.dataruleList = res.result.datarule
let drChecked = res.result.drChecked
if(drChecked){
this.dataruleChecked = drChecked.split(",")
}
}
})
},
saveDataruleForRole(){
if(!this.dataruleChecked || this.dataruleChecked.length==0){
this.$message.warning("请注意,现未勾选任何数据权限!")
}
let params = {
permissionId:this.functionId,
roleId:this.roleId,
dataRuleIds:this.dataruleChecked.join(",")
}
console.log("保存数据权限",params)
postAction(this.url.datarule,params).then(res=>{
if(res.success){
this.$message.success(res.message)
}else{
this.$message.error(res.message)
}
})
},
show(functionId,roleId){
this.onReset()
this.functionId = functionId
this.roleId = roleId
this.visible=true
this.loadData()
},
onClose(){
this.visible=false
this.onReset()
},
onTabChange (key) {
this.activeTabKey = key
},
onReset(){
this.functionId=''
this.roleId=''
this.dataruleList=[]
this.dataruleChecked=[]
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<a-drawer
:title="title"
:maskClosable="true"
width=650
placement="right"
:closable="true"
@close="close"
:visible="visible"
style="overflow: auto;padding-bottom: 53px;">
<a-form>
<a-form-item label='所拥有的权限'>
<a-tree
checkable
@check="onCheck"
:checkedKeys="checkedKeys"
:treeData="treeData"
@expand="onExpand"
@select="onTreeNodeSelect"
:selectedKeys="selectedKeys"
:expandedKeys="expandedKeysss"
:checkStrictly="checkStrictly">
<span slot="hasDatarule" slot-scope="{slotTitle,ruleFlag}">
{{ slotTitle }}<a-icon v-if="ruleFlag" type="align-left" style="margin-left:5px;color: red;"></a-icon>
</span>
</a-tree>
</a-form-item>
</a-form>
<div class="drawer-bootom-button">
<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">
<a-menu slot="overlay">
<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>
<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>
<a-menu-item key="3" @click="checkALL">全部勾选</a-menu-item>
<a-menu-item key="4" @click="cancelCheckALL">取消全选</a-menu-item>
<a-menu-item key="5" @click="expandAll">展开所有</a-menu-item>
<a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
</a-menu>
<a-button>
树操作 <a-icon type="up" />
</a-button>
</a-dropdown>
<a-popconfirm title="确定放弃编辑?" @confirm="close" okText="确定" cancelText="取消">
<a-button style="margin-right: .8rem">取消</a-button>
</a-popconfirm>
<a-button @click="handleSubmit(false)" type="primary" :loading="loading" ghost style="margin-right: 0.8rem">仅保存</a-button>
<a-button @click="handleSubmit(true)" type="primary" :loading="loading">保存并关闭</a-button>
</div>
<role-datarule-modal ref="datarule"></role-datarule-modal>
</a-drawer>
</template>
<script>
import {queryTreeListByTypeForRole,queryRolePermission,saveRolePermission} from '@/api/api'
import RoleDataruleModal from './RoleDataruleModal.vue'
export default {
name: "RoleModal",
components:{
RoleDataruleModal
},
data(){
return {
roleId:"",
treeData: [],
defaultCheckedKeys:[],
checkedKeys:[],
expandedKeysss:[],
allTreeKeys:[],
autoExpandParent: true,
checkStrictly: false,
title:"物业权限配置",
visible: false,
loading: false,
selectedKeys:[]
}
},
methods: {
onTreeNodeSelect(id){
if(id && id.length>0){
this.selectedKeys = id
}
this.$refs.datarule.show(this.selectedKeys[0],this.roleId)
},
onCheck (o) {
if(this.checkStrictly){
this.checkedKeys = o.checked;
}else{
this.checkedKeys = o
}
},
show(roleId){
this.roleId=roleId
this.visible = true;
},
close () {
this.reset()
this.$emit('close');
this.visible = false;
},
onExpand(expandedKeys){
this.expandedKeysss = expandedKeys;
this.autoExpandParent = false
},
reset () {
this.expandedKeysss = []
this.checkedKeys = []
this.defaultCheckedKeys = []
this.loading = false
},
expandAll () {
this.expandedKeysss = this.allTreeKeys
},
closeAll () {
this.expandedKeysss = []
},
checkALL () {
this.checkedKeys = this.allTreeKeys
},
cancelCheckALL () {
//this.checkedKeys = this.defaultCheckedKeys
this.checkedKeys = []
},
switchCheckStrictly (v) {
if(v==1){
this.checkStrictly = false
}else if(v==2){
this.checkStrictly = true
}
},
handleCancel () {
this.close()
},
handleSubmit(exit) {
let that = this;
let params = {
roleId:that.roleId,
permissionIds:that.checkedKeys.join(","),
lastpermissionIds:that.defaultCheckedKeys.join(","),
};
that.loading = true;
console.log("请求参数:",params);
saveRolePermission(params).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.loading = false;
if (exit) {
that.close()
}
}else {
that.$message.error(res.message);
that.loading = false;
if (exit) {
that.close()
}
}
this.loadData();
})
},
loadData(){
queryTreeListByTypeForRole({platformType: 'company'}).then((res) => {
this.treeData = res.result.treeList
this.allTreeKeys = res.result.ids
queryRolePermission({roleId:this.roleId}).then((res)=>{
this.checkedKeys = [...res.result];
this.defaultCheckedKeys = [...res.result];
this.expandedKeysss = this.allTreeKeys;
console.log(this.defaultCheckedKeys)
})
})
}
},
watch: {
visible () {
if (this.visible) {
this.loadData();
}
}
}
}
</script>
<style lang="less" scoped>
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
\ No newline at end of file
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
num = item.unPaidOwnerNum num = item.unPaidOwnerNum
} }
return { return {
x: item.yearNum + '年' + item.monthNum + '月', x: item.monthNum + '月',
y: num, y: num,
min: 700 min: 700
} }
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<template v-if="toggleSearchStatus"> <template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<a-form-item label="真实名字"> <a-form-item label="用户姓名">
<a-input placeholder="请输入真实名字" v-model="queryParam.realname"></a-input> <a-input placeholder="请输入用户姓名" v-model="queryParam.realname"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-dropdown style="float: left" :trigger="['click']" placement="topCenter"> <a-dropdown style="float: left" :trigger="['click']" placement="topCenter">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item> <!-- <a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>
<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item> <a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item> -->
<a-menu-item key="3" @click="checkALL">全部勾选</a-menu-item> <a-menu-item key="3" @click="checkALL">全部勾选</a-menu-item>
<a-menu-item key="4" @click="cancelCheckALL">取消全选</a-menu-item> <a-menu-item key="4" @click="cancelCheckALL">取消全选</a-menu-item>
<a-menu-item key="5" @click="expandAll">展开所有</a-menu-item> <a-menu-item key="5" @click="expandAll">展开所有</a-menu-item>
......
...@@ -88,7 +88,7 @@ module.exports = { ...@@ -88,7 +88,7 @@ module.exports = {
devServer: { devServer: {
port: 3000, port: 3000,
// hot: true, // hot: true,
// disableHostCheck: true, disableHostCheck: true,
// overlay: { // overlay: {
// warnings: false, // warnings: false,
// errors: true, // errors: true,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论