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

Merge branch 'dev-patients-20190513' of...

Merge branch 'dev-patients-20190513' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-patients-20190513
......@@ -13,7 +13,7 @@
class="upload-demo"
:action="action"
:headers="headers"
multiple
:multiple="false"
list-type="picture"
:limit="imgLimit"
:accept="'image/jpg,image/jpeg,image/png,image/bmp'"
......
......@@ -24,6 +24,11 @@
}
.delete-label{
float: right;
&:hover{
color: #fff;
background-color: #f56c6c;
border-color: #f56c6c;
}
}
}
.label-member{
......
......@@ -18,7 +18,7 @@
<p class="member-number">{{searchData.totalRows}}</p>
<div class="right">
<el-button type="primary" size="small" class="create-new-label" v-if="!isUngrouped" @click="addPatientsHandler">添加居民</el-button>
<el-button type="default" size="small" class="create-new-label" v-if="!isUngrouped" :disabled="isBatchDeleteDisabled" @click="handleDeletePatients">批量</el-button>
<el-button type="default" size="small" class="create-new-label" v-if="!isUngrouped" :disabled="isBatchDeleteDisabled" @click="handleDeletePatients">批量</el-button>
</div>
</div>
<el-table
......@@ -34,21 +34,21 @@
<el-table-column
label="姓名"
prop="nickname"
width="120">
width="150">
</el-table-column>
<el-table-column
label="性别"
prop="name"
width="120">
prop="sexStr"
width="150">
</el-table-column>
<el-table-column
label="年龄"
prop="patientAge"
width="120">
width="150">
</el-table-column>
<el-table-column
label="诊断"
prop="dd"
prop="patientTypeGroup"
>
</el-table-column>
<el-table-column
......@@ -58,7 +58,7 @@
<template slot-scope="scope" v-if="!isUngrouped">
<el-button
class="remove-btn"
@click.native.prevent="goToDeleteRow(scope.$index, searchData.tableData)"
@click="goToDeleteRow(scope.$index, searchData.tableData)"
type="text"
size="small">
移除
......@@ -68,7 +68,7 @@
<div slot="empty">
<div class="table-empty" v-if="searchData.tableData && searchData.tableData.length < 1">
<img class="empty-pic" src="../../../assets/image/no-content1.png">
<p class="tips">当前分组无成员</p>
<p class="tips">当前分组无成员</p>
</div>
</div>
</el-table>
......@@ -98,6 +98,7 @@
v-model="ruleForm.newLabelName"
placeholder="请填写分组名称,最多15个字符"
maxlength="15"
@input="handleNewNameInputChange"
>
</el-input>
<div class="err-text">{{changeNameTips}}</div>
......@@ -185,6 +186,8 @@
ruleForm: {
newLabelName: '', // 修改后的分组名
},
isSingleDelete: false,
singleDeleteInfo: [],
multipleSelection: [],
selectPatientType: 2, //选择居民时需要的type类型
}
......@@ -223,10 +226,8 @@
pageNo: this.searchData.pageNo,
pageSize: this.searchData.pageSize,
};
// commonUtil.openLoading(this);
getLabelDetail(labelId, params).then(data => {
// commonUtil.closeLoading(this);
console.log('获取分组详情>> ', data)
// console.log('获取分组详情>> ', data)
if(data.data){
this.searchData = data.data;
this.patientIdList = data.data.patientIdList;
......@@ -241,10 +242,7 @@
console.log('error: ', err)
});
},
handleSelectionChange(val){
console.log('handleSelectionChange>>>> ', val)
this.multipleSelection = val;
},
handleSizeChange(val){
console.log('handleSizeChange>>>')
this.searchData.pageSize = val;
......@@ -265,13 +263,9 @@
labelId: labelId
});
deleteCurrentLabel(params).then(data => {
console.log('删除分组>> ', data)
// console.log('删除分组>> ', data)
if(data.code == '000000'){
this.centerDialogVisible = false;
// this.$message({
// message: '删除分组成功',
// type: 'success'
// });
this.$router.replace({
path: '/patients-manage/labels-manage/labels-list',
})
......@@ -303,6 +297,10 @@
this.ruleForm.newLabelName = '';
this.showChangeLabelNameDialog = false;
},
handleNewNameInputChange(){
this.isChangeNameError = false;
this.changeNameTips = '';
},
// 更改分组名
confirmChangeName() {
let params = {
......@@ -312,7 +310,7 @@
};
if(!params.newLabelName){
this.isChangeNameError = true;
this.changeNameTips = '请输入分组名';
this.changeNameTips = '请输入分组名';
return;
}
if( params.labelName == params.newLabelName ){
......@@ -349,14 +347,20 @@
});
});
},
handleSelectionChange(val){
console.log('handleSelectionChange>>>> ', val)
this.multipleSelection = val;
},
goToDeleteRow(index, rows) {
console.log('rows ', rows[index])
// console.log('before: ', this.multipleSelection)
// this.$refs.multipleTable.toggleRowSelection(rows[index]);
// console.log('after: ', this.multipleSelection)
this.isSingleDelete = true;
this.showDeletePatientsDialog = true;
this.multipleSelection.push({
patientId: rows[index].id
})
this.singleDeleteInfo = [{ patientId: rows[index].id }];
},
handleDeletePatients() {
this.isSingleDelete = false;
let selectList = this.multipleSelection;
// console.log('list: ', selectList);
let tempArr = [];
......@@ -376,6 +380,9 @@
labelId: this.$route.query.labelId,
patientList: this.multipleSelection,
};
if(this.isSingleDelete == true){ // 点击单个移除时
params.patientList = this.singleDeleteInfo;
}
deleteCurrentPatients(params).then(data => {
if(data.code == '000000'){
this.$message({
......@@ -423,7 +430,6 @@
this.$message.error(data.message)
}
})
},
}
}
......
......@@ -17,7 +17,7 @@
:disabled="labelNameList.length >= 999"
@click="createNewLabel"
>
分组
分组
</el-button>
</el-col>
</el-row>
......@@ -27,7 +27,7 @@
</div>
<div class="table-empty" v-if="labelNameList && labelNameList.length < 1">
<img class="empty-pic" src="../../../assets/image/no-content1.png">
<p class="tips">未找到相似分组</p>
<p class="tips">没有找到匹配分组</p>
</div>
<el-dialog
class="dialog-boxd"
......@@ -45,6 +45,7 @@
v-model="ruleForm.newLabelName"
placeholder="请填写分组名称,最多15个字符"
maxlength="15"
@input="handleNewLabelNameChange"
>
</el-input>
<div class="err-text">{{addNewLabelTips}}</div>
......@@ -134,20 +135,24 @@
console.log('新增分组...');
this.centerDialogVisible = true;
},
handleNewLabelNameChange() {
if(this.isAddLabelError == true){
this.isAddLabelError = false;
this.addNewLabelTips = '';
}
},
submitForm() {
let params = {
labelName: this.ruleForm.newLabelName,
};
if(!params.labelName){
this.isAddLabelError = true;
this.addNewLabelTips = '请输入分组名';
this.addNewLabelTips = '请输入分组名';
return;
}
// 请求新增
// commonUtil.openLoading(this);
createNewLabel(params).then(data => {
// commonUtil.closeLoading(this);
console.log('新增分组>> ', data)
// console.log('新增分组>> ', data)
if(data.code == '202520'){ // 分组名重复
console.log('tips: ', data.message)
this.isAddLabelError = true;
......
......@@ -74,6 +74,7 @@
<el-table
:data="searchData.tableData"
class="upload-table"
empty-text="该用户暂无历史记录"
style="width: 100%">
<el-table-column
align="left"
......@@ -204,18 +205,14 @@
import_type: 2,
};
if( process.env.BUILD_ENV == "development" ){
req.token = '5E2F79D96DD144A0B23E7607E2169A68'
req.token = '4E971382E2E14BDC91CC23A450343788'
}else{
req.token = self._token;
}
self.postData = JSON.stringify(req);
uploadExcel(self.postData).then(res => {
// console.log('%c res >> ','color: red;', res)
if(typeof res.importFlag != 'undefined' && res.importFlag == true){
self.$message({
message: '上传成功!',
type: 'success'
});
self.showUploadSuccess = true;
try{
self.goToGetUploadHistory();
}catch(err){
......@@ -245,7 +242,7 @@
getUploadHistory(params).then(res => {
// console.log('获取上传历史记录:', res);
if(res.code == "000000"){
if(res.data.importRecordsModelList.length > 0){
if(res.data.importRecordsModelList && res.data.importRecordsModelList.length > 0){
this.searchData.tableData = res.data.importRecordsModelList;
this.searchData.totalCount = res.data.count;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册