| | |
| | | class="default-theme" |
| | | > |
| | | <!--部门数据--> |
| | | <pane size="12"> |
| | | <pane size="14"> |
| | | <el-col> |
| | | <div class="head-container addButton"> |
| | | <el-input |
| | |
| | | prefix-icon="el-icon-search" |
| | | style="margin-bottom: 20px" |
| | | /> |
| | | <el-button |
| | | <!-- <el-button |
| | | style="margin-left: 4px" |
| | | type="primary" |
| | | plain |
| | |
| | | size="mini" |
| | | circle |
| | | @click="addSchema" |
| | | ></el-button> |
| | | ></el-button> --> |
| | | </div> |
| | | <div class="head-container"> |
| | | <el-tree |
| | |
| | | </el-col> |
| | | </pane> |
| | | <!--用户数据--> |
| | | <pane size="88"> |
| | | <pane size="86"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <el-form |
| | |
| | | v-for="item in postOptions" |
| | | :key="item.id" |
| | | :label="item.company" |
| | | :value="item.id + ''" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="归属部门" prop="deptId"> |
| | | <treeselect |
| | | v-model="form.deptId" |
| | | :options="enabledDeptOptions" |
| | | :show-count="true" |
| | | placeholder="请选择归属部门" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | class="avatar-uploader" |
| | | :action="uploadAction" |
| | | :show-file-list="false" |
| | | :headers="upload.headers" |
| | | accept=".png, .jpg, .jpeg, .gif" |
| | | :on-error="handleUploadError" |
| | | :on-success="handleUploadSuccess" |
| | | :before-upload="handleBeforeUpload" |
| | | > |
| | | <img |
| | | v-if="signatureUrl" |
| | | :src="signatureUrl" |
| | | v-if="form.signatureUrl" |
| | | :src="javaApi + '/img/' + form.signatureUrl" |
| | | class="avatar" |
| | | alt="" |
| | | /> |
| | |
| | | class="avatar-uploader" |
| | | :action="uploadAction" |
| | | :show-file-list="false" |
| | | :headers="upload.headers" |
| | | accept=".png, .jpg, .jpeg, .gif" |
| | | :on-error="handleUploadError1" |
| | | :on-success="handleUploadSuccess1" |
| | | :before-upload="handleBeforeUpload1" |
| | | > |
| | | <img |
| | | v-if="pictureUrl" |
| | | :src="pictureUrl" |
| | | v-if="form.pictureUrl" |
| | | :src="javaApi + '/img/' + form.pictureUrl" |
| | | class="avatar" |
| | | alt="" |
| | | /> |
| | |
| | | <el-tree |
| | | :data="datathirdParty" |
| | | node-key="companyId" |
| | | :props="defaultProps" |
| | | :props="companyProps" |
| | | @node-click="nodeClick2" |
| | | style="height: calc(100% - 42px)" |
| | | @node-expand="nodeOpen0" |
| | |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column prop="employeeID" label="员工号"> |
| | | </el-table-column> |
| | | <el-table-column prop="nickName" label="员工姓名"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="员工姓名"> </el-table-column> |
| | | <el-table-column prop="department" label="部门" min-width="200"> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | companyProps: { |
| | | children: "children", |
| | | label: "companyName", |
| | | }, |
| | | // 用户导入参数 |
| | | upload: { |
| | | // 是否显示弹出层(用户导入) |
| | |
| | | url: process.env.VUE_APP_BASE_API + "/system/user/importData", |
| | | }, |
| | | uploadAction: process.env.VUE_APP_BASE_API + "/deviceScope/uploadFile", |
| | | signatureUrl: "", |
| | | pictureUrl: "", |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | rules: { |
| | | nickName: [{ required: true, message: "请填写姓名", trigger: "blur" }], |
| | | userName: [{ required: true, message: "请填写账号", trigger: "blur" }], |
| | | nameEn: [{ required: true, message: "请输入姓名EN", trigger: "blur" }], |
| | | // nameEn: [ |
| | | // { required: true, message: "请输入姓名EN", trigger: "blur" } |
| | | // ], |
| | | status: [{ required: true, message: "请选择状态", trigger: "change" }], |
| | | roleIds: [{ required: true, message: "请选择角色", trigger: "change" }], |
| | | password: [ |
| | | { required: true, message: "密码不能为空", trigger: "blur" }, |
| | | ], |
| | | // password: [ |
| | | // { required: true, message: "密码不能为空", trigger: "blur" }, |
| | | // ], |
| | | phonenumber: [ |
| | | { |
| | | required: true, |
| | |
| | | fatherId: 10001, |
| | | nickName: "", |
| | | }, |
| | | multipleSelection: [], |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | status: "0", |
| | | company: "", |
| | | roleIds: [], |
| | | signatureUrl: "", |
| | | pictureUrl: "", |
| | | }; |
| | | // this.signatureUrl = ''; |
| | | // this.pictureUrl = '' |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | |
| | | this.ids = selection.map((item) => item.userId); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | this.multipleSelection = selection; |
| | | }, |
| | | // 更多操作触发 |
| | | handleCommand(command, row) { |
| | |
| | | .catch(() => { |
| | | this.thirdPartyLoading = false; |
| | | }); |
| | | if (this.componentData.entity.roleId > 10000) |
| | | this.$message.warning("由于未选中具体角色,新增用户将成为默认角色"); |
| | | // if (this.componentData.entity.roleId > 10000) |
| | | // this.$message.warning("由于未选中具体角色,新增用户将成为默认角色"); |
| | | }, |
| | | tranListToTreeData(list, rootValue) { |
| | | const arr = []; |
| | |
| | | } |
| | | }, |
| | | nodeOpen0(data, node, el) { |
| | | this.currentCompaniesList[node.level - nodeOpen01] = data.id; |
| | | this.currentCompaniesList[node.level - 1] = data.id; |
| | | }, |
| | | filterNode2(value, data) { |
| | | if (!value) return true; |
| | |
| | | if (this.currentCompaniesList.length === 0) { |
| | | return this.$message.error("请选择组织"); |
| | | } |
| | | /* for (let index = this.currentCompaniesList.length-1; index >1; index--) { |
| | | let obj = this.multipleSelection.find(a=>a.companyId==this.currentCompaniesList[index]) |
| | | if(!obj){ |
| | | this.currentCompaniesList.splice(index,1) |
| | | } |
| | | } */ |
| | | let arr = []; |
| | | this.currentCompaniesList.forEach((b) => { |
| | | let obj = this.companiesList.find((a) => a.companyId == b); |
| | |
| | | addPersonUser({ |
| | | company: arr, |
| | | person: this.multipleSelection, |
| | | roleId: this.componentData.entity.roleId, |
| | | roleId: null, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 201) { |
| | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.form.deptId = this.queryParams.deptId; |
| | | this.open = true; |
| | | selectCustomEnum().then((res) => { |
| | | this.postOptions = res.data; |
| | |
| | | const userId = row.userId || this.ids; |
| | | getUser(userId).then((response) => { |
| | | this.form = response.data; |
| | | this.form.password = ""; |
| | | this.roleOptions = response.roles; |
| | | this.$set(this.form, "roleIds", response.roleIds); |
| | | this.open = true; |
| | |
| | | // 如果上传成功 |
| | | if (res.code == 200) { |
| | | // 获取富文本组件实例 |
| | | let quill = this.Quill; |
| | | // 获取光标所在位置 |
| | | let length = quill.getSelection().index; |
| | | // 插入图片 res.url为服务器返回的图片地址 |
| | | quill.insertEmbed( |
| | | length, |
| | | "image", |
| | | process.env.VUE_APP_BASE_API + res.fileName |
| | | ); |
| | | // 调整光标到最后 |
| | | quill.setSelection(length + 1); |
| | | this.signatureUrl = res.data.url; |
| | | // let quill = this.Quill; |
| | | // // 获取光标所在位置 |
| | | // let length = quill.getSelection().index; |
| | | // // 插入图片 res.url为服务器返回的图片地址 |
| | | // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); |
| | | // // 调整光标到最后 |
| | | // quill.setSelection(length + 1); |
| | | this.form.signatureUrl = res.data.url; |
| | | } else { |
| | | this.$message.error("图片插入失败"); |
| | | } |
| | |
| | | // 如果上传成功 |
| | | if (res.code == 200) { |
| | | // 获取富文本组件实例 |
| | | let quill = this.Quill; |
| | | // 获取光标所在位置 |
| | | let length = quill.getSelection().index; |
| | | // 插入图片 res.url为服务器返回的图片地址 |
| | | quill.insertEmbed( |
| | | length, |
| | | "image", |
| | | process.env.VUE_APP_BASE_API + res.fileName |
| | | ); |
| | | // 调整光标到最后 |
| | | quill.setSelection(length + 1); |
| | | this.pictureUrl = res.data.url; |
| | | // let quill = this.Quill; |
| | | // // 获取光标所在位置 |
| | | // let length = quill.getSelection().index; |
| | | // // 插入图片 res.url为服务器返回的图片地址 |
| | | // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); |
| | | // // 调整光标到最后 |
| | | // quill.setSelection(length + 1); |
| | | this.form.pictureUrl = res.data.url; |
| | | } else { |
| | | this.$message.error("图片插入失败"); |
| | | } |
| | |
| | | .search_form { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .options_button { |
| | | margin-top: 3px; |
| | | } |
| | | } |
| | | |
| | | .avatar-uploader ::v-deep .el-upload { |
| | | border: 1px dashed #666666; |
| | | border-radius: 6px; |
| | |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader ::v-deep .el-upload:hover { |
| | | border-color: #409eff; |
| | | } |
| | | |
| | | .avatar-uploader-icon { |
| | | font-size: 20px; |
| | | color: #8c939d; |
| | |
| | | line-height: 90px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .avatar { |
| | | width: 90px; |
| | | height: 90px; |
| | | display: block; |
| | | } |
| | | |
| | | .addButton { |
| | | display: flex; |
| | | align-items: flex-start; |