姜旭之 1 year ago
parent
commit
93efe75988
  1. 26
      docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs
  2. 1
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/Department.cs
  3. 1
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/Post.cs
  4. 2
      docs/demo/src/WTA/wwwroot/components/form/form-input.js
  5. 3
      docs/demo/src/WTA/wwwroot/components/icon/index.js
  6. 1
      docs/demo/src/WTA/wwwroot/router/index.js

26
docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs

@ -59,6 +59,32 @@ public class IdentityDbSeed : IDbSeed<IdentityDbContext>
// 权限初始化 // 权限初始化
InitPermissions(context); InitPermissions(context);
//岗位初始化
context.Set<Post>().Add(new Post
{
Name = "董事长",
Number = "001",
Order = 1,
}.SetIdBy(o => o.Number));
context.Set<Post>().Add(new Post
{
Name = "项目经理",
Number = "002",
Order = 2
}.SetIdBy(o => o.Number));
context.Set<Post>().Add(new Post
{
Name = "人力资源",
Number = "003",
Order = 3
}.SetIdBy(o => o.Number));
context.Set<Post>().Add(new Post
{
Name = "普通员工",
Number = "004",
Order = 4
}.SetIdBy(o => o.Number));
//部门初始化 //部门初始化
context.Set<Department>().Add( context.Set<Department>().Add(
new Department new Department

1
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/Department.cs

@ -3,7 +3,6 @@ using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement; namespace WTA.Application.Identity.Entities.SystemManagement;
[Hidden]
[Order(4)] [Order(4)]
[SystemManagement] [SystemManagement]
public class Department : BaseTreeEntity<Department> public class Department : BaseTreeEntity<Department>

1
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/Post.cs

@ -3,7 +3,6 @@ using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement; namespace WTA.Application.Identity.Entities.SystemManagement;
[Hidden]
[Order(5)] [Order(5)]
[SystemManagement] [SystemManagement]
public class Post : BaseEntity public class Post : BaseEntity

2
docs/demo/src/WTA/wwwroot/components/form/form-input.js

@ -23,7 +23,7 @@ export default {
style="width:100%" style="width:100%"
:title="JSON.stringify(options)" :title="JSON.stringify(options)"
> >
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </template>
<el-input <el-input

3
docs/demo/src/WTA/wwwroot/components/icon/index.js

@ -32,11 +32,10 @@ export default {
} }
} }
}); });
c;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
if (!svg.value) { if (!svg.value) {
svg.value = `<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path></svg>`; svg.value = `<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path></svg>`;
} }
} }
} }

1
docs/demo/src/WTA/wwwroot/router/index.js

@ -81,6 +81,7 @@ router.afterEach((to) => {
if (to.meta.title) { if (to.meta.title) {
useTitle().value = `${to.meta.title}`; useTitle().value = `${to.meta.title}`;
} }
to.meta.cache = new Map();
} finally { } finally {
NProgress.done(); NProgress.done();
} }

Loading…
Cancel
Save