mch 3 years ago
parent
commit
1b0134f578
  1. 4
      src/views/common-settings/ItemType.vue
  2. 197
      src/views/login/Login.vue
  3. 5
      src/views/user-list/UserList.vue

4
src/views/common-settings/ItemType.vue

@ -64,6 +64,10 @@
width="40%"
:close-on-click-modal="false"
>
<el-cascader
:options="options"
:props="{ checkStrictly: true }"
clearable></el-cascader>
<el-form
:model="form"
label-width="80px"

197
src/views/login/Login.vue

@ -28,9 +28,9 @@
prefix-icon="el-icon-unlock"
></el-input>
</el-form-item>
<button type="primary" class="btn" @click="onSubmit(form)">
<el-button type="primary" class="btn" @click="onSubmit(form)">
用户登录
</button>
</el-button>
</el-form>
</div>
</div>
@ -67,10 +67,6 @@ export default {
onSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
// let res = await getapi("/api/identity/users/login", {
// username: this.form.Username,
// password: this.form.Password,11
// });
var msgs = "";
postapi(`/api/identity/users/login`, {
userName: this.form.Username,
@ -96,191 +92,14 @@ export default {
}
console.log(res, "res");
// if (res.code != -1 && res.data.code == 1) {
// window.sessionStorage.setItem("peisid", res.data.peisid); //
// return this.$axios.post(
// mm.apiurl + "/connect/token",
// {
// client_id: "Peis_App",
// grant_type: "password",
// username: this.form.Username,
// password: this.form.Password,
// scope: "Peis offline_access",
// },
// {
// headers: {
// "Content-Type": "application/x-www-form-urlencoded",
// },
// }
// );
// } else {
// this.$message.warning(ret.data.msg);
// }
})
// .then((res) => {
// writetoken(res.data.expires_in);
// window.localStorage.setItem("token", res.data.access_token);
// window.localStorage.setItem(
// "refresh_token",
// res.data.refresh_token
// );
// window.localStorage.setItem("tokentype", res.data.token_type);
// window.localStorage.setItem("user", this.form.Username);
// this.$router.push({ path: "home" });
// this.$store.state.changepassword = this.form.Password;
// })
.catch((err) => {});
// console.log(res);
// if (res.data.code == 1 && res.code == 1) {
// console.log(res.data.msg);
// postapi()
// let ress = await this.$axios.post(
// mm.apiurl + "/connect/token",
// {
// client_id: "Peis_App",
// grant_type: "password",
// username: this.form.Username,
// password: this.form.Password,
// scope: "Peis offline_access",
// },
// {
// headers: {
// "Content-Type": "application/x-www-form-urlencoded",
// },
// }
// );
// if (ress.status == 200) {
// writetoken(ress.data.expires_in);
// window.localStorage.setItem("token", ress.data.access_token);
// window.localStorage.setItem(
// "refresh_token",
// ress.data.refresh_token
// );
// window.localStorage.setItem("tokentype", ress.data.token_type);
// window.localStorage.setItem("user", this.form.Username);
// this.$message.success(res.data.msg, "");
// this.$router.push({ path: "home" });
// }
// } else {
// console.log();
// this.$message.warning(res.data.msg);
// }
// } catch (err) {
// console.log(err);
// }
// await getapi("/api/identity/users/login", {
// username: this.form.Username,
// password: this.form.Password,
// }).then((ress) => {
// if (ress.data.code == 1 && ress.code == 1) {
// // console.log(msg);
// postapi(mm.apiurl + "/connect/token", {
// client_id: "Peis_App",
// grant_type: "password",
// username: this.form.Username,
// password: this.form.Password,
// scope: "Peis offline_access",
// }).then((res) => {
// console.log(res);
// writetoken(res.data.expires_in);
// window.localStorage.setItem("token", res.data.access_token);
// window.localStorage.setItem(
// "refresh_token",
// res.data.refresh_token
// );
// window.localStorage.setItem("tokentype", res.data.token_type);
// window.localStorage.setItem("user", this.form.Username);
// this.$message.success("");
// this.$router.push({ path: "home" });
// this.$store.state.changepassword = this.form.Password;
// });
// } else {
// this.$message.warning(res.data.msg);
// }
// });
// this.$axios
// .post(
// mm.apiurl + "/connect/token",
// {
// client_id: "Peis_App",
// grant_type: "password",
// username: this.form.Username, //admin
// password: this.form.Password, //1q2w3E
// scope: "Peis offline_access",
// },
// {
// headers: {
// "Content-Type": "application/x-www-form-urlencoded",
// },
// }
// )
// .then((res) => {
// console.log(res, "222222");
// if (res.status == 200) {
// //console.log(res.data)
// writetoken(res.data.expires_in);
// window.localStorage.setItem("token", res.data.access_token);
// window.localStorage.setItem(
// "refresh_token",
// res.data.refresh_token
// );
// // window.localStorage.setItem("expires_in", res.data.expires_in);
// window.localStorage.setItem("tokentype", res.data.token_type);
// window.localStorage.setItem("user", this.form.Username);
// this.$message.success("");
// this.$router.push({ path: "home" });
// // this.$store.dispatch('changepassword',this.form.Password)
// this.$store.state.changepassword = this.form.Password;
// } else {
// this.$message.warning("");
// }
// });
}
});
},
tuichui() {
let token = localStorage.getItem("token");
let tokentype = localStorage.getItem("tokentype");
this.$axios
.get("http://192.168.1.108:44394/api/identity/users", {
params: {
SkipCount: 1,
MaxResultCount: 1,
},
headers: {
Authorization: `${tokentype} ${token}`,
},
})
.then((res) => {
console.log(res);
});
},
users() {
this.$axios.put(
"http://192.168.1.108:44394/api/permission-management/permissions",
{
providerName: "R",
providerKey: "sdsaf",
}
);
},
},
created() {
// let date = moment();
// date.add(3600, 's');
// console.log(parseInt(new Date(date).getTime() / 1000) + '')
// // console.log(this.$moment);
// console.log('33');
// console.log(parseInt(new Date().getTime() / 1000) + '');
},
created() {},
};
</script>
<style lang="scss" scoped>
@ -323,12 +142,12 @@ export default {
width: 100%;
min-height: 100vh;
}
.el-form-item.is-error .el-input__inner{
.el-form-item.is-error .el-input__inner {
color: none;
}
.inputcolor{
}
.inputcolor {
border: none;
}
}
.box {
width: 400px;
height: 300px;
@ -364,7 +183,7 @@ export default {
// .btn :hover {
// // background-color: rgb(0, 183, 92);
// }
::v-deep .el-input__icon{
::v-deep .el-input__icon {
font-size: 18px;
}
.btn {

5
src/views/user-list/UserList.vue

@ -215,7 +215,6 @@
></el-cascader>
</el-tab-pane>
<el-tab-pane label="科室设置1">
<el-tree
:props="{
label: 'displayName',
@ -367,7 +366,6 @@
</el-tab-pane>
</el-tabs>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="addlsit"> </el-button>
@ -852,7 +850,7 @@ export default {
});
}
} else if (this.title == 2) {
console.log(this.form.roleNames);
console.log(this.orgId);
// this.roleNames=arrs
let obj = {
@ -877,7 +875,6 @@ export default {
this.dialogVisible = false;
this.getlist();
}
console.log(res);
if (res.code == 1) {
selectbinding({

Loading…
Cancel
Save