|
@@ -8,7 +8,7 @@
|
|
height="500"
|
|
height="500"
|
|
@ok="handleOk"
|
|
@ok="handleOk"
|
|
>
|
|
>
|
|
- <BasicForm @register="registerForm" :model="modelRef" />
|
|
|
|
|
|
+ <BasicForm @register="registerForm" />
|
|
</BasicModal>
|
|
</BasicModal>
|
|
</template>
|
|
</template>
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
@@ -30,6 +30,7 @@
|
|
const modelRef = ref({});
|
|
const modelRef = ref({});
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
const userinfo = computed(() => userStore.getUserInfo);
|
|
const userinfo = computed(() => userStore.getUserInfo);
|
|
|
|
+ const preventAutoFill = ref(true);
|
|
const { companyId } = userinfo.value;
|
|
const { companyId } = userinfo.value;
|
|
console.log('companyId', companyId);
|
|
console.log('companyId', companyId);
|
|
const permListOptions = computed(() => {
|
|
const permListOptions = computed(() => {
|
|
@@ -109,6 +110,7 @@
|
|
placeholder:"请输入字母或数字组合",
|
|
placeholder:"请输入字母或数字组合",
|
|
autoComplete:'off',
|
|
autoComplete:'off',
|
|
maxLength: 15,
|
|
maxLength: 15,
|
|
|
|
+ readonly:preventAutoFill.value
|
|
},
|
|
},
|
|
rules: [
|
|
rules: [
|
|
{
|
|
{
|
|
@@ -160,6 +162,7 @@
|
|
componentProps:{
|
|
componentProps:{
|
|
placeholder:"请输入8-16位数字、字母大小写组合",
|
|
placeholder:"请输入8-16位数字、字母大小写组合",
|
|
maxLength: 16,
|
|
maxLength: 16,
|
|
|
|
+ readonly:preventAutoFill.value,
|
|
minLength: 8,
|
|
minLength: 8,
|
|
autoComplete:'off',
|
|
autoComplete:'off',
|
|
}
|
|
}
|
|
@@ -188,6 +191,7 @@
|
|
function onDataReceive(data) {
|
|
function onDataReceive(data) {
|
|
// 方式1;
|
|
// 方式1;
|
|
console.log('useModalInner', data);
|
|
console.log('useModalInner', data);
|
|
|
|
+ // preventAutoFill.value = false
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
console.log('useModalInner', data);
|
|
console.log('useModalInner', data);
|
|
setFieldsValue({
|
|
setFieldsValue({
|
|
@@ -221,10 +225,24 @@
|
|
{
|
|
{
|
|
field: 'userName',
|
|
field: 'userName',
|
|
ifShow:data.id ? false:true,
|
|
ifShow:data.id ? false:true,
|
|
|
|
+ componentProps: {
|
|
|
|
+ placeholder:"请输入字母或数字组合",
|
|
|
|
+ autoComplete:'off',
|
|
|
|
+ readonly:false,
|
|
|
|
+ maxLength: 15,
|
|
|
|
+ },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
field: 'password',
|
|
field: 'password',
|
|
ifShow:data.id ? false:true,
|
|
ifShow:data.id ? false:true,
|
|
|
|
+ componentProps:{
|
|
|
|
+ disabled: data.id ? (data.roleId != 2 ? true : false) : false,
|
|
|
|
+ placeholder:"请输入8-16位数字、字母大小写组合",
|
|
|
|
+ maxLength: 16,
|
|
|
|
+ minLength: 8,
|
|
|
|
+ readonly:false,
|
|
|
|
+ autoComplete:'off',
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
field: 'companyId',
|
|
field: 'companyId',
|
|
@@ -243,7 +261,9 @@
|
|
},
|
|
},
|
|
];
|
|
];
|
|
title.value = data.id ? '编辑账号' : '新增账号';
|
|
title.value = data.id ? '编辑账号' : '新增账号';
|
|
- updateSchema(setSchema);
|
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ updateSchema(setSchema);
|
|
|
|
+ },500)
|
|
}
|
|
}
|
|
function companyIdChange(companyId) {
|
|
function companyIdChange(companyId) {
|
|
// resetFields(['permList'])
|
|
// resetFields(['permList'])
|
|
@@ -281,6 +301,7 @@
|
|
return {
|
|
return {
|
|
register,
|
|
register,
|
|
title,
|
|
title,
|
|
|
|
+ preventAutoFill,
|
|
schemas,
|
|
schemas,
|
|
registerForm,
|
|
registerForm,
|
|
modelRef,
|
|
modelRef,
|