浏览代码

更新应用样式

yangg 8 月之前
父节点
当前提交
f31c62552f

文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/app.d8b611a0.css


+ 0 - 0
dist/static/css/chunk-050dfb95.775a21e3.css → dist/static/css/chunk-1b51a790.775a21e3.css


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.a650e026.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.c7f991bb.js


文件差异内容过多而无法显示
+ 1 - 1
dist/static/js/chunk-1b51a790.a99e6d71.js


+ 2 - 1
src/components/webAi/css/ChatBox.css

@@ -483,4 +483,5 @@ textarea {
   overflow: hidden;
   text-overflow: ellipsis;
   margin-right: 5px; /* Add some spacing between spans */
-}
+}
+

+ 35 - 23
src/components/webAi/index.vue

@@ -23,6 +23,7 @@
             <el-col :span="12">
               <el-form-item label="应用名称:" prop="chat_name">
                 <el-input
+                  style="width: 55%;"
                   v-model="AIform.chat_name"
                   placeholder="请输入应用名称"
                 ></el-input>
@@ -33,7 +34,7 @@
                 <el-select
                   v-model="AIform.application_type"
                   placeholder="应用类型"
-                  style="width: 100%"
+                  style="width: 55%"
                   clearable
                 >
                   <el-option
@@ -50,9 +51,10 @@
             <el-col :span="12">
               <el-form-item label="模型名称:" prop="model_name">
                 <el-select
+                
                   v-model="AIform.model_name"
                   placeholder="请输入选择"
-                  style="width: 100%"
+                 style="width: 55%"
                   clearable
                 >
                   <el-option
@@ -70,7 +72,7 @@
                   v-model="AIform.knowledge_base_names"
                   multiple
                   placeholder="请选择知识库"
-                  style="width: 100%"
+                 style="width: 55%"
                   @change="handleKnowledgeBaseChange"
                   clearable
                   filterable
@@ -90,7 +92,7 @@
                 <el-select
                   v-model="AIform.document_directories"
                   placeholder="请选择文档目录"
-                  style="width: 100%"
+                  style="width: 55%"
                   :disabled="!AIform.knowledge_base_names.length"
                   @change="handleDirectoryChange"
                   clearable
@@ -110,7 +112,7 @@
                   v-model="AIform.documents"
                   multiple
                   placeholder="请选择文档"
-                  style="width: 100%"
+                 style="width: 55%"
                   :disabled="isDocumentSelectDisabled"
                   clearable
                   filterable
@@ -129,6 +131,7 @@
             <el-col :span="12">
               <el-form-item label="描 述:">
                 <el-input
+                style="width: 55%"
                   v-model="AIform.role_description"
                   placeholder="请输入描述"
                   type="textarea"
@@ -245,6 +248,7 @@
             <el-col :span="12">
               <el-form-item label="响应格式:" prop="response_format">
                 <el-input
+                  style="width: 55%"
                   v-model="AIform.response_format"
                   placeholder="text"
                 ></el-input>
@@ -276,6 +280,7 @@
             <el-col :span="12">
               <el-form-item label="会话ID:" prop="session_id">
                 <el-input
+                style="width: 55%"
                   v-model="AIform.session_id"
                   placeholder="可选"
                 ></el-input>
@@ -286,7 +291,7 @@
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="语言:" prop="language">
-                <el-select v-model="AIform.language" style="width: 100%">
+                <el-select v-model="AIform.language" style="width: 55%">
                   <el-option label="中文" value="zh"></el-option>
                   <el-option label="English" value="en"></el-option>
                   <el-option label="日本語" value="ja"></el-option>
@@ -312,18 +317,17 @@
             <el-col :span="12">
               <el-form-item label="角色名称:" prop="role_name">
                 <el-input
+                style="width: 55%"
                   v-model="AIform.role_name"
                   placeholder="例如: 客服专员"
                 ></el-input>
                 <div class="hint">为AI助手设定一个角色名称</div>
               </el-form-item>
             </el-col>
-          </el-row>
-
-          <el-row :gutter="24">
-            <el-col :span="24">
+             <el-col :span="12">
               <el-form-item label="角色描述:" prop="role_description">
                 <el-input
+                style="width: 55%"
                   v-model="AIform.role_description"
                   type="textarea"
                   :rows="3"
@@ -338,6 +342,7 @@
             <el-col :span="12">
               <el-form-item label="角色权限:" prop="role_permissions">
                 <el-input
+                style="width: 55%"
                   v-model="AIform.role_permissions"
                   placeholder='["回答产品问题", "处理退换货请求", "升级复杂问题"]'
                 ></el-input>
@@ -347,6 +352,7 @@
             <el-col :span="12">
               <el-form-item label="自定义变量:" prop="custom_variables">
                 <el-input
+                style="width: 55%"
                   v-model="AIform.custom_variables"
                   placeholder='{"custom_greeting": "很高兴为您服务!", "company_name": "ABC公司"}'
                 ></el-input>
@@ -358,9 +364,10 @@
           </el-row>
 
           <el-row :gutter="24">
-            <el-col :span="24">
+            <el-col :span="12">
               <el-form-item label="自定义提示模板:" prop="custom_prompt">
                 <el-input
+                style="width: 60%"
                   v-model="AIform.custom_prompt"
                   type="textarea"
                   :rows="6"
@@ -575,6 +582,7 @@
           <el-col :span="12">
             <el-form-item label="应用名称:" prop="chat_name">
               <el-input
+               style="width: 55%"
                 v-model="editForm.chat_name"
                 placeholder="请输入应用名称"
               ></el-input>
@@ -594,7 +602,7 @@
               <el-select
                 v-model="editForm.application_type"
                 placeholder="应用类型"
-                style="width: 100%"
+                 style="width: 55%"
                 clearable
               >
                 <el-option
@@ -613,7 +621,7 @@
               <el-select
                 v-model="editForm.model_name"
                 placeholder="请输入选择"
-                style="width: 100%"
+                 style="width: 55%"
                 clearable
               >
                 <el-option
@@ -640,7 +648,7 @@
                 v-model="editForm.knowledge_base_names"
                 multiple
                 placeholder="请选择知识库"
-                style="width: 100%"
+                 style="width: 55%"
                 @change="handleEditKnowledgeBaseChange"
                 clearable
                 filterable
@@ -661,7 +669,7 @@
               <el-select
                 v-model="editForm.document_directories"
                 placeholder="请选择文档目录"
-                style="width: 100%"
+                 style="width: 55%"
                 :disabled="
                   !(
                     editForm.knowledge_base_names &&
@@ -687,7 +695,7 @@
                 v-model="editForm.documents"
                 multiple
                 placeholder="请选择文档"
-                style="width: 100%"
+                 style="width: 55%"
                 :disabled="editForm.document_directories == ''"
                 clearable
                 filterable
@@ -706,6 +714,7 @@
           <el-col :span="12">
             <el-form-item label="描 述:">
               <el-input
+               style="width: 55%"
                 v-model="editForm.role_description"
                 placeholder="请输入描述"
                 type="textarea"
@@ -822,6 +831,7 @@
             <el-col :span="12">
               <el-form-item label="响应格式:" prop="response_format">
                 <el-input
+                 style="width: 55%"
                   v-model="editForm.response_format"
                   placeholder="text"
                 ></el-input>
@@ -853,6 +863,7 @@
             <el-col :span="12">
               <el-form-item label="会话ID:" prop="session_id">
                 <el-input
+                 style="width: 55%"
                   v-model="editForm.session_id"
                   placeholder="可选"
                 ></el-input>
@@ -863,7 +874,7 @@
         <el-row :gutter="24">
           <el-col :span="12">
             <el-form-item label="语言:" prop="language">
-              <el-select v-model="editForm.language" style="width: 100%">
+              <el-select v-model="editForm.language"  style="width: 55%">
                 <el-option label="中文" value="zh"></el-option>
                 <el-option label="English" value="en"></el-option>
                 <el-option label="日本語" value="ja"></el-option>
@@ -889,18 +900,17 @@
           <el-col :span="12">
             <el-form-item label="角色名称:" prop="role_name">
               <el-input
+               style="width: 55%"
                 v-model="editForm.role_name"
                 placeholder="例如: 客服专员"
               ></el-input>
               <div class="hint">为AI助手设定一个角色名称</div>
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row :gutter="24">
-          <el-col :span="24">
+          <el-col :span="12">
             <el-form-item label="角色描述:" prop="role_description">
               <el-input
+               style="width: 55%"
                 v-model="editForm.role_description"
                 type="textarea"
                 :rows="3"
@@ -910,11 +920,11 @@
             </el-form-item>
           </el-col>
         </el-row>
-
         <el-row :gutter="24">
           <el-col :span="12">
             <el-form-item label="角色权限:" prop="role_permissions">
               <el-input
+               style="width: 55%"
                 v-model="editForm.role_permissions"
                 placeholder='["回答产品问题", "处理退换货请求", "升级复杂问题"]'
               ></el-input>
@@ -924,6 +934,7 @@
           <el-col :span="12">
             <el-form-item label="自定义变量:" prop="custom_variables">
               <el-input
+               style="width: 55%"
                 v-model="editForm.custom_variables"
                 placeholder='{"custom_greeting": "很高兴为您服务!", "company_name": "ABC公司"}'
               ></el-input>
@@ -935,9 +946,10 @@
         </el-row>
 
         <el-row :gutter="24">
-          <el-col :span="24">
+          <el-col :span="12">
             <el-form-item label="自定义提示模板:" prop="custom_prompt">
               <el-input
+               style="width: 60%"
                 v-model="editForm.custom_prompt"
                 type="textarea"
                 :rows="6"

+ 3 - 3
src/components/webAi/js/ChatBox.js

@@ -123,7 +123,7 @@ export default {
         role_name: "Admin",
         role_description: "",
         role_permissions:"['read', 'write', 'delete']",
-        custom_variables:'',
+        custom_variables:"",
         custom_prompt:'',
         application_type: "",
         is_default: false,
@@ -219,7 +219,7 @@ export default {
         role_name: "Admin",
         role_description: "",
         role_permissions: "['read', 'write', 'delete']",
-        custom_variables:'',
+        custom_variables:"",
         custom_prompt:'',
         application_type: "",
         is_default: false,
@@ -335,7 +335,7 @@ export default {
       if (this.editForm.custom_variables) {
         this.editForm.custom_variables = JSON.stringify(this.editForm.custom_variables);     
       } else {
-        this.editForm.custom_variables = {};
+        this.editForm.custom_variables = "";
       }
 
       this.editDialogVisible = true;

部分文件因为文件数量过多而无法显示