123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- <!DOCTYPE html>
- <html lang="en" style="background-color: #f2f2f2;">
- <head>
- <meta charset="UTF-8">
- <title>商务局</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="format-detection" content="telephone=no">
- <link rel="stylesheet" type="text/css" href="../layui/css/layui.css" />
- <link rel="stylesheet" type="text/css" href="css/style.css" />
- <link rel="stylesheet" type="text/css" href="../iconfont/iconfont.css" />
- <style>
- .ui-required:before {
- content: "*";
- color: red;
- vertical-align: middle;
- }
- </style>
- <!--角色模板-->
- <script type="text/html" id="mainTpl">
- {{# layui.each(d, function(index, item){ }}
- <div class="layui-col-xs12 layui-col-sm4 layui-col-md3">
- <div class="layui-card">
- <a href="{{item.path}}?sysId={{item.sysId}}" target="_blank">
- <div class="layui-card-body main-card-body">
- <div class="icon-panel {{item.color}}"><i class="iconfont">{{item.icon}}</i></div>
- <h4>{{item.sysName}}</h4>
- </div>
- </a>
- </div>
- </div>
- {{# }); }}
- </script>
- </head>
- <div id="sysSetInfo" style="display: none">
- <form class="layui-form" lay-filter="addForm" action="" style="padding: 0 20px 0 0">
- <div class="layui-form-item" style="background-color: #f2f2f2; margin-right: -20px;">
- <label class="layui-form-label ui-required"><i class="layui-icon layui-icon-face-smile"
- style="font-size: 26px; color: #FF5722;"></i></label>
- <div class="layui-input-block">
- <span style="line-height:40px; color: #666">因为系统尚未完成配置,无法在平台进行操作,请先完成系统配置。</span>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label ui-required">单位名称</label>
- <div class="layui-input-block">
- <input type="text" name="branchName" required lay-verify="required" placeholder="请输入单位名称" autocomplete="off"
- class="layui-input">
- </div>
- </div>
- <div id="areaSelect"></div>
- <div class="layui-form-item">
- <div class="layui-input-block layui-layer-btn" style="position: absolute; bottom: 0; right: 10px;">
- <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="" lay-filter="formDemo"
- style="width: 5rem;">保
- 存</button>
- </div>
- </div>
- </form>
- </div>
- <body>
- <div class="main-nav">
- <div class="logo"><a href="../../index.html">贵阳市农产品流通大数据信息平台</a></div>
- <ul class="layui-nav nav-menu">
- <li class="layui-nav-item">
- <a href="javascript:;"><img src="img/face.jpg" class="layui-nav-img"><cite id="userName"></cite></a>
- <dl class="layui-nav-child">
- <dd><a href="javascript:;" id="clickInfo"><i class="layui-icon"></i>个人资料</a></dd>
- <dd><a href="javascript:;" id="clickPwd"><i class="layui-icon"></i>修改密码</a></dd>
- <dd><a href="javascript:;" id="dropOut"><i class="iconfont" style="font-size: 16px;"></i>退出</a></dd>
- </dl>
- </li>
- </ul>
- </div>
- <div class="layui-fluid">
- <div class="layui-row">
- <div class="layui-col-md12">
- </div>
- </div>
- <div class="layui-layout layui-main-layout">
- <div class="layui-row layui-col-space30" id="mainInfo">
- <div class="layui-col-xs12 layui-col-sm4 layui-col-md3">
- <div class="layui-card">
- <a href="../ncp/index.html">
- <div class="layui-card-body main-card-body">
- <div class="icon-panel violet-icon"><i class="iconfont"></i></div>
- <h4>农产品价格管理系统</h4>
- </div>
- </a>
- </div>
- </div>
- <div class="layui-col-xs12 layui-col-sm4 layui-col-md3">
- <div class="layui-card">
- <a href="#">
- <div class="layui-card-body main-card-body">
- <div class="icon-panel green-icon"><i class="iconfont"></i></div>
- <h4>物流园店面价格监测系统</h4>
- </div>
- </a>
- </div>
- </div>
- <div class="layui-col-xs12 layui-col-sm4 layui-col-md3">
- <div class="layui-card">
- <a href="#">
- <div class="layui-card-body main-card-body">
- <div class="icon-panel pink-icon"><i class="iconfont"></i></div>
- <h4>北部价格交易监控系统</h4>
- </div>
- </a>
- </div>
- </div>
- <div class="layui-col-xs12 layui-col-sm4 layui-col-md3">
- <div class="layui-card">
- <a href="#">
- <div class="layui-card-body main-card-body">
- <div class="icon-panel grass-icon"><i class="iconfont"></i></div>
- <h4>供应链管理系统</h4>
- </div>
- </a>
- </div>
- </div>
- <div class="layui-col-xs12 layui-col-sm4 layui-col-md3">
- <div class="layui-card">
- <a href="../systemSet/index.html">
- <div class="layui-card-body main-card-body">
- <div class="icon-panel blue-icon"><i class="iconfont"></i></div>
- <h4>系统设置</h4>
- </div>
- </a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 底部 -->
- <div class="layui-footer footer">
- <p>Copyright © 2020-present 技术支持
- <a href="javascript:void(0);">www.gz-xtd.com 信通达智能科技有限公司</a>
- </p>
- </div>
- <script src="../layui/layui.js" type="text/javascript" charset="utf-8"></script>
- <script src="../js/ajaxhook.min.js" type="text/javascript" charset="utf-8"></script>
- <script src="../js/config.js" type="text/javascript" charset="utf-8"></script>
- <script>
- layui.config({
- base: "../js/layuiPlugins/"
- }).use(['element', 'jquery', 'laytpl', 'layer', 'cascade', "form",], function () {
- var element = layui.element,
- form = layui.form,
- laytpl = layui.laytpl,
- layer = layui.layer,
- $ = layui.jquery,
- cascade = layui.cascade;
- var sysInfo = {
- areaPort: { //地区,参数名:接口
- provinceId: 'getProvince',
- cityId: 'getCity',
- countyId: 'getCounty'
- },
- infoSet: localStorage.getItem('sysSet')
- }
- //初始化
- sysInfo.main = function () {
- console.log('维护设置', this.infoSet)
- //初始化地区
- this.areaCascade = cascade.render({
- title: "区域",
- elem: '#areaSelect',
- url: this.areaPort
- })
- //系统维护信息
- if (this.infoSet == 'false') {
- layer.open({
- type: 1,
- title: '系统维护',
- skin: 'layui-layer-demo',
- area: ['750px', '590px'],
- closeBtn: 0,
- anim: 0,
- content: $('#sysSetInfo')
- });
- return;
- }
- };
- sysInfo.main();
- $('#clickInfo').on('click', function () {
- layer.open({
- type: 2,
- title: '',
- skin: 'layui-layer-demo', //样式类名
- closeBtn: 1, //不显示关闭按钮
- anim: 2,
- area: ['600px', '400px'],
- content: '../user/userInfo.html'
- });
- })
- $('#clickPwd').on('click', function () {
- layer.open({
- type: 2,
- title: '',
- skin: 'layui-layer-demo', //样式类名
- closeBtn: 1, //不显示关闭按钮
- anim: 2,
- area: ['600px', '400px'],
- content: '../user/changePwd.html'
- });
- })
- //监听提交
- form.on('submit(formDemo)', function (obj) {
- $.ajax({
- type: this.id ? 'PUT' : 'POST',
- url: 'systemFormUrl',
- data: JSON.stringify(obj.field),
- contentType: 'application/json',
- success: function (res) {
- if (!(res.code - 0)) {
- parent.layer.msg('设置成功,谢谢您的配合', {
- icon: 1
- });
- setTimeout(function () {
- layer.closeAll();
- localStorage.removeItem("sysSet");
- }, 1000)
- } else {
- layer.msg(res.msg, {
- icon: 2
- });
- }
- }
- });
- return false;
- });
- //数据模板
- var userInfo = layui.sessionData(window.hywa.sessionTable.tableName);
- $.ajax({
- type: "get",
- url: 'mainInfo?id=' + userInfo[window.hywa.sessionTable.userData].userId,
- success: function (res) {
- if (!(res.code - 0)) {
- console.log('sj', res)
- let resData = res.data;
- var getTpl = mainTpl.innerHTML,
- view = document.getElementById('mainInfo');
- laytpl(getTpl).render(resData, function (html) {
- view.innerHTML = html;
- var href = location.href.match(/(\S*)main/)[1];
- for (let i = 0; i < resData.length; i++) {
- let t = $('#mainInfo').find('a');
- if (!resData[i].path) {
- $(t[i]).attr('href', '#');
- $(t[i]).on('click', function () {
- layer.msg('此系统未开通', {
- icon: 5
- })
- $(t[i]).attr('target', '');
- })
- } else {
- $(t[i]).attr('href', href + resData[i].path + '?sysId=' +
- resData[i].sysId)
- }
- }
- });
- }
- }
- });
- //用户昵称
- var userInfo = layui.sessionData(window.hywa.sessionTable.tableName);
- $('#userName').html(JSON.stringify(userInfo) != '{}' ? userInfo[window.hywa.sessionTable.userData].name :
- '游客用户');
- //退出
- $('#dropOut').on("click", function () {
- layer.msg('注销中……', {
- icon: 6,
- time: 5000
- });
- $.ajax({
- type: "DELETE",
- url: 'loginOut?userId=' + userInfo[window.hywa.sessionTable.userData].userId,
- success: function (res) {
- if (!(res.code - 0)) {
- layui.sessionData(window.hywa.sessionTable.tableName, null);
- window.sessionStorage.removeItem("menu");
- localStorage.removeItem("sysReps");
- location.href = window.hywa.jumpPage.login;
- } else {
- }
- }
- });
- });
- });
- if (JSON.stringify(layui.sessionData(window.hywa.sessionTable.tableName)) == "{}") {
- layui.sessionData(window.hywa.sessionTable.tableName, null);
- top.location.href = window.hywa.jumpPage.login;
- }
- </script>
- </body>
- </html>
|