|
| 1 | +<script lang="ts" setup> |
| 2 | +import { ref, shallowRef } from 'vue' |
| 3 | +import icon_info_outlined_1 from '@/assets/svg/icon_info_outlined_1.svg' |
| 4 | +import { useI18n } from 'vue-i18n' |
| 5 | +
|
| 6 | +const { t } = useI18n() |
| 7 | +
|
| 8 | +const chatSetting = ref({ |
| 9 | + modelThinkingProcess: false, |
| 10 | + rows_of_data: false, |
| 11 | +}) |
| 12 | +
|
| 13 | +const platform = ref({ |
| 14 | + organization: false, |
| 15 | + modelThinkingProcess: false, |
| 16 | + roles: [], |
| 17 | +}) |
| 18 | +
|
| 19 | +const organizations = shallowRef<any[]>([]) |
| 20 | +const roles = shallowRef<any[]>([]) |
| 21 | +</script> |
| 22 | + |
| 23 | +<template> |
| 24 | + <div class="parameter"> |
| 25 | + <div class="title"> |
| 26 | + {{ t('parameter.parameter_configuration') }} |
| 27 | + </div> |
| 28 | + <div class="card-container"> |
| 29 | + <div class="card"> |
| 30 | + <div class="card-title"> |
| 31 | + {{ t('parameter.question_count_settings') }} |
| 32 | + </div> |
| 33 | + <div class="card-item"> |
| 34 | + <div class="label"> |
| 35 | + {{ t('parameter.model_thinking_process') }} |
| 36 | + |
| 37 | + <el-tooltip effect="dark" :content="t('parameter.closed_by_default')" placement="top"> |
| 38 | + <el-icon size="16"> |
| 39 | + <icon_info_outlined_1></icon_info_outlined_1> |
| 40 | + </el-icon> |
| 41 | + </el-tooltip> |
| 42 | + </div> |
| 43 | + <div class="value"> |
| 44 | + <el-switch v-model="chatSetting.modelThinkingProcess" /> |
| 45 | + </div> |
| 46 | + </div> |
| 47 | + |
| 48 | + <div class="card-item" style="margin-left: 16px"> |
| 49 | + <div class="label"> |
| 50 | + {{ t('parameter.rows_of_data') }} |
| 51 | + <el-tooltip |
| 52 | + effect="dark" |
| 53 | + :content="t('parameter.excessive_data_volume')" |
| 54 | + placement="top" |
| 55 | + > |
| 56 | + <el-icon size="16"> |
| 57 | + <icon_info_outlined_1></icon_info_outlined_1> |
| 58 | + </el-icon> |
| 59 | + </el-tooltip> |
| 60 | + </div> |
| 61 | + <div class="value"> |
| 62 | + <el-switch v-model="chatSetting.rows_of_data" /> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | + |
| 67 | + <div class="card"> |
| 68 | + <div class="card-title"> |
| 69 | + {{ t('parameter.third_party_platform_settings') }} |
| 70 | + </div> |
| 71 | + <div class="card-item" style="width: 100%"> |
| 72 | + <div class="label"> |
| 73 | + {{ t('parameter.by_third_party_platform') }} |
| 74 | + </div> |
| 75 | + <div class="value"> |
| 76 | + <el-switch v-model="platform.modelThinkingProcess" /> |
| 77 | + </div> |
| 78 | + </div> |
| 79 | + <div class="card-item"> |
| 80 | + <div class="label"> |
| 81 | + {{ t('parameter.platform_user_organization') }} |
| 82 | + <span class="require"></span> |
| 83 | + <el-tooltip |
| 84 | + effect="dark" |
| 85 | + :content="t('parameter.and_platform_integration')" |
| 86 | + placement="top" |
| 87 | + > |
| 88 | + <el-icon size="16"> |
| 89 | + <icon_info_outlined_1></icon_info_outlined_1> |
| 90 | + </el-icon> |
| 91 | + </el-tooltip> |
| 92 | + </div> |
| 93 | + <div class="value"> |
| 94 | + <el-select filterable v-model="platform.organization"> |
| 95 | + <el-option |
| 96 | + v-for="item in organizations" |
| 97 | + :key="item.value" |
| 98 | + :label="item.label" |
| 99 | + :value="item.value" |
| 100 | + /> |
| 101 | + </el-select> |
| 102 | + </div> |
| 103 | + </div> |
| 104 | + <div class="card-item" style="margin-left: 16px"> |
| 105 | + <div class="label"> |
| 106 | + {{ t('parameter.platform_user_roles') }} |
| 107 | + <span class="require"></span> |
| 108 | + <el-tooltip |
| 109 | + effect="dark" |
| 110 | + :content="t('parameter.and_platform_integration')" |
| 111 | + placement="top" |
| 112 | + > |
| 113 | + <el-icon size="16"> |
| 114 | + <icon_info_outlined_1></icon_info_outlined_1> |
| 115 | + </el-icon> |
| 116 | + </el-tooltip> |
| 117 | + </div> |
| 118 | + <div class="value"> |
| 119 | + <el-select multiple filterable v-model="platform.roles"> |
| 120 | + <el-option |
| 121 | + v-for="item in roles" |
| 122 | + :key="item.value" |
| 123 | + :label="item.label" |
| 124 | + :value="item.value" |
| 125 | + /> |
| 126 | + </el-select> |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + </div> |
| 131 | + <div class="save" style="margin-top: 16px"> |
| 132 | + <el-button type="primary">{{ t('common.save') }}</el-button> |
| 133 | + </div> |
| 134 | + </div> |
| 135 | +</template> |
| 136 | + |
| 137 | +<style lang="less" scoped> |
| 138 | +.parameter { |
| 139 | + .title { |
| 140 | + font-weight: 500; |
| 141 | + font-style: Medium; |
| 142 | + font-size: 20px; |
| 143 | + line-height: 28px; |
| 144 | + margin-bottom: 16px; |
| 145 | + } |
| 146 | + .card-container { |
| 147 | + .card { |
| 148 | + width: 100%; |
| 149 | + border-radius: 12px; |
| 150 | + padding: 16px; |
| 151 | + border: 1px solid #dee0e3; |
| 152 | + display: flex; |
| 153 | + flex-wrap: wrap; |
| 154 | + margin-top: 16px; |
| 155 | + .card-title { |
| 156 | + font-weight: 500; |
| 157 | + font-style: Medium; |
| 158 | + font-size: 16px; |
| 159 | + line-height: 24px; |
| 160 | + width: 100%; |
| 161 | + } |
| 162 | + .card-item { |
| 163 | + margin-top: 16px; |
| 164 | + width: calc(50% - 8px); |
| 165 | + .label { |
| 166 | + font-weight: 400; |
| 167 | + font-size: 14px; |
| 168 | + line-height: 22px; |
| 169 | + display: flex; |
| 170 | + align-items: center; |
| 171 | +
|
| 172 | + .ed-icon { |
| 173 | + margin-left: 4px; |
| 174 | + } |
| 175 | +
|
| 176 | + .require::after { |
| 177 | + content: '*'; |
| 178 | + color: var(--ed-color-danger); |
| 179 | + margin-left: 4px; |
| 180 | + } |
| 181 | + } |
| 182 | +
|
| 183 | + .value { |
| 184 | + margin-top: 8px; |
| 185 | + line-height: 20px; |
| 186 | + } |
| 187 | + } |
| 188 | + } |
| 189 | + } |
| 190 | +} |
| 191 | +</style> |
0 commit comments