|
@@ -62,7 +62,39 @@
|
|
|
v-for="(option, index) in rules"
|
|
|
:value="option.roleId"
|
|
|
:key="index"
|
|
|
- >.
|
|
|
+ >
|
|
|
+ {{ option.name }}
|
|
|
+ </Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="机构">
|
|
|
+ <Select
|
|
|
+ v-model="user.organ"
|
|
|
+ filterable
|
|
|
+ :remote-method="get_organ_data"
|
|
|
+ :loading="isLoad"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="(option, index) in organ"
|
|
|
+ :value="option.organId"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ option.name }}
|
|
|
+ </Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="地域">
|
|
|
+ <Select
|
|
|
+ v-model="user.adminRoles"
|
|
|
+ filterable
|
|
|
+ :remote-method="get_role_data"
|
|
|
+ :loading="isLoad"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="(option, index) in rules"
|
|
|
+ :value="option.roleId"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
{{ option.name }}
|
|
|
</Option>
|
|
|
</Select>
|
|
@@ -77,6 +109,18 @@
|
|
|
placeholder="请输入密码"
|
|
|
></Input>
|
|
|
</FormItem>
|
|
|
+ <FormItem label="简介">
|
|
|
+ <Input v-model="user.info" placeholder="请输入简介"></Input>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="职位">
|
|
|
+ <Input v-model="user.position" placeholder="请输入职位"></Input>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="职级">
|
|
|
+ <Input v-model="user.level" placeholder="请输入职级"></Input>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="履历">
|
|
|
+ <Input v-model="user.resume" placeholder="请输入履历"></Input>
|
|
|
+ </FormItem>
|
|
|
<FormItem>
|
|
|
<Button type="primary" @click="save_user">保 存</Button>
|
|
|
</FormItem>
|
|
@@ -93,9 +137,11 @@ const searchText = ref('');
|
|
|
const total = ref(0);
|
|
|
const page = ref(1);
|
|
|
const pageSize = ref(10);
|
|
|
+const formInline = ref(null);
|
|
|
const list = ref([]);
|
|
|
const user = ref({});
|
|
|
const rules = ref([]);
|
|
|
+const organ = ref([]);
|
|
|
const show_user_edit = ref(false);
|
|
|
const isLoad = ref(false);
|
|
|
|
|
@@ -154,6 +200,8 @@ const ruleInline = {
|
|
|
|
|
|
onMounted(() => {});
|
|
|
get_list();
|
|
|
+get_role_data();
|
|
|
+get_organ_data();
|
|
|
|
|
|
function change(page) {
|
|
|
page.value = page;
|
|
@@ -187,15 +235,15 @@ function show_edit(row) {
|
|
|
}
|
|
|
|
|
|
function save_user() {
|
|
|
- this.$refs.formInline.validate(valid => {
|
|
|
+ formInline.value.validate(valid => {
|
|
|
if (!valid) return;
|
|
|
- this.user.password = this.user.newpassword || '';
|
|
|
- console.log(this.user);
|
|
|
+ user.value.password = user.value.newpassword || '';
|
|
|
+ console.log(user.value);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function get_role_data(query) {
|
|
|
- this.isLoad = true;
|
|
|
+ isLoad.value = true;
|
|
|
api
|
|
|
.user_role_api({
|
|
|
page: 1,
|
|
@@ -203,13 +251,24 @@ function get_role_data(query) {
|
|
|
name: query,
|
|
|
})
|
|
|
.then(r => {
|
|
|
- this.isLoad = false;
|
|
|
- this.rules = r.records || [];
|
|
|
+ isLoad.value = false;
|
|
|
+ rules.value = r.records || [];
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- this.isLoad = false;
|
|
|
+ isLoad.value = false;
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+function get_organ_data(query) {
|
|
|
+ api.orgin_api({
|
|
|
+ page: 1,
|
|
|
+ pageSize: 100000,
|
|
|
+ name: query
|
|
|
+ }).then(r => {
|
|
|
+ console.log(r);
|
|
|
+ organ.value = r.records || [];
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss"></style>
|