<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">

      <el-tab-pane label="CID配置" name="cId.config">
        <el-form :model="form40" label-width="200px">
          <el-form-item label="是否开启手机号配置" prop="enablePhoneConfig">
            <el-switch v-model="form40.enablePhoneConfig"></el-switch>
          </el-form-item>

          <template v-if="form40.enablePhoneConfig">
            <el-form-item label="生成条数" prop="generateCount">
              <el-input-number v-model="form40.generateCount" :min="1" :step="1" :precision="0" placeholder="请输入生成条数"></el-input-number>
            </el-form-item>

            <el-form-item label="开始位置" prop="startIndex">
              <el-input-number v-model="form40.startIndex" :min="1" :step="1" :precision="0" placeholder="例如: 1"></el-input-number>
              <span class="tip-text">（从第几位开始生成）</span>
            </el-form-item>

            <el-form-item label="结束位置" prop="endIndex">
              <el-input-number v-model="form40.endIndex" :min="1" :step="1" :precision="0" placeholder="例如: 11"></el-input-number>
              <span class="tip-text">（到第几位结束）</span>
            </el-form-item>
          </template>

          <el-form-item label="是否开手机号拨打次数限制" prop="enablePhoneLimitConfig">
            <el-switch v-model="form40.enablePhoneLimitConfig"></el-switch>
          </el-form-item>
          <template v-if="form40.enablePhoneLimitConfig">
            <el-form-item label="拨打次数限制" prop="startIndex">
              <el-input-number v-model="form40.numberCalls" :min="1" :step="1" :precision="0" placeholder="例如: 1"></el-input-number>
            </el-form-item>
          </template>
           <el-form-item label="DeepSeekChat模型并发数" prop="DeepSeekChatConcurrency">
            <el-input v-model="form40.concurrency" placeholder="请输入DeepSeekChat模型并发数"></el-input>
          </el-form-item>
          <el-form-item label="DeepSeekChat服务地址" prop="DeepSeekChatServerAddress">
            <el-input v-model="form40.serverAddress" placeholder="请输入DeepSeekChat服务地址"></el-input>
          </el-form-item>
          <el-form-item label="DeepSeekChat_apiKey" prop="DeepSeekChatApiKey">
           <el-input v-model="form40.apiKey" placeholder="请输入DeepSeekChat_apiKey"></el-input>
          </el-form-item>
          <el-form-item label="DeepSeekChat模型名称" prop="DeepSeekChatModelName">
            <el-input v-model="form40.modelName" placeholder="请输入DeepSeekChat模型名称"></el-input>
          </el-form-item>
          <el-form-item label="是否限制外呼网关" prop="enableGateWayLimit">
            <el-switch v-model="form40.enableGateWayLimit"></el-switch>
          </el-form-item>
          <el-form-item label="系统可见外呼网关" prop="showGatewayIds" v-if="!!form40.enableGateWayLimit">
            <!-- <el-input v-model="" placeholder="请输入DeepSeekChat模型名称"></el-input> -->
             <el-select v-model="form40.showGatewayIds" multiple filterable placeholder="请选择系统可见外呼网关">
              <el-option
                v-for="item in gatewayList"
                :key="item.id"
                :label="item.gwDesc"
                :value="item.id">
              </el-option>
            </el-select>
          </el-form-item>

          <div class="footer">
            <el-button type="primary" @click="submitForm40">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>

      <el-tab-pane label="个微配置" name="wx.config">
        <el-form :model="form30" label-width="200px">
          <el-form-item  label="新账号判断时间" prop="newAccountTime">
            <el-input v-model="form30.newAccountTime" placeholder="请输入天" style="width: 150px">
              <template slot="append">天</template>
            </el-input>
          </el-form-item>
          <el-form-item  label="新账号每天添加数量" prop="newAccountAddNum">
            <el-input v-model="form30.newAccountAddNum" placeholder="请输入个" style="width: 150px">
              <template slot="append">个</template>
            </el-input>
          </el-form-item>
          <el-form-item  label="普通账号每天添加数量" prop="accountAddNum">
            <el-input v-model="form30.accountAddMin" placeholder="请输入个" style="width: 150px">
              <template slot="append">个</template>
            </el-input>
            <span> 到 </span>
            <el-input v-model="form30.accountAddMax" placeholder="请输入个" style="width: 150px">
              <template slot="append">个</template>
            </el-input>
          </el-form-item>
          <el-form-item  label="文字消息（条/分）" prop="accountAddNum">
            <el-input v-model="form30.txtMsgMinNum" placeholder="请输入条" style="width: 150px">
              <template slot="append">条</template>
            </el-input>
            <span> 到 </span>
            <el-input v-model="form30.txtMsgMaxNum" placeholder="请输入条" style="width: 150px">
              <template slot="append">条</template>
            </el-input>
          </el-form-item>
          <el-form-item  label="图片消息（条/分）" prop="accountAddNum">
            <el-input v-model="form30.imgMsgMinNum" placeholder="请输入条" style="width: 150px">
              <template slot="append">条</template>
            </el-input>
            <span> 到 </span>
            <el-input v-model="form30.imgMsgMaxNum" placeholder="请输入条" style="width: 150px">
              <template slot="append">条</template>
            </el-input>
          </el-form-item>
          <el-form-item  label="新号添加好友频率(条/分)" prop="accountAddNum">
            <el-input v-model="form30.newAccountAddWxMin" placeholder="请输入分" style="width: 150px">
              <template slot="append">分</template>
            </el-input>
            <span> 到 </span>
            <el-input v-model="form30.newAccountAddWxMax" placeholder="请输入分" style="width: 150px">
              <template slot="append">分</template>
            </el-input>
          </el-form-item>
          <el-form-item  label="新号消息发送频率(条/秒)" prop="accountAddNum">
            <el-input v-model="form30.newAccountSendMsgMin" placeholder="请输入秒" style="width: 150px">
              <template slot="append">秒</template>
            </el-input>
            <span> 到 </span>
            <el-input v-model="form30.newAccountSendMsgMax" placeholder="请输入秒" style="width: 150px">
              <template slot="append">秒</template>
            </el-input>
          </el-form-item>
          <el-form-item  label="添加好友频率(条/分)" prop="accountAddNum">
            <el-input v-model="form30.accountAddWxMin" placeholder="请输入分" style="width: 150px">
              <template slot="append">分</template>
            </el-input>
            <span> 到 </span>
            <el-input v-model="form30.accountAddWxMax" placeholder="请输入分" style="width: 150px">
              <template slot="append">分</template>
            </el-input>
          </el-form-item>
          <el-form-item  label="消息发送频率(条/秒)" prop="accountAddNum">
            <el-input v-model="form30.accountSendMsgMin" placeholder="请输入秒" style="width: 150px">
              <template slot="append">秒</template>
            </el-input>
            <span> 到 </span>
            <el-input v-model="form30.accountSendMsgMax" placeholder="请输入秒" style="width: 150px">
              <template slot="append">秒</template>
            </el-input>
          </el-form-item>
          <div class="footer">
            <el-button type="primary" @click="submitForm30">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>
      


      

      <el-tab-pane label="协议配置" name="his.agreementConfig">
        <el-form ref="form3" :model="form3" label-width="150px" :rules="rules4">
          <el-form-item label="医生注册协议" prop="doctorRegister">
            <editor v-model="form3.doctorRegister" :min-height="292"/>
          </el-form-item>
          <el-form-item label="医生多机构备案协议" prop="doctorFiling">
            <editor v-model="form3.doctorFiling" :min-height="292"/>
          </el-form-item>
          <el-form-item label="用户协议" prop="userRegister">
            <editor v-model="form3.userRegister" :min-height="292"/>
          </el-form-item>
          <el-form-item label="隐私协议" prop="userPrivacy">
            <editor v-model="form3.userPrivacy" :min-height="292"/>
          </el-form-item>
          <el-form-item label="健康客服协议" prop="userHealth">
            <editor v-model="form3.userHealth" :min-height="292"/>
          </el-form-item>
          <el-form-item label="会员服务协议" prop="vipService">
            <editor v-model="form3.vipService" :min-height="292"/>
          </el-form-item>
          <el-form-item label="会员自动续费协议" prop="vipAutomaticService">
            <editor v-model="form3.vipAutomaticService" :min-height="292"/>
          </el-form-item>
          <el-form-item label="用户注销协议" prop="vipAutomaticService">
            <editor v-model="form3.userRemoveService" :min-height="292"/>
          </el-form-item>

          <div class="footer">
            <el-button type="primary" @click="submitForm3">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>

      <el-tab-pane label="资质证明" name="his.certs">
        <el-form ref="form4" :model="form4" label-width="150px">
          <el-form-item label="资质证明" prop="certs">
            <Material v-model="photoArr" type="image" :num="10" :width="150" :height="150"/>
          </el-form-item>

          <div class="footer">
            <el-button type="primary" @click="submitForm4">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>
      <el-tab-pane label="品牌介绍" name="his.brand">
        <el-form ref="form16" :model="form16" label-width="150px">
          <el-form-item label="品牌介绍" prop="brandInfo">
            <ImageUpload v-model="form16.brandInfo" type="image" :num="10" :width="150" :height="150"/>
          </el-form-item>

          <div class="footer">
            <el-button type="primary" @click="submitForm16">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>
      <el-tab-pane label="商城配置" name="his.store">
        <el-form ref="form1" :model="form7" label-width="180px">

          <el-form-item label="物流代收支付比例" prop="payRate">
            <el-tooltip class="item" effect="dark" content="物流代收支付比例(%)" placement="top-end">
              <el-input-number v-model="form7.payRate"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="货到付款加收运费(元)" prop="payPostage">
            <el-tooltip class="item" effect="dark" content="货到付款加收运费(元)" placement="top-end">
              <el-input-number v-model="form7.payPostage"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="待支付订单取消时间" prop="unPayTime">
            <el-tooltip class="item" effect="dark" content="待支付订单取消时间(分钟)" placement="top-end">
              <el-input-number v-model="form7.unPayTime" :min="1"></el-input-number>
            </el-tooltip>

          </el-form-item>
          <el-form-item label="公司推广佣金比例" prop="tuiMoneyRate">
            <el-tooltip class="item" effect="dark" content="公司推广佣金比例(%)" placement="top-end">
              <el-input-number v-model="form7.tuiMoneyRate" :min="1" :max="100"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="公司发货扣除成本比例" prop="deductMoneyRate">
            <el-tooltip class="item" effect="dark" content="公司发货扣除成本比例(%)" placement="top-end">
              <el-input-number v-model="form7.deductMoneyRate" :min="1" :max="100"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="申请售后有效天数" prop="storeAfterSalesDay">
            <el-tooltip class="item" effect="dark" content="确认收货后申请售后天数" placement="top-end">
              <el-input-number v-model="form7.storeAfterSalesDay" :min="0" :max="100"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="坐席自动回收天数" prop="storeCall">
            <el-tooltip class="item" effect="dark" content="坐席自动回收天数" placement="top-end">
              <el-input-number v-model="form7.storeCall" :min="0" :max="100"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item  label="最低阈值" prop="minimumThreshold">
            <el-tooltip class="item" effect="dark" content="最低阈值" placement="top-end">
              <el-input-number    v-model="form7.minimumThreshold"  :min="0"  ></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="退货收货人" prop="refundConsignee">
            <el-tooltip class="item" effect="dark" content="退货收货人" placement="top-end">
              <el-input style="width:200px" v-model="form7.refundConsignee"></el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="退货手机号" prop="refundPhoneNumber">
            <el-tooltip class="item" effect="dark" content="退货手机号" placement="top-end">
              <el-input style="width:200px" v-model="form7.refundPhoneNumber"></el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="退货地址" prop="refundAddress">
            <el-tooltip class="item" effect="dark" content="退货地址" placement="top-end">
              <el-input v-model="form7.refundAddress"></el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="随访模板" prop="followTempId">
            <el-select v-model="form7.followTempId" placeholder="请选择模板" clearable size="small">
              <el-option
                v-for="dict in tempOptions"
                :key="dict.dictValue"
                :label="dict.dictLabel"
                :value="dict.dictValue"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="基础疾病随访" prop="oneFollowTempId">
            <el-select v-model="form7.oneFollowTempId" placeholder="请选择模板" clearable size="small">
              <el-option
                v-for="dict in tempOptions"
                :key="dict.dictValue"
                :label="dict.dictLabel"
                :value="dict.dictValue"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="随访频率(天)" prop="followRate">
            <el-tooltip class="item" effect="dark" content="followRate" placement="top-end">
              <el-input-number v-model="form7.followRate" :min="0" :max="1000"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item  label="是否需要根据物流信息更新订单完成状态" prop="isUpdateOrder">
            <el-switch
              v-model="form7.isUpdateOrder"
              active-color="#13ce66"
              inactive-color="#ff4949"
              :active-value=1
              :inactive-value=0
            >
            </el-switch>
          </el-form-item>
          <el-form-item  label="是否开启就诊人身份验证" prop="isIdVerification">
            <el-switch
              v-model="form7.isIdVerification"
              active-color="#13ce66"
              inactive-color="#ff4949"
              :active-value=1
              :inactive-value=0>
            </el-switch>
          </el-form-item>
          <el-form-item label="API_URL" v-if="form7.isIdVerification == 1" prop="API_URL">
              <el-input   v-model="form7.API_URL"  label="请输入API_URL"></el-input>
          </el-form-item>
          <el-form-item label="HASHCODE" v-if="form7.isIdVerification == 1" prop="HASHCODE">
              <el-input   v-model="form7.HASHCODE"  label="请输入HASHCODE"></el-input>
          </el-form-item>
          <el-form-item label="SECRET_KEY" v-if="form7.isIdVerification == 1" prop="SECRET_KEY">
              <el-input   v-model="form7.SECRET_KEY"  label="请输入SECRET_KEY"></el-input>
          </el-form-item>
          <el-form-item label="检查库存" prop="checkStock">
            <el-radio-group v-model="form7.checkStock">
              <el-radio :label="true">开启</el-radio>
              <el-radio :label="false">关闭</el-radio>
            </el-radio-group>
            <el-tooltip class="item" effect="dark" content="开启后，创建订单时会检查商品库存，库存不足时不允许创建订单" placement="top-end">
              <i class="el-icon-question" style="margin-left: 5px; color: #909399;"></i>
            </el-tooltip>
          </el-form-item>
          <div class="footer">
            <el-button type="primary" @click="submitForm7">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>

      <el-tab-pane label="积分比例配置" name="store.integral">
        <el-form ref="form24" :model="form24" :rules="rules3" label-width="160px">
          <el-form-item label="积分抵用比例" prop="integralRatio">
            <el-tooltip class="item" effect="dark" content="1积分抵多少金额" placement="top-end">
              <el-input-number v-model="form24.integralRatio"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="满多少可以抵扣" prop="integralFull">
            <el-tooltip class="item" effect="dark" content="消费必须满一定额度才可使用,0代表无限制" placement="top-end">
              <el-input-number v-model="form24.integralFull"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="单次最大抵扣积分" prop="integralMax">
            <el-tooltip class="item" effect="dark" content="限制一次只能使用多少积分,0代表无限制" placement="top-end">
              <el-input-number v-model="form24.integralMax"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <div class="footer">
            <el-button type="primary" @click="submitForm24">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>

      
      
      <!--      <el-tab-pane label="APP支付配置" name="store.pay">-->
      <!--        <el-form ref="form23" :model="form23"  label-width="160px">-->
      <!--          <el-form-item label="支付类型" prop="type">-->
      <!--            <el-radio-group v-model="form23.type">-->
      <!--              <el-radio label="yb">易宝</el-radio>-->
      <!--              <el-radio label="wx">微信</el-radio>-->
      <!--              <el-radio label="hf">汇付</el-radio>-->
      <!--            </el-radio-group>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item   label="appId" prop="appId">-->
      <!--            <el-input   v-model="form23.appId"  label="请输入appId"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item  v-if="form23.type=='yb'" label="易宝商户号" prop="ybAccount">-->
      <!--            <el-input   v-model="form23.ybAccount"  label="请输入易宝商户号"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='yb'" label="易宝Key" prop="ybKey">-->
      <!--            <el-input  v-model="form23.ybKey" label="请输入易宝Key"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='yb'" label="易宝回调地址" prop="ybNotifyUrl">-->
      <!--            <el-input  v-model="form23.ybNotifyUrl" label="易宝回调地址"></el-input>-->
      <!--          </el-form-item>-->

      <!--          <el-form-item  v-if="form23.type=='wx'" label="微信商户号" prop="wxMchId">-->
      <!--            <el-input   v-model="form23.wxMchId"  label="请输入微信商户号"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='wx'" label="微信Key" prop="wxMchKey">-->
      <!--            <el-input  v-model="form23.wxMchKey" label="请输入微信Key"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='wx'" label="微信商户V3密钥" prop="wxMchKey">-->
      <!--            <el-input  v-model="form23.wxApiV3Key" label="请输入商户V3密钥"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='wx'" label="keyPath" prop="wxMchKey">-->
      <!--            <el-input  v-model="form23.keyPath" label="请输入商户V3密钥"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='wx'" label="privateKeyPath" prop="wxMchKey">-->
      <!--            <el-input  v-model="form23.privateKeyPath" label="请输入商户V3密钥"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='wx'" label="privateCertPath" prop="wxMchKey">-->
      <!--            <el-input  v-model="form23.privateCertPath" label="请输入商户V3密钥"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='wx'" label="notifyUrlScrm" prop="wxMchKey">-->
      <!--            <el-input  v-model="form23.notifyUrlScrm" label="请输入商户V3密钥"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='wx'" label="publicKeyId" prop="wxMchKey">-->
      <!--            <el-input  v-model="form23.publicKeyId" label="请输入商户V3密钥"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='wx'" label="publicKeyPath" prop="wxMchKey">-->
      <!--            <el-input  v-model="form23.publicKeyPath" label="请输入商户V3密钥"></el-input>-->
      <!--          </el-form-item>-->


      <!--          <el-form-item  v-if="form23.type=='hf'" label="汇付产品号" prop="hfProductId">-->
      <!--            <el-input   v-model="form23.hfProductId"  label="汇付产品号"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='hf'" label="系统号" prop="hfSysId">-->
      <!--            <el-input  v-model="form23.hfSysId" label="系统号Key"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='hf'" label="商户号" prop="huifuId">-->
      <!--            <el-input  v-model="form23.huifuId" label="商户号"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='hf'" label="商户私钥" prop="hfRsaPrivateKey">-->
      <!--            <el-input  v-model="form23.hfRsaPrivateKey" label="商户私钥"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='hf'" label="汇付公钥" prop="hfRsaPublicKey">-->
      <!--            <el-input  v-model="form23.hfRsaPublicKey" label="汇付公钥"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='hf'" label="汇付支付回调地址" prop="hfPayNotifyUrl">-->
      <!--            <el-input  v-model="form23.hfPayNotifyUrl" label="汇付支付回调地址"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='hf'" label="大额支付回调地址" prop="hfPayOnlineNotifyUrl">-->
      <!--            <el-input  v-model="form23.hfPayOnlineNotifyUrl" label="汇付支付回调地址"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='hf'" label="汇付退款回调地址" prop="hfRefundNotifyUrl">-->
      <!--            <el-input  v-model="form23.hfRefundNotifyUrl" label="汇付退款回调地址"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item v-if="form23.type=='hf'" label="汇付大额退款回调地址" prop="hfOnlineRefundNotifyUrl">-->
      <!--            <el-input  v-model="form23.hfOnlineRefundNotifyUrl" label="汇付分账回调地址"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <div   class="footer">-->
      <!--            <el-button type="primary" @click="submitForm23">提  交</el-button>-->
      <!--          </div>-->
      <!--        </el-form>-->
      <!--      </el-tab-pane>-->
      <el-tab-pane label="布局配置" name="his.appShow">
        <div>
          <el-table border :data="form10">
            <el-table-column prop="name" label="模块名称" width="300">
              <template slot-scope="scope">
                <el-input v-model="scope.row.name"></el-input>
              </template>
            </el-table-column>
            <el-table-column prop="sort" label="排序号" width="300">
              <template slot-scope="scope">
                <el-input-number v-model="scope.row.sort" :min="0" :max="100"></el-input-number>
              </template>
            </el-table-column>
            <el-table-column prop="isShow" label="是否展示" width="100">
              <template slot-scope="scope">
                <el-switch
                  v-model="scope.row.isShow"
                  active-color="#13ce66"
                  inactive-color="#ff4949"
                >
                </el-switch>
              </template>
            </el-table-column>
          </el-table>
          <div style="float: right;" class="footer">
            <el-button type="primary" @click="submitForm10">提 交</el-button>
          </div>
        </div>
      </el-tab-pane>
      
      <el-tab-pane label="签到配置" name="his.sign">
        <el-table border :data="form12">
          <el-table-column prop="day" label="名称" width="300">
            <template slot-scope="scope">
              <el-input v-model="scope.row.day"></el-input>
            </template>
          </el-table-column>
          <el-table-column prop="signNum" label="获得积分" width="300">
            <template slot-scope="scope">
              <el-input-number v-model="scope.row.signNum" :min="0" :max="100"></el-input-number>
            </template>
          </el-table-column>
          <el-table-column prop="sort" label="排序" width="300">
            <template slot-scope="scope">
              <el-input-number v-model="scope.row.sort" :min="0" :max="100"></el-input-number>
            </template>
          </el-table-column>
        </el-table>
        <div style="float: right;" class="footer">
          <el-button type="primary" @click="submitForm12">提 交</el-button>
        </div>
      </el-tab-pane>
      

      
      <el-tab-pane label="系统配置" name="his.config">
        <el-form ref="form13" :model="form13" label-width="160px">
          <el-form-item label="腾讯云sdkAppId" prop="sdkAppId">
            <el-input v-model="form13.sdkAppId" label="请输入sdkAppId"></el-input>
          </el-form-item>
          <el-form-item label="腾讯云sdkAppKey" prop="sdkAppKey">
            <el-input v-model="form13.sdkAppKey" label="请输入sdkAppKey"></el-input>
          </el-form-item>
          <el-form-item label="快递鸟Id" prop="kdnId">
            <el-input v-model="form13.kdnId" label="请输入kdnId"></el-input>
          </el-form-item>
          <el-form-item label="快递鸟Key" prop="kdnKeyId">
            <el-input v-model="form13.kdnKeyId" label="请输入kdnKeyId"></el-input>
          </el-form-item>
          <el-form-item label="快递鸟Url" prop="kdnUrl">
            <el-input v-model="form13.kdnUrl" label="请输入kdnUrl"></el-input>
          </el-form-item>
          <el-form-item label="快递鸟订阅url" prop="kdnSubscribeUrl">
            <el-input v-model="form13.kdnSubscribeUrl" label="请输入kdnSubscribeUrl"></el-input>
          </el-form-item>
          <el-form-item label="快递鸟地址url" prop="kdnAddressUrl">
            <el-input v-model="form13.kdnAddressUrl" label="请输入kdnAddressUrl"></el-input>
          </el-form-item>
      <el-form-item label="最低定金金额" prop="shares">
              <el-input-number v-model="form13.retainer" :min="100"   label="最低定金金额"></el-input-number>
      </el-form-item>
      <el-form-item   label="比率" prop="rate">
          <el-input   v-model="form13.rate"  label="请输入比率">
            <template slot="append">%</template>
          </el-input>
      </el-form-item>
          <el-form-item label="是否开启erp">
            <el-switch
              v-model="form13.erpOpen"
              active-color="#13ce66"
              inactive-color="#ff4949"
              active-value="1"
              inactive-value="0"
            >
            </el-switch>
          </el-form-item>
          <el-form-item label="erp类型" v-if="form13.erpOpen == 1">
            <el-radio v-model="form13.erpType" label="1">管易</el-radio>
            <el-radio v-model="form13.erpType" label="2">旺店通</el-radio>
            <el-radio v-model="form13.erpType" label="3">瀚智OMS</el-radio>
            <el-radio v-model="form13.erpType" label="4">代服管家</el-radio>
            <el-radio v-model="form13.erpType" label="5">聚水潭</el-radio>
            <el-radio v-model="form13.erpType" label="6">金博</el-radio>
          </el-form-item>
          <el-form-item label="不推送erp的公司" v-if="form13.erpOpen == 1">
            <el-select filterable v-model="form13.noErpCompany" placeholder="请选公司" multiple clearable size="small"
            >
              <el-option
                v-for="item in companyOptions"
                :key="item.companyId"
                :label="item.companyName"
                :value="item.companyId"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="舌诊appkey" prop="tongueAppKey">
            <el-input v-model="form13.tongueAppKey" label="请输入舌诊密钥"></el-input>
          </el-form-item>
          <el-form-item   label="App推送通知地址" prop="appPushUrl">
            <el-input   v-model="form13.appPushUrl"  label="请输入App推送通知地址"></el-input>
          </el-form-item>
          <el-form-item label="erpAppKey" v-if="form13.erpOpen == 1 && form13.erpType == 1 " prop="erpAppKey">
            <el-input v-model="form13.erpAppKey" label="请输入erpAppKey"></el-input>
          </el-form-item>
          <el-form-item label="erpSessionKey" v-if="form13.erpOpen == 1 && form13.erpType == 1 " prop="erpSessionKey">
            <el-input v-model="form13.erpSessionKey" label="请输入erpSessionKey"></el-input>
          </el-form-item>
          <el-form-item label="erpSecret" v-if="form13.erpOpen == 1 && form13.erpType == 1 " prop="erpSecret">
            <el-input v-model="form13.erpSecret" label="请输入erpSecret"></el-input>
          </el-form-item>
          <el-form-item label="erpUrl" v-if="form13.erpOpen == 1 && form13.erpType == 1 " prop="erpUrl">
            <el-input v-model="form13.erpUrl" label="请输入erpUrl"></el-input>
          </el-form-item>
          <el-form-item label="erpShopCode" v-if="form13.erpOpen == 1 && form13.erpType == 1 " prop="erpShopCode">
            <el-input v-model="form13.erpShopCode" label="请输入erpShopCode"></el-input>
          </el-form-item>
          <el-form-item label="erpWdAppKey" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdAppKey">
            <el-input v-model="form13.erpWdAppKey" label="请输入erpAppKey"></el-input>
          </el-form-item>
          <el-form-item label="erpWdAppsecret" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdAppsecret">
            <el-input v-model="form13.erpWdAppsecret" label="erpWdAppsecret"></el-input>
          </el-form-item>
          <el-form-item label="erpWdSid" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdSid">
            <el-input v-model="form13.erpWdSid" label="请输入erpWdSid"></el-input>
          </el-form-item>
          <el-form-item label="erpWdShopCode" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdShopCode">
            <el-input v-model="form13.erpWdShopCode" label="请输入erpWdShopCode"></el-input>
          </el-form-item>
          <el-form-item label="erpWdBaseUrl" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdBaseUrl">
            <el-input v-model="form13.erpWdBaseUrl" label="请输入erpWdBaseUrl"></el-input>
          </el-form-item>
          <el-form-item label="erpWarehouseCode" v-if="form13.erpOpen == 1 && form13.erpType == 2 "
                        prop="erpWarehouseCode"
          >
            <el-input v-model="form13.erpWarehouseCode" label="请输入erpWarehouseCode"></el-input>
          </el-form-item>
          <!-- erpHzOMSid -->
          <el-form-item label="erpHzOMSAppKey" v-if="form13.erpOpen == 1 && form13.erpType == 3 " prop="erpHzOMSAppKey">
            <el-input v-model="form13.erpHzOMSAppKey" label="请输入erpAppKey"></el-input>
          </el-form-item>
          <el-form-item label="erpHzOMSAppsecret" v-if="form13.erpOpen == 1 && form13.erpType == 3 "
                        prop="erpHzOMSAppsecret"
          >
            <el-input v-model="form13.erpHzOMSAppsecret" label="erpWdAppsecret"></el-input>
          </el-form-item>
          <el-form-item label="erpHzOMSItenantid" v-if="form13.erpOpen == 1 && form13.erpType == 3 "
                        prop="erpHzOMSItenantid"
          >
            <el-input v-model="form13.erpHzOMSItenantid" label="请输入erpHzOMSItenantid"></el-input>
          </el-form-item>
          <el-form-item label="erpHzOMTokenUrl" v-if="form13.erpOpen == 1 && form13.erpType == 3 "
                        prop="erpHzOMTokenUrl"
          >
            <el-input v-model="form13.erpHzOMTokenUrl" label="请输入erpHzOMTokenUrl"></el-input>
          </el-form-item>
          <el-form-item label="erpHzOMBaseUrl" v-if="form13.erpOpen == 1 && form13.erpType == 3 " prop="erpHzOMBaseUrl">
            <el-input v-model="form13.erpHzOMBaseUrl" label="请输入erpHzOMBaseUrl"></el-input>
          </el-form-item>




          <el-form-item label="erpWdAppKey" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdAppKey">
            <el-input v-model="form13.erpWdAppKey" label="请输入erpAppKey"></el-input>
          </el-form-item>
          <el-form-item label="erpWdAppsecret" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdAppsecret">
            <el-input v-model="form13.erpWdAppsecret" label="erpWdAppsecret"></el-input>
          </el-form-item>
          <el-form-item label="erpWdSid" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdSid">
            <el-input v-model="form13.erpWdSid" label="请输入erpWdSid"></el-input>
          </el-form-item>
          <el-form-item label="erpWdShopCode" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdShopCode">
            <el-input v-model="form13.erpWdShopCode" label="请输入erpWdShopCode"></el-input>
          </el-form-item>
          <el-form-item label="erpWdBaseUrl" v-if="form13.erpOpen == 1 && form13.erpType == 2 " prop="erpWdBaseUrl">
            <el-input v-model="form13.erpWdBaseUrl" label="请输入erpWdBaseUrl"></el-input>
          </el-form-item>
          <el-form-item label="erpWarehouseCode" v-if="form13.erpOpen == 1 && form13.erpType == 2 "
                        prop="erpWarehouseCode"
          >
            <el-input v-model="form13.erpWarehouseCode" label="请输入erpWarehouseCode"></el-input>
          </el-form-item>

          <el-form-item label="erpHzOMSAppKey" v-if="form13.erpOpen == 1 && form13.erpType == 3 " prop="erpHzOMSAppKey">
            <el-input v-model="form13.erpHzOMSAppKey" label="请输入erpAppKey"></el-input>
          </el-form-item>
          <el-form-item label="erpHzOMSAppsecret" v-if="form13.erpOpen == 1 && form13.erpType == 3 "
                        prop="erpHzOMSAppsecret"
          >
            <el-input v-model="form13.erpHzOMSAppsecret" label="erpWdAppsecret"></el-input>
          </el-form-item>
          <!-- erpHzOMSid -->
          <el-form-item label="erpHzOMSItenantid" v-if="form13.erpOpen == 1 && form13.erpType == 3 "
                        prop="erpHzOMSItenantid"
          >
            <el-input v-model="form13.erpHzOMSItenantid" label="请输入erpHzOMSItenantid"></el-input>
          </el-form-item>
          <el-form-item label="erpHzOMTokenUrl" v-if="form13.erpOpen == 1 && form13.erpType == 3 "
                        prop="erpHzOMTokenUrl"
          >
            <el-input v-model="form13.erpHzOMTokenUrl" label="请输入erpHzOMTokenUrl"></el-input>
          </el-form-item>
          <el-form-item label="erpHzOMBaseUrl" v-if="form13.erpOpen == 1 && form13.erpType == 3 " prop="erpHzOMBaseUrl">
            <el-input v-model="form13.erpHzOMBaseUrl" label="请输入erpHzOMBaseUrl"></el-input>
          </el-form-item>

          <el-form-item label="erpJstAppKey" v-if="form13.erpOpen == 1 && form13.erpType == 5 " prop="erpJstAppKey">
            <el-input v-model="form13.erpJstAppKey" label="请输入erpJstAppKey"></el-input>
          </el-form-item>
          <el-form-item label="erpJstAppsecret" v-if="form13.erpOpen == 1 && form13.erpType == 5 "
                        prop="erpJstAppsecret"
          >
            <el-input v-model="form13.erpJstAppsecret" label="erpJstAppsecret"></el-input>
          </el-form-item>
          <el-form-item label="erpJstSid" v-if="form13.erpOpen == 1 && form13.erpType == 5 " prop="erpJstSid">
            <el-input v-model="form13.erpJstSid" label="请输入erpJstSid"></el-input>
          </el-form-item>
          <el-form-item label="erpJstShopCode" v-if="form13.erpOpen == 1 && form13.erpType == 5 " prop="erpJstShopCode">
            <el-input v-model="form13.erpJstShopCode" label="请输入erpJstShopCode"></el-input>
          </el-form-item>
          <el-form-item label="erpJstBaseUrl" v-if="form13.erpOpen == 1 && form13.erpType == 5 " prop="erpJstBaseUrl">
            <el-input v-model="form13.erpJstBaseUrl" label="请输入erpJstBaseUrl"></el-input>
          </el-form-item>
          <el-form-item label="erpJstrehouseCode" v-if="form13.erpOpen == 1 && form13.erpType == 5 "
                        prop="erpJstrehouseCode"
          >
            <el-input v-model="form13.erpJstrehouseCode" label="请输入erpJstrehouseCode"></el-input>
          </el-form-item>

          <el-form-item label="kingbosan" v-if="form13.erpOpen == 1 && form13.erpType == 6 " prop="kingbosan">
            <el-input v-model="form13.kingbosan" label="请输入账套名称(kingbosan)"></el-input>
          </el-form-item>
          <el-form-item label="kingbosSecret" v-if="form13.erpOpen == 1 && form13.erpType == 6 " prop="kingbosSecret">
            <el-input v-model="form13.kingbosSecret" label="请输入密钥(kingbosSecret)"></el-input>
          </el-form-item>
          <el-form-item label="kingbosUrl" v-if="form13.erpOpen == 1 && form13.erpType == 6 " prop="kingbosUrl">
            <el-input v-model="form13.kingbosUrl" label="请输入金博地址(kingbosUrl)"></el-input>
          </el-form-item>
          <el-form-item label="corgid" v-if="form13.erpOpen == 1 && form13.erpType == 6 " prop="corgid">
            <el-input v-model="form13.corgid" label="请输入机构编码(corgid)"></el-input>
          </el-form-item>
          <el-form-item label="cwarehouseCode" v-if="form13.erpOpen == 1 && form13.erpType == 6 " prop="cwarehouseCode">
            <el-input v-model="form13.cwarehouseCode" label="请输入仓库编码(cwarehouseCode)"></el-input>
          </el-form-item>
          <el-form-item label="cwarehouseName" v-if="form13.erpOpen == 1 && form13.erpType == 6 " prop="cwarehouseName">
            <el-input v-model="form13.cwarehouseName" label="请输入仓库名称(cwarehouseName)"></el-input>
          </el-form-item>


          <el-form-item label="appid" prop="appid">
            <el-input v-model="form13.appid" label="请输入appid"></el-input>
          </el-form-item>
          <el-form-item label="secret" prop="secret">
            <el-input v-model="form13.secret" label="请输入secret"></el-input>
          </el-form-item>
          <el-form-item label="token" prop="token">
            <el-input v-model="form13.token" label="请输入token"></el-input>
          </el-form-item>
          <el-form-item label="aesKey" prop="aesKey">
            <el-input v-model="form13.aesKey" label="请输入aesKey"></el-input>
          </el-form-item>
          <el-form-item label="msgDataFormat" prop="msgDataFormat">
            <el-input v-model="form13.msgDataFormat" label="请输入msgDataFormat"></el-input>
          </el-form-item>
          <el-form-item label="极光appKey" prop="appKey">
            <el-input v-model="form13.appKey" label="请输入appKey"></el-input>
          </el-form-item>
          <el-form-item label="极光secret" prop="masterSecret">
            <el-input v-model="form13.masterSecret" label="请输入masterSecret"></el-input>
          </el-form-item>
          <el-form-item label="极光过期时间" prop="liveTime">
            <el-input v-model="form13.liveTime" label="请输入liveTime"></el-input>
          </el-form-item>
          <el-form-item label="处方上传token" prop="prescribeToken">
            <el-input v-model="form13.prescribeToken" label="请输入masterSecret"></el-input>
          </el-form-item>
          <el-form-item label="处方上传地址" prop="prescribeUrl">
            <el-input v-model="form13.prescribeUrl" label="请输入masterSecret"></el-input>
          </el-form-item>
          <el-form-item label="二维码地址" prop="codeUrl">
            <el-input v-model="form13.codeUrl" label="请输入masterSecret"></el-input>
          </el-form-item>
          <el-form-item label="hook地址" prop="hookUrl">
            <el-input v-model="form13.hookUrl" label="请输入hook域名"></el-input>
          </el-form-item>
          <div class="footer">
            <el-button type="primary" @click="submitForm13">提 交</el-button>
          </div>
        </el-form>

      </el-tab-pane>
      <el-tab-pane label="企微客服配置" name="qw:config">
        <el-form ref="form15" :model="form15" label-width="120px">
          <el-form-item label="企业CoripID">
            <el-input v-model="form15.corpId" style="width:400px"></el-input>
          </el-form-item>
          <el-form-item label="Secret">
            <el-input v-model="form15.secret" style="width:400px"></el-input>
          </el-form-item>
          <el-form-item label="Token">
            <el-input v-model="form15.token" style="width:400px"></el-input>
          </el-form-item>
          <el-form-item label="EncodingAESKey">
            <el-input v-model="form15.encodingAESKey" style="width:400px"></el-input>
          </el-form-item>
          <el-form-item label="回调地接">
            <el-input disabled v-model="form15.notifyUrl" style="width:600px"></el-input>
          </el-form-item>
          <div class="line"></div>
          <div style="float:right;margin-right:20px">
            <el-button type="primary" @click="submitForm15">提交</el-button>
          </div>
        </el-form>
      </el-tab-pane>
      
      <el-tab-pane label="点播配置" name="course.config">
        <el-form ref="form18" :model="form18" label-width="120px">
          <el-form-item label="完课模式">
            <el-radio-group v-model="form18.completionMode">
              <el-radio label="1">百分比</el-radio>
              <el-radio label="2">分钟数</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="完课进度(分)" v-if="form18.completionMode == 2">
            <el-tooltip class="item" effect="dark" content="看多少分钟算完课" placement="top-end">
              <el-input-number v-model="form18.minutesNum" :min="1"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="完课进度(%)" v-if="form18.completionMode == 1">
            <el-tooltip class="item" effect="dark" content="看多少百分比算完课" placement="top-end">
              <el-input-number v-model="form18.answerRate" :min="1" :max="100"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="短链有效期(天)">
            <el-tooltip class="item" effect="dark" content="短链有效期(天)" placement="top-end">
              <el-input-number v-model="form18.videoLinkExpireDate" :min="1"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="答题允许错误次数(次)">
            <el-tooltip class="item" effect="dark" content="课程答题允许错误次数(次)" placement="top-end">
              <el-input-number v-model="form18.answerErrorCount" :min="1"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="每十分钟获取积分">
            <el-tooltip class="item" effect="dark" content="每十分钟获取多少积分" placement="top-end">
              <el-input-number v-model="form18.videoIntegral" :min="1"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="答题获得积分">
            <el-tooltip class="item" effect="dark" content="答题获得积分" placement="top-end">
              <el-input-number v-model="form18.answerIntegral" :min="1"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="ipad发送延迟">
            <el-tooltip class="item" effect="dark" content="ipad发送消息延迟时间（ms）" placement="top-end">
              <el-input-number v-model="form18.delayStart" :min="100"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="ipad发送延迟">
            <el-tooltip class="item" effect="dark" content="ipad发送消息延迟时间（ms）" placement="top-end">
              <el-input-number v-model="form18.delayEnd" :min="100"></el-input-number>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="看课默认线路" prop="defaultLine">
            <el-radio-group v-model="form18.defaultLine">
              <el-radio label="0">线路一</el-radio>
              <el-radio label="1">线路二</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="一级域名">
            <el-tooltip class="item" effect="dark" content="顶级域名" placement="top-end">
              <el-input v-model="form18.courseDomainName"></el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="通用看课域名">
            <el-tooltip class="item" effect="dark" content="真链域名" placement="top-end">
              <el-input v-model="form18.realLinkDomainName"></el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="网页授权域名">
            <el-tooltip class="item" effect="dark" content="公众号网页授权域名" placement="top-end">
              <el-input v-model="form18.authDomainName"></el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="公众号appId">
            <el-tooltip class="item" effect="dark" content="授权公众号appId" placement="top-end">
              <el-input v-model="form18.mpAppId"></el-input>
            </el-tooltip>
          </el-form-item>

          <el-form-item label="小程序appid">
            <el-tooltip class="item" effect="dark" content="小程序appid" placement="top-end">
              <el-input v-model="form18.miniprogramAppid"></el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="小程序page路径">
            <el-tooltip class="item" effect="dark" content="小程序消息打开后的路径" placement="top-end">
              <el-input v-model="form18.miniprogramPage"></el-input>
            </el-tooltip>
          </el-form-item>

          <el-form-item label="奖励类型">
            <el-radio-group v-model="form18.rewardType">
              <el-radio label="1">红包</el-radio>
              <el-radio label="2">积分</el-radio>
              <el-radio label="3">红包+积分</el-radio>
            </el-radio-group>
          </el-form-item>

          <el-form-item label="红包金额" v-if="form18.rewardType == 1 || form18.rewardType == 3">
            <el-tooltip class="item" effect="dark" content="课程默认红包金额" placement="top-end">
              <el-input-number v-model="form18.redPackageMoney" :min="0.01"></el-input-number>
            </el-tooltip>
          </el-form-item>


          <!--   红包余额是否扣减开关      -->
          <el-form-item label="红包余额是否扣减开关">
            <el-radio-group v-model="form18.isRedPackageBalanceDeduction">
              <el-radio label="1">开</el-radio>
              <el-radio label="0">关</el-radio>
            </el-radio-group>
          </el-form-item>
          <!-- 看视频休息暂停配置开关 默认打开要暂停 0-关闭 1-打开 -->
          <el-form-item label="看课休息暂停开关（默认打开）">
            <el-radio-group v-model="form18.isOpenRestReminder">
              <el-radio label="1" >开</el-radio>
              <el-radio label="0">关</el-radio>
            </el-radio-group>
          </el-form-item>


          <el-form-item label="禁止发送时间段">
            <el-row v-for="(item, index) in form18.disabledTimeList" style="margin-top: 10px">
              <el-time-picker
                class="custom-input"
                v-model="item.startDisabledTime"
                value-format="HH:mm"
                format="HH:mm"
                placeholder="开始时间"
                style="width: 130px;height: 20px;"
              >
              </el-time-picker>
              <el-time-picker
                class="custom-input"
                v-model="item.endDisabledTime"
                value-format="HH:mm"
                format="HH:mm"
                placeholder="结束时间"
                style="width: 130px;height: 20px;margin-left: 10px"
              >
              </el-time-picker>
              <el-button type="danger" icon="el-icon-delete" circle style="margin-left: 20px"
                         @click="removeDisabledTime(index)"
              ></el-button>
            </el-row>
            <el-button @click="addDisabledTime" style="margin-top: 10px">添加时间段</el-button>
          </el-form-item>

          <el-form-item label="红包模式" v-if="form18.rewardType==1 || form18.rewardType == 3">
            <el-radio-group v-model="form18.redPacketMode">
              <el-radio label="1">总公司</el-radio>
              <el-radio label="2">分公司</el-radio>
            </el-radio-group>
          </el-form-item>

          <el-form-item label="默认客服二维码图片" prop="companyUserQRCode">
            <ImageUpload v-model="form18.companyUserQRCode" type="image" :num="10" :width="150" :height="150"
                         :limit="1"
            />
          </el-form-item>
          <el-form-item label="课程LOGO" prop="courseLogo">
            <image-upload v-model="form18.courseLogo" :limit="1"/>
          </el-form-item>

          <el-form-item label="侧边栏公共图" prop="sidebarImageUrl">
            <image-upload v-model="form18.sidebarImageUrl" :limit="1"/>
          </el-form-item>


          <el-form-item label="开启评论/弹幕" prop="openCommentStatus">
            <el-radio-group v-model="form18.openCommentStatus">
              <el-radio :label="1">开启评论</el-radio>
              <el-radio :label="2">开启弹幕</el-radio>
              <el-radio :label="3">关闭</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="发送延时时间" prop="sendDelayTime"
                        :rules="rulesDelay"
          >
            <el-tooltip class="item" effect="dark" content="请输入延时时间，范围在1000毫秒-2000毫秒之间"
                        placement="top-end"
            >
              <el-input
                v-model.number="form18.sendDelayTime"
                type="number"
                :min="1000"
                :max="2000"
                placeholder="请输入1000-2000之间的数值"
              >
                <template slot="append">毫秒</template>
              </el-input>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="是否单销售观看" prop="oneCompanyCourse" label-width="120">
            <el-switch
              v-model="form18.oneCompanyCourse"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>

          <span style="color: red;font-size: 12px;">(打开后，每家公司客户仅允许绑定一个销售，打开前请关闭 是否单销售观看 按钮)</span>
          <el-form-item label="是否允许不同公司销售观看" prop="moreCompanyCourse" label-width="120">
            <el-switch
              v-model="form18.moreCompanyCourse"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>
          <el-form-item label="是否允许用户暂停" prop="isAllowUserPause" label-width="120">
            <el-switch
              v-model="form18.isAllowUserPause"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>

          <el-form-item label="是否允许销售公司金额位负数" prop="isAllowUserPause">
            <el-switch
              v-model="form18.isNegative"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>
          <el-form-item label="可查看评论条数" v-if="false">
            <el-tooltip class="item" effect="dark" content="在评论区可以查看的历史评论条数，默认200" placement="top-end">
              <el-input-number v-model="form18.viewCommentNum" :min="1"></el-input-number>
            </el-tooltip>
          </el-form-item>

          <el-form-item label="授权方式">
            <el-tooltip class="item" effect="dark" content="小程序授权头像昵称方式（目前仅会员看课有效）"
                        placement="top-end"
            >
              <el-radio-group v-model="form18.miniAppAuthType">
                <el-radio label="1">小程序原生</el-radio>
                <el-radio label="2">跳转H5服务号</el-radio>
              </el-radio-group>
            </el-tooltip>
          </el-form-item>

          <el-form-item v-if="form18.miniAppAuthType==2" label="跳转域名">
            <el-tooltip class="item" effect="dark" content="会员看课小程序授权头像昵称，跳转H5服务号授权域名"
                        placement="top-end"
            >
              <el-input style="width: 400px" v-model="form18.userCourseAuthDomain" label="跳转域名"></el-input>
            </el-tooltip>
          </el-form-item>

          <el-form-item label="炮灰发服务号红包落地地址">
            <el-tooltip class="item" effect="dark" content="炮灰看课发红包-服务号发" placement="top-end">
              <el-input style="width: 200px" v-model="form18.userCourseH5Reward" label="服务号红包落地地址"></el-input>
            </el-tooltip>
          </el-form-item>

          <el-form-item label="是否绑定" prop="doctorRegister">
            <el-switch
              v-model="form18.isBound"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>

          <el-form-item label="是否开启部门数据限制" prop="deptLimit">
            <el-switch
              v-model="form18.deptLimit"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>

          <el-form-item label="评级开启全部" prop="isAllratingRating">
            <el-switch
              v-model="form18.isAllratingRating"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>

          <el-form-item label="是否只展示部门" prop="doctorRegister">
            <el-switch
              v-model="form18.dept"
              active-color="#13ce66"
              inactive-color="#ff4949"
            >
            </el-switch>
          </el-form-item>

           <el-form-item label="是否开启IM" prop="isOpenIM">
             <el-switch
               v-model="form18.isOpenIM"
               active-color="#13ce66"
               inactive-color="#ff4949">
             </el-switch>
           </el-form-item>
          <el-form-item label="是否开启企微二维码" prop="showQwCode">
            <el-switch
              v-model="form18.showQwCode"
              active-color="#13ce66"
              inactive-color="#ff4949">
            </el-switch>
          </el-form-item>
           <el-form-item label="侧边栏是否仅展示当天课程" prop="showQwCode">
            <el-switch
              v-model="form18.sidebarOnlyShowTodayCourse"
              active-color="#13ce66"
              inactive-color="#ff4949">
            </el-switch>
          </el-form-item>
          <div class="line"></div>
          <div style="float:right;margin-right:20px">
            <el-button type="primary" @click="submitForm18">提交</el-button>
          </div>
        </el-form>
      </el-tab-pane>
<!--
      <el-tab-pane label="点播播放源配置" name="courseMa.config">
        <el-button type="primary" @click="addCourseMaConfig" style="margin-bottom: 10px">添加配置</el-button>
        <el-table height="660" border v-loading="courseMaConfigLoading" :data="courseMaConfigList">
          <el-table-column label="名称" align="center" prop="name">
            <template slot-scope="scope">
              <el-input v-model="scope.row.name" placeholder="请输入名称" :disabled="!scope.row.editing"/>
            </template>
          </el-table-column>
          <el-table-column label="类型" align="center" prop="type">
            <template slot-scope="scope">
              <el-select
                v-model="scope.row.type"
                placeholder="请选择类型"
                :disabled="!scope.row.editing"
              >
                <el-option label="小程序" value="1"></el-option>
                <el-option label="服务号" value="2"></el-option>
                <el-option label="自定义" value="3"></el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column label="小程序原始ID" align="center" prop="username">
            <template slot-scope="scope" v-if="scope.row.type == 1 || scope.row.type == 3 ">
              <el-input v-model="scope.row.username" placeholder="请输入原始ID" :disabled="!scope.row.editing"/>
            </template>
          </el-table-column>
          <el-table-column label="小程序图标" align="center" prop="log">
            <template slot-scope="scope" v-if="scope.row.type == 1 || scope.row.type == 3 ">
              <el-image v-if="!scope.row.editing && scope.row.log" :src="scope.row.log"
                        :preview-src-list="[scope.row.log]"
              />
              <image-upload v-if="scope.row.editing" v-model="scope.row.log" :file-type='["png", "jpg", "jpeg"]'
                            :limit="1"
              />
            </template>
          </el-table-column>
          <el-table-column label="AppId" align="center" prop="appid">
            <template slot-scope="scope">
              <el-input v-model="scope.row.appid" placeholder="请输入AppId" :disabled="!scope.row.editing"/>
            </template>
          </el-table-column>
          <el-table-column label="Secret" align="center" prop="secret">
            <template slot-scope="scope">
              <el-input v-model="scope.row.secret" placeholder="请输入Secret" :disabled="!scope.row.editing"/>
            </template>
          </el-table-column>
          <el-table-column label="token" align="center" prop="token">
            <template slot-scope="scope">
              <el-input v-model="scope.row.token" placeholder="请输入token" :disabled="!scope.row.editing"/>
            </template>
          </el-table-column>
          <el-table-column label="aesKey" align="center" prop="aesKey">
            <template slot-scope="scope">
              <el-input v-model="scope.row.aesKey" placeholder="请输入aesKey" :disabled="!scope.row.editing"/>
            </template>
          </el-table-column>
          <el-table-column label="msgDataFormat" align="center" prop="msgDataFormat">
            <template slot-scope="scope">
              <el-input v-model="scope.row.msgDataFormat" placeholder="请输入消息格式" :disabled="!scope.row.editing"/>
            </template>
          </el-table-column>
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                v-if="!scope.row.editing"
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleEdit(scope.$index, scope.row)"
              >编辑
              </el-button>
              <el-button
                v-if="scope.row.editing"
                size="mini"
                type="text"
                icon="el-icon-check"
                @click="handleSave(scope.$index, scope.row)"
              >保存
              </el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="deleteCourseMaConfig(scope.$index)"
              >删除
              </el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-setting"
                @click="handleSwitchConfig(scope.row)"
              >是否展示销售管理
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="footer">

          <el-button type="primary" @click="submitCourseMaConfig">提 交</el-button>
        </div>
      </el-tab-pane>
-->

      <!-- 开关配置对话框 -->
      <el-dialog title="开关配置" :visible.sync="switchDialogVisible" width="500px" class="switch-dialog">
        <el-form :model="switchForm" label-width="100px">
          <el-form-item label="AppId">
            <el-input v-model="switchForm.appId" :disabled="true"></el-input>
          </el-form-item>
          <el-form-item label="开关状态">
            <el-switch
              v-model="switchForm.switchStatus"
              active-text="开启"
              inactive-text="关闭"
              active-value="001"
              inactive-value="002"
            >
            </el-switch>
          </el-form-item>
          <el-form-item label="配置信息" v-if="switchForm.configInfo">
            <el-input
              type="textarea"
              :rows="4"
              v-model="switchForm.configInfo"
              :disabled="true"
            >
            </el-input>
          </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
                <el-button @click="switchDialogVisible = false">取 消</el-button>
                <el-button type="primary" @click="submitSwitchConfig">确 定</el-button>
            </span>
      </el-dialog>


      <el-tab-pane label="红包商户配置" name="redPacket.config">
        <el-form ref="form19" :model="form19" label-width="150px">
          <el-form-item label="红包接口类型" prop="isNew">
            <el-radio-group v-model="form19.isNew">
              <el-radio label="0">商家转账到零钱(旧)</el-radio>
              <el-radio label="1">商家转账(新)</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="公众号appid" prop="appId">
            <el-input v-model="form19.appId" label="请输入appId"></el-input>
          </el-form-item>
          <el-form-item label="小程序appid" prop="appId">
            <el-input v-model="form19.miniappId" label="请输入appId"></el-input>
          </el-form-item>
          <el-form-item label="商户号" prop="mchId">
            <el-input v-model="form19.mchId" label="请输入mchId"></el-input>
          </el-form-item>
          <el-form-item label="商户密钥" prop="mchKey">
            <el-input v-model="form19.mchKey" label="mchKey"></el-input>
          </el-form-item>
          <el-form-item label="p12证书路径" prop="keyPath">
            <el-input v-model="form19.keyPath" label="请输入keyPath"></el-input>
          </el-form-item>
          <el-form-item label="apiV3密钥" prop="apiV3Key">
            <el-input v-model="form19.apiV3Key" label="请输入apiV3Key"></el-input>
          </el-form-item>
           <el-form-item   label="公钥ID" prop="publicKeyId">
            <el-input v-model="form19.publicKeyId" label="请输入公钥ID"></el-input>
          </el-form-item>
           <el-form-item   label="公钥证书" prop="publicKeyPath">
            <el-input v-model="form19.publicKeyPath" label="请输入publicKeyPath"></el-input>
          </el-form-item>
          <el-form-item label="key路径" prop="privateKeyPath">
            <el-input v-model="form19.privateKeyPath" label="请输入"></el-input>
          </el-form-item>
          <el-form-item label="cert路径" prop="privateCertPath">
            <el-input v-model="form19.privateCertPath" label="请输入"></el-input>
          </el-form-item>
          <el-form-item label="回调地址" prop="notifyUrl">
            <el-input v-model="form19.notifyUrl" label="请输入"></el-input>
          </el-form-item>

          <div class="footer">
            <el-button type="primary" @click="submitForm19">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>
      <el-tab-pane label="企微Sop客户评级配置" name="qwRating:config">
        <el-form ref="form20" :model="form20" :rules="rules20" label-width="120px">
          <el-form-item label="评级天数(天)" prop="levelDay">
            <el-tooltip class="item" effect="dark" content="最小评级天数(天)" placement="top-end">
              <el-input-number v-model="form20.levelDay" :min="4" :max="365"></el-input-number>
            </el-tooltip>
          </el-form-item>

          <el-form-item label="超过多少天的客户没看课评E级" prop="levelDay">
            <el-tooltip class="item" effect="dark" content="超过多少天的客户没看课评E级，且不生成sop执行记录了，不发了"
                        placement="top-end"
            >
              <el-input-number v-model="form20.notStudyDays" :min="4" :max="365"></el-input-number>
            </el-tooltip>
          </el-form-item>

          <!-- A级范围 -->
          <el-form-item label="A级范围(%)" prop="aLevelMin">
            <el-tooltip class="item" effect="dark" content="A级客户范围最小值(%)" placement="top-end">
              <el-input-number
                v-model="form20.aLevelMin"
                :min="0"
                :max="100"
              ></el-input-number>
            </el-tooltip>
            <span style="margin: 0 10px;">-</span>
            <span>100</span> <!-- aLevelMax 固定为 100 -->
          </el-form-item>

          <!-- B级范围 -->
          <el-form-item label="B级范围(%)" prop="bLevelMin">
            <el-tooltip class="item" effect="dark" content="B级客户范围最小值(%)" placement="top-end">
              <el-input-number
                v-model="form20.bLevelMin"
                :min="0"
                :max="100"
              ></el-input-number>
            </el-tooltip>
            <span style="margin: 0 10px;">-</span>
            <el-tooltip class="item" effect="dark" content="B级客户范围最大值(%)" placement="top-end">
              <el-input-number
                v-model="form20.bLevelMax"
                :min="0"
                :max="100"
              ></el-input-number>
            </el-tooltip>
          </el-form-item>

          <!-- C级范围 -->
          <el-form-item label="C级范围(%)" prop="cLevelMin">
            <el-tooltip class="item" effect="dark" content="C级客户范围最小值(%)" placement="top-end">
              <el-input-number
                v-model="form20.cLevelMin"
                :min="0"
                :max="100"
              ></el-input-number>
            </el-tooltip>
            <span style="margin: 0 10px;">-</span>
            <el-tooltip class="item" effect="dark" content="C级客户范围最大值(%)" placement="top-end">
              <el-input-number
                v-model="form20.cLevelMax"
                :min="0"
                :max="100"
              ></el-input-number>
            </el-tooltip>
          </el-form-item>

          <!-- D级范围 -->
          <el-form-item label="D级范围(%)" prop="dLevelMin">
            <span>0</span> <!-- dLevelMin 固定为 0 -->
            <span style="margin: 0 10px;">-</span>
            <el-tooltip class="item" effect="dark" content="D级客户范围最大值(%)" placement="top-end">
              <el-input-number
                v-model="form20.dLevelMax"
                :min="0"
                :max="100"
              ></el-input-number>
            </el-tooltip>
          </el-form-item>

          <div class="line"></div>
          <div style="float: right; margin-right: 20px">
            <el-button type="primary" @click="submitForm20">提交</el-button>
          </div>
        </el-form>
      </el-tab-pane>
      <el-tab-pane label="注册配置" name="his.login">
        <el-form ref="form22" :model="form22" label-width="150px">
          <el-form-item label="注册初始密码" prop="loginPassword">
            <el-input v-model="form22.loginPassword" label="请输入初始密码"></el-input>
          </el-form-item>
          <el-form-item label="首次登录是否修改密码">
            <el-row>
              <el-switch v-model="form22.disabled"></el-switch>
            </el-row>
          </el-form-item>
          <div class="footer">
            <el-button type="primary" @click="submitForm22">提 交</el-button>
          </div>
        </el-form>

      </el-tab-pane>
      <el-tab-pane label="企业理念" name="store.concept">
        <el-form ref="form21" :model="form21" :rules="rules21" label-width="160px">
          <el-form-item label="企业理念图片" prop="images">
            <Material v-model="images" type="image" :num="10" :width="150" :height="150"/>
          </el-form-item>
          <el-form-item label="企业理念视频" prop="videoUrl">
            <div>
              <el-upload
                ref="upload"
                class="upload-demo"
                :action="uploadUrl"
                :on-success="handleSuccess"
                :before-upload="beforeUpload"
                :limit="1"
                :accept="videoAccept"
              >
                <el-button size="small" type="primary">点击上传视频</el-button>
              </el-upload>
              <video :src="form21.videoUrl" controls style="max-width: 400px; max-height: 400px;"></video>
            </div>
          </el-form-item>
          <div class="footer">
            <el-button type="primary" @click="submitForm21">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>

      <el-tab-pane label="资质证书展示" name="his.zzzs">
        <el-form label-width="160px">
          <el-form-item  label="ICP主体备案号：" prop="icpztbah">
            <el-input v-model="form28.icpztbah" placeholder="请输入ICP主体备案号"></el-input>
          </el-form-item>
          <el-form-item  label="互联网药品信息服务备案：" prop="hlwypxxfwba">
            <el-input v-model="form28.hlwypxxfwba" placeholder="请输入互联网药品信息服务备案"></el-input>
          </el-form-item>
          <el-form-item label="药品网络交易服务第三方平台备案：" prop="ypwljyfwdsfpt">
            <el-input v-model="form28.ypwljyfwdsfpt" placeholder="请输入药品网络交易服务第三方平台备案"></el-input>
          </el-form-item>
          <el-form-item  label="医疗器械网络交易服务第三方平台备案号：" prop="ylqxwljyfwdsfptbah">
            <el-input v-model="form28.ylqxwljyfwdsfptbah" placeholder="请输入医疗器械网络交易服务第三方平台备案号"></el-input>
          </el-form-item>
          <el-form-item  label="投诉举报邮箱：" prop="jbyx">
            <el-input v-model="form28.jbyx" placeholder="请输入投诉举报邮箱"></el-input>
          </el-form-item>
          <el-form-item  label="联系电话：" prop="baxx">
            <el-input v-model="form28.baxx" placeholder="请输入联系电话"></el-input>
          </el-form-item>
          <div class="footer">
            <el-button type="primary" @click="submitForm28">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>

      
      <el-tab-pane label="声纹复刻配置" name="vc.config">
        <el-form :model="form31" label-width="200px">
          <el-form-item label="类型" prop="type">
            <el-radio-group v-model="form31.type">
              <el-radio :label="1">本地服务器</el-radio>
              <el-radio :label="2">豆包</el-radio>
            </el-radio-group>
          </el-form-item>
          <div class="footer">
            <el-button type="primary" @click="submitForm31">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>
      <el-tab-pane label="直播配置" name="living.config">
        <el-form ref="form32" :model="form32" label-width="150px">
          <el-form-item label="类型" prop="app">
            <el-radio-group v-model="form32.app">
              <el-radio label="live">直播</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="直播流链接" prop="domain">
            <el-input v-model="form32.domain" placeholder="请输入直播流链接"></el-input>
          </el-form-item>
          <el-form-item label="推流链接" prop="http">
            <el-input v-model="form32.http" placeholder="请输入推流链接"></el-input>
          </el-form-item>
          <br>
          <div class="footer">
            <el-button type="primary" @click="submitForm32">提 交</el-button>
          </div>
        </el-form>
      </el-tab-pane>

      <!--   福袋配置    -->
      
      

      

    </el-tabs>


  </div>
</template>

<script>
import { getConfigByKey, updateConfigByKey, clearCache, updateIsTownOn ,getGatewayList } from '@/api/system/config'
import { listStore } from '@/api/his/storeProduct'
import { js } from 'js-beautify'
import Material from '@/components/Material'
import { getAllFollowTempName } from '@/api/his/followTemp'
import { getCitys } from '@/api/store/city'
import { listCompany } from '@/api/company/company'
import { getStoreProductColumns } from '@/api/hisStore/storeProduct'
import { getStoreColumns } from '@/api/hisStore/store'

export default {
  name: 'Config',
  components: {
    Material
  },
  data() {
    return {
      gatewayList:[],
      corpOptions:[],
      citys: [],
      images: [],
      appImages: [],
      uploadUrl: process.env.VUE_APP_BASE_API + '/common/uploadOSS',
      videoAccept: 'video/*',
      courseMaConfigLoading: false,
      courseMaConfigList: [],
      switchDialogVisible: false,
      deptLimit: false,
      switchForm: {
        appId: '',
        switchStatus: '001'
      },
      deliveryGift: {
        open: false,
        title: '商品选择'
      },
      product: {
        open: false,
        title: '商品选择'
      },
      tempOptions: [],
      integralLogTypeOptions: [],
      companyOptions: [],
      activeName: 'cId.config',
      configId: null,
      storeOPtions: [],
      // 表单参数
      form1: {},
      form2: {},
      form3: {},
      form4: {},
      form6: {},
      form7: {},
      form8: {},
      form9: {},
      form10: [],
      form12: [],
      form13: {
        dfAccounts: [] // 初始化代付管家账户数组
      },
      form14: {},
      form15: {},
      form16: {},
      form17: {},
      form18: {
        viewCommentNum: 200,
      },
      form19: {},
      form20: {
        levelDay: 4,
        notStudyDays: 4,
        aLevelMin: 80,
        aLevelMax: 100,
        bLevelMin: 40,
        bLevelMax: 80,
        cLevelMin: 10,
        cLevelMax: 40,
        dLevelMin: 0,
        dLevelMax: 10
      },
      form21: {},
      form22: {},
      form23: {},
      form24: {},
      form25: {},
      gameListLoading: false,
      form26: {
        bloodGlucose: {
          fasting: { normal: '' },
          post1Hour: { normal: '' },
          post2Hour: { normal: '' },
          severity: [
            { level: 'normal', range: '', description: '' },
            { level: 'mild', range: '', description: '' },
            { level: 'severe', range: '', description: '' }
          ]
        },
        bloodPressure: {
          protection: { systolic: '', diastolic: '' },
          severity: [
            { level: 'normal', type: 'systolic', range: '', description: '' },
            { level: 'mild', type: 'systolic', range: '', description: '' },
            { level: 'severe', type: 'systolic', range: '', description: '' },
            { level: 'normal', type: 'diastolic', range: '', description: '' },
            { level: 'mild', type: 'diastolic', range: '', description: '' },
            { level: 'severe', type: 'diastolic', range: '', description: '' }
          ]
        },
        uricAcid: {
          activeGender: 'male',
          male: [
            { level: 'normal', range: '', description: '' },
            { level: 'mild', range: '', description: '' },
            { level: 'severe', range: '', description: '' }
          ],
          female: [
            { level: 'normal', range: '', description: '' },
            { level: 'mild', range: '', description: '' },
            { level: 'severe', range: '', description: '' }
          ]
        },
        bmi: {
          severity: [
            { level: 'normal', range: '', description: '' },
            { level: 'mild', range: '', description: '' },
            { level: 'severe', range: '', description: '' }
          ]
        },
        waist: {
          activeGender: 'male',
          male: [
            { level: 'normal', range: '', description: '' },
            { level: 'mild', range: '', description: '' },
            { level: 'severe', range: '', description: '' }
          ],
          female: [
            { level: 'normal', range: '', description: '' },
            { level: 'mild', range: '', description: '' },
            { level: 'severe', range: '', description: '' }
          ]
        },
        hip: {
          activeGender: 'male',
          male: [
            { level: 'normal', range: '', description: '' },
            { level: 'mild', range: '', description: '' },
            { level: 'severe', range: '', description: '' }
          ],
          female: [
            { level: 'normal', range: '', description: '' },
            { level: 'mild', range: '', description: '' },
            { level: 'severe', range: '', description: '' }
          ]
        }
      },
      form27: {},
      form28: {},
      form30: {},
      form29:{
        //是否开启拼手气红包
        enableRandomRedpacket:false,
        rules: [
          {
            minAmount: 0.01,
            maxAmount: 0.01,
            weight: 100,
          },
        ],

      },
      form31:{},
      form32:{},
      form33:{},
      form34:{},
      form35:{},
      form36:{},
      
      form40: {
        enablePhoneConfig: false,
        enablePhoneLimitConfig:false,
        generateCount: 1,
        startIndex: 1,
        endIndex: 11,
        numberCalls:1,
      },
      storeProductScrmColumns:[],
      storeScrmColumns: [],
      photoArr: [],
      couponList: [],
      inquirySubTypeOptions: [],
      // 表单校验
      rules1: {},
      rules3: {},
      rules4: {
        doctorRegister: [
          { required: true, message: '请输入医生注册协议', trigger: 'blur' }
        ],
        doctorFiling: [
          { required: true, message: '请输入医生多机构备案协议', trigger: 'blur' }
        ],
        userRegister: [
          { required: true, message: '请输入用户协议', trigger: 'blur' }
        ],
        userPrivacy: [
          { required: true, message: '请输入隐私协议', trigger: 'blur' }
        ],
        userHealth: [
          { required: true, message: '请输入健康客服协议', trigger: 'blur' }
        ],
        vipService: [
          { required: true, message: '请输入会员服务协议', trigger: 'blur' }
        ]
      },
      rulesDelay: [
        {
          validator: (rule, value, callback) => {
            if (value === '' || value == null) {
              callback() // 允许为空，不校验范围
            } else if (isNaN(value)) {
              callback(new Error('请输入有效数字'))
            } else if (value < 1000 || value > 2000) {
              callback(new Error('延时时间必须在1000-2000毫秒之间'))
            } else {
              callback()
            }
          },
          trigger: 'blur'
        }
      ],
      rules20: {
        levelDay: [{ required: true, message: '请输入评级天数', trigger: 'blur' }],
        aLevelMin: [{ required: true, message: '请输入A级最小值', trigger: 'blur' }],
        bLevelMin: [{ required: true, message: '请输入B级最小值', trigger: 'blur' }],
        bLevelMax: [{ required: true, message: '请输入B级最大值', trigger: 'blur' }],
        cLevelMin: [{ required: true, message: '请输入C级最小值', trigger: 'blur' }],
        cLevelMax: [{ required: true, message: '请输入C级最大值', trigger: 'blur' }],
        dLevelMax: [{ required: true, message: '请输入D级最大值', trigger: 'blur' }]
      },
      rules21: {},
      rules25: {},
      rules26: {},
      rules33: {},
      rules34: {},
      rules36: {},
    }
  },
  created() {

    this.getConfigByKey(this.activeName)
    listStore().then(response => {
      this.storeOPtions = response.rows
    })
    // getStoreProductColumns().then( response => {
    //   this.storeProductScrmColumns = response.data
    // })
    // getStoreColumns().then( response => {
    //   this.storeScrmColumns = response.data
    // })
  },
  watch: {
    photoArr: function(val) {
      this.form4.certs = val.join(',')
    },
    images: function(val) {
      this.form21.images = val.join(',')
    },
  },
  methods: {
    // 处理开关配置
    handleSwitchConfig(row) {
      this.switchForm.appId = row.appid
      this.switchForm.switchStatus = '001' // 默认关闭状态

      // 调用接口获取开关状态
      this.getSwitchConfig(row.appid)
      this.switchDialogVisible = true
    },

    // 获取开关配置
    getSwitchConfig(appId) {
      const params = {
        appId: this.switchForm.appId
      }
      updateIsTownOn(params).then(response => {
        if (response.code === 200) {
          if (response.date) {
            this.switchForm.switchStatus = response.date
          }
        } else {
          this.$message.error('获取配置失败: ' + response.msg)
        }
      }).catch(error => {
        this.$message.error('请求失败: ' + error.message)
      })
    },

    // 提交开关配置
    submitSwitchConfig() {
      const params = {
        appId: this.switchForm.appId,
        bock: this.switchForm.switchStatus
      }
      updateIsTownOn(params).then(response => {
        if (response.code === 200) {
          this.$message.success('配置更新成功')
          this.switchDialogVisible = false
        } else {
          this.$message.error('更新失败: ' + response.msg)
        }
      })
    },


    getCompanyOptions() {
      listCompany().then(response => {
        this.companyOptions = response.rows
      })
    },

    handleSuccess(response, file) {
      // 上传成功后的回调函数
      this.myloading.close()
      this.form21.videoUrl = response.url
      this.$refs.upload.clearFiles()
    },
    beforeUpload(file) {
      // 上传前的钩子函数，可以在这里对文件进行处理
      // 返回 false 则取消上传

      // 例如限制文件大小
      const isLt2M = file.size / 1024 / 1024 < 200
      if (!isLt2M) {
        this.$message.error('上传视频文件大小不能超过 200MB!')
        return false
      }
      this.myloading = this.$loading({
        lock: true,
        text: '上传中',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })

    },
    submitCourseMaConfig() {
      // 验证所有必填字段
      const isValid = this.courseMaConfigList.every(item => {
        return item.name && item.appid && item.secret
      })

      if (!isValid) {
        this.$message.error('请填写所有必填字段')
        return
      }

      var param = { configId: this.configId, configValue: JSON.stringify(this.courseMaConfigList) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    handleClick(tab, event) {
      this.getConfigByKey(tab.name)

    },
    safeParseConfig(configValue, fallback = {}) {
      if (configValue === null || configValue === undefined || configValue === '' || configValue === 'null') {
        return fallback
      }
      try {
        const parsed = JSON.parse(configValue)
        if (parsed === null || parsed === undefined) {
          return fallback
        }
        return parsed
      } catch (e) {
        return fallback
      }
    },
    getConfigByKey(key) {
      getConfigByKey(key).then(response => {
        const configValue = response && response.data ? response.data.configValue : null
        if(!!response.data){
          this.configId = response.data.configId
          this.configKey = response.data.configKey
           if (key == 'cId.config') {
            this.form40 = JSON.parse(response.data.configValue);
          }
        }else{
          this.configId = null;
          this.configKey = key;
          if (key == 'cId.config') {
            this.form40 = { enablePhoneConfig: false, generateCount: 1 };
          }
        }
        if (key == 'his.agreementConfig') {
          this.form3 = this.safeParseConfig(configValue, { ...this.form3 })
        }
        if (key == 'his.certs') {
          this.form4 = this.safeParseConfig(configValue, { ...this.form4 })
          if (this.form4.certs != null) {
            this.photoArr = this.form4.certs.split(',')
          }
        }
        if (key == 'his.store') {
          this.form7 = this.safeParseConfig(configValue, { ...this.form7 })
          getAllFollowTempName().then(response => {
            this.tempOptions = response.rows
          })
        }
        if (key == 'his.store') {
          // this.form7 =JSON.parse(response.data.configValue);
          const parsed = this.safeParseConfig(configValue, { ...this.form7 })
          if (parsed.isUpdateOrder != null) {
            parsed.isUpdateOrder = Number(parsed.isUpdateOrder)
          } else {
            parsed.isUpdateOrder = 1 // 默认值
          }
          this.form7 = parsed
        }
        if (key == 'store.pay') {
          this.form23 = this.safeParseConfig(configValue, { ...this.form23 })
        }
        if (key == 'his.appShow') {
          this.form10 = this.safeParseConfig(configValue, { ...this.form10 })
        }
        if (key == 'his.sign') {
          this.form12 = this.safeParseConfig(configValue, { ...this.form12 })
        }
        if (key == 'his.config') {
          this.getCompanyOptions()
          this.form13 = this.safeParseConfig(configValue, { ...this.form13 })

        }
        if (key == 'qw:config') {
          this.form15 = this.safeParseConfig(configValue, { ...this.form15 })
        }
        if (key == 'his.brand') {
          this.form16 = this.safeParseConfig(configValue, { ...this.form16 })
          console.log(this.form16)
        }
        if (key == 'course.config') {
          this.form18 = this.safeParseConfig(configValue, { ...this.form18 })
        }
        if (key == 'redPacket.config') {
          this.form19 = this.safeParseConfig(configValue, { ...this.form19 })
        }
        if (key == 'qwRating.config') {
          this.form20 = this.safeParseConfig(configValue, { ...this.form20 })
        }
        if (key == 'courseMa.config') {
          this.courseMaConfigLoading = true
          if (response.data && response.data.configValue) {
            const parsedCourseMaConfigList = this.safeParseConfig(configValue, [])
            this.courseMaConfigList = Array.isArray(parsedCourseMaConfigList) ? parsedCourseMaConfigList.map(item => ({
              ...item,
              editing: false
            })) : []
          } else {
            this.courseMaConfigList = []
          }
          this.courseMaConfigLoading = false
        }
        if (key == 'his.login') {
          this.form22 = this.safeParseConfig(configValue, { ...this.form22 })
        }
        if (key == 'store.concept') {
          this.configId = response.data.configId
          this.configKey = response.data.configKey
          this.form21 = this.safeParseConfig(configValue, { ...this.form21 })
          if (this.form21.images != null) {
            this.images = this.form21.images.split(',')
          }
        }
        if (key == 'store.integral') {
          this.configId = response.data.configId
          this.configKey = response.data.configKey
          console.log(response.data.configValue)
          this.form24 = this.safeParseConfig(configValue, { ...this.form24 })
          console.log(this.form24.sign)
        }
        if (key == 'his.zzzs') {
          this.configId = response.data.configId
          this.configKey = response.data.configKey
          this.form28 = {...this.form28, ...this.safeParseConfig(configValue, {})}
        }
        if (key == 'wx.config') {
          if(!!response.data){
          this.configId = response.data.configId
          this.configKey = response.data.configKey
          this.form30 = {...this.form30, ...this.safeParseConfig(configValue, {})}
          }
        }

        if(key == 'vc.config'){
           if(!!response.data){
          this.configId = response.data.configId
          this.configKey = response.data.configKey
          this.form31 = {...this.form31, ...this.safeParseConfig(configValue, {})}
          }
        }
        if(key == 'living.config'){
          if(!!response.data){
            this.configId = response.data.configId
            this.configKey = response.data.configKey
            this.form32 = {...this.form32, ...this.safeParseConfig(configValue, {})}
            console.log(this.form32 );
          }
        }
        if(key == "cId.config" && !!this.form40.enableGateWayLimit){
          getGatewayList().then(res=>{
            this.gatewayList = res.data;
            console.log(this.gatewayList);
          }).catch(res=>{
          })
        }
      })
    },
    /** 提交按钮 */
    submitForm3() {
      this.$refs['form3'].validate(valid => {
        if (valid) {
          var param = { configId: this.configId, configValue: JSON.stringify(this.form3) }
          updateConfigByKey(param).then(response => {
            if (response.code === 200) {
              this.msgSuccess('修改成功')
            }
          })
        }
      })
    },
    submitForm4() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form4) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm7() {
      if (this.form7.isIdVerification  == null){
        this.form7.isIdVerification = 0;
      }
      if (this.form7.payPostage  == null){
        this.form7.payPostage = 0;
      }
    if(this.form7.isIdVerification != 1){
      this.form7.API_URL = null;
      this.form7.HASHCODE = null;
      this.form7.SECRET_KEY = null;
    } else{
      // 校验这三个参数是否为空
      if (
        !this.form7.API_URL ||
        !this.form7.HASHCODE ||
        !this.form7.SECRET_KEY
      ) {
        this.msgError("API_URL、HASHCODE 和 SECRET_KEY 为必填项");
        return; // 阻止提交
      }
    }
      var param = { configId: this.configId, configValue: JSON.stringify(this.form7) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm23() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form23) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },

    submitForm10() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form10) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm12() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form12) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm13() {
      const accounts = this.form13.dfAccounts

      console.log(accounts)
      var param = { configId: this.configId, configValue: JSON.stringify(this.form13) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm15() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form15) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm16() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form16) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm22() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form22) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm18() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form18) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm19() {
      var param = { configId: this.configId, configValue: JSON.stringify(this.form19) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm20() {

      this.$refs['form20'].validate((valid) => {
        if (valid) {
          const {
            aLevelMin,
            aLevelMax,
            bLevelMin,
            bLevelMax,
            cLevelMin,
            cLevelMax,
            dLevelMin,
            dLevelMax
          } = this.form20

          // 检查范围是否连续且总长度为100%
          const totalLength = (100 - aLevelMin) + (bLevelMax - bLevelMin) + (cLevelMax - cLevelMin) + (dLevelMax)
          console.log('totalLength', totalLength)
          if (totalLength !== 100) {
            this.$message.error('所有等级范围必须连续且总长度为100%')
            return
          }

          var param = { configId: this.configId, configValue: JSON.stringify(this.form20) }
          updateConfigByKey(param).then(response => {
            if (response.code === 200) {
              this.msgSuccess('修改成功')
            }
          })

        } else {
          this.$message.error('请检查输入')
          return false
        }
      })

    },
    submitForm21() {
      var param = { configId: this.configId, configKey: this.configKey, configValue: JSON.stringify(this.form21) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm28(){
      const param = { configId: this.configId, configKey: this.configKey, configValue: JSON.stringify(this.form28) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm30(){
      const param = { configId: this.configId, configKey: this.configKey, configValue: JSON.stringify(this.form30) }
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm31(){
      const param = { configId: this.configId, configName : "声纹复刻配置", configKey: this.configKey, configValue: JSON.stringify(this.form31) }
      console.log(param)
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    submitForm32(){
      const param = { configId: this.configId, configName : "直播源配置", configKey: this.configKey, configValue: JSON.stringify(this.form32) }
      console.log(param)
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功')
        }
      })
    },
    formatColumns(){
      console.log(this.form27.pass_columns)

    },
    submitForm24() {
      this.$refs['form24'].validate(valid => {
        if (valid) {
          var param = { configId: this.configId, configKey: this.configKey, configValue: JSON.stringify(this.form24) }
          updateConfigByKey(param).then(response => {
            if (response.code === 200) {
              this.msgSuccess('修改成功')
            }
          })
        }
      })
    },
    /** 清理缓存按钮操作 */
    handleClearCache() {
      clearCache().then(response => {
        if (response.code === 200) {
          this.msgSuccess('清理成功')
        }
      })
    },
    deleteCourseMaConfig(index) {
      this.$confirm('确认删除该配置?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.courseMaConfigList.splice(index, 1)
        this.$message.success('删除成功')
      }).catch(() => {
      })
    },
    addCourseMaConfig() {
      this.courseMaConfigList.push({
        name: '',
        appid: '',
        secret: '',
        token: '',
        aesKey: '',
        msgDataFormat: '',
        editing: true
      })
    },
    handleEdit(index, row) {
      this.$set(this.courseMaConfigList[index], 'editing', true)
    },
    handleSave(index, row) {
      // 验证必填字段
      if (!row.name || !row.appid || !row.secret) {
        this.$message.error('请填写所有必填字段')
        return
      }
      this.$set(this.courseMaConfigList[index], 'editing', false)
    },
    addDisabledTime() {
      if (this.form18.disabledTimeList == null || this.form18.disabledTimeList == undefined) {
        this.form18.disabledTimeList = []
      }
      this.form18.disabledTimeList.push({ startDisabledTime: '', endDisabledTime: '' })
      this.$forceUpdate()
    },
    removeDisabledTime(index) {
      this.form18.disabledTimeList.splice(index, 1)
    },
    submitForm40() {
      if (this.form40.enablePhoneConfig) {
        if (!this.form40.generateCount || this.form40.generateCount < 1) {
          this.msgError('生成条数不能为空且不能小于1');
          return false;
        }

        // if (!this.form40.generateCount || this.form40.generateCount > 10) {
        //   this.msgError('单个手机号生成条数不能大于10条');
        //   return false;
        // }

        if (!this.form40.startIndex || this.form40.startIndex < 1 || this.form40.startIndex > 11) {
          this.msgError('开始位置不能为空，且必须在1到11之间');
          return false;
        }

        if (!this.form40.endIndex || this.form40.endIndex < 1 || this.form40.endIndex > 11) {
          this.msgError('结束位置不能为空，且必须在1到11之间');
          return false;
        }

        if (this.form40.startIndex > this.form40.endIndex) {
          this.msgError('开始位置不能大于结束位置');
          return false;
        }

        if (this.form40.endIndex < this.form40.startIndex) {
          this.msgError('结束位置不能小于开始位置');
          return false;
        }
        if (this.form40.startIndex === this.form40.endIndex) {
          this.msgError('开始位置不能等于结束位置');
          return false;
        }

        let num = this.form40.endIndex - this.form40.startIndex
        if(num < 4){
          this.msgError('开始和结束位置不能小于4位');
          return false;
        }
      }

      if(this.form40.enablePhoneLimitConfig){
        if(this.form40.numberCalls == null || this.form40.numberCalls === 0){
          this.msgError('限制次数不能为空或者大于0！');
          return false;
        }
        if(this.form40.numberCalls > 100000){
          this.msgError('限制次数不能超过10万次！');
          return false;
        }
      }

      this.saveConfig40();
    },
    saveConfig40() {
      const param = {
        configId: this.configId,
        configKey: this.configKey,
        configValue: JSON.stringify(this.form40)
      };
      updateConfigByKey(param).then(response => {
        if (response.code === 200) {
          this.msgSuccess('修改成功');
        }
      });
    },
  }
}
</script>
<style scoped>
.footer {
  width: 100%;
  display: flex;
  margin-top: 50px;
  align-items: flex-end;
  justify-content: flex-end;
}




.red-packet-config {
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.red-packet-form {
  margin-top: 20px;
}

/* 每一行的样式 */
.form-row {
  display: flex;
  /* align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ebeef5; */
  display: flex;
  /* 关键改动：添加以下两行 */
  align-items: center;    /* 垂直居中对齐 */
  justify-content: flex-start; /* 水平方向从左到右排列（默认值，可显式写出） */

  padding: 10px;
  border-bottom: 1px solid #ebeef5;
}

/* 最后一行去掉下边框 */
.form-row:last-child {
  border-bottom: none;
}

.form-item-amount {
  flex: 1;
  margin-right: 20px;
}

.form-item-weight {
  width: 220px;
  margin-right: 20px;
}

.action-buttons {
  display: flex;
  align-items: center;
}

.amount-input {
  width: 100px !important;
  text-align: center;
}

/* 金额输入框之间的连接符 */
.separator {
  margin: 0 10px;
  color: #999;
}

.suffix {
  margin-left: 10px;
  color: #999;
}

.add-btn {
  /* color: #48bb78 !important; */
}

.delete-btn {
  color: #f56c6c !important;
}

.rules-info {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 4px;
  font-size: 14px;
  color: #666;
}

.info-number {
  color: #1890ff;
  font-weight: bold;
  margin: 0 4px;
}

.action-bar {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.app-config-form {
  padding: 10px;
}

.config-card {
  margin-bottom: 24px;
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
}

.config-card ::v-deep .el-card__body {
  padding: 24px;
}

/* 章节标题样式 - 图标和文字在一起 */
.section-title {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.title-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.title-icon i {
  color: #fff;
  font-size: 20px;
}

.icon-promotion {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.title-text h3 {
  margin: 0;
  font-size: 18px;
  color: #303133;
  font-weight: 600;
  line-height: 1.4;
}

.subtitle {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #909399;
  line-height: 1.4;
}

/* 分割线 */
.el-divider {
  margin: 20px 0;
  background-color: #ebeef5;
}

/* 表单项 */
.app-config-form ::v-deep .el-form-item {
  margin-bottom: 24px;
}

.app-config-form ::v-deep .el-form-item:last-child {
  margin-bottom: 0;
}

.help-icon {
  margin-left: 8px;
  color: #c0c4cc;
  cursor: help;
  font-size: 16px;
  transition: color 0.3s;
}

.help-icon:hover {
  color: #409EFF;
}

/* 上传区域 */
.upload-wrapper {
  display: flex;
  flex-direction: column;
}

.upload-tip {
  margin-top: 8px;
  color: #909399;
  font-size: 12px;
}

/* 视频上传 */
.video-upload-wrapper {
  width: 100%;
  max-width: 400px;
}

.video-uploader ::v-deep .el-upload {
  width: 100%;
}

.video-uploader ::v-deep .el-upload-dragger {
  width: 100%;
  height: 160px;
  background: #fafafa;
  border: 2px dashed #dcdfe6;
  border-radius: 8px;
}

.video-uploader ::v-deep .el-upload-dragger:hover {
  border-color: #409EFF;
}

.preview-video {
  width: 100%;
  max-width: 400px;
  max-height: 250px;
  border-radius: 8px;
  background: #000;
}

.video-preview {
  position: relative;
  display: inline-block;
}

.video-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-preview:hover .video-actions {
  opacity: 1;
}

/* 底部按钮 */
.form-footer {
  margin-top: 32px;
  padding-left: 160px;
}

.form-footer .el-button {
  min-width: 100px;
  padding: 12px 24px;
  border-radius: 6px;
}

/* 响应式 */
@media screen and (max-width: 768px) {
  .section-title {
    margin-bottom: 16px;
  }

  .form-footer {
    padding-left: 0;
    text-align: center;
  }

  .config-card ::v-deep .el-card__body {
    padding: 16px;
  }
}


/* 游戏列表样式 */
.game-list-item {
  margin-top: 20px;
}

.game-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.game-list-tip {
  font-size: 12px;
  color: #909399;
}

.game-image-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
}

.no-image {
  font-size: 12px;
  color: #909399;
}

.game-link {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #409EFF;
  cursor: pointer;
}

.delete-btn {
  color: #f56c6c !important;
}

.delete-btn:hover {
  color: #f78989 !important;
}

/* 表格样式优化 */
::v-deep .el-table .cell {
  padding-left: 8px;
  padding-right: 8px;
}

::v-deep .el-table th {
  background-color: #f5f7fa;
  color: #606266;
}

::v-deep .el-table--border {
  border-radius: 8px;
  overflow: hidden;
}

/* 图片上传组件样式调整 */
::v-deep .image-upload {
  width: 60px;
  height: 60px;
}

::v-deep .image-upload .el-upload--picture-card {
  width: 60px;
  height: 60px;
  line-height: 64px;
}
</style>
