Commit c2532112 authored by ytbdmhy's avatar ytbdmhy

优化用户的密码验证及优化特殊业务

parent dd1698d3
......@@ -240,3 +240,11 @@ export const selectchartInfo = (params) => {
params
})
};
//特殊业务导出
export const seletsywdc = (data) => {
return axios({
url: '/baseInfo/getSpecialBusiness',
method: 'post',
data
})
};
<template>
<div>
<el-table
v-loading.fullscreen.lock="loading"
:data="tableData"
......@@ -18,16 +17,21 @@
</el-table-column>
<el-table-column
prop="bankAccount"
label="银行账号"
label="人员类别"
min-width="20%">
</el-table-column>
<el-table-column
prop="bank"
label="所属银行"
prop="bankAccount"
label="缴费年限"
min-width="10%">
</el-table-column>
<el-table-column
prop="bankAccount"
label="个人账户积累额"
min-width="20%">
</el-table-column>
<el-table-column label="操作"
min-width="20%">
min-width="10%">
<template slot-scope="scope">
<el-button
size="mini"
......@@ -45,9 +49,8 @@
:current-page.sync="PageNum"
@current-change="current_change"
>
</el-pagination>
<!-- <el-button type="success" @click="toexcel" style="margin:50px">全部导出</el-button>-->
<!-- <el-button type="success" @click="toexcel" style="margin:50px">全部导出</el-button>-->
</div>
</template>
<script>
......@@ -98,7 +101,7 @@
"pageSize": 10
}
Loading.service();
this.$api.getlist.seleyhkbgdc(data).then((res) => {
this.$api.getlist.seletsywdc(data).then((res) => {
let loadingInstance = Loading.service();
this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
loadingInstance.close();
......@@ -112,44 +115,44 @@
});
},
toexcel() {
this.loading = true;
axios.get(baseUrl + '/exportExcel/updateBankCard', {
headers: {
"token": Cookies.get("token")
},
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "特殊业务表" + Date.now() + ".xlsx";
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
this.loading = false;
})
.catch(err => {
console.log(err);
this.loading = false;
});
// this.$api.getlist.dccc().then((res) => {
// let loadingInstance = Loading.service();
// this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
// loadingInstance.close();
// toexcel() {
// this.loading = true;
// axios.get(baseUrl + '/exportExcel/updateBankCard', {
// headers: {
// "token": Cookies.get("token")
// },
// responseType: 'blob' //告诉服务器我们需要的响应格式
// })
// .then(res => {
// let a = document.createElement("a");
// let blob = new Blob([res.data], {
// type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
// });
// if(res.code==200){
// this.tableData=res.data.result
// this.totals=res.data.total
// }
// }).catch((res) => {
// a.href = URL.createObjectURL(blob); //生成一个url
// a.download = "特殊业务表" + Date.now() + ".xlsx";
// a.click();
// // let objectUrl = URL.createObjectURL(blob); //生成一个url
// // window.location.href = objectUrl; //浏览器打开这个url
// this.loading = false;
// })
// .catch(err => {
// console.log(err);
// this.loading = false;
// });
}
// // this.$api.getlist.dccc().then((res) => {
// // let loadingInstance = Loading.service();
// // this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
// // loadingInstance.close();
// // });
// // if(res.code==200){
// // this.tableData=res.data.result
// // this.totals=res.data.total
// // }
//
// // }).catch((res) => {
//
// // });
// }
},
created() {
var data = {
......@@ -157,7 +160,7 @@
"pageSize": 10
}
Loading.service();
this.$api.getlist.seleyhkbgdc(data).then((res) => {
this.$api.getlist.seletsywdc(data).then((res) => {
let loadingInstance = Loading.service();
this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
loadingInstance.close();
......
......@@ -153,7 +153,7 @@ export default {
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur'},
// { pattern: /^[\w_-]{6,18}$/, message: '密码必须为6至18位', trigger: 'blur'}
{ pattern: /^[\w_-]{6,18}$/, message: '密码必须为6至18位', trigger: 'blur'}
],
},
// 新增编辑界面数据
......@@ -178,6 +178,7 @@ export default {
},
roles: [],
dParentId: '',
tempPassword: '',
}
},
methods: {
......@@ -236,6 +237,7 @@ export default {
status: 1,
userRoles: []
}
this.tempPassword = "";
},
// 显示编辑界面
handleEdit: function (params) {
......@@ -251,7 +253,7 @@ export default {
if (this.dataForm.deptId !== 1) {
deptId.push(this.dataForm.deptId);
}
console.log(deptId);
// console.log(deptId);
this.dataForm.deptId = deptId;
// for (let i=0;i<this.list.length;i++) {
// console.log(this.list[i]);
......@@ -261,6 +263,8 @@ export default {
userRoles.push(params.row.userRoles[i].roleId)
}
this.dataForm.userRoles = userRoles
this.tempPassword = this.dataForm.password;
this.dataForm.password = "apHaSbgbiyAFWfHJAg";
},
// 编辑
submitForm: function () {
......@@ -270,6 +274,9 @@ export default {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
this.dataForm.deptId = this.dataForm.deptId[this.dataForm.deptId.length-1];
this.dataForm.deptName = "";
if (this.tempPassword !== "" && this.dataForm.password === "apHaSbgbiyAFWfHJAg") {
this.dataForm.password = this.tempPassword;
}
let params = Object.assign({}, this.dataForm)
let userRoles = []
for(let i=0,len=params.userRoles.length; i<len; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment