删除废文件

This commit is contained in:
Wang Kejun 2022-08-17 13:55:01 +08:00
parent 033ad9bd1e
commit 198296713b
6 changed files with 0 additions and 339 deletions

View File

@ -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"
}
}

View File

@ -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;
}

View File

@ -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,
})
}
},
}
);

View File

@ -1,11 +0,0 @@
import React, { Component } from 'react';
export default function render() {
const { rows } = this.state;
return (
<div>
</div>
);
}

View File

@ -1,21 +0,0 @@
<view class="card-view" data-id="{{id}}">
<block wx:if="{{avatar}}">
<image class="avatar" src="{{avatar}}" mode="aspectFit" />
</block>
<block wx:else>
<view class="img-view">
<t-icon name="icon" size="xl" />
</view>
</block>
<view class="row">
<view class="col">
<text class="nickname">{{nickname || '未设置'}}</text>
<text class="mobile">姓名: {{name || '未设置'}}</text>
<text class="mobile">手机: {{mobile || '未设置'}}</text>
</view>
<t-tag theme="primary" shape="round" size="large" bind:tap="onAdd">
<t-icon name="add" size="16px" slot="icon" />
添加
</t-tag>
</view>
</view>

View File

@ -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<string>;
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<string> = [];
if (!searchStr) {
searchArr.push(value)
}
else {
searchArr = JSON.parse(searchStr) as Array<string>;
}
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']),
});
},
},
}
);