<script>
export default {
  name: "webConfig",
  model: {
    prop: "form",
    event: "input"
  },
  props: {
    form: Object,
    title: String
  },
  watch: {
    form: {
      handler() {
        this.$emit("input", this.form)
      },
      deep: true
    }
  }
}
</script>

<template>
  <ai-card :title="title" class="webConfig">
    <template #right>
      <ai-dialog-btn text="设置系统信息" dialogTitle="系统信息">
        <el-form size="small" label-width="140px">
          <el-form-item label="系统标题">
            <el-input v-model="form.sysInfo.fullTitle" placeholder="请输入..." clearable/>
          </el-form-item>
          <el-form-item label="favicon">
            <el-input v-model="form.sysInfo.favicon" placeholder="请输入..." clearable/>
          </el-form-item>
          <el-form-item label="logo">
            <el-row type="flex">
              <el-input v-model="form.sysInfo.logo" placeholder="请输入..." clearable/>
              <el-input class="mar-l10" v-model="form.sysInfo.logoText" placeholder="logo文字">
                <template #prepend>logo文字</template>
              </el-input>
            </el-row>
          </el-form-item>
          <el-form-item label="登录页">
            <el-row type="flex" class="mar-b10">
              <el-input v-model="form.sysInfo.loginLogo" placeholder="登录页左上角logo,带/代表图片" clearable>
                <template #prepend>左页首logo</template>
              </el-input>
              <el-input class="mar-l10" v-model="form.sysInfo.loginLogoText" placeholder="logo文字" clearable>
                <template #prepend>logo文字</template>
              </el-input>
            </el-row>
            <el-row type="flex">
              <el-input v-model="form.sysInfo.name" placeholder="左上角标题" clearable>
                <template #prepend>左上角标题</template>
              </el-input>
              <el-input class="mar-l10" v-model="form.sysInfo.title" placeholder="左上角副标题" clearable>
                <template #prepend>左上角副标题</template>
              </el-input>
            </el-row>
            <el-input class="mar-t10" type="textarea" rows="5" v-model="form.sysInfo.desc" placeholder="副标题" clearable/>
          </el-form-item>
          <el-row type="flex">
            <div class="fill">
              <el-form-item label="版权所有">
                <el-input v-model="form.sysInfo.recordDesc" placeholder="请输入..." clearable/>
              </el-form-item>
              <el-form-item label="备案号">
                <el-input v-model="form.sysInfo.recordNo" placeholder="请输入..." clearable/>
              </el-form-item>
            </div>
            <div class="fill">
              <el-form-item label="框架版本">
                <!--edition ：版本，标准版：standard、上架版：saas 简易版(不带扫码):simple -->
                <el-input v-model="form.sysInfo.edition" placeholder="请输入..." clearable/>
              </el-form-item>
              <el-form-item label="备案跳转链接">
                <el-input v-model="form.sysInfo.recordURL" placeholder="请输入..." clearable/>
              </el-form-item>
            </div>
          </el-row>
          <el-form-item label="可信证书">
            <el-input type="textarea" v-model="form.sysInfo.ssl" placeholder="请输入可信证书的html代码" clearable rows="5"/>
          </el-form-item>
        </el-form>
      </ai-dialog-btn>
    </template>
    <template #content>
      <el-form-item label="头部导航工具栏" class="row">
        <el-checkbox v-model="form.downloadCenter">下载中心</el-checkbox>
        <el-checkbox v-model="form.dv">数据大屏</el-checkbox>
        <el-checkbox v-model="form.showTool">显示/隐藏导航栏</el-checkbox>
        <el-checkbox v-model="form.helpDoc">帮助文档</el-checkbox>
        <el-checkbox v-model="form.customerService">智能客服</el-checkbox>
        <el-checkbox v-model="form.appQRCode">手机APP</el-checkbox>
      </el-form-item>
      <el-form-item label="接口是否单服务">
        <el-checkbox v-model="form.isSingleService"/>
      </el-form-item>
      <el-form-item label="域名根目录">
        <el-input v-model="form.base" clearable placeholder="填写域名根目录(baseURL)"/>
      </el-form-item>
      <el-form-item label="默认首页">
        <el-input v-model="form.homePage" clearable placeholder="填写应用的文件名"/>
      </el-form-item>
      <el-form-item label="开启百度流量">
        <el-checkbox v-model="form.hmt"/>
      </el-form-item>
      <el-form-item label="是否加载AI助手">
        <el-checkbox v-model="form.copilot"/>
      </el-form-item>
    </template>
  </ai-card>
</template>

<style scoped lang="scss">
.webConfig {
}
</style>
