Skip to content

Commit

Permalink
fix(frontend): 单据协作人样式调整 #8482
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 26148
  • Loading branch information
royalpioneer authored and hLinx committed Dec 9, 2024
1 parent 1259f8f commit 81df977
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 31 deletions.
1 change: 1 addition & 0 deletions dbm-ui/frontend/src/locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -3710,5 +3710,6 @@
"访问 DB 名不允许为 admin": "访问 DB 名不允许为 admin",
"删除规则后将不能恢复,请谨慎操作": "删除规则后将不能恢复,请谨慎操作",
"请输入访问DB名_以字母开头_支持字母_数字_下划线_多个使用英文逗号_分号或换行分隔": "请输入访问DB名,以字母开头,支持字母,数字,下划线。多个使用英文逗号、分号或换行分隔",
"单据协助设置": "单据协助设置",
"这行勿动!新增翻译请在上一行添加!": ""
}
66 changes: 36 additions & 30 deletions dbm-ui/frontend/src/views/ticket-cooperation-setting/Index.vue
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
<template>
<div class="ticket-cooperation-setting">
<DbCard
mode="collapse"
:title="t('单据协助')">
<BkForm
ref="formRef"
:model="formModel">
<BkFormItem :label="t('单据协助')">
<BkSwitcher
v-model="isCooperationOpen"
class="mr-8"
theme="primary" />
{{ t('开启后,您指定的协作人将能够协助处理单据执行、继续任务等事项,同时也会收到单据通知') }}
</BkFormItem>
<BkFormItem
v-if="isCooperationOpen"
:label="t('默认协作人')"
property="members"
required>
<MemberSelector v-model="formModel.members" />
</BkFormItem>
</BkForm>
</DbCard>
<AuthButton
action-id="biz_assistance_vars_config"
class="submit-btn"
:loading="isUpdating"
theme="primary"
@click="handleSubmit">
{{ t('保存') }}
</AuthButton>
<SmartAction :offset-target="getSmartActionOffsetTarget">
<DbCard
mode="collapse"
:title="t('单据协助')">
<BkForm
ref="formRef"
:model="formModel">
<BkFormItem :label="t('单据协助')">
<BkSwitcher
v-model="isCooperationOpen"
class="mr-8"
theme="primary" />
{{ t('开启后,您指定的协作人将能够协助处理单据执行、继续任务等事项,同时也会收到单据通知') }}
</BkFormItem>
<BkFormItem
v-if="isCooperationOpen"
:label="t('默认协作人')"
property="members"
required>
<MemberSelector v-model="formModel.members" />
</BkFormItem>
</BkForm>
</DbCard>
<template #action>
<AuthButton
action-id="biz_assistance_vars_config"
class="submit-btn"
:loading="isUpdating"
theme="primary"
@click="handleSubmit">
{{ t('保存') }}
</AuthButton>
</template>
</SmartAction>
</div>
</template>

Expand All @@ -56,6 +60,8 @@
members: [],
});
const getSmartActionOffsetTarget = () => document.querySelector('.bk-form-content');
// 是否开启单据协助
useRequest(getBizSettingList, {
defaultParams: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const routes = [
name: 'TicketCooperationSetting',
path: 'ticket-cooperation-setting',
meta: {
navName: t('单据免审批设置'),
navName: t('单据协助设置'),
},
component: () => import('@views/ticket-cooperation-setting/Index.vue'),
},
Expand Down

0 comments on commit 81df977

Please sign in to comment.