Showing
1 changed file
with
17 additions
and
11 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-08-29 14:31:20 | 2 | * @Date: 2022-08-29 14:31:20 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-07-30 13:42:10 | 4 | + * @LastEditTime: 2024-07-30 13:55:36 |
| 5 | * @FilePath: /data-table/src/components/OrgPickerField/MyComponent.vue | 5 | * @FilePath: /data-table/src/components/OrgPickerField/MyComponent.vue |
| 6 | * @Description: 树形组件 | 6 | * @Description: 树形组件 |
| 7 | --> | 7 | --> |
| ... | @@ -226,6 +226,13 @@ | ... | @@ -226,6 +226,13 @@ |
| 226 | </div> | 226 | </div> |
| 227 | </van-popup> | 227 | </van-popup> |
| 228 | 228 | ||
| 229 | + <van-dialog v-model:show="show_detail" title="详情" :confirm-button-color="styleColor.baseColor"> | ||
| 230 | + <div style="padding: 0 1rem;"> | ||
| 231 | + <div style="margin-bottom: 0.5rem;">姓名:{{ node_info.name }}</div> | ||
| 232 | + <div style="margin-bottom: 0.5rem;">组织结构类型:{{ node_info.type }}</div> | ||
| 233 | + <div v-if="node_info.mobile" style="margin-bottom: 0.5rem;">手机号:<a :href="`tel:${node_info.mobile}`" :style="{ color: styleColor.baseColor }">{{ node_info.mobile }} </a></div> | ||
| 234 | + </div> | ||
| 235 | + </van-dialog> | ||
| 229 | </div> | 236 | </div> |
| 230 | </template> | 237 | </template> |
| 231 | 238 | ||
| ... | @@ -332,6 +339,8 @@ const openTree = () => { | ... | @@ -332,6 +339,8 @@ const openTree = () => { |
| 332 | }); | 339 | }); |
| 333 | } | 340 | } |
| 334 | 341 | ||
| 342 | +const node_info = ref({}); | ||
| 343 | +const show_detail = ref(false); | ||
| 335 | const clickNode = ({ id, type, name, mobile='' }) => { // 点击显示选择详情 | 344 | const clickNode = ({ id, type, name, mobile='' }) => { // 点击显示选择详情 |
| 336 | if (!props.component_props.readonly) return false; // 非只读不予许操作 | 345 | if (!props.component_props.readonly) return false; // 非只读不予许操作 |
| 337 | const obj = { | 346 | const obj = { |
| ... | @@ -342,16 +351,13 @@ const clickNode = ({ id, type, name, mobile='' }) => { // 蝷粹霂行 | ... | @@ -342,16 +351,13 @@ const clickNode = ({ id, type, name, mobile='' }) => { // 蝷粹霂行 |
| 342 | if (mobile === null) { | 351 | if (mobile === null) { |
| 343 | mobile = '' | 352 | mobile = '' |
| 344 | } | 353 | } |
| 345 | - // 显示更多详情 | 354 | + node_info.value = { |
| 346 | - showDialog({ | 355 | + id, |
| 347 | - title: '详情', | 356 | + type: obj[type], |
| 348 | - // message: `${obj[type]}-${name}-${mobile}`, | 357 | + name, |
| 349 | - message: `姓名:${name}\n组织结构类型:${obj[type]}\n手机号:${mobile}`, | 358 | + mobile |
| 350 | - confirmButtonColor: styleColor.baseColor, | 359 | + } |
| 351 | - messageAlign: 'left', | 360 | + show_detail.value = true; |
| 352 | - }).then(() => { | ||
| 353 | - // on close | ||
| 354 | - }); | ||
| 355 | } | 361 | } |
| 356 | 362 | ||
| 357 | const emitCheckedGroup = ref({ | 363 | const emitCheckedGroup = ref({ | ... | ... |
-
Please register or login to post a comment