提交 f7684bbb 编写于 作者: yi.li's avatar yi.li

添加api

上级 1650d84e
......@@ -2,6 +2,7 @@ const patientsManage = r => require.ensure([], () => r(require('../views/patient
/*我的居民*/
const myPatientsManage = r => require.ensure([], () => r(require('../views/patients/mypatients-manage/layout.vue')), 'myPatientsManage');
const patientsList = r => require.ensure([], () => r(require('../views/patients/mypatients-manage/patients-list.vue')), 'patientsList');
const patientDetail = r => require.ensure([], () => r(require('../views/patients/mypatients-manage/patient-detail.vue')), 'patientDetail');
/*新增居民*/
const newManage = r => require.ensure([], () => r(require('../views/patients/new-manage/layout.vue')), 'newManage');
......@@ -35,7 +36,16 @@ const patientsRouters = {
title: '我的居民列表',
keepAlive: false //页面不需要缓存
},
}
},
{
path: 'patient-detail',
component: patientDetail,
name: 'patientDetail',
meta: {
title: '居民详情',
keepAlive: false
},
},
],
meta: {
title: '我的居民',
......
/*重置tabs样式*/
.el-tabs__active-bar{
background-color: #449284!important;
}
.el-tabs__item:hover{
color: #449284;
}
.el-tabs__item.is-active{
color: #449284;
}
/*重置朴素按钮样式——plain*/
.el-button.is-plain:focus, .el-button.is-plain:hover {
color: #449284;
border-color: #449284;
}
......@@ -6,8 +6,8 @@ export const envConfig = {
// baseUrl: 'https://dev-sc.yunqueyi.com/',
// // baseUrl: 'http://10.177.15.180:10202/',
// // baseUrl: 'http://192.168.140.14:10201/',
// baseUrl: 'https://test1-sc.yunqueyi.com/',
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
......@@ -15,7 +15,8 @@ export const envConfig = {
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'http://localhost:8090/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html'
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://dev-saas.yunqueyi.com/',
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/',
......@@ -24,7 +25,8 @@ export const envConfig = {
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html'
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://dev-saas.yunqueyi.com/',
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
......@@ -33,7 +35,8 @@ export const envConfig = {
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://test1.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html'
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://test1.yunqueyi.com/',
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/',
......@@ -42,15 +45,17 @@ export const envConfig = {
qiniuImgUrl: "https://files.yunqueyi.com",
loginUrl: 'https://uat.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html'
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://uat.yunqueyi.com/',
},
pro: {
pro: {
baseUrl: 'https://sc.yunqueyi.com/',
qiniuFileUrl: "https://sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://video.yunqueyi.com",
qiniuImgUrl: "https://files.yunqueyi.com",
loginUrl: 'https://yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html'
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://www.yunqueyi.com/',
}
}
......@@ -11,7 +11,9 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
config.headers['sysCode'] = 12
if( config.headers['sysCode']==undefined) {
config.headers['sysCode'] = 12
}
config.headers['token'] = localStorage.getItem('storageToken')
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
// if (config.data && config.data.setEntry) {
......@@ -19,7 +21,7 @@ service.interceptors.request.use(config => {
// if(config.data.token){
// config.headers['token'] = config.data.token || '63C3FA92AF8A45A48B31EB7FD97B95EB'
// }
// config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
// }
return config
......@@ -32,10 +34,10 @@ service.interceptors.request.use(config => {
service.interceptors.response.use(
response => {
const res = response.data
/*
/*
baseUrl时,返回000000为成功
apiUrl时,返回200为成功
*/
*/
// if (res.code !== '000000') {
// return Promise.reject('error')
// } else {
......
......@@ -9,7 +9,7 @@ export function setEventByModuleCode(itemData){
if( modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
}else if( modeCode === 'M100' || modeCode === 'M300' ) {
let urlPara = getUrlParmByCode(paramList);
paramList[0] && (paramList[0].value += urlPara);
......@@ -43,7 +43,7 @@ function getUrlParmByCode(paramList) {
}
// 计算高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'sidebarWrapperId',
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'sidebarWrapperId',
containerHeightId = 'appContainerId', innerHeightId = 'elTableId'){
if (!p_getElm(refHeightId) || !p_getElm(containerHeightId) || !p_getElm(innerHeightId)) {
// window.onresize = null
......@@ -53,14 +53,14 @@ export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if(p_getElm('elTableIdInner')){
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
window.onresize = function() {
containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if (p_getElm('elTableIdInner')) {
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
}
}
......@@ -87,7 +87,7 @@ export function deepCopy(obj) {
}
/**
*
*
* @param {Array} originData 初始数据
* @param {Boolean} isUp true: 升序 false: 降序
* @param {String} sortField 排序字段,如果没有,则直接排序
......@@ -109,7 +109,7 @@ export function arraySort(originData, isUp = true, sortedField, converFun) {
sourceB = 0
} else {
sourceA = converFun(sourceA[sortedField])
sourceB = converFun(sourceB[sortedField])
sourceB = converFun(sourceB[sortedField])
}
}
// if(!sourceA || !sourceB) {
......@@ -127,7 +127,7 @@ export function arraySort(originData, isUp = true, sortedField, converFun) {
swap = sortedData[j]
sortedData[j] = sortedData[j + 1]
sortedData[j + 1] = swap
}
}
}
}
}
......@@ -172,6 +172,11 @@ export function uploadImg() {
return getConfigByEnvType('qiniuImgUrl')
}
// 获取saas端域名地址
export function getSaasDomain(url) {
return getConfigByEnvType('saasDomainUrl') + url
}
// 根据不同环境,生成URL
function getConfigByEnvType(urlType) {
return envConfig[process.env.BUILD_ENV][urlType]
......
import fetch from '../fetch';
import { getBaseUrl, getSaasDomain } from '@/utils/index'
const headers = {
sysCode: 9
} /**/
/*工作台*/
export const getDiseasesList = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/diseases/-1`),
method: 'get',
params: params,
description: '获取所有疾病',
})
};
<template>
<div class="resident-list">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond"
:curmbThird="curmbThird"
:jumPathThird="jumPathThird">
</bread-crumb>
<div class="f-main-content screenSet">
<div>
<div class="right-btn-group">
<el-button plain size="small" @click.native="deletePatient">删除</el-button>
<el-button type="primary" size="small" @click="editPatient">编辑</el-button>
</div>
<el-tabs v-model="activeName" @tab-click="tabChangeHandler">
<el-tab-pane label="居民信息" name="first">
<div class="section">
<div class="has-header">
<p>基本信息</p>
<p class="right-p"><span>添加时间:2019-03-23 12:30</span><span>最后修改时间:2019-03-28 15:30</span></p>
</div>
<div class="item">
<div><p class="title">居民姓名:</p><p class="info">云晓雀</p></div>
<div><p class="title">身份证:</p><p class="info">12849826412648</p></div>
</div>
<div class="item">
<div><p class="title">出生年月:</p><p class="info">1965-04-22</p></div>
<div><p class="title">性别:</p><p class="info"></p></div>
</div>
<div class="item">
<div><p class="title">民族:</p><p class="info">汉族</p></div>
<div><p class="title">常驻类型:</p><p class="info">户籍</p></div>
</div>
<div class="item">
<div><p class="title">健康档案编号:</p><p class="info">-</p></div>
<div><p class="title">医保号:</p><p class="info">-</p></div>
</div>
<div class="has-header">数据记录</div>
<div class="item wrap-p">
<div><p class="title">诊断:</p><p class="info">糖尿病;高血压;糖尿病;高血压;糖尿病;高血压;糖尿病;高血压;糖尿病;高血压;</p></div>
<div><p class="title">分组:</p><p class="info">糖尿病高危</p></div>
</div>
<div class="has-header">联系方式</div>
<div class="item">
<div><p class="title">手机号:</p><p class="info">13293481248</p></div>
<div><p class="title"></p><p class="info"></p></div>
</div>
<div class="item">
<div><p class="title">所在地区:</p><p class="info">上海市 上海市 浦东新区</p></div>
<div><p class="title">详细地址:</p><p class="info">上海市浦东新区兰花路333</p></div>
</div>
<div class="item">
<div><p class="title">工作单位:</p><p class="info">上海云游科技有限公司</p></div>
<div>
<p class="title">微信:</p>
<p class="info" v-if="!hasBind">未绑定 <el-button type="text" class="ml10" @click="remindBind">提醒绑定</el-button></p>
<p class="info" v-else>已绑定 <span class="ml10">(微信名:大佬)</span></p>
</div>
</div>
<div class="has-header">其他</div>
<div class="item">
<div>
<p class="title">备注:</p>
<p class="info">
<el-input
type="textarea"
rows="3"
placeholder="请输入内容"
v-model="remark"
maxlength="30"
:show-word-limit="true"
>
</el-input>
</p>
</div>
<p class="btn-right"><el-button plain size="small" @click="saveRemark">保存备注</el-button></p>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="健康记录" name="second">健康记录</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from '@/components/breadcrumb'
import { getDiseasesList } from '@/utils/patients/patientsapi'
export default {
name: "addNewPlan",
components: {
BreadCrumb,
},
data() {
return {
/*面包屑配置*/
curmbFirst: '居民管理',
curmbSecond: '我的居民',
curmbThird: '居民详情',
jumPathThird: '/patients-manage/mypatients-manage/patients-list',
activeName: 'first',
hasBind: false,
remark: '',
}
},
created() {
// getDiseasesList().then(({data}) => {
// console.log('获取所有疾病',data)
// })
},
computed: {
// ...mapState('planManage',{
// remarkOption: state => state.remarkOption,
// templateOptions: state => state.templateOptions,
// })
},
methods: {
// ...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
tabChangeHandler(tab) {
console.log(tab);
},
deletePatient() {
console.log('删除')
},
editPatient() {},
//提醒绑定
remindBind() {},
//保存备注
saveRemark() {},
},
filters: {
emptyFilter: function(value) {
if (!value) {
return '-';
} else {
return value;
}
},
},
}
</script>
<style lang="scss" scoped>
@import '../../../style/patients-style/element-reset.css';
/*@import '../../../style/followup/element-reset.css';*/
.f-main-content{
background: #ffffff;
padding: 30px;
.right-btn-group{
position: absolute;
right: 60px;
z-index: 5000;
}
.section{
.item{
display: flex;
font-size: 14px;
div{
display: flex;
flex: 1;
line-height: 36px;
.title{
width: 180px;
text-align: right;
}
.info{
color: #999;
padding-left: 15px;
width: 100%;
}
}
&.wrap-p{
div{
line-height: 28px;
}
}
.btn-right{
width: 35%;
padding-left:10px;
}
}
.has-header{
display: flex;
justify-content: space-between;
padding: 15px 0;
margin-bottom: 10px;
border-bottom: 1px dashed #888;
.right-p{
display: inline-block;
text-align: right;
color: #999;
font-size: 14px;
span:last-child{
margin-left: 15px;
}
}
}
}
.ml10{
margin-left: 10px;
}
}
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册