|
@@ -1,15 +1,84 @@
|
|
|
<template>
|
|
|
- <div>首页
|
|
|
-
|
|
|
+ <div>
|
|
|
+ 首页
|
|
|
+ <el-button @click="onClick">ces1</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
-
|
|
|
-}
|
|
|
+ methods: {
|
|
|
+ onClick() {
|
|
|
+ let data = {
|
|
|
+ userId: "",
|
|
|
+ userCode: "A12345",
|
|
|
+ userName: "A12345",
|
|
|
+ qrCode: "",
|
|
|
+ sex: "",
|
|
|
+ age: "",
|
|
|
+ cardNo: "",
|
|
|
+ birthDate: "",
|
|
|
+ nativePlace: "",
|
|
|
+ orgCode: "yunli",
|
|
|
+ orgName: "运力",
|
|
|
+ dep: "",
|
|
|
+ workTeam: "",
|
|
|
+ profilePhoto: "",
|
|
|
+ photo: "",
|
|
|
+ mobile: "13487481520",
|
|
|
+ qq: "",
|
|
|
+ wechat: "",
|
|
|
+ tel: "",
|
|
|
+ email: "213213@qq.com",
|
|
|
+ homeAddr: "",
|
|
|
+ entryDate: "",
|
|
|
+ workDate: "",
|
|
|
+ political: "",
|
|
|
+ title: "",
|
|
|
+ degree: "",
|
|
|
+ major: "",
|
|
|
+ gradSchool: "",
|
|
|
+ ability: "",
|
|
|
+ tranHis: "",
|
|
|
+ certificate: "",
|
|
|
+ special: "",
|
|
|
+ assessment: "",
|
|
|
+ leaveStatus: "",
|
|
|
+ onlineStatus: "",
|
|
|
+ status: "",
|
|
|
+ remark: "",
|
|
|
+ expireDays: "",
|
|
|
+ leave: "",
|
|
|
+ address: "",
|
|
|
+ ip: "",
|
|
|
+ rank: "",
|
|
|
+ responsibility: "",
|
|
|
+ groupData: "",
|
|
|
+ companyData: "",
|
|
|
+ groupId: "506514577756917769",
|
|
|
+ companyId: "713710108567277568",
|
|
|
+ photoType: "",
|
|
|
+ orgId: "922512907093282816",
|
|
|
+ };
|
|
|
+ this.store.dispatch("system/usersManage/addUser", data).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.code === "0") {
|
|
|
+ if (this.qrRole.length > 0) {
|
|
|
+ this.addRoleToUser(res.data.userId, res.data.userCode);
|
|
|
+ }
|
|
|
+ if (form.dutys.length > 0) {
|
|
|
+ this.addUserDutys(res.data.userId, form.dutys);
|
|
|
+ }
|
|
|
+ this.$message.success("添加成功");
|
|
|
+ this.$emit("on-then", "success", form);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
-
|
|
|
</style>
|