Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
shops
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
物业总平台
shops
Commits
6cfc7c8e
提交
6cfc7c8e
authored
9月 19, 2023
作者:
赵明
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
联调更新
上级
2c731736
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
580 行增加
和
0 行删除
+580
-0
cellList.vue
src/views/cell/cellList.vue
+239
-0
NoticeForm.vue
src/views/cell/modules/NoticeForm.vue
+254
-0
NoticeModal.vue
src/views/cell/modules/NoticeModal.vue
+87
-0
没有找到文件。
src/views/cell/cellList.vue
0 → 100644
浏览文件 @
6cfc7c8e
<
template
>
<a-card
:bordered=
"false"
>
<!-- 查询区域 -->
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
@
keyup
.
enter
.
native=
"searchQuery"
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"6"
:sm=
"8"
>
<a-form-item
label=
"小区名称"
>
<a-input
placeholder=
"请输入小区名称"
v-model=
"queryParam.communityName"
></a-input>
</a-form-item>
</a-col>
<span
style=
"float: left;overflow: hidden;"
class=
"table-page-search-submitButtons"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-button
type=
"primary"
@
click=
"searchQuery"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
@
click=
"searchReset"
>
重置
</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div
class=
"table-operator"
>
<a-button
@
click=
"handleAdd"
type=
"primary"
icon=
"plus"
>
新增
</a-button>
<!--
<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=
"batchDels"
>
<a-icon
type=
"delete"
/>
删除关联
</a-menu-item>
</a-menu>
<a-button
style=
"margin-left: 8px"
>
批量操作
<a-icon
type=
"down"
/>
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div
class=
"ant-alert ant-alert-info"
style=
"margin-bottom: 16px;"
>
<i
class=
"anticon anticon-info-circle ant-alert-icon"
></i>
已选择
<a
style=
"font-weight: 600"
>
{{
selectedRowKeys
.
length
}}
</a>
项
<a
style=
"margin-left: 24px"
v-if=
"selectedRowKeys.length > 0"
@
click=
"onClearSelected"
>
清空
</a>
</div>
<a-table
ref=
"table"
size=
"middle"
:scroll=
"
{x:true}"
bordered
rowKey="communityCode"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"
>
<span
slot=
"empowerDate"
slot-scope=
"text, record"
>
<span>
{{
record
.
empowerBeginDate
}}
至
{{
record
.
empowerEndDate
}}
</span>
</span>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"showDeleteConfirm(record)"
>
删除关联
</a>
</span>
<!-- 字符串超长截取省略号显示 -->
<span
slot=
"url"
slot-scope=
"text"
>
<j-ellipsis
:value=
"text"
:length=
"25"
/>
</span>
<!-- 字符串超长截取省略号显示-->
<span
slot=
"component"
slot-scope=
"text"
>
<j-ellipsis
:value=
"text"
/>
</span>
</a-table>
</div>
<!-- table区域-end -->
<notice-modal
ref=
"modalForm"
@
ok=
"modalFormOk"
></notice-modal>
<!-- 删除关联 -->
</a-card>
</
template
>
<
script
>
// 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
=
[
{
title
:
'小区名称'
,
dataIndex
:
'communityName'
,
key
:
'communityName'
,
align
:
'center'
},
{
title
:
'所属区域'
,
dataIndex
:
'communityArea'
,
key
:
'communityArea'
,
align
:
'center'
},
{
title
:
'占地面积(㎡)'
,
dataIndex
:
'coverArea'
,
key
:
'coverArea'
,
align
:
'center'
},
{
title
:
'总栋数'
,
dataIndex
:
'buildingNum'
,
key
:
'buildingNum'
,
align
:
'center'
},
{
title
:
'房屋数量'
,
dataIndex
:
'houseNum'
,
key
:
'houseNum'
,
align
:
'center'
},
{
title
:
'联系人'
,
dataIndex
:
'adminName'
,
key
:
'adminName'
,
align
:
'center'
},
{
title
:
'联系方式'
,
dataIndex
:
'adminPhone'
,
key
:
'adminPhone'
,
align
:
'center'
},
{
title
:
'创建时间'
,
dataIndex
:
'updateTime'
,
key
:
'updateTime'
,
align
:
'center'
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
scopedSlots
:
{
customRender
:
'action'
},
align
:
'center'
,
width
:
150
}
]
export
default
{
name
:
'PermissionListAsync'
,
mixins
:
[
JeecgListMixin
],
components
:
{
NoticeModal
},
data
()
{
return
{
// 表头
columns
:
columns
,
deteleId
:
''
,
url
:
{
list
:
"/property-central/shop/shopCommunity/getShopCommunity"
,
delete
:
'/property-central/shop/shopCommunity/deleteByCommunityCode'
,
deleteBatch
:
'/property-central/shop/shopCommunity/deleteBatch'
},
}
},
methods
:
{
handlePerssion
(
roleId
)
{
this
.
$refs
.
modalUserRole
.
show
(
roleId
);
},
showDeleteConfirm
(
record
)
{
var
that
=
this
;
this
.
$confirm
({
title
:
'确定是否删除关联小区?'
,
okText
:
'删除'
,
okType
:
'danger'
,
cancelText
:
'否'
,
onOk
()
{
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
;
});
}
});
}
},
handleAdd
()
{
this
.
$refs
.
modalForm
.
add
()
}
}
}
</
script
>
<
style
scoped
>
@import
'~@assets/less/common.less'
;
</
style
>
src/views/cell/modules/NoticeForm.vue
0 → 100644
浏览文件 @
6cfc7c8e
<
template
>
<a-spin
:spinning=
"confirmLoading"
style=
'padding-top: 30px'
>
<j-form-container
:disabled=
"true"
>
<a-form-model
ref=
"form"
:model=
"model"
:rules=
"validatorRules"
slot=
"detail"
>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"小区名称"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"communityName"
>
<a-input
v-model=
"model.communityName"
placeholder=
"请输入小区名称"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"用途"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"useTo"
>
<a-select
style=
"width: 100%"
v-model=
"model.useTo"
placeholder=
"请选择用途"
>
<a-select-option
v-for=
"item in dictOptions"
:key=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"所属地区"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"communityArea"
>
<a-input
v-model=
"model.communityArea"
placeholder=
"请输入所属地区"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"详细地址"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"addressInfo"
>
<a-input
v-model=
"model.addressInfo"
placeholder=
"请输入详细地址"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"建成日期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"completedDate"
>
<j-date
placeholder=
"请选择建成日期"
v-model=
"model.completedDate"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"占地面积"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"coverArea"
>
<a-input
v-model=
"model.coverArea"
placeholder=
"请输入占地面积"
addon-after=
"㎡"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"楼栋数量"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"buildingNum"
>
<a-input
v-model=
"model.buildingNum"
placeholder=
"请输入楼栋数量"
addon-after=
"栋"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"房屋数量"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"houseNum"
>
<a-input
v-model=
"model.houseNum"
placeholder=
"请输入房屋数量"
addon-after=
"间"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"停车位"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"parkingSpace"
>
<a-input
v-model=
"model.parkingSpace"
placeholder=
"请输入停车位"
addon-after=
"个"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"充电桩"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"chargingStation"
>
<a-input
type=
"number"
v-model=
"model.chargingStation"
placeholder=
"请输入充电桩"
addon-after=
"个"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"小区图片"
:labelCol=
"
{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol" prop="communityImage">
<j-image-upload
:isMultiple=
"true"
text=
"点击上传"
bizPath=
"scott/pic"
v-model=
"model.communityImage"
></j-image-upload>
<p
style=
"line-height:1;margin:0"
>
建议尺寸640*320,小于10M的JPG、PNG格式图片,可上传多张
</p>
</a-form-model-item>
</a-col>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"小区简介"
:labelCol=
"
{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol" prop="communityIntro">
<a-textarea
placeholder=
"小区简介"
v-model=
"model.communityIntro"
allow-clear
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"小区管理员"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"adminName"
>
<a-input
v-model=
"model.adminName"
placeholder=
"请输入小区管理员"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"管理员联系电话"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"adminPhone"
>
<a-input
v-model=
"model.adminPhone"
placeholder=
"请输入管理员联系电话"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"管理员登录密码"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"adminPassword"
>
<a-input
v-model=
"model.adminPassword"
placeholder=
"请输入管理员登录密码"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"访问域名前缀"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"accessAddress"
>
<a-input
v-model=
"model.accessAddress"
placeholder=
"请输入访问域名前缀"
addon-after=
".group.hjxbc.cn"
></a-input>
<p
v-if=
"model.accessAddress"
>
访问域名:
{{
model
.
accessAddress
}}
.group.hjxbc.cn
</p>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"管理员头像"
:labelCol=
"
{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol" prop="adminAvatar">
<j-image-upload
:isMultiple=
"false"
text=
"点击上传"
bizPath=
"scott/pic"
v-model=
"model.adminAvatar"
></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</
template
>
<
script
>
import
{
httpAction
,
getAction
}
from
'@/api/manage'
import
{
validateDuplicateValue
}
from
'@/utils/util'
import
{
ajaxGetDictItems
,
getDictItemsFromCache
}
from
'@/api/api'
import
{
isMobile
,
alphanumeric
}
from
'@/utils/validate'
export
default
{
name
:
'PropertyChargruleForm'
,
components
:
{
},
props
:
{
//表单禁用
disabled
:
{
type
:
Boolean
,
default
:
false
,
required
:
false
}
},
data
()
{
const
validateToNextPhone
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
&&
isMobile
(
value
))
{
callback
();
}
else
{
callback
(
'请输入正确的联系人电话!'
);
}
}
const
isAlphanumeric
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
&&
alphanumeric
(
value
))
{
callback
()
}
else
{
callback
(
'请输入带字母的域名前缀'
)
}
}
return
{
model
:{
communityName
:
''
,
useTo
:
''
,
communityArea
:
''
,
addressInfo
:
''
,
completedDate
:
''
,
coverArea
:
''
,
buildingNum
:
''
,
houseNum
:
''
,
parkingSpace
:
''
,
chargingStation
:
''
,
communityImage
:
''
,
communityIntro
:
''
,
adminName
:
''
,
adminPhone
:
''
,
adminPassword
:
''
,
adminAvatar
:
''
,
accessAddress
:
''
,
},
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
6
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
16
},
},
confirmLoading
:
false
,
validatorRules
:
{
communityName
:
[{
required
:
true
,
message
:
'请输入小区名称'
,
trigger
:
'blur'
}],
useTo
:
[{
required
:
true
,
message
:
'请选择用途'
,
trigger
:
'change'
}],
communityArea
:
[{
required
:
true
,
message
:
'请输入所属地区'
,
trigger
:
'blur'
}],
coverArea
:
[{
required
:
true
,
message
:
'请输入占地面积'
,
trigger
:
'blur'
}],
buildingNum
:
[{
required
:
true
,
message
:
'请输入楼栋数量'
,
trigger
:
'blur'
}],
houseNum
:
[{
required
:
true
,
message
:
'请输入房屋数量'
,
trigger
:
'blur'
}],
communityImage
:
[{
required
:
true
,
message
:
'请至少上传一张小区图片'
,
trigger
:
'change'
}],
adminName
:
[{
required
:
true
,
message
:
'请输入小区管理员'
,
trigger
:
'blur'
}],
adminPhone
:
[
{
required
:
true
,
message
:
'请输入管理员联系电话'
,
trigger
:
'blur'
},
{
validator
:
validateToNextPhone
}
],
adminPassword
:
[{
required
:
true
,
message
:
'请输入管理员登录密码'
,
trigger
:
'blur'
}],
accessAddress
:
[
{
required
:
true
,
message
:
'请输入访问域名前缀'
,
trigger
:
'blur'
},
{
validator
:
isAlphanumeric
},
],
adminAvatar
:
[{
required
:
true
,
message
:
'请上传管理员头像'
,
trigger
:
'blur'
}]
},
url
:
{
add
:
"/property-central/shop/shopCommunity/add"
},
dictOptions
:
[
{
label
:
'商用'
,
value
:
1
},
{
label
:
'普通住宅'
,
value
:
2
},
{
label
:
'商住合一'
,
value
:
3
}
]
}
},
computed
:
{
formDisabled
(){
return
this
.
disabled
},
},
created
()
{
//备份model原始值
this
.
modelDefault
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
model
));
},
methods
:
{
ruleNumberInput
(
event
)
{
let
rateValue
=
event
.
target
.
value
.
replace
(
/
[^\d]
/g
,
""
);
//清除"数字"和"."和"-"以外的字符
this
.
model
[
'empowerDays'
]
=
rateValue
},
add
()
{
this
.
edit
(
this
.
modelDefault
);
},
edit
(
record
)
{
console
.
log
(
record
)
this
.
model
=
Object
.
assign
({},
record
);
this
.
visible
=
true
;
},
submitForm
()
{
const
that
=
this
;
// 触发表单验证
this
.
$refs
.
form
.
validate
(
valid
=>
{
console
.
log
(
this
.
model
)
if
(
valid
)
{
that
.
confirmLoading
=
true
;
let
httpurl
=
''
;
let
method
=
''
;
httpurl
+=
this
.
url
.
add
;
method
=
'post'
;
httpAction
(
httpurl
,
this
.
model
,
method
).
then
((
res
)
=>
{
if
(
res
.
success
){
that
.
$message
.
success
(
res
.
message
);
that
.
$emit
(
'ok'
);
}
else
{
that
.
$message
.
warning
(
res
.
message
);
}
}).
finally
(()
=>
{
that
.
confirmLoading
=
false
;
})
}
})
},
}
}
</
script
>
src/views/cell/modules/NoticeModal.vue
0 → 100644
浏览文件 @
6cfc7c8e
<
template
>
<j-modal
:title=
"title"
:width=
"width"
:visible=
"visible"
switchFullscreen
@
ok=
"handleOk"
:okButtonProps=
"
{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<a-button
class=
"bbtn"
@
click=
"updateCurrentDepart"
>
小区查找
</a-button>
<property-settled-form
ref=
"realForm"
@
ok=
"submitCallback"
:disabled=
"disableSubmit"
></property-settled-form>
<login-switch-house
ref=
"loginSelect"
:closable=
"true"
title=
"小区查找"
@
success=
"loginSelectOk"
></login-switch-house>
</j-modal>
</
template
>
<
script
>
import
PropertySettledForm
from
'./NoticeForm'
import
{
httpAction
,
getAction
}
from
'@/api/manage'
import
LoginSwitchHouse
from
'@/components/tools/LoginSwitchHouse'
export
default
{
name
:
'PropertySettledModal'
,
components
:
{
PropertySettledForm
,
LoginSwitchHouse
},
data
()
{
return
{
title
:
''
,
width
:
'70%'
,
visible
:
false
,
disableSubmit
:
true
}
},
methods
:
{
add
()
{
this
.
visible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
realForm
.
add
();
})
},
async
updateCurrentDepart
(){
let
{
result
}
=
await
getAction
(
'/property-company/community/companyCommunity/getList'
,{
})
this
.
$refs
.
loginSelect
.
show
(
result
)
},
loginSelectOk
(
res
)
{
this
.
$refs
.
realForm
.
edit
(
res
);
this
.
disableSubmit
=
false
},
edit
(
record
)
{
this
.
visible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
realForm
.
edit
(
record
);
})
},
close
()
{
this
.
$emit
(
'close'
);
this
.
visible
=
false
;
},
handleOk
()
{
this
.
$refs
.
realForm
.
submitForm
();
},
submitCallback
(){
this
.
$emit
(
'ok'
);
this
.
visible
=
false
;
},
handleCancel
()
{
this
.
close
()
}
}
}
</
script
>
<
style
lang=
"less"
>
.bbtn{
position: absolute;
right: 120px;
top: 12px;
z-index: 333;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论