提交 4eda6ad0 编写于 作者: M MicroMilo

疯狂优化

上级 97b7f98e
......@@ -8,7 +8,7 @@
},
"h5" :
{
"launchtype" : "local"
"launchtype" : "remote"
},
"type" : "uniCloud"
}
......
......@@ -96,7 +96,7 @@
uniCloud.chooseAndUploadFile({
type: 'image',
success(res) {
that.formData.icon = res["tempFiles"][0]["url"]
that.formData.background_picture = res["tempFiles"][0]["url"]
console.log(res)
},
fail() {
......
......@@ -23,9 +23,9 @@
<uni-forms-item name="place" label="地点">
<uni-easyinput placeholder="校园活动地点" v-model="formData.place"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="status" label="活动状态">
<!-- <uni-forms-item name="status" label="活动状态">
<uni-easyinput placeholder="校园活动状态" type="number" v-model="formData.status"></uni-easyinput>
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item name="contact" label="联系方式">
<uni-easyinput placeholder="校园活动发布者联系方式" v-model="formData.contact"></uni-easyinput>
</uni-forms-item>
......@@ -100,7 +100,7 @@
uniCloud.chooseAndUploadFile({
type: 'image',
success(res) {
that.formData.icon = res["tempFiles"][0]["url"]
that.formData.background_picture = res["tempFiles"][0]["url"]
console.log(res)
},
fail() {
......
......@@ -10,9 +10,9 @@
<button class="uni-button" type="default" size="mini" @click="search">搜索</button>
<button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button>
<button class="uni-button" type="default" size="mini" :disabled="!selectedIndexs.length" @click="delTable">批量删除</button>
<download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<!-- <download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<button class="uni-button" type="primary" size="mini">导出 Excel</button>
</download-excel>
</download-excel> -->
</view>
</view>
<view class="uni-container">
......@@ -25,10 +25,10 @@
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'content')" sortable @sort-change="sortChange($event, 'content')">内容</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'start_date')" sortable @sort-change="sortChange($event, 'start_date')">开始时间</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'end_date')" sortable @sort-change="sortChange($event, 'end_date')">结束时间</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">发布者id</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">发布者</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'background_picture')" sortable @sort-change="sortChange($event, 'background_picture')">背景图片</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'place')" sortable @sort-change="sortChange($event, 'place')">地点</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'status')">活动状态</uni-th>
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'status')">活动状态</uni-th> -->
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'contact')" sortable @sort-change="sortChange($event, 'contact')">联系方式</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'invitee')" sortable @sort-change="sortChange($event, 'invitee')">面向对象</uni-th>
<uni-th align="center">操作</uni-th>
......@@ -38,12 +38,12 @@
<uni-td align="center">{{item.content}}</uni-td>
<uni-td align="center">{{item.start_date}}</uni-td>
<uni-td align="center">{{item.end_date}}</uni-td>
<uni-td align="center">{{item.owner_id}}</uni-td>
<uni-td align="center">{{item.owner_id[0].name}}</uni-td>
<uni-td align="center">
<image :src="item.background_picture" style="width: 120px; height: 80px;"></image>
</uni-td>
<uni-td align="center">{{item.place}}</uni-td>
<uni-td align="center">{{item.status}}</uni-td>
<!-- <uni-td align="center">{{item.status}}</uni-td> -->
<uni-td align="center">{{item.contact}}</uni-td>
<uni-td align="center">{{item.invitee}}</uni-td>
<uni-td align="center">
......@@ -68,7 +68,7 @@
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = [] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
const dbSearchFields = ['title', 'place'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
......@@ -81,7 +81,7 @@
export default {
data() {
return {
collectionList: "mustgo-school-activity",
collectionList: "mustgo-school-activity,mustgo-user",
query: '',
where: '',
orderby: dbOrderBy,
......
......@@ -19,9 +19,9 @@
<uni-forms-item name="place" label="地点">
<uni-easyinput placeholder="小队活动地点" v-model="formData.place"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="status" label="活动状态">
<!-- <uni-forms-item name="status" label="活动状态">
<uni-easyinput placeholder="小队活动状态" type="number" v-model="formData.status"></uni-easyinput>
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item name="participants" label="参与人数">
<uni-easyinput placeholder="小队活动参与人数" type="number" v-model="formData.participants"></uni-easyinput>
</uni-forms-item>
......
......@@ -19,9 +19,9 @@
<uni-forms-item name="place" label="地点">
<uni-easyinput placeholder="小队活动地点" v-model="formData.place"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="status" label="活动状态">
<!-- <uni-forms-item name="status" label="活动状态">
<uni-easyinput placeholder="小队活动状态" type="number" v-model="formData.status"></uni-easyinput>
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item name="participants" label="参与人数">
<uni-easyinput placeholder="小队活动参与人数" type="number" v-model="formData.participants"></uni-easyinput>
</uni-forms-item>
......
......@@ -10,9 +10,9 @@
<button class="uni-button" type="default" size="mini" @click="search">搜索</button>
<button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button>
<button class="uni-button" type="default" size="mini" :disabled="!selectedIndexs.length" @click="delTable">批量删除</button>
<download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<!-- <download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<button class="uni-button" type="primary" size="mini">导出 Excel</button>
</download-excel>
</download-excel> -->
</view>
</view>
<view class="uni-container">
......@@ -25,12 +25,12 @@
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'content')" sortable @sort-change="sortChange($event, 'content')">内容</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'start_date')" sortable @sort-change="sortChange($event, 'start_date')">开始时间</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'end_date')" sortable @sort-change="sortChange($event, 'end_date')">结束时间</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">发布者id</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">发布者</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'place')" sortable @sort-change="sortChange($event, 'place')">地点</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'status')">活动状态</uni-th>
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'status')">活动状态</uni-th> -->
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'participants')" sortable @sort-change="sortChange($event, 'participants')">参与人数</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'contact')" sortable @sort-change="sortChange($event, 'contact')">联系方式</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'team_id')">小队id</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'team_id')">小队</uni-th>
<uni-th align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item,index) in data" :key="index">
......@@ -38,12 +38,12 @@
<uni-td align="center">{{item.content}}</uni-td>
<uni-td align="center">{{item.start_date}}</uni-td>
<uni-td align="center">{{item.end_date}}</uni-td>
<uni-td align="center">{{item.owner_id}}</uni-td>
<uni-td align="center">{{item.owner_id[0].name}}</uni-td>
<uni-td align="center">{{item.place}}</uni-td>
<uni-td align="center">{{item.status}}</uni-td>
<!-- <uni-td align="center">{{item.status}}</uni-td> -->
<uni-td align="center">{{item.participants}}</uni-td>
<uni-td align="center">{{item.contact}}</uni-td>
<uni-td align="center">{{item.team_id}}</uni-td>
<uni-td align="center">{{item.team_id[0].name}}</uni-td>
<uni-td align="center">
<view class="uni-group">
<button @click="navigateTo('./edit?id='+item._id, false)" class="uni-button" size="mini" type="primary">修改</button>
......@@ -66,7 +66,7 @@
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = [] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
const dbSearchFields = ['owner_id.name', 'title', 'place'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
......@@ -79,7 +79,7 @@
export default {
data() {
return {
collectionList: "mustgo-team-activity",
collectionList: "mustgo-team-activity,mustgo-user,mustgo-team",
query: '',
where: '',
orderby: dbOrderBy,
......
......@@ -13,9 +13,9 @@
<uni-forms-item name="post_id" label="帖子id">
<uni-easyinput placeholder="帖子id" v-model="formData.post_id"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="check_status" label="状态">
<!-- <uni-forms-item name="check_status" label="状态">
<switch @change="binddata('check_status', $event.detail.value)" :checked="formData.check_status"></switch>
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item name="content" label="评论内容">
<uni-easyinput placeholder="评论内容" v-model="formData.content"></uni-easyinput>
</uni-forms-item>
......
......@@ -8,11 +8,11 @@
<view class="uni-group">
<input class="uni-search" type="text" v-model="query" @confirm="search" placeholder="请输入搜索内容" />
<button class="uni-button" type="default" size="mini" @click="search">搜索</button>
<button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button>
<!-- <button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button> -->
<button class="uni-button" type="default" size="mini" :disabled="!selectedIndexs.length" @click="delTable">批量删除</button>
<download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<!-- <download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<button class="uni-button" type="primary" size="mini">导出 Excel</button>
</download-excel>
</download-excel> -->
</view>
</view>
<view class="uni-container">
......@@ -21,20 +21,20 @@
v-slot:default="{data,pagination,loading,error,options}" :options="options" loadtime="manual" @load="onqueryload">
<uni-table ref="table" :loading="loading" :emptyText="error.message || '没有更多数据'" border stripe type="selection" @selection-change="selectionChange">
<uni-tr>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">评论人id</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">评论人</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'date')" sortable @sort-change="sortChange($event, 'date')">发布时间</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'likes')" sortable @sort-change="sortChange($event, 'likes')">点赞数</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'post_id')">帖子id</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'check_status')">状态</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'post_id')">帖子标题</uni-th>
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'check_status')">状态</uni-th> -->
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'content')" sortable @sort-change="sortChange($event, 'content')">评论内容</uni-th>
<uni-th align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item,index) in data" :key="index">
<uni-td align="center">{{item.owner_id}}</uni-td>
<uni-td align="center">{{item.owner_id[0].name}}</uni-td>
<uni-td align="center">{{item.date}}</uni-td>
<uni-td align="center">{{item.likes}}</uni-td>
<uni-td align="center">{{item.post_id}}</uni-td>
<uni-td align="center">{{item.check_status == true ? '' : ''}}</uni-td>
<uni-td align="center">{{item.post_id[0].content}}</uni-td>
<!-- <uni-td align="center">{{item.check_status == true ? '' : ''}}</uni-td> -->
<uni-td align="center">{{item.content}}</uni-td>
<uni-td align="center">
<view class="uni-group">
......@@ -58,7 +58,7 @@
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = [] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
const dbSearchFields = ['owner_id.name'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
......@@ -71,7 +71,7 @@
export default {
data() {
return {
collectionList: "mustgo-post-comment",
collectionList: "mustgo-post-comment,mustgo-user,mustgo-post",
query: '',
where: '',
orderby: dbOrderBy,
......
......@@ -13,15 +13,15 @@
<uni-forms-item name="owner_id" label="发帖人id">
<uni-easyinput placeholder="发帖人id" v-model="formData.owner_id"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="check_status" label="审核状态">
<!-- <uni-forms-item name="check_status" label="审核状态">
<switch @change="binddata('check_status', $event.detail.value)" :checked="formData.check_status"></switch>
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item name="comment_num" label="评论数">
<uni-easyinput placeholder="帖子评论数" type="number" v-model="formData.comment_num"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="url" label="图片url">
<!-- <uni-forms-item name="url" label="图片url">
<uni-data-checkbox :multiple="true" v-model="formData.url"></uni-data-checkbox>
</uni-forms-item>
</uni-forms-item> -->
<view class="uni-button-group">
<button type="primary" class="uni-button" style="width: 100px;" @click="submit">提交</button>
<navigator open-type="navigateBack" style="margin-left: 15px;">
......
......@@ -8,11 +8,11 @@
<view class="uni-group">
<input class="uni-search" type="text" v-model="query" @confirm="search" placeholder="请输入搜索内容" />
<button class="uni-button" type="default" size="mini" @click="search">搜索</button>
<button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button>
<!-- <button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button> -->
<button class="uni-button" type="default" size="mini" :disabled="!selectedIndexs.length" @click="delTable">批量删除</button>
<download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<!-- <download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<button class="uni-button" type="primary" size="mini">导出 Excel</button>
</download-excel>
</download-excel> -->
</view>
</view>
<view class="uni-container">
......@@ -24,8 +24,8 @@
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'content')" sortable @sort-change="sortChange($event, 'content')">内容</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'date')" sortable @sort-change="sortChange($event, 'date')">发布时间</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'likes')" sortable @sort-change="sortChange($event, 'likes')">点赞数</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">发帖人id</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'check_status')">审核状态</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">发帖人</uni-th>
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'check_status')">审核状态</uni-th> -->
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'comment_num')" sortable @sort-change="sortChange($event, 'comment_num')">评论数</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'url')">图片url</uni-th>
<uni-th align="center">操作</uni-th>
......@@ -34,8 +34,8 @@
<uni-td align="center">{{item.content}}</uni-td>
<uni-td align="center">{{item.date}}</uni-td>
<uni-td align="center">{{item.likes}}</uni-td>
<uni-td align="center">{{item.owner_id}}</uni-td>
<uni-td align="center">{{item.check_status == true ? '' : ''}}</uni-td>
<uni-td align="center">{{item.owner_id[0].name}}</uni-td>
<!-- <uni-td align="center">{{item.check_status == true ? '' : ''}}</uni-td> -->
<uni-td align="center">{{item.comment_num}}</uni-td>
<uni-td align="center">{{item.url}}</uni-td>
<uni-td align="center">
......@@ -60,7 +60,7 @@
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = [] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
const dbSearchFields = ['owner_id.name'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
......@@ -73,7 +73,7 @@
export default {
data() {
return {
collectionList: "mustgo-post",
collectionList: "mustgo-post,mustgo-user",
query: '',
where: '',
orderby: dbOrderBy,
......
......@@ -8,7 +8,7 @@
<uni-easyinput placeholder="运动持续时间" type="number" v-model="formData.duration"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="feelings" label="感受">
<uni-easyinput placeholder="运动感受" v-model="formData.feelings"></uni-easyinput>
<uni-easyinput placeholder="运动感受(good/normal/bad)" v-model="formData.feelings"/>
</uni-forms-item>
<uni-forms-item name="owner_id" label="用户id">
<uni-easyinput placeholder="用户id" v-model="formData.owner_id"></uni-easyinput>
......@@ -73,6 +73,11 @@
return {
formData,
formOptions: {},
feelings: [
"good",
"normal",
"bad"
],
rules: {
...getValidator(Object.keys(formData))
}
......
<template>
<view>
<view class="uni-header">
<view class="uni-group">
<view class="uni-title"></view>
<view class="uni-sub-title"></view>
</view>
<view class="uni-group">
<input class="uni-search" type="text" v-model="query" @confirm="search" placeholder="请输入搜索内容" />
<button class="uni-button" type="default" size="mini" @click="search">搜索</button>
<!-- <button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button> -->
<button class="uni-button" type="default" size="mini" :disabled="!selectedIndexs.length" @click="delTable">批量删除</button>
<download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<view>
<view class="uni-header">
<view class="uni-group">
<view class="uni-title"></view>
<view class="uni-sub-title"></view>
</view>
<view class="uni-group">
<input class="uni-search" type="text" v-model="query" @confirm="search" placeholder="请输入搜索内容" />
<button class="uni-button" type="default" size="mini" @click="search">搜索</button>
<!-- <button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button> -->
<button class="uni-button" type="default" size="mini" :disabled="!selectedIndexs.length"
@click="delTable">批量删除</button>
<!-- <download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<button class="uni-button" type="primary" size="mini">导出 Excel</button>
</download-excel>
</view>
</view>
<view class="uni-container">
<unicloud-db ref="udb" :collection="collectionList" field="start_date,duration,feelings,owner_id,distance,pace,path_line,start_point,end_point" :where="where" page-data="replace"
:orderby="orderby" :getcount="true" :page-size="options.pageSize" :page-current="options.pageCurrent"
v-slot:default="{data,pagination,loading,error,options}" :options="options" loadtime="manual" @load="onqueryload">
<uni-table ref="table" :loading="loading" :emptyText="error.message || '没有更多数据'" border stripe type="selection" @selection-change="selectionChange">
<uni-tr>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'start_date')" sortable @sort-change="sortChange($event, 'start_date')">开始时间</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'duration')" sortable @sort-change="sortChange($event, 'duration')">持续时间(秒)</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'feelings')" sortable @sort-change="sortChange($event, 'feelings')">感受</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">用户id</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'distance')" sortable @sort-change="sortChange($event, 'distance')">距离</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'pace')" sortable @sort-change="sortChange($event, 'pace')">配速</uni-th>
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'path_line')">路线</uni-th> -->
<uni-th align="center" sortable @sort-change="sortChange($event, 'start_point')">起始地点</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'end_point')">结束地点</uni-th>
<uni-th align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item,index) in data" :key="index">
<uni-td align="center">{{item.start_date}}</uni-td>
<uni-td align="center">{{item.duration}}</uni-td>
<uni-td align="center">{{item.feelings}}</uni-td>
<uni-td align="center">{{item.owner_id}}</uni-td>
<uni-td align="center">{{item.distance}}</uni-td>
<uni-td align="center">{{item.pace}}</uni-td>
<!-- <uni-td align="center">{{item.path_line}}</uni-td> -->
<uni-td align="center">{{item.start_point}}</uni-td>
<uni-td align="center">{{item.end_point}}</uni-td>
<uni-td align="center">
<view class="uni-group">
<button @click="navigateTo('./edit?id='+item._id, false)" class="uni-button" size="mini" type="primary">修改</button>
<button @click="confirmDelete(item._id)" class="uni-button" size="mini" type="warn">删除</button>
</view>
</uni-td>
</uni-tr>
</uni-table>
<view class="uni-pagination-box">
<uni-pagination show-icon :page-size="pagination.size" v-model="pagination.current" :total="pagination.count" @change="onPageChanged" />
</view>
</unicloud-db>
</view>
</view>
</download-excel> -->
</view>
</view>
<view class="uni-container">
<unicloud-db ref="udb" :collection="collectionList"
field="start_date,duration,feelings,owner_id,distance,pace,path_line,start_point,end_point"
:where="where" page-data="replace" :orderby="orderby" :getcount="true" :page-size="options.pageSize"
:page-current="options.pageCurrent" v-slot:default="{data,pagination,loading,error,options}"
:options="options" loadtime="manual" @load="onqueryload">
<uni-table ref="table" :loading="loading" :emptyText="error.message || '没有更多数据'" border stripe
type="selection" @selection-change="selectionChange">
<uni-tr>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'start_date')"
sortable @sort-change="sortChange($event, 'start_date')">开始时间</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'duration')"
sortable @sort-change="sortChange($event, 'duration')">持续时间(秒)</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'feelings')"
sortable @sort-change="sortChange($event, 'feelings')">感受</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">用户</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'distance')"
sortable @sort-change="sortChange($event, 'distance')">距离</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'pace')"
sortable @sort-change="sortChange($event, 'pace')">配速</uni-th>
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'path_line')">路线</uni-th> -->
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'start_point')">起始地点</uni-th> -->
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'end_point')">结束地点</uni-th> -->
<uni-th align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item,index) in data" :key="index">
<uni-td align="center">{{item.start_date}}</uni-td>
<uni-td align="center">{{item.duration}}</uni-td>
<uni-td align="center">{{item.feelings}}</uni-td>
<uni-td align="center">{{item.owner_id[0].name}}</uni-td>
<uni-td align="center">{{item.distance}}</uni-td>
<uni-td align="center">{{item.pace}}</uni-td>
<!-- <uni-td align="center">{{item.path_line}}</uni-td> -->
<!-- <uni-td align="center">{{item.start_point}}</uni-td> -->
<!-- <uni-td align="center">{{item.end_point}}</uni-td> -->
<uni-td align="center">
<view class="uni-group">
<button @click="navigateTo('./edit?id='+item._id, false)" class="uni-button" size="mini"
type="primary">修改</button>
<button @click="confirmDelete(item._id)" class="uni-button" size="mini"
type="warn">删除</button>
</view>
</uni-td>
</uni-tr>
</uni-table>
<view class="uni-pagination-box">
<uni-pagination show-icon :page-size="pagination.size" v-model="pagination.current"
:total="pagination.count" @change="onPageChanged" />
</view>
</unicloud-db>
</view>
</view>
</template>
<script>
import { enumConverter, filterToWhere } from '../../../../js_sdk/validator/mustgo-running-record.js';
import {
enumConverter,
filterToWhere
} from '../../../../js_sdk/validator/mustgo-running-record.js';
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = [] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = ['owner_id.name'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
const orderByMapping = {
"ascending": "asc",
"descending": "desc"
}
const orderByMapping = {
"ascending": "asc",
"descending": "desc"
}
export default {
data() {
return {
collectionList: "mustgo-running-record",
query: '',
where: '',
orderby: dbOrderBy,
orderByFieldName: "",
selectedIndexs: [],
options: {
pageSize,
pageCurrent,
filterData: {},
...enumConverter
},
imageStyles: {
width: 64,
height: 64
},
exportExcel: {
"filename": "mustgo-running-record.xls",
"type": "xls",
"fields": {
"开始时间": "start_date",
"持续时间": "duration",
"感受": "feelings",
"用户id": "owner_id",
"距离": "distance",
"配速": "pace",
"路线": "path_line",
"起始地点": "start_point",
"结束地点": "end_point"
}
},
exportExcelData: []
}
},
onLoad() {
this._filter = {}
},
onReady() {
this.$refs.udb.loadData()
},
methods: {
onqueryload(data) {
this.exportExcelData = data
},
getWhere() {
const query = this.query.trim()
if (!query) {
return ''
}
const queryRe = new RegExp(query, 'i')
return dbSearchFields.map(name => queryRe + '.test(' + name + ')').join(' || ')
},
search() {
const newWhere = this.getWhere()
this.where = newWhere
this.$nextTick(() => {
this.loadData()
})
},
loadData(clear = true) {
this.$refs.udb.loadData({
clear
})
},
onPageChanged(e) {
this.selectedIndexs.length = 0
this.$refs.table.clearSelection()
this.$refs.udb.loadData({
current: e.current
})
},
navigateTo(url, clear) {
// clear 表示刷新列表时是否清除页码,true 表示刷新并回到列表第 1 页,默认为 true
uni.navigateTo({
url,
events: {
refreshData: () => {
this.loadData(clear)
}
}
})
},
// 多选处理
selectedItems() {
var dataList = this.$refs.udb.dataList
return this.selectedIndexs.map(i => dataList[i]._id)
},
// 批量删除
delTable() {
this.$refs.udb.remove(this.selectedItems(), {
success:(res) => {
this.$refs.table.clearSelection()
}
})
},
// 多选
selectionChange(e) {
this.selectedIndexs = e.detail.index
},
confirmDelete(id) {
this.$refs.udb.remove(id, {
success:(res) => {
this.$refs.table.clearSelection()
}
})
},
sortChange(e, name) {
this.orderByFieldName = name;
if (e.order) {
this.orderby = name + ' ' + orderByMapping[e.order]
} else {
this.orderby = ''
}
this.$refs.table.clearSelection()
this.$nextTick(() => {
this.$refs.udb.loadData()
})
},
filterChange(e, name) {
this._filter[name] = {
type: e.filterType,
value: e.filter
}
let newWhere = filterToWhere(this._filter, db.command)
if (Object.keys(newWhere).length) {
this.where = newWhere
} else {
this.where = ''
}
this.$nextTick(() => {
this.$refs.udb.loadData()
})
}
}
}
export default {
data() {
return {
collectionList: "mustgo-running-record,mustgo-user",
query: '',
where: '',
orderby: dbOrderBy,
orderByFieldName: "",
selectedIndexs: [],
options: {
pageSize,
pageCurrent,
filterData: {},
...enumConverter
},
imageStyles: {
width: 64,
height: 64
},
feelings: [{
text: '优秀',
value: 'good'
},
{
text: '一般',
value: 'normal',
},
{
text: '',
value: 'bad',
}
],
exportExcel: {
"filename": "mustgo-running-record.xls",
"type": "xls",
"fields": {
"开始时间": "start_date",
"持续时间": "duration",
"感受": "feelings",
"用户id": "owner_id",
"距离": "distance",
"配速": "pace",
"路线": "path_line",
"起始地点": "start_point",
"结束地点": "end_point"
}
},
exportExcelData: []
}
},
onLoad() {
this._filter = {}
},
onReady() {
this.$refs.udb.loadData()
},
methods: {
onqueryload(data) {
this.exportExcelData = data
},
getWhere() {
const query = this.query.trim()
if (!query) {
return ''
}
const queryRe = new RegExp(query, 'i')
return dbSearchFields.map(name => queryRe + '.test(' + name + ')').join(' || ')
},
search() {
const newWhere = this.getWhere()
this.where = newWhere
this.$nextTick(() => {
this.loadData()
})
},
loadData(clear = true) {
this.$refs.udb.loadData({
clear
})
},
onPageChanged(e) {
this.selectedIndexs.length = 0
this.$refs.table.clearSelection()
this.$refs.udb.loadData({
current: e.current
})
},
navigateTo(url, clear) {
// clear 表示刷新列表时是否清除页码,true 表示刷新并回到列表第 1 页,默认为 true
uni.navigateTo({
url,
events: {
refreshData: () => {
this.loadData(clear)
}
}
})
},
// 多选处理
selectedItems() {
var dataList = this.$refs.udb.dataList
return this.selectedIndexs.map(i => dataList[i]._id)
},
// 批量删除
delTable() {
this.$refs.udb.remove(this.selectedItems(), {
success: (res) => {
this.$refs.table.clearSelection()
}
})
},
// 多选
selectionChange(e) {
this.selectedIndexs = e.detail.index
},
confirmDelete(id) {
this.$refs.udb.remove(id, {
success: (res) => {
this.$refs.table.clearSelection()
}
})
},
sortChange(e, name) {
this.orderByFieldName = name;
if (e.order) {
this.orderby = name + ' ' + orderByMapping[e.order]
} else {
this.orderby = ''
}
this.$refs.table.clearSelection()
this.$nextTick(() => {
this.$refs.udb.loadData()
})
},
filterChange(e, name) {
this._filter[name] = {
type: e.filterType,
value: e.filter
}
let newWhere = filterToWhere(this._filter, db.command)
if (Object.keys(newWhere).length) {
this.where = newWhere
} else {
this.where = ''
}
this.$nextTick(() => {
this.$refs.udb.loadData()
})
}
}
}
</script>
<style>
</style>
</style>
\ No newline at end of file
......@@ -8,7 +8,7 @@
<uni-easyinput placeholder="运动持续时间" type="number" v-model="formData.duration"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="feelings" label="感受">
<uni-easyinput placeholder="运动感受" v-model="formData.feelings"></uni-easyinput>
<uni-easyinput placeholder="运动感受(good/normal/bad)" v-model="formData.feelings"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="owner_id" label="用户id">
<uni-easyinput placeholder="用户id" v-model="formData.owner_id"></uni-easyinput>
......
......@@ -10,9 +10,9 @@
<button class="uni-button" type="default" size="mini" @click="search">搜索</button>
<!-- <button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button> -->
<button class="uni-button" type="default" size="mini" :disabled="!selectedIndexs.length" @click="delTable">批量删除</button>
<download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<!-- <download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<button class="uni-button" type="primary" size="mini">导出 Excel</button>
</download-excel>
</download-excel> -->
</view>
</view>
<view class="uni-container">
......@@ -24,11 +24,11 @@
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'start_date')" sortable @sort-change="sortChange($event, 'start_date')">开始时间</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'duration')" sortable @sort-change="sortChange($event, 'duration')">持续时间</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'feelings')" sortable @sort-change="sortChange($event, 'feelings')">感受</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">用户id</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">用户</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'distance')" sortable @sort-change="sortChange($event, 'distance')">距离</uni-th>
<uni-th align="center" filter-type="range" @filter-change="filterChange($event, 'pace')" sortable @sort-change="sortChange($event, 'pace')">配速</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'start_point')">起始地点</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'end_point')">结束地点</uni-th>
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'start_point')">起始地点</uni-th> -->
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'end_point')">结束地点</uni-th> -->
<!-- <uni-th align="center" sortable @sort-change="sortChange($event, 'path_line')">路线</uni-th> -->
<uni-th align="center">操作</uni-th>
</uni-tr>
......@@ -36,11 +36,11 @@
<uni-td align="center">{{item.start_date}}</uni-td>
<uni-td align="center">{{item.duration}}</uni-td>
<uni-td align="center">{{item.feelings}}</uni-td>
<uni-td align="center">{{item.owner_id}}</uni-td>
<uni-td align="center">{{item.owner_id[0].name}}</uni-td>
<uni-td align="center">{{item.distance}}</uni-td>
<uni-td align="center">{{item.pace}}</uni-td>
<uni-td align="center">{{item.start_point}}</uni-td>
<uni-td align="center">{{item.end_point}}</uni-td>
<!-- <uni-td align="center">{{item.start_point}}</uni-td> -->
<!-- <uni-td align="center">{{item.end_point}}</uni-td> -->
<!-- <uni-td align="center">{{item.path_line}}</uni-td> -->
<uni-td align="center">
<view class="uni-group">
......@@ -64,7 +64,7 @@
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = [] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
const dbSearchFields = ['owner_id.name'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
......@@ -77,7 +77,7 @@
export default {
data() {
return {
collectionList: "mustgo-walking-record",
collectionList: "mustgo-walking-record,mustgo-user",
query: '',
where: '',
orderby: dbOrderBy,
......
......@@ -8,11 +8,11 @@
<view class="uni-group">
<input class="uni-search" type="text" v-model="query" @confirm="search" placeholder="请输入搜索内容" />
<button class="uni-button" type="default" size="mini" @click="search">搜索</button>
<button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button>
<!-- <button class="uni-button" type="default" size="mini" @click="navigateTo('./add')">新增</button> -->
<button class="uni-button" type="default" size="mini" :disabled="!selectedIndexs.length" @click="delTable">批量删除</button>
<download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<!-- <download-excel class="hide-on-phone" :fields="exportExcel.fields" :data="exportExcelData" :type="exportExcel.type" :name="exportExcel.filename">
<button class="uni-button" type="primary" size="mini">导出 Excel</button>
</download-excel>
</download-excel> -->
</view>
</view>
<view class="uni-container">
......@@ -23,14 +23,14 @@
<uni-tr>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'icon')" sortable @sort-change="sortChange($event, 'icon')">队标</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'name')" sortable @sort-change="sortChange($event, 'name')">队名</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">发起人id</uni-th>
<uni-th align="center" sortable @sort-change="sortChange($event, 'owner_id')">发起人</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'description')" sortable @sort-change="sortChange($event, 'description')">描述</uni-th>
<uni-th align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item,index) in data" :key="index">
<uni-td align="center"><image :src="item.icon" style="width: 120px; height: 80px;"></image></uni-td>
<uni-td align="center">{{item.name}}</uni-td>
<uni-td align="center">{{item.owner_id}}</uni-td>
<uni-td align="center">{{item.owner_id[0].name}}</uni-td>
<uni-td align="center">{{item.description}}</uni-td>
<uni-td align="center">
<view class="uni-group">
......@@ -54,7 +54,7 @@
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = [] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
const dbSearchFields = ['name', 'owner_id.name'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
......@@ -67,7 +67,7 @@
export default {
data() {
return {
collectionList: "mustgo-team",
collectionList: "mustgo-team,mustgo-user",
query: '',
where: '',
orderby: dbOrderBy,
......
......@@ -8,7 +8,8 @@
<image :src="formData.icon" style="width: 120px; height: 80px;"></image>
</uni-forms-item>
<uni-forms-item name="gender" label="性别">
<uni-easyinput v-model="formData.gender"></uni-easyinput>
<uni-data-checkbox :localdata="genders" v-model="formData.gender" />
<!-- <uni-easyinput v-model="formData.gender"></uni-easyinput> -->
</uni-forms-item>
<uni-forms-item name="password" label="密码">
<uni-easyinput v-model="formData.password"></uni-easyinput>
......@@ -23,7 +24,8 @@
<uni-easyinput v-model="formData.school"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="type" label="人员">
<uni-easyinput v-model="formData.type"></uni-easyinput>
<uni-data-checkbox :localdata="types" v-model="formData.type" />
<!-- <uni-easyinput v-model="formData.type"></uni-easyinput> -->
</uni-forms-item>
<uni-forms-item name="total_running_distance" label="跑步总距离">
<uni-easyinput type="number" v-model="formData.total_running_distance"></uni-easyinput>
......@@ -64,7 +66,7 @@
data() {
let formData = {
"name": "",
"icon": "https://mp-6f6feaec-a026-4402-8e8d-18f7572890da.cdn.bspapp.com/cloudstorage/0510a534-dd8d-41f0-8341-601aa677e243.jpg",
"icon": "",
"gender": "",
"password": "",
"phone_num": "",
......@@ -78,6 +80,14 @@
// icon: [
// ],
genders: [
{text: '', value: ''},
{text: '', value: ''}
],
types: [
{text: '学生', value: '644a64c228064a7587cd79bf'},
{text: '老师', value: '644a64d2e766bb0085e6048e'}
],
formData,
formOptions: {},
rules: {
......@@ -95,11 +105,6 @@
onReady() {
this.$refs.form.setRules(this.rules)
},
// watch: {
// icon(newIcon, oldIcon) {
// this.formData.icon = newIcon[0].url
// }
// },
methods: {
/**
* 验证表单并提交
......
......@@ -37,6 +37,9 @@
sortable @sort-change="sortChange($event, 'phone_num')">手机号</uni-th>
<uni-th align="center" filter-type="search" @filter-change="filterChange($event, 'school')"
sortable @sort-change="sortChange($event, 'school')">学校</uni-th>
<uni-th align="center" filter-type="search"
@filter-change="filterChange($event, 'team_id[0].name')"
sortable @sort-change="sortChange($event, 'team_id[0].name')">小队</uni-th>
<uni-th align="center" filter-type="search"
@filter-change="filterChange($event, 'type[0].identity')" sortable
@sort-change="sortChange($event, 'type[0].identity')">身份</uni-th>
......@@ -58,6 +61,7 @@
<uni-td align="center">{{item.password}}</uni-td>
<uni-td align="center">{{item.phone_num}}</uni-td>
<uni-td align="center">{{item.school}}</uni-td>
<uni-td align="center">{{item.team_id[0].name}}</uni-td>
<uni-td align="center">{{item.type[0].identity}}</uni-td>
<uni-td align="center">{{item.total_running_distance}} km</uni-td>
<uni-td align="center">{{item.total_walking_distance}} km</uni-td>
......@@ -88,22 +92,10 @@
filterToWhere
} from '../../../js_sdk/validator/mustgo-user.js';
// uniCloud.callFunction({
// name: 'fe-sport-feelings',
// data: {
// type: '跑步',
// id: '6453ab9e28064a7587271ea6',
// feeling: 'gggggooooooddddd'
// }
// })
// .then(res => {
// console.log(res)
// })
const db = uniCloud.database()
// 表查询配置
const dbOrderBy = '' // 排序字段
const dbSearchFields = ['name', '_id', 'phone_num'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
const dbSearchFields = ['name', '_id', 'phone_num', 'team_id.name'] // 模糊搜索字段,支持模糊搜索的字段列表。联表查询格式: 主表字段名.副表字段名,例如用户表关联角色表 role.role_name
// 分页配置
const pageSize = 20
const pageCurrent = 1
......@@ -116,7 +108,7 @@
export default {
data() {
return {
collectionList: "mustgo-user,mustgo-role",
collectionList: "mustgo-user,mustgo-role,mustgo-team",
query: '',
where: '',
orderby: dbOrderBy,
......@@ -135,7 +127,16 @@
exportExcel: {
"filename": "mustgo-user.xls",
"type": "xls",
"fields": {}
"fields": {
"用户名": "name",
"头像": "icon",
"性别": "gender",
"手机号": "phone_num",
"学校": "school",
"人员": "type",
"跑步总距离": "total_running_distance",
"健走总距离": "total_walking_distance"
}
},
exportExcelData: []
}
......
......@@ -37,7 +37,8 @@ const deviceFeildsMap = [{
// }
]
const userFeildsMap = [{
const userFeildsMap = [
{
value: '今天',
contrast: '昨天'
}, {
......
'use strict';
exports.main = async (event, context) => {
const db = uniCloud.database()
const collection = db.collection('mustgo-verify-code')
const res = await collection.remove()
console.log('remove all')
};
{
"name": "fe-clear",
"dependencies": {},
"extensions": {
"uni-cloud-jql": {}
}
}
\ No newline at end of file
......@@ -26,7 +26,7 @@ exports.main = async (event, context) => {
password: event.password,
phone_num: event.phone,
team_id: "",
icon: "https://mp-6f6feaec-a026-4402-8e8d-18f7572890da.cdn.bspapp.com/cloudstorage/0510a534-dd8d-41f0-8341-601aa677e243.jpg",
icon: "https://mp-6f6feaec-a026-4402-8e8d-18f7572890da.cdn.bspapp.com/cloudstorage/433d3cc6-4b8f-475c-83e1-35acc747cab2.jpg",
school: event.school,
type: "644a64c228064a7587cd79bf",
total_running_distance: 0,
......
......@@ -2,6 +2,6 @@
// 配置教程参考:https://uniapp.dcloud.net.cn/uniCloud/rundebug.html#runparam
{
"type": "跑步",
"id": "6453ab9e28064a7587271ea6",
"feeling": "demodemodemdoe"
"id": "645b8a67e1a35c371b015038",
"feeling": "good"
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ const uniStat = require('uni-stat')
const uniID = require('uni-id-common')
module.exports = {
report: async function (params = {}) {
//客户端信息
//客户端信息
const clientInfo = this.getClientInfo()
//云服务信息
const cloudInfo = this.getCloudInfo()
......
......@@ -9,7 +9,7 @@
<uni-forms>
<uni-forms-item name="username">
<uni-easyinput :focus="focusUsername" @blur="focusUsername = false" class="input-box"
:inputBorder="false" v-model="username" placeholder="请输入手机号/用户名/邮箱" />
:inputBorder="false" v-model="username" placeholder="请输入帐号" />
</uni-forms-item>
<uni-forms-item name="password">
<uni-easyinput :focus="focusPassword" @blur="focusPassword = false" class="input-box" clearable
......
......@@ -6,7 +6,7 @@
<image :src="logo"></image>
</view>
<!-- 顶部文字 -->
<text class="title title-box">创建超级管理员</text>
<text class="title title-box">创建超级管理员(只能创建一个)</text>
</match-media>
<uni-forms ref="form" :value="formData" :rules="rules" validate-trigger="submit" err-show-type="toast">
<uni-forms-item name="username" required>
......
.icon-modal-box[data-v-0479b821]{padding-top:var(--top-window-height)}.icon-modal[data-v-0479b821]{width:350px;background-color:#fff;height:500px;overflow-y:scroll}@media screen and (min-width: 768px){.icon-modal-pc[data-v-0479b821]{width:600px}}[data-v-0479b821] .uni-forms-item__label{width:90px!important}
.title_padding[data-v-adb2730c]{padding-bottom:15px;display:block}.font_bold[data-v-adb2730c]{font-weight:700}.uni-button-group uni-button[data-v-adb2730c]{margin-left:15px}.uni-button-group uni-button[data-v-adb2730c]:first-child{margin-left:0}[data-v-adb2730c] .forn-item__flex .uni-forms-item__content{display:flex;align-items:center}[data-v-adb2730c] .forn-item__flex .uni-forms-item__content .custom-button{height:100%;margin-left:.3125rem;line-height:36px}[data-v-adb2730c] .uni-card{padding:0!important;cursor:auto}[data-v-adb2730c] .uni-card__header{background-color:#eee}[data-v-adb2730c] .uni-card__header-title-text{font-weight:700}.extra-button[data-v-adb2730c]{display:flex;align-items:center;margin-bottom:15px}.extra-button uni-button[data-v-adb2730c]{margin:0}.flex-center-r[data-v-adb2730c]{display:flex;align-items:center;justify-content:center}.tip[data-v-adb2730c]{display:flex;flex-direction:column;align-items:flex-start;background-color:#f3f5f7;color:#2c3e50;padding:10px;font-size:1rem;border-color:#e96900;border-left-width:8px;border-left-style:solid}.tip uni-text[data-v-adb2730c]{margin-right:15px}.tip .custom-button[data-v-adb2730c]{margin-left:0}.popup-content[data-v-adb2730c]{padding:.9375rem}[data-v-adb2730c] .uni-file-picker__files{max-width:100%}
[data-v-0c01ac2c] .uni-forms-item__label{width:90px!important}
.uni-numbox[data-v-0f576b9a]{display:flex;flex-direction:row}.uni-numbox-btns[data-v-0f576b9a]{display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 8px;background-color:#f5f5f5;cursor:pointer}.uni-numbox__value[data-v-0f576b9a]{margin:0 2px;background-color:#f5f5f5;width:40px;height:26px;text-align:center;font-size:14px;border-left-width:0;border-right-width:0;color:#333}.uni-numbox__minus[data-v-0f576b9a]{border-top-left-radius:2px;border-bottom-left-radius:2px}.uni-numbox__plus[data-v-0f576b9a]{border-top-right-radius:2px;border-bottom-right-radius:2px}.uni-numbox--text[data-v-0f576b9a]{line-height:20px;font-size:20px;font-weight:300;color:#333}.uni-numbox .uni-numbox--disabled[data-v-0f576b9a]{color:silver!important;cursor:not-allowed}
[data-v-f03a568c] .uni-forms-item__label{width:90px!important}
[data-v-b471f01c] .uni-forms-item__content{display:flex;align-items:center}.uni-button-group uni-button[data-v-b471f01c]{margin-left:15px}.uni-button-group uni-button[data-v-b471f01c]:first-child{margin-left:0}.title_padding[data-v-b471f01c]{padding-bottom:15px;display:block}[data-v-b471f01c] .uni-file-picker__files{max-width:100%}
[data-v-7d77b006] .uni-forms-item__label{width:90px!important}
.flex-between[data-v-5e849582]{margin-bottom:10px;display:flex;justify-content:space-between;align-items:center}.uni-stat-panel[data-v-5e849582]{box-shadow:unset;border-bottom:1px solid #eee;padding:0;margin:0 15px}.uni-stat-tooltip-s[data-v-5e849582]{width:160px;white-space:normal}
.input-box[data-v-8ad2d767] .uni-input-input[type=password]::-ms-reveal{display:none}.uni-content[data-v-8ad2d767]{padding:0 1.875rem}.login-logo[data-v-8ad2d767]{display:none}@media screen and (min-width: 690px){.uni-content[data-v-8ad2d767]{margin:0 auto;position:relative;top:100px;padding:30px 40px 80px;max-width:450px;max-height:450px;border-radius:10px;box-shadow:0 0 20px #efefef;background-color:#fff}.login-logo[data-v-8ad2d767]{display:flex;justify-content:center}.login-logo uni-image[data-v-8ad2d767]{width:60px;height:60px}.register-back[data-v-8ad2d767]{display:none}uni-button[data-v-8ad2d767]{padding-bottom:1px}}.uni-content uni-view[data-v-8ad2d767]{box-sizing:border-box}.title[data-v-8ad2d767]{display:flex;padding:18px 0;font-weight:800;flex-direction:column}.tip[data-v-8ad2d767]{display:flex;color:#bdbdc0;font-size:11px;margin:6px 0}.uni-content[data-v-8ad2d767] .uni-easyinput__content,.input-box[data-v-8ad2d767]{height:44px;background-color:#f8f8f8!important;border-radius:0;font-size:14px;display:flex;flex:1}.link[data-v-8ad2d767]{color:#04498c;cursor:pointer}.uni-content[data-v-8ad2d767] .uni-forms-item__inner{padding-bottom:8px}.uni-btn[data-v-8ad2d767]{text-align:center;height:40px;line-height:40px;margin:15px 0 10px;color:#fff!important;border-radius:5px;font-size:16px}.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd[data-v-8ad2d767]{height:auto!important}.uni-content[data-v-8ad2d767]{padding:0;align-items:center;justify-content:center;padding:1.5625rem;padding-top:10px}@media screen and (min-width: 690px){.uni-content[data-v-8ad2d767]{padding:30px 40px 40px}}.input-box[data-v-8ad2d767]{width:100%;margin-top:16px;background-color:#f9f9f9;border-radius:.1875rem;flex-direction:row;flex-wrap:nowrap;margin-bottom:10px}.send-btn-box[data-v-8ad2d767]{margin-top:15px}
.input-box[data-v-310f3ac4] .uni-input-input[type=password]::-ms-reveal{display:none}.uni-content[data-v-310f3ac4]{padding:0 1.875rem}.login-logo[data-v-310f3ac4]{display:none}@media screen and (min-width: 690px){.uni-content[data-v-310f3ac4]{margin:0 auto;position:relative;top:100px;padding:30px 40px 80px;max-width:450px;max-height:450px;border-radius:10px;box-shadow:0 0 20px #efefef;background-color:#fff}.login-logo[data-v-310f3ac4]{display:flex;justify-content:center}.login-logo uni-image[data-v-310f3ac4]{width:60px;height:60px}.register-back[data-v-310f3ac4]{display:none}uni-button[data-v-310f3ac4]{padding-bottom:1px}}.uni-content uni-view[data-v-310f3ac4]{box-sizing:border-box}.title[data-v-310f3ac4]{display:flex;padding:18px 0;font-weight:800;flex-direction:column}.tip[data-v-310f3ac4]{display:flex;color:#bdbdc0;font-size:11px;margin:6px 0}.uni-content[data-v-310f3ac4] .uni-easyinput__content,.input-box[data-v-310f3ac4]{height:44px;background-color:#f8f8f8!important;border-radius:0;font-size:14px;display:flex;flex:1}.link[data-v-310f3ac4]{color:#04498c;cursor:pointer}.uni-content[data-v-310f3ac4] .uni-forms-item__inner{padding-bottom:8px}.uni-btn[data-v-310f3ac4]{text-align:center;height:40px;line-height:40px;margin:15px 0 10px;color:#fff!important;border-radius:5px;font-size:16px}.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd[data-v-310f3ac4]{height:auto!important}@media screen and (max-width: 690px){.uni-content[data-v-310f3ac4]{margin-top:15px}}@media screen and (min-width: 690px){.uni-content[data-v-310f3ac4]{padding:30px 40px 40px}}
.uni-stat-panel[data-v-186a4fb4]{box-shadow:unset;border-bottom:1px solid #eee;padding:0;margin:0 15px}.uni-stat-edit--x[data-v-186a4fb4]{display:flex;justify-content:space-between}.uni-stat-edit--btn[data-v-186a4fb4]{cursor:pointer}
.uni-charts-box1[data-v-edc2efa9]{padding:10px;height:420px}
.uni-charts-box1[data-v-8bf93566]{padding:10px;height:420px}
.flex-auto[data-v-592a86cd]{flex:auto}.bg-transparent[data-v-592a86cd]{background-color:rgba(0,0,0,.9);transition-duration:.35s}.l-clipper[data-v-592a86cd]{width:100vw;height:calc(100vh - var(--window-top));background-color:rgba(0,0,0,.9);position:fixed;top:var(--window-top);left:0;z-index:1}.l-clipper-mask[data-v-592a86cd]{position:relative;z-index:2;pointer-events:none}.l-clipper__content[data-v-592a86cd]{pointer-events:none;position:absolute;border:.03125rem solid rgba(255,255,255,.3);box-sizing:border-box;box-shadow:rgba(0,0,0,.5) 0 0 0 80vh;background:transparent}.l-clipper__content[data-v-592a86cd]:before,.l-clipper__content[data-v-592a86cd]:after{content:"";position:absolute;border:.03125rem dashed rgba(255,255,255,.3)}.l-clipper__content[data-v-592a86cd]:before{width:100%;top:33.33%;height:33.33%;border-left:none;border-right:none}.l-clipper__content[data-v-592a86cd]:after{width:33.33%;left:33.33%;height:100%;border-top:none;border-bottom:none}.l-clipper__edge[data-v-592a86cd]{position:absolute;width:1.0625rem;height:1.0625rem;border:.1875rem solid #fff;pointer-events:auto}.l-clipper__edge[data-v-592a86cd]:before{content:"";position:absolute;width:1.25rem;height:1.25rem;background-color:transparent}.l-clipper__edge[data-v-592a86cd]:nth-child(1){left:-.1875rem;top:-.1875rem;border-bottom-width:0!important;border-right-width:0!important}.l-clipper__edge[data-v-592a86cd]:nth-child(1):before{top:-50%;left:-50%}.l-clipper__edge[data-v-592a86cd]:nth-child(2){right:-.1875rem;top:-.1875rem;border-bottom-width:0!important;border-left-width:0!important}.l-clipper__edge[data-v-592a86cd]:nth-child(2):before{top:-50%;left:50%}.l-clipper__edge[data-v-592a86cd]:nth-child(3){left:-.1875rem;bottom:-.1875rem;border-top-width:0!important;border-right-width:0!important}.l-clipper__edge[data-v-592a86cd]:nth-child(3):before{bottom:-50%;left:-50%}.l-clipper__edge[data-v-592a86cd]:nth-child(4){right:-.1875rem;bottom:-.1875rem;border-top-width:0!important;border-left-width:0!important}.l-clipper__edge[data-v-592a86cd]:nth-child(4):before{bottom:-50%;left:50%}.l-clipper-image[data-v-592a86cd]{width:100%;border-style:none;position:absolute;top:0;left:0;z-index:1;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-origin:center}.l-clipper-canvas[data-v-592a86cd]{position:fixed;z-index:10;left:-200vw;top:-200vw;pointer-events:none}.l-clipper-tools[data-v-592a86cd]{position:fixed;left:0;bottom:10px;width:100%;z-index:99;color:#fff}.l-clipper-tools__btns[data-v-592a86cd]{font-weight:700;display:flex;align-items:center;justify-content:space-between;width:100%;padding:.625rem 1.25rem;box-sizing:border-box}.l-clipper-tools__btns .cancel[data-v-592a86cd]{width:3.5rem;height:1.875rem;text-align:center;line-height:1.875rem}.l-clipper-tools__btns .confirm[data-v-592a86cd]{width:3.5rem;height:1.875rem;line-height:1.875rem;background-color:#07c160;border-radius:.1875rem;text-align:center}.l-clipper-tools__btns uni-image[data-v-592a86cd]{display:block;width:1.875rem;height:1.875rem}.l-clipper-tools__btns[data-v-592a86cd]{flex-direction:row}.box[data-v-c2c356f4]{width:12.5rem}.mt[data-v-c2c356f4]{margin-top:-10px}
.uni-content[data-v-3b80a2de]{display:flex;flex-direction:column;font-size:.875rem}.words[data-v-3b80a2de]{padding:0 .8125rem;line-height:1.4375rem;margin-top:.625rem;margin-bottom:80px}.button-group uni-button[data-v-3b80a2de]{border-radius:100px;border:none;width:9.375rem;height:42px;line-height:42px;font-size:1rem}.button-group uni-button[data-v-3b80a2de]:after{border:none}.button-group uni-button.next[data-v-3b80a2de]{color:#e64340;border:solid 1px #e64340}.button-group[data-v-3b80a2de]{display:flex;flex-direction:row;position:fixed;height:50px;bottom:10px;width:23.4375rem;justify-content:center;align-items:center;border-top:solid 1px #e4e6ec;padding-top:10px;background-color:#fff;max-width:690px}@media screen and (min-width: 690px){.uni-content[data-v-3b80a2de]{max-width:690px;margin-left:calc(50% - 345px)}}
.show-stable-info[data-v-f2716d1e]{position:absolute;left:165px;padding:5px 10px;background-color:#f4f4f5;color:#909399;border-radius:4px;border:1px solid #e9e9eb}[data-v-f2716d1e] .uni-forms-item__content{display:flex;align-items:center}.uni-button-group uni-button[data-v-f2716d1e]{margin-left:15px}.uni-button-group uni-button[data-v-f2716d1e]:first-child{margin-left:0}
.uni-stat-panel[data-v-d581af0c]{box-shadow:unset;border-bottom:1px solid #eee;padding:0;margin:0 15px}
import{_ as e,o as t,e as o,C as a,d as n,t as r}from"./index-389238f5.js";function s(e,t,o){var a,n,r=window,i="application/octet-stream",l=o||i,d=e,c=!t&&!o&&d,h=document.createElement("a"),u=function(e){return String(e)},p=r.Blob||r.MozBlob||r.WebKitBlob||u,f=t||"download";if(p=p.call?p.bind(r):Blob,"true"===String(this)&&(l=(d=[d,l])[0],d=d[1]),c&&c.length<2048&&(f=c.split("/").pop().split("?")[0],h.href=c,-1!==h.href.indexOf(c))){var m=new XMLHttpRequest;return m.open("GET",c,!0),m.responseType="blob",m.onload=function(e){s(e.target.response,f,i)},setTimeout((function(){m.send()}),0),m}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(d)){if(!(d.length>2096103.424&&p!==u))return navigator.msSaveBlob?navigator.msSaveBlob(x(d),f):w(d);l=(d=x(d)).type||i}else if(/([\x80-\xff])/.test(d)){for(var y=0,b=new Uint8Array(d.length),g=b.length;y<g;++y)b[y]=d.charCodeAt(y);d=new p([b],{type:l})}function x(e){for(var t=e.split(/[:;,]/),o=t[1],a=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),n=a.length,r=0,s=new Uint8Array(n);r<n;++r)s[r]=a.charCodeAt(r);return new p([s],{type:o})}function w(e,t){if("download"in h)return h.href=e,h.setAttribute("download",f),h.className="download-js-link",h.innerHTML="downloading...",h.style.display="none",document.body.appendChild(h),setTimeout((function(){h.click(),document.body.removeChild(h),!0===t&&setTimeout((function(){r.URL.revokeObjectURL(h.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,i)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var o=document.createElement("iframe");document.body.appendChild(o),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,i)),o.src=e,setTimeout((function(){document.body.removeChild(o)}),333)}if(a=d instanceof p?d:new p([d],{type:l}),navigator.msSaveBlob)return navigator.msSaveBlob(a,f);if(r.URL)w(r.URL.createObjectURL(a),!0);else{if("string"==typeof a||a.constructor===u)try{return w("data:"+l+";base64,"+r.btoa(a))}catch(v){return w("data:"+l+","+encodeURIComponent(a))}(n=new FileReader).onload=function(e){w(this.result)},n.readAsDataURL(a)}return!0}const i=e({name:"downloadExcel",props:{type:{type:String,default:"xls"},data:{type:Array,required:!1,default:null},fields:{type:Object,default:()=>null},exportFields:{type:Object,default:()=>null},defaultValue:{type:String,required:!1,default:""},header:{default:null},footer:{default:null},name:{type:String,default:"data.xls"},fetch:{type:Function},meta:{type:Array,default:()=>[]},worksheet:{type:String,default:"Sheet1"},beforeGenerate:{type:Function},beforeFinish:{type:Function},escapeCsv:{type:Boolean,default:!0},stringifyLongNum:{type:Boolean,default:!1}},computed:{idName:()=>"export_"+(new Date).getTime(),downloadFields(){return this.fields?this.fields:this.exportFields?this.exportFields:void 0}},methods:{async generate(){"function"==typeof this.beforeGenerate&&await this.beforeGenerate();let e=this.data;if("function"!=typeof this.fetch&&e||(e=await this.fetch()),!e||!e.length)return;let t=this.getProcessedJson(e,this.downloadFields);return"html"===this.type?this.export(this.jsonToXLS(t),this.name.replace(".xls",".html"),"text/html"):"csv"===this.type?this.export(this.jsonToCSV(t),this.name.replace(".xls",".csv"),"application/csv"):this.export(this.jsonToXLS(t),this.name,"application/vnd.ms-excel")},export:async function(e,t,o){let a=this.base64ToBlob(e,o);"function"==typeof this.beforeFinish&&await this.beforeFinish(),s(a,t,o)},jsonToXLS(e){let t="<thead>";const o=Object.keys(e[0]).length;let a=this;const n=this.header||this.$attrs.title;n&&(t+=this.parseExtraData(n,'<tr><th colspan="'+o+'">${data}</th></tr>')),t+="<tr>";for(let r in e[0])t+="<th>"+r+"</th>";return t+="</tr>",t+="</thead>",t+="<tbody>",e.map((function(e,o){t+="<tr>";for(let n in e)t+="<td>"+a.preprocessLongNum(a.valueReformattedForMultilines(e[n]))+"</td>";t+="</tr>"})),t+="</tbody>",null!=this.footer&&(t+="<tfoot>",t+=this.parseExtraData(this.footer,'<tr><td colspan="'+o+'">${data}</td></tr>'),t+="</tfoot>"),'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 11"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>${worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e<style scoped>br {mso-data-placement: same-cell;}</style></head><body><table>${table}</table></body></html>'.replace("${table}",t).replace("${worksheet}",this.worksheet)},jsonToCSV(e){let t=this;var o=[];const a=this.header||this.$attrs.title;a&&o.push(this.parseExtraData(a,"${data}\r\n"));for(let n in e[0])o.push(n),o.push(",");return o.pop(),o.push("\r\n"),e.map((function(e){for(let a in e){let n=e[a]+"";t.escapeCsv&&(n='="'+n+'"',n.match(/[,"\n]/)&&(n='"'+n.replace(/\"/g,'""')+'"')),o.push(n),o.push(",")}o.pop(),o.push("\r\n")})),null!=this.footer&&o.push(this.parseExtraData(this.footer,"${data}\r\n")),o.join("")},getProcessedJson(e,t){let o=this.getKeys(e,t),a=[],n=this;return e.map((function(e,t){let r={};for(let a in o){let t=o[a];r[a]=n.getValue(t,e)}a.push(r)})),a},getKeys(e,t){if(t)return t;let o={};for(let a in e[0])o[a]=a;return o},parseExtraData(e,t){let o="";if(Array.isArray(e))for(var a=0;a<e.length;a++)e[a]&&(o+=t.replace("${data}",e[a]));else o+=t.replace("${data}",e);return o},getValue(e,t){const o="object"!=typeof e?e:e.field;let a="string"!=typeof o?[]:o.split("."),n=this.defaultValue;return n=o?a.length>1?this.getValueFromNestedItem(t,a):this.parseValue(t[o]):t,e.hasOwnProperty("callback")&&(n=this.getValueFromCallback(n,e.callback)),n},valueReformattedForMultilines:e=>"string"==typeof e?e.replace(/\n/gi,"<br/>"):e,preprocessLongNum(e){if(this.stringifyLongNum){if(String(e).startsWith("0x"))return e;if(!isNaN(e)&&""!=e&&(e>99999999999||e<1e-13))return'="'+e+'"'}return e},getValueFromNestedItem(e,t){let o=e;for(let a of t)o&&(o=o[a]);return this.parseValue(o)},getValueFromCallback(e,t){if("function"!=typeof t)return this.defaultValue;const o=t(e);return this.parseValue(o)},parseValue(e){return e||0===e||"boolean"==typeof e?e:this.defaultValue},base64ToBlob(e,t){let o=window.btoa(window.unescape(encodeURIComponent(e))),a=atob(o),n=a.length,r=new Uint8ClampedArray(n);for(;n--;)r[n]=a.charCodeAt(n);return new Blob([r],{type:t})}}},[["render",function(e,s,i,l,d,c){return t(),o("div",{id:c.idName,onClick:s[0]||(s[0]=(...e)=>c.generate&&c.generate(...e))},[a(e.$slots,"default",{},(()=>[n(" Download "+r(i.name),1)]))],8,["id"])}]]);export{i as _};
.icon-modal-box[data-v-8bf98a02]{padding-top:var(--top-window-height)}.icon-modal[data-v-8bf98a02]{width:350px;background-color:#fff;height:500px;overflow-y:scroll}@media screen and (min-width: 768px){.icon-modal-pc[data-v-8bf98a02]{width:600px}}[data-v-8bf98a02] .uni-forms-item__label{width:90px!important}
.reset-password-btn[data-v-63afe8a5]{line-height:36px;color:#007aff;text-decoration:underline;cursor:pointer}.cancel-reset-password-btn[data-v-63afe8a5]{color:#007aff;padding-right:10px;cursor:pointer}[data-v-63afe8a5] .uni-forms-item__label{width:90px!important}.uni-forms-item-flex-center-x[data-v-63afe8a5]{display:flex;align-items:center;flex-wrap:wrap}
[data-v-1c97c706] .uni-forms-item__label{width:90px!important}
[data-v-6f1dcef2] .uni-forms-item__label{width:90px!important}
.uni-stat-edit--x[data-v-c61d4bff]{display:flex;justify-content:space-between}.uni-stat-edit--btn[data-v-c61d4bff]{cursor:pointer}
const t=[{title:"最近发生时间",field:"last_time",tooltip:"",formatter:""},{title:"错误次数",field:"count",tooltip:"相同错误在某时间段内发生的次数"},{title:"错误占比",computed:"count/total_count",field:"count/total_count",formatter:"%",tooltip:"某个错误发生的次数/总错误数"},{title:"平台",field:"platform",formatter:""},{title:"平台版本号",field:"version",tooltip:"原生平台为客户端 SDK 版本号;小程序平台为微信、支付宝、百度等应用的版本号",formatter:""},{title:"错误信息",field:"msg",formatter:""}],e=[{title:"创建时间",field:"create_time",formatter:""},{title:"客户端操作系统",field:"os",formatter:""},{title:"客户端 user-agent 信息",field:"ua",formatter:""}];export{t as f,e as p};
.flex.center[data-v-77807d93]{justify-content:center;align-items:center;color:#666}
.icons[data-v-a417ef42]{display:flex;flex-direction:row;flex-wrap:wrap}.icon-item[data-v-a417ef42]{display:flex;width:16.6%;height:120px;font-size:30px;text-align:center;justify-content:center;align-items:center;flex-direction:column}.icon-item[data-v-a417ef42]:hover,.icon-item:hover .icon-text[data-v-a417ef42]{color:#2979ff}.icon-text[data-v-a417ef42]{color:#99a9bf;font-size:12px;text-align:center;height:1em;line-height:1em;margin-top:15px}@media only screen and (max-width: 500px){.icon-item[data-v-a417ef42]{width:33.3%}}
import{_ as l,aj as e,s as a,y as i,o,c as s,w as d,a as n,d as t,t as r,e as c,r as f,F as u,i as p,z as m,p as h}from"./index-389238f5.js";const g={menu_id:{rules:[{required:!0},{format:"string"}]},name:{rules:[{required:!0},{format:"string"}]},icon:{rules:[{format:"string"}]},url:{rules:[{format:"string"},{validateFunction:function(l,e,a,i){return""!==e&&-1===e.indexOf("http")&&0!==e.indexOf("/")&&i("URL必须以/开头,如/pages/index/index"),!0}}]},sort:{rules:[{format:"int"}]},parent_id:{rules:[{format:"string"}]},permission:{rules:[{format:"array"}]},enable:{rules:[{format:"bool"}]}},w=["pulldown","refreshempty","back","forward","more","more-filled","scan","qq","weibo","weixin","pengyouquan","loop","refresh","refresh-filled","arrowthindown","arrowthinleft","arrowthinright","arrowthinup","undo-filled","undo","redo","redo-filled","bars","chatboxes","camera","chatboxes-filled","camera-filled","cart-filled","cart","checkbox-filled","checkbox","arrowleft","arrowdown","arrowright","smallcircle-filled","arrowup","circle","eye-filled","eye-slash-filled","eye-slash","eye","flag-filled","flag","gear-filled","reload","gear","hand-thumbsdown-filled","hand-thumbsdown","hand-thumbsup-filled","heart-filled","hand-thumbsup","heart","home","info","home-filled","info-filled","circle-filled","chat-filled","chat","mail-open-filled","email-filled","mail-open","email","checkmarkempty","list","locked-filled","locked","map-filled","map-pin","map-pin-ellipse","map","minus-filled","mic-filled","minus","micoff","mic","clear","smallcircle","close","closeempty","paperclip","paperplane","paperplane-filled","person-filled","contact-filled","person","contact","images-filled","phone","images","image","image-filled","location-filled","location","plus-filled","plus","plusempty","help-filled","help","navigate-filled","navigate","mic-slash-filled","search","settings","sound","sound-filled","spinner-cycle","download-filled","personadd-filled","videocam-filled","personadd","upload","upload-filled","starhalf","star-filled","star","trash","phone-filled","compose","videocam","trash-filled","download","chatbubble-filled","chatbubble","cloud-download","cloud-upload-filled","cloud-upload","cloud-download-filled","headphones","shop"];const b=l({data:()=>({icons:w}),props:{tag:{type:Boolean,default:!0},fixWindow:{type:Boolean,default:!0}},methods:{setClipboardData(l,o){let s="uni-icons-"+o;this.tag&&"tag"===l&&(s='<view class="'+s+'"></view>'),e({data:s,success(l){a({icon:"none",title:"复制 "+s+" 成功!"})},fail(l){i({content:"复制 "+s+" 失败!",showCancel:!1})}})}}},[["render",function(l,e,a,i,g,w){const b=p,y=h;return o(),s(b,null,{default:d((()=>[n(b,{class:"uni-header"},{default:d((()=>[n(b,{class:"uni-group"},{default:d((()=>[n(b,{class:"uni-title"},{default:d((()=>[t(r(l.$t("demo.icons.title"))+"(uni-icons)",1)])),_:1}),n(b,{class:"uni-sub-title"},{default:d((()=>[t(r(l.$t("demo.icons.describle")),1)])),_:1})])),_:1})])),_:1}),n(b,{class:"uni-container"},{default:d((()=>[n(b,{class:"icons"},{default:d((()=>[(o(!0),c(u,null,f(g.icons,((l,e)=>(o(),s(b,{key:e,class:"icon-item pointer"},{default:d((()=>[n(b,{onClick:e=>w.setClipboardData("tag",l),class:m("uni-icons-"+l)},null,8,["onClick","class"]),n(y,{onClick:e=>w.setClipboardData("class",l),class:"icon-text"},{default:d((()=>[t("uni-icons-"+r(l),1)])),_:2},1032,["onClick"])])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-a417ef42"]]);export{b as I,g as v};
.uni-stat-card-header[data-v-5f930688]{display:flex;justify-content:space-between;color:#555;font-size:14px;font-weight:600;padding:10px 0;margin-bottom:15px}.uni-table-scroll[data-v-5f930688]{min-height:auto}.link-btn-color[data-v-5f930688]{color:#007aff;cursor:pointer}.uni-stat-text[data-v-5f930688]{color:#606266}.mt10[data-v-5f930688]{margin-top:10px}.uni-radio-cell[data-v-5f930688]{margin:0 10px}.uni-stat-tooltip-s[data-v-5f930688]{width:400px;white-space:normal}.uni-a[data-v-5f930688]{cursor:pointer;text-decoration:underline;color:#555;font-size:14px}
.uni-drawer[data-v-ac0dbaaa]{display:block;position:fixed;top:0;left:0;right:0;bottom:0;overflow:hidden;z-index:999}.uni-drawer__content[data-v-ac0dbaaa]{display:block;position:absolute;top:0;width:220px;bottom:0;background-color:#fff;transition:transform .3s ease}.uni-drawer--left[data-v-ac0dbaaa]{left:0;transform:translate(-100%)}.uni-drawer--right[data-v-ac0dbaaa]{right:0;transform:translate(100%)}.uni-drawer__content--visible[data-v-ac0dbaaa]{transform:translate(0)}.uni-drawer__mask[data-v-ac0dbaaa]{display:block;opacity:0;position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(0,0,0,.4);transition:opacity .3s}.uni-drawer__mask--visible[data-v-ac0dbaaa]{display:block;opacity:1}.upload-task-body[data-v-5938fce7]{background-color:#fff;padding:0 .78125rem;transition:background-color .4s}.upload-task-body[data-v-5938fce7]:hover{background-color:#f5f5f5}.upload-task-item[data-v-5938fce7],.upload-task-item-progress[data-v-5938fce7]{padding:.625rem 0}.upload-task-item-size[data-v-5938fce7]{font-size:12px;color:#999}.upload-task-item-name[data-v-5938fce7]{font-size:14px}.flex-between[data-v-a0b830e1]{margin-bottom:10px;display:flex;justify-content:space-between;align-items:center}.uni-stat-panel[data-v-a0b830e1]{box-shadow:unset;border-bottom:1px solid #eee;padding:0;margin:0 15px}.uni-stat-tooltip-s[data-v-a0b830e1]{width:160px;white-space:normal}.black-theme[data-v-a0b830e1]{background-color:#333;color:#fff}.dialog-close[data-v-a0b830e1]{cursor:pointer;position:absolute;top:0;right:0;display:flex;flex-direction:row;align-items:center;padding:20px;margin-top:10px}.dialog-close-plus[data-v-a0b830e1]{width:20px;height:2px;background-color:#fff;border-radius:2px;transform:rotate(45deg)}.dialog-close-rotate[data-v-a0b830e1]{position:absolute;transform:rotate(-45deg)}.upload-msg-warning[data-v-a0b830e1]{padding:0 15px;color:red;font-size:14px}[data-v-a0b830e1] .sourcemap-drawser .uni-select{flex:1}[data-v-a0b830e1] .sourcemap-drawser .uni-select .uni-select__input-text{width:100%}.upload-task-header[data-v-a0b830e1]{font-size:14px;color:#666;padding:.46875rem .78125rem;border-top:1px solid #eee;border-bottom:1px solid #eee}
.uni-tag[data-v-f9b60738]{line-height:14px;font-size:12px;font-weight:200;padding:4px 7px;color:#fff;border-radius:3px;background-color:#8f939c;border-width:.03125rem;border-style:solid;border-color:#8f939c;cursor:pointer}.uni-tag--default[data-v-f9b60738]{font-size:12px}.uni-tag--default--inverted[data-v-f9b60738]{color:#8f939c;border-color:#8f939c}.uni-tag--small[data-v-f9b60738]{padding:2px 5px;font-size:12px;border-radius:2px}.uni-tag--mini[data-v-f9b60738]{padding:1px 3px;font-size:12px;border-radius:2px}.uni-tag--primary[data-v-f9b60738]{background-color:#2979ff;border-color:#2979ff;color:#fff}.uni-tag--success[data-v-f9b60738]{color:#fff;background-color:#18bc37;border-color:#18bc37}.uni-tag--warning[data-v-f9b60738]{color:#fff;background-color:#f3a73f;border-color:#f3a73f}.uni-tag--error[data-v-f9b60738]{color:#fff;background-color:#e43d33;border-color:#e43d33}.uni-tag--primary--inverted[data-v-f9b60738]{color:#2979ff;border-color:#2979ff}.uni-tag--success--inverted[data-v-f9b60738]{color:#18bc37;border-color:#18bc37}.uni-tag--warning--inverted[data-v-f9b60738]{color:#f3a73f;border-color:#f3a73f}.uni-tag--error--inverted[data-v-f9b60738]{color:#e43d33;border-color:#e43d33}.uni-tag--inverted[data-v-f9b60738]{background-color:#fff}.uni-tag--circle[data-v-f9b60738]{border-radius:15px!important}.uni-tag--mark[data-v-f9b60738]{border-radius:0 15px 15px 0!important}.uni-tag--disabled[data-v-f9b60738]{opacity:.5;cursor:not-allowed}.uni-tag-text[data-v-f9b60738]{color:#fff;font-size:14px}.uni-tag-text--primary[data-v-f9b60738]{color:#2979ff}.uni-tag-text--success[data-v-f9b60738]{color:#18bc37}.uni-tag-text--warning[data-v-f9b60738]{color:#f3a73f}.uni-tag-text--error[data-v-f9b60738]{color:#e43d33}.uni-tag-text--small[data-v-f9b60738]{font-size:12px}.a-link[data-v-83446d02]{cursor:pointer;color:#2979ff;text-decoration:none}.close[data-v-83446d02]{position:absolute;right:20px;top:20px;cursor:pointer}.sms-manager[data-v-83446d02]{width:570px;background:#fff;padding:30px;border-radius:5px}.sms-manager.preview[data-v-83446d02]{width:550px}.sms-manager--header[data-v-83446d02]{text-align:center;font-size:22px}.sms-manager--header.mb[data-v-83446d02]{margin-bottom:50px}.sms-manager--header .sub-title[data-v-83446d02]{margin-top:5px;font-size:16px;color:#999}.sms-manager .content[data-v-83446d02]{margin-top:20px;font-size:16px;line-height:1.5}.sms-manager .content .length[data-v-83446d02]{text-align:right;font-size:13px;margin-top:20px}.sms-manager .content .length .num[data-v-83446d02]{color:red}.sms-manager .tip[data-v-83446d02]{border-top:#ccc solid 1px;padding-top:20px;margin-top:20px;line-height:1.7;font-size:13px;color:#999}.sms-data-item[data-v-83446d02]{display:flex;align-items:center;margin-top:10px}.sms-data-item[data-v-83446d02]:first-child{margin-top:0}.sms-data-item .m[data-v-83446d02]{margin:0 5px}.sms-data-item .m[data-v-83446d02]:first-child{margin-left:0}.sms-data-item .m[data-v-83446d02]:last-child{margin-right:0}.sms-data-item .type[data-v-83446d02]{width:100px;flex:none}.sms-data-item .add[data-v-83446d02],.sms-data-item .minus[data-v-83446d02]{cursor:pointer}.sms-data-tip[data-v-83446d02]{color:#8f939c;font-size:12px;margin-top:5px}.form-item-flex-center[data-v-83446d02]{height:100%;display:flex;align-items:center}.tags-manager--x[data-v-5257fcd4]{width:400px;padding:40px 30px;border-radius:5px;background-color:#fff}.tags-manager--header[data-v-5257fcd4]{font-size:22px;color:#333;text-align:center}.mb[data-v-5257fcd4]{margin-bottom:80px}.ml[data-v-5257fcd4]{margin-left:30px}
.uni-data-pickerview[data-v-bae1831b]{flex:1;display:flex;flex-direction:column;overflow:hidden;height:100%}.error-text[data-v-bae1831b]{color:#dd524d}.loading-cover[data-v-bae1831b]{position:absolute;left:0;top:0;right:0;bottom:0;background-color:rgba(255,255,255,.5);display:flex;flex-direction:column;align-items:center;z-index:1001}.load-more[data-v-bae1831b]{margin:auto}.error-message[data-v-bae1831b]{background-color:#fff;position:absolute;left:0;top:0;right:0;bottom:0;padding:15px;opacity:.9;z-index:102}.selected-list[data-v-bae1831b]{display:flex;flex-direction:row;flex-wrap:nowrap;padding:0 5px;border-bottom:1px solid #f8f8f8}.selected-item[data-v-bae1831b]{margin-left:10px;margin-right:10px;padding:12px 0;text-align:center;white-space:nowrap}.selected-item-text-overflow[data-v-bae1831b]{width:168px;overflow:hidden;width:6em;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis}.selected-item-active[data-v-bae1831b]{border-bottom:2px solid #2979ff}.selected-item-text[data-v-bae1831b]{color:#2979ff}.tab-c[data-v-bae1831b]{position:relative;flex:1;display:flex;flex-direction:row;overflow:hidden}.list[data-v-bae1831b]{flex:1}.item[data-v-bae1831b]{padding:12px 15px;display:flex;flex-direction:row;justify-content:space-between}.is-disabled[data-v-bae1831b]{opacity:.5}.item-text[data-v-bae1831b]{color:#333}.item-text-overflow[data-v-bae1831b]{width:280px;overflow:hidden;width:20em;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis}.check[data-v-bae1831b]{margin-right:5px;border:2px solid #2979ff;border-left:0;border-top:0;height:12px;width:6px;transform-origin:center;transition:all .3s;transform:rotate(45deg)}.uni-data-tree[data-v-fc53b656]{flex:1;position:relative;font-size:14px}.error-text[data-v-fc53b656]{color:#dd524d}.input-value[data-v-fc53b656]{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;font-size:14px;padding:0 5px 0 10px;overflow:hidden;height:35px;box-sizing:border-box}.input-value-border[data-v-fc53b656]{border:1px solid #e5e5e5;border-radius:5px}.selected-area[data-v-fc53b656]{flex:1;overflow:hidden;display:flex;flex-direction:row}.load-more[data-v-fc53b656]{margin-right:auto}.selected-list[data-v-fc53b656]{display:flex;flex-direction:row;flex-wrap:nowrap}.selected-item[data-v-fc53b656]{flex-direction:row;white-space:nowrap}.text-color[data-v-fc53b656]{color:#333}.placeholder[data-v-fc53b656]{color:gray;font-size:12px}.input-split-line[data-v-fc53b656]{opacity:.5}.arrow-area[data-v-fc53b656]{position:relative;width:20px;margin-bottom:5px;margin-left:auto;display:flex;justify-content:center;transform:rotate(-45deg);transform-origin:center}.input-arrow[data-v-fc53b656]{width:7px;height:7px;border-left:1px solid #999;border-bottom:1px solid #999}.uni-data-tree-cover[data-v-fc53b656]{position:fixed;left:0;top:0;right:0;bottom:0;background-color:rgba(0,0,0,.4);display:flex;flex-direction:column;z-index:100}.uni-data-tree-dialog[data-v-fc53b656]{position:fixed;left:0;top:20%;right:0;bottom:0;background-color:#fff;border-top-left-radius:10px;border-top-right-radius:10px;display:flex;flex-direction:column;z-index:102;overflow:hidden}.dialog-caption[data-v-fc53b656]{position:relative;display:flex;flex-direction:row}.title-area[data-v-fc53b656]{display:flex;align-items:center;margin:auto;padding:0 10px}.dialog-title[data-v-fc53b656]{line-height:44px}.dialog-close[data-v-fc53b656]{position:absolute;top:0;right:0;bottom:0;display:flex;flex-direction:row;align-items:center;padding:0 15px}.dialog-close-plus[data-v-fc53b656]{width:16px;height:2px;background-color:#666;border-radius:2px;transform:rotate(45deg)}.dialog-close-rotate[data-v-fc53b656]{position:absolute;transform:rotate(-45deg)}.picker-view[data-v-fc53b656]{flex:1;overflow:hidden}.icon-clear[data-v-fc53b656]{display:flex;align-items:center}@media all and (min-width: 768px){.uni-data-tree-cover[data-v-fc53b656]{background-color:transparent}.uni-data-tree-dialog[data-v-fc53b656]{position:absolute;top:55px;height:auto;min-height:400px;max-height:50vh;background-color:#fff;border:1px solid #EBEEF5;box-shadow:0 2px 12px rgba(0,0,0,.1);border-radius:4px;overflow:unset}.dialog-caption[data-v-fc53b656]{display:none}}.uni-popper__arrow[data-v-fc53b656],.uni-popper__arrow[data-v-fc53b656]:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:6px}.uni-popper__arrow[data-v-fc53b656]{filter:drop-shadow(0 2px 12px rgba(0,0,0,.03));top:-6px;left:10%;margin-right:3px;border-top-width:0;border-bottom-color:#ebeef5}.uni-popper__arrow[data-v-fc53b656]:after{content:" ";top:1px;margin-left:-6px;border-top-width:0;border-bottom-color:#fff}.page-loading[data-v-a55f3636]{display:flex;justify-content:center;align-items:center;flex-direction:column;flex:1}.page-loading i[data-v-a55f3636]{width:2.5rem;height:2.5rem}uni-page-body[data-v-a55f3636],uni-page-body .main[data-v-a55f3636],.page-loading[data-v-a55f3636]{height:100%}.app-list[data-v-a55f3636]{display:flex;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:4px;border:1px solid #2e76ba;color:#3a8ee6}.app-list uni-text[data-v-a55f3636]{margin-left:10px}
.menu-disable[data-v-95038015]{color:red}.menu-badge[data-v-95038015]{position:absolute;top:0;right:5px}
.text-btn[data-v-c58737a6]{color:#2979ff;cursor:pointer;margin:0 5px}
import{aa as e,N as i,$ as s}from"./index-389238f5.js";let t={data:()=>({config:e,uniIdRedirectUrl:"",isMounted:!1}),onUnload(){document.onkeydown=!1},mounted(){this.isMounted=!0},onLoad(e){if(e.is_weixin_redirect){if(i({mask:!0}),window.location.href.includes("#")){window.location.href.split("?")[1].split("&").forEach((i=>{let s=i.split("=");"code"==s[0]&&(e.code=s[1])}))}this.$nextTick((i=>{this.$refs.uniFabLogin.login({code:e.code},"weixin")}))}e.uniIdRedirectUrl&&(this.uniIdRedirectUrl=decodeURIComponent(e.uniIdRedirectUrl))},computed:{needAgreements(){if(this.isMounted)return!!this.$refs.agreements&&this.$refs.agreements.needAgreements},agree:{get(){if(this.isMounted)return!this.$refs.agreements||this.$refs.agreements.isAgree},set(e){this.$refs.agreements?this.$refs.agreements.isAgree=e:console.log("不存在 隐私政策协议组件")}}},methods:{loginSuccess(e){s.loginSuccess({...e,uniIdRedirectUrl:this.uniIdRedirectUrl})}}};export{t as m};
.input-box[data-v-93225fe2] .uni-input-input[type=password]::-ms-reveal{display:none}.uni-content[data-v-93225fe2]{padding:0 1.875rem}.login-logo[data-v-93225fe2]{display:none}@media screen and (min-width: 690px){.uni-content[data-v-93225fe2]{margin:0 auto;position:relative;top:100px;padding:30px 40px 80px;max-width:450px;max-height:450px;border-radius:10px;box-shadow:0 0 20px #efefef;background-color:#fff}.login-logo[data-v-93225fe2]{display:flex;justify-content:center}.login-logo uni-image[data-v-93225fe2]{width:60px;height:60px}.register-back[data-v-93225fe2]{display:none}uni-button[data-v-93225fe2]{padding-bottom:1px}}.uni-content uni-view[data-v-93225fe2]{box-sizing:border-box}.title[data-v-93225fe2]{display:flex;padding:18px 0;font-weight:800;flex-direction:column}.tip[data-v-93225fe2]{display:flex;color:#bdbdc0;font-size:11px;margin:6px 0}.uni-content[data-v-93225fe2] .uni-easyinput__content,.input-box[data-v-93225fe2]{height:44px;background-color:#f8f8f8!important;border-radius:0;font-size:14px;display:flex;flex:1}.link[data-v-93225fe2]{color:#04498c;cursor:pointer}.uni-content[data-v-93225fe2] .uni-forms-item__inner{padding-bottom:8px}.uni-btn[data-v-93225fe2]{text-align:center;height:40px;line-height:40px;margin:15px 0 10px;color:#fff!important;border-radius:5px;font-size:16px}.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd[data-v-93225fe2]{height:auto!important}.tip[data-v-93225fe2]{margin-top:-15px;margin-bottom:15px}.popup-captcha[data-v-93225fe2]{display:flex;padding:.625rem;background-color:#fff;border-radius:2px;flex-direction:column;position:relative}.popup-captcha .title[data-v-93225fe2]{font-weight:400;padding:0 0 15px;color:#666}.popup-captcha .close[data-v-93225fe2]{position:absolute;bottom:-40px;margin-left:-13px;left:50%}.popup-captcha .uni-btn[data-v-93225fe2]{margin:0}
.input-box[data-v-e394d6b8] .uni-input-input[type=password]::-ms-reveal{display:none}.uni-content[data-v-e394d6b8]{padding:0 1.875rem}.login-logo[data-v-e394d6b8]{display:none}@media screen and (min-width: 690px){.uni-content[data-v-e394d6b8]{margin:0 auto;position:relative;top:100px;padding:30px 40px 80px;max-width:450px;max-height:450px;border-radius:10px;box-shadow:0 0 20px #efefef;background-color:#fff}.login-logo[data-v-e394d6b8]{display:flex;justify-content:center}.login-logo uni-image[data-v-e394d6b8]{width:60px;height:60px}.register-back[data-v-e394d6b8]{display:none}uni-button[data-v-e394d6b8]{padding-bottom:1px}}.uni-content uni-view[data-v-e394d6b8]{box-sizing:border-box}.title[data-v-e394d6b8]{display:flex;padding:18px 0;font-weight:800;flex-direction:column}.tip[data-v-e394d6b8]{display:flex;color:#bdbdc0;font-size:11px;margin:6px 0}.uni-content[data-v-e394d6b8] .uni-easyinput__content,.input-box[data-v-e394d6b8]{height:44px;background-color:#f8f8f8!important;border-radius:0;font-size:14px;display:flex;flex:1}.link[data-v-e394d6b8]{color:#04498c;cursor:pointer}.uni-content[data-v-e394d6b8] .uni-forms-item__inner{padding-bottom:8px}.uni-btn[data-v-e394d6b8]{text-align:center;height:40px;line-height:40px;margin:15px 0 10px;color:#fff!important;border-radius:5px;font-size:16px}.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd[data-v-e394d6b8]{height:auto!important}@media screen and (min-width: 690px){.uni-content[data-v-e394d6b8]{height:350px}}.uni-content[data-v-e394d6b8],.quickLogin[data-v-e394d6b8]{display:flex;flex-direction:column}.phone-box[data-v-e394d6b8]{position:relative;display:flex}.area[data-v-e394d6b8]{position:absolute;left:10px;z-index:9;top:12px;font-size:14px}.area[data-v-e394d6b8]:after{content:"";border:3px solid transparent;border-top-color:#000;top:12px;left:3px;position:relative}.input-box[data-v-e394d6b8]{box-sizing:border-box;flex:1;padding-left:45px;margin-bottom:10px;border-radius:0}.quickLogin[data-v-e394d6b8]{height:350px;align-items:center;justify-content:center}.quickLoginBtn[data-v-e394d6b8]{margin:20px 0;width:14.0625rem;max-width:230px;height:2.5625rem}.tip[data-v-e394d6b8]{margin-top:-15px;margin-bottom:20px}@media screen and (min-width: 690px){.quickLogin[data-v-e394d6b8]{height:auto}}
.input-box[data-v-e40f8cce] .uni-input-input[type=password]::-ms-reveal{display:none}.uni-content[data-v-e40f8cce]{padding:0 1.875rem}.login-logo[data-v-e40f8cce]{display:none}@media screen and (min-width: 690px){.uni-content[data-v-e40f8cce]{margin:0 auto;position:relative;top:100px;padding:30px 40px 80px;max-width:450px;max-height:450px;border-radius:10px;box-shadow:0 0 20px #efefef;background-color:#fff}.login-logo[data-v-e40f8cce]{display:flex;justify-content:center}.login-logo uni-image[data-v-e40f8cce]{width:60px;height:60px}.register-back[data-v-e40f8cce]{display:none}uni-button[data-v-e40f8cce]{padding-bottom:1px}}.uni-content uni-view[data-v-e40f8cce]{box-sizing:border-box}.title[data-v-e40f8cce]{display:flex;padding:18px 0;font-weight:800;flex-direction:column}.tip[data-v-e40f8cce]{display:flex;color:#bdbdc0;font-size:11px;margin:6px 0}.uni-content[data-v-e40f8cce] .uni-easyinput__content,.input-box[data-v-e40f8cce]{height:44px;background-color:#f8f8f8!important;border-radius:0;font-size:14px;display:flex;flex:1}.link[data-v-e40f8cce]{color:#04498c;cursor:pointer}.uni-content[data-v-e40f8cce] .uni-forms-item__inner{padding-bottom:8px}.uni-btn[data-v-e40f8cce]{text-align:center;height:40px;line-height:40px;margin:15px 0 10px;color:#fff!important;border-radius:5px;font-size:16px}.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd[data-v-e40f8cce]{height:auto!important}@media screen and (min-width: 690px){.uni-content[data-v-e40f8cce]{max-height:650px}}.forget[data-v-e40f8cce]{font-size:12px;color:#8a8f8b}.link-box[data-v-e40f8cce]{display:flex;flex-direction:row;justify-content:space-between;margin-top:20px}.link[data-v-e40f8cce]{font-size:12px}
const e={owner_id:{rules:[{format:"string"}],title:"评论人id",label:"评论人id"},date:{rules:[{format:"string"}],title:"发布时间",label:"发布时间"},likes:{rules:[{format:"int"}],title:"点赞数",label:"点赞数"},post_id:{rules:[{format:"string"}],title:"帖子id",label:"帖子id"},check_status:{rules:[{format:"bool"}],title:"状态",label:"状态"},content:{rules:[{format:"string"}],title:"评论内容",label:"评论内容"}},t={};function l(e,t){let l={};for(let a in e){let{type:r,value:s}=e[a];switch(r){case"search":"string"==typeof s&&s.length&&(l[a]=new RegExp(s));break;case"select":if(s.length){let e=[];for(let l of s)e.push(t.eq(l));l[a]=t.or(e)}break;case"range":if(s.length){let e=s[0],r=s[1];l[a]=t.and([t.gte(e),t.lte(r)])}break;case"date":if(s.length){let[e,r]=s,i=new Date(e),n=new Date(r);l[a]=t.and([t.gte(i),t.lte(n)])}break;case"timestamp":if(s.length){let[e,r]=s;l[a]=t.and([t.gte(e),t.lte(r)])}}}return l}export{t as e,l as f,e as v};
const e={content:{rules:[{format:"string"}],title:"内容",label:"内容"},date:{rules:[{format:"string"}],title:"发布时间",label:"发布时间"},likes:{rules:[{format:"int"}],title:"点赞数",label:"点赞数"},owner_id:{rules:[{format:"string"}],title:"发帖人id",label:"发帖人id"},check_status:{rules:[{format:"bool"}],title:"审核状态",label:"审核状态"},comment_num:{rules:[{format:"int"}],title:"评论数",label:"评论数"},url:{rules:[{format:"array"}],title:"图片url",label:"图片url"}},t={};function l(e,t){let l={};for(let a in e){let{type:r,value:n}=e[a];switch(r){case"search":"string"==typeof n&&n.length&&(l[a]=new RegExp(n));break;case"select":if(n.length){let e=[];for(let l of n)e.push(t.eq(l));l[a]=t.or(e)}break;case"range":if(n.length){let e=n[0],r=n[1];l[a]=t.and([t.gte(e),t.lte(r)])}break;case"date":if(n.length){let[e,r]=n,s=new Date(e),i=new Date(r);l[a]=t.and([t.gte(s),t.lte(i)])}break;case"timestamp":if(n.length){let[e,r]=n;l[a]=t.and([t.gte(e),t.lte(r)])}}}return l}export{t as e,l as f,e as v};
const e={start_date:{rules:[{format:"string"}],title:"开始时间",label:"开始时间"},duration:{rules:[{format:"int"}],title:"持续时间",label:"持续时间"},feelings:{rules:[{format:"string"}],title:"感受",label:"感受"},owner_id:{rules:[{format:"string"}],title:"用户id",label:"用户id"},distance:{rules:[{format:"double"}],title:"距离",label:"距离"},pace:{rules:[{format:"double"}],title:"配速",label:"配速"},path_line:{rules:[{format:"array"}],title:"路线",label:"路线"},start_point:{rules:[{format:"object"}],title:"起始地点",label:"起始地点"},end_point:{rules:[{format:"object"}],title:"结束地点",label:"结束地点"}},t={};function l(e,t){let l={};for(let a in e){let{type:r,value:i}=e[a];switch(r){case"search":"string"==typeof i&&i.length&&(l[a]=new RegExp(i));break;case"select":if(i.length){let e=[];for(let l of i)e.push(t.eq(l));l[a]=t.or(e)}break;case"range":if(i.length){let e=i[0],r=i[1];l[a]=t.and([t.gte(e),t.lte(r)])}break;case"date":if(i.length){let[e,r]=i,s=new Date(e),n=new Date(r);l[a]=t.and([t.gte(s),t.lte(n)])}break;case"timestamp":if(i.length){let[e,r]=i;l[a]=t.and([t.gte(e),t.lte(r)])}}}return l}export{t as e,l as f,e as v};
const e={title:{rules:[{format:"string"}],title:"标题",label:"标题"},content:{rules:[{format:"string"}],title:"内容",label:"内容"},start_date:{rules:[{format:"string"}],title:"开始时间",label:"开始时间"},end_date:{rules:[{format:"string"}],title:"结束时间",label:"结束时间"},owner_id:{rules:[{format:"string"}],title:"发布者id",label:"发布者id"},background_picture:{rules:[{format:"string"}],title:"背景图片",label:"背景图片"},place:{rules:[{format:"string"}],title:"地点",label:"地点"},status:{rules:[{format:"int"}],title:"活动状态",label:"活动状态"},contact:{rules:[{format:"string"}],title:"联系方式",label:"联系方式"},invitee:{rules:[{format:"string"}],title:"面向对象",label:"面向对象"}},t={};function l(e,t){let l={};for(let a in e){let{type:r,value:s}=e[a];switch(r){case"search":"string"==typeof s&&s.length&&(l[a]=new RegExp(s));break;case"select":if(s.length){let e=[];for(let l of s)e.push(t.eq(l));l[a]=t.or(e)}break;case"range":if(s.length){let e=s[0],r=s[1];l[a]=t.and([t.gte(e),t.lte(r)])}break;case"date":if(s.length){let[e,r]=s,i=new Date(e),n=new Date(r);l[a]=t.and([t.gte(i),t.lte(n)])}break;case"timestamp":if(s.length){let[e,r]=s;l[a]=t.and([t.gte(e),t.lte(r)])}}}return l}export{t as e,l as f,e as v};
const t={title:{rules:[{format:"string"}],title:"标题",label:"标题"},content:{rules:[{format:"string"}],title:"内容",label:"内容"},start_date:{rules:[{format:"string"}],title:"开始时间",label:"开始时间"},end_date:{rules:[{format:"string"}],title:"结束时间",label:"结束时间"},owner_id:{rules:[{format:"string"}],title:"发布者id",label:"发布者id"},background_picture:{rules:[{format:"string"}],title:"背景图片",label:"背景图片"},place:{rules:[{format:"string"}],title:"地点",label:"地点"},status:{rules:[{format:"int"}],title:"活动状态",label:"活动状态"},participants:{rules:[{format:"int"}],title:"参与人数",label:"参与人数"},contact:{rules:[{format:"string"}],title:"联系方式",label:"联系方式"},team_id:{rules:[{format:"string"}],title:"小队id",label:"小队id"}},e={};function l(t,e){let l={};for(let a in t){let{type:r,value:i}=t[a];switch(r){case"search":"string"==typeof i&&i.length&&(l[a]=new RegExp(i));break;case"select":if(i.length){let t=[];for(let l of i)t.push(e.eq(l));l[a]=e.or(t)}break;case"range":if(i.length){let t=i[0],r=i[1];l[a]=e.and([e.gte(t),e.lte(r)])}break;case"date":if(i.length){let[t,r]=i,s=new Date(t),n=new Date(r);l[a]=e.and([e.gte(s),e.lte(n)])}break;case"timestamp":if(i.length){let[t,r]=i;l[a]=e.and([e.gte(t),e.lte(r)])}}}return l}export{e,l as f,t as v};
const e={icon:{rules:[{format:"string"}],title:"队标",label:"队标"},name:{rules:[{format:"string"}],title:"队名",label:"队名"},owner_id:{rules:[{format:"string"}],title:"发起人id",label:"发起人id"},description:{rules:[{format:"string"}],title:"描述",label:"描述"}},t={};function l(e,t){let l={};for(let a in e){let{type:r,value:n}=e[a];switch(r){case"search":"string"==typeof n&&n.length&&(l[a]=new RegExp(n));break;case"select":if(n.length){let e=[];for(let l of n)e.push(t.eq(l));l[a]=t.or(e)}break;case"range":if(n.length){let e=n[0],r=n[1];l[a]=t.and([t.gte(e),t.lte(r)])}break;case"date":if(n.length){let[e,r]=n,s=new Date(e),i=new Date(r);l[a]=t.and([t.gte(s),t.lte(i)])}break;case"timestamp":if(n.length){let[e,r]=n;l[a]=t.and([t.gte(e),t.lte(r)])}}}return l}export{t as e,l as f,e as v};
const e={name:{rules:[{format:"string"}]},icon:{rules:[{format:"string"}]},gender:{rules:[{format:"string"}]},password:{rules:[{format:"string"}]},phone_num:{rules:[{format:"string"}]},team_id:{rules:[{format:"string"}],defaultValue:""},school:{rules:[{format:"string"}]},type:{rules:[{format:"string"}]},total_running_distance:{rules:[{format:"double"}],defaultValue:0},total_walking_distance:{rules:[{format:"double"}],defaultValue:0}},t={};function a(e,t){let a={};for(let r in e){let{type:l,value:s}=e[r];switch(l){case"search":"string"==typeof s&&s.length&&(a[r]=new RegExp(s));break;case"select":if(s.length){let e=[];for(let a of s)e.push(t.eq(a));a[r]=t.or(e)}break;case"range":if(s.length){let e=s[0],l=s[1];a[r]=t.and([t.gte(e),t.lte(l)])}break;case"date":if(s.length){let[e,l]=s,n=new Date(e),o=new Date(l);a[r]=t.and([t.gte(n),t.lte(o)])}break;case"timestamp":if(s.length){let[e,l]=s;a[r]=t.and([t.gte(e),t.lte(l)])}}}return a}export{t as e,a as f,e as v};
const e={start_date:{rules:[{format:"string"}],title:"开始时间",label:"开始时间"},duration:{rules:[{format:"int"}],title:"持续时间",label:"持续时间"},feelings:{rules:[{format:"string"}],title:"感受",label:"感受"},owner_id:{rules:[{format:"string"}],title:"用户id",label:"用户id"},distance:{rules:[{format:"double"}],title:"距离",label:"距离"},pace:{rules:[{format:"double"}],title:"配速",label:"配速"},start_point:{rules:[{format:"object"}],title:"起始地点",label:"起始地点"},end_point:{rules:[{format:"object"}],title:"结束地点",label:"结束地点"},path_line:{rules:[{format:"array"}],title:"路线",label:"路线"}},t={};function l(e,t){let l={};for(let a in e){let{type:r,value:i}=e[a];switch(r){case"search":"string"==typeof i&&i.length&&(l[a]=new RegExp(i));break;case"select":if(i.length){let e=[];for(let l of i)e.push(t.eq(l));l[a]=t.or(e)}break;case"range":if(i.length){let e=i[0],r=i[1];l[a]=t.and([t.gte(e),t.lte(r)])}break;case"date":if(i.length){let[e,r]=i,s=new Date(e),n=new Date(r);l[a]=t.and([t.gte(s),t.lte(n)])}break;case"timestamp":if(i.length){let[e,r]=i;l[a]=t.and([t.gte(e),t.lte(r)])}}}return l}export{t as e,l as f,e as v};
const e={appid:{rules:[{required:!0},{format:"string"}],label:"AppID"},name:{rules:[{required:!0},{format:"string"}],label:"应用名称"},icon_url:{rules:[{format:"string"}],label:"应用图标"},introduction:{rules:[{format:"string"}],label:"应用简介"},description:{rules:[{format:"string"}],label:"应用描述"},screenshot:{rules:[{format:"array"}],label:"应用截图"},create_date:{rules:[{format:"timestamp"}],label:"发行时间"}};function t(e,t){let a={};for(let r in e){let{type:l,value:s}=e[r];switch(l){case"search":"string"==typeof s&&s.length&&(a[r]=new RegExp(s));break;case"select":if(s.length){let e=[];for(let a of s)e.push(t.eq(a));a[r]=t.or(e)}break;case"range":if(s.length){let e=s[0],l=s[1];a[r]=t.and([t.gte(e),t.lte(l)])}break;case"date":if(s.length){let[e,l]=s,n=new Date(e),i=new Date(l);a[r]=t.and([t.gte(n),t.lte(i)])}break;case"timestamp":if(s.length){let[e,l]=s;a[r]=t.and([t.gte(e),t.lte(l)])}}}return a}const a={},r={mp_weixin:"微信小程序",mp_alipay:"支付宝小程序",mp_baidu:"百度小程序",mp_toutiao:"字节小程序",mp_qq:"QQ小程序",mp_dingtalk:"钉钉小程序",mp_kuaishou:"快手小程序",mp_lark:"飞书小程序",mp_jd:"京东小程序",quickapp:"快应用"};export{a as e,t as f,r as m,e as v};
.uni-stat-card-header[data-v-ecb460f0]{display:flex;justify-content:space-between;color:#555;font-size:14px;font-weight:600;padding:10px 0;margin-bottom:15px}.uni-stat-card-header-link[data-v-ecb460f0]{cursor:pointer}
.uni-stat-tooltip-s[data-v-9f2e867a]{width:400px;white-space:normal}.uni-stat--sum-x[data-v-9f2e867a]{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;border-radius:4px;padding:15px;box-shadow:-1px -1px 5px rgba(0,0,0,.1)}.uni-stat--sum-item[data-v-9f2e867a]{white-space:nowrap;text-align:center;margin:10px 18px}.uni-stat--sum-item-width[data-v-9f2e867a]{width:100px}.uni-stat--sum-item-title[data-v-9f2e867a]{display:flex;align-items:center;justify-content:center;min-height:17px;font-size:12px;color:#666}.uni-stat--sum-item-value[data-v-9f2e867a]{font-size:24px;line-height:48px;font-weight:700;color:#333}.uni-stat--sum-item-contrast[data-v-9f2e867a]{font-size:14px;color:#666}@media screen and (max-width: 500px){.uni-stat--sum-x[data-v-9f2e867a]{padding:15px 0;align-items:center;justify-content:center;flex-wrap:unset;overflow-x:auto!important}[data-v-9f2e867a]::-webkit-scrollbar{display:none}}.uni-stat--sum-flex[data-v-9f2e867a]{flex:1;display:flex;justify-content:flex-start;flex-wrap:wrap;border-radius:4px;padding:15px}.uni-stat--sum-flex .uni-stat--sum-item[data-v-9f2e867a]{min-width:9.375rem;max-width:15.625rem;flex:1}.uni-stat-card-header[data-v-9f2e867a]{justify-content:space-between;color:#555;font-size:14px;font-weight:600;padding:10px 0;margin-bottom:15px}.td.main[data-v-9f2e867a]{color:#e43d33}.uni-stat-tooltip-s[data-v-2f62b91c]{width:350px;white-space:normal}.uni-stat--sum-x[data-v-2f62b91c]{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;border-radius:4px;padding:15px;box-shadow:-1px -1px 5px rgba(0,0,0,.1)}.uni-stat--sum-item[data-v-2f62b91c]{white-space:nowrap;text-align:center;margin:10px 18px}.uni-stat--sum-item-width[data-v-2f62b91c]{width:100px}.uni-stat--sum-item-title[data-v-2f62b91c]{display:flex;align-items:center;justify-content:center;min-height:17px;font-size:12px;color:#666}.uni-stat--sum-item-value[data-v-2f62b91c]{font-size:24px;line-height:48px;font-weight:700;color:#333}.uni-stat--sum-item-contrast[data-v-2f62b91c]{font-size:14px;color:#666}@media screen and (max-width: 500px){.uni-stat--sum-x[data-v-2f62b91c]{padding:15px 0;align-items:center;justify-content:center;flex-wrap:unset;overflow-x:auto!important}[data-v-2f62b91c]::-webkit-scrollbar{display:none}}.uni-stat--sum-flex[data-v-2f62b91c]{flex:1;display:flex;justify-content:flex-start;flex-wrap:wrap;border-radius:4px;padding:15px}.uni-stat--sum-flex .uni-stat--sum-item[data-v-2f62b91c]{min-width:9.375rem;max-width:15.625rem;flex:1}.uni-stat-card-header[data-v-2f62b91c]{justify-content:space-between;color:#555;font-size:14px;font-weight:600;padding:10px 0;margin-bottom:15px}.td.main[data-v-2f62b91c]{color:#e43d33}.justify-center[data-v-152a1129]{justify-content:center}
.uni-stat-card-header[data-v-29748419]{display:flex;justify-content:space-between;color:#555;font-size:14px;font-weight:600;padding:10px 0;margin-bottom:15px}.uni-stat-card-header-link[data-v-29748419]{cursor:pointer}
.uni-stat-edit--x[data-v-c412e863]{display:flex;justify-content:space-between}
.uni-stat-edit--x[data-v-b4f0553c]{display:flex;justify-content:space-between}.uni-stat-edit--btn[data-v-b4f0553c]{cursor:pointer}
import{_ as e,L as a,N as t,O as l,s as o,G as n,y as d,o as s,c as m,w as u,i as r,a as i,d as c,f,g as p,m as _,q as h,X as V}from"./index-389238f5.js";import{_ as b}from"./uni-easyinput.a1fc57c1.js";import{_ as D}from"./uni-forms-item.69698491.js";import{_ as g}from"./uni-forms.bc4bcf6e.js";import{v as y}from"./mustgo-school-activity.ad20959b.js";const v=a.database();v.command;function k(e){let a={};for(let t in y)e.includes(t)&&(a[t]=y[t]);return a}const U=e({data(){let e={title:"",content:"",start_date:"",end_date:"",owner_id:"",background_picture:"",place:"",status:null,contact:"",invitee:""};return{formData:e,formOptions:{},rules:{...k(Object.keys(e))}}},onReady(){this.$refs.form.setRules(this.rules)},methods:{avatarChoose(){let e=this;console.log("upload image loading"),a.chooseAndUploadFile({type:"image",success(a){e.formData.icon=a.tempFiles[0].url,console.log(a)},fail(){console.log("upload icon failed")},complete(){}})},submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return v.collection("mustgo-school-activity").add(e).then((e=>{o({title:"新增成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((e=>{d({content:e.message||"请求服务失败",showCancel:!1})}))}}},[["render",function(e,a,t,l,o,n){const d=f(p("uni-easyinput"),b),y=f(p("uni-forms-item"),D),v=_,k=h,U=V,w=r,C=f(p("uni-forms"),g);return s(),m(w,{class:"uni-container"},{default:u((()=>[i(C,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:u((()=>[i(y,{name:"title",label:"标题"},{default:u((()=>[i(d,{placeholder:"校园活动标题",modelValue:o.formData.title,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.title=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"content",label:"内容"},{default:u((()=>[i(d,{placeholder:"校园活动内容",modelValue:o.formData.content,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.content=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"start_date",label:"开始时间"},{default:u((()=>[i(d,{placeholder:"校园活动开始时间",modelValue:o.formData.start_date,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.start_date=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"end_date",label:"结束时间"},{default:u((()=>[i(d,{placeholder:"校园活动结束时间",modelValue:o.formData.end_date,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.end_date=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"owner_id",label:"发布者id"},{default:u((()=>[i(d,{placeholder:"校园活动发布者id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[4]||(a[4]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"background_picture",label:"背景图片",onClick:n.avatarChoose},{default:u((()=>[i(v,{src:o.formData.background_picture,style:{width:"120px",height:"80px","background-color":"darkgray"}},null,8,["src"])])),_:1},8,["onClick"]),i(y,{name:"place",label:"地点"},{default:u((()=>[i(d,{placeholder:"校园活动地点",modelValue:o.formData.place,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.place=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"status",label:"活动状态"},{default:u((()=>[i(d,{placeholder:"校园活动状态",type:"number",modelValue:o.formData.status,"onUpdate:modelValue":a[6]||(a[6]=e=>o.formData.status=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"contact",label:"联系方式"},{default:u((()=>[i(d,{placeholder:"校园活动发布者联系方式",modelValue:o.formData.contact,"onUpdate:modelValue":a[7]||(a[7]=e=>o.formData.contact=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"invitee",label:"面向对象"},{default:u((()=>[i(d,{placeholder:"校园活动面向对象",modelValue:o.formData.invitee,"onUpdate:modelValue":a[8]||(a[8]=e=>o.formData.invitee=e)},null,8,["modelValue"])])),_:1}),i(w,{class:"uni-button-group"},{default:u((()=>[i(k,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:u((()=>[c("提交")])),_:1},8,["onClick"]),i(U,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:u((()=>[i(k,{class:"uni-button",style:{width:"100px"}},{default:u((()=>[c("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{U as default};
import{_ as e,L as a,N as t,O as l,s as o,G as n,y as d,o as s,c as m,w as i,i as u,a as r,d as c,f,g as p,m as h,q as _,X as D}from"./index-389238f5.js";import{_ as V}from"./uni-easyinput.a1fc57c1.js";import{_ as b}from"./uni-forms-item.69698491.js";import{_ as g}from"./uni-forms.bc4bcf6e.js";import{v as y}from"./mustgo-school-activity.ad20959b.js";const v=a.database();v.command;const k="mustgo-school-activity";function w(e){let a={};for(let t in y)e.includes(t)&&(a[t]=y[t]);return a}const U=e({data(){let e={title:"",content:"",start_date:"",end_date:"",owner_id:"",background_picture:"",place:"",status:null,contact:"",invitee:""};return{formData:e,formOptions:{},rules:{...w(Object.keys(e))}}},onLoad(e){if(e.id){const a=e.id;this.formDataId=a,this.getDetail(a)}},onReady(){this.$refs.form.setRules(this.rules)},methods:{avatarChoose(){let e=this;console.log("upload image loading"),a.chooseAndUploadFile({type:"image",success(a){e.formData.icon=a.tempFiles[0].url,console.log(a)},fail(){console.log("upload icon failed")},complete(){}})},submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return v.collection(k).doc(this.formDataId).update(e).then((e=>{o({title:"修改成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((e=>{d({content:e.message||"请求服务失败",showCancel:!1})}))},getDetail(e){t({mask:!0}),v.collection(k).doc(e).field("title,content,start_date,end_date,owner_id,background_picture,place,status,contact,invitee").get().then((e=>{const a=e.result.data[0];a&&(this.formData=a)})).catch((e=>{d({content:e.message||"请求服务失败",showCancel:!1})})).finally((()=>{l()}))}}},[["render",function(e,a,t,l,o,n){const d=f(p("uni-easyinput"),V),y=f(p("uni-forms-item"),b),v=h,k=_,w=D,U=u,C=f(p("uni-forms"),g);return s(),m(U,{class:"uni-container"},{default:i((()=>[r(C,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:i((()=>[r(y,{name:"title",label:"标题"},{default:i((()=>[r(d,{placeholder:"校园活动标题",modelValue:o.formData.title,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.title=e)},null,8,["modelValue"])])),_:1}),r(y,{name:"content",label:"内容"},{default:i((()=>[r(d,{placeholder:"校园活动内容",modelValue:o.formData.content,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.content=e)},null,8,["modelValue"])])),_:1}),r(y,{name:"start_date",label:"开始时间"},{default:i((()=>[r(d,{placeholder:"校园活动开始时间",modelValue:o.formData.start_date,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.start_date=e)},null,8,["modelValue"])])),_:1}),r(y,{name:"end_date",label:"结束时间"},{default:i((()=>[r(d,{placeholder:"校园活动结束时间",modelValue:o.formData.end_date,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.end_date=e)},null,8,["modelValue"])])),_:1}),r(y,{name:"owner_id",label:"发布者id"},{default:i((()=>[r(d,{placeholder:"校园活动发布者id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[4]||(a[4]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),r(y,{name:"background_picture",label:"背景图片",onClick:n.avatarChoose},{default:i((()=>[r(v,{src:o.formData.background_picture,style:{width:"120px",height:"80px"}},null,8,["src"])])),_:1},8,["onClick"]),r(y,{name:"place",label:"地点"},{default:i((()=>[r(d,{placeholder:"校园活动地点",modelValue:o.formData.place,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.place=e)},null,8,["modelValue"])])),_:1}),r(y,{name:"status",label:"活动状态"},{default:i((()=>[r(d,{placeholder:"校园活动状态",type:"number",modelValue:o.formData.status,"onUpdate:modelValue":a[6]||(a[6]=e=>o.formData.status=e)},null,8,["modelValue"])])),_:1}),r(y,{name:"contact",label:"联系方式"},{default:i((()=>[r(d,{placeholder:"校园活动发布者联系方式",modelValue:o.formData.contact,"onUpdate:modelValue":a[7]||(a[7]=e=>o.formData.contact=e)},null,8,["modelValue"])])),_:1}),r(y,{name:"invitee",label:"面向对象"},{default:i((()=>[r(d,{placeholder:"校园活动面向对象",modelValue:o.formData.invitee,"onUpdate:modelValue":a[8]||(a[8]=e=>o.formData.invitee=e)},null,8,["modelValue"])])),_:1}),r(U,{class:"uni-button-group"},{default:i((()=>[r(k,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:i((()=>[c("提交")])),_:1},8,["onClick"]),r(w,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:i((()=>[r(k,{class:"uni-button",style:{width:"100px"}},{default:i((()=>[c("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{U as default};
import{_ as e,L as t,n as a,o as n,c as l,w as i,i as r,a as s,d as o,e as d,r as c,F as u,M as h,q as g,f,g as p,t as _,h as C,j as m,k as b,m as y,l as x}from"./index-389238f5.js";import{_ as k}from"./download-excel.9236b5ca.js";import{_ as w}from"./uni-pagination.018f31ea.js";import{_ as S}from"./unicloud-db.dfa2c90d.js";import{e as v,f as D}from"./mustgo-school-activity.ad20959b.js";const $=t.database(),z=[],F={ascending:"asc",descending:"desc"};const T=e({data:()=>({collectionList:"mustgo-school-activity",query:"",where:"",orderby:"",orderByFieldName:"",selectedIndexs:[],options:{pageSize:20,pageCurrent:1,filterData:{},...v},imageStyles:{width:64,height:64},exportExcel:{filename:"mustgo-school-activity.xls",type:"xls",fields:{"标题":"title","内容":"content","开始时间":"start_date","结束时间":"end_date","发布者id":"owner_id","背景图片":"background_picture","地点":"place","活动状态":"status","联系方式":"contact","面向对象":"invitee"}},exportExcelData:[]}),onLoad(){this._filter={}},onReady(){this.$refs.udb.loadData()},methods:{onqueryload(e){this.exportExcelData=e},getWhere(){const e=this.query.trim();if(!e)return"";const t=new RegExp(e,"i");return z.map((e=>t+".test("+e+")")).join(" || ")},search(){const e=this.getWhere();this.where=e,this.$nextTick((()=>{this.loadData()}))},loadData(e=!0){this.$refs.udb.loadData({clear:e})},onPageChanged(e){this.selectedIndexs.length=0,this.$refs.table.clearSelection(),this.$refs.udb.loadData({current:e.current})},navigateTo(e,t){a({url:e,events:{refreshData:()=>{this.loadData(t)}}})},selectedItems(){var e=this.$refs.udb.dataList;return this.selectedIndexs.map((t=>e[t]._id))},delTable(){this.$refs.udb.remove(this.selectedItems(),{success:e=>{this.$refs.table.clearSelection()}})},selectionChange(e){this.selectedIndexs=e.detail.index},confirmDelete(e){this.$refs.udb.remove(e,{success:e=>{this.$refs.table.clearSelection()}})},sortChange(e,t){this.orderByFieldName=t,e.order?this.orderby=t+" "+F[e.order]:this.orderby="",this.$refs.table.clearSelection(),this.$nextTick((()=>{this.$refs.udb.loadData()}))},filterChange(e,t){this._filter[t]={type:e.filterType,value:e.filter};let a=D(this._filter,$.command);Object.keys(a).length?this.where=a:this.where="",this.$nextTick((()=>{this.$refs.udb.loadData()}))}}},[["render",function(e,t,a,v,D,$){const z=r,F=h,T=g,E=f(p("download-excel"),k),j=f(p("uni-th"),C),q=f(p("uni-tr"),m),I=f(p("uni-td"),b),L=y,V=f(p("uni-table"),x),U=f(p("uni-pagination"),w),B=f(p("unicloud-db"),S);return n(),l(z,null,{default:i((()=>[s(z,{class:"uni-header"},{default:i((()=>[s(z,{class:"uni-group"},{default:i((()=>[s(z,{class:"uni-title"}),s(z,{class:"uni-sub-title"})])),_:1}),s(z,{class:"uni-group"},{default:i((()=>[s(F,{class:"uni-search",type:"text",modelValue:D.query,"onUpdate:modelValue":t[0]||(t[0]=e=>D.query=e),onConfirm:$.search,placeholder:"请输入搜索内容"},null,8,["modelValue","onConfirm"]),s(T,{class:"uni-button",type:"default",size:"mini",onClick:$.search},{default:i((()=>[o("搜索")])),_:1},8,["onClick"]),s(T,{class:"uni-button",type:"default",size:"mini",onClick:t[1]||(t[1]=e=>$.navigateTo("./add"))},{default:i((()=>[o("新增")])),_:1}),s(T,{class:"uni-button",type:"default",size:"mini",disabled:!D.selectedIndexs.length,onClick:$.delTable},{default:i((()=>[o("批量删除")])),_:1},8,["disabled","onClick"]),s(E,{class:"hide-on-phone",fields:D.exportExcel.fields,data:D.exportExcelData,type:D.exportExcel.type,name:D.exportExcel.filename},{default:i((()=>[s(T,{class:"uni-button",type:"primary",size:"mini"},{default:i((()=>[o("导出 Excel")])),_:1})])),_:1},8,["fields","data","type","name"])])),_:1})])),_:1}),s(z,{class:"uni-container"},{default:i((()=>[s(B,{ref:"udb",collection:D.collectionList,field:"title,content,start_date,end_date,owner_id,background_picture,place,status,contact,invitee",where:D.where,"page-data":"replace",orderby:D.orderby,getcount:!0,"page-size":D.options.pageSize,"page-current":D.options.pageCurrent,options:D.options,loadtime:"manual",onLoad:$.onqueryload},{default:i((({data:e,pagination:a,loading:r,error:h,options:g})=>[s(V,{ref:"table",loading:r,emptyText:h.message||"没有更多数据",border:"",stripe:"",type:"selection",onSelectionChange:$.selectionChange},{default:i((()=>[s(q,null,{default:i((()=>[s(j,{align:"center","filter-type":"search",onFilterChange:t[2]||(t[2]=e=>$.filterChange(e,"title")),sortable:"",onSortChange:t[3]||(t[3]=e=>$.sortChange(e,"title"))},{default:i((()=>[o("标题")])),_:1}),s(j,{align:"center","filter-type":"search",onFilterChange:t[4]||(t[4]=e=>$.filterChange(e,"content")),sortable:"",onSortChange:t[5]||(t[5]=e=>$.sortChange(e,"content"))},{default:i((()=>[o("内容")])),_:1}),s(j,{align:"center","filter-type":"search",onFilterChange:t[6]||(t[6]=e=>$.filterChange(e,"start_date")),sortable:"",onSortChange:t[7]||(t[7]=e=>$.sortChange(e,"start_date"))},{default:i((()=>[o("开始时间")])),_:1}),s(j,{align:"center","filter-type":"search",onFilterChange:t[8]||(t[8]=e=>$.filterChange(e,"end_date")),sortable:"",onSortChange:t[9]||(t[9]=e=>$.sortChange(e,"end_date"))},{default:i((()=>[o("结束时间")])),_:1}),s(j,{align:"center",sortable:"",onSortChange:t[10]||(t[10]=e=>$.sortChange(e,"owner_id"))},{default:i((()=>[o("发布者id")])),_:1}),s(j,{align:"center","filter-type":"search",onFilterChange:t[11]||(t[11]=e=>$.filterChange(e,"background_picture")),sortable:"",onSortChange:t[12]||(t[12]=e=>$.sortChange(e,"background_picture"))},{default:i((()=>[o("背景图片")])),_:1}),s(j,{align:"center","filter-type":"search",onFilterChange:t[13]||(t[13]=e=>$.filterChange(e,"place")),sortable:"",onSortChange:t[14]||(t[14]=e=>$.sortChange(e,"place"))},{default:i((()=>[o("地点")])),_:1}),s(j,{align:"center",sortable:"",onSortChange:t[15]||(t[15]=e=>$.sortChange(e,"status"))},{default:i((()=>[o("活动状态")])),_:1}),s(j,{align:"center","filter-type":"search",onFilterChange:t[16]||(t[16]=e=>$.filterChange(e,"contact")),sortable:"",onSortChange:t[17]||(t[17]=e=>$.sortChange(e,"contact"))},{default:i((()=>[o("联系方式")])),_:1}),s(j,{align:"center","filter-type":"search",onFilterChange:t[18]||(t[18]=e=>$.filterChange(e,"invitee")),sortable:"",onSortChange:t[19]||(t[19]=e=>$.sortChange(e,"invitee"))},{default:i((()=>[o("面向对象")])),_:1}),s(j,{align:"center"},{default:i((()=>[o("操作")])),_:1})])),_:1}),(n(!0),d(u,null,c(e,((e,t)=>(n(),l(q,{key:t},{default:i((()=>[s(I,{align:"center"},{default:i((()=>[o(_(e.title),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[o(_(e.content),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[o(_(e.start_date),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[o(_(e.end_date),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[o(_(e.owner_id),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[s(L,{src:e.background_picture,style:{width:"120px",height:"80px"}},null,8,["src"])])),_:2},1024),s(I,{align:"center"},{default:i((()=>[o(_(e.place),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[o(_(e.status),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[o(_(e.contact),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[o(_(e.invitee),1)])),_:2},1024),s(I,{align:"center"},{default:i((()=>[s(z,{class:"uni-group"},{default:i((()=>[s(T,{onClick:t=>$.navigateTo("./edit?id="+e._id,!1),class:"uni-button",size:"mini",type:"primary"},{default:i((()=>[o("修改")])),_:2},1032,["onClick"]),s(T,{onClick:t=>$.confirmDelete(e._id),class:"uni-button",size:"mini",type:"warn"},{default:i((()=>[o("删除")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1032,["loading","emptyText","onSelectionChange"]),s(z,{class:"uni-pagination-box"},{default:i((()=>[s(U,{"show-icon":"","page-size":a.size,modelValue:a.current,"onUpdate:modelValue":e=>a.current=e,total:a.count,onChange:$.onPageChanged},null,8,["page-size","modelValue","onUpdate:modelValue","total","onChange"])])),_:2},1024)])),_:1},8,["collection","where","orderby","page-size","page-current","options","onLoad"])])),_:1})])),_:1})}]]);export{T as default};
import{_ as a,L as e,N as t,O as l,s as o,G as n,y as d,o as m,c as u,w as r,i as s,a as i,d as f,f as c,g as p,q as _,X as V}from"./index-389238f5.js";import{_ as h}from"./uni-easyinput.a1fc57c1.js";import{_ as D}from"./uni-forms-item.69698491.js";import{_ as b}from"./uni-forms.bc4bcf6e.js";import{v as y}from"./mustgo-team-activity.f91e8a14.js";const g=e.database();g.command;function U(a){let e={};for(let t in y)a.includes(t)&&(e[t]=y[t]);return e}const w=a({data(){let a={title:"",content:"",start_date:"",end_date:"",owner_id:"",place:"",status:null,participants:null,contact:"",team_id:""};return{formData:a,formOptions:{},rules:{...U(Object.keys(a))}}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((a=>this.submitForm(a))).catch((()=>{})).finally((()=>{l()}))},submitForm(a){return g.collection("mustgo-team-activity").add(a).then((a=>{o({title:"新增成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((a=>{d({content:a.message||"请求服务失败",showCancel:!1})}))}}},[["render",function(a,e,t,l,o,n){const d=c(p("uni-easyinput"),h),y=c(p("uni-forms-item"),D),g=_,U=V,w=s,v=c(p("uni-forms"),b);return m(),u(w,{class:"uni-container"},{default:r((()=>[i(v,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:r((()=>[i(y,{name:"title",label:"标题"},{default:r((()=>[i(d,{placeholder:"小队活动标题",modelValue:o.formData.title,"onUpdate:modelValue":e[0]||(e[0]=a=>o.formData.title=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"content",label:"内容"},{default:r((()=>[i(d,{placeholder:"小队活动内容",modelValue:o.formData.content,"onUpdate:modelValue":e[1]||(e[1]=a=>o.formData.content=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"start_date",label:"开始时间"},{default:r((()=>[i(d,{placeholder:"小队活动开始时间",modelValue:o.formData.start_date,"onUpdate:modelValue":e[2]||(e[2]=a=>o.formData.start_date=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"end_date",label:"结束时间"},{default:r((()=>[i(d,{placeholder:"小队活动结束时间",modelValue:o.formData.end_date,"onUpdate:modelValue":e[3]||(e[3]=a=>o.formData.end_date=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"owner_id",label:"发布者id"},{default:r((()=>[i(d,{placeholder:"小队活动发布者id",modelValue:o.formData.owner_id,"onUpdate:modelValue":e[4]||(e[4]=a=>o.formData.owner_id=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"place",label:"地点"},{default:r((()=>[i(d,{placeholder:"小队活动地点",modelValue:o.formData.place,"onUpdate:modelValue":e[5]||(e[5]=a=>o.formData.place=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"status",label:"活动状态"},{default:r((()=>[i(d,{placeholder:"小队活动状态",type:"number",modelValue:o.formData.status,"onUpdate:modelValue":e[6]||(e[6]=a=>o.formData.status=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"participants",label:"参与人数"},{default:r((()=>[i(d,{placeholder:"小队活动参与人数",type:"number",modelValue:o.formData.participants,"onUpdate:modelValue":e[7]||(e[7]=a=>o.formData.participants=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"contact",label:"联系方式"},{default:r((()=>[i(d,{placeholder:"小队活动发布者联系方式",modelValue:o.formData.contact,"onUpdate:modelValue":e[8]||(e[8]=a=>o.formData.contact=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"team_id",label:"小队id"},{default:r((()=>[i(d,{placeholder:"活动所属小队id",modelValue:o.formData.team_id,"onUpdate:modelValue":e[9]||(e[9]=a=>o.formData.team_id=a)},null,8,["modelValue"])])),_:1}),i(w,{class:"uni-button-group"},{default:r((()=>[i(g,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:r((()=>[f("提交")])),_:1},8,["onClick"]),i(U,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:r((()=>[i(g,{class:"uni-button",style:{width:"100px"}},{default:r((()=>[f("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{w as default};
import{_ as a,L as e,N as t,O as l,s as o,G as n,y as d,o as m,c as s,w as r,i as u,a as i,d as c,f,g as p,q as _,X as h}from"./index-389238f5.js";import{_ as V}from"./uni-easyinput.a1fc57c1.js";import{_ as D}from"./uni-forms-item.69698491.js";import{_ as b}from"./uni-forms.bc4bcf6e.js";import{v as y}from"./mustgo-team-activity.f91e8a14.js";const g=e.database();g.command;const w="mustgo-team-activity";function U(a){let e={};for(let t in y)a.includes(t)&&(e[t]=y[t]);return e}const k=a({data(){let a={title:"",content:"",start_date:"",end_date:"",owner_id:"",background_picture:"",place:"",status:null,participants:null,contact:"",team_id:""};return{formData:a,formOptions:{},rules:{...U(Object.keys(a))}}},onLoad(a){if(a.id){const e=a.id;this.formDataId=e,this.getDetail(e)}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((a=>this.submitForm(a))).catch((()=>{})).finally((()=>{l()}))},submitForm(a){return g.collection(w).doc(this.formDataId).update(a).then((a=>{o({title:"修改成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((a=>{d({content:a.message||"请求服务失败",showCancel:!1})}))},getDetail(a){t({mask:!0}),g.collection(w).doc(a).field("title,content,start_date,end_date,owner_id,background_picture,place,status,participants,contact,team_id").get().then((a=>{const e=a.result.data[0];e&&(this.formData=e)})).catch((a=>{d({content:a.message||"请求服务失败",showCancel:!1})})).finally((()=>{l()}))}}},[["render",function(a,e,t,l,o,n){const d=f(p("uni-easyinput"),V),y=f(p("uni-forms-item"),D),g=_,w=h,U=u,k=f(p("uni-forms"),b);return m(),s(U,{class:"uni-container"},{default:r((()=>[i(k,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:r((()=>[i(y,{name:"title",label:"标题"},{default:r((()=>[i(d,{placeholder:"小队活动标题",modelValue:o.formData.title,"onUpdate:modelValue":e[0]||(e[0]=a=>o.formData.title=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"content",label:"内容"},{default:r((()=>[i(d,{placeholder:"小队活动内容",modelValue:o.formData.content,"onUpdate:modelValue":e[1]||(e[1]=a=>o.formData.content=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"start_date",label:"开始时间"},{default:r((()=>[i(d,{placeholder:"小队活动开始时间",modelValue:o.formData.start_date,"onUpdate:modelValue":e[2]||(e[2]=a=>o.formData.start_date=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"end_date",label:"结束时间"},{default:r((()=>[i(d,{placeholder:"小队活动结束时间",modelValue:o.formData.end_date,"onUpdate:modelValue":e[3]||(e[3]=a=>o.formData.end_date=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"owner_id",label:"发布者id"},{default:r((()=>[i(d,{placeholder:"小队活动发布者id",modelValue:o.formData.owner_id,"onUpdate:modelValue":e[4]||(e[4]=a=>o.formData.owner_id=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"place",label:"地点"},{default:r((()=>[i(d,{placeholder:"小队活动地点",modelValue:o.formData.place,"onUpdate:modelValue":e[5]||(e[5]=a=>o.formData.place=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"status",label:"活动状态"},{default:r((()=>[i(d,{placeholder:"小队活动状态",type:"number",modelValue:o.formData.status,"onUpdate:modelValue":e[6]||(e[6]=a=>o.formData.status=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"participants",label:"参与人数"},{default:r((()=>[i(d,{placeholder:"小队活动参与人数",type:"number",modelValue:o.formData.participants,"onUpdate:modelValue":e[7]||(e[7]=a=>o.formData.participants=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"contact",label:"联系方式"},{default:r((()=>[i(d,{placeholder:"小队活动发布者联系方式",modelValue:o.formData.contact,"onUpdate:modelValue":e[8]||(e[8]=a=>o.formData.contact=a)},null,8,["modelValue"])])),_:1}),i(y,{name:"team_id",label:"小队id"},{default:r((()=>[i(d,{placeholder:"活动所属小队id",modelValue:o.formData.team_id,"onUpdate:modelValue":e[9]||(e[9]=a=>o.formData.team_id=a)},null,8,["modelValue"])])),_:1}),i(U,{class:"uni-button-group"},{default:r((()=>[i(g,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:r((()=>[c("提交")])),_:1},8,["onClick"]),i(w,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:r((()=>[i(g,{class:"uni-button",style:{width:"100px"}},{default:r((()=>[c("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{k as default};
import{_ as e,L as t,n as a,o as n,c as i,w as l,i as r,a as s,d as o,e as d,r as c,F as u,M as h,q as g,f,g as p,t as _,h as m,j as C,k as b,l as y}from"./index-389238f5.js";import{_ as x}from"./download-excel.9236b5ca.js";import{_ as S}from"./uni-pagination.018f31ea.js";import{_ as w}from"./unicloud-db.dfa2c90d.js";import{e as k,f as D}from"./mustgo-team-activity.f91e8a14.js";const $=t.database(),z=[],v={ascending:"asc",descending:"desc"};const T=e({data:()=>({collectionList:"mustgo-team-activity",query:"",where:"",orderby:"",orderByFieldName:"",selectedIndexs:[],options:{pageSize:20,pageCurrent:1,filterData:{},...k},imageStyles:{width:64,height:64},exportExcel:{filename:"mustgo-team-activity.xls",type:"xls",fields:{"标题":"title","内容":"content","开始时间":"start_date","结束时间":"end_date","发布者id":"owner_id","地点":"place","活动状态":"status","参与人数":"participants","联系方式":"contact","小队id":"team_id"}},exportExcelData:[]}),onLoad(){this._filter={}},onReady(){this.$refs.udb.loadData()},methods:{onqueryload(e){this.exportExcelData=e},getWhere(){const e=this.query.trim();if(!e)return"";const t=new RegExp(e,"i");return z.map((e=>t+".test("+e+")")).join(" || ")},search(){const e=this.getWhere();this.where=e,this.$nextTick((()=>{this.loadData()}))},loadData(e=!0){this.$refs.udb.loadData({clear:e})},onPageChanged(e){this.selectedIndexs.length=0,this.$refs.table.clearSelection(),this.$refs.udb.loadData({current:e.current})},navigateTo(e,t){a({url:e,events:{refreshData:()=>{this.loadData(t)}}})},selectedItems(){var e=this.$refs.udb.dataList;return this.selectedIndexs.map((t=>e[t]._id))},delTable(){this.$refs.udb.remove(this.selectedItems(),{success:e=>{this.$refs.table.clearSelection()}})},selectionChange(e){this.selectedIndexs=e.detail.index},confirmDelete(e){this.$refs.udb.remove(e,{success:e=>{this.$refs.table.clearSelection()}})},sortChange(e,t){this.orderByFieldName=t,e.order?this.orderby=t+" "+v[e.order]:this.orderby="",this.$refs.table.clearSelection(),this.$nextTick((()=>{this.$refs.udb.loadData()}))},filterChange(e,t){this._filter[t]={type:e.filterType,value:e.filter};let a=D(this._filter,$.command);Object.keys(a).length?this.where=a:this.where="",this.$nextTick((()=>{this.$refs.udb.loadData()}))}}},[["render",function(e,t,a,k,D,$){const z=r,v=h,T=g,E=f(p("download-excel"),x),F=f(p("uni-th"),m),j=f(p("uni-tr"),C),q=f(p("uni-td"),b),I=f(p("uni-table"),y),L=f(p("uni-pagination"),S),V=f(p("unicloud-db"),w);return n(),i(z,null,{default:l((()=>[s(z,{class:"uni-header"},{default:l((()=>[s(z,{class:"uni-group"},{default:l((()=>[s(z,{class:"uni-title"}),s(z,{class:"uni-sub-title"})])),_:1}),s(z,{class:"uni-group"},{default:l((()=>[s(v,{class:"uni-search",type:"text",modelValue:D.query,"onUpdate:modelValue":t[0]||(t[0]=e=>D.query=e),onConfirm:$.search,placeholder:"请输入搜索内容"},null,8,["modelValue","onConfirm"]),s(T,{class:"uni-button",type:"default",size:"mini",onClick:$.search},{default:l((()=>[o("搜索")])),_:1},8,["onClick"]),s(T,{class:"uni-button",type:"default",size:"mini",onClick:t[1]||(t[1]=e=>$.navigateTo("./add"))},{default:l((()=>[o("新增")])),_:1}),s(T,{class:"uni-button",type:"default",size:"mini",disabled:!D.selectedIndexs.length,onClick:$.delTable},{default:l((()=>[o("批量删除")])),_:1},8,["disabled","onClick"]),s(E,{class:"hide-on-phone",fields:D.exportExcel.fields,data:D.exportExcelData,type:D.exportExcel.type,name:D.exportExcel.filename},{default:l((()=>[s(T,{class:"uni-button",type:"primary",size:"mini"},{default:l((()=>[o("导出 Excel")])),_:1})])),_:1},8,["fields","data","type","name"])])),_:1})])),_:1}),s(z,{class:"uni-container"},{default:l((()=>[s(V,{ref:"udb",collection:D.collectionList,field:"title,content,start_date,end_date,owner_id,background_picture,place,status,participants,contact,team_id",where:D.where,"page-data":"replace",orderby:D.orderby,getcount:!0,"page-size":D.options.pageSize,"page-current":D.options.pageCurrent,options:D.options,loadtime:"manual",onLoad:$.onqueryload},{default:l((({data:e,pagination:a,loading:r,error:h,options:g})=>[s(I,{ref:"table",loading:r,emptyText:h.message||"没有更多数据",border:"",stripe:"",type:"selection",onSelectionChange:$.selectionChange},{default:l((()=>[s(j,null,{default:l((()=>[s(F,{align:"center","filter-type":"search",onFilterChange:t[2]||(t[2]=e=>$.filterChange(e,"title")),sortable:"",onSortChange:t[3]||(t[3]=e=>$.sortChange(e,"title"))},{default:l((()=>[o("标题")])),_:1}),s(F,{align:"center","filter-type":"search",onFilterChange:t[4]||(t[4]=e=>$.filterChange(e,"content")),sortable:"",onSortChange:t[5]||(t[5]=e=>$.sortChange(e,"content"))},{default:l((()=>[o("内容")])),_:1}),s(F,{align:"center","filter-type":"search",onFilterChange:t[6]||(t[6]=e=>$.filterChange(e,"start_date")),sortable:"",onSortChange:t[7]||(t[7]=e=>$.sortChange(e,"start_date"))},{default:l((()=>[o("开始时间")])),_:1}),s(F,{align:"center","filter-type":"search",onFilterChange:t[8]||(t[8]=e=>$.filterChange(e,"end_date")),sortable:"",onSortChange:t[9]||(t[9]=e=>$.sortChange(e,"end_date"))},{default:l((()=>[o("结束时间")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[10]||(t[10]=e=>$.sortChange(e,"owner_id"))},{default:l((()=>[o("发布者id")])),_:1}),s(F,{align:"center","filter-type":"search",onFilterChange:t[11]||(t[11]=e=>$.filterChange(e,"place")),sortable:"",onSortChange:t[12]||(t[12]=e=>$.sortChange(e,"place"))},{default:l((()=>[o("地点")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[13]||(t[13]=e=>$.sortChange(e,"status"))},{default:l((()=>[o("活动状态")])),_:1}),s(F,{align:"center","filter-type":"range",onFilterChange:t[14]||(t[14]=e=>$.filterChange(e,"participants")),sortable:"",onSortChange:t[15]||(t[15]=e=>$.sortChange(e,"participants"))},{default:l((()=>[o("参与人数")])),_:1}),s(F,{align:"center","filter-type":"search",onFilterChange:t[16]||(t[16]=e=>$.filterChange(e,"contact")),sortable:"",onSortChange:t[17]||(t[17]=e=>$.sortChange(e,"contact"))},{default:l((()=>[o("联系方式")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[18]||(t[18]=e=>$.sortChange(e,"team_id"))},{default:l((()=>[o("小队id")])),_:1}),s(F,{align:"center"},{default:l((()=>[o("操作")])),_:1})])),_:1}),(n(!0),d(u,null,c(e,((e,t)=>(n(),i(j,{key:t},{default:l((()=>[s(q,{align:"center"},{default:l((()=>[o(_(e.title),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.content),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.start_date),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.end_date),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.owner_id),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.place),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.status),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.participants),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.contact),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[o(_(e.team_id),1)])),_:2},1024),s(q,{align:"center"},{default:l((()=>[s(z,{class:"uni-group"},{default:l((()=>[s(T,{onClick:t=>$.navigateTo("./edit?id="+e._id,!1),class:"uni-button",size:"mini",type:"primary"},{default:l((()=>[o("修改")])),_:2},1032,["onClick"]),s(T,{onClick:t=>$.confirmDelete(e._id),class:"uni-button",size:"mini",type:"warn"},{default:l((()=>[o("删除")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1032,["loading","emptyText","onSelectionChange"]),s(z,{class:"uni-pagination-box"},{default:l((()=>[s(L,{"show-icon":"","page-size":a.size,modelValue:a.current,"onUpdate:modelValue":e=>a.current=e,total:a.count,onChange:$.onPageChanged},null,8,["page-size","modelValue","onUpdate:modelValue","total","onChange"])])),_:2},1024)])),_:1},8,["collection","where","orderby","page-size","page-current","options","onLoad"])])),_:1})])),_:1})}]]);export{T as default};
import{_ as e,L as a,N as t,O as l,s as o,G as s,y as n,o as m,c as d,w as u,i as r,a as i,d as f,f as c,g as p,R as _,q as h,X as b}from"./index-389238f5.js";import{_ as k}from"./uni-easyinput.a1fc57c1.js";import{_ as V}from"./uni-forms-item.69698491.js";import{_ as D}from"./uni-forms.bc4bcf6e.js";import{v as y}from"./mustgo-post-comment.6f761277.js";const g=a.database();g.command;function w(e){let a={};for(let t in y)e.includes(t)&&(a[t]=y[t]);return a}const j=e({data(){let e={owner_id:"",date:"",likes:null,post_id:"",check_status:null,content:""};return{formData:e,formOptions:{},rules:{...w(Object.keys(e))}}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return g.collection("mustgo-post-comment").add(e).then((e=>{o({title:"新增成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>s()),500)})).catch((e=>{n({content:e.message||"请求服务失败",showCancel:!1})}))}}},[["render",function(e,a,t,l,o,s){const n=c(p("uni-easyinput"),k),y=c(p("uni-forms-item"),V),g=_,w=h,j=b,v=r,x=c(p("uni-forms"),D);return m(),d(v,{class:"uni-container"},{default:u((()=>[i(x,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:u((()=>[i(y,{name:"owner_id",label:"评论人id"},{default:u((()=>[i(n,{placeholder:"评论人id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"date",label:"发布时间"},{default:u((()=>[i(n,{placeholder:"评论发布时间",modelValue:o.formData.date,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.date=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"likes",label:"点赞数"},{default:u((()=>[i(n,{placeholder:"评论点赞数",type:"number",modelValue:o.formData.likes,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.likes=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"post_id",label:"帖子id"},{default:u((()=>[i(n,{placeholder:"帖子id",modelValue:o.formData.post_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.post_id=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"check_status",label:"状态"},{default:u((()=>[i(g,{onChange:a[4]||(a[4]=a=>e.binddata("check_status",a.detail.value)),checked:o.formData.check_status},null,8,["checked"])])),_:1}),i(y,{name:"content",label:"评论内容"},{default:u((()=>[i(n,{placeholder:"评论内容",modelValue:o.formData.content,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.content=e)},null,8,["modelValue"])])),_:1}),i(v,{class:"uni-button-group"},{default:u((()=>[i(w,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:s.submit},{default:u((()=>[f("提交")])),_:1},8,["onClick"]),i(j,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:u((()=>[i(w,{class:"uni-button",style:{width:"100px"}},{default:u((()=>[f("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{j as default};
import{_ as e,L as a,N as t,O as l,s as o,G as s,y as n,o as d,c as i,w as m,i as u,a as r,d as c,f,g as p,R as h,q as _,X as D}from"./index-389238f5.js";import{_ as b}from"./uni-easyinput.a1fc57c1.js";import{_ as k}from"./uni-forms-item.69698491.js";import{_ as g}from"./uni-forms.bc4bcf6e.js";import{v as V}from"./mustgo-post-comment.6f761277.js";const y=a.database();y.command;const w="mustgo-post-comment";function j(e){let a={};for(let t in V)e.includes(t)&&(a[t]=V[t]);return a}const v=e({data(){let e={owner_id:"",date:"",likes:null,post_id:"",check_status:null,content:""};return{formData:e,formOptions:{},rules:{...j(Object.keys(e))}}},onLoad(e){if(e.id){const a=e.id;this.formDataId=a,this.getDetail(a)}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return y.collection(w).doc(this.formDataId).update(e).then((e=>{o({title:"修改成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>s()),500)})).catch((e=>{n({content:e.message||"请求服务失败",showCancel:!1})}))},getDetail(e){t({mask:!0}),y.collection(w).doc(e).field("owner_id,date,likes,post_id,check_status,content").get().then((e=>{const a=e.result.data[0];a&&(this.formData=a)})).catch((e=>{n({content:e.message||"请求服务失败",showCancel:!1})})).finally((()=>{l()}))}}},[["render",function(e,a,t,l,o,s){const n=f(p("uni-easyinput"),b),V=f(p("uni-forms-item"),k),y=h,w=_,j=D,v=u,C=f(p("uni-forms"),g);return d(),i(v,{class:"uni-container"},{default:m((()=>[r(C,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:m((()=>[r(V,{name:"owner_id",label:"评论人id"},{default:m((()=>[r(n,{placeholder:"评论人id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),r(V,{name:"date",label:"发布时间"},{default:m((()=>[r(n,{placeholder:"评论发布时间",modelValue:o.formData.date,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.date=e)},null,8,["modelValue"])])),_:1}),r(V,{name:"likes",label:"点赞数"},{default:m((()=>[r(n,{placeholder:"评论点赞数",type:"number",modelValue:o.formData.likes,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.likes=e)},null,8,["modelValue"])])),_:1}),r(V,{name:"post_id",label:"帖子id"},{default:m((()=>[r(n,{placeholder:"帖子id",modelValue:o.formData.post_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.post_id=e)},null,8,["modelValue"])])),_:1}),r(V,{name:"check_status",label:"状态"},{default:m((()=>[r(y,{onChange:a[4]||(a[4]=a=>e.binddata("check_status",a.detail.value)),checked:o.formData.check_status},null,8,["checked"])])),_:1}),r(V,{name:"content",label:"评论内容"},{default:m((()=>[r(n,{placeholder:"评论内容",modelValue:o.formData.content,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.content=e)},null,8,["modelValue"])])),_:1}),r(v,{class:"uni-button-group"},{default:m((()=>[r(w,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:s.submit},{default:m((()=>[c("提交")])),_:1},8,["onClick"]),r(j,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:m((()=>[r(w,{class:"uni-button",style:{width:"100px"}},{default:m((()=>[c("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{v as default};
import{_ as e,L as t,n as a,o as n,c as i,w as l,i as s,a as o,d as r,e as d,r as c,F as u,M as h,q as g,f,g as p,t as m,h as _,j as b,k as C,l as y}from"./index-389238f5.js";import{_ as x}from"./download-excel.9236b5ca.js";import{_ as k}from"./uni-pagination.018f31ea.js";import{_ as w}from"./unicloud-db.dfa2c90d.js";import{e as D,f as $}from"./mustgo-post-comment.6f761277.js";const S=t.database(),z=[],T={ascending:"asc",descending:"desc"};const E=e({data:()=>({collectionList:"mustgo-post-comment",query:"",where:"",orderby:"",orderByFieldName:"",selectedIndexs:[],options:{pageSize:20,pageCurrent:1,filterData:{},...D},imageStyles:{width:64,height:64},exportExcel:{filename:"mustgo-post-comment.xls",type:"xls",fields:{"评论人id":"owner_id","发布时间":"date","点赞数":"likes","帖子id":"post_id","状态":"check_status","评论内容":"content"}},exportExcelData:[]}),onLoad(){this._filter={}},onReady(){this.$refs.udb.loadData()},methods:{onqueryload(e){this.exportExcelData=e},getWhere(){const e=this.query.trim();if(!e)return"";const t=new RegExp(e,"i");return z.map((e=>t+".test("+e+")")).join(" || ")},search(){const e=this.getWhere();this.where=e,this.$nextTick((()=>{this.loadData()}))},loadData(e=!0){this.$refs.udb.loadData({clear:e})},onPageChanged(e){this.selectedIndexs.length=0,this.$refs.table.clearSelection(),this.$refs.udb.loadData({current:e.current})},navigateTo(e,t){a({url:e,events:{refreshData:()=>{this.loadData(t)}}})},selectedItems(){var e=this.$refs.udb.dataList;return this.selectedIndexs.map((t=>e[t]._id))},delTable(){this.$refs.udb.remove(this.selectedItems(),{success:e=>{this.$refs.table.clearSelection()}})},selectionChange(e){this.selectedIndexs=e.detail.index},confirmDelete(e){this.$refs.udb.remove(e,{success:e=>{this.$refs.table.clearSelection()}})},sortChange(e,t){this.orderByFieldName=t,e.order?this.orderby=t+" "+T[e.order]:this.orderby="",this.$refs.table.clearSelection(),this.$nextTick((()=>{this.$refs.udb.loadData()}))},filterChange(e,t){this._filter[t]={type:e.filterType,value:e.filter};let a=$(this._filter,S.command);Object.keys(a).length?this.where=a:this.where="",this.$nextTick((()=>{this.$refs.udb.loadData()}))}}},[["render",function(e,t,a,D,$,S){const z=s,T=h,E=g,j=f(p("download-excel"),x),v=f(p("uni-th"),_),q=f(p("uni-tr"),b),I=f(p("uni-td"),C),L=f(p("uni-table"),y),V=f(p("uni-pagination"),k),F=f(p("unicloud-db"),w);return n(),i(z,null,{default:l((()=>[o(z,{class:"uni-header"},{default:l((()=>[o(z,{class:"uni-group"},{default:l((()=>[o(z,{class:"uni-title"}),o(z,{class:"uni-sub-title"})])),_:1}),o(z,{class:"uni-group"},{default:l((()=>[o(T,{class:"uni-search",type:"text",modelValue:$.query,"onUpdate:modelValue":t[0]||(t[0]=e=>$.query=e),onConfirm:S.search,placeholder:"请输入搜索内容"},null,8,["modelValue","onConfirm"]),o(E,{class:"uni-button",type:"default",size:"mini",onClick:S.search},{default:l((()=>[r("搜索")])),_:1},8,["onClick"]),o(E,{class:"uni-button",type:"default",size:"mini",onClick:t[1]||(t[1]=e=>S.navigateTo("./add"))},{default:l((()=>[r("新增")])),_:1}),o(E,{class:"uni-button",type:"default",size:"mini",disabled:!$.selectedIndexs.length,onClick:S.delTable},{default:l((()=>[r("批量删除")])),_:1},8,["disabled","onClick"]),o(j,{class:"hide-on-phone",fields:$.exportExcel.fields,data:$.exportExcelData,type:$.exportExcel.type,name:$.exportExcel.filename},{default:l((()=>[o(E,{class:"uni-button",type:"primary",size:"mini"},{default:l((()=>[r("导出 Excel")])),_:1})])),_:1},8,["fields","data","type","name"])])),_:1})])),_:1}),o(z,{class:"uni-container"},{default:l((()=>[o(F,{ref:"udb",collection:$.collectionList,field:"owner_id,date,likes,post_id,check_status,content",where:$.where,"page-data":"replace",orderby:$.orderby,getcount:!0,"page-size":$.options.pageSize,"page-current":$.options.pageCurrent,options:$.options,loadtime:"manual",onLoad:S.onqueryload},{default:l((({data:e,pagination:a,loading:s,error:h,options:g})=>[o(L,{ref:"table",loading:s,emptyText:h.message||"没有更多数据",border:"",stripe:"",type:"selection",onSelectionChange:S.selectionChange},{default:l((()=>[o(q,null,{default:l((()=>[o(v,{align:"center",sortable:"",onSortChange:t[2]||(t[2]=e=>S.sortChange(e,"owner_id"))},{default:l((()=>[r("评论人id")])),_:1}),o(v,{align:"center","filter-type":"search",onFilterChange:t[3]||(t[3]=e=>S.filterChange(e,"date")),sortable:"",onSortChange:t[4]||(t[4]=e=>S.sortChange(e,"date"))},{default:l((()=>[r("发布时间")])),_:1}),o(v,{align:"center","filter-type":"range",onFilterChange:t[5]||(t[5]=e=>S.filterChange(e,"likes")),sortable:"",onSortChange:t[6]||(t[6]=e=>S.sortChange(e,"likes"))},{default:l((()=>[r("点赞数")])),_:1}),o(v,{align:"center",sortable:"",onSortChange:t[7]||(t[7]=e=>S.sortChange(e,"post_id"))},{default:l((()=>[r("帖子id")])),_:1}),o(v,{align:"center",sortable:"",onSortChange:t[8]||(t[8]=e=>S.sortChange(e,"check_status"))},{default:l((()=>[r("状态")])),_:1}),o(v,{align:"center","filter-type":"search",onFilterChange:t[9]||(t[9]=e=>S.filterChange(e,"content")),sortable:"",onSortChange:t[10]||(t[10]=e=>S.sortChange(e,"content"))},{default:l((()=>[r("评论内容")])),_:1}),o(v,{align:"center"},{default:l((()=>[r("操作")])),_:1})])),_:1}),(n(!0),d(u,null,c(e,((e,t)=>(n(),i(q,{key:t},{default:l((()=>[o(I,{align:"center"},{default:l((()=>[r(m(e.owner_id),1)])),_:2},1024),o(I,{align:"center"},{default:l((()=>[r(m(e.date),1)])),_:2},1024),o(I,{align:"center"},{default:l((()=>[r(m(e.likes),1)])),_:2},1024),o(I,{align:"center"},{default:l((()=>[r(m(e.post_id),1)])),_:2},1024),o(I,{align:"center"},{default:l((()=>[r(m(1==e.check_status?"":""),1)])),_:2},1024),o(I,{align:"center"},{default:l((()=>[r(m(e.content),1)])),_:2},1024),o(I,{align:"center"},{default:l((()=>[o(z,{class:"uni-group"},{default:l((()=>[o(E,{onClick:t=>S.navigateTo("./edit?id="+e._id,!1),class:"uni-button",size:"mini",type:"primary"},{default:l((()=>[r("修改")])),_:2},1032,["onClick"]),o(E,{onClick:t=>S.confirmDelete(e._id),class:"uni-button",size:"mini",type:"warn"},{default:l((()=>[r("删除")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1032,["loading","emptyText","onSelectionChange"]),o(z,{class:"uni-pagination-box"},{default:l((()=>[o(V,{"show-icon":"","page-size":a.size,modelValue:a.current,"onUpdate:modelValue":e=>a.current=e,total:a.count,onChange:S.onPageChanged},null,8,["page-size","modelValue","onUpdate:modelValue","total","onChange"])])),_:2},1024)])),_:1},8,["collection","where","orderby","page-size","page-current","options","onLoad"])])),_:1})])),_:1})}]]);export{E as default};
import{_ as e,L as a,N as t,O as l,s as o,G as n,y as m,o as s,c as u,w as r,i as d,a as i,d as c,f,g as p,R as _,q as h,X as b}from"./index-389238f5.js";import{_ as V}from"./uni-easyinput.a1fc57c1.js";import{_ as k}from"./uni-forms-item.69698491.js";import{_ as D}from"./uni-data-checkbox.b1dd95fe.js";import{_ as y}from"./uni-forms.bc4bcf6e.js";import{v as g}from"./mustgo-post.8570f775.js";import"./uni-load-more.67944ae0.js";const j=a.database();j.command;function w(e){let a={};for(let t in g)e.includes(t)&&(a[t]=g[t]);return a}const x=e({data(){let e={content:"",date:"",likes:null,owner_id:"",check_status:null,comment_num:null,url:[]};return{formData:e,formOptions:{},rules:{...w(Object.keys(e))}}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return j.collection("mustgo-post").add(e).then((e=>{o({title:"新增成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((e=>{m({content:e.message||"请求服务失败",showCancel:!1})}))}}},[["render",function(e,a,t,l,o,n){const m=f(p("uni-easyinput"),V),g=f(p("uni-forms-item"),k),j=_,w=f(p("uni-data-checkbox"),D),x=h,v=b,U=d,C=f(p("uni-forms"),y);return s(),u(U,{class:"uni-container"},{default:r((()=>[i(C,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:r((()=>[i(g,{name:"content",label:"内容"},{default:r((()=>[i(m,{placeholder:"帖子内容",modelValue:o.formData.content,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.content=e)},null,8,["modelValue"])])),_:1}),i(g,{name:"date",label:"发布时间"},{default:r((()=>[i(m,{placeholder:"帖子发布时间",modelValue:o.formData.date,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.date=e)},null,8,["modelValue"])])),_:1}),i(g,{name:"likes",label:"点赞数"},{default:r((()=>[i(m,{placeholder:"帖子点赞数",type:"number",modelValue:o.formData.likes,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.likes=e)},null,8,["modelValue"])])),_:1}),i(g,{name:"owner_id",label:"发帖人id"},{default:r((()=>[i(m,{placeholder:"发帖人id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),i(g,{name:"check_status",label:"审核状态"},{default:r((()=>[i(j,{onChange:a[4]||(a[4]=a=>e.binddata("check_status",a.detail.value)),checked:o.formData.check_status},null,8,["checked"])])),_:1}),i(g,{name:"comment_num",label:"评论数"},{default:r((()=>[i(m,{placeholder:"帖子评论数",type:"number",modelValue:o.formData.comment_num,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.comment_num=e)},null,8,["modelValue"])])),_:1}),i(g,{name:"url",label:"图片url"},{default:r((()=>[i(w,{multiple:!0,modelValue:o.formData.url,"onUpdate:modelValue":a[6]||(a[6]=e=>o.formData.url=e)},null,8,["modelValue"])])),_:1}),i(U,{class:"uni-button-group"},{default:r((()=>[i(x,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:r((()=>[c("提交")])),_:1},8,["onClick"]),i(v,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:r((()=>[i(x,{class:"uni-button",style:{width:"100px"}},{default:r((()=>[c("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{x as default};
import{_ as e,L as a,N as t,O as l,s as o,G as n,y as s,o as m,c as u,w as d,i as r,a as i,d as c,f,g as h,R as p,q as _,X as b}from"./index-389238f5.js";import{_ as D}from"./uni-easyinput.a1fc57c1.js";import{_ as k}from"./uni-forms-item.69698491.js";import{_ as V}from"./uni-data-checkbox.b1dd95fe.js";import{_ as g}from"./uni-forms.bc4bcf6e.js";import{v as y}from"./mustgo-post.8570f775.js";import"./uni-load-more.67944ae0.js";const w=a.database();w.command;const j="mustgo-post";function x(e){let a={};for(let t in y)e.includes(t)&&(a[t]=y[t]);return a}const v=e({data(){let e={content:"",date:"",likes:null,owner_id:"",check_status:null,comment_num:null,url:[]};return{formData:e,formOptions:{},rules:{...x(Object.keys(e))}}},onLoad(e){if(e.id){const a=e.id;this.formDataId=a,this.getDetail(a)}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return w.collection(j).doc(this.formDataId).update(e).then((e=>{o({title:"修改成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((e=>{s({content:e.message||"请求服务失败",showCancel:!1})}))},getDetail(e){t({mask:!0}),w.collection(j).doc(e).field("content,date,likes,owner_id,check_status,comment_num,url").get().then((e=>{const a=e.result.data[0];a&&(this.formData=a)})).catch((e=>{s({content:e.message||"请求服务失败",showCancel:!1})})).finally((()=>{l()}))}}},[["render",function(e,a,t,l,o,n){const s=f(h("uni-easyinput"),D),y=f(h("uni-forms-item"),k),w=p,j=f(h("uni-data-checkbox"),V),x=_,v=b,C=r,U=f(h("uni-forms"),g);return m(),u(C,{class:"uni-container"},{default:d((()=>[i(U,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:d((()=>[i(y,{name:"content",label:"内容"},{default:d((()=>[i(s,{placeholder:"帖子内容",modelValue:o.formData.content,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.content=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"date",label:"发布时间"},{default:d((()=>[i(s,{placeholder:"帖子发布时间",modelValue:o.formData.date,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.date=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"likes",label:"点赞数"},{default:d((()=>[i(s,{placeholder:"帖子点赞数",type:"number",modelValue:o.formData.likes,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.likes=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"owner_id",label:"发帖人id"},{default:d((()=>[i(s,{placeholder:"发帖人id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"check_status",label:"审核状态"},{default:d((()=>[i(w,{onChange:a[4]||(a[4]=a=>e.binddata("check_status",a.detail.value)),checked:o.formData.check_status},null,8,["checked"])])),_:1}),i(y,{name:"comment_num",label:"评论数"},{default:d((()=>[i(s,{placeholder:"帖子评论数",type:"number",modelValue:o.formData.comment_num,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.comment_num=e)},null,8,["modelValue"])])),_:1}),i(y,{name:"url",label:"图片url"},{default:d((()=>[i(j,{multiple:!0,modelValue:o.formData.url,"onUpdate:modelValue":a[6]||(a[6]=e=>o.formData.url=e)},null,8,["modelValue"])])),_:1}),i(C,{class:"uni-button-group"},{default:d((()=>[i(x,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:d((()=>[c("提交")])),_:1},8,["onClick"]),i(v,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:d((()=>[i(x,{class:"uni-button",style:{width:"100px"}},{default:d((()=>[c("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{v as default};
import{_ as e,L as t,n as a,o as n,c as l,w as i,i as s,a as o,d as r,e as d,r as c,F as u,M as h,q as g,f,g as p,t as m,h as _,j as b,k as C,l as y}from"./index-389238f5.js";import{_ as x}from"./download-excel.9236b5ca.js";import{_ as k}from"./uni-pagination.018f31ea.js";import{_ as w}from"./unicloud-db.dfa2c90d.js";import{e as D,f as S}from"./mustgo-post.8570f775.js";const $=t.database(),z=[],T={ascending:"asc",descending:"desc"};const E=e({data:()=>({collectionList:"mustgo-post",query:"",where:"",orderby:"",orderByFieldName:"",selectedIndexs:[],options:{pageSize:20,pageCurrent:1,filterData:{},...D},imageStyles:{width:64,height:64},exportExcel:{filename:"mustgo-post.xls",type:"xls",fields:{"内容":"content","发布时间":"date","点赞数":"likes","发帖人id":"owner_id","审核状态":"check_status","评论数":"comment_num","图片url":"url"}},exportExcelData:[]}),onLoad(){this._filter={}},onReady(){this.$refs.udb.loadData()},methods:{onqueryload(e){this.exportExcelData=e},getWhere(){const e=this.query.trim();if(!e)return"";const t=new RegExp(e,"i");return z.map((e=>t+".test("+e+")")).join(" || ")},search(){const e=this.getWhere();this.where=e,this.$nextTick((()=>{this.loadData()}))},loadData(e=!0){this.$refs.udb.loadData({clear:e})},onPageChanged(e){this.selectedIndexs.length=0,this.$refs.table.clearSelection(),this.$refs.udb.loadData({current:e.current})},navigateTo(e,t){a({url:e,events:{refreshData:()=>{this.loadData(t)}}})},selectedItems(){var e=this.$refs.udb.dataList;return this.selectedIndexs.map((t=>e[t]._id))},delTable(){this.$refs.udb.remove(this.selectedItems(),{success:e=>{this.$refs.table.clearSelection()}})},selectionChange(e){this.selectedIndexs=e.detail.index},confirmDelete(e){this.$refs.udb.remove(e,{success:e=>{this.$refs.table.clearSelection()}})},sortChange(e,t){this.orderByFieldName=t,e.order?this.orderby=t+" "+T[e.order]:this.orderby="",this.$refs.table.clearSelection(),this.$nextTick((()=>{this.$refs.udb.loadData()}))},filterChange(e,t){this._filter[t]={type:e.filterType,value:e.filter};let a=S(this._filter,$.command);Object.keys(a).length?this.where=a:this.where="",this.$nextTick((()=>{this.$refs.udb.loadData()}))}}},[["render",function(e,t,a,D,S,$){const z=s,T=h,E=g,j=f(p("download-excel"),x),v=f(p("uni-th"),_),q=f(p("uni-tr"),b),F=f(p("uni-td"),C),I=f(p("uni-table"),y),L=f(p("uni-pagination"),k),V=f(p("unicloud-db"),w);return n(),l(z,null,{default:i((()=>[o(z,{class:"uni-header"},{default:i((()=>[o(z,{class:"uni-group"},{default:i((()=>[o(z,{class:"uni-title"}),o(z,{class:"uni-sub-title"})])),_:1}),o(z,{class:"uni-group"},{default:i((()=>[o(T,{class:"uni-search",type:"text",modelValue:S.query,"onUpdate:modelValue":t[0]||(t[0]=e=>S.query=e),onConfirm:$.search,placeholder:"请输入搜索内容"},null,8,["modelValue","onConfirm"]),o(E,{class:"uni-button",type:"default",size:"mini",onClick:$.search},{default:i((()=>[r("搜索")])),_:1},8,["onClick"]),o(E,{class:"uni-button",type:"default",size:"mini",onClick:t[1]||(t[1]=e=>$.navigateTo("./add"))},{default:i((()=>[r("新增")])),_:1}),o(E,{class:"uni-button",type:"default",size:"mini",disabled:!S.selectedIndexs.length,onClick:$.delTable},{default:i((()=>[r("批量删除")])),_:1},8,["disabled","onClick"]),o(j,{class:"hide-on-phone",fields:S.exportExcel.fields,data:S.exportExcelData,type:S.exportExcel.type,name:S.exportExcel.filename},{default:i((()=>[o(E,{class:"uni-button",type:"primary",size:"mini"},{default:i((()=>[r("导出 Excel")])),_:1})])),_:1},8,["fields","data","type","name"])])),_:1})])),_:1}),o(z,{class:"uni-container"},{default:i((()=>[o(V,{ref:"udb",collection:S.collectionList,field:"content,date,likes,owner_id,check_status,comment_num,url",where:S.where,"page-data":"replace",orderby:S.orderby,getcount:!0,"page-size":S.options.pageSize,"page-current":S.options.pageCurrent,options:S.options,loadtime:"manual",onLoad:$.onqueryload},{default:i((({data:e,pagination:a,loading:s,error:h,options:g})=>[o(I,{ref:"table",loading:s,emptyText:h.message||"没有更多数据",border:"",stripe:"",type:"selection",onSelectionChange:$.selectionChange},{default:i((()=>[o(q,null,{default:i((()=>[o(v,{align:"center","filter-type":"search",onFilterChange:t[2]||(t[2]=e=>$.filterChange(e,"content")),sortable:"",onSortChange:t[3]||(t[3]=e=>$.sortChange(e,"content"))},{default:i((()=>[r("内容")])),_:1}),o(v,{align:"center","filter-type":"search",onFilterChange:t[4]||(t[4]=e=>$.filterChange(e,"date")),sortable:"",onSortChange:t[5]||(t[5]=e=>$.sortChange(e,"date"))},{default:i((()=>[r("发布时间")])),_:1}),o(v,{align:"center","filter-type":"range",onFilterChange:t[6]||(t[6]=e=>$.filterChange(e,"likes")),sortable:"",onSortChange:t[7]||(t[7]=e=>$.sortChange(e,"likes"))},{default:i((()=>[r("点赞数")])),_:1}),o(v,{align:"center",sortable:"",onSortChange:t[8]||(t[8]=e=>$.sortChange(e,"owner_id"))},{default:i((()=>[r("发帖人id")])),_:1}),o(v,{align:"center",sortable:"",onSortChange:t[9]||(t[9]=e=>$.sortChange(e,"check_status"))},{default:i((()=>[r("审核状态")])),_:1}),o(v,{align:"center","filter-type":"range",onFilterChange:t[10]||(t[10]=e=>$.filterChange(e,"comment_num")),sortable:"",onSortChange:t[11]||(t[11]=e=>$.sortChange(e,"comment_num"))},{default:i((()=>[r("评论数")])),_:1}),o(v,{align:"center",sortable:"",onSortChange:t[12]||(t[12]=e=>$.sortChange(e,"url"))},{default:i((()=>[r("图片url")])),_:1}),o(v,{align:"center"},{default:i((()=>[r("操作")])),_:1})])),_:1}),(n(!0),d(u,null,c(e,((e,t)=>(n(),l(q,{key:t},{default:i((()=>[o(F,{align:"center"},{default:i((()=>[r(m(e.content),1)])),_:2},1024),o(F,{align:"center"},{default:i((()=>[r(m(e.date),1)])),_:2},1024),o(F,{align:"center"},{default:i((()=>[r(m(e.likes),1)])),_:2},1024),o(F,{align:"center"},{default:i((()=>[r(m(e.owner_id),1)])),_:2},1024),o(F,{align:"center"},{default:i((()=>[r(m(1==e.check_status?"":""),1)])),_:2},1024),o(F,{align:"center"},{default:i((()=>[r(m(e.comment_num),1)])),_:2},1024),o(F,{align:"center"},{default:i((()=>[r(m(e.url),1)])),_:2},1024),o(F,{align:"center"},{default:i((()=>[o(z,{class:"uni-group"},{default:i((()=>[o(E,{onClick:t=>$.navigateTo("./edit?id="+e._id,!1),class:"uni-button",size:"mini",type:"primary"},{default:i((()=>[r("修改")])),_:2},1032,["onClick"]),o(E,{onClick:t=>$.confirmDelete(e._id),class:"uni-button",size:"mini",type:"warn"},{default:i((()=>[r("删除")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1032,["loading","emptyText","onSelectionChange"]),o(z,{class:"uni-pagination-box"},{default:i((()=>[o(L,{"show-icon":"","page-size":a.size,modelValue:a.current,"onUpdate:modelValue":e=>a.current=e,total:a.count,onChange:$.onPageChanged},null,8,["page-size","modelValue","onUpdate:modelValue","total","onChange"])])),_:2},1024)])),_:1},8,["collection","where","orderby","page-size","page-current","options","onLoad"])])),_:1})])),_:1})}]]);export{E as default};
import{_ as e,L as a,N as l,O as t,s as o,G as n,y as d,o as u,c as m,w as r,i as s,a as i,d as f,f as p,g as c,B as _,q as h,X as V}from"./index-389238f5.js";import{_ as b}from"./uni-easyinput.a1fc57c1.js";import{_ as D}from"./uni-forms-item.69698491.js";import{_ as g}from"./uni-data-checkbox.b1dd95fe.js";import{_ as y}from"./uni-forms.bc4bcf6e.js";import{v as U}from"./mustgo-running-record.e84758c9.js";import"./uni-load-more.67944ae0.js";const j=a.database();j.command;function w(e){let a={};for(let l in U)e.includes(l)&&(a[l]=U[l]);return a}const k=e({data(){let e={start_date:"",duration:null,feelings:"",owner_id:"",distance:null,pace:null,path_line:[],start_point:null,end_point:null};return{formData:e,formOptions:{},rules:{...w(Object.keys(e))}}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){l({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{t()}))},submitForm(e){return j.collection("mustgo-running-record").add(e).then((e=>{o({title:"新增成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((e=>{d({content:e.message||"请求服务失败",showCancel:!1})}))}}},[["render",function(e,a,l,t,o,n){const d=p(c("uni-easyinput"),b),U=p(c("uni-forms-item"),D),j=p(c("uni-data-checkbox"),g),w=_("undefined"),k=h,x=V,v=s,C=p(c("uni-forms"),y);return u(),m(v,{class:"uni-container"},{default:r((()=>[i(C,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:r((()=>[i(U,{name:"start_date",label:"开始时间"},{default:r((()=>[i(d,{placeholder:"运动开始时间",modelValue:o.formData.start_date,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.start_date=e)},null,8,["modelValue"])])),_:1}),i(U,{name:"duration",label:"持续时间"},{default:r((()=>[i(d,{placeholder:"运动持续时间",type:"number",modelValue:o.formData.duration,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.duration=e)},null,8,["modelValue"])])),_:1}),i(U,{name:"feelings",label:"感受"},{default:r((()=>[i(d,{placeholder:"运动感受",modelValue:o.formData.feelings,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.feelings=e)},null,8,["modelValue"])])),_:1}),i(U,{name:"owner_id",label:"用户id"},{default:r((()=>[i(d,{placeholder:"用户id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),i(U,{name:"distance",label:"距离"},{default:r((()=>[i(d,{placeholder:"运动距离",type:"number",modelValue:o.formData.distance,"onUpdate:modelValue":a[4]||(a[4]=e=>o.formData.distance=e)},null,8,["modelValue"])])),_:1}),i(U,{name:"pace",label:"配速"},{default:r((()=>[i(d,{placeholder:"运动配速",type:"number",modelValue:o.formData.pace,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.pace=e)},null,8,["modelValue"])])),_:1}),i(U,{name:"path_line",label:"路线"},{default:r((()=>[i(j,{multiple:!0,modelValue:o.formData.path_line,"onUpdate:modelValue":a[6]||(a[6]=e=>o.formData.path_line=e)},null,8,["modelValue"])])),_:1}),i(U,{name:"start_point",label:"起始地点"},{default:r((()=>[i(w,{modelValue:o.formData.start_point,"onUpdate:modelValue":a[7]||(a[7]=e=>o.formData.start_point=e)},null,8,["modelValue"])])),_:1}),i(U,{name:"end_point",label:"结束地点"},{default:r((()=>[i(w,{modelValue:o.formData.end_point,"onUpdate:modelValue":a[8]||(a[8]=e=>o.formData.end_point=e)},null,8,["modelValue"])])),_:1}),i(v,{class:"uni-button-group"},{default:r((()=>[i(k,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:r((()=>[f("提交")])),_:1},8,["onClick"]),i(x,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:r((()=>[i(k,{class:"uni-button",style:{width:"100px"}},{default:r((()=>[f("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{k as default};
import{_ as e,L as a,N as t,O as l,s as o,G as n,y as s,o as r,c as d,w as i,i as u,a as m,d as f,f as c,g as p,q as _,X as h}from"./index-389238f5.js";import{_ as g}from"./uni-easyinput.a1fc57c1.js";import{_ as D}from"./uni-forms-item.69698491.js";import{_ as b}from"./uni-forms.bc4bcf6e.js";import{v as V}from"./mustgo-running-record.e84758c9.js";const y=a.database();y.command;const w="mustgo-running-record";function j(e){let a={};for(let t in V)e.includes(t)&&(a[t]=V[t]);return a}const k=e({data(){let e={start_date:"",duration:null,feelings:"",owner_id:"",distance:null,pace:null,path_line:[],start_point:null,end_point:null};return{formData:e,formOptions:{},rules:{...j(Object.keys(e))}}},onLoad(e){if(e.id){const a=e.id;this.formDataId=a,this.getDetail(a)}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return y.collection(w).doc(this.formDataId).update(e).then((e=>{o({title:"修改成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((e=>{s({content:e.message||"请求服务失败",showCancel:!1})}))},getDetail(e){t({mask:!0}),y.collection(w).doc(e).field("start_date,duration,feelings,owner_id,distance,pace,path_line,start_point,end_point").get().then((e=>{const a=e.result.data[0];a&&(this.formData=a)})).catch((e=>{s({content:e.message||"请求服务失败",showCancel:!1})})).finally((()=>{l()}))}}},[["render",function(e,a,t,l,o,n){const s=c(p("uni-easyinput"),g),V=c(p("uni-forms-item"),D),y=_,w=h,j=u,k=c(p("uni-forms"),b);return r(),d(j,{class:"uni-container"},{default:i((()=>[m(k,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:i((()=>[m(V,{name:"start_date",label:"开始时间"},{default:i((()=>[m(s,{placeholder:"运动开始时间",modelValue:o.formData.start_date,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.start_date=e)},null,8,["modelValue"])])),_:1}),m(V,{name:"duration",label:"持续时间"},{default:i((()=>[m(s,{placeholder:"运动持续时间",type:"number",modelValue:o.formData.duration,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.duration=e)},null,8,["modelValue"])])),_:1}),m(V,{name:"feelings",label:"感受"},{default:i((()=>[m(s,{placeholder:"运动感受",modelValue:o.formData.feelings,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.feelings=e)},null,8,["modelValue"])])),_:1}),m(V,{name:"owner_id",label:"用户id"},{default:i((()=>[m(s,{placeholder:"用户id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),m(V,{name:"distance",label:"距离"},{default:i((()=>[m(s,{placeholder:"运动距离",type:"number",modelValue:o.formData.distance,"onUpdate:modelValue":a[4]||(a[4]=e=>o.formData.distance=e)},null,8,["modelValue"])])),_:1}),m(V,{name:"pace",label:"配速"},{default:i((()=>[m(s,{placeholder:"运动配速",type:"number",modelValue:o.formData.pace,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.pace=e)},null,8,["modelValue"])])),_:1}),m(j,{class:"uni-button-group"},{default:i((()=>[m(y,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:i((()=>[f("提交")])),_:1},8,["onClick"]),m(w,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:i((()=>[m(y,{class:"uni-button",style:{width:"100px"}},{default:i((()=>[f("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{k as default};
import{_ as e,L as t,n as a,o as n,c as i,w as l,i as r,a as s,d as o,e as d,r as c,F as u,M as g,q as h,f,g as p,t as _,h as m,j as C,k as b,l as y}from"./index-389238f5.js";import{_ as x}from"./download-excel.9236b5ca.js";import{_ as w}from"./uni-pagination.018f31ea.js";import{_ as S}from"./unicloud-db.dfa2c90d.js";import{e as D,f as $}from"./mustgo-running-record.e84758c9.js";const k=t.database(),z=[],E={ascending:"asc",descending:"desc"};const T=e({data:()=>({collectionList:"mustgo-running-record",query:"",where:"",orderby:"",orderByFieldName:"",selectedIndexs:[],options:{pageSize:20,pageCurrent:1,filterData:{},...D},imageStyles:{width:64,height:64},exportExcel:{filename:"mustgo-running-record.xls",type:"xls",fields:{"开始时间":"start_date","持续时间":"duration","感受":"feelings","用户id":"owner_id","距离":"distance","配速":"pace","路线":"path_line","起始地点":"start_point","结束地点":"end_point"}},exportExcelData:[]}),onLoad(){this._filter={}},onReady(){this.$refs.udb.loadData()},methods:{onqueryload(e){this.exportExcelData=e},getWhere(){const e=this.query.trim();if(!e)return"";const t=new RegExp(e,"i");return z.map((e=>t+".test("+e+")")).join(" || ")},search(){const e=this.getWhere();this.where=e,this.$nextTick((()=>{this.loadData()}))},loadData(e=!0){this.$refs.udb.loadData({clear:e})},onPageChanged(e){this.selectedIndexs.length=0,this.$refs.table.clearSelection(),this.$refs.udb.loadData({current:e.current})},navigateTo(e,t){a({url:e,events:{refreshData:()=>{this.loadData(t)}}})},selectedItems(){var e=this.$refs.udb.dataList;return this.selectedIndexs.map((t=>e[t]._id))},delTable(){this.$refs.udb.remove(this.selectedItems(),{success:e=>{this.$refs.table.clearSelection()}})},selectionChange(e){this.selectedIndexs=e.detail.index},confirmDelete(e){this.$refs.udb.remove(e,{success:e=>{this.$refs.table.clearSelection()}})},sortChange(e,t){this.orderByFieldName=t,e.order?this.orderby=t+" "+E[e.order]:this.orderby="",this.$refs.table.clearSelection(),this.$nextTick((()=>{this.$refs.udb.loadData()}))},filterChange(e,t){this._filter[t]={type:e.filterType,value:e.filter};let a=$(this._filter,k.command);Object.keys(a).length?this.where=a:this.where="",this.$nextTick((()=>{this.$refs.udb.loadData()}))}}},[["render",function(e,t,a,D,$,k){const z=r,E=g,T=h,j=f(p("download-excel"),x),F=f(p("uni-th"),m),q=f(p("uni-tr"),C),v=f(p("uni-td"),b),I=f(p("uni-table"),y),L=f(p("uni-pagination"),w),V=f(p("unicloud-db"),S);return n(),i(z,null,{default:l((()=>[s(z,{class:"uni-header"},{default:l((()=>[s(z,{class:"uni-group"},{default:l((()=>[s(z,{class:"uni-title"}),s(z,{class:"uni-sub-title"})])),_:1}),s(z,{class:"uni-group"},{default:l((()=>[s(E,{class:"uni-search",type:"text",modelValue:$.query,"onUpdate:modelValue":t[0]||(t[0]=e=>$.query=e),onConfirm:k.search,placeholder:"请输入搜索内容"},null,8,["modelValue","onConfirm"]),s(T,{class:"uni-button",type:"default",size:"mini",onClick:k.search},{default:l((()=>[o("搜索")])),_:1},8,["onClick"]),s(T,{class:"uni-button",type:"default",size:"mini",disabled:!$.selectedIndexs.length,onClick:k.delTable},{default:l((()=>[o("批量删除")])),_:1},8,["disabled","onClick"]),s(j,{class:"hide-on-phone",fields:$.exportExcel.fields,data:$.exportExcelData,type:$.exportExcel.type,name:$.exportExcel.filename},{default:l((()=>[s(T,{class:"uni-button",type:"primary",size:"mini"},{default:l((()=>[o("导出 Excel")])),_:1})])),_:1},8,["fields","data","type","name"])])),_:1})])),_:1}),s(z,{class:"uni-container"},{default:l((()=>[s(V,{ref:"udb",collection:$.collectionList,field:"start_date,duration,feelings,owner_id,distance,pace,path_line,start_point,end_point",where:$.where,"page-data":"replace",orderby:$.orderby,getcount:!0,"page-size":$.options.pageSize,"page-current":$.options.pageCurrent,options:$.options,loadtime:"manual",onLoad:k.onqueryload},{default:l((({data:e,pagination:a,loading:r,error:g,options:h})=>[s(I,{ref:"table",loading:r,emptyText:g.message||"没有更多数据",border:"",stripe:"",type:"selection",onSelectionChange:k.selectionChange},{default:l((()=>[s(q,null,{default:l((()=>[s(F,{align:"center","filter-type":"search",onFilterChange:t[1]||(t[1]=e=>k.filterChange(e,"start_date")),sortable:"",onSortChange:t[2]||(t[2]=e=>k.sortChange(e,"start_date"))},{default:l((()=>[o("开始时间")])),_:1}),s(F,{align:"center","filter-type":"range",onFilterChange:t[3]||(t[3]=e=>k.filterChange(e,"duration")),sortable:"",onSortChange:t[4]||(t[4]=e=>k.sortChange(e,"duration"))},{default:l((()=>[o("持续时间(秒)")])),_:1}),s(F,{align:"center","filter-type":"search",onFilterChange:t[5]||(t[5]=e=>k.filterChange(e,"feelings")),sortable:"",onSortChange:t[6]||(t[6]=e=>k.sortChange(e,"feelings"))},{default:l((()=>[o("感受")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[7]||(t[7]=e=>k.sortChange(e,"owner_id"))},{default:l((()=>[o("用户id")])),_:1}),s(F,{align:"center","filter-type":"range",onFilterChange:t[8]||(t[8]=e=>k.filterChange(e,"distance")),sortable:"",onSortChange:t[9]||(t[9]=e=>k.sortChange(e,"distance"))},{default:l((()=>[o("距离")])),_:1}),s(F,{align:"center","filter-type":"range",onFilterChange:t[10]||(t[10]=e=>k.filterChange(e,"pace")),sortable:"",onSortChange:t[11]||(t[11]=e=>k.sortChange(e,"pace"))},{default:l((()=>[o("配速")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[12]||(t[12]=e=>k.sortChange(e,"start_point"))},{default:l((()=>[o("起始地点")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[13]||(t[13]=e=>k.sortChange(e,"end_point"))},{default:l((()=>[o("结束地点")])),_:1}),s(F,{align:"center"},{default:l((()=>[o("操作")])),_:1})])),_:1}),(n(!0),d(u,null,c(e,((e,t)=>(n(),i(q,{key:t},{default:l((()=>[s(v,{align:"center"},{default:l((()=>[o(_(e.start_date),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.duration),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.feelings),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.owner_id),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.distance),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.pace),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.start_point),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.end_point),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[s(z,{class:"uni-group"},{default:l((()=>[s(T,{onClick:t=>k.navigateTo("./edit?id="+e._id,!1),class:"uni-button",size:"mini",type:"primary"},{default:l((()=>[o("修改")])),_:2},1032,["onClick"]),s(T,{onClick:t=>k.confirmDelete(e._id),class:"uni-button",size:"mini",type:"warn"},{default:l((()=>[o("删除")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1032,["loading","emptyText","onSelectionChange"]),s(z,{class:"uni-pagination-box"},{default:l((()=>[s(L,{"show-icon":"","page-size":a.size,modelValue:a.current,"onUpdate:modelValue":e=>a.current=e,total:a.count,onChange:k.onPageChanged},null,8,["page-size","modelValue","onUpdate:modelValue","total","onChange"])])),_:2},1024)])),_:1},8,["collection","where","orderby","page-size","page-current","options","onLoad"])])),_:1})])),_:1})}]]);export{T as default};
import{_ as e,L as a,N as t,O as l,s as o,G as n,y as d,o as s,c as m,w as u,i as r,a as i,d as f,f as p,g as c,B as _,q as h,X as V}from"./index-389238f5.js";import{_ as b}from"./uni-easyinput.a1fc57c1.js";import{_ as D}from"./uni-forms-item.69698491.js";import{_ as g}from"./uni-data-checkbox.b1dd95fe.js";import{_ as y}from"./uni-forms.bc4bcf6e.js";import{v as w}from"./mustgo-walking-record.8249cf9a.js";import"./uni-load-more.67944ae0.js";const k=a.database();k.command;function U(e){let a={};for(let t in w)e.includes(t)&&(a[t]=w[t]);return a}const j=e({data(){let e={start_date:"",duration:null,feelings:"",owner_id:"",distance:null,steps:null,start_point:null,end_point:null,path_line:[]};return{formData:e,formOptions:{},rules:{...U(Object.keys(e))}}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return k.collection("mustgo-walking-record").add(e).then((e=>{o({title:"新增成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((e=>{d({content:e.message||"请求服务失败",showCancel:!1})}))}}},[["render",function(e,a,t,l,o,n){const d=p(c("uni-easyinput"),b),w=p(c("uni-forms-item"),D),k=_("undefined"),U=p(c("uni-data-checkbox"),g),j=h,x=V,v=r,C=p(c("uni-forms"),y);return s(),m(v,{class:"uni-container"},{default:u((()=>[i(C,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:u((()=>[i(w,{name:"start_date",label:"开始时间"},{default:u((()=>[i(d,{placeholder:"运动开始时间",modelValue:o.formData.start_date,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.start_date=e)},null,8,["modelValue"])])),_:1}),i(w,{name:"duration",label:"持续时间"},{default:u((()=>[i(d,{placeholder:"运动持续时间",type:"number",modelValue:o.formData.duration,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.duration=e)},null,8,["modelValue"])])),_:1}),i(w,{name:"feelings",label:"感受"},{default:u((()=>[i(d,{placeholder:"运动感受",modelValue:o.formData.feelings,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.feelings=e)},null,8,["modelValue"])])),_:1}),i(w,{name:"owner_id",label:"用户id"},{default:u((()=>[i(d,{placeholder:"用户id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),i(w,{name:"distance",label:"距离"},{default:u((()=>[i(d,{placeholder:"运动距离",type:"number",modelValue:o.formData.distance,"onUpdate:modelValue":a[4]||(a[4]=e=>o.formData.distance=e)},null,8,["modelValue"])])),_:1}),i(w,{name:"steps",label:"步数"},{default:u((()=>[i(d,{placeholder:"健走步数",type:"number",modelValue:o.formData.steps,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.steps=e)},null,8,["modelValue"])])),_:1}),i(w,{name:"start_point",label:"起始地点"},{default:u((()=>[i(k,{modelValue:o.formData.start_point,"onUpdate:modelValue":a[6]||(a[6]=e=>o.formData.start_point=e)},null,8,["modelValue"])])),_:1}),i(w,{name:"end_point",label:"结束地点"},{default:u((()=>[i(k,{modelValue:o.formData.end_point,"onUpdate:modelValue":a[7]||(a[7]=e=>o.formData.end_point=e)},null,8,["modelValue"])])),_:1}),i(w,{name:"path_line",label:"路线"},{default:u((()=>[i(U,{multiple:!0,modelValue:o.formData.path_line,"onUpdate:modelValue":a[8]||(a[8]=e=>o.formData.path_line=e)},null,8,["modelValue"])])),_:1}),i(v,{class:"uni-button-group"},{default:u((()=>[i(j,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:u((()=>[f("提交")])),_:1},8,["onClick"]),i(x,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:u((()=>[i(j,{class:"uni-button",style:{width:"100px"}},{default:u((()=>[f("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{j as default};
import{_ as e,L as a,N as t,O as l,s as o,G as n,y as s,o as r,c as d,w as i,i as m,a as u,d as f,f as c,g as p,q as _,X as h}from"./index-389238f5.js";import{_ as g}from"./uni-easyinput.a1fc57c1.js";import{_ as D}from"./uni-forms-item.69698491.js";import{_ as b}from"./uni-forms.bc4bcf6e.js";import{v as V}from"./mustgo-walking-record.8249cf9a.js";const y=a.database();y.command;const w="mustgo-walking-record";function k(e){let a={};for(let t in V)e.includes(t)&&(a[t]=V[t]);return a}const j=e({data(){let e={start_date:"",duration:null,feelings:"",owner_id:"",distance:null,pace:null,start_point:null,end_point:null,path_line:[]};return{formData:e,formOptions:{},rules:{...k(Object.keys(e))}}},onLoad(e){if(e.id){const a=e.id;this.formDataId=a,this.getDetail(a)}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{l()}))},submitForm(e){return y.collection(w).doc(this.formDataId).update(e).then((e=>{o({title:"修改成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>n()),500)})).catch((e=>{s({content:e.message||"请求服务失败",showCancel:!1})}))},getDetail(e){t({mask:!0}),y.collection(w).doc(e).field("start_date,duration,feelings,owner_id,distance,pace,start_point,end_point,path_line").get().then((e=>{const a=e.result.data[0];a&&(this.formData=a)})).catch((e=>{s({content:e.message||"请求服务失败",showCancel:!1})})).finally((()=>{l()}))}}},[["render",function(e,a,t,l,o,n){const s=c(p("uni-easyinput"),g),V=c(p("uni-forms-item"),D),y=_,w=h,k=m,j=c(p("uni-forms"),b);return r(),d(k,{class:"uni-container"},{default:i((()=>[u(j,{ref:"form",model:o.formData,validateTrigger:"bind"},{default:i((()=>[u(V,{name:"start_date",label:"开始时间"},{default:i((()=>[u(s,{placeholder:"运动开始时间",modelValue:o.formData.start_date,"onUpdate:modelValue":a[0]||(a[0]=e=>o.formData.start_date=e)},null,8,["modelValue"])])),_:1}),u(V,{name:"duration",label:"持续时间"},{default:i((()=>[u(s,{placeholder:"运动持续时间",type:"number",modelValue:o.formData.duration,"onUpdate:modelValue":a[1]||(a[1]=e=>o.formData.duration=e)},null,8,["modelValue"])])),_:1}),u(V,{name:"feelings",label:"感受"},{default:i((()=>[u(s,{placeholder:"运动感受",modelValue:o.formData.feelings,"onUpdate:modelValue":a[2]||(a[2]=e=>o.formData.feelings=e)},null,8,["modelValue"])])),_:1}),u(V,{name:"owner_id",label:"用户id"},{default:i((()=>[u(s,{placeholder:"用户id",modelValue:o.formData.owner_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),u(V,{name:"distance",label:"距离"},{default:i((()=>[u(s,{placeholder:"运动距离",type:"number",modelValue:o.formData.distance,"onUpdate:modelValue":a[4]||(a[4]=e=>o.formData.distance=e)},null,8,["modelValue"])])),_:1}),u(V,{name:"pace",label:"配速"},{default:i((()=>[u(s,{placeholder:"运动配速",type:"number",modelValue:o.formData.pace,"onUpdate:modelValue":a[5]||(a[5]=e=>o.formData.pace=e)},null,8,["modelValue"])])),_:1}),u(k,{class:"uni-button-group"},{default:i((()=>[u(y,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:n.submit},{default:i((()=>[f("提交")])),_:1},8,["onClick"]),u(w,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:i((()=>[u(y,{class:"uni-button",style:{width:"100px"}},{default:i((()=>[f("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{j as default};
import{_ as e,L as t,n as a,o as n,c as i,w as l,i as r,a as s,d as o,e as d,r as c,F as u,M as g,q as h,f,g as p,t as _,h as m,j as C,k as b,l as y}from"./index-389238f5.js";import{_ as x}from"./download-excel.9236b5ca.js";import{_ as w}from"./uni-pagination.018f31ea.js";import{_ as k}from"./unicloud-db.dfa2c90d.js";import{e as S,f as D}from"./mustgo-walking-record.8249cf9a.js";const $=t.database(),z=[],E={ascending:"asc",descending:"desc"};const T=e({data:()=>({collectionList:"mustgo-walking-record",query:"",where:"",orderby:"",orderByFieldName:"",selectedIndexs:[],options:{pageSize:20,pageCurrent:1,filterData:{},...S},imageStyles:{width:64,height:64},exportExcel:{filename:"mustgo-walking-record.xls",type:"xls",fields:{"开始时间":"start_date","持续时间":"duration","感受":"feelings","用户id":"owner_id","距离":"distance","配速":"pace","起始地点":"start_point","结束地点":"end_point","路线":"path_line"}},exportExcelData:[]}),onLoad(){this._filter={}},onReady(){this.$refs.udb.loadData()},methods:{onqueryload(e){this.exportExcelData=e},getWhere(){const e=this.query.trim();if(!e)return"";const t=new RegExp(e,"i");return z.map((e=>t+".test("+e+")")).join(" || ")},search(){const e=this.getWhere();this.where=e,this.$nextTick((()=>{this.loadData()}))},loadData(e=!0){this.$refs.udb.loadData({clear:e})},onPageChanged(e){this.selectedIndexs.length=0,this.$refs.table.clearSelection(),this.$refs.udb.loadData({current:e.current})},navigateTo(e,t){a({url:e,events:{refreshData:()=>{this.loadData(t)}}})},selectedItems(){var e=this.$refs.udb.dataList;return this.selectedIndexs.map((t=>e[t]._id))},delTable(){this.$refs.udb.remove(this.selectedItems(),{success:e=>{this.$refs.table.clearSelection()}})},selectionChange(e){this.selectedIndexs=e.detail.index},confirmDelete(e){this.$refs.udb.remove(e,{success:e=>{this.$refs.table.clearSelection()}})},sortChange(e,t){this.orderByFieldName=t,e.order?this.orderby=t+" "+E[e.order]:this.orderby="",this.$refs.table.clearSelection(),this.$nextTick((()=>{this.$refs.udb.loadData()}))},filterChange(e,t){this._filter[t]={type:e.filterType,value:e.filter};let a=D(this._filter,$.command);Object.keys(a).length?this.where=a:this.where="",this.$nextTick((()=>{this.$refs.udb.loadData()}))}}},[["render",function(e,t,a,S,D,$){const z=r,E=g,T=h,j=f(p("download-excel"),x),F=f(p("uni-th"),m),q=f(p("uni-tr"),C),v=f(p("uni-td"),b),I=f(p("uni-table"),y),L=f(p("uni-pagination"),w),V=f(p("unicloud-db"),k);return n(),i(z,null,{default:l((()=>[s(z,{class:"uni-header"},{default:l((()=>[s(z,{class:"uni-group"},{default:l((()=>[s(z,{class:"uni-title"}),s(z,{class:"uni-sub-title"})])),_:1}),s(z,{class:"uni-group"},{default:l((()=>[s(E,{class:"uni-search",type:"text",modelValue:D.query,"onUpdate:modelValue":t[0]||(t[0]=e=>D.query=e),onConfirm:$.search,placeholder:"请输入搜索内容"},null,8,["modelValue","onConfirm"]),s(T,{class:"uni-button",type:"default",size:"mini",onClick:$.search},{default:l((()=>[o("搜索")])),_:1},8,["onClick"]),s(T,{class:"uni-button",type:"default",size:"mini",disabled:!D.selectedIndexs.length,onClick:$.delTable},{default:l((()=>[o("批量删除")])),_:1},8,["disabled","onClick"]),s(j,{class:"hide-on-phone",fields:D.exportExcel.fields,data:D.exportExcelData,type:D.exportExcel.type,name:D.exportExcel.filename},{default:l((()=>[s(T,{class:"uni-button",type:"primary",size:"mini"},{default:l((()=>[o("导出 Excel")])),_:1})])),_:1},8,["fields","data","type","name"])])),_:1})])),_:1}),s(z,{class:"uni-container"},{default:l((()=>[s(V,{ref:"udb",collection:D.collectionList,field:"start_date,duration,feelings,owner_id,distance,pace,start_point,end_point,path_line",where:D.where,"page-data":"replace",orderby:D.orderby,getcount:!0,"page-size":D.options.pageSize,"page-current":D.options.pageCurrent,options:D.options,loadtime:"manual",onLoad:$.onqueryload},{default:l((({data:e,pagination:a,loading:r,error:g,options:h})=>[s(I,{ref:"table",loading:r,emptyText:g.message||"没有更多数据",border:"",stripe:"",type:"selection",onSelectionChange:$.selectionChange},{default:l((()=>[s(q,null,{default:l((()=>[s(F,{align:"center","filter-type":"search",onFilterChange:t[1]||(t[1]=e=>$.filterChange(e,"start_date")),sortable:"",onSortChange:t[2]||(t[2]=e=>$.sortChange(e,"start_date"))},{default:l((()=>[o("开始时间")])),_:1}),s(F,{align:"center","filter-type":"range",onFilterChange:t[3]||(t[3]=e=>$.filterChange(e,"duration")),sortable:"",onSortChange:t[4]||(t[4]=e=>$.sortChange(e,"duration"))},{default:l((()=>[o("持续时间")])),_:1}),s(F,{align:"center","filter-type":"search",onFilterChange:t[5]||(t[5]=e=>$.filterChange(e,"feelings")),sortable:"",onSortChange:t[6]||(t[6]=e=>$.sortChange(e,"feelings"))},{default:l((()=>[o("感受")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[7]||(t[7]=e=>$.sortChange(e,"owner_id"))},{default:l((()=>[o("用户id")])),_:1}),s(F,{align:"center","filter-type":"range",onFilterChange:t[8]||(t[8]=e=>$.filterChange(e,"distance")),sortable:"",onSortChange:t[9]||(t[9]=e=>$.sortChange(e,"distance"))},{default:l((()=>[o("距离")])),_:1}),s(F,{align:"center","filter-type":"range",onFilterChange:t[10]||(t[10]=e=>$.filterChange(e,"pace")),sortable:"",onSortChange:t[11]||(t[11]=e=>$.sortChange(e,"pace"))},{default:l((()=>[o("配速")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[12]||(t[12]=e=>$.sortChange(e,"start_point"))},{default:l((()=>[o("起始地点")])),_:1}),s(F,{align:"center",sortable:"",onSortChange:t[13]||(t[13]=e=>$.sortChange(e,"end_point"))},{default:l((()=>[o("结束地点")])),_:1}),s(F,{align:"center"},{default:l((()=>[o("操作")])),_:1})])),_:1}),(n(!0),d(u,null,c(e,((e,t)=>(n(),i(q,{key:t},{default:l((()=>[s(v,{align:"center"},{default:l((()=>[o(_(e.start_date),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.duration),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.feelings),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.owner_id),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.distance),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.pace),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.start_point),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[o(_(e.end_point),1)])),_:2},1024),s(v,{align:"center"},{default:l((()=>[s(z,{class:"uni-group"},{default:l((()=>[s(T,{onClick:t=>$.navigateTo("./edit?id="+e._id,!1),class:"uni-button",size:"mini",type:"primary"},{default:l((()=>[o("修改")])),_:2},1032,["onClick"]),s(T,{onClick:t=>$.confirmDelete(e._id),class:"uni-button",size:"mini",type:"warn"},{default:l((()=>[o("删除")])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1032,["loading","emptyText","onSelectionChange"]),s(z,{class:"uni-pagination-box"},{default:l((()=>[s(L,{"show-icon":"","page-size":a.size,modelValue:a.current,"onUpdate:modelValue":e=>a.current=e,total:a.count,onChange:$.onPageChanged},null,8,["page-size","modelValue","onUpdate:modelValue","total","onChange"])])),_:2},1024)])),_:1},8,["collection","where","orderby","page-size","page-current","options","onLoad"])])),_:1})])),_:1})}]]);export{T as default};
import{_ as e,L as a,N as t,O as o,s as l,G as s,y as n,o as i,c as m,w as r,i as d,a as u,d as c,m as f,f as p,g as h,q as g,X as _}from"./index-389238f5.js";import{_ as b}from"./uni-forms-item.69698491.js";import{_ as y}from"./uni-easyinput.a1fc57c1.js";import{_ as D}from"./uni-forms.bc4bcf6e.js";import{v as w}from"./mustgo-team.80703cc9.js";const V=a.database();V.command;function C(e){let a={};for(let t in w)e.includes(t)&&(a[t]=w[t]);return a}const j=e({data(){let e={icon:"https://mp-6f6feaec-a026-4402-8e8d-18f7572890da.cdn.bspapp.com/cloudstorage/0510a534-dd8d-41f0-8341-601aa677e243.jpg",name:"",owner_id:"",description:""};return{formData:e,formOptions:{},rules:{...C(Object.keys(e))}}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{o()}))},avatarChoose(){let e=this;console.log("upload image loading"),a.chooseAndUploadFile({type:"image",success(a){e.formData.icon=a.tempFiles[0].url,console.log(a)},fail(){console.log("upload icon failed")},complete(){}})},submitForm(e){return V.collection("mustgo-team").add(e).then((e=>{l({title:"新增成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>s()),500)})).catch((e=>{n({content:e.message||"请求服务失败",showCancel:!1})}))}}},[["render",function(e,a,t,o,l,s){const n=f,w=p(h("uni-forms-item"),b),V=p(h("uni-easyinput"),y),C=g,j=_,k=d,v=p(h("uni-forms"),D);return i(),m(k,{class:"uni-container"},{default:r((()=>[u(v,{ref:"form",model:l.formData,validateTrigger:"bind"},{default:r((()=>[u(w,{name:"icon",label:"队标",onClick:s.avatarChoose},{default:r((()=>[u(n,{src:l.formData.icon,style:{width:"120px",height:"80px"}},null,8,["src"])])),_:1},8,["onClick"]),u(w,{name:"name",label:"队名"},{default:r((()=>[u(V,{placeholder:"小队名称",modelValue:l.formData.name,"onUpdate:modelValue":a[0]||(a[0]=e=>l.formData.name=e)},null,8,["modelValue"])])),_:1}),u(w,{name:"owner_id",label:"发起人id"},{default:r((()=>[u(V,{placeholder:"小队发起人id",modelValue:l.formData.owner_id,"onUpdate:modelValue":a[1]||(a[1]=e=>l.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),u(w,{name:"description",label:"描述"},{default:r((()=>[u(V,{placeholder:"小队描述",modelValue:l.formData.description,"onUpdate:modelValue":a[2]||(a[2]=e=>l.formData.description=e)},null,8,["modelValue"])])),_:1}),u(k,{class:"uni-button-group"},{default:r((()=>[u(C,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:s.submit},{default:r((()=>[c("提交")])),_:1},8,["onClick"]),u(j,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:r((()=>[u(C,{class:"uni-button",style:{width:"100px"}},{default:r((()=>[c("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{j as default};
import{_ as e,L as a,N as t,O as o,s,G as l,y as n,o as i,c as r,w as m,i as d,a as u,d as c,m as f,f as p,g as h,q as g,X as _}from"./index-389238f5.js";import{_ as D}from"./uni-forms-item.69698491.js";import{_ as y}from"./uni-easyinput.a1fc57c1.js";import{_ as b}from"./uni-forms.bc4bcf6e.js";import{v as w}from"./mustgo-team.80703cc9.js";const C=a.database();C.command;const V="mustgo-team";function k(e){let a={};for(let t in w)e.includes(t)&&(a[t]=w[t]);return a}const v=e({data(){let e={icon:"",name:"",owner_id:"",description:""};return{formData:e,formOptions:{},rules:{...k(Object.keys(e))}}},onLoad(e){if(e.id){const a=e.id;this.formDataId=a,this.getDetail(a)}},onReady(){this.$refs.form.setRules(this.rules)},methods:{submit(){t({mask:!0}),this.$refs.form.validate().then((e=>this.submitForm(e))).catch((()=>{})).finally((()=>{o()}))},submitForm(e){return C.collection(V).doc(this.formDataId).update(e).then((e=>{s({title:"修改成功"}),this.getOpenerEventChannel().emit("refreshData"),setTimeout((()=>l()),500)})).catch((e=>{n({content:e.message||"请求服务失败",showCancel:!1})}))},avatarChoose(){let e=this;console.log("upload image loading"),a.chooseAndUploadFile({type:"image",success(a){e.formData.icon=a.tempFiles[0].url,console.log(a)},fail(){console.log("upload icon failed")},complete(){}})},getDetail(e){t({mask:!0}),C.collection(V).doc(e).field("icon,name,owner_id,description").get().then((e=>{const a=e.result.data[0];a&&(this.formData=a)})).catch((e=>{n({content:e.message||"请求服务失败",showCancel:!1})})).finally((()=>{o()}))}}},[["render",function(e,a,t,o,s,l){const n=f,w=p(h("uni-forms-item"),D),C=p(h("uni-easyinput"),y),V=g,k=_,v=d,x=p(h("uni-forms"),b);return i(),r(v,{class:"uni-container"},{default:m((()=>[u(x,{ref:"form",model:s.formData,validateTrigger:"bind"},{default:m((()=>[u(w,{name:"icon",label:"队标",onClick:l.avatarChoose},{default:m((()=>[u(n,{src:s.formData.icon,style:{width:"120px",height:"80px"}},null,8,["src"])])),_:1},8,["onClick"]),u(w,{name:"name",label:"队名"},{default:m((()=>[u(C,{placeholder:"小队名称",modelValue:s.formData.name,"onUpdate:modelValue":a[0]||(a[0]=e=>s.formData.name=e)},null,8,["modelValue"])])),_:1}),u(w,{name:"owner_id",label:"发起人id"},{default:m((()=>[u(C,{placeholder:"小队发起人id",modelValue:s.formData.owner_id,"onUpdate:modelValue":a[1]||(a[1]=e=>s.formData.owner_id=e)},null,8,["modelValue"])])),_:1}),u(w,{name:"description",label:"描述"},{default:m((()=>[u(C,{placeholder:"小队描述",modelValue:s.formData.description,"onUpdate:modelValue":a[2]||(a[2]=e=>s.formData.description=e)},null,8,["modelValue"])])),_:1}),u(v,{class:"uni-button-group"},{default:m((()=>[u(V,{type:"primary",class:"uni-button",style:{width:"100px"},onClick:l.submit},{default:m((()=>[c("提交")])),_:1},8,["onClick"]),u(k,{"open-type":"navigateBack",style:{"margin-left":"15px"}},{default:m((()=>[u(V,{class:"uni-button",style:{width:"100px"}},{default:m((()=>[c("返回")])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}]]);export{v as default};
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册