Browse Source

fix: 提测试版本

210plan
song 3 years ago
parent
commit
b31ecd7f82
  1. 10
      .env.development
  2. 23
      CHANGELOG.md
  3. 2
      package.json
  4. 7
      src/apis/carbasics.js
  5. 2
      src/components/PrettyExchange/PrettyExchange.vue
  6. 134
      src/components/Share/Share copy.vue
  7. 98
      src/components/Share/Share.vue
  8. BIN
      src/components/Share/imgs/all.png
  9. BIN
      src/components/Share/imgs/bg.png
  10. BIN
      src/components/Share/imgs/btn.png
  11. BIN
      src/components/Share/imgs/code.png
  12. 176
      src/components/StatisticsCards/StatisticsCards.vue
  13. 81
      src/components/StatisticsLists/StatisticsLists.vue
  14. 2
      src/pages/camera/camera.vue
  15. 11
      src/pages/detail-webview/detail-webview.vue
  16. 30
      src/pages/task-page/task-page.vue

10
.env.development

@ -1,8 +1,8 @@
VUE_APP_NODE_ENV=development
VUE_APP_BASE_URL=http://101.201.226.163
VUE_APP_API_URL=http://101.201.226.163/gateway
VUE_APP_MSG_URL=ws://www.tall.wiki/websocket/message/v4.0/ws
VUE_APP_PROJECT_PATH=http://101.201.226.163/carBasicTall
VUE_APP_QUESTION_PATH=http://101.201.226.163/carbasics
VUE_APP_BASE_URL=https://test.tall.wiki
VUE_APP_API_URL=https://test.tall.wiki/gateway-1
VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws
VUE_APP_PROJECT_PATH=https://test.tall.wiki/carBasicTall
VUE_APP_QUESTION_PATH=https://test.tall.wiki/carbasics
VUE_APP_VERSION=v3.1.0
VUE_APP_PUBLIC_PATH=/carBasicCalendar/

23
CHANGELOG.md

@ -1,9 +1,22 @@
# 0.1.0 (2022-03-07)
# 0.1.0 (2022-05-25)
### 🐛 Bug 修复
范围|描述|commitId
--|--|--
- | 详情页内容迁移 | [2752bc9](https://101.201.226.163:50022/binbin0314/Typhoneye/commits/2752bc9)
- | ocr识别及答案存储 | [5301c60](https://101.201.226.163:50022/binbin0314/Typhoneye/commits/5301c60)
- | 病例列表,神内神外界面重构,ocr界面开发及逻辑处理 | [b45b67c](https://101.201.226.163:50022/binbin0314/Typhoneye/commits/b45b67c)
- | 暴风眼 | [cb74b8b](https://101.201.226.163:50022/binbin0314/Typhoneye/commits/cb74b8b)
- | bug修复 | [63940a6](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/63940a6)
范围|描述|commitId
--|--|--
- | 2.0.4测试环境 | [0f84b7e](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/0f84b7e)
- | 2.0.2版本号与患者列表bug修改 | [9cdec00](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/9cdec00)
- | 暴风眼2.0.0上线bug测试及修改 | [6000be9](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/6000be9)
- | 2.0.0上线 | [5a6d721](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/5a6d721)
- | 静脉溶栓显示及判断bug修复 | [d5a5ca9](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/d5a5ca9)
- | bug修复 | [bb28e16](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/bb28e16)
- | 多选框等bug修改 | [acf511d](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/acf511d)
- | 详情页内容迁移 | [2752bc9](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/2752bc9)
- | ocr识别及答案存储 | [5301c60](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/5301c60)
- | 病例列表,神内神外界面重构,ocr界面开发及逻辑处理 | [b45b67c](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/b45b67c)
- | 暴风眼 | [cb74b8b](https://101.201.226.163:50022/ZhangBin/Typhoneye/commits/cb74b8b)

2
package.json

@ -26,6 +26,7 @@
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
},
"dependencies": {
"@dcloudio/uni-cli-i18n": "^2.0.1-34720220422002",
"@dcloudio/uni-h5": "^2.0.0-32220210818002",
"@dcloudio/uni-helper-json": "*",
"@dcloudio/uni-i18n": "^2.0.0-32220210818002",
@ -35,6 +36,7 @@
"@vue/shared": "^3.2.6",
"dayjs": "^1.10.6",
"flyio": "^0.6.2",
"html2canvas": "^1.4.1",
"lodash": "^4.17.21",
"regenerator-runtime": "^0.12.1",
"uview-ui": "^1.8.5",

7
src/apis/carbasics.js

@ -4,6 +4,7 @@ export const carbasics = `${apiUrl}/carbasics/v4.0`;
export const filedeal = `${fileUrl}/filedeal`;
const patient = `${carbasics}/patient`; // 患者相关接口
const firstAid = `${carbasics}/firstAid`; // 急救数据相关接口
const screening = `${carbasics}/screening`; // 高危人群筛查相关接口
// 获取急救/出院数据列表
export const querySelf = {
@ -89,6 +90,12 @@ const install = (Vue, vm) => {
vm.$u.api.getPatient = params => vm.$u.post(`${patient}/getPatient`, params);
// 修改急救患者的患者信息
vm.$u.api.updatePatient = params => vm.$u.post(`${patient}/updatePatient`, params);
// 分享问卷(生成分享二维码)
vm.$u.api.shareScreening = params => vm.$u.post(`${screening}/share`, params);
// 卫生院查看村医工作量
vm.$u.api.centerWorkload = params => vm.$u.post(`${screening}/center/workload`, params);
// 村医查看工作量
vm.$u.api.villageWorkload = params => vm.$u.post(`${screening}/village/workload`, params);
// 上传身份证图像识别
vm.$u.api.identifyWords = `${carbasics}/ocr/identifyWords`;
// 上传试题信息获取答案直接赋值给试题并且提交后台

2
src/components/PrettyExchange/PrettyExchange.vue

@ -111,7 +111,7 @@
<view class="border-80 bg-blue-500" v-if="item.showSubBorder"></view>
</view>
</view>
<view class="edition">v2.0.4</view>
<view class="edition">v2.1.0</view>
</scroll-view>
<!-- 移动悬浮 begin -->
<view v-if="showMoveImage">

134
src/components/Share/Share copy.vue

@ -0,0 +1,134 @@
<template>
<view class="flex flex-col items-center w-full">
<!-- <a-spin tip="图片生成中..." :spinning="spinning" class="w-full"> -->
<view class="flex flex-col items-center w-full" ref="child">
<view class="hb flex justify-center" ref="shareCode" id="code">
<img src="@/components/Share/imgs/bg.png" mode="widthFix" class="w-full" />
<view class="flex flex-col items-center hb-box">
<img :src="url" alt="" class="hb-img" />
<text class="text-xl font-bold">{{ hospitalName }}</text>
<text class="text-xl font-bold">{{ doctorName }}</text>
</view>
</view>
<!-- <ShareCode ref="shareCode" :url="url" :hospitalName="hospitalName" :doctorName="doctorName" /> -->
<view class="flex justify-center w-full" @click="downLoadImage">
<img src="@/components/Share/imgs/btn.png" mode="aspectFit" class="btn" />
</view>
</view>
<!-- </a-spin> -->
<!-- <a-modal v-model="visible" title="请长按图片保存到手机" @ok="visible = false" :footer="footer">
<img class="w-full" :src="new_url" id="all_img" />
</a-modal> -->
</view>
</template>
<script>
import { mapState } from 'vuex';
import html2canvas from 'html2canvas';
export default {
props: {},
data() {
return {
// url: require('./imgs/code.png'),
url: '',
hospitalName: '',
doctorName: '',
spinning: false,
visible: false,
cancelText: '',
new_url: '',
footer: [],
};
},
computed: mapState('role', ['roleId']),
created() {
this.getCode();
},
mounted() {
setTimeout(() => {
console.log('ref', this.$refs);
}, 2000);
},
methods: {
async downLoadImage() {
// this.spinning = true;
console.log('code', wx.createSelectorQuery().select('code'));
let dom = wx.createSelectorQuery();
console.log('dom: ', dom.select('#code'));
html2canvas(dom.select('#code'), {
// width: dom.clientWidth,
// height: dom.clientHeight,
// scrollX: 0,
// scrollY: 0,
useCORS: true,
}).then(canvas => {
console.log('canvas: ', canvas);
//
// let imgUrl = canvas.toDataURL('image/png'); // canvas base64
// console.log('imgUrl: ', imgUrl);
// this.save(imgUrl);
});
},
save(src) {
this.spinning = false;
this.new_url = src;
this.visible = true;
var a = document.createElement('a');
a.href = src;
a.download = '分享';
document.body.appendChild(a);
//
a.click();
//
document.body.removeChild(a);
},
/**
* 分享问卷生成分享二维码
*/
async getCode() {
try {
const params = { roleId: this.roleId, type: 1 };
const data = await this.$u.api.shareScreening(params);
this.url = data.qrCode;
this.hospitalName = data.hospitalName;
this.doctorName = data.doctorName;
} catch (error) {
console.error('error: ', error);
}
},
},
};
</script>
<style lang="scss" scoped>
.hb {
width: 90%;
margin: 18px auto;
position: relative;
.hb-box {
position: absolute;
top: 38%;
}
.hb-img {
width: 150px;
height: 150px;
margin-bottom: 24px;
}
}
.btn {
width: 152px;
height: 42px;
margin-bottom: 50px;
}
</style>

98
src/components/Share/Share.vue

@ -0,0 +1,98 @@
<template>
<view class="flex flex-col items-center w-full">
<view class="flex flex-col items-center w-full" ref="child">
<view class="hb flex justify-center" ref="shareCode" id="code">
<img :src="url" mode="widthFix" class="w-full" />
</view>
<view class="flex justify-center w-full" @click="downLoadImage(url)">
<img src="@/components/Share/imgs/btn.png" mode="aspectFit" class="btn" />
</view>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex';
export default {
props: {},
data() {
return {
url: require('./imgs/all.png'),
// url: '',
};
},
computed: mapState('role', ['roleId']),
created() {
this.getCode();
},
methods: {
downLoadImage(url) {
uni.downloadFile({
url,
success: res => {
if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function () {
uni.showToast({
title: '保存成功',
icon: 'none',
});
},
fail: function () {
uni.showToast({
title: '保存失败',
icon: 'none',
});
},
});
}
},
});
},
/**
* 分享问卷生成分享二维码
*/
async getCode() {
try {
uni.$t.ui.showLoading('玩命加载中...');
const params = { roleId: this.roleId, type: 1 };
const data = await this.$u.api.shareScreening(params);
this.url = data.qrCode;
} catch (error) {
console.error('error: ', error);
}
},
},
};
</script>
<style lang="scss" scoped>
.hb {
width: 90%;
margin: 18px auto;
position: relative;
.hb-box {
position: absolute;
top: 38%;
}
.hb-img {
width: 150px;
height: 150px;
margin-bottom: 24px;
}
}
.btn {
width: 152px;
height: 42px;
margin-bottom: 50px;
}
</style>

BIN
src/components/Share/imgs/all.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
src/components/Share/imgs/bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
src/components/Share/imgs/btn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
src/components/Share/imgs/code.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

176
src/components/StatisticsCards/StatisticsCards.vue

@ -0,0 +1,176 @@
<template>
<view class="w-full">
<view class="w-full flex flex-col">
<view class="bg-white flex flex-col px-2">
<view class="flex flex-nowrap">
<view @click="changeType(0)" class="tags tag-all" :class="type === 0 ? 'all-checked' : ''">全部{{ tags.all }}</view>
<view @click="changeType(1)" class="tags tag-high" :class="type === 1 ? 'high-checked' : ''">高危{{ tags.high }}</view>
<view @click="changeType(2)" class="tags tag-middle" :class="type === 2 ? 'middle-checked' : ''">中危{{ tags.middle }}</view>
<view @click="changeType(3)" class="tags tag-low" :class="type === 3 ? 'low-checked' : ''">低危{{ tags.low }}</view>
</view>
<u-input
:border="true"
input-align="center"
border-color="#0096ff"
placeholder-style="font-size: 14px"
class="mt-1 mb-4"
v-model="name"
placeholder="姓名搜索"
@blur="getWorkload"
/>
</view>
<view class="rankings" v-if="lists.length">
<view class="bg-white px-2 pb-4">
<view class="box p-4 mb-2" v-for="(list, index) in lists" :key="index">
<view class="sign sign-hign" v-if="list.type === 3">高危</view>
<view class="sign sign-middle" v-if="list.type === 2">中危</view>
<view class="sign sign-low" v-if="list.type === 1">低危</view>
<view class="text-base font-bold">
<span>{{ list.name }}</span>
<span class="ml-4">{{ list.phone }}</span>
</view>
<view class="mt-3" style="color: #666">
提交时间
<span v-if="list.submitTime"> {{ $moment(+list.submitTime).format('YYYY-MM-DD HH:mm') }}</span>
</view>
</view>
</view>
<u-line></u-line>
</view>
<u-empty v-else mode="list" class="mt-10"> </u-empty>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex';
export default {
data() {
return {
tags: {
all: '0',
high: '0',
middle: '0',
low: '0',
},
lists: [],
name: '',
type: 0,
clickAll: true,
clickHigh: false,
clickMiddle: false,
clickLow: false,
};
},
computed: mapState('role', ['roleId']),
async created() {
await this.getWorkload();
},
methods: {
async changeType(type) {
this.type = type;
await this.getWorkload();
},
/**
* 村医查看工作量
* @param {String} name 患者名称
* @param {Number} type 高危类型 0全部 1高危 2中危 3低危 默认为0
*/
async getWorkload() {
try {
uni.$t.ui.showLoading('玩命加载中...');
const { name, type } = this;
const params = { name, type };
const data = await this.$u.api.villageWorkload(params);
this.tags.all = data.totalNum;
this.tags.high = data.highNum > 99 ? '99+' : data.highNum;
this.tags.middle = data.middleNum > 99 ? '99+' : data.middleNum;
this.tags.low = data.lowNum > 99 ? '99+' : data.lowNum;
this.lists = data.workloadLists;
} catch (error) {
console.error('error: ', error);
}
},
},
};
</script>
<style scoped>
.tags {
padding: 0 14px;
height: 30px;
border-radius: 16px;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
margin: 16px 8px 7px 0;
}
.tag-all {
color: #5985c3;
background: rgba(89, 133, 195, 0.1);
}
.all-checked {
border: 1px solid #5985c3;
}
.tag-high {
color: #ff3131;
background: rgba(255, 49, 49, 0.1);
}
.high-checked {
border: 1px solid #ff3131;
}
.tag-middle {
color: #ff864b;
background: rgba(255, 134, 75, 0.1);
}
.middle-checked {
border: 1px solid #ff864b;
}
.tag-low {
color: #0096ff;
background: rgba(89, 133, 195, 0.1);
}
.low-checked {
border: 1px solid #0096ff;
}
.rankings {
overflow-y: scroll;
}
.box {
width: 100%;
background: #ffffff;
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.16);
border-radius: 6px;
position: relative;
}
.sign {
width: 60px;
height: 28px;
line-height: 28px;
border-radius: 0px 6px 0px 6px;
font-size: 14px;
color: #ffffff;
text-align: center;
position: absolute;
right: 0;
top: 0;
}
.sign-hign {
background: #ff3131;
}
.sign-middle {
background: #ff864b;
}
.sign-low {
background: #0096ff;
}
</style>

81
src/components/StatisticsLists/StatisticsLists.vue

@ -0,0 +1,81 @@
<template>
<view class="w-full">
<view class="w-full flex flex-col">
<view class="flex flex-nowrap bg-white mb-2 px-2" style="height: 48px; line-height: 48px">
<view class="col1">排名</view>
<view class="col2">单位/个人</view>
<view class="col2">提交总数</view>
<view class="col2">高危人数</view>
</view>
<view class="rankings" v-if="lists.length">
<view class="bg-white px-2">
<view class="ranking flex flex-nowrap" v-for="(list, index) in lists" :key="index">
<view class="col1">
{{ index + 1 }}
</view>
<view class="col2 text-blue-500">{{ list.doctorName }}</view>
<view class="col2 font-bold">
<span>{{ list.highNum }}</span>
</view>
<view class="col2 font-bold">{{ list.totalNum }}</view>
</view>
</view>
<u-line></u-line>
</view>
<u-empty v-else mode="list" class="mt-10"> </u-empty>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex';
export default {
data() {
return { lists: [] };
},
computed: mapState('role', ['roleId']),
created() {
this.getData();
},
methods: {
//
async getData() {
try {
uni.$t.ui.showLoading('玩命加载中...');
this.lists = [];
const params = { roleId: this.roleId };
const data = await this.$u.api.centerWorkload(params);
this.lists = data;
} catch (error) {
console.log(error);
}
},
},
};
</script>
<style>
.rankings {
overflow-y: scroll;
}
.ranking {
height: 48px;
line-height: 48px;
border-bottom: 1px solid #f4f4f4;
}
.col1 {
width: 16%;
text-align: center;
}
.col2 {
width: 28%;
text-align: center;
}
</style>

2
src/pages/camera/camera.vue

@ -24,7 +24,7 @@ import { mapState, mapMutations } from 'vuex';
export default {
components: {},
data: () => ({
srcList: ['http://101.201.226.163/filedeal/uploads/upload/20220118/23f05a3dde9a4323bc95b1b061379cb5.jpeg'],
srcList: ['https://test.tall.wiki/filedeal/uploads/upload/20220118/23f05a3dde9a4323bc95b1b061379cb5.jpeg'],
action: '',
}),
computed: {

11
src/pages/detail-webview/detail-webview.vue

@ -1,5 +1,5 @@
<template>
<web-view :src="src" />
<web-view :src="src" @message="handleMessage" />
</template>
<script>
@ -30,6 +30,15 @@ export default {
onShareAppMessage() {
return { title: '暴风眼Typhoneye', path: '/pages/index/index' };
},
// webview
handleMessage(evt) {
console.log('接收到的消息-evt: ', evt);
console.log('接收到的消息:' + JSON.stringify(evt.detail.data));
if (evt.detail.data[0].action === 'back') {
uni.navigateBack();
}
},
},
};
</script>

30
src/pages/task-page/task-page.vue

@ -6,13 +6,16 @@
<!-- 日常任务面板 -->
<Globals v-if="globals.length" />
<!-- 任务详情 -->
<div v-if="globalData && permanents.length" class="flex flex-1">
<view v-if="globalData && permanents.length" class="flex flex-1" style="overflow-y: auto">
<PatientList ref="PatientList" v-if="showPage === 'function'" class="flex flex-1" />
<div v-else class="flex flex-1 items-center justify-center flex-col">
<div>详情内容在详情页内查看</div>
<div class="text-blue-500" @click="jumpDetail">点击此处跳转</div>
</div>
</div>
<Share v-else-if="showPage === 'share'" class="flex flex-1" />
<StatisticsLists v-else-if="showPage === 'statistics-lists'" class="flex flex-1" />
<StatisticsCards v-else-if="showPage === 'statistics-cards'" class="flex flex-1" />
<view v-else class="flex flex-1 items-center justify-center flex-col">
<view>详情内容在详情页内查看</view>
<view class="text-blue-500" @click="jumpDetail">点击此处跳转</view>
</view>
</view>
</view>
</view>
</template>
@ -84,8 +87,13 @@ export default {
},
showPage(val) {
if (val !== 'function') {
let jumpUrl = `/pages/detail-webview/detail-webview?jumpUrl=${this.urlData.url}&projectId=${this.projectId}&roleId=${this.roleId}&userId=${this.userId}`;
console.log('val: ', val);
if (val !== 'function' && val !== 'share' && val !== 'statistics-lists' && val !== 'statistics-cards') {
let jumpUrl = `/pages/detail-webview/detail-webview?jumpUrl=
${this.urlData.url}&projectId=
${this.projectId}&roleId=
${this.roleId}&userId=
${this.userId}`;
for (let key in this.urlData) {
if (key !== 'url') {
jumpUrl += `&${key}=${this.urlData[key]}`;
@ -116,7 +124,11 @@ export default {
//
jumpDetail() {
let jumpUrl = `/pages/detail-webview/detail-webview?jumpUrl=${this.urlData.url}&projectId=${this.projectId}&roleId=${this.roleId}&userId=${this.userId}`;
let jumpUrl = `/pages/detail-webview/detail-webview?jumpUrl=
${this.urlData.url}&projectId=
${this.projectId}&roleId=
${this.roleId}&userId=
${this.userId}`;
for (let key in this.urlData) {
if (key !== 'url') {
jumpUrl += `&${key}=${this.urlData[key]}`;

Loading…
Cancel
Save