Flex
2025-05-30 82506dffa47f7372d7444f8fed45a1062d357e7a
easegen-front/src/views/chooseTemplate/index.vue
@@ -488,6 +488,17 @@
      <div class="template-box template-right" v-if="showTemplateTool">
        <div class="tabs-2"> </div>
        <div class="template-list">
          <div class="tabs-1">
            <div
              class="tabs-item"
              v-for="item in tabs4"
              :key="item.itemValue"
              @click="tabs4Click(item)"
            >
              <div>{{ item.itemName }}</div>
              <span v-if="tabs4ActiveNum == item.itemValue"></span>
            </div>
          </div>
          <div
            class="template-item"
            v-for="(template, index) in templates"
@@ -757,10 +768,25 @@
    itemValue: '2'
  }
]
const tabs4 = [
  {
    itemName: t('我的'),
    itemValue: '2'
  },
  {
    itemName: t('模板库'),
    itemValue: '1'
  }
]
const tabs4ActiveNum = ref('2')
const tabs1Click = (item) => {
  tabs1ActiveNum.value = item.itemValue
  getList()
}
const tabs4Click = (item) => {
  tabs4ActiveNum.value = item.itemValue
  queryParams1.zg=tabs4ActiveNum.value
  getList1()
}
const tabs2Click = (item) => {
@@ -834,8 +860,11 @@
  if (item.name == t('courseCenter.digitalPeople')) {
    tabs1ActiveNum.value = '0'
    getList()
  }else if (item.name == t('courseCenter.template')) {
    tabs4ActiveNum.value = '2'
    queryParams1.zg=tabs4ActiveNum.value
    getList1()
  }
  showHeadImageTool.value = item.name === t('courseCenter.background')
  showTemplateTool.value = item.name === t('courseCenter.template')
  showDigitalHumanTool.value = item.name === t('courseCenter.digitalPeople')
@@ -1193,7 +1222,11 @@
  gender: '',
  posture: ''
})
const queryParams1 = reactive({
  pageNo: 1,
  pageSize: 100,
  zg:''
})
const selectHost = ref(null)
const getList = async () => {
@@ -1854,9 +1887,22 @@
    uploadFileObj.size = pageInfo ? pageInfo.docInfo.fileSize : ''
  }
}
const getList1 = async () => {
  const data = await TemplateApi.getTemplatePage(queryParams1)
  if (data) {
    TEMPLATE_PRESETS.value = data.list.map((item) => ({
      ...item,
      showBackground: item.showBackground === 1,
      showDigitalHuman: item.showDigitalHuman === 1,
      showPpt: item.showPpt === 1
    }))
    templates.value = TEMPLATE_PRESETS.value.map((template) => cloneDeep(template))
    selectTemplate.value = cloneDeep(templates.value[0])
  }
}
onMounted(async () => {
  let data = await TemplateApi.getTemplatePage(queryParams)
  let data = await TemplateApi.getTemplatePage(queryParams1)
  TEMPLATE_PRESETS.value = data.list.map((item) => ({
    ...item,
    showBackground: item.showBackground === 1,
@@ -2171,14 +2217,14 @@
      border-bottom: 1px solid #ebeef5;
      .tabs-item {
        width: 30px;
        width: 50px;
        font-size: 14px;
        text-align: center;
        cursor: pointer;
        span {
          display: block;
          width: 30px;
          width: 50px;
          height: 2px;
          margin-top: 5px;
          background: #409eff;