Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
housing-estate
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
物业总平台
housing-estate
Commits
de3ca116
提交
de3ca116
authored
6月 28, 2023
作者:
何忠建
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复bug
上级
54a71c82
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
232 行增加
和
5 行删除
+232
-5
NoticeForm.vue
src/views/information/capital/modules/NoticeForm.vue
+21
-5
SelectUserModal.vue
src/views/information/capital/modules/SelectUserModal.vue
+211
-0
没有找到文件。
src/views/information/capital/modules/NoticeForm.vue
浏览文件 @
de3ca116
...
@@ -57,29 +57,32 @@
...
@@ -57,29 +57,32 @@
</a-col>
-->
</a-col>
-->
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"负责人"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"headName"
>
<a-form-model-item
label=
"负责人"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"headName"
>
<a-input
v-model=
"model.headName"
placeholder=
"请
输入负责人"
></a-input>
<a-input
v-model=
"model.headName"
placeholder=
"请
选择负责人"
readOnly
@
click=
"handleAddUserRole"
></a-input>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"联系方式"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"headPhone"
>
<a-form-model-item
label=
"联系方式"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"headPhone"
>
<a-input
v-model=
"model.headPhone"
placeholder=
"
请输入联系方式"
></a-input>
<a-input
v-model=
"model.headPhone"
placeholder=
"
联系方式"
readOnly
disabled
></a-input>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
</a-row>
</a-row>
</a-form-model>
</a-form-model>
</j-form-container>
</j-form-container>
<Select-User-Modal
ref=
"selectUserModal"
@
selectFinished=
"selectOK"
></Select-User-Modal>
</a-spin>
</a-spin>
</
template
>
</
template
>
<
script
>
<
script
>
import
Vue
from
'vue'
import
{
httpAction
,
getAction
}
from
'@/api/manage'
import
{
httpAction
,
getAction
}
from
'@/api/manage'
import
{
validateDuplicateValue
}
from
'@/utils/util'
import
{
validateDuplicateValue
}
from
'@/utils/util'
import
{
ajaxGetDictItems
,
getDictItemsFromCache
}
from
'@/api/api'
import
{
ajaxGetDictItems
,
getDictItemsFromCache
}
from
'@/api/api'
import
{
USER_INFO
}
from
"@/store/mutation-types"
import
SelectUserModal
from
'./SelectUserModal'
export
default
{
export
default
{
name
:
'PropertyChargruleForm'
,
name
:
'PropertyChargruleForm'
,
components
:
{
components
:
{
SelectUserModal
},
},
props
:
{
props
:
{
//表单禁用
//表单禁用
...
@@ -118,6 +121,7 @@
...
@@ -118,6 +121,7 @@
assetName
:
[{
required
:
true
,
message
:
'请输入设备名称'
,
trigger
:
'blur'
}],
assetName
:
[{
required
:
true
,
message
:
'请输入设备名称'
,
trigger
:
'blur'
}],
assetCode
:
[{
required
:
true
,
message
:
'请输入设备编码'
,
trigger
:
'change'
}],
assetCode
:
[{
required
:
true
,
message
:
'请输入设备编码'
,
trigger
:
'change'
}],
assetPosition
:
[{
required
:
true
,
message
:
'请输入所在位置'
,
trigger
:
'blur'
}],
assetPosition
:
[{
required
:
true
,
message
:
'请输入所在位置'
,
trigger
:
'blur'
}],
headName
:
[{
required
:
true
,
message
:
'请选择负责人'
,
trigger
:
'change'
}],
// communityCode: [{ required: true, message: '请输入所属小区', trigger: 'blur' }]
// communityCode: [{ required: true, message: '请输入所属小区', trigger: 'blur' }]
},
},
url
:
{
url
:
{
...
@@ -158,12 +162,24 @@
...
@@ -158,12 +162,24 @@
},
},
add
()
{
add
()
{
this
.
edit
(
this
.
modelDefault
);
this
.
edit
(
this
.
modelDefault
);
let
data
=
Vue
.
ls
.
get
(
USER_INFO
)
this
.
model
.
assetPosition
=
data
.
platformName
},
},
edit
(
record
)
{
edit
(
record
)
{
console
.
log
(
record
)
this
.
model
=
Object
.
assign
({},
record
);
this
.
model
=
Object
.
assign
({},
record
);
this
.
visible
=
true
;
this
.
visible
=
true
;
},
},
handleAddUserRole
()
{
if
(
this
.
currentRoleId
==
''
)
{
this
.
$message
.
error
(
'请选择一个角色!'
)
}
else
{
this
.
$refs
.
selectUserModal
.
visible
=
true
}
},
selectOK
(
data
)
{
this
.
model
.
headName
=
data
.
realname
this
.
model
.
headPhone
=
data
.
phone
},
submitForm
()
{
submitForm
()
{
const
that
=
this
;
const
that
=
this
;
// 触发表单验证
// 触发表单验证
...
...
src/views/information/capital/modules/SelectUserModal.vue
0 → 100644
浏览文件 @
de3ca116
<
template
>
<div>
<a-modal
centered
:title=
"title"
:width=
"1000"
:visible=
"visible"
@
ok=
"handleOk"
@
cancel=
"handleCancel"
cancelText=
"关闭"
>
<div>
<a-table
size=
"small"
bordered
rowKey=
"id"
:columns=
"columns1"
:dataSource=
"dataSource1"
:pagination=
"ipagination"
:loading=
"loading"
:scroll=
"
{ y: 240 }"
:rowSelection="{selectedRowKeys: selectedRowKeys,onSelect:onSelect,onChange: onSelectChange,type:'radio'}"
@change="handleTableChange">
</a-table>
</div>
<!-- table区域-end -->
</a-modal>
</div>
</
template
>
<
script
>
import
{
filterObj
}
from
'@/utils/util'
import
{
getAction
}
from
'@/api/manage'
export
default
{
name
:
"SelectUserModal"
,
data
()
{
return
{
title
:
"添加已有用户"
,
names
:
[],
visible
:
false
,
placement
:
'right'
,
description
:
''
,
// 查询条件
queryParam
:
{},
// 表头
columns1
:
[
{
title
:
'#'
,
dataIndex
:
''
,
key
:
'rowIndex'
,
width
:
50
,
align
:
"center"
,
customRender
:
function
(
t
,
r
,
index
)
{
return
parseInt
(
index
)
+
1
;
}
},
{
title
:
'用户名称'
,
align
:
"center"
,
width
:
100
,
dataIndex
:
'realname'
},
{
title
:
'性别'
,
align
:
"center"
,
width
:
100
,
dataIndex
:
'sex_dictText'
},
{
title
:
'电话'
,
align
:
"center"
,
width
:
100
,
dataIndex
:
'phone'
},
{
title
:
'部门'
,
align
:
"center"
,
width
:
150
,
dataIndex
:
'orgCodeTxt'
}
],
//数据集
dataSource1
:
[],
dataSource2
:
[],
// 分页参数
ipagination
:
{
current
:
1
,
pageSize
:
10
,
pageSizeOptions
:
[
'10'
,
'20'
,
'30'
],
showTotal
:
(
total
,
range
)
=>
{
return
range
[
0
]
+
"-"
+
range
[
1
]
+
" 共"
+
total
+
"条"
},
showQuickJumper
:
true
,
showSizeChanger
:
true
,
total
:
0
},
isorter
:
{
column
:
'createTime'
,
order
:
'desc'
,
},
loading
:
false
,
selectedRowKeys
:
[],
selectedRows
:
[],
url
:
{
list
:
"/sys/user/list"
,
},
chooseUser
:{}
}
},
created
()
{
this
.
loadData
();
},
methods
:
{
searchQuery
()
{
this
.
loadData
(
1
);
},
searchReset
()
{
this
.
queryParam
=
{};
this
.
loadData
(
1
);
},
handleCancel
()
{
this
.
visible
=
false
;
},
handleOk
()
{
console
.
log
(
"data:"
+
this
.
chooseUser
);
this
.
$emit
(
"selectFinished"
,
this
.
chooseUser
);
this
.
visible
=
false
;
},
add
()
{
this
.
visible
=
true
;
},
loadData
(
arg
)
{
//加载数据 若传入参数1则加载第一页的内容
if
(
arg
===
1
)
{
this
.
ipagination
.
current
=
1
;
}
var
params
=
this
.
getQueryParams
();
//查询条件
getAction
(
this
.
url
.
list
,
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
dataSource1
=
res
.
result
.
records
;
this
.
ipagination
.
total
=
res
.
result
.
total
;
}
})
},
getQueryParams
()
{
var
param
=
Object
.
assign
({},
this
.
queryParam
,
this
.
isorter
);
param
.
pageNo
=
this
.
ipagination
.
current
;
param
.
pageSize
=
this
.
ipagination
.
pageSize
;
return
filterObj
(
param
);
},
onSelect
(
record
,
selected
)
{
if
(
selected
===
true
)
{
this
.
chooseUser
=
record
;
}
},
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
;
this
.
selectionRows
=
selectedRows
;
},
handleTableChange
(
pagination
,
filters
,
sorter
)
{
//分页、排序、筛选变化时触发
console
.
log
(
sorter
);
//TODO 筛选
if
(
Object
.
keys
(
sorter
).
length
>
0
)
{
this
.
isorter
.
column
=
sorter
.
field
;
this
.
isorter
.
order
=
"ascend"
==
sorter
.
order
?
"asc"
:
"desc"
}
this
.
ipagination
=
pagination
;
this
.
loadData
();
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.ant-card-body .table-operator {
margin-bottom: 18px;
}
.ant-table-tbody .ant-table-row td {
padding-top: 15px;
padding-bottom: 15px;
}
.anty-row-operator button {
margin: 0 5px
}
.ant-btn-danger {
background-color: #ffffff
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论