diff --git a/app/components/userRelation/cell/index.json b/app/components/userRelation/cell/index.json deleted file mode 100644 index 4d463e7fc..000000000 --- a/app/components/userRelation/cell/index.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "navigationBarTitleText": "修改权限", - "usingComponents": { - "t-checkbox": "../../../miniprogram_npm/tdesign/checkbox/checkbox", - "t-icon": "../../../miniprogram_npm/tdesign/icon/icon", - "t-tag": "../../../miniprogram_npm/tdesign/tag/tag", - "t-button": "../../../miniprogram_npm/tdesign/button/button" - } -} \ No newline at end of file diff --git a/app/components/userRelation/cell/index.less b/app/components/userRelation/cell/index.less deleted file mode 100644 index 4585e6fdb..000000000 --- a/app/components/userRelation/cell/index.less +++ /dev/null @@ -1,52 +0,0 @@ -/** index.wxss **/ -@import "../../../config/styles/_base.less"; -@import "../../../config/styles/_mixins.less"; - -.card-view { - margin: @spacer; - margin-bottom: 0rpx; - padding: @spacer; - border-radius: 4rpx; - display: flex; - align-items: center; - box-shadow: 0 4rpx 20rpx 0 rgba(212, 217, 223, 0.5); - background-color: #fff; -} -.row { - margin-left: @spacer; - display: flex; - flex: 1; - align-items: center; -} - -.col { - display: flex; - flex: 1; - flex-direction: column; -} - -.nickname { - margin-bottom: 8rpx; - font-size: @font-size-base; -} -.mobile { - font-size: @font-size-base; - color: @text-level-3-color; -} -.avatar { - height: 140rpx; - width: 140rpx; - border-radius: 50%; -} -.img-view { - display: flex; - align-items: center; - justify-content: center; - height: 140rpx; - width: 140rpx; - border-radius: 50%; - background-color: @bg-color-fade; -} -.t-class { - padding: 0rpx; -} \ No newline at end of file diff --git a/app/components/userRelation/cell/index.ts b/app/components/userRelation/cell/index.ts deleted file mode 100644 index 7185d8995..000000000 --- a/app/components/userRelation/cell/index.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { firstLetterUpperCase } from "oak-domain/lib/utils/string"; -import { composeFileUrl } from "../../../../src/utils/extraFile"; - -export default OakComponent( - { - path: 'user:relation', - entity: 'user', - isList: true, - formData: async ({ data: user }) => { - const { - id, - nickname, - userState, - name, - mobile$user, - extraFile$entity, - } = user || {}; - const mobile = mobile$user && mobile$user[0]?.mobile; - const avatar = - extraFile$entity && - extraFile$entity[0] && - composeFileUrl(extraFile$entity[0]); - return { - id, - nickname, - name, - mobile, - avatar, - userState, - }; - }, - properties: { - oakFullpath: String, - oakParent: String, - oakPath: String, - oakId: String, - }, - data: { - checked: false, - }, - methods: { - onClick(e: any) { - const { checked } = this.data; - const { id } = e.currentTarget.dataset; - this.setState({ - checked: !checked, - }) - this.triggerEvent('myClick', e, { id }); - }, - handleChange() { - const { checked } = this.data; - this.setState({ - checked: !checked, - }) - } - }, - } -); diff --git a/app/components/userRelation/cell/index.tsx b/app/components/userRelation/cell/index.tsx deleted file mode 100644 index d0976bdc0..000000000 --- a/app/components/userRelation/cell/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React, { Component } from 'react'; - -export default function render() { - const { rows } = this.state; - - return ( -
- 待添加 -
- ); -} diff --git a/app/components/userRelation/cell/index.wxml b/app/components/userRelation/cell/index.wxml deleted file mode 100644 index d6507b456..000000000 --- a/app/components/userRelation/cell/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - {{nickname || '未设置'}} - 姓名: {{name || '未设置'}} - 手机: {{mobile || '未设置'}} - - - - 添加 - - - \ No newline at end of file diff --git a/app/components/userSearch/index.ts b/app/components/userSearch/index.ts deleted file mode 100644 index 7cf36b731..000000000 --- a/app/components/userSearch/index.ts +++ /dev/null @@ -1,188 +0,0 @@ - -export default OakComponent( - { - path: 'userSearch:search', - entity: 'user', - projection: { - id: 1, - name: 1, - nickname: 1, - mobile$user: { - $entity: 'mobile', - data: { - id: 1, - userId: 1, - mobile: 1, - }, - }, - // extraFile$entity: { - // $entity: 'extraFile', - // data: { - // id: 1, - // tag1: 1, - // origin: 1, - // bucket: 1, - // objectId: 1, - // filename: 1, - // extra1: 1, - // type: 1, - // entity: 1, - // extension: 1, - // }, - // filter: { - // tag1: 'avatar', - // }, - // indexFrom: 0, - // count: 1, - // }, - }, - filters: [ - // { - // filter: async ({ onLoadOptions }) => { - // return { - // id: { - // $in: { - // entity: 'mobile', - // data: { - // userId: 1, - // }, - // filter: { - // mobile: { - // $eq: '111111111112', - // } - // } - // } - // } - // }; - // }, - // '#name': 'mobile', - // }, - ], - isList: false, - formData: async function ({ data: users, params, features }) { - - const isRoot = await features.token.isRoot(); - const filter = await this.getFilterByName('name'); - - return { - users: users?.map((ele: any) => { - const { mobile$user, extraFile$entity } = - ele || {}; - const mobile = mobile$user && mobile$user[0]?.mobile; - const avatar = - extraFile$entity && - extraFile$entity[0] && - composeFileUrl(extraFile$entity[0]); - const user2 = Object.assign({}, ele, { - mobile, - avatar, - }); - return user2; - }), - searchValue: ( - filter?.$or as [{ name: { $includes: string } }] - )[0].name.$includes, - isRoot, - }; - }, - properties: { - }, - data: {}, - lifetimes: { - ready() { - const searchStr = wx.getStorageSync('user_searchList') as string; - if (searchStr.length) { - const searchArr = JSON.parse(searchStr) as Array; - this.addNamedFilter({ - filter: { - id: { - $in: { - entity: 'mobile', - data: { - userId: 1, - }, - filter: { - $or: searchArr.map(ele => { - { - mobile: { - $eq: ele - } - } - }) - } - } - } - }, - '#name': 'mobile', - }) - } - } - }, - methods: { - async searchChange(input: any) { - }, - async searchCancel() { - this.setState({ - searchValue: '', - }) - }, - async searchConfirm(input: any) { - const { value } = this.resolveInput(input); - if (value.length < 11) { - this.setState({ - msgType: 'warning', - showMsg: true, - content: '手机号位数不足11位' - }) - return; - } - const searchStr = wx.getStorageSync('user_searchList') as string; - let searchArr: Array = []; - if (!searchStr) { - searchArr.push(value) - } - else { - searchArr = JSON.parse(searchStr) as Array; - } - wx.setStorageSync('user_searchList', JSON.stringify(searchArr)); - this.addNamedFilter({ - filter: { - id: { - $in: { - entity: 'mobile', - data: { - userId: 1, - }, - filter: { - mobile: { - $eq: value, - } - } - } - } - }, - '#name': 'mobile', - }); - this.refresh(); - }, - goUpsertUser() { - const { entity, entityId } = this.props; - this.navigateTo({ - url: '/user/manage/upsert', - }); - }, - handleCardClick(event: any) { - const { entity, entityId } = this.props; - const { dataset } = this.resolveInput(event); - const { id } = dataset!; - this.navigateTo({ - url: '/user/manage/detail', - oakId: id, - entity, - entityId, - relations: JSON.stringify(['manager', 'owner']), - }); - }, - }, - } -);