|
@@ -11,7 +11,7 @@
|
|
|
v-model:value="modelRef"
|
|
|
show-search
|
|
|
placeholder="请输入姓名/手机号码/身份证号码搜索"
|
|
|
- style="width: 350px"
|
|
|
+ style="width: 350px; text-align: left;"
|
|
|
:default-active-first-option="false"
|
|
|
:show-arrow="false"
|
|
|
:filter-option="false"
|
|
@@ -24,7 +24,7 @@
|
|
|
<div class="form-item">
|
|
|
<div>姓名</div>{{active.name}} </div>
|
|
|
<div class="form-item">
|
|
|
- <div>手机号码</div>{{active.phone || '暂无手机号'}} </div>
|
|
|
+ <div>手机号码</div>{{active.phone || '暂无手机号码'}} </div>
|
|
|
<div class="form-item">
|
|
|
<div>身份证</div>{{active.idCard || '暂无身份证'}} </div>
|
|
|
<div class="form-item">
|
|
@@ -70,28 +70,16 @@
|
|
|
lastFetchId += 1;
|
|
|
const fetchId = lastFetchId;
|
|
|
options.value = [];
|
|
|
- setFieldsValue({
|
|
|
- id: null,
|
|
|
- });
|
|
|
queryByKey({ queryKey: value }).then((res) => {
|
|
|
console.log('queryByKey', res);
|
|
|
const data = res.map((user) => ({
|
|
|
...user,
|
|
|
- label: `${user.name}/${user.phone || '暂无手机号码'}/${user.idCard || ''}/${
|
|
|
+ label: `${user.name}/${user.phone || '暂无手机号码'}/${user.idCard || '暂无身份证'}/${
|
|
|
user.platformName || '未分配'
|
|
|
}`,
|
|
|
value: user.id,
|
|
|
}));
|
|
|
options.value = data;
|
|
|
- updateSchema([
|
|
|
- {
|
|
|
- field: 'id',
|
|
|
- ifShow: true,
|
|
|
- componentProps: {
|
|
|
- options: options.value,
|
|
|
- },
|
|
|
- },
|
|
|
- ]);
|
|
|
});
|
|
|
}, 300);
|
|
|
const schemas: FormSchema[] = [
|
|
@@ -133,14 +121,14 @@
|
|
|
];
|
|
|
const title = ref('添加用户');
|
|
|
const { createMessage, createConfirm } = useMessage();
|
|
|
- const [registerForm, { setFieldsValue, validate, updateSchema, resetFields }] = useForm({
|
|
|
- labelWidth: 120,
|
|
|
- schemas,
|
|
|
- showActionButtonGroup: false,
|
|
|
- actionColOptions: {
|
|
|
- span: 24,
|
|
|
- },
|
|
|
- });
|
|
|
+ // const [registerForm, { setFieldsValue, validate, updateSchema, resetFields }] = useForm({
|
|
|
+ // labelWidth: 120,
|
|
|
+ // schemas,
|
|
|
+ // showActionButtonGroup: false,
|
|
|
+ // actionColOptions: {
|
|
|
+ // span: 24,
|
|
|
+ // },
|
|
|
+ // });
|
|
|
|
|
|
const [register, { closeModal }] = useModalInner((data) => {
|
|
|
data && onDataReceive(data);
|
|
@@ -152,20 +140,6 @@
|
|
|
// 方式1;
|
|
|
setTimeout(() => {
|
|
|
preventAutoFill.value = false;
|
|
|
- updateSchema([
|
|
|
- {
|
|
|
- field: 'userName',
|
|
|
- componentProps: {
|
|
|
- readonly: false,
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- field: 'password',
|
|
|
- componentProps: {
|
|
|
- readonly: false,
|
|
|
- },
|
|
|
- },
|
|
|
- ]);
|
|
|
// updateSchema(schemas);
|
|
|
}, 500);
|
|
|
}
|
|
@@ -208,6 +182,7 @@
|
|
|
}
|
|
|
async function handleOk() {
|
|
|
let res = await jyUserPlatformadd({
|
|
|
+ ...active,
|
|
|
id: modelRef.value,
|
|
|
});
|
|
|
context && context.emit('ok', res);
|
|
@@ -223,10 +198,8 @@
|
|
|
title,
|
|
|
preventAutoFill,
|
|
|
schemas,
|
|
|
- registerForm,
|
|
|
modelRef,
|
|
|
handleOk,
|
|
|
- resetFields,
|
|
|
fetchUser,
|
|
|
options,
|
|
|
handleChange,
|
|
@@ -237,6 +210,9 @@
|
|
|
});
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
+ .ant-select-selection-item{
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
.BasicForms {
|
|
|
margin: 0 auto;
|
|
|
text-align: center;
|