优化
This commit is contained in:
@@ -494,6 +494,10 @@ function closeQualificationPreview() {
|
||||
<dl class="profile-grid">
|
||||
<div><dt>公司名称</dt><dd>{{ store.company.companyName || '-' }}</dd></div>
|
||||
<div><dt>统一社会信用代码</dt><dd>{{ store.company.creditCode || '-' }}</dd></div>
|
||||
<div><dt>企业类型</dt><dd>{{ store.company.enterpriseType || '-' }}</dd></div>
|
||||
<div><dt>注册地</dt><dd>{{ store.company.registeredAddress || '-' }}</dd></div>
|
||||
<div><dt>成立日期</dt><dd>{{ store.company.establishedDate || '-' }}</dd></div>
|
||||
<div><dt>注册资本</dt><dd>{{ store.company.registeredCapital == null ? '-' : `${store.company.registeredCapital} ${store.company.registeredCapitalCurrency}`.trim() }}</dd></div>
|
||||
<div><dt>法人姓名</dt><dd>{{ store.company.legalRepresentative || '-' }}</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
@@ -507,6 +511,7 @@ function closeQualificationPreview() {
|
||||
<div><dt>联系人</dt><dd>{{ store.company.contactName || '-' }}</dd></div>
|
||||
<div><dt>联系电话</dt><dd>{{ store.company.contactPhone || '-' }}</dd></div>
|
||||
<div><dt>联系邮箱</dt><dd>{{ store.company.contactEmail || '-' }}</dd></div>
|
||||
<div><dt>联系微信</dt><dd>{{ store.company.contactWechat || '-' }}</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -69,9 +69,7 @@ async function loadRoles() {
|
||||
loading.value = true
|
||||
loadError.value = ''
|
||||
try {
|
||||
const requests = [store.loadRoles()]
|
||||
if (auth.hasPermission('company:member:list')) requests.push(store.loadMembers())
|
||||
await Promise.all(requests)
|
||||
await store.loadRoles()
|
||||
} catch (error) {
|
||||
loadError.value = error instanceof Error ? error.message : '角色与成员统计加载失败'
|
||||
} finally {
|
||||
|
||||
@@ -88,7 +88,12 @@ test('implements company details, contact information and qualification workflow
|
||||
assert.match(profileSource, /URL\.revokeObjectURL/)
|
||||
assert.match(profileSource, /企业资料加载失败/)
|
||||
assert.match(profileSource, /@click="loadCompanyContext"/)
|
||||
assert.doesNotMatch(profileSource, /企业类型|注册资本|contactWechat|businessAddress/)
|
||||
assert.match(profileSource, /<dt>企业类型<\/dt><dd>\{\{ store\.company\.enterpriseType/)
|
||||
assert.match(profileSource, /<dt>注册地<\/dt><dd>\{\{ store\.company\.registeredAddress/)
|
||||
assert.match(profileSource, /<dt>成立日期<\/dt><dd>\{\{ store\.company\.establishedDate/)
|
||||
assert.match(profileSource, /<dt>注册资本<\/dt><dd>\{\{ store\.company\.registeredCapital/)
|
||||
assert.match(profileSource, /<dt>联系微信<\/dt><dd>\{\{ store\.company\.contactWechat/)
|
||||
assert.match(storeSource, /expiresAt: item\.validTo \|\| '长期有效'/)
|
||||
})
|
||||
|
||||
test('implements member list, role assignment, password reset and status control', () => {
|
||||
@@ -140,9 +145,8 @@ test('protects built-in roles and exposes role permission assignment', () => {
|
||||
assert.match(rolesSource, /function assignPermissions\(role: TenantRole\)/)
|
||||
assert.match(storeSource, /if \(role\.builtin\) throw new Error\('内置角色不能删除'\)/)
|
||||
assert.match(storeSource, /if \(members\.value\.some\(\(member\) => member\.roleIds\.includes\(id\)\)\)/)
|
||||
assert.match(rolesSource, /store\.loadRoles\(\)/)
|
||||
assert.match(rolesSource, /auth\.hasPermission\('company:member:list'\).*store\.loadMembers\(\)/)
|
||||
assert.match(rolesSource, /await Promise\.all\(requests\)/)
|
||||
assert.match(rolesSource, /await store\.loadRoles\(\)/)
|
||||
assert.doesNotMatch(rolesSource, /store\.loadMembers\(\)/)
|
||||
assert.match(rolesSource, /await store\.createRole/)
|
||||
assert.match(rolesSource, /await store\.updateRole/)
|
||||
assert.match(rolesSource, /await store\.toggleRoleStatus/)
|
||||
|
||||
Reference in New Issue
Block a user