😎1、修复sqlsugar aop处理默认字段错误 2、修复字典数据的数据类型转换成对应的类型
This commit is contained in:
parent
d03fa3f770
commit
3508a4a95c
@ -37,7 +37,7 @@
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.160" />
|
||||
<PackageReference Include="SSH.NET" Version="2024.0.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.2" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1034" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1035" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -188,12 +188,12 @@ public static class SqlSugarSetup
|
||||
dynamic entityValue = entityInfo.EntityValue;
|
||||
if (entityInfo.PropertyName == nameof(EntityTenantId.TenantId))
|
||||
{
|
||||
if (entityValue.TenantId == 0)
|
||||
if (entityValue.TenantId == null || entityValue.TenantId == 0)
|
||||
entityInfo.SetValue(App.User.FindFirst(ClaimConst.TenantId)?.Value);
|
||||
}
|
||||
else if (entityInfo.PropertyName == nameof(EntityBase.CreateUserId))
|
||||
{
|
||||
if (entityValue.CreateUserId == 0)
|
||||
if (entityValue.CreateUserId == null || entityValue.CreateUserId == 0)
|
||||
entityInfo.SetValue(App.User.FindFirst(ClaimConst.UserId)?.Value);
|
||||
}
|
||||
else if (entityInfo.PropertyName == nameof(EntityBase.CreateUserName))
|
||||
@ -203,7 +203,7 @@ public static class SqlSugarSetup
|
||||
}
|
||||
else if (entityInfo.PropertyName == nameof(EntityBaseData.CreateOrgId))
|
||||
{
|
||||
if (entityValue.CreateOrgId == 0)
|
||||
if (entityValue.CreateOrgId == null || entityValue.CreateOrgId == 0)
|
||||
entityInfo.SetValue(App.User.FindFirst(ClaimConst.OrgId)?.Value);
|
||||
}
|
||||
else if (entityInfo.PropertyName == nameof(EntityBaseData.CreateOrgName))
|
||||
|
||||
@ -78,7 +78,7 @@
|
||||
@:<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
@:<el-form-item label="@column.ColumnComment" prop="@(@column.LowerPropertyName)">
|
||||
@:<el-select clearable v-model="ruleForm.@(@column.LowerPropertyName)" placeholder="请选择@(@column.ColumnComment)">
|
||||
@:<el-option v-for="(item,index) in dl('@(@column.DictTypeCode)')" :key="index" :value="item.code" :label="`[${item.code}] ${item.value}`"></el-option>
|
||||
@:<el-option v-for="(item,index) in dl('@(@column.DictTypeCode)')" :key="index" :value="@(@column.NetType.StartsWith("string") ? "item.code" : "Number(item.code)")" :label="`[${item.code}] ${item.value}`"></el-option>
|
||||
@:
|
||||
</el-select>
|
||||
@:
|
||||
@ -89,7 +89,7 @@
|
||||
@:<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
@:<el-form-item label="@column.ColumnComment" prop="@(@column.LowerPropertyName)">
|
||||
@:<el-select clearable v-model="ruleForm.@(@column.LowerPropertyName)" placeholder="请选择@(@column.ColumnComment)">
|
||||
@:<el-option v-for="(item,index) in getConstType('@column.DictTypeCode')" :key="index" :label="item.name" :value="item.code">{{ item.name }}</el-option>
|
||||
@:<el-option v-for="(item,index) in getConstType('@column.DictTypeCode')" :key="index" :label="item.name" :value="@(@column.NetType.StartsWith("string") ? "item.code" : "Number(item.code)")">{{ item.name }}</el-option>
|
||||
@:
|
||||
</el-select>
|
||||
@:
|
||||
@ -135,7 +135,7 @@
|
||||
@:<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
@:<el-form-item label="@column.ColumnComment" prop="@(@column.LowerPropertyName)">
|
||||
@:<el-select clearable v-model="ruleForm.@(@column.LowerPropertyName)" placeholder="请选择@(@column.ColumnComment)">
|
||||
@:<el-option v-for="(item,index) in dl('@(@column.DictTypeCode)')" :key="index" :value="@(@column.NetType == "string?" ? "item.value" : "Number(item.value)")" :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
|
||||
@:<el-option v-for="(item,index) in dl('@(@column.DictTypeCode)')" :key="index" :value="@(@column.NetType.StartsWith("string") ? "item.code" : "Number(item.code)")" :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
|
||||
@:
|
||||
</el-select>
|
||||
@:
|
||||
@ -159,7 +159,7 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
|
||||
@ -28,4 +28,14 @@
|
||||
max-height: 160px;
|
||||
overflow: auto;
|
||||
}
|
||||
// 在小屏幕中,取消表单左边距
|
||||
.el-form-item__label-wrap{
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
// 列表页查询表单内的输入框宽度适配
|
||||
.el-form--inline .el-form-item .el-select,
|
||||
.el-form--inline .el-form-item .el-input
|
||||
{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user