|
@@ -14,14 +14,113 @@
|
|
|
</div>
|
|
|
<div class="bm-main-box mt-4">
|
|
|
<div class="grid h-full w-full grid-cols-3 gap-4">
|
|
|
- <div class="col-span-2 flex rounded-lg bg-[#F6F8FC] p-4">
|
|
|
+ <div class="col-span-2 flex flex-col gap-2 rounded-lg bg-[#F6F8FC] p-4">
|
|
|
<div
|
|
|
class="flex h-14 w-full items-center gap-2.5 rounded-lg bg-[#ffffff] px-6"
|
|
|
>
|
|
|
- <div class="text-2xl text-[#303133]">编排</div>
|
|
|
+ <div class="text-2xl font-bold text-[#303133]">编排</div>
|
|
|
<div>自动保存14:55:00</div>
|
|
|
+ <div class="mx-auto" />
|
|
|
+ <div class="flex items-center text-[#FF5454]">
|
|
|
+ <SvgIcon name="czr_tip" color="#FF5454" class="mr-1" />
|
|
|
+ 有未发布的修改
|
|
|
+ </div>
|
|
|
+ <CzrButton type="primary" title="发布" />
|
|
|
+ <el-popover
|
|
|
+ :show-arrow="false"
|
|
|
+ :width="180"
|
|
|
+ :popper-style="{
|
|
|
+ padding: 10,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <div
|
|
|
+ class="__hover flex h-8 w-8 items-center justify-center rounded-sm border-1 border-[var(--czr-main-color)]"
|
|
|
+ >
|
|
|
+ <SvgIcon name="history" :active="true" size="16" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div>
|
|
|
+ <div class="text-xl">历史版本</div>
|
|
|
+ <div
|
|
|
+ class="mt-4 flex max-h-[200px] flex-col gap-2 overflow-y-auto"
|
|
|
+ >
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ <div>2023-08-24 22:33:44</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
</div>
|
|
|
- <div class="flex-1"></div>
|
|
|
+ <CzrForm class="form">
|
|
|
+ <div class="grid flex-1 grid-cols-2 gap-4">
|
|
|
+ <div class="col-span-1 flex flex-col rounded-lg bg-[#ffffff]">
|
|
|
+ <div
|
|
|
+ class="flex h-12 w-full items-center gap-2.5 bg-[url('@/assets/images/knowledge/knowledge-back-test.png')] bg-[length:100%_100%] bg-no-repeat px-6"
|
|
|
+ >
|
|
|
+ <div class="mr-auto font-bold text-[#303133]">提示词</div>
|
|
|
+ <CzrButton type="normal" title="保存为模板" />
|
|
|
+ <CzrButton type="normal" title="使用模板" />
|
|
|
+ </div>
|
|
|
+ <div class="flex-1 p-4">
|
|
|
+ <textarea
|
|
|
+ class="h-full w-full resize-none"
|
|
|
+ ref="ref_textarea"
|
|
|
+ v-model="state.form.tips"
|
|
|
+ ></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="col-span-1 flex flex-col overflow-y-auto rounded-lg bg-[#ffffff] p-4"
|
|
|
+ >
|
|
|
+ <div class="__czr-title_2">模型选择</div>
|
|
|
+ <div class="mt-4">
|
|
|
+ <CzrFormColumn
|
|
|
+ class="__czr-table-form-column"
|
|
|
+ required
|
|
|
+ label="模型选择"
|
|
|
+ :span="24"
|
|
|
+ v-model:param="state.form.model"
|
|
|
+ link="select"
|
|
|
+ :options="[]"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="__czr-title_2 mt-4">
|
|
|
+ 组件
|
|
|
+ <CzrButton type="normal" title="新增" class="ml-auto" />
|
|
|
+ </div>
|
|
|
+ <template v-if="state.form.components.length > 0"> </template>
|
|
|
+ <template v-else>
|
|
|
+ <div
|
|
|
+ class="mt-2 flex h-8 items-center justify-center rounded-sm bg-[#F6F8FC] text-xs text-[#A7ADB9]"
|
|
|
+ >
|
|
|
+ 暂未添加组件
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="__czr-title_2 mt-4">
|
|
|
+ 知识库
|
|
|
+ <CzrButton type="normal" title="新增" class="ml-auto" />
|
|
|
+ </div>
|
|
|
+ <template v-if="state.form.knowledges.length > 0"> </template>
|
|
|
+ <template v-else>
|
|
|
+ <div
|
|
|
+ class="mt-2 flex h-8 items-center justify-center rounded-sm bg-[#F6F8FC] text-xs text-[#A7ADB9]"
|
|
|
+ >
|
|
|
+ 暂未添加知识库
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </CzrForm>
|
|
|
</div>
|
|
|
<div class="col-span-1 rounded-lg bg-[#F6F8FC] p-4">1</div>
|
|
|
</div>
|
|
@@ -43,6 +142,7 @@ import { useRoute, useRouter } from 'vue-router'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
import { useDictionaryStore } from '@/stores'
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
+import CzrForm from '@/components/czr-ui/CzrForm.vue'
|
|
|
|
|
|
const DictionaryStore = useDictionaryStore()
|
|
|
const route = useRoute()
|
|
@@ -52,6 +152,12 @@ const props = defineProps({})
|
|
|
const { proxy }: any = getCurrentInstance()
|
|
|
const state: any = reactive({
|
|
|
ID: route.params.id,
|
|
|
+ form: {
|
|
|
+ tips: '',
|
|
|
+ model: '',
|
|
|
+ components: [],
|
|
|
+ knowledges: [],
|
|
|
+ },
|
|
|
})
|
|
|
const initDetail = () => {
|
|
|
if (state.ID) {
|
|
@@ -82,4 +188,16 @@ const initDictionary = () => {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+:deep(.form) {
|
|
|
+ flex: 1;
|
|
|
+ .el-form {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ .el-row {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|