提交 2c6225ae 编写于 作者: chengxiang.li's avatar chengxiang.li

update

上级 881c83ad
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
class="upload-demo" class="upload-demo"
:action="action" :action="action"
:headers="headers" :headers="headers"
multiple :multiple="false"
list-type="picture" list-type="picture"
:limit="imgLimit" :limit="imgLimit"
:accept="'image/jpg,image/jpeg,image/png,image/bmp'" :accept="'image/jpg,image/jpeg,image/png,image/bmp'"
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<p class="member-number">{{searchData.totalRows}}</p> <p class="member-number">{{searchData.totalRows}}</p>
<div class="right"> <div class="right">
<el-button type="primary" size="small" class="create-new-label" v-if="!isUngrouped" @click="addPatientsHandler">添加居民</el-button> <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>
</div> </div>
<el-table <el-table
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<template slot-scope="scope" v-if="!isUngrouped"> <template slot-scope="scope" v-if="!isUngrouped">
<el-button <el-button
class="remove-btn" class="remove-btn"
@click.native.prevent="goToDeleteRow(scope.$index, searchData.tableData)" @click="goToDeleteRow(scope.$index, searchData.tableData)"
type="text" type="text"
size="small"> size="small">
移除 移除
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<div slot="empty"> <div slot="empty">
<div class="table-empty" v-if="searchData.tableData && searchData.tableData.length < 1"> <div class="table-empty" v-if="searchData.tableData && searchData.tableData.length < 1">
<img class="empty-pic" src="../../../assets/image/no-content1.png"> <img class="empty-pic" src="../../../assets/image/no-content1.png">
<p class="tips">当前分组无成员</p> <p class="tips">当前分组无成员</p>
</div> </div>
</div> </div>
</el-table> </el-table>
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
v-model="ruleForm.newLabelName" v-model="ruleForm.newLabelName"
placeholder="请填写分组名称,最多15个字符" placeholder="请填写分组名称,最多15个字符"
maxlength="15" maxlength="15"
@input="handleNewNameInputChange"
> >
</el-input> </el-input>
<div class="err-text">{{changeNameTips}}</div> <div class="err-text">{{changeNameTips}}</div>
...@@ -184,6 +185,8 @@ ...@@ -184,6 +185,8 @@
ruleForm: { ruleForm: {
newLabelName: '', // 修改后的分组名 newLabelName: '', // 修改后的分组名
}, },
isSingleDelete: false,
singleDeleteInfo: [],
multipleSelection: [], multipleSelection: [],
selectPatientType: 2, //选择居民时需要的type类型 selectPatientType: 2, //选择居民时需要的type类型
} }
...@@ -222,10 +225,8 @@ ...@@ -222,10 +225,8 @@
pageNo: this.searchData.pageNo, pageNo: this.searchData.pageNo,
pageSize: this.searchData.pageSize, pageSize: this.searchData.pageSize,
}; };
// commonUtil.openLoading(this);
getLabelDetail(labelId, params).then(data => { getLabelDetail(labelId, params).then(data => {
// commonUtil.closeLoading(this); // console.log('获取分组详情>> ', data)
console.log('获取分组详情>> ', data)
if(data.data){ if(data.data){
this.searchData = data.data; this.searchData = data.data;
this.patientIdList = data.data.patientIdList; this.patientIdList = data.data.patientIdList;
...@@ -240,10 +241,7 @@ ...@@ -240,10 +241,7 @@
console.log('error: ', err) console.log('error: ', err)
}); });
}, },
handleSelectionChange(val){
console.log('handleSelectionChange>>>> ', val)
this.multipleSelection = val;
},
handleSizeChange(val){ handleSizeChange(val){
console.log('handleSizeChange>>>') console.log('handleSizeChange>>>')
this.searchData.pageSize = val; this.searchData.pageSize = val;
...@@ -264,13 +262,9 @@ ...@@ -264,13 +262,9 @@
labelId: labelId labelId: labelId
}); });
deleteCurrentLabel(params).then(data => { deleteCurrentLabel(params).then(data => {
console.log('删除分组>> ', data) // console.log('删除分组>> ', data)
if(data.code == '000000'){ if(data.code == '000000'){
this.centerDialogVisible = false; this.centerDialogVisible = false;
// this.$message({
// message: '删除分组成功',
// type: 'success'
// });
this.$router.replace({ this.$router.replace({
path: '/patients-manage/labels-manage/labels-list', path: '/patients-manage/labels-manage/labels-list',
}) })
...@@ -302,6 +296,10 @@ ...@@ -302,6 +296,10 @@
this.ruleForm.newLabelName = ''; this.ruleForm.newLabelName = '';
this.showChangeLabelNameDialog = false; this.showChangeLabelNameDialog = false;
}, },
handleNewNameInputChange(){
this.isChangeNameError = false;
this.changeNameTips = '';
},
// 更改分组名 // 更改分组名
confirmChangeName() { confirmChangeName() {
let params = { let params = {
...@@ -311,7 +309,7 @@ ...@@ -311,7 +309,7 @@
}; };
if(!params.newLabelName){ if(!params.newLabelName){
this.isChangeNameError = true; this.isChangeNameError = true;
this.changeNameTips = '请输入分组名'; this.changeNameTips = '请输入分组名';
return; return;
} }
if( params.labelName == params.newLabelName ){ if( params.labelName == params.newLabelName ){
...@@ -348,14 +346,20 @@ ...@@ -348,14 +346,20 @@
}); });
}); });
}, },
handleSelectionChange(val){
console.log('handleSelectionChange>>>> ', val)
this.multipleSelection = val;
},
goToDeleteRow(index, rows) { 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.showDeletePatientsDialog = true;
this.multipleSelection.push({ this.singleDeleteInfo = [{ patientId: rows[index].id }];
patientId: rows[index].id
})
}, },
handleDeletePatients() { handleDeletePatients() {
this.isSingleDelete = false;
let selectList = this.multipleSelection; let selectList = this.multipleSelection;
// console.log('list: ', selectList); // console.log('list: ', selectList);
let tempArr = []; let tempArr = [];
...@@ -375,6 +379,9 @@ ...@@ -375,6 +379,9 @@
labelId: this.$route.query.labelId, labelId: this.$route.query.labelId,
patientList: this.multipleSelection, patientList: this.multipleSelection,
}; };
if(this.isSingleDelete == true){ // 点击单个移除时
params.patientList = this.singleDeleteInfo;
}
deleteCurrentPatients(params).then(data => { deleteCurrentPatients(params).then(data => {
if(data.code == '000000'){ if(data.code == '000000'){
this.$message({ this.$message({
...@@ -420,7 +427,6 @@ ...@@ -420,7 +427,6 @@
this.$message.error(data.message) this.$message.error(data.message)
} }
}) })
}, },
} }
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
:disabled="labelNameList.length >= 999" :disabled="labelNameList.length >= 999"
@click="createNewLabel" @click="createNewLabel"
> >
分组 分组
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</div> </div>
<div class="table-empty" v-if="labelNameList && labelNameList.length < 1"> <div class="table-empty" v-if="labelNameList && labelNameList.length < 1">
<img class="empty-pic" src="../../../assets/image/no-content1.png"> <img class="empty-pic" src="../../../assets/image/no-content1.png">
<p class="tips">未找到相似分组</p> <p class="tips">没有找到匹配分组</p>
</div> </div>
<el-dialog <el-dialog
class="dialog-boxd" class="dialog-boxd"
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
v-model="ruleForm.newLabelName" v-model="ruleForm.newLabelName"
placeholder="请填写分组名称,最多15个字符" placeholder="请填写分组名称,最多15个字符"
maxlength="15" maxlength="15"
@input="handleNewLabelNameChange"
> >
</el-input> </el-input>
<div class="err-text">{{addNewLabelTips}}</div> <div class="err-text">{{addNewLabelTips}}</div>
...@@ -134,20 +135,24 @@ ...@@ -134,20 +135,24 @@
console.log('新增分组...'); console.log('新增分组...');
this.centerDialogVisible = true; this.centerDialogVisible = true;
}, },
handleNewLabelNameChange() {
if(this.isAddLabelError == true){
this.isAddLabelError = false;
this.addNewLabelTips = '';
}
},
submitForm() { submitForm() {
let params = { let params = {
labelName: this.ruleForm.newLabelName, labelName: this.ruleForm.newLabelName,
}; };
if(!params.labelName){ if(!params.labelName){
this.isAddLabelError = true; this.isAddLabelError = true;
this.addNewLabelTips = '请输入分组名'; this.addNewLabelTips = '请输入分组名';
return; return;
} }
// 请求新增 // 请求新增
// commonUtil.openLoading(this);
createNewLabel(params).then(data => { createNewLabel(params).then(data => {
// commonUtil.closeLoading(this); // console.log('新增分组>> ', data)
console.log('新增分组>> ', data)
if(data.code == '202520'){ // 分组名重复 if(data.code == '202520'){ // 分组名重复
console.log('tips: ', data.message) console.log('tips: ', data.message)
this.isAddLabelError = true; this.isAddLabelError = true;
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
<el-table <el-table
:data="searchData.tableData" :data="searchData.tableData"
class="upload-table" class="upload-table"
empty-text="该用户暂无历史记录"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
align="left" align="left"
...@@ -204,18 +205,14 @@ ...@@ -204,18 +205,14 @@
import_type: 2, import_type: 2,
}; };
if( process.env.BUILD_ENV == "development" ){ if( process.env.BUILD_ENV == "development" ){
req.token = '5E2F79D96DD144A0B23E7607E2169A68' req.token = '4E971382E2E14BDC91CC23A450343788'
}else{ }else{
req.token = self._token; req.token = self._token;
} }
self.postData = JSON.stringify(req); self.postData = JSON.stringify(req);
uploadExcel(self.postData).then(res => { uploadExcel(self.postData).then(res => {
// console.log('%c res >> ','color: red;', res)
if(typeof res.importFlag != 'undefined' && res.importFlag == true){ if(typeof res.importFlag != 'undefined' && res.importFlag == true){
self.$message({ self.showUploadSuccess = true;
message: '上传成功!',
type: 'success'
});
try{ try{
self.goToGetUploadHistory(); self.goToGetUploadHistory();
}catch(err){ }catch(err){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册