CzRger 1 週間 前
コミット
c16e044ca6
共有1 個のファイルを変更した54 個の追加1 個の削除を含む
  1. 54 1
      src/views/manage/app/make/index.vue

+ 54 - 1
src/views/manage/app/make/index.vue

@@ -113,7 +113,7 @@
                   <template v-if="state.form.components.length > 0">
                     ({{ state.form.components.length }})
                   </template>
-                  <CzrButton type="normal" title="新增" class="ml-auto" />
+                  <!--                  <CzrButton type="normal" title="新增" class="ml-auto" />-->
                 </div>
                 <template v-if="state.form.components.length > 0"> </template>
                 <template v-else>
@@ -172,6 +172,55 @@
                     暂未添加知识库
                   </div>
                 </template>
+                <div class="__czr-title_2 mt-4">
+                  工作流
+                  <template v-if="state.form.workflows.length > 0">
+                    ({{ state.form.workflows.length }})
+                  </template>
+                  <CzrButton
+                    type="normal"
+                    title="新增"
+                    class="ml-auto"
+                    @click="onAddKnowledge"
+                  />
+                </div>
+                <template v-if="state.form.workflows.length > 0">
+                  <div
+                    class="mt-2 flex max-h-42 flex-col gap-2 overflow-y-auto pr-2"
+                  >
+                    <template v-for="(item, index) in state.form.workflows">
+                      <div class="flex items-center gap-1.5">
+                        <div
+                          class="flex h-10 flex-1 items-center overflow-hidden rounded-sm bg-[#F6F8FC] px-2.5"
+                        >
+                          <img
+                            src="@/assets/images/knowledge/knowledge-item-icon-2.png"
+                            class="mr-4 h-6 w-6"
+                          />
+                          <div
+                            class="flex-1 text-sm font-bold text-[#2E3238]"
+                            v-title
+                          >
+                            {{ item.name }}
+                          </div>
+                        </div>
+                        <SvgIcon
+                          class="__hover"
+                          name="czr_del"
+                          color="var(--czr-error-color)"
+                          @click="state.form.workflows.splice(index, 1)"
+                        />
+                      </div>
+                    </template>
+                  </div>
+                </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">开场白</div>
                 <div class="mt-4">
                   <CzrFormColumn
@@ -540,6 +589,7 @@ const state: any = reactive({
     model: {},
     components: [],
     knowledges: [],
+    workflows: [],
     prologue: '',
     prologueQuestions: [
       { value: '1' },
@@ -770,4 +820,7 @@ const initDictionary = () => {
     }
   }
 }
+.__czr-title_2 {
+  height: 2rem;
+}
 </style>