17 changed files with 574 additions and 35 deletions
@ -0,0 +1,15 @@ |
|||
{ |
|||
"$shared": { |
|||
"version": "v1", |
|||
"identifier": "wally", |
|||
"credential": "111111" |
|||
}, |
|||
"dev": { |
|||
"name": "dev", |
|||
"url": "http://192.168.0.99/gateway" |
|||
}, |
|||
"local": { |
|||
"version": "v2", |
|||
"url": "http://192.168.0.99/gateway" |
|||
} |
|||
} |
|||
@ -0,0 +1,201 @@ |
|||
@localhost = http://localhost:7260/v2.0 |
|||
@localhost_tall = http://localhost:7130/v3.0 |
|||
@test_tall = http://192.168.0.99:7130/v3.0 |
|||
@test = https://test.tall.wiki/gateway/yanyuan/v2.0/ |
|||
@www_tall = http://www.tall.wiki:7130/v3.0 |
|||
@www = http://www.tall.wiki/gateway/yanyuan/v2.0/ |
|||
@type = content-type: application/json;charset=utf-8 |
|||
|
|||
### 登录 |
|||
# @name login |
|||
POST {{test_tall}}/users/signin |
|||
{{type}} |
|||
|
|||
{ |
|||
"client": 1, |
|||
"type": 3, |
|||
"data": { |
|||
"identifier": "song", |
|||
"credential": "999999" |
|||
} |
|||
} |
|||
|
|||
### debug |
|||
GET {{test}}/debug |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
###绑定工具箱 |
|||
POST {{test}}/tool/bind |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"toolCode":"0000000003" |
|||
} |
|||
} |
|||
###查询登录用户身份 |
|||
POST {{test}}/userPower/identity |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
} |
|||
###添加用户信息 |
|||
POST {{test}}/trainee/add |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"userName":"李四", |
|||
"sex":"1", |
|||
"clinicHospital":"就诊医院", |
|||
"hospitalProvinceId":"1", |
|||
"hospitalCityId":"2", |
|||
"hospitalAddress":"迎泽区XXX", |
|||
"clinicOffice":"神经内科", |
|||
"clinicDoctor":"赵医生", |
|||
"birthDate":"1965-08-01", |
|||
"height":"170", |
|||
"weight":"66", |
|||
"jobTitle":"农林渔牧", |
|||
"educateStatus":"小学", |
|||
"educateDate":"6", |
|||
"abodePlace":"太原市小店区", |
|||
"appearTime":"2021-01-01", |
|||
"diagnoseTime":"2021-02-01", |
|||
"diagnoseResult":"轻度痴呆", |
|||
"minBloodPressure":"90", |
|||
"maxBloodPressure":"120", |
|||
"bloodFat":"80", |
|||
"physicalAct":"中", |
|||
"apoeGene":"1", |
|||
"diseasesRecord":"没有疾病史", |
|||
"relativeDiseasesRecord":"亲属均无老年痴呆", |
|||
"isInsomnic":0, |
|||
"insomnicPeriod":"8", |
|||
"isSmoke":1, |
|||
"quitPeriod":2, |
|||
"sustainPeriod":3, |
|||
"averageNum":5, |
|||
"isDrink":2, |
|||
"abstinencePeriod":"2年", |
|||
"drinkType":"啤酒", |
|||
"isTea":"3", |
|||
"quitTea":"", |
|||
"continuePeriod":"1年", |
|||
"teaType":"绿茶", |
|||
"teaPeriod":"每天一杯", |
|||
"isStrongFlavour":1, |
|||
"isLikeMeat":1, |
|||
"isMoreOil":0 |
|||
} |
|||
} |
|||
|
|||
###查询绑定者创建的患者信息(申请成为家属前调用) |
|||
POST {{test}}/trainee/create |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"bindUserId":"1218025249493356544" |
|||
} |
|||
} |
|||
|
|||
###绑定手机号后,关联用户原有的使用者 |
|||
POST {{test}}/trainee/relation |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
} |
|||
|
|||
###生成二维码 |
|||
POST {{test}}/tool/qrCode |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"id":"1" |
|||
} |
|||
} |
|||
###体验账号升级 |
|||
POST {{test}}/trainee/upgrade |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"keyUserIds":[ |
|||
"1456525052375470081" |
|||
] |
|||
} |
|||
} |
|||
|
|||
###查询个人信息 |
|||
POST {{test}}/family/personal |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
} |
|||
###申请成为家属 |
|||
POST {{test}}/family/apply |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"keyUserIds":[ |
|||
"1456525052375470080", |
|||
"1456525052375470081" |
|||
], |
|||
"age":25, |
|||
"educateLevel": "本科", |
|||
"jobTitle": "码农", |
|||
"name": "小伙伴", |
|||
"sex": 1 |
|||
} |
|||
} |
|||
|
|||
###查询试题 |
|||
POST {{test}}/question/get |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"code":"NLCP", |
|||
"reportId": "1458968153773838336", |
|||
"num": "1" |
|||
} |
|||
} |
|||
|
|||
###保存答案 |
|||
POST {{localhost}}/question/saveAnswer |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"code":"NLCP", |
|||
"reportId": "1459057596971094016", |
|||
"questionId": "21", |
|||
"optionId": "1" |
|||
} |
|||
} |
|||
|
|||
###脑力测评结果计算 |
|||
POST {{localhost}}/mentalTest/calculate |
|||
{{type}} |
|||
Authorization: Bearer {{login.response.body.$.data.token}} |
|||
|
|||
{ |
|||
"param":{ |
|||
"mentalTestId": "1459057596971094016" |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
<template> |
|||
<view> 测试内容 </view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default {}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
|||
@ -1,10 +0,0 @@ |
|||
<template> |
|||
<view> 1.请记住以下物品 </view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default {}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
|||
@ -0,0 +1,95 @@ |
|||
<template> |
|||
<view class="flex flex-col"> |
|||
<view v-for="(item, index) in question.positions" :key="index" class="flex flex-col"> |
|||
<!-- title --> |
|||
<view v-if="item.position === 0" class="flex flex-col"> |
|||
<view v-for="(con, conIndex) in item.contents" :key="conIndex"> |
|||
<text v-if="questionInfo.num && turnPages">{{ questionInfo.num }}.</text>{{ con.content }} |
|||
</view> |
|||
<u-line class="my-2" color="#c8c7cc" /> |
|||
</view> |
|||
|
|||
<view v-if="question.positions.length === 1"> |
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex" class="flex-1"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 1" :options="option.positions" /> |
|||
</view> |
|||
</view> |
|||
|
|||
<view v-else> |
|||
<!-- 选项前 --> |
|||
<view v-if="item.position === 1" class="flex flex-col"> |
|||
<TitlePosition :item="item" /> |
|||
|
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 1" :options="option.positions" /> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 选项后 --> |
|||
<view v-if="item.position === 2" class="flex flex-col"> |
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 1" :options="option.positions" /> |
|||
</view> |
|||
|
|||
<TitlePosition :item="item" /> |
|||
</view> |
|||
|
|||
<!-- 选项左 --> |
|||
<view v-if="item.position === 3" class="flex flex-nowrap"> |
|||
<TitlePosition :item="item" class="flex-1" /> |
|||
|
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex" class="flex-1"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 1" :options="option.positions" /> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 选项右 --> |
|||
<view v-if="item.position === 4" class="flex flex-nowrap"> |
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex" class="flex-1"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 1" :options="option.positions" /> |
|||
</view> |
|||
|
|||
<TitlePosition :item="item" class="flex-1" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<u-button class="mt-5" type="primary" @click="next">下一题</u-button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState } from 'vuex'; |
|||
import TitlePosition from './components/TitlePosition'; |
|||
import TestMain from './components/TestMain'; |
|||
|
|||
export default { |
|||
components: { TitlePosition, TestMain }, |
|||
props: { |
|||
turnPages: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
question: { |
|||
type: Object, |
|||
default: {}, |
|||
}, |
|||
}, |
|||
|
|||
computed: mapState('yanyuan', ['questionInfo']), |
|||
|
|||
methods: { |
|||
// 设置参数 |
|||
setParams(optionId) { |
|||
this.$emit('setParams', optionId); |
|||
}, |
|||
|
|||
next() { |
|||
this.$emit('nextQuestion'); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
|||
@ -0,0 +1,42 @@ |
|||
<template> |
|||
<view class="grid gap-2"> |
|||
<view v-for="(option, optionIndex) in options" :key="optionIndex" :class="[`row-span-${option.row}`]"> |
|||
<u-radio-group v-model="value"> |
|||
<u-radio |
|||
@change="radioChange" |
|||
v-for="(item, index) in option.contents" |
|||
:key="index" |
|||
:name="item.id" |
|||
:class="[`col-span-${item.col}`]" |
|||
> |
|||
{{ item.content }} |
|||
</u-radio> |
|||
</u-radio-group> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
options: { |
|||
type: Array, |
|||
default: [], |
|||
}, |
|||
}, |
|||
|
|||
data() { |
|||
return { value: '' }; |
|||
}, |
|||
|
|||
methods: { |
|||
// 选中任一radio时,由radio-group触发 |
|||
radioChange(e) { |
|||
this.$emit('setParams', e); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
|||
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<view class="grid" :class="item.contents.length > 4 ? 'grid-cols-3' : item.contents.length > 1 ? 'grid-cols-2' : ''"> |
|||
<view v-for="(con, conIndex1) in item.contents" :key="conIndex1"> |
|||
<view v-if="con.showType === 0"> |
|||
{{ con.content }} |
|||
</view> |
|||
<view v-if="con.showType === 1"> |
|||
<img class="w-full" :src="con.content" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
item: { |
|||
type: Object, |
|||
default: {}, |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
@ -0,0 +1,86 @@ |
|||
<template> |
|||
<view class="flex flex-col"> |
|||
<view v-for="(item, index) in question.positions" :key="index" class="flex flex-col"> |
|||
<!-- title --> |
|||
<view v-if="item.position === 0" class="flex flex-col"> |
|||
<view v-for="(con, conIndex) in item.contents" :key="conIndex"> |
|||
<text v-if="questionInfo.num">{{ questionInfo.num }}.</text>{{ con.content }} |
|||
</view> |
|||
<u-line class="my-2" color="#c8c7cc" /> |
|||
</view> |
|||
|
|||
<view v-if="question.positions.length === 1"> |
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex" class="flex-1"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 1" :options="option.positions" /> |
|||
</view> |
|||
</view> |
|||
|
|||
<view v-else> |
|||
<!-- 选项前 --> |
|||
<view v-if="item.position === 1" class="flex flex-col"> |
|||
<TitlePosition :item="item" /> |
|||
|
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 0" :options="option.positions" /> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 选项后 --> |
|||
<view v-if="item.position === 2" class="flex flex-col"> |
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 0" :options="option.positions" /> |
|||
</view> |
|||
|
|||
<TitlePosition :item="item" /> |
|||
</view> |
|||
|
|||
<!-- 选项左 --> |
|||
<view v-if="item.position === 3" class="flex flex-nowrap"> |
|||
<TitlePosition :item="item" class="flex-1" /> |
|||
|
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex" class="flex-1"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 0" :options="option.positions" /> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 选项右 --> |
|||
<view v-if="item.position === 4" class="flex flex-nowrap"> |
|||
<view v-for="(option, optionIndex) in questionInfo.options" :key="optionIndex" class="flex-1"> |
|||
<TestMain @setParams="setParams" v-if="option.page === 0" :options="option.positions" /> |
|||
</view> |
|||
|
|||
<TitlePosition :item="item" class="flex-1" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<u-button class="mt-5" type="primary" @click="openAnswerPage">答题</u-button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState } from 'vuex'; |
|||
import TestMain from './components/TestMain'; |
|||
import TitlePosition from './components/TitlePosition'; |
|||
|
|||
export default { |
|||
components: { TestMain, TitlePosition }, |
|||
|
|||
props: { question: { type: Object, default: {} } }, |
|||
|
|||
computed: mapState('yanyuan', ['questionInfo']), |
|||
|
|||
methods: { |
|||
openAnswerPage() { |
|||
this.$emit('openAnswerPage'); |
|||
}, |
|||
|
|||
setParams(optionId) { |
|||
this.$emit('setParams', optionId); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
Loading…
Reference in new issue