Browse Source

feat: 适配小程序

develop
song 4 years ago
parent
commit
9e3c45d1ce
  1. 1
      CHANGELOG.md
  2. 4
      src/App.vue
  3. 4
      src/components/ConfigInfo/components/Caregiver.vue
  4. 336
      src/components/ConfigInfo/components/Info copy.vue
  5. 122
      src/components/ConfigInfo/components/Info.vue
  6. 16
      src/components/ConfigInfo/components/Medicine.vue
  7. 20
      src/components/ConfigInfo/components/config.js
  8. 27
      src/components/GuidePage/GuidePage.vue
  9. 32
      src/components/Roles/Roles.vue
  10. 4
      src/components/TimeLine/TimeLine.vue
  11. 47
      src/components/Title/Title.vue
  12. 4
      src/pages/index/index.vue
  13. 30
      src/pages/project/project.vue

1
CHANGELOG.md

@ -53,6 +53,7 @@
- | 模拟接口测试 | [69e7931](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/69e7931)
- | 添加 环境变量,动态控制webview project的path | [8a40481](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/8a40481)
- | 添加子任务插件 子项目插件 | [7bda7e2](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/7bda7e2)
- | 添加引导页 | [4293f5a](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/4293f5a)
- | 添加时间轴上下滚动 | [2b81bbc](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/2b81bbc)
- | 添加药物使用记录界面 | [425cb63](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/425cb63)
- | 添加设置界面 | [7ca0c59](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/7ca0c59)

4
src/App.vue

@ -108,8 +108,4 @@ export default {
.collapse-box >>> .u-collapse-body {
height: auto !important;
}
uni-swiper {
height: 100% !important;
}
</style>

4
src/components/ConfigInfo/components/Caregiver.vue

@ -31,11 +31,11 @@
<view class="ml-4 my-3">{{ colItem.name }}</view>
<!-- 数字输入框 -->
<view v-if="colItem.type === 3" class="pr-7">
<u-input v-model="colItem.value" type="number" input-align="right" />
<u-input v-model="colItem.value" type="number" :clearable="false" input-align="right" />
</view>
<!-- input 文本输入框 -->
<view v-if="colItem.type === 8" class="pr-7">
<u-input v-model="colItem.value" input-align="right" />
<u-input v-model="colItem.value" :clearable="false" input-align="right" />
</view>
</view>
</template>

336
src/components/ConfigInfo/components/Info copy.vue

@ -0,0 +1,336 @@
<template>
<view style="border: 1px solid #e5e5e5">
<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">
<view class="my-3 flex justify-between items-center" @click="changeShow(index, itemIndex)">
{{ colItem.name }}
<u-icon name="arrow-up" class="mx-2" color="#909399" v-if="colItem.show"></u-icon>
<u-icon name="arrow-down" class="mx-2" color="#909399" v-else></u-icon>
</view>
<view v-if="colItem.show">
<!-- 单选 -->
<view v-if="colItem.type === 1">
<radio-group @change="change($event, index, itemIndex, colItem.type)" class="flex flex-wrap">
<label
class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mr-4 mb-3"
v-for="(item, index) in colItem.radioList"
:key="index"
>
<radio class="radio-style" :value="item" />
<view>{{ item }}</view>
</label>
</radio-group>
</view>
<!-- 多选 -->
<view v-if="colItem.type === 5">
<u-checkbox-group>
<u-checkbox
class="mb-3"
@change="change($event, index, itemIndex, colItem.type)"
v-model="checkboxItem.checked"
v-for="(checkboxItem, checkboxIndex) in colItem.checkList"
:key="checkboxIndex"
:name="checkboxItem.name"
>{{ checkboxItem.name }}
</u-checkbox>
</u-checkbox-group>
</view>
<!-- 吸烟 -->
<view v-if="colItem.type === 10">
<radio-group @change="change($event, index, itemIndex, colItem.type)" class="flex flex-col">
<label class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mb-3">
<radio class="radio-style" :value="0" />
<view></view>
</label>
<label class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mb-3">
<radio class="radio-style" :value="1" />
<view class="flex flex-nowrap items-center">
曾经是但已经戒烟已戒
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value1"
:clearable="false"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
</view>
</label>
<label class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mb-3">
<radio class="radio-style" :value="2" />
<view class="flex flex-nowrap items-center">
烟龄
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value2"
:clearable="false"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
每天
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
:border="true"
v-model="colItem.value3"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
</view>
</label>
</radio-group>
</view>
<!-- 饮酒 -->
<view v-if="colItem.type === 11">
<radio-group @change="change($event, index, itemIndex, colItem.type)" class="flex flex-col">
<label class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mb-3">
<radio class="radio-style" :value="0" />
<view></view>
</label>
<label class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mb-3">
<radio class="radio-style" :value="1" />
<view class="flex flex-nowrap items-center">
曾经是但已经戒酒已戒
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value1"
:clearable="false"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
</view>
</label>
</radio-group>
</view>
<!-- 饮茶 -->
<view v-if="colItem.type === 12">
<radio-group @change="change($event, index, itemIndex, colItem.type)" class="flex flex-col">
<label class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mb-3">
<radio class="radio-style" :value="0" />
<view></view>
</label>
<label class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mb-3">
<radio class="radio-style" :value="1" />
<view class="flex flex-nowrap items-center">
曾经是但已经不喝已不喝
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value1"
:clearable="false"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
</view>
</label>
<label class="uni-list-cell uni-list-cell-pd flex flex-wrap items-center mb-3">
<radio class="radio-style" :value="2" />
<view class="flex flex-nowrap items-center">
已持续
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value2"
:clearable="false"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
</view>
</label>
</radio-group>
</view>
</view>
</view>
<view v-else :key="itemIndex" class="flex justify-between items-center text-sm border-b">
<view class="ml-4 my-3">{{ colItem.name }}</view>
<!-- 日期: 年月日 -->
<view v-if="colItem.type === 2">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
<u-picker
@confirm="change($event, index, itemIndex, colItem.type)"
v-model="colItem.show"
mode="time"
:params="paramsDay"
></u-picker>
</view>
<!-- 数字输入框 -->
<view v-if="colItem.type === 3" class="pr-7">
<u-input placeholder="请输入" v-model="colItem.value" type="number" input-align="right" />
</view>
<!-- 单列下拉选框 -->
<view v-if="colItem.type === 4">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
<u-select
v-model="colItem.show"
mode="single-column"
:list="colItem.radioList"
@confirm="change($event, index, itemIndex, colItem.type)"
:default-value="[14]"
></u-select>
</view>
<!-- 日期: 年月日时 -->
<view v-if="colItem.type === 6">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
<u-picker
@confirm="change($event, index, itemIndex, colItem.type)"
v-model="colItem.show"
mode="time"
:params="paramsHour"
></u-picker>
</view>
<!-- 多列下拉选框 -->
<view v-if="colItem.type === 7">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
<u-select
v-model="colItem.show"
mode="mutil-column"
:list="colItem.radioList"
@confirm="change($event, index, itemIndex, colItem.type)"
:default-value="[70, 100]"
title="低血压/高血压"
></u-select>
</view>
<!-- input 文本输入框 -->
<view v-if="colItem.type === 8" class="pr-7">
<u-input placeholder="请输入" v-model="colItem.value" input-align="right" />
</view>
<!-- 地区选择器 -->
<view v-if="colItem.type === 9">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
<u-picker
@confirm="change($event, index, itemIndex, colItem.type)"
mode="region"
v-model="colItem.show"
:params="paramsArea"
></u-picker>
</view>
</view>
</template>
<view class="w-full h-2 bg-gray-100" v-if="index !== infoList.length - 1"></view>
</view>
</view>
</template>
<script>
import { infoList } from './config';
export default {
name: 'Info',
data() {
return {
headStyle: {
backgroundColor: '#fff',
height: '46px',
paddingLeft: '1rem',
fontSize: '0.875rem',
},
bodyStyle: { paddingLeft: '1rem' },
infoList,
paramsDay: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false,
},
paramsHour: {
year: true,
month: true,
day: true,
hour: true,
minute: false,
second: false,
},
paramsArea: {
province: true,
city: true,
area: false,
},
};
},
methods: {
changeShow(index, itemIndex) {
console.log('index, itemIndex: ', index, itemIndex);
this.infoList[index][itemIndex].show = !this.infoList[index][itemIndex].show;
},
change(e, index, itemIndex, type) {
console.log('e, index, itemIndex, type: ', e, index, itemIndex, type);
if (type === 1) {
//
this.infoList[index][itemIndex].value = e.target.value;
} else if (type === 2) {
// ()
const value = e.year + '-' + e.month + '-' + e.day;
this.infoList[index][itemIndex].value = value;
} else if (type === 4) {
//
this.infoList[index][itemIndex].value = e[0].value;
} else if (type === 5) {
//
let checkerList = this.infoList[index][itemIndex].value;
if (checkerList.length) {
const i = checkerList.findIndex(item => item === e.name);
if (i < 0) {
checkerList.push(e.name);
} else {
checkerList.splice(i, 1);
}
} else {
checkerList.push(e.name);
}
this.infoList[index][itemIndex].value = checkerList;
} else if (type === 6) {
// ()
const value = e.year + '-' + e.month + '-' + e.day + '-' + e.hour;
this.infoList[index][itemIndex].value = value;
} else if (type === 7) {
//
this.infoList[index][itemIndex].value = e[0].value + '/' + e[1].value;
} else if (type === 9) {
//
this.infoList[index][itemIndex].value = e.province.label + e.city.label;
} else {
this.infoList[index][itemIndex].value = e;
}
},
},
};
</script>
<style lang="scss" scoped>
.border-b {
border-bottom: 1px solid #f8f8f8;
}
</style>
<style>
.radio-style >>> .uni-radio-input {
width: 1rem !important;
height: 1rem !important;
}
</style>

122
src/components/ConfigInfo/components/Info.vue

@ -2,15 +2,13 @@
<view style="border: 1px solid #e5e5e5">
<view v-for="(item, index) in infoList" :key="index">
<template v-for="(colItem, itemIndex) in item">
<u-collapse
v-if="colItem.showType === 1"
:key="itemIndex"
:head-style="headStyle"
:body-style="bodyStyle"
:accordion="false"
style="border-bottom: 1px solid #f8f8f8"
>
<u-collapse-item :title="colItem.name" :open="false">
<view v-if="colItem.showType === 1" :key="itemIndex" class="flex flex-col text-sm ml-4 border-b">
<view class="my-3 flex justify-between items-center" @click="changeShow(index, itemIndex)">
{{ colItem.name }}
<u-icon name="arrow-up" class="mx-2" color="#909399" v-if="colItem.show"></u-icon>
<u-icon name="arrow-down" class="mx-2" color="#909399" v-else></u-icon>
</view>
<view v-if="colItem.show">
<!-- 单选 -->
<view v-if="colItem.type === 1">
<u-radio-group v-model="colItem.value">
@ -42,44 +40,38 @@
<!-- 吸烟 -->
<view v-if="colItem.type === 10">
<u-radio-group v-model="colItem.value" class="flex flex-col" @change="change($event, index, itemIndex, colItem.type)">
<u-radio class="mb-1" :name="0"></u-radio>
<u-radio class="mb-1" :name="1">
<u-radio class="flex mb-1 w-full" :name="0"></u-radio>
<u-radio class="flex mb-1" :name="1">
<view class="flex flex-nowrap items-center">
曾经是但已经戒烟已戒
<u-input
class="mx-1 w-12 h-6 items-center"
placeholder=""
:border="true"
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value1"
:clearable="false"
input-align="center"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
</view>
</u-radio>
<u-radio class="mb-1" :name="2">
<u-radio class="flex mb-1" :name="2">
<view class="flex flex-nowrap items-center">
烟龄
<u-input
class="mx-1 w-12 h-6 items-center"
placeholder=""
:border="true"
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value2"
:clearable="false"
input-align="center"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
每天
<u-input
class="mx-1 w-12 h-6 items-center"
placeholder=""
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
:border="true"
v-model="colItem.value3"
:clearable="false"
input-align="center"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
@ -90,17 +82,15 @@
<!-- 饮酒 -->
<view v-if="colItem.type === 11">
<u-radio-group v-model="colItem.value" class="flex flex-col" @change="change($event, index, itemIndex, colItem.type)">
<u-radio class="mb-1" :name="0"></u-radio>
<u-radio class="mb-1" :name="1">
<u-radio class="flex mb-1" :name="0"></u-radio>
<u-radio class="flex mb-1" :name="1">
<view class="flex flex-nowrap items-center">
曾经是但已经戒酒已戒
<u-input
class="mx-1 w-12 h-6 items-center"
placeholder=""
:border="true"
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value1"
:clearable="false"
input-align="center"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
@ -112,33 +102,29 @@
<!-- 饮茶 -->
<view v-if="colItem.type === 12">
<u-radio-group v-model="colItem.value" class="flex flex-col" @change="change($event, index, itemIndex, colItem.type)">
<u-radio class="mb-1" :name="0"></u-radio>
<u-radio class="mb-1" :name="1">
<u-radio class="flex mb-1" :name="0"></u-radio>
<u-radio class="flex mb-1" :name="1">
<view class="flex flex-nowrap items-center">
曾经是但已经不喝已不喝
<u-input
class="mx-1 w-12 h-6 items-center"
placeholder=""
:border="true"
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value1"
:clearable="false"
input-align="center"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
</view>
</u-radio>
<u-radio class="mb-1" :name="2">
<u-radio class="flex mb-1" :name="2">
<view class="flex flex-nowrap items-center">
已持续
<u-input
class="mx-1 w-12 h-6 items-center"
placeholder=""
:border="true"
<input
class="mx-1 w-12 h-6 text-center border-b"
placeholder="0"
v-model="colItem.value2"
:clearable="false"
input-align="center"
type="number"
@change="change($event, index, itemIndex, colItem.type)"
/>
@ -147,13 +133,13 @@
</u-radio>
</u-radio-group>
</view>
</u-collapse-item>
</u-collapse>
<view v-else :key="itemIndex" class="flex justify-between items-center text-sm" style="border-bottom: 1px solid #f8f8f8">
</view>
</view>
<view v-else :key="itemIndex" class="flex justify-between items-center text-sm border-b">
<view class="ml-4 my-3">{{ colItem.name }}</view>
<!-- 日期: 年月日 -->
<view v-if="colItem.type === 2">
<view @click="colItem.show = !colItem.show">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
@ -166,11 +152,11 @@
</view>
<!-- 数字输入框 -->
<view v-if="colItem.type === 3" class="pr-7">
<u-input placeholder="请输入" v-model="colItem.value" type="number" input-align="right" />
<u-input placeholder="请输入" v-model="colItem.value" :clearable="false" type="number" input-align="right" />
</view>
<!-- 单列下拉选框 -->
<view v-if="colItem.type === 4">
<view @click="colItem.show = !colItem.show">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
@ -184,7 +170,7 @@
</view>
<!-- 日期: 年月日时 -->
<view v-if="colItem.type === 6">
<view @click="colItem.show = !colItem.show">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
@ -197,7 +183,7 @@
</view>
<!-- 多列下拉选框 -->
<view v-if="colItem.type === 7">
<view @click="colItem.show = !colItem.show">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
@ -212,11 +198,11 @@
</view>
<!-- input 文本输入框 -->
<view v-if="colItem.type === 8" class="pr-7">
<u-input placeholder="请输入" v-model="colItem.value" input-align="right" />
<u-input placeholder="请输入" v-model="colItem.value" :clearable="false" input-align="right" />
</view>
<!-- 地区选择器 -->
<view v-if="colItem.type === 9">
<view @click="colItem.show = !colItem.show">
<view @click="changeShow(index, itemIndex)">
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text>
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon>
</view>
@ -231,7 +217,6 @@
</template>
<view class="w-full h-2 bg-gray-100" v-if="index !== infoList.length - 1"></view>
</view>
<u-button type="primary" class="m-4">完成</u-button>
</view>
</template>
@ -273,8 +258,15 @@ export default {
},
};
},
methods: {
changeShow(index, itemIndex) {
console.log('index, itemIndex: ', index, itemIndex);
this.infoList[index][itemIndex].show = !this.infoList[index][itemIndex].show;
},
change(e, index, itemIndex, type) {
console.log('e, index, itemIndex, type: ', e, index, itemIndex, type);
if (type === 2) {
// ()
const value = e.year + '-' + e.month + '-' + e.day;
@ -313,4 +305,16 @@ export default {
},
};
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.border-b {
border-bottom: 1px solid #f8f8f8;
}
</style>
<style>
/* .radio-style >>> .uni-radio-input {
width: 1rem !important;
height: 1rem !important;
} */
</style>

16
src/components/ConfigInfo/components/Medicine.vue

@ -20,10 +20,10 @@
</view>
<!-- 数字输入框 -->
<view v-if="colItem.type === 3" class="pr-7">
<u-input v-model="colItem.value" type="number" input-align="right" />
<u-input v-model="colItem.value" type="number" :clearable="false" input-align="right" />
</view>
<!-- 数字输入框+单选 -->
<view v-if="colItem.type === 4" class="flex flex-nowrap">
<view v-if="colItem.type === 4" class="flex flex-nowrap items-center">
<u-input
:clearable="false"
class="flex-1 mr-3"
@ -31,7 +31,7 @@
placeholder="每日总剂量(单位: mg)"
type="number"
input-align="center"
@focus="colItem.checked = false"
@focus="cancelChecked(index, itemIndex)"
/>
<u-checkbox-group @change="change($event, index, itemIndex, colItem.type)">
<u-checkbox v-model="colItem.checked" shape="circle">未服用</u-checkbox>
@ -41,7 +41,6 @@
</template>
<view class="w-full h-2 bg-gray-100" v-if="index !== medicineInfo.length - 1"></view>
</view>
<u-button type="primary" class="m-4">开始填表</u-button>
</view>
</template>
@ -63,10 +62,13 @@ export default {
};
},
methods: {
cancelChecked(index, itemIndex) {
this.medicineInfo[index].date[itemIndex].checked = false;
},
change(e, index, itemIndex, type) {
console.log('e: ', e);
console.log('type: ', type);
this.medicineInfo[index][itemIndex].value = e;
console.log('e, index, itemIndex, type: ', e, index, itemIndex, type);
this.medicineInfo[index].date[itemIndex].value = e;
},
},
};

20
src/components/ConfigInfo/components/config.js

@ -24,6 +24,7 @@ export const infoList = [
type: 1,
radioList: ['男', '女'],
value: null,
show: false,
},
{
name: '出生日期',
@ -37,12 +38,14 @@ export const infoList = [
showType: 2,
type: 3,
value: null,
show: false,
},
{
name: '体重(kg)',
showType: 2,
type: 3,
value: null,
show: false,
},
{
name: '职业',
@ -50,6 +53,7 @@ export const infoList = [
type: 1,
radioList: ['干部', '军人', '技术人员', '农民', '工人', '运动员', '个体商业人员', '其他'],
value: null,
show: false,
},
{
name: '受教育程度',
@ -57,6 +61,7 @@ export const infoList = [
type: 1,
radioList: ['文盲', '小学', '初中', '高中或中专', '大学或大专', '大学以上', '其他'],
value: null,
show: false,
},
{
name: '受教育年限(年)',
@ -119,6 +124,7 @@ export const infoList = [
type: 1,
radioList: ['阿尔茨海默病', '路易体痴呆', '额颞痴呆', '血管性痴呆', '混合性痴呆', '其他'],
value: null,
show: false,
},
],
[
@ -135,6 +141,7 @@ export const infoList = [
showType: 2,
type: 3,
value: null,
show: false,
},
],
[
@ -144,6 +151,7 @@ export const infoList = [
type: 1,
radioList: ['强', '中', '低'],
value: null,
show: false,
},
{
name: 'APOE基因',
@ -151,6 +159,7 @@ export const infoList = [
type: 1,
radioList: ['是', '否', '不知道'],
value: null,
show: false,
},
],
[
@ -173,6 +182,7 @@ export const infoList = [
{ name: '其他', checked: false, disabled: false },
],
value: [],
show: false,
},
{
name: '亲属疾病史(祖父母;外祖父母;父母)',
@ -193,6 +203,7 @@ export const infoList = [
{ name: '其他', checked: false, disabled: false },
],
value: [],
show: false,
},
],
[
@ -202,6 +213,7 @@ export const infoList = [
type: 1,
radioList: ['是', '否'],
value: null,
show: false,
},
{
name: '吸烟',
@ -211,18 +223,21 @@ export const infoList = [
value1: null,
value2: null,
value3: null,
show: false,
},
{
name: '饮酒',
showType: 1,
type: 11,
value: null,
show: false,
},
{
name: '饮茶',
showType: 1,
type: 12,
value: null,
show: false,
},
{
name: '饮食是否重口',
@ -230,6 +245,7 @@ export const infoList = [
type: 1,
radioList: ['是', '否'],
value: null,
show: false,
},
{
name: '饮食喜好',
@ -237,6 +253,7 @@ export const infoList = [
type: 1,
radioList: ['荤菜', '素菜'],
value: null,
show: false,
},
{
name: '炒菜放油多少',
@ -244,6 +261,7 @@ export const infoList = [
type: 1,
radioList: ['是', '否'],
value: null,
show: false,
},
],
[
@ -252,12 +270,14 @@ export const infoList = [
showType: 2,
type: 8,
value: null,
show: false,
},
{
name: '就诊医生',
showType: 2,
type: 8,
value: null,
show: false,
},
{
name: '医院地址',

27
src/components/GuidePage/GuidePage.vue

@ -1,5 +1,16 @@
<template>
<view class="wrap">
<swiper @change="changePic" class="swiper" :indicator-dots="true" :autoplay="false">
<swiper-item v-for="(item, index) in list" :key="index">
<view
class="img h-full"
:style="{
backgroundImage: 'url(' + item.image + ')',
}"
></view>
<!-- <img :src="item.image" class="w-full" /> -->
</swiper-item>
</swiper>
<!-- <view class="wrap aaaa">
<u-swiper
@change="changePic"
height="100%"
@ -9,13 +20,14 @@
class="w-full h-full"
:circular="false"
></u-swiper>
</view>
</view> -->
</template>
<script>
export default {
data() {
return {
current: 0,
list: [
{
image: 'https://www.tall.wiki/staticrec/guide/1.png',
@ -41,7 +53,8 @@ export default {
};
},
methods: {
changePic(index) {
changePic(e) {
const index = e.target.current;
if (index === this.list.length - 1) {
setTimeout(() => {
this.$emit('quitGuide');
@ -53,9 +66,15 @@ export default {
</script>
<style lang="scss" scoped>
.wrap {
.swiper {
position: absolute;
top: 0;
z-index: 999999;
width: 100vw;
height: 100vh;
}
.swiper .img {
background-size: cover;
}
</style>

32
src/components/Roles/Roles.vue

@ -16,7 +16,7 @@
'tab-choice': item.mine == 0 && roleId === item.id,
}"
:key="index"
@click="changeRole(item.id, index)"
@click="changeRole(item.id, index, item.type)"
class="tab-item"
v-for="(item, index) in roles"
>
@ -27,6 +27,23 @@
{{ item.name }}
</view>
</view>
<!-- 设置 -->
<view
:class="{
'default-tab-choice': setRole.mine == 1 && roleId === setRole.id,
'default-tab-item': setRole.mine == 1 && roleId !== setRole.id,
'tab-choice': setRole.mine == 0 && roleId === setRole.id,
}"
@click="changeRole(setRole.id, roles.length, 1)"
class="tab-item"
>
<view
class="tab-children u-skeleton-fillet u-font-14"
:style="{ 'border-bottom': setRole.id === roleId ? '2px solid #0284c7;' : '' }"
>
{{ setRole.name }}
</view>
</view>
</view>
<!-- <u-icon class="m-1" name="xuanxiang" custom-prefix="custom-icon" size="20px" @click="operation"></u-icon> -->
<view class="flex align-center">
@ -52,10 +69,13 @@ export default {
scrollLeft: 0, // scrollview
loading: false, //
roles: [
{ id: 1, name: '项目经理', mine: 0, pm: 1, sequence: 1 },
{ id: 2, name: '运维', mine: 0, pm: 0, sequence: 2 },
{ id: 1, name: '项目经理', mine: 1, pm: 1, sequence: 1, type: 0 },
{ id: 2, name: '运维', mine: 0, pm: 0, sequence: 2, type: 0 },
{ id: 3, name: '设置', mine: 0, pm: 0, sequence: 2, type: 1 },
],
roleLeft: 0,
setRole: { id: '3', name: '设置', mine: 0, pm: 0, sequence: 2, type: 1 },
};
},
@ -138,8 +158,12 @@ export default {
//
// projectroleId
// projectroleId
changeRole(id, index) {
changeRole(id, index, type) {
try {
if (type === 1) {
//
this.$emit('changeIsSetting');
}
// script
// this.clearPluginScript();
this.$nextTick(() => {

4
src/components/TimeLine/TimeLine.vue

@ -14,9 +14,9 @@
id="scroll"
>
<!-- 时间轴 -->
<!-- <u-divider bg-color="#f3f4f6" class="pt-5" fontSize="14px" v-if="topEnd">到顶啦</u-divider> -->
<!-- <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> -->
<!-- <u-divider bg-color="#f3f4f6" class="pb-5" fontSize="14px" v-if="bottomEnd">我也是有底线的</u-divider> -->
</scroll-view>
</template>

47
src/components/Title/Title.vue

@ -1,59 +1,30 @@
<template>
<view style="border-bottom: 1px solid #dcdfe6">
<!-- #ifdef MP-WEIXIN -->
<!-- :is-back="false" -->
<u-navbar :custom-back="onBack" class="overflow-hidden">
<view class="flex justify-start flex-1 px-3 font-bold min-0">
<view class="truncate">{{ project.name }}</view>
</view>
<!-- <view class="mr-2" slot="right">
<u-icon class="m-1" name="xuanzhong2" custom-prefix="custom-icon" size="20px" @click="lwbs"></u-icon>
<u-icon class="m-1" name="shuaxin1" custom-prefix="custom-icon" size="20px" @click="projectOverview"></u-icon>
<u-icon class="m-1" name="home" custom-prefix="custom-icon" size="20px" @click="openIndex"></u-icon>
<u-icon class="m-1" name="xuanxiang" custom-prefix="custom-icon" size="20px" @click="operation"></u-icon>
</view> -->
</u-navbar>
<!-- <view
class="mask"
v-if="maskShow"
@click="closeMask"
style="width: 100%; height: 100vh; z-index: 21; position: fixed; background: rgba(0, 0, 0, 0.3)"
></view> -->
<!-- 右上角 ... 弹窗 -->
<!-- <view class="popup border shadow-md" v-if="show">
<view class="flex pb-3 border-b-1">
<u-icon name="plus-circle" size="36" style="margin: 0 15px 3px 0"></u-icon>
<view>新建任务</view>
<!-- #endif -->
<!-- h5标题 -->
<!-- #ifdef H5 -->
<view class="overflow-hidden py-3">
<view class="flex justify-start flex-1 px-3 font-bold min-0">
<u-icon name="arrow-left" @click="onBack" class="mr-3" size="40" />
<view class="truncate">{{ project.name }}</view>
</view>
<view class="flex pt-3">
<u-icon name="share" size="32" style="margin: 0 15px 3px 0"></u-icon>
<view @click="share">分享项目</view>
</view>
</view> -->
<!-- 分享项目弹窗 -->
<ShareProject v-if="secondShow" class="second-popup" />
<!-- 新建任务弹窗 -->
<CreateTask
:startTime="startTime"
:endTime="endTime"
@showTime="showTime"
@closeMask="closeMask"
class="third-popup 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>
<!-- #endif -->
</view>
</template>
<script>
import { mapGetters, mapState } from 'vuex';
import CreateTask from './components/CreateTask.vue';
import ShareProject from './components/ShareProject.vue';
export default {
name: 'ProjectTitle',
components: { CreateTask, ShareProject },
data() {
return {
show: false, // ...

4
src/pages/index/index.vue

@ -1,5 +1,5 @@
<template>
<view class="flex flex-col h-full bg-gray-50" @click="openAuth">
<view class="flex flex-col h-full bg-gray-50">
<view class="relative" @touchmove="onMove">
<!-- 日历 -->
<Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" @handleFindPoint="handleFindPoint" />
@ -49,7 +49,7 @@ export default {
},
onReady() {
this.calendar = this.$refs.calendar;
// this.calendar = this.$refs.calendar;
},
methods: {

30
src/pages/project/project.vue

@ -1,22 +1,23 @@
<template>
<view :style="{ height: height }" class="flex flex-col overflow-hidden u-font-14">
<!-- <img class="img-box" src="./img/default.png" @click="back" /> -->
<!-- 标题栏 -->
<Title />
<view class="container flex flex-col flex-1 overflow-hidden bg-gray-100">
<!-- 角色栏 -->
<Roles />
<Roles @changeIsSetting="changeIsSetting" />
<!-- 日常任务面板 -->
<!-- <Globals /> -->
<!-- 定期任务面板 -->
<!-- <TimeLine @getTasks="getTasks" style="background-color: #f3f3f3" class="flex-1 overflow-hidden" ref="timeLine" /> -->
<ConfigInfo class="flex-1 overflow-hidden" style="background-color: #f3f3f3" />
<!-- <ConfigInfo class="flex-1 overflow-hidden" style="background-color: #f3f3f3" /> -->
<ConfigInfo class="flex-1 overflow-hidden" style="background-color: #f3f3f3" v-if="isSetting" />
<TimeLine @getTasks="getTasks" style="background-color: #f3f3f3" class="flex-1 overflow-hidden" ref="timeLine" v-else />
</view>
<GuidePage class="w-full h-full" v-if="showGuide" @quitGuide="quitGuide" />
<!-- 引导语 -->
<!-- <GuidePage class="w-full h-full" v-if="showGuide" @quitGuide="quitGuide" /> -->
</view>
</template>
@ -27,7 +28,15 @@ import { flatten } from 'lodash';
export default {
data() {
return { height: '', show: false, questionnaires: [], count: 0, chooseItem: false, showGuide: false };
return {
height: '',
show: false,
questionnaires: [],
count: 0,
chooseItem: false,
showGuide: false,
isSetting: false, //
};
},
computed: {
@ -60,7 +69,7 @@ export default {
if (val && this.roleId) {
this.clearTasksData();
this.getGlobalData(); //
// this.initPlanTasks(); //
this.initPlanTasks(); //
}
},
@ -72,6 +81,8 @@ export default {
*/
roleId(val) {
if (val) {
if (this.isSetting) return;
console.log('当角色发生变化时: ', val);
this.setTimeNode(Date.now());
//
const params = { roleId: val, projectId: this.projectId };
@ -130,6 +141,11 @@ export default {
uni.navigateBack();
},
changeIsSetting() {
this.isSetting = true;
console.log('isSetting: ', this.isSetting);
},
//
async initPlanTasks() {
this.setPrevPlaceholderTasks(); //

Loading…
Cancel
Save