<?php /*a:2:{s:62:"D:\phpEnv\www\SCM-API\app\admin\view\general\config\index.html";i:1750736984;s:52:"D:\phpEnv\www\SCM-API\app\admin\view\layout\vue.html";i:1750736984;}*/ ?>
<!DOCTYPE html>
<html <?php if($config['elementUi']['dark']): ?>class="dark"<?php endif; ?>>
<head>
<meta charset="utf-8">
<title><?php echo site_config('basic.sitename'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<meta name="referrer" content="never">
<meta name="robots" content="noindex, nofollow">
<link rel="shortcut icon" href="<?php echo request()->domain(); ?>/favicon.ico" />
<link rel="stylesheet" href="<?php echo request()->domain(); ?>/assets/css/element-plus.css" />
<link rel="stylesheet" href="<?php echo request()->domain(); ?>/assets/css/theme/dark.css" />
<link rel="stylesheet" href="<?php echo request()->domain(); ?>/assets/libs/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="<?php echo request()->domain(); ?>/assets/css/yunqi.css" />
<style>
.bolderText{
        font-weight:bolder;
    }
    .form-container{
        padding: 30px;
        border:1px solid var(--el-border-color-light);
        border-top: 0;
        margin-top: -16px;
    }
</style>
</head>
<body>
    <div id="app">
        <el-container id="container" style="display: none;">
            <el-main style="padding: 0px;border-radius:4px;" id="mainScrollbar">
                <el-scrollbar>
                    
    <el-card shadow="never">
        <template #header>
            <el-alert effect="dark" :closable="false" title="使用说明">在此处定义的变量可以在全局通过site_config("组名.变量名")使用</el-alert>
        </template>
        <el-tabs type="card" v-model="tabValue" @tab-change="tabChange">
            <el-tab-pane :name="key" v-for="(label,key) in groupList" :label="label"></el-tab-pane>
            <?php if($app_debug): ?>
            <el-tab-pane name="addconfig">
                <template #label>
                    <i class="fa fa-plus"></i>&nbsp;添加配置
                </template>
            </el-tab-pane>
            <?php endif; ?>
        </el-tabs>
        <div class="form-container">
            <yun-form
                    label-position="left"
                    require-asterisk-position="right"
                    :label-width="200"
                    @submit="onSubmit"
                    :append-width="8"
                    :action="extend.edit_url"
                    @success="onSuccess"
                    v-if="columns && tabValue!='addconfig'"
                    :columns="columns">
                <template #default>
                    <el-form-item>
                        <template #label><span class="bolderText">变量标题</span></template>
                        <el-row style="width:100%">
                            <el-col :span="16">
                                <span class="bolderText">变量值</span>
                            </el-col>
                            <?php if($app_debug): ?>
                            <el-col :span="8">
                                <div class="bolderText" style="padding-left: 50px;">读取方式</div>
                            </el-col>
                            <?php endif; ?>
                        </el-row>
                    </el-form-item>
                </template>
                <template #addons="{value}">
                    <el-divider>
                        <el-tag v-if="value.name">{{value.type}}-{{value.name}}</el-tag>
                        <el-tag v-else type="warning">未安装扩展-{{value.key}}</el-tag>
                    </el-divider>
                </template>
                <?php if($app_debug): ?>
                <template #append="item">
                    <div style="padding-left:30px;">
                        <span>{{formatVar(item.column.field,item.column.addons)}}</span>
                        <el-button style="position: absolute;right: 0" @click="delVar(item.column.field)" size="small" type="danger" v-if="item.column.can_delete"><?php echo __('删除'); ?></el-button>
                    </div>
                </template>
                <?php endif; ?>
            </yun-form>
            <yun-form
                    v-if="tabValue=='addconfig'"
                    :action="extend.add_url"
                    @success="onSuccess"
                    ref="yunform"
                    :columns="addconfig">
            </yun-form>
        </div>
    </el-card>

                </el-scrollbar>
            </el-main>
        </el-container>
    </div>
</body>
<script type="text/javascript" src="<?php echo request()->domain(); ?>/assets/js/yunqi.js?v=<?php echo htmlentities((string) $config['version']); ?>"></script>
<script type="text/javascript">
    Yunqi.setConfig(<?php echo json_encode($config,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); ?>);
    Yunqi.setData(<?php echo build_var_json(get_defined_vars()); ?>);
    Yunqi.setAuth(<?php echo json_encode($auth->getBackendAuth(),JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); ?>);
</script>
<script type="module">
    import pageinfo from '<?php echo htmlentities((string) $config['baseUrl']); ?>ajax/js/a10d61c4eaca059547c248212a3392e3';
    import zhcn from '<?php echo request()->domain(); ?>/assets/js/zh-cn.js';
    try{
        Yunqi.setUp(pageinfo,zhcn);
    }catch (e){
        console.error(e);
    }
</script>
</html>
