提交 86b5c9b8 编写于 作者: chengxiang.li's avatar chengxiang.li

merge

......@@ -83,6 +83,8 @@
<script>
import fetch from '@/utils/fetch'
import { envConfig } from '@/utils/env-config'
import { uploadImg } from '@/utils/index'
import { getQiniuToken, submitFeedback } from '@/utils/patients/patientsapi'
export default {
data(){
......@@ -102,7 +104,7 @@
]
},
addImageDisabled: false,
imgLimit: 3,// 最多允许上传的图片个数
imgLimit: 5,// 最多允许上传的图片个数
action: 'https://upload.qiniup.com/',
token: '',
headers: {
......@@ -131,7 +133,7 @@
this.$message.warning(`最多上传${this.imgLimit}张图片`);
return;
}
this.GET('/file/image/token').then((res) => {
getQiniuToken().then((res) => {
if(res.code=='000000'){
this.imgToken = res.data.token;
}else{
......@@ -148,7 +150,6 @@
submitFrom(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.urlString)
const data = {
input_text: this.form.opinion,
system_type: 'workStation',
......@@ -156,15 +157,7 @@
contact_information: this.form.contact,
url: this.urlString,
};
fetch({
url: 'https://dev-api.yunqueyi.com/web/companys/feedback',
method: 'POST',
data,
headers:{
noSysCode: true,
"Content-Type": 'application/json'
}
}).then(res=>{
submitFeedback(data).then(res=>{
this.dialogFormVisible = false;
this.innerVisible = true;
})
......@@ -194,7 +187,8 @@
},
handleRemove(){},
handleSuccess(response, file, fileList){
this.urlString += 'https://test1-file.yunqueyi.com/s' + response.key + ';'
const imgDomin = uploadImg();
this.urlString += `${imgDomin}/${response.key};`
this.$message.success(`上传成功!`);
if(fileList.length>=this.imgLimit){
this.addImageDisabled = true;
......
......@@ -13,3 +13,11 @@
color: #449284;
border-color: #449284;
}
/*恢复messageBox默认样式*/
.el-message-box {
}
.el-message-box__status+.el-message-box__message{
padding-left: 20px;
padding-right: 20px;
}
......@@ -10,7 +10,7 @@ export const envConfig = {
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
saasUrl: 'https://dev.yunqueyi.com',
apiUrl: 'https://dev-api.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -21,7 +21,7 @@ export const envConfig = {
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/',
saasUrl: 'https://dev.yunqueyi.com',
apiUrl: 'https://dev-api.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -32,7 +32,7 @@ export const envConfig = {
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
saasUrl: 'https://test1.yunqueyi.com',
apiUrl: 'https://test1-api.yunqueyi.com/',
qiniuFileUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -43,7 +43,7 @@ export const envConfig = {
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/',
saasUrl: 'https://uat.yunqueyi.com',
apiUrl: 'https://uat-api.yunqueyi.com/',
qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://video.yunqueyi.com", // 视频
qiniuImgUrl: "https://files.yunqueyi.com",
......@@ -54,7 +54,7 @@ export const envConfig = {
},
pro: {
baseUrl: 'https://sc.yunqueyi.com/',
saasUrl: 'https://api.yunqueyi.com',
apiUrl: 'https://api.yunqueyi.com/',
qiniuFileUrl: "https://sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://video.yunqueyi.com",
qiniuImgUrl: "https://files.yunqueyi.com",
......
......@@ -177,6 +177,11 @@ export function getSaasDomain(url) {
return getConfigByEnvType('saasDomainUrl') + url
}
// 获取saas端api域名地址
export function getSaasApiDomain(url) {
return getConfigByEnvType('apiUrl') + url
}
// 根据不同环境,生成URL
function getConfigByEnvType(urlType) {
return envConfig[process.env.BUILD_ENV][urlType]
......
import fetch from '../fetch';
import { getBaseUrl, getSaasDomain } from '@/utils/index'
import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index'
const headers = {
sysCode: 9
} /**/
/*工作台*/
}
/*居民管理*/
export const getDiseasesList = (params) => {
return fetch({
headers,
......@@ -16,6 +16,7 @@ export const getDiseasesList = (params) => {
})
};
<<<<<<< HEAD
export const getLabelList = (params) => {
return fetch({
headers,
......@@ -26,4 +27,65 @@ export const getLabelList = (params) => {
})
}
=======
// 获取七牛上传token
export const getQiniuToken = (params) => {
return fetch({
headers,
url: getBaseUrl(`file/image/token`),
method: 'get',
params: params,
})
};
// 意见反馈 getSaasApiDomain
export const submitFeedback = (data) => {
return fetch({
headers: {
noSysCode: true,
"Content-Type": 'application/json'
},
url: getSaasApiDomain(`web/companys/feedback`),
method: 'post',
data: data,
})
};
/*资料不全居民*/
export const getNotCompleteList = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/uncomplate/${params.pageNo}/${params.pageSize}`),
method: 'get',
description: '获取资料不全居民列表',
})
};
export const sendCompleteMessage = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/remind`),
method: 'post',
data: params,
description: '提醒居民完善信息',
})
};
export const getNotCompleteCount = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/uncomplate/counts`),
method: 'get',
data: params,
description: '获取未完善居民人数',
})
};
>>>>>>> af68b014cd5aedf8045697cb98d80de083884ad5
export const getPatientDetail = (patientId) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/${patientId}`),
method: 'get',
// params: params,
description: '获取居民详情',
})
};
......@@ -9,7 +9,7 @@
<div class="f-main-content screenSet">
<div>
<div class="right-btn-group">
<el-button plain size="small" @click.native="deletePatient">删除</el-button>
<el-button plain size="small" @click="deletePatient">删除</el-button>
<el-button type="primary" size="small" @click="editPatient">编辑</el-button>
</div>
<el-tabs v-model="activeName" @tab-click="tabChangeHandler">
......@@ -17,23 +17,23 @@
<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>
<p class="right-p"><span>添加时间:{{patientInfo.createdTime}}</span><span>最后修改时间:{{patientInfo.modifiedTime}}</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><p class="title">居民姓名:</p><p class="info">{{patientInfo.nickname | emptyFilter}}</p></div>
<div><p class="title">身份证:</p><p class="info">{{patientInfo.idNo | emptyFilter}}</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><p class="title">出生年月:</p><p class="info">{{patientInfo.birthTime | emptyFilter}}</p></div>
<div><p class="title">性别:</p><p class="info">{{patientInfo.sex | sexFileter}}</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><p class="title">民族:</p><p class="info">{{patientInfo.nationality | emptyFilter}}</p></div>
<div><p class="title">常驻类型:</p><p class="info">{{patientInfo.permanentResidence | emptyFilter}}</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><p class="title">健康档案编号:</p><p class="info">{{patientInfo.fileLocator | emptyFilter}}</p></div>
<div><p class="title">医保号:</p><p class="info">{{patientInfo.socialCard | emptyFilter}}</p></div>
</div>
<div class="has-header">数据记录</div>
<div class="item wrap-p">
......@@ -42,19 +42,19 @@
</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">{{patientInfo.mobilePhone | emptyFilter}}</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><p class="title">详细地址:</p><p class="info">{{patientInfo.patientAddress | emptyFilter}}</p></div>
</div>
<div class="item">
<div><p class="title">工作单位:</p><p class="info">上海云游科技有限公司</p></div>
<div><p class="title">工作单位:</p><p class="info">{{patientInfo.workplace | emptyFilter}}</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>
<p class="info" v-if="patientInfo.isWechatBind == '1'">未绑定 <el-button type="text" class="ml10" @click="remindBind">提醒绑定</el-button></p>
<p class="info" v-if="patientInfo.isWechatBind == '2'">已绑定 <span class="ml10">(微信名:{{patientInfo.wechatNickname | emptyFilter}}</span></p>
</div>
</div>
<div class="has-header">其他</div>
......@@ -66,7 +66,7 @@
type="textarea"
rows="3"
placeholder="请输入内容"
v-model="remark"
v-model="patientInfo.remark"
maxlength="30"
:show-word-limit="true"
>
......@@ -76,9 +76,11 @@
<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-tab-pane label="健康记录" name="second">健康记录</el-tab-pane>
</el-tabs>
</div>
</div>
......@@ -87,7 +89,7 @@
<script>
import BreadCrumb from '@/components/breadcrumb'
import { getDiseasesList } from '@/utils/patients/patientsapi'
import { getDiseasesList, getPatientDetail } from '@/utils/patients/patientsapi'
export default {
name: "addNewPlan",
components: {
......@@ -103,12 +105,15 @@
activeName: 'first',
hasBind: false,
remark: '',
patientInfo: {},
}
},
created() {
this.init();
// getDiseasesList().then(({data}) => {
// console.log('获取所有疾病',data)
// })
},
computed: {
// ...mapState('planManage',{
......@@ -118,11 +123,40 @@
},
methods: {
// ...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
init() {
let patientId = '99997747'; //dev中凤尾花的patientId
getPatientDetail(patientId).then(({data}) => {
this.patientInfo = data;
})
},
tabChangeHandler(tab) {
console.log(tab);
},
deletePatient() {
console.log('删除')
// 把写的提示信心需要换行的地方分成数组 confirmText
const confirmText = ['您确定要删除此居民吗?', '删除后,您将无法对该居民发送患教和进行随访,重新添加该居民依旧可查看历史发送记录及随访记录']
const newDatas = []
const h = this.$createElement
for (const i in confirmText) {
newDatas.push(h('p', null, confirmText[i]))
}
this.$confirm('删除居民', {
title: '删除居民',
message: h('div', null, newDatas),
confirmButtonText: '确认删除',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
editPatient() {},
//提醒绑定
......@@ -138,6 +172,17 @@
return value;
}
},
sexFileter: function(value) {
if (!value && value != 0) {
return '-';
} else {
let hash = {
1: '男',
2: '女'
};
return hash[value];
}
},
},
}
</script>
......@@ -151,7 +196,7 @@
.right-btn-group{
position: absolute;
right: 60px;
z-index: 5000;
z-index: 1800;
}
.section{
.item{
......@@ -185,7 +230,7 @@
display: flex;
justify-content: space-between;
padding: 15px 0;
margin-bottom: 10px;
margin-bottom: 15px;
border-bottom: 1px dashed #888;
.right-p{
display: inline-block;
......
......@@ -7,12 +7,14 @@
<section class="not-complete-content screenSet">
<h1 class="page-title">资料不全居民</h1>
<p class="tip" v-if="notCompleteList.length">
<span class="fontGreen">800</span>居民仅通过微信扫码与您绑定,但未完善姓名、手机号等关键信息。提醒居民完善信息后,您将可以对居民进行消息推送和随访计划设置。
<el-button type="primary" style="float: right;" size="small" @click="sendCompleteMessages">批量提醒</el-button>
<span class="fontGreen">{{pagination.totalRows}}</span>居民仅通过微信扫码与您绑定,但未完善姓名、手机号等关键信息。提醒居民完善信息后,您将可以对居民进行消息推送和随访计划设置。
<el-button type="primary" style="float: right;" size="small" @click="sendCompleteMessageMultiple">批量提醒</el-button>
</p>
<el-table
v-if="notCompleteList.length"
:data="notCompleteList"
:row-key="getRowKeys"
@selection-change="handleSelectionChange"
style="width: 100%;">
<el-table-column
type="selection"
......@@ -47,21 +49,21 @@
label="操作"
align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.isRemind==1" type="text" @click="sendCompleteMessage(scope.row)">提醒完善信息</el-button>
<el-button v-if="scope.row.isRemind==1" type="text" @click="sendMessageSingle(scope.row)">提醒完善信息</el-button>
<el-button v-else-if="scope.row.isRemind==2" type="text" style="color: #999">提醒已发送</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<div class="pagination" v-if="notCompleteList.length">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="notCompleteList.pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="notCompleteList.pageSize"
:current-page="pagination.pageNo"
:page-sizes="[15, 30, 50, 100]"
:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
:total="pagination.totalRows">
</el-pagination>
</div>
<div v-if="!notCompleteList.length" class="blank-wrap">
......@@ -76,7 +78,7 @@
<script>
import BreadCrumb from '../../../components/breadcrumb.vue'
import { getNotCompleteList, sendCompleteMessage, getNotCompleteCount } from '../../../utils/patients/patientsapi'
export default {
name: "not-complete",
components: {
......@@ -87,58 +89,95 @@
curmbFirst: '居民管理',
curmbSecond: '资料不全居民',
notCompleteList: [], //未完善列表
pagination: {
pageNo: 1,
pageSize: 15,
},
getRowKeys(row) {
return row.patientId;
},
selectList: []
}
},
created() {
//const vm = this;
},
mounted() {
this.getNotComplete({
pageNo: 1,
pageSize: 10
})
this.getNotComplete()
this.getNotCompleteNum()
},
methods: {
getNotComplete(reqData) {
const { pageNo, pageSize} = reqData
this.GET(`/healths/patients/uncomplate/${pageNo}/${pageSize}`).then((res) => {
console.log(res)
if(res.code == "000000") {
this.notCompleteList = res.data
handleSelectionChange(val) {
this.selectList = val;
},
handleSizeChange(val) {
this.pagination.pageSize = val
this.getNotComplete()
},
handleCurrentChange(val) {
this.pagination.pageNo = val
this.getNotComplete()
},
getNotComplete() { //获取未完善居民列表
const { pageNo, pageSize} = this.pagination
getNotCompleteList({
pageNo,
pageSize,
}).then((data) => {
if(data.code == "000000") {
this.notCompleteList = data.data
console.log('1212',this.notCompleteList)
}
}).catch(function (error) {
this.$message.error(error);
this.$message({
message: error,
type: 'error'
});
});
},
sendCompleteMessage(item) {
let params = {
qrcodeType: 1, //saas 云鹊医平台
sendMessageSingle(item) { //发送单个提醒
sendCompleteMessage({
qrcodeType: 1,
patientId: item.patientId,
}
this.POST('/healths/patients/remind',params).then((res) => {
}).then((data) => {
if(data.code == "000000") {
this.$message({
message: '已向居民发送提醒',
type: 'success'
});
}else {
this.$message({
message: data.message,
type: 'error'
});
}
}).catch(function (error) {
this.$message({
type: 'success',
message: '操作成功!'
message: error,
type: 'error'
});
}).catch(function (error) {
this.$message.error(error);
});
},
sendCompleteMessages(item) {
let params = {
qrcodeType: 1, //saas 云鹊医平台
patientId: item.patientId,
}
this.POST('/healths/patients/remind',params).then((res) => {
sendCompleteMessageMultiple(item) {
if(!this.selectList.length) {
this.$message({
message: '请选择居民',
type: 'warning'
});
}
},
getNotCompleteNum() {
getNotCompleteCount().then((data) => {
if(data.code == "000000") {
this.pagination.totalRows = data.data;
}
}).catch(function (error) {
this.$message({
type: 'success',
message: '操作成功!'
message: error,
type: 'error'
});
}).catch(function (error) {
this.$message.error(error);
});
}
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册