123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>服务器私有配置</title>
- <!-- 所有的 css js 资源 -->
- <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- <script src="../../static/kj/upload-util.js"></script>
- <style type="text/css">
- html,
- body,
- .vue-box {
- height: 100%;
- overflow: hidden;
- }
- /* .vue-box{padding: 0px;} */
- .c-panel {
- height: calc(100% - 4em);
- position: relative;
- }
- .c-panel .c-label {
- width: 10em;
- }
- .c-panel .el-input {
- width: 500px;
- }
- .c-panel .el-textarea {
- width: 500px;
- }
- .logo-img {
- width: 35px;
- height: 35px;
- border-radius: 2px;
- vertical-align: middle;
- margin-right: 0.5em;
- cursor: pointer;
- }
- .s-tab {
- height: 100%;
- }
- .el-tabs__content {
- height: calc(100% - 130px);
- overflow: auto;
- }
- /* 让头像样式小一点 */
- .c-item-mline {
- width: 600px;
- }
- .c-item-mline .image-box-2 {
- width: 60px;
- height: 100px;
- }
- .c-item-mline .image-box-2 img {
- width: 60px;
- height: 60px;
- }
- .c-item-mline .image-box-2.up_img {
- height: 60px;
- }
- .c-item-mline .image-box-2.up_img img {
- margin: 15px;
- width: 30px;
- height: 30px;
- }
- .item-num .el-input__inner {
- width: 130px;
- }
- </style>
- </head>
- <body>
- <div class="vue-box" style="display: none;" :style="'display: block;'">
- <div class="c-panel" v-if="m != null">
- <el-tabs class="s-tab" v-model="activeTab">
- <!-- ---------------------------------- 系统参数 ---------------------------------- -->
- <el-tab-pane label="参数设置" name="tab1">
- <sa-item type="enum" name="设备端备案" v-model="m.termianlFilling" :jv="{1: '允许', 0: '禁止'}" jtype="1"
- br>
- </sa-item>
- <sa-item type="enum" name="行程卡限制" v-model="m.tourLimit" :jv="{1: '开启', 0: '关闭'}" jtype="1">
- </sa-item><span>开启:近期去过中高风险区不予开闸;关闭:不限制</span>
- <br />
- <div class="c-item">
- <label class="c-label">
- 核酸时效(小时内):</label>
- <el-input-number step-strictly :step="24" class="item-num" v-model="m.acidLimit" :min="0"
- :max="72" size="mini">
- </el-input-number>
- <span style="margin-left: 10px;">0表示不限制</span>
- </div>
- <br />
- <sa-item type="enum" name="核酸校验模式" v-model="m.verifyMode" :jv="{0: '不校验', 1: '高中风险地区', 2: '高中低风险地区'}" jtype="1">
- </sa-item>
- <br />
- <div class="c-item">
- <label class="c-label">
- 体温阈值(℃):</label>
- <el-input-number class="item-num" v-model="m.minTemperature" :min="1" size="mini">
- </el-input-number>
- <span style="margin-left: 10px;">大于此阈值不予开闸</span>
- </div>
- <sa-item type="enum" name="是否发送预警通知" v-model="m.sendAlarm" :jv="{1: '发送', 0: '不发送'}" jtype="1"
- br>
- </sa-item>
- <sa-item name="短信签名" v-model="m.smsSign" br>
- </sa-item>
- </el-tab-pane>
- </el-tabs>
- <div
- style="position: absolute; bottom: 0px; width: calc(100% - 3em); line-height: 80px; background-color: #FFF;">
- <hr style="height: 2px;">
- <div class="c-item">
- <label class="c-label"></label>
- <el-button type="primary" icon="el-icon-check" @click="ok">保存修改</el-button>
- <el-button type="primary" icon="el-icon-refresh-right" @click="f5">重置</el-button>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- // 创建一个默认的配置对象
- function create_m() {
- return {
- termianlFilling: 1,
- minTemperature: 37.0,
- tourLimit: 1,
- verifyMode:0,
- acidLimit: 24,
- sendAlarm: 1, // 新用户默认头像
- smsSign: '钦州码头智慧湾卡口智能防疫系统'
- }
- }
- </script>
- <script>
- var app = new Vue({
- components: {
- "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
- },
- el: '.vue-box',
- data: {
- sa: sa, // 超级对象
- m: null, //
- activeTab: 'tab1'
- },
- methods: {
- // 初始化配置
- init: function(str) {
- // 获取
- var cfg = sa.JSONParse(str, {}); // 用户配置
- var default_cfg = create_m(); // 默认配置
- // 遍历
- for (var key in default_cfg) {
- if (cfg[key] !== undefined && cfg[key] !== null) {
- default_cfg[key] = cfg[key];
- }
- }
- // 赋值
- this.m = default_cfg;
- },
- // 刷新
- f5: function() {
- sa.ajax('/SpCfg/getCfg', {
- cfgName: 'server_cfg'
- }, function(res) {
- this.init(res.data);
- }.bind(this));
- },
- // 提交
- ok: function() {
- sa.ajax('/SpCfg/updateCfg', {
- cfgName: 'server_cfg',
- cfgValue: JSON.stringify(this.m)
- }, function(res) {
- sa.ok2('保存成功');
- }.bind(this));
- }
- },
- created: function() {
- this.f5();
- }
- })
- </script>
- </body>
- </html>
|