From 6636b4f1b29c8e7d812c96e85701b089e36de5f3 Mon Sep 17 00:00:00 2001 From: liyuanchao <438964165@qq.com> Date: Fri, 15 Aug 2025 11:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/sys/msg/index.vue | 130 ++++++++++++++++++++++++++++++++++++- static/ic_down_arrow_g.png | Bin 0 -> 667 bytes 2 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 static/ic_down_arrow_g.png diff --git a/pages/sys/msg/index.vue b/pages/sys/msg/index.vue index 00f3694..9a69f58 100644 --- a/pages/sys/msg/index.vue +++ b/pages/sys/msg/index.vue @@ -28,10 +28,24 @@ 拜访事由 - + + + {{ formData.visitingReason || '请选择拜访事由' }} + + + + + {{ item }} + + + + + 被访人信息 @@ -151,7 +165,7 @@ visitorName: '1', visitorUnit: '1', visitorPhone: '15555555555', - visitingReason: '1', + visitingReason: '', interviewedPerson: '1', interviewedUnit: '1', interviewedPhone: '15555555555', @@ -171,7 +185,9 @@ 1: '已确认', 2: '已取消', 3: '已完成' - } + }, + typeList:['业务洽谈','会议参与','面试应聘','技术支持','办事咨询','调研考察'], + showTypeDialog:false } }, onLoad(options) { @@ -201,7 +217,19 @@ plus.screen.lockOrientation('landscape-primary'); // #endif }, + methods: { + // 添加选择拜访事由方法 + selectVisitingReason(reason) { + this.formData.visitingReason = reason; + this.showTypeDialog = false; + }, + + // 点击外部关闭下拉菜单 + handleClickOutside() { + this.showTypeDialog = false; + }, + // 处理日期时间选择 onBeginDateChange(e) { this.formData.visitingBeginDate = e.detail.value; @@ -539,6 +567,63 @@ padding: 0 12px; display: flex; align-items: center; + position: relative; + } + + .select-wrapper { + flex: 1; + height: 40px; + border: 1px solid #e5e6eb; + border-radius: 6px; + padding: 0 12px; + display: flex; + align-items: center; + position: relative; + cursor: pointer; + } + + .select-wrapper text { + flex: 1; + font-size: 14px; + color: #333; + } + + u-icon { + transition: transform 0.3s; + } + + .select-wrapper.active u-icon { + transform: rotate(180deg); + } + + .dropdown { + position: absolute; + top: calc(100% + 5px); + left: 0; + right: 0; + background: #fff; + border-radius: 6px; + box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1); + z-index: 999; + max-height: 200px; + overflow-y: auto; + } + + .dropdown-item { + padding: 12px; + font-size: 14px; + color: #333; + border-bottom: 1rpx solid #eee; + text-align: left; + cursor: pointer; + } + + .dropdown-item:last-child { + border-bottom: none; + } + + .dropdown-item:hover { + background-color: #f5f7fa; } .input-wrapper input { @@ -547,6 +632,15 @@ font-size: 14px; color: #333; } + + .filter-img { + position: absolute; + right: 12px; + top: 50%; + transform: translateY(-50%); + width: 18px; /* Adjust based on your image size */ + height: 10px; /* Adjust based on your image size */ + } .picker-wrapper { flex: 1; @@ -635,4 +729,34 @@ align-items: center; justify-content: center; } + + .dropdown { + position: absolute; + top: calc(100% + 5px); + left: 0; + right: 0; + background: #fff; + border-radius: 6px; + box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1); + z-index: 999; + max-height: 200px; + overflow-y: auto; + } + + .dropdown-item { + padding: 12px; + font-size: 14px; + color: #333; + border-bottom: 1rpx solid #eee; + text-align: left; + cursor: pointer; + } + + .dropdown-item:last-child { + border-bottom: none; + } + + .dropdown-item:hover { + background-color: #f5f7fa; + } \ No newline at end of file diff --git a/static/ic_down_arrow_g.png b/static/ic_down_arrow_g.png new file mode 100644 index 0000000000000000000000000000000000000000..d26dc9a92df7ed5c1ac0e01a1cabf83be33a6c99 GIT binary patch literal 667 zcmV;M0%ZM(P)Px%RY^oaR7gw3l}&5ZKp4mWnJlaov{futsW0FwTJ>5H5d@(idQc1AC6md)PvJLM z$c9O>yJtc4peTaiK@r~t5j}g;uaMo$*ry~RyC%C?P1`vo8S*^8dFJ`e7*fhvt@Rzo z*jvu|8*I^VUH5=#nyZGC@)>{?0Gcs&$+E0ho6Xeg_2!}|`VL?p0sRDUFoiG-V}*16 ze6yfj*Ij5d8Xo{G0*DOH^OhK6?*Yu@pssPwpKLUg=Xr-2V+6A&%S{hq7#@w|_#=SX zbb>K<%Cf8<8wDk$JPCjbu_ITATSod41i_+G>N9}(`6!3L&13LUlTw{e!`POkK#$4cSz-kjg+wPZim>Duj5DCXiCn zaX~Wd8fQ~2Koq3JzS}~G`|Wo7glU?zP21CiWj56YRAwK5yKBvR55Qa%n`#9rv2Q3x zdN)lnajJ7@Qm_*H=>E&@rb#hs1uC(xl1*ixe*iS+71zr2klz3R002ovPDHLkV1ky~ BEerqv literal 0 HcmV?d00001