From 9e3c45d1cef931283cd0cbaa81879fc61ed52869 Mon Sep 17 00:00:00 2001 From: song Date: Thu, 4 Nov 2021 17:46:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=82=E9=85=8D=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/App.vue | 4 - .../ConfigInfo/components/Caregiver.vue | 4 +- .../ConfigInfo/components/Info copy.vue | 336 ++++++++++++++++++ src/components/ConfigInfo/components/Info.vue | 122 ++++--- .../ConfigInfo/components/Medicine.vue | 16 +- .../ConfigInfo/components/config.js | 20 ++ src/components/GuidePage/GuidePage.vue | 27 +- src/components/Roles/Roles.vue | 32 +- src/components/TimeLine/TimeLine.vue | 4 +- src/components/Title/Title.vue | 49 +-- src/pages/index/index.vue | 4 +- src/pages/project/project.vue | 30 +- 13 files changed, 519 insertions(+), 130 deletions(-) create mode 100644 src/components/ConfigInfo/components/Info copy.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index cbfb628..9dad757 100644 --- a/CHANGELOG.md +++ b/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) diff --git a/src/App.vue b/src/App.vue index facff6a..63f3394 100644 --- a/src/App.vue +++ b/src/App.vue @@ -108,8 +108,4 @@ export default { .collapse-box >>> .u-collapse-body { height: auto !important; } - -uni-swiper { - height: 100% !important; -} diff --git a/src/components/ConfigInfo/components/Caregiver.vue b/src/components/ConfigInfo/components/Caregiver.vue index a033041..b5cb615 100644 --- a/src/components/ConfigInfo/components/Caregiver.vue +++ b/src/components/ConfigInfo/components/Caregiver.vue @@ -31,11 +31,11 @@ {{ colItem.name }} - + - + diff --git a/src/components/ConfigInfo/components/Info copy.vue b/src/components/ConfigInfo/components/Info copy.vue new file mode 100644 index 0000000..121a134 --- /dev/null +++ b/src/components/ConfigInfo/components/Info copy.vue @@ -0,0 +1,336 @@ + + + + + + + diff --git a/src/components/ConfigInfo/components/Info.vue b/src/components/ConfigInfo/components/Info.vue index ef74802..2ae08bf 100644 --- a/src/components/ConfigInfo/components/Info.vue +++ b/src/components/ConfigInfo/components/Info.vue @@ -2,15 +2,13 @@ - 完成 @@ -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 { }, }; - + + + + diff --git a/src/components/ConfigInfo/components/Medicine.vue b/src/components/ConfigInfo/components/Medicine.vue index 823af14..731649e 100644 --- a/src/components/ConfigInfo/components/Medicine.vue +++ b/src/components/ConfigInfo/components/Medicine.vue @@ -20,10 +20,10 @@ - + - + 未服用 @@ -41,7 +41,6 @@ - 开始填表 @@ -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; }, }, }; diff --git a/src/components/ConfigInfo/components/config.js b/src/components/ConfigInfo/components/config.js index 2a5198f..6e6e96c 100644 --- a/src/components/ConfigInfo/components/config.js +++ b/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: '医院地址', diff --git a/src/components/GuidePage/GuidePage.vue b/src/components/GuidePage/GuidePage.vue index 109d5c0..bdf445a 100644 --- a/src/components/GuidePage/GuidePage.vue +++ b/src/components/GuidePage/GuidePage.vue @@ -1,5 +1,16 @@ diff --git a/src/components/Roles/Roles.vue b/src/components/Roles/Roles.vue index a432be5..de4b72c 100644 --- a/src/components/Roles/Roles.vue +++ b/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 }} + + + + {{ setRole.name }} + + @@ -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 { // 切换角色 // 查任务这里不用管 project监听了roleId的变化 // 时间基准点不用管 project监听了roleId 里处理了 - changeRole(id, index) { + changeRole(id, index, type) { try { + if (type === 1) { + // 切换设置 + this.$emit('changeIsSetting'); + } // 清除多余的script // this.clearPluginScript(); this.$nextTick(() => { diff --git a/src/components/TimeLine/TimeLine.vue b/src/components/TimeLine/TimeLine.vue index 171b013..21739c3 100644 --- a/src/components/TimeLine/TimeLine.vue +++ b/src/components/TimeLine/TimeLine.vue @@ -14,9 +14,9 @@ id="scroll" > - + - + diff --git a/src/components/Title/Title.vue b/src/components/Title/Title.vue index 578b4fe..69e2cc6 100644 --- a/src/components/Title/Title.vue +++ b/src/components/Title/Title.vue @@ -1,59 +1,30 @@