Browse Source

feat: 添加首页弹出按钮及界面

develop
song 4 years ago
parent
commit
edd56cd3fa
  1. 2
      .eslintignore
  2. 3
      CHANGELOG.md
  3. 36
      src/common/styles/tailwind.scss
  4. 4
      src/components/ConfigInfo/ConfigInfo.vue
  5. 2
      src/components/ConfigInfo/components/Info.vue
  6. 9
      src/components/EndLine/EndLine.vue
  7. 9
      src/components/Evaluated/Evaluated.vue
  8. 24
      src/components/NotEvaluated/NotEvaluated.vue
  9. 127
      src/components/TimeLine copy/TimeLine.vue
  10. 42
      src/components/TimeLine copy/component/Barrier.vue
  11. 185
      src/components/TimeLine copy/component/TaskTools.vue
  12. 142
      src/components/TimeLine copy/component/TimeBox.vue
  13. 231
      src/components/TimeLine copy/component/TimeStatus.vue
  14. 7
      src/components/TimeLine copy/component/Title.vue
  15. 29
      src/components/TimeLine/component/TimeBox.vue
  16. 105
      src/components/Upload/Upload.vue
  17. BIN
      src/components/Upload/img/icon1.png
  18. BIN
      src/components/Upload/img/icon2.png
  19. BIN
      src/components/Upload/img/icon3.png
  20. BIN
      src/components/Upload/img/icon4.png
  21. 2
      src/config/user.js
  22. 2
      src/manifest.json
  23. 30
      src/pages.json
  24. 13
      src/pages/add-info/add-info.vue
  25. 9
      src/pages/ascription/ascription.vue
  26. 9
      src/pages/hold-all/hold-all.vue
  27. 2
      src/pages/index/index.vue
  28. 38
      src/pages/phone-bind/phone-bind.vue
  29. 9
      src/pages/scan-code/scan-code.vue

2
.eslintignore

@ -10,4 +10,4 @@ postcss.config.js
vue.config.js
src/common/styles/index.css
src/pages.json
manifest.json
src/manifest.json

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 0.1.0 (2021-11-04)
# 0.1.0 (2021-11-05)
### 🌟 新功能
范围|描述|commitId
@ -69,6 +69,7 @@
- | 设置小红点 | [9316bcb](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/9316bcb)
- | 设置界面基本信息板块开发 | [bbaded0](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/bbaded0)
- | 距调整pc端 | [5069aa1](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/5069aa1)
- | 适配小程序 | [9e3c45d](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/9e3c45d)
- | 适配小程序;小程序登录 | [cefc0eb](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/cefc0eb)
- | 配置默认插件接口 | [f0c177d](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/f0c177d)
- | 面变化首页变化 | [5e860f1](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/5e860f1)

36
src/common/styles/tailwind.scss

@ -13,6 +13,20 @@
.sticky {
position: sticky;
}
.top-0{
top: 0px;
}
.right-0{
right: 0px;
}
.bottom-0{
bottom: 0px;
}
.left-0{
left: 0px;
}
.col-auto {
grid-column: auto;
}
@ -4329,23 +4343,32 @@
.h-6 {
height: 1.5rem;
}
.h-10 {
height: 2.5rem !important;
}
.h-12 {
height: 3rem !important;
}
.h-full {
height: 100%;
}
.w-4 {
width: 1rem;
width: 1rem !important;
}
.w-5 {
width: 1.25rem;
width: 1.25rem !important;
}
.w-6 {
width: 1.5rem;
width: 1.5rem !important;
}
.w-10 {
width: 2.5rem !important;
}
.w-12 {
width: 3rem;
width: 3rem !important;
}
.w-full {
width: 100%;
width: 100% !important;
}
.w-screen {
@ -4360,9 +4383,6 @@
width: max-content;
}
.h-12 {
height: 3rem;
}
.bg-white {
--tw-bg-opacity: 1;
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));

4
src/components/ConfigInfo/ConfigInfo.vue

@ -17,7 +17,9 @@
</view>
<!-- 内容区 -->
<view v-if="item.open" class="w-full mt-3">
<Info v-if="index === 0" />
<view style="border: 1px solid #e5e5e5" v-if="index === 0">
<Info />
</view>
<Medicine v-if="index === 1" />
<Caregiver v-if="index === 2" />
<Family v-if="index === 3" />

2
src/components/ConfigInfo/components/Info.vue

@ -1,5 +1,5 @@
<template>
<view style="border: 1px solid #e5e5e5">
<view>
<view v-for="(item, index) in infoList" :key="index">
<template v-for="(colItem, itemIndex) in item">
<view v-if="colItem.showType === 1" :key="itemIndex" class="flex flex-col text-sm ml-4 border-b">

9
src/components/EndLine/EndLine.vue

@ -0,0 +1,9 @@
<template>
<view class="w-full bg-gray-100 text-gray-200 text-center pt-4 pb-12">----------我也是有底线的----------</view>
</template>
<script>
export default {};
</script>
<style></style>

9
src/components/Evaluated/Evaluated.vue

@ -0,0 +1,9 @@
<template>
<view>已测评</view>
</template>
<script>
export default {};
</script>
<style></style>

24
src/components/NotEvaluated/NotEvaluated.vue

@ -0,0 +1,24 @@
<template>
<view class="flex flex-col">
<view class="flex justify-between items-center">
<text class="text-base">脑力测评</text>
<u-icon name="arrow-right"></u-icon>
</view>
<view class="text-sm text-gray-400 my-2">
这套脑力测评工具是认知障碍诊疗专家在国际权威 认知测评量表的基础上结合我国老年人生活背景 及多年的临床经验编写而成每次测评包括35个
问题涵盖了各个方面的认知功能您只需要跟随 屏幕提示回答这些问题系统就会对您的认知水平 做一个全面评估根据评估结果系统将会为您量
身定制一套认知训练课程 这些问题有难有易请您别紧张因为老人的视力 不太好我们建议您在平板电脑上或者在台式电脑 上操作.
</view>
<view class="flex flex-nowrap my-2">
<u-button type="primary" size="mini" class="mx-0">开始测评</u-button>
<view class="flex-1"></view>
</view>
<text class="text-xs text-gray-300">每两个周可进行一次测评</text>
</view>
</template>
<script>
export default {};
</script>
<style></style>

127
src/components/TimeLine copy/TimeLine.vue

@ -0,0 +1,127 @@
<template>
<!-- 时间间隔栏 -->
<!-- <Barrier /> -->
<scroll-view
style="height: 100%"
:lower-threshold="100"
:scroll-y="true"
:upper-threshold="100"
:scroll-into-view="scrollToTaskId"
@scroll="scroll"
@scrolltolower="handleScrollBottom"
@scrolltoupper="handleScrollTop"
id="scroll"
>
<!-- 时间轴 -->
<!-- <u-divider bg-color="#f3f4f6" class="pt-5" fontSize="14px" v-if="topEnd">已到顶部</u-divider> -->
<TimeBox />
<!-- <u-divider bg-color="#f3f4f6" class="pb-5" fontSize="14px" v-if="bottomEnd">我也是有底线的</u-divider> -->
</scroll-view>
</template>
<script>
// import Barrier from './component/Barrier.vue';
import { mapState, mapMutations, mapGetters } from 'vuex';
import { setPlaceholderTasks } from '@/utils/task';
import TimeBox from './component/TimeBox.vue';
export default {
name: 'TimeLine',
components: { TimeBox },
data() {
return { top: 0 };
},
computed: {
...mapState('role', ['visibleRoles']),
...mapState('task', ['scrollTop', 'tasks', 'topEnd', 'bottomEnd', 'showSkeleton', 'timeNode', 'scrollToTaskId']),
...mapGetters('task', ['timeGranularity']),
},
methods: {
...mapMutations('task', ['setScrollTop', 'setShrink', 'setUpTasks', 'setDownTasks', 'setScrollToTaskId']),
//
scroll(e) {
console.log('e: ', e);
this.top = e.detail.scrollTop;
this.setShrink(this.top > this.scrollTop);
this.setScrollTop(this.top);
},
//
async handleScrollTop() {
if (!this.tasks || !this.tasks.length || this.showSkeleton) return;
const startTime = this.tasks[0].planStart - 0;
if (this.topEnd) {
//
console.warn('滚动到顶部没有数据时: ');
const addTasks = setPlaceholderTasks(startTime, true, this.timeGranularity);
this.setUpTasks(addTasks);
} else {
//
console.warn('滚动到顶部有数据时: ');
const detailId = this.tasks.findIndex(task => task.detailId);
const timeNode = this.tasks[detailId].planStart - 0;
const upQuery = {
timeNode,
queryType: 0,
queryNum: 6,
};
await this.$emit('getTasks', upQuery);
}
},
//
async handleScrollBottom() {
if (!this.tasks || !this.tasks.length || this.showSkeleton) return;
const { tasks, timeGranularity } = this;
const startTime = tasks[tasks.length - 1].planStart - 0;
if (this.bottomEnd) {
//
console.warn('滚动到底部没有数据时: ');
const addTasks = setPlaceholderTasks(startTime, false, this.timeGranularity);
this.setDownTasks(addTasks);
} else {
// =+
console.warn('滚动到底部有数据时: ');
const arr = [];
this.tasks.forEach(task => {
if (task.detailId) {
arr.push(task);
}
});
const nextQueryTime = +this.$t.time.add(+arr[arr.length - 1].planStart, 1, timeGranularity);
const downQuery = {
timeNode: nextQueryTime,
queryType: 1,
queryNum: 6,
};
await this.$emit('getTasks', downQuery);
}
},
//
setScrollPosition() {
// storagetaskId id
const taskId = this.$t.storage.getStorageSync('taskId');
if (taskId) {
this.setScrollToTaskId(`a${taskId}`);
this.$t.storage.setStorageSync('taskId', ''); //
} else {
const item = this.tasks.find(task => task.detailId);
if (item) {
this.setScrollToTaskId(`a${item.id}`);
} else {
// taskId
// 线id 线
const task = this.tasks.find(item => this.$moment(+item.planStart).isSame(this.timeNode, this.timeGranularity));
task && this.setScrollToTaskId(`a${task.id}`); // task id
}
}
},
},
};
</script>

42
src/components/TimeLine copy/component/Barrier.vue

@ -0,0 +1,42 @@
<!--
* @Author: aBin
* @email: binbin0314@126.com
* @Date: 2021-07-19 14:22:54
* @LastEditors: aBin
* @LastEditTime: 2021-07-20 11:46:04
-->
<template>
<view class>
<!-- :class="{ active: cycleTasks.time.start === filter.startTime }" -->
<view class="cycle-time active">
<!-- {{ $util.formatStartTimeToCycleTime(filter.time, cycleTasks.time.start) }} -->
2021年30周
</view>
</view>
</template>
<script>
export default {
name: 'Barrier',
data() {
return {};
},
};
</script>
<style scoped lang="scss">
.cycle-time {
padding: 8rpx 16rpx;
margin-bottom: 16rpx;
background: #fafafc;
color: $uni-text-color;
font-size: 28rpx;
position: sticky;
top: -1px;
left: 0;
z-index: 99;
&.active {
background: $uni-color-primary;
color: $uni-text-color-inverse;
}
}
</style>

185
src/components/TimeLine copy/component/TaskTools.vue

@ -0,0 +1,185 @@
<template>
<view>
<view class="flex justify-between" style="min-width: 90px; position: relative">
<u-icon custom-prefix="custom-icon" name="C-bxl-redux" size="17px"></u-icon>
<u-icon custom-prefix="custom-icon" name="attachment" size="21px"></u-icon>
<!-- <u-icon custom-prefix="custom-icon" name="moneycollect" size="20px"></u-icon> -->
<u-icon name="xuanxiang" custom-prefix="custom-icon" size="21px" @click="operation"></u-icon>
<!-- 右上角 ... 弹窗 -->
<view class="popup border shadow-md" v-if="show">
<view class="flex justify-center pb-3 border-b-1">
<span @click="createTask">新建任务</span>
</view>
<view class="flex pt-3 justify-center">
<span>克隆任务</span>
</view>
</view>
</view>
<!-- 遮罩 -->
<view class="mask" v-if="maskShow" @click="closeMask"></view>
<!-- 新建任务弹窗 -->
<CreateTask
:startTime="startTime"
:endTime="endTime"
:task="task"
@showTime="showTime"
@closeMask="closeMask"
class="thirdPopup flex transition-transform"
v-if="createTaskShow"
/>
<u-picker title="开始时间" mode="time" v-model="showStart" :params="params" @confirm="confirmStartTime"></u-picker>
<u-picker title="结束时间" mode="time" v-model="showEnd" :params="params" @confirm="confirmEndTime"></u-picker>
</view>
</template>
<script>
import CreateTask from '../../Title/components/CreateTask.vue';
export default {
components: { CreateTask },
props: {
task: {
type: Object,
default: () => {},
},
},
data() {
return {
show: false, // ...
createTaskShow: false, //
secondShow: false, //
maskShow: false, //
showStart: false,
showEnd: false,
startTime: '', //
endTime: '', //
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true,
},
};
},
methods: {
//
operation() {
// this.$t.ui.showToast('');
this.show = !this.show;
},
//
createTask() {
// ...
this.show = false;
//
this.maskShow = true;
//
this.createTaskShow = true;
},
//
closeMask() {
//
this.maskShow = false;
//
this.secondShow = false;
//
this.createTaskShow = false;
},
showTime() {
this.showStart = !this.showStart;
},
//
confirmStartTime(e) {
this.startTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
this.showEnd = true;
},
//
confirmEndTime(e) {
this.endTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
},
},
};
</script>
<style lang="scss" scoped>
.mask {
width: 100%;
height: 100vh;
z-index: 21;
position: fixed;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.3);
}
.thirdPopup {
background: #ffffff;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 33;
border-radius: 5px;
width: 90%;
}
.popup {
width: 110px;
background: #fff;
position: absolute;
right: 0;
top: 35px;
z-index: 99;
padding: 15px 0;
color: black;
animation: opacity 1s ease-in;
}
@keyframes opacity {
0% {
opacity: 0;
}
50% {
opacity: 0.8;
}
100% {
opacity: 1;
}
}
::v-deep .u-slot-content {
min-width: 0;
}
::v-deep .u-dropdown__content {
min-height: 120px !important;
height: auto !important;
overflow-y: auto;
background: #fff !important;
transition: none !important;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
::v-deep .u-dropdown__menu__item .u-flex {
justify-content: space-between;
width: 100%;
height: 100%;
flex-wrap: nowrap;
border: 1px solid #afbed1;
padding: 0 8px;
}
::v-deep .u-dropdown__content__mask {
display: none;
}
</style>

142
src/components/TimeLine copy/component/TimeBox.vue

@ -0,0 +1,142 @@
<template>
<view class="column">
<!-- v-if="tasks && tasks.length" -->
<view>
<view :key="task.id" v-for="task in tasks" :id="`a${task.id}`">
<view class="flex">
<TimeStatus :task="task" />
<view class="flex items-center justify-between flex-1 ml-2 task-column">
<view v-if="task.process !== 4">{{ $moment(+task.planStart).format(startTimeFormat) }}</view>
<view v-else>{{ $moment(+task.planStart).format('D日') }}</view>
<!-- 任务功能菜单 -->
<TaskTools v-if="task.process !== 4" :task="task" />
</view>
</view>
<view class="border-l-2 border-gray-300 plugin">
<view class="h-3" v-if="task.process === 4"></view>
<view class="ml-3 overflow-hidden shadow-lg task-box">
<u-card
:show-foot="false"
:show-head="false"
:style="{ height: setHeight(task.panel) }"
class="h-16"
margin="0"
v-if="showSkeleton"
>
<view slot="body">
<view>
<skeleton :banner="false" :loading="true" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton>
</view>
</view>
</u-card>
<u-card
@click="onClickTask(task.planStart - 0, task.id)"
:show-foot="false"
:show-head="false"
:style="{ height: setHeight(task.panel) }"
class="h-16"
margin="0"
v-if="tasks && tasks.length && task.process !== 4 && !showSkeleton"
>
任务面板插件
<view slot="body">
<view class="p-0 u-col-between">
<view :key="pIndex" v-for="(row, pIndex) in task.plugins">
<view class="grid gap-2" v-if="row.length">
<Plugin
:class="[`row-span-${plugin.row}`, `col-span-${plugin.col}`]"
:task="task"
:key="plugin.pluginTaskId"
:plugin-task-id="plugin.pluginTaskId"
:plugin-id="plugin.pluginId"
:param="plugin.param"
:style-type="styleType || 0"
v-for="plugin in row"
/>
</view>
</view>
</view>
</view>
</u-card>
</view>
</view>
</view>
</view>
<!-- 局部弹框操作栏 -->
<Tips />
</view>
</template>
<script>
import { mapState, mapMutations, mapGetters, mapActions } from 'vuex';
import Skeleton from '@/components/Skeleton/Skeleton';
import TimeStatus from './TimeStatus.vue';
import TaskTools from './TaskTools.vue';
export default {
name: 'TimeBox',
components: { TimeStatus, Skeleton, TaskTools },
data() {
return { currentComponent: '', styleType: 0 };
},
computed: {
...mapState('role', ['roleId']),
...mapState('task', ['timeUnit', 'tasks', 'taskLoading', 'showSkeleton']),
...mapGetters('task', ['startTimeFormat']),
},
methods: {
...mapActions('task', ['getGlobal']),
...mapMutations('task', ['setTipsContent', 'setTipsContent']),
//
setHeight(panel) {
if (panel && panel.height) {
return panel.height + 'px';
} else {
return 'auto';
}
},
/**
* 点击了定期任务的面板 更新可变的日常任务
* @param {number} planStart 任务计划开始时间
* @param {string} taskId 任务id
*/
onClickTask(planStart, taskId) {
const param = { roleId: this.roleId, timeNode: planStart, timeUnit: this.timeUnit };
this.getGlobal(param);
this.$t.storage.setStorageSync('taskId', taskId);
this.$t.storage.setStorageSync('roleId', this.roleId);
},
},
};
</script>
<style scoped lang="scss">
.task-box {
border-radius: 24rpx;
}
.column {
padding: 24px 14px;
}
.task-column {
height: 33px;
}
.plugin {
margin-top: 8px;
margin-bottom: 8px;
margin-left: 15px;
}
::v-deep .ml-2 {
margin-left: 16px;
}
::v-deep .ml-3 {
margin-left: 20px;
}
</style>

231
src/components/TimeLine copy/component/TimeStatus.vue

@ -0,0 +1,231 @@
<template>
<view class="u-font-14">
<view
class="flex items-center justify-center rounded-full icon-column"
:style="{ color: orderStyle.color }"
@click="changeStatus(task.process, $event)"
>
<!-- 1进行中 2暂停中 3已完成 -->
<u-circle-progress
:percent="orderStyle.persent - 0"
:active-color="orderStyle.color"
bg-color="rgba(255,255,255,0)"
border-width="4"
:width="task.process !== 4 ? 66 : 50"
v-if="task.process === 1 || task.process === 2 || task.process === 3"
>
<view class="u-progress-content">
<view class="u-progress-dot"></view>
<view class="u-progress-info">
<u-icon :name="orderStyle.icon" v-if="orderStyle.icon" size="15px"></u-icon>
<template v-else>{{ durationText }}</template>
</view>
</view>
</u-circle-progress>
<!-- 0未开始 4添加任务 -->
<view class="flex items-center justify-center rounded-full progress-box" v-else :class="task.process === 4 ? 'progress-box-4' : ''">
<view class="u-progress-content">
<view class="u-progress-dot"></view>
<view class="u-progress-info">
<span v-if="orderStyle.icon">
<u-icon :name="orderStyle.icon" v-if="task.process !== 4" size="15px"></u-icon>
<u-icon :name="orderStyle.icon" v-else size="15px"></u-icon>
</span>
<template v-else>{{ durationText }}</template>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
export default {
name: 'TimeStatus',
props: { task: { type: Object, default: () => {} } },
data() {
return {
time: '',
start: [{ text: '确认开始任务', color: 'blue' }],
pause: [{ text: '继续' }, { text: '重新开始任务', color: 'blue' }, { text: '结束' }],
proceed: [{ text: '暂停' }, { text: '重新开始任务', color: 'blue' }, { text: '结束' }],
again: [{ text: '重新开始任务', color: 'blue' }],
timer: null,
durationText: 0,
};
},
computed: {
...mapState('task', ['tip']),
status() {
return this.task ? this.task.process : 0;
},
taskName() {
return this.task ? this.task.name : '';
},
taskId() {
return this.task ? this.task.id : '';
},
//
// 0 1 2 3
orderStyle() {
let color = '#9CA3AF';
let icon = 'play-right-fill';
let persent = 100;
switch (this.status) {
case 1: //
color = '#60A5FA';
icon = '';
if (+this.computeCyclePersent() > 100) {
persent = 96;
} else {
persent = this.computeCyclePersent();
}
break;
case 2: //
color = '#F87171';
icon = 'pause';
persent = 50; // TODO:
break;
case 3: //
color = '#34D399';
icon = 'checkmark';
persent = 100;
break;
case 4: //
color = '#60A5FA';
icon = 'plus';
persent = 100;
break;
default:
//
color = '#9CA3AF';
icon = 'play-right';
persent = 100;
break;
}
return { color, icon, persent };
},
},
mounted() {
// TODO:
const time = this.computeDurationText();
this.updateDurationText(time);
},
destroyed() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
methods: {
...mapMutations('task', ['setTip']),
/**
* 点击了图标 修改任务状态
* @param {object} event
*/
changeStatus(process, event) {
if (process === 4) {
this.addTask();
return;
}
// return false;
const { status, taskId, taskName, tip } = this;
tip.status = status;
tip.taskId = taskId;
tip.left = event.target.x;
tip.top = event.target.y;
tip.show = true;
tip.text = this.genetateTips(status, taskName);
this.setTip(tip);
},
//
addTask() {
this.$t.ui.showToast('新建任务');
},
//
computeCyclePersent() {
if (!this.task || !this.task.realStart || !this.task.planDuration) return 100;
const { realStart, planDuration } = this.task;
return (((Date.now() - +realStart) * 100) / +planDuration).toFixed(2);
},
/**
* 计算tip的标题内容
*/
genetateTips(status, content) {
switch (status) {
case 0:
return `确认开始任务"${content}"吗?`;
case 1:
return `请选择要执行的操作`;
case 2:
return `请选择要执行的操作`;
case 3:
return `是否要重新开始此任务`;
}
},
//
// = realStart() + planDuration()
// = -
// = realStart + planDuration - Date.now()
computeDurationText() {
const { realStart, planDuration } = this.task;
const leftTime = +realStart + +planDuration - Date.now(); //
const { num, time } = this.$t.time.computeDurationText(leftTime);
if (num <= 0) {
clearInterval(this.timer);
this.timer = null;
}
this.durationText = num;
return time;
},
updateDurationText(time) {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
if (!time) return;
setInterval(() => {
this.computeDurationText();
}, time);
},
},
};
</script>
<style scoped lang="scss">
.icon-column {
height: 33px;
width: 33px;
}
.one {
height: 33px;
width: 33px;
}
.progress-box {
background: rgba(255, 255, 255, 0);
width: 33px;
height: 33px;
border: 2px solid #9ca3af;
}
.progress-box-4 {
width: 25px;
height: 25px;
border: 2px solid #60a5fa;
}
</style>

7
src/components/TimeLine copy/component/Title.vue

@ -0,0 +1,7 @@
<!--
* @Author: aBin
* @email: binbin0314@126.com
* @Date: 2021-07-19 15:40:02
* @LastEditors: aBin
* @LastEditTime: 2021-07-19 15:40:03
-->

29
src/components/TimeLine/component/TimeBox.vue

@ -10,7 +10,7 @@
<view v-else>{{ $moment(+task.planStart).format('D日') }}</view>
<!-- 任务功能菜单 -->
<TaskTools v-if="task.process !== 4" :task="task" />
<!-- <TaskTools v-if="task.process !== 4" :task="task" /> -->
</view>
</view>
<view class="border-l-2 border-gray-300 plugin">
@ -40,23 +40,10 @@
margin="0"
v-if="tasks && tasks.length && task.process !== 4 && !showSkeleton"
>
任务面板插件
<view slot="body">
<view class="p-0 u-col-between">
<view :key="pIndex" v-for="(row, pIndex) in task.plugins">
<view class="grid gap-2" v-if="row.length">
<Plugin
:class="[`row-span-${plugin.row}`, `col-span-${plugin.col}`]"
:task="task"
:key="plugin.pluginTaskId"
:plugin-task-id="plugin.pluginTaskId"
:plugin-id="plugin.pluginId"
:param="plugin.param"
:style-type="styleType || 0"
v-for="plugin in row"
/>
</view>
</view>
<Evaluated v-if="isEvaluated" />
<NotEvaluated v-else />
</view>
</view>
</u-card>
@ -73,14 +60,18 @@
import { mapState, mapMutations, mapGetters, mapActions } from 'vuex';
import Skeleton from '@/components/Skeleton/Skeleton';
import TimeStatus from './TimeStatus.vue';
import TaskTools from './TaskTools.vue';
// import TaskTools from './TaskTools.vue';
export default {
name: 'TimeBox',
components: { TimeStatus, Skeleton, TaskTools },
components: { TimeStatus, Skeleton },
data() {
return { currentComponent: '', styleType: 0 };
return {
currentComponent: '',
styleType: 0,
isEvaluated: false, //
};
},
computed: {

105
src/components/Upload/Upload.vue

@ -1,6 +1,37 @@
<template>
<view class="upload">
<u-icon name="plus" size="24px" class="flex justify-center w-12 h-12 bg-blue-100 rounded-full shadow-md" @click="handleUpload"></u-icon>
<!-- <u-icon name="plus" size="24px" class="iconStyle w-12 h-12" @click="handleUpload"></u-icon> -->
<u-icon name="plus" size="24px" class="plus" @click="openMenu"></u-icon>
<!-- 弹出菜单 -->
<view v-if="showMenu">
<u-icon
class="icons icon1"
size="76"
name="https://www.tall.wiki/staticrec/guide/icon1.png"
@click="openPage('/pages/scan-code/scan-code')"
></u-icon>
<u-icon
class="icons icon2"
size="76"
name="https://www.tall.wiki/staticrec/guide/icon2.png"
v-if="showAddInfo"
@click="openPage('/pages/add-info/add-info')"
></u-icon>
<u-icon
class="icons icon3"
size="76"
:class="showAddInfo ? '' : 'icon3-top'"
name="https://www.tall.wiki/staticrec/guide/icon3.png"
@click="openPage('/pages/ascription/ascription')"
></u-icon>
<u-icon
class="icons icon4"
size="76"
name="https://www.tall.wiki/staticrec/guide/icon4.png"
@click="openPage('/pages/hold-all/hold-all')"
></u-icon>
</view>
</view>
</template>
@ -8,6 +39,9 @@
import { mapGetters } from 'vuex';
export default {
data() {
return { showMenu: false, showAddInfo: true };
},
computed: mapGetters('user', ['userId']),
methods: {
// wbs
@ -31,6 +65,16 @@ export default {
this.$emit('error', error);
}
},
//
openMenu() {
this.showMenu = !this.showMenu;
},
openPage(url) {
console.log('url: ', url);
uni.navigateTo({ url: `${url}` });
},
},
};
</script>
@ -43,4 +87,63 @@ export default {
transform: translate3d(0, 50%, 0);
color: $uni-color-primary !important;
}
.plus {
position: flex;
justify-content: center;
width: 3rem;
height: 3rem;
border-radius: 50%;
--tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
--tw-bg-opacity: 1;
background-color: rgba(219, 234, 254, var(--tw-bg-opacity));
}
.icons-box {
width: 50px;
top: -60px;
left: -60px;
z-index: 9999;
}
.icons-box1 {
width: 50px;
top: -40px;
left: -60px;
z-index: 9999;
}
.icons {
position: absolute;
z-index: 9999;
border-radius: 50%;
--tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.icon1 {
top: -60px;
left: 0px;
}
.icon2 {
top: -20px;
left: -60px;
}
.icon3 {
top: 35px;
left: -60px;
}
.icon3-top {
top: 5px;
left: -60px;
}
.icon4 {
top: 70px;
left: 0px;
}
</style>

BIN
src/components/Upload/img/icon1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/components/Upload/img/icon2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/components/Upload/img/icon3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/components/Upload/img/icon4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

2
src/config/user.js

@ -22,7 +22,7 @@ export const mp = () => {
const params = {
client: uni.$t.user.clients['mp'],
type: uni.$t.user.types['mp'],
data: { identifier: res.code, credential: 'tall' },
data: { identifier: res.code, credential: 'yanyuan' },
};
resolve(params);
} else {

2
src/manifest.json

@ -1,6 +1,6 @@
{
"name": "TALL",
"appid": "wxf72a76c2ea24a472",
"appid": "wx733e229f00dc5c6f",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",

30
src/pages.json

@ -11,7 +11,7 @@
"path": "pages/phone-bind/phone-bind",
"style": {
"navigationBarTitleText": "绑定手机号",
"navigationStyle": "custom"
"navigationStyle": "default"
}
},
{
@ -34,6 +34,34 @@
"navigationBarTitleText": "项目详情页",
"navigationStyle": "custom"
}
},
{
"path": "pages/scan-code/scan-code",
"style": {
"navigationBarTitleText": "扫码",
"navigationStyle": "default"
}
},
{
"path": "pages/add-info/add-info",
"style": {
"navigationBarTitleText": "基本信息",
"navigationStyle": "default"
}
},
{
"path": "pages/ascription/ascription",
"style": {
"navigationBarTitleText": "训练归属",
"navigationStyle": "default"
}
},
{
"path": "pages/hold-all/hold-all",
"style": {
"navigationBarTitleText": "工具箱",
"navigationStyle": "default"
}
}
],
"globalStyle": {

13
src/pages/add-info/add-info.vue

@ -0,0 +1,13 @@
<template>
<view>
<Info />
<EndLine />
</view>
</template>
<script>
import Info from 'components/ConfigInfo/components/Info';
export default { components: { Info } };
</script>
<style></style>

9
src/pages/ascription/ascription.vue

@ -0,0 +1,9 @@
<template>
<view>训练归属</view>
</template>
<script>
export default {};
</script>
<style></style>

9
src/pages/hold-all/hold-all.vue

@ -0,0 +1,9 @@
<template>
<view>工具箱</view>
</template>
<script>
export default {};
</script>
<style></style>

2
src/pages/index/index.vue

@ -4,7 +4,7 @@
<!-- 日历 -->
<Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" @handleFindPoint="handleFindPoint" />
<!-- 上传 导入wbs -->
<Upload @success="onUploadSuccess" @error="onUploadError" />
<Upload @success="onUploadSuccess" @error="onUploadError" style="z-index: 9999" />
<!-- #ifdef H5 -->
<!-- #endif -->
</view>

38
src/pages/phone-bind/phone-bind.vue

@ -23,26 +23,26 @@
<u-verification-code :seconds="seconds" ref="uCode" @change="codeChange"></u-verification-code>
<u-top-tips ref="uTips"></u-top-tips>
<u-popup v-model="bindingPhone" mode="center" closeable class="p-4 ml-7 mr-7" border-radius="14">
<view class="p-4 pt-10"> 该手机号已经注册过账号是否将账号合并? </view>
<div class="flex justify-between pb-3 mt-3">
<u-button size="mini" @click="noMerge()">取消</u-button>
<u-button type="primary" size="mini" @click="yesMerge()">确定</u-button>
</div>
</u-popup>
<u-popup v-model="mergePop" mode="center" closeable class="p-4 ml-7 mr-7" border-radius="14">
<view class="pt-10 p-4">
<p>1您可以选择合并账号完成手机号的绑定系统会为您自动合并两个账号的数据信息</p>
<br />
<p>2如果选择不合并已注册手机号的已有数据可能会被清空</p>
<br />
<p class="text-red-500">注意合并账号可能会带来不确定的数据丢失</p>
<u-modal
v-model="bindingPhone"
content="该手机号已经注册过账号,是否将账号合并?"
class="p-4 ml-7 mr-7"
:show-cancel-button="true"
@confirm="yesMerge()"
@cancel="noMerge()"
></u-modal>
<u-modal v-model="mergePop" class="p-4 ml-7 mr-7" :show-cancel-button="true" @confirm="isMerge(0)" @cancel="isMerge(1)">
<view class="slot-content">
<view class="p-4">
<p>1您可以选择合并账号完成手机号的绑定系统会为您自动合并两个账号的数据信息</p>
<br />
<p>2如果选择不合并已注册手机号的已有数据可能会被清空</p>
<br />
<p class="text-red-500">注意合并账号可能会带来不确定的数据丢失</p>
</view>
</view>
<div class="flex justify-between mt-3 pb-3">
<u-button size="mini" @click="isMerge(1)">取消合并</u-button>
<u-button type="primary" size="mini" @click="isMerge(0)">确定合并</u-button>
</div>
</u-popup>
</u-modal>
</view>
</template>

9
src/pages/scan-code/scan-code.vue

@ -0,0 +1,9 @@
<template>
<view>扫码</view>
</template>
<script>
export default {};
</script>
<style></style>
Loading…
Cancel
Save