admin-info.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>资料详情</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css & js 资源 -->
  8. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/httpVueLoader.js"></script>
  13. <script src="../../static/kj/jquery.min.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. <style type="text/css">
  17. /* 使长度更长点 */
  18. /* .c-panel .c-label{width: 10em;} */
  19. .vue-box,.c-panel{background-color: #EEE;}
  20. .c-panel .c-title{margin-bottom: 20px;}
  21. .c-item .c-label{width: 150px;}
  22. .c-item .el-input{width: 300px;}
  23. /* 链接样式 */
  24. .my-link{position: relative; top: -1px; margin-left: 0.5em;}
  25. table {
  26. font-family: arial, sans-serif;
  27. border-collapse: collapse;
  28. width: 90%;
  29. margin-top: 26px ;
  30. margin-left: auto;
  31. margin-right: auto;
  32. }
  33. th {
  34. border: 1px solid darkgray;
  35. text-align: left;
  36. height: 30px;
  37. padding: 8px;
  38. background-color: #dddddd;
  39. }
  40. td {
  41. border: 1px solid darkgray;
  42. text-align: left;
  43. padding: 8px;
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <div class="vue-box sbot" style="display: none;" :style="'display: block;'">
  49. <!-- ------- 内容部分 ------- -->
  50. <div class="s-body">
  51. <div class="c-panel">
  52. <el-form v-if="m">
  53. <div style="height: 10px;"></div>
  54. <table>
  55. <tr>
  56. <th>编号</th>
  57. <td>{{m.id}}</td>
  58. </tr>
  59. <tr>
  60. <th>名称</th>
  61. <td>{{m.name}}</td>
  62. </tr>
  63. <tr>
  64. <th>手机</th>
  65. <td>{{m.phone || '无'}}</td>
  66. </tr>
  67. <tr>
  68. <th>角色</th>
  69. <td>{{m.roleName}}</td>
  70. </tr>
  71. <tr>
  72. <th>创建账号</th>
  73. <td><span v-if="m.createByAid == -1">无</span>
  74. <a v-else :href=" 'admin-info.html?id=' + m.createByAid">{{m.createByAid}}</a></td>
  75. </tr>
  76. <tr>
  77. <th>创建时间</th>
  78. <td>{{sa.forDate(m.createTime, 2)}}</td>
  79. </tr>
  80. <tr>
  81. <th>最后登录</th>
  82. <td>{{sa.forDate(m.loginTime, 2) || '无'}}</td>
  83. </tr>
  84. <tr>
  85. <th>最后登录IP</th>
  86. <td>{{m.loginIp || '无'}}</td>
  87. </tr>
  88. </table>
  89. </el-form>
  90. </div>
  91. </div>
  92. <!-- ------- 底部按钮 ------- -->
  93. <div class="s-foot">
  94. <el-button type="success" @click="sa.closeCurrIframe()">确定</el-button>
  95. <el-button @click="sa.closeCurrIframe()">取消</el-button>
  96. </div>
  97. </div>
  98. <script type="text/javascript">
  99. var app = new Vue({
  100. components: {
  101. "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
  102. },
  103. el: '.vue-box',
  104. data: {
  105. id: parseInt(sa.p('id', 0)),
  106. sa: sa,
  107. m: null
  108. },
  109. methods: {
  110. // ok
  111. ok: function(pageNo) {
  112. sa.closeCurrIframe();
  113. },
  114. },
  115. created: function() {
  116. if(this.id == 0 || this.id == sa.$sys.getCurrUser().id) {
  117. sa.ajax('/sp-admin/admin/getByCurr', function(res) {
  118. this.m = res.data;
  119. }.bind(this));
  120. } else {
  121. sa.ajax('/sp-admin/admin/getById?id=' + this.id, function(res) {
  122. this.m = res.data;
  123. }.bind(this));
  124. }
  125. }
  126. })
  127. </script>
  128. </body>
  129. </html>