| | |
| | | item.Name.substring(0, 15) + '...' : item.Name }}</h2> |
| | | </Poptip> |
| | | </div> |
| | | <Poptip :content="item.Description" placement="top" trigger="hover" word-wrap width="300"> |
| | | <div>{{ item.Description.length > 15 ? |
| | | item.Description.substring(0, 15) + '...' : item.Description }}</div> |
| | | <Poptip :content="item.Description" placement="top" word-wrap width="300"> |
| | | <div>{{ item.Description.length > 25 ? |
| | | item.Description.substring(0, 25) + '...' : item.Description }}</div> |
| | | </Poptip> |
| | | <div> |
| | | <Tooltip content="删除" class="tableActionMargin" theme="light"> |
| | |
| | | style="float: right;position: relative; top: -50px;" /> |
| | | </div> |
| | | <Modal v-model="addAI" draggable footer-hide :mask-closable="false" class-name="vertical-center-modal" |
| | | width="600"> |
| | | <p slot="header"> |
| | | |
| | | width="600" scrollable :styles="{ height: '80vh', overflowY: 'auto', overflowX: 'hidden' }"> |
| | | <!-- <p slot="header"> |
| | | <Icon type="md-add" style="margin-right: 10px;" /> |
| | | <span>创建AI智能体</span> |
| | | </p> |
| | | </p> --> |
| | | <!-- 固定头部 --> |
| | | <div style="position: sticky; top: 0; background: white; z-index: 1000; display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #e8eaec;"> |
| | | <p slot="header"> |
| | | <Icon type="md-add" style="margin-right: 10px;" /> |
| | | <span>创建AI智能体</span> |
| | | </p> |
| | | <Icon type="md-close" @click="addAI = false" style="cursor: pointer;" size="20"/> |
| | | </div> |
| | | |
| | | <div style="margin: 20px auto;text-align: center;"> |
| | | <label for="file"> |
| | | <div class="imgShow"> |
| | | <img :src="defaultImg" alt="" /> |
| | | <img :src="defaultImg" alt="" title="点击可上传图片替换头像" /> |
| | | </div> |
| | | </label> |
| | | <input type="file" id="file" accept="image/*" @change="getPicture($event)" style="display: none" /> |
| | |
| | | </div> |
| | | |
| | | <div style="margin-top: 10px;font-weight: 600;">名称(必填)</div> |
| | | <Input v-model="formItem.Name" placeholder="请输入名称" /> |
| | | <Input style="width: 99%;" v-model="formItem.Name" placeholder="请输入名称" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">智能体类型(必填)</div> |
| | | <Select v-model="formItem.AgentType" filterable default-label="请选择智能体类型"> |
| | | <Select style="width: 99%;" v-model="formItem.AgentType" filterable default-label="请选择智能体类型"> |
| | | <Option v-for="(option, index) in typeList" :value="option.value" :key="index">{{ option.label }} |
| | | </Option> |
| | | </Select> |
| | | <div style="margin-top: 10px;font-weight: 600;">描述(必填)</div> |
| | | <Input v-model="formItem.Description" type="textarea" ref="textarea" :rows="4" maxlength="100" |
| | | show-word-limit placeholder="请输入智能体描述" /> |
| | | <Input style="width: 99%;" v-model="formItem.Description" type="textarea" ref="textarea" :rows="4" |
| | | placeholder="请输入智能体描述" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">提示词(必填)</div> |
| | | <Input v-model="formItem.Prompt" type="textarea" ref="textarea" :rows="4" |
| | | <Input style="width: 99%;" v-model="formItem.Prompt" type="textarea" ref="textarea" :rows="4" |
| | | placeholder="示例:你是一位经验丰富的英语老师,拥有激发学生学习热情的教学方法。你善于运用幽默和实际应用案例,使对话充满趣味。" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">模型API(非必填)</div> |
| | | <Input v-model="formItem.ModelApi" placeholder="请输入模型API(非必填)" /> |
| | | <Input style="width: 99%;" v-model="formItem.ModelApi" placeholder="请输入模型API(非必填)" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">模型KEY(非必填)</div> |
| | | <Input v-model="formItem.ModelKey" placeholder="请输入模型KEY(非必填)" /> |
| | | <Input style="width: 99%;" v-model="formItem.ModelKey" placeholder="请输入模型KEY(非必填)" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">系统路由(非必填)</div> |
| | | <Input v-model="formItem.SystemRouting" placeholder="系统路由(非必填)" /> |
| | | <Input style="width: 99%;" v-model="formItem.SystemRouting" placeholder="系统路由(非必填)" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">权限设置</div> |
| | | <Select v-model="formItem.Permission" filterable default-label="公开 · 所有人可对话"> |
| | | <Select style="width: 99%;" v-model="formItem.Permission" filterable default-label="公开 · 所有人可对话"> |
| | | <Option v-for="(option, index) in options" :value="option.value" :key="index">{{ option.label }} |
| | | </Option> |
| | | </Select> |
| | | <div class="clearfix" style="width: 200px;margin:20px auto 0px;"> |
| | | <Button size="large" style="float: left;" type="primary" @click="handleSubmit">创建 |
| | | </Button> |
| | | <Button size="large" style="float: right;" type="error" @click="addAI = false">取消 |
| | | </Button> |
| | | <!-- 固定底部 --> |
| | | <div class="modal-footer"> |
| | | <div class="clearfix" style="width: 200px;margin:20px auto 0px;"> |
| | | <Button size="large" style="float: left;" type="primary" @click="handleSubmit">创建 |
| | | </Button> |
| | | <Button size="large" style="float: right;" type="error" @click="addAI = false">取消 |
| | | </Button> |
| | | </div> |
| | | </div> |
| | | </Modal> |
| | | <Modal v-model="editAI" draggable footer-hide :mask-closable="false" class-name="vertical-center-modal" |
| | | width="600"> |
| | | <p slot="header"> |
| | | width="600" scrollable :styles="{ height: '80vh', overflowY: 'auto', overflowX: 'hidden' }"> |
| | | <!-- <p slot="header"> |
| | | <Icon custom="custom custom-bianji" style="margin-right: 10px;" /> |
| | | <span>编辑AI智能体</span> |
| | | </p> |
| | | |
| | | </p> --> |
| | | <div style="position: sticky; top: 0; background: white; z-index: 1000; display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #e8eaec;"> |
| | | <p slot="header"> |
| | | <Icon custom="custom custom-bianji" style="margin-right: 10px;" /> |
| | | <span>编辑AI智能体</span> |
| | | </p> |
| | | <Icon type="md-close" @click="editAI = false" style="cursor: pointer;" size="20"/> |
| | | </div> |
| | | <div style="margin: 20px auto;text-align: center;"> |
| | | <label for="file"> |
| | | <div class="imgShow"> |
| | | <img :src="defaultImg" alt="" /> |
| | | <img :src="defaultImg" alt="" title="点击可上传图片替换头像" /> |
| | | </div> |
| | | </label> |
| | | <input type="file" id="file" accept="image/*" @change="getPicture($event)" style="display: none" /> |
| | |
| | | </div> |
| | | |
| | | <div style="margin-top: 10px;font-weight: 600;">名称(必填)</div> |
| | | <Input v-model="formItem.Name" placeholder="请输入名称" /> |
| | | <Input style="width: 99%;" v-model="formItem.Name" placeholder="请输入名称" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">智能体类型(必填)</div> |
| | | <Select v-model="formItem.AgentType" filterable default-label="请选择智能体类型"> |
| | | <Select style="width: 99%;" v-model="formItem.AgentType" filterable default-label="请选择智能体类型"> |
| | | <Option v-for="(option, index) in typeList" :value="option.value" :key="index">{{ option.label }} |
| | | </Option> |
| | | </Select> |
| | | <div style="margin-top: 10px;font-weight: 600;">描述(必填)</div> |
| | | <Input v-model="formItem.Description" type="textarea" ref="textarea" :rows="4" maxlength="100" |
| | | show-word-limit placeholder="请输入智能体描述" /> |
| | | <Input style="width: 99%;" v-model="formItem.Description" type="textarea" ref="textarea" :rows="4" |
| | | placeholder="请输入智能体描述" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">提示词(必填)</div> |
| | | <Input v-model="formItem.Prompt" type="textarea" ref="textarea" :rows="4" |
| | | <Input style="width: 99%;" v-model="formItem.Prompt" type="textarea" ref="textarea" :rows="4" |
| | | placeholder="示例:你是一位经验丰富的英语老师,拥有激发学生学习热情的教学方法。你善于运用幽默和实际应用案例,使对话充满趣味。" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">模型API(非必填)</div> |
| | | <Input v-model="formItem.ModelApi" placeholder="请输入模型API(非必填)" /> |
| | | <Input style="width: 99%;" v-model="formItem.ModelApi" placeholder="请输入模型API(非必填)" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">模型KEY(非必填)</div> |
| | | <Input v-model="formItem.ModelKey" placeholder="请输入模型KEY(非必填)" /> |
| | | <Input style="width: 99%;" v-model="formItem.ModelKey" placeholder="请输入模型KEY(非必填)" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">系统路由(非必填)</div> |
| | | <Input v-model="formItem.SystemRouting" placeholder="系统路由(非必填)" /> |
| | | <Input style="width: 99%;" v-model="formItem.SystemRouting" placeholder="系统路由(非必填)" /> |
| | | <div style="margin-top: 10px;font-weight: 600;">权限设置</div> |
| | | <Select v-model="formItem.Permission" filterable default-label="公开 · 所有人可对话"> |
| | | <Select style="width: 99%;" v-model="formItem.Permission" filterable default-label="公开 · 所有人可对话"> |
| | | <Option v-for="(option, index) in options" :value="option.value" :key="index">{{ option.label }} |
| | | </Option> |
| | | </Select> |
| | | <div class="clearfix" style="width: 200px;margin:20px auto 0px;"> |
| | | <Button size="large" style="float: left;" type="primary" @click="handleEdit">编辑 |
| | | </Button> |
| | | <Button size="large" style="float: right;" type="error" @click="editAI = false">取消 |
| | | </Button> |
| | | <!-- 固定底部 --> |
| | | <div class="modal-footer"> |
| | | <div class="clearfix" style="width: 200px;margin:20px auto 0px;"> |
| | | <Button size="large" style="float: left;" type="primary" @click="handleEdit">编辑 |
| | | </Button> |
| | | <Button size="large" style="float: right;" type="error" @click="editAI = false">取消 |
| | | </Button> |
| | | </div> |
| | | </div> |
| | | </Modal> |
| | | </div> |
| | |
| | | margin: 10px 0; |
| | | position: relative; |
| | | left: calc(50% - 40px); |
| | | cursor: pointer; |
| | | /* 鼠标手型 */ |
| | | |
| | | img { |
| | | width: 80px; |
| | |
| | | /* textarea.ivu-input{ |
| | | min-height: 200px !important; |
| | | } */ |
| | | |
| | | |
| | | .modal-footer { |
| | | position: sticky; |
| | | bottom: 0; |
| | | background: white; |
| | | z-index: 1; |
| | | padding: 16px; |
| | | border-top: 1px solid #e8eaec; |
| | | } |
| | | |
| | | .ivu-input-type-textarea .ivu-input { |
| | | min-height: 200px !important; |
| | | } |
| | | |
| | | .vertical-center-modal .ivu-modal { |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: center !important; |
| | | } |
| | | |
| | | .vertical-center-modal .ivu-modal-content { |
| | | max-height: 80vh !important; |
| | | /* 限制模态框高度 */ |
| | | overflow-y: auto !important; |
| | | /* 启用内部滚动条 */ |
| | | } |
| | | |
| | | .modal-content { |
| | | padding: 16px !important; |
| | | /* 可选:添加内边距 */ |
| | | } |
| | | |
| | | /* .modal-content { |
| | | height: 80vh !important; |
| | | overflow: auto !important; |
| | | } */ |
| | | </style> |