342 lines
15 KiB
QML
342 lines
15 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls
|
|
import FluentUI.Controls
|
|
import FluentUI.impl
|
|
import "../base"
|
|
|
|
MyDialogWindow {
|
|
id: dia_newproject
|
|
title: "搜索周边"
|
|
property var p_show_result: false
|
|
|
|
Rectangle {
|
|
id: near_container
|
|
implicitWidth: 610
|
|
implicitHeight: 230
|
|
|
|
color: "transparent"
|
|
ColumnLayout{
|
|
anchors.fill: parent
|
|
anchors.leftMargin: 10
|
|
anchors.topMargin: 10
|
|
anchors.rightMargin: 10
|
|
RowLayout{
|
|
spacing: 20
|
|
Layout.fillWidth: true
|
|
TextBox{
|
|
Layout.preferredWidth: 400
|
|
Layout.preferredHeight: 44
|
|
placeholderText: "请输入搜索内容"
|
|
}
|
|
ComboBox{
|
|
Layout.preferredWidth: 170
|
|
Layout.preferredHeight: 44
|
|
model: ListModel {
|
|
ListElement { text: "附近0.5公里" }
|
|
ListElement { text: "附近1公里" }
|
|
ListElement { text: "附近2公里" }
|
|
ListElement { text: "附近3公里" }
|
|
ListElement { text: "附近4公里" }
|
|
ListElement { text: "附近5公里" }
|
|
}
|
|
}
|
|
}
|
|
|
|
Label{
|
|
Layout.topMargin: 15
|
|
text: "选择类型:"
|
|
color: "#9E9E9E"
|
|
}
|
|
|
|
RowLayout{
|
|
Layout.preferredHeight: 40
|
|
Layout.topMargin: -20
|
|
Item{
|
|
Layout.fillWidth: true
|
|
RowLayout{
|
|
RadioButton {
|
|
text: "陆港"
|
|
checked: true
|
|
FluentUI.primaryColor: "#77ED8B"
|
|
}
|
|
Image{
|
|
source: "qrc:/qt/qml/Gallery/res/image/components/ico_lg.png"
|
|
Layout.preferredHeight: 15
|
|
Layout.preferredWidth: 15
|
|
}
|
|
}
|
|
}
|
|
Item{
|
|
Layout.fillWidth: true
|
|
RowLayout{
|
|
RadioButton {
|
|
text: "充换电站"
|
|
checked: false
|
|
FluentUI.primaryColor: "#77ED8B"
|
|
}
|
|
Image{
|
|
source: "qrc:/qt/qml/Gallery/res/image/components/ico_tp_ele.png"
|
|
Layout.preferredHeight: 15
|
|
Layout.preferredWidth: 15
|
|
}
|
|
}
|
|
}
|
|
Item{
|
|
Layout.fillWidth: true
|
|
RowLayout{
|
|
RadioButton {
|
|
text: "补能站"
|
|
checked: false
|
|
FluentUI.primaryColor: "#77ED8B"
|
|
}
|
|
Image{
|
|
source: "qrc:/qt/qml/Gallery/res/image/components/ico_tp_h2.png"
|
|
Layout.preferredHeight: 15
|
|
Layout.preferredWidth: 15
|
|
}
|
|
}
|
|
}
|
|
Item{
|
|
Layout.fillWidth: true
|
|
RowLayout{
|
|
RadioButton {
|
|
text: "住宿"
|
|
checked: false
|
|
FluentUI.primaryColor: "#77ED8B"
|
|
}
|
|
Image{
|
|
source: "qrc:/qt/qml/Gallery/res/image/components/ico_zs.png"
|
|
Layout.preferredHeight: 15
|
|
Layout.preferredWidth: 15
|
|
}
|
|
}
|
|
}
|
|
Item{
|
|
Layout.fillWidth: true
|
|
RowLayout{
|
|
RadioButton {
|
|
text: "餐饮"
|
|
checked: false
|
|
FluentUI.primaryColor: "#77ED8B"
|
|
}
|
|
Image{
|
|
source: "qrc:/qt/qml/Gallery/res/image/components/ico_cy.png"
|
|
Layout.preferredHeight: 15
|
|
Layout.preferredWidth: 15
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Item{
|
|
// Layout.fillHeight: true
|
|
// }
|
|
|
|
Rectangle{
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: 60
|
|
color: "#1b1b1b"
|
|
Layout.topMargin: 10
|
|
Layout.leftMargin: -20
|
|
Layout.rightMargin: -20
|
|
Layout.bottomMargin: 4
|
|
RowLayout{
|
|
anchors.fill: parent
|
|
anchors.leftMargin: 20
|
|
anchors.rightMargin: 20
|
|
spacing: 20
|
|
Button{
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: 36
|
|
text: "取消"
|
|
onClicked: {
|
|
dia_newproject.close()
|
|
}
|
|
}
|
|
Button{
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: 36
|
|
text: "确认"
|
|
highlighted: true
|
|
background: Rectangle{
|
|
radius: 5
|
|
gradient: Gradient {
|
|
orientation: Gradient.Horizontal
|
|
GradientStop { position: 0.0; color: "#77ED8B" }
|
|
GradientStop { position: 1.0; color: "#22C55E" }
|
|
}
|
|
}
|
|
onClicked: {
|
|
near_container.implicitHeight = 230 + 300
|
|
p_show_result = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
ScrollView{
|
|
visible: p_show_result
|
|
Layout.fillWidth: true
|
|
// Layout.fillHeight: true
|
|
Layout.preferredHeight: 300
|
|
Layout.topMargin: -20
|
|
|
|
ColumnLayout{
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
|
|
Repeater{
|
|
model: ListModel{
|
|
ListElement{
|
|
title: "迎宾餐馆(天台路店)迎宾餐馆(天台路店)迎宾餐馆(天台路店)"
|
|
address: "内蒙古自治区通辽市科尔沁左翼中旗图布信苏木乡421号600室内蒙古自治区通辽市科尔沁左翼中旗图布信苏木乡421号600室"
|
|
phone: "333-62752114"
|
|
}
|
|
ListElement{
|
|
title: "迎宾餐馆(天台路店)"
|
|
address: "内蒙古自治区通辽市科尔沁左翼中旗图布信苏木乡421号600室"
|
|
phone: "333-62752114"
|
|
}
|
|
ListElement{
|
|
title: "迎宾餐馆(天台路店)"
|
|
address: "内蒙古自治区通辽市科尔沁左翼中旗图布信苏木乡421号600室"
|
|
phone: "333-62752114"
|
|
}
|
|
ListElement{
|
|
title: "迎宾餐馆(天台路店)"
|
|
address: "内蒙古自治区通辽市科尔沁左翼中旗图布信苏木乡421号600室"
|
|
phone: "333-62752114"
|
|
}
|
|
}
|
|
|
|
Rectangle{
|
|
id: res_rect
|
|
Layout.preferredHeight: 83
|
|
Layout.preferredWidth: parent.width
|
|
color: Qt.rgba(1, 1, 1, 0.05)
|
|
radius: 8
|
|
Row{
|
|
anchors.fill: parent
|
|
anchors.leftMargin: 8
|
|
anchors.topMargin: 10
|
|
anchors.rightMargin: 5
|
|
anchors.bottomMargin: 5
|
|
Column{
|
|
spacing: 3
|
|
anchors.left: parent.left
|
|
anchors.top: parent.top
|
|
anchors.bottom: parent.bottom
|
|
Label{
|
|
text: model.title
|
|
font.pointSize: 12
|
|
elide: Text.ElideRight
|
|
width: res_rect.width - 180
|
|
}
|
|
Label{
|
|
anchors.top: parent.top
|
|
anchors.topMargin: 33
|
|
text: model.address
|
|
font.pointSize: 10
|
|
color: Qt.rgba(1, 1, 1, 0.6)
|
|
elide: Text.ElideRight
|
|
width: res_rect.width - 180
|
|
}
|
|
Row{
|
|
anchors.bottom: parent.bottom
|
|
Image{
|
|
source: "qrc:/qt/qml/Gallery/res/image/components/map/ico_phone.png"
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
Label{
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: model.phone
|
|
font.pointSize: 10
|
|
}
|
|
}
|
|
}
|
|
Column{
|
|
anchors.right: parent.right
|
|
anchors.top: parent.top
|
|
Rectangle{
|
|
width: 97
|
|
height: 26
|
|
color: Qt.rgba(255/255,255/255,255/255, 0.05)
|
|
anchors.right: parent.right
|
|
radius: 5
|
|
Image{
|
|
source: "qrc:/qt/qml/Gallery/res/image/components/map/ico_add_lay.png"
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: 5
|
|
}
|
|
Label{
|
|
text: "添加到图层"
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: 24
|
|
anchors.top: parent.top
|
|
anchors.topMargin: 3
|
|
color: "#77ED8B"
|
|
}
|
|
MouseArea{
|
|
anchors.fill: parent
|
|
hoverEnabled: true
|
|
onEntered: {
|
|
parent.color = Qt.rgba(255/255,255/255,255/255, 0.15)
|
|
}
|
|
onExited: {
|
|
parent.color = Qt.rgba(255/255,255/255,255/255, 0.05)
|
|
}
|
|
onClicked: {
|
|
console.log("open")
|
|
}
|
|
}
|
|
}
|
|
|
|
Row{
|
|
anchors.top: parent.top
|
|
anchors.topMargin: 35
|
|
anchors.right: parent.right
|
|
spacing: 10
|
|
Label{
|
|
text: "1.6km"
|
|
color: Qt.rgba(1, 1, 1, 0.6)
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
Rectangle{
|
|
width: 97
|
|
height: 26
|
|
radius: 5
|
|
gradient: Gradient {
|
|
orientation: Gradient.Horizontal
|
|
GradientStop { position: 0.0; color: "#77ED8B" }
|
|
GradientStop { position: 1.0; color: "#22C55E" }
|
|
}
|
|
Row{
|
|
anchors.centerIn: parent
|
|
Label{
|
|
text: "导航"
|
|
color: "#2a2a2a"
|
|
}
|
|
Image{
|
|
source: "qrc:/qt/qml/Gallery/res/image/components/map/ico_nav.png"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|