提交 4d8bbc8f 编写于 作者: chengxiang.li's avatar chengxiang.li

update

上级 9fbddef7
...@@ -66,10 +66,41 @@ ...@@ -66,10 +66,41 @@
margin-top: 10px; margin-top: 10px;
padding: 10px; padding: 10px;
border-radius: 4px; border-radius: 4px;
overflow: hidden;
overflow-y: scroll;
&::-webkit-scrollbar
{
width: 5px;
height: 5px;
background-color: #fff;
}
&::-webkit-scrollbar-thumb
{
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #bbb;
}
.el-checkbox{ .el-checkbox{
margin-right: 10px; margin-right: 10px;
margin-left: 0; margin-left: 0;
margin-bottom: 10px; margin-bottom: 10px;
.el-checkbox__input{
&.is-focus{
.el-checkbox__inner{
border-color: #DCDFE6;
}
}
}
&.is-checked{
border-color: #449284;
.el-checkbox__inner{
background-color: #449284;
border-color: #449284;
}
.el-checkbox__label{
color: #449284;
}
}
} }
} }
} }
...@@ -126,7 +157,7 @@ ...@@ -126,7 +157,7 @@
.el-tab-pane{ .el-tab-pane{
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #F0F2F5; background: #fff;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -146,7 +146,6 @@ ...@@ -146,7 +146,6 @@
export default { export default {
data() { data() {
return { return {
// uploadUrl: `${getSaasDomain('web/patientManages/import')}`,
searchData: { searchData: {
pageNo: 1, // 第几页 pageNo: 1, // 第几页
pageSize: 10, // 每页条数 pageSize: 10, // 每页条数
...@@ -195,19 +194,24 @@ ...@@ -195,19 +194,24 @@
}]; }];
let req = { let req = {
// token: localStorage.getItem("token"), token: localStorage.getItem("token"),
token: '496F36FCB4CB494E81EAC9FDAA5E2D4B', // token: 'EA8DFCA594494230ABD14AC7E00E3E05',
fileArray: fileArray, fileArray: fileArray,
import_type: 2, import_type: 2,
}; };
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) // 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.$message({
message: '上传成功!', message: '上传成功!',
type: 'success' type: 'success'
}); });
try{
this.goToGetUploadHistory();
}catch(err){
console.log('reload history list error');
}
}else{ }else{
self.$message({ self.$message({
message: '上传失败,请重新上传!', message: '上传失败,请重新上传!',
...@@ -215,21 +219,22 @@ ...@@ -215,21 +219,22 @@
}); });
} }
}) })
}; };
reader.readAsDataURL(file); reader.readAsDataURL(file);
}, },
handleDownloadDemo(){ handleDownloadDemo(){
window.location.href = 'https://file.yunqueyi.com/File/template/居民导入模板.xlsx'; let src = 'https://file.yunqueyi.com/File/template/居民导入模板.xlsx';
let newTab=window.open('about:blank');
newTab.location = src;
}, },
goToGetUploadHistory(){ goToGetUploadHistory(){
console.log('go get upload history>>>>>>') // console.log('go get upload history>>>>>>')
let params = { let params = {
pageNo: this.searchData.pageNo, pageNo: this.searchData.pageNo,
pageSize: this.searchData.pageSize, pageSize: this.searchData.pageSize,
}; };
getUploadHistory(params).then(res => { getUploadHistory(params).then(res => {
console.log('获取上传历史记录:', res); // console.log('获取上传历史记录:', res);
if(res.code == "000000"){ if(res.code == "000000"){
if(res.data.importRecordsModelList.length > 0){ if(res.data.importRecordsModelList.length > 0){
this.searchData.tableData = res.data.importRecordsModelList; this.searchData.tableData = res.data.importRecordsModelList;
...@@ -244,48 +249,6 @@ ...@@ -244,48 +249,6 @@
} }
}) })
}, },
changeFile(file, fileList) {
const name = file.name;
const type = name.substring(name.lastIndexOf('.') + 1);
if (type !== 'xls' && type !== 'xlsx') {
this.$message({
message: '上传文件只能是 xls、xlsx格式!',
type: 'warning'
});
fileList.splice(0, 1);
return false;
}
if (fileList.length > 1) {
fileList.splice(0, 1);
}
this.files = [file];
},
uploadError(err, file, fileList){
console.log('%c upload Error >>>>>>>>', 'color: red;')
},
uploadSuccess(response, file, fileList) {
console.log('%c upload Success >>>>>>>>', 'color: red;')
// this.loading = false;
// this.visible = false;
// this.tipShow = true;
console.log('response: ', response);
console.log('file: ', file);
console.log('fileList: ', fileList)
// console.log(response, file, fileList);
const { code } = response;
this.code = response.code;
const codes = ['000000', '400002', '400004'];
if (codes.indexOf(code) > -1) {
this.error = response.data;
} else {
this.error = response.message;
}
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.searchData.pageNo = val; this.searchData.pageNo = val;
this.goToGetUploadHistory(); this.goToGetUploadHistory();
......
...@@ -313,17 +313,8 @@ ...@@ -313,17 +313,8 @@
this.goToGetGroupList(); this.goToGetGroupList();
}, },
downloadFile(src) { downloadFile(src) {
debugger; let newTab=window.open('about:blank');
var eleLink = document.createElement('a'); newTab.location = src;
eleLink.download = src;
eleLink.style.display = 'none';
// // 字符内容转变成blob地址
eleLink.href = src;
// // 触发点击
document.body.appendChild(eleLink);
eleLink.click();
// // 然后移除
document.body.removeChild(eleLink);
} }
}, },
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
return { return {
curmbFirst: "居民管理", curmbFirst: "居民管理",
curmbSecond: "新增居民", curmbSecond: "新增居民",
activeName2: 'first', activeName2: 'second',
patientInfo: {}, patientInfo: {},
checkForm: false, checkForm: false,
patientId: '', patientId: '',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册