login.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <template>
  2. <div style="width: 100%; overflow-y: auto" >
  3. <sticky class-name="sub-navbar2">
  4. <div class="top-wrapper">
  5. <div style="margin-top: 5px; float: left;">
  6. <router-link to="/">
  7. <img src="../assets/img/logo_dagang2.png" style="height:35px;" />
  8. </router-link>
  9. </div>
  10. <div style="float: right;">
  11. <router-link :to="'/signup'">
  12. <el-button type="text" round>没有账户?请注册</el-button>
  13. </router-link>
  14. <router-link :to="'/logingf'">
  15. <el-button type="info" size="small" round>登录供方管理系统</el-button>
  16. </router-link>
  17. </div>
  18. </div>
  19. </sticky>
  20. <div>
  21. <el-menu class="el-menu-demo" mode="horizontal"> <!--@select="handleSelect"-->
  22. <el-menu-item index="1">通知中心</el-menu-item>
  23. <el-menu-item index="2">通知中心</el-menu-item>
  24. <el-menu-item index="3">登录供方管理系统</el-menu-item>
  25. <el-menu-item index="4">账户注册</el-menu-item>
  26. </el-menu>
  27. </div>
  28. <div class="back-width1" style="margin-top: 20px; ">
  29. <div class="login-body1">
  30. <!--<section class="login">
  31. &lt;!&ndash;<el-form class="login-form" auto-complete="off" ref="user" label-position="top">
  32. <h2 class="heading">登录</h2>
  33. <el-button type="primary" :loading="loading">登录</el-button>
  34. </el-form>&ndash;&gt;
  35. <el-row style="margin: 0px auto;">
  36. <el-col :span="12"><el-button type="info" round>我是供应商</el-button></el-col>
  37. <el-col :span="12"><el-button type="primary" plain round>我是管理员</el-button></el-col>
  38. </el-row>
  39. </section>-->
  40. <el-carousel indicator-position="outside">
  41. <el-carousel-item key="1">
  42. <div class="show-img"></div>
  43. </el-carousel-item>
  44. <el-carousel-item key="2">
  45. <div class="show-img"></div>
  46. </el-carousel-item>
  47. <el-carousel-item key="3">
  48. <div class="show-img"></div>
  49. </el-carousel-item>
  50. </el-carousel>
  51. </div>
  52. </div>
  53. <div class="components-container home-wrapper">
  54. <el-card style="width: 1400px; background-color: #F1F3F7">
  55. <el-table fit :data="noticeList" style="width: 100%; background-color: #F1F3F7" max-height="550" >
  56. <el-table-column prop="Name" label="通知标题">
  57. <template slot-scope="scope">
  58. <i class="el-icon-caret-right"></i>
  59. <span style="margin-left: 5px">{{ scope.row.Name }}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column prop="CreateOn" label="时间" width="160">
  63. <template slot-scope="scope">
  64. {{ jstimehandle(scope.row.CreateOn+'') }}
  65. </template>
  66. </el-table-column>
  67. </el-table>
  68. </el-card>
  69. <el-card style="margin: 10px; width: 1400px">
  70. <el-table fit :data="fileList" style="width: 100%;" height="550" @row-click="DownloadFile">
  71. <el-table-column prop="Name" label="文件名">
  72. <template slot-scope="scope">
  73. <i class="el-icon-caret-right"></i>
  74. <a style="margin-left: 5px">{{ scope.row.Name }}</a>
  75. </template>
  76. </el-table-column>
  77. <el-table-column prop="CreateOn" label="时间" width="141">
  78. <template slot-scope="scope">
  79. {{ jstimehandle(scope.row.CreateOn+'') }}
  80. </template>
  81. </el-table-column>
  82. </el-table>
  83. </el-card>
  84. </div>
  85. <div>
  86. <footer class="login-footer" style="margin-top: 10px;">
  87. <div class="home-wrapper" style="height: 30px; background-color: transparent; color:#A9A9A9; padding-top: 10px; text-align: right">
  88. ©大港油田信息中心 版权所有
  89. </div>
  90. </footer>
  91. </div>
  92. </div>
  93. </template>
  94. <script>
  95. import Sticky from '@/components/Sticky'
  96. export default {
  97. layout () {
  98. return 'site'
  99. },
  100. name: 'StickyDemo',
  101. components: { Sticky },
  102. data () {
  103. return {
  104. noticeList: [], //通知列表
  105. fileList: [], //文档列表
  106. }
  107. },
  108. created () {
  109. this.initNoticeListData()
  110. this.initFileListData()
  111. },
  112. methods: {
  113. //获取通知列表
  114. initNoticeListData() {
  115. let _this = this
  116. //传递列名
  117. const params = {
  118. colName: "NoticeTab"
  119. }
  120. _this.$axios.get("/document/getdocumentnameandtime", {params})
  121. .then(function (response) {
  122. _this.noticeList = response.data
  123. })
  124. .catch(function (error) {
  125. console.log(error);
  126. });
  127. },
  128. //获取文件列表
  129. initFileListData() {
  130. let _this = this
  131. //传递列名
  132. const params = {
  133. colName: "DocTab"
  134. }
  135. _this.$axios.get("/document/getdocumentnameandtime", {params})
  136. .then(function (response) {
  137. _this.fileList = response.data
  138. })
  139. .catch(function (error) {
  140. console.log(error);
  141. });
  142. },
  143. //下载文件
  144. DownloadFile(row){
  145. let val = row.FileURL
  146. let urlArr = val.split('|')
  147. location.href = "http://" + urlArr[0]
  148. },
  149. //格式化时间
  150. jstimehandle(val) {
  151. if (val === '') {
  152. return '----'
  153. } else if (val === '0001-01-01T08:00:00+08:00') {
  154. return '----'
  155. } else if (val === '5000-01-01T23:59:59+08:00') {
  156. return '永久'
  157. } else {
  158. val = val.replace('T', ' ')
  159. return val.substring(0, 10)
  160. }
  161. }
  162. }
  163. }
  164. </script>
  165. <style scoped>
  166. .components-container div {
  167. margin: 10px;
  168. }
  169. .time-container {
  170. display: inline-block;
  171. }
  172. .top-wrapper {
  173. margin: 0px auto;
  174. width: 1400px;
  175. /*text-align: right;
  176. alignment: right;*/
  177. flex-direction: row;
  178. }
  179. .home-wrapper{
  180. margin:0px auto;
  181. width: 1400px;
  182. display: flex;
  183. alignment: center;
  184. align-items: center;
  185. flex-direction: column;
  186. }
  187. @import '../assets/styles/base/variables';
  188. .back-width1 {
  189. background-color: #2F79F6;
  190. margin: 0px auto;
  191. left: 0;
  192. right: 0;
  193. top: 20px;
  194. width: 1400px;
  195. /*width: 100%;*/
  196. height: 350px;
  197. }
  198. .show-img {
  199. background: url("../assets/img/tian.png") no-repeat left 50%;
  200. font-family: 'Open Sans', sans-serif;
  201. /*background-color: #2469E8;*/
  202. background-size: cover;
  203. margin: auto;
  204. width: 1400px;
  205. height: 350px;
  206. }
  207. .login-body1 {
  208. /*background-size: cover;
  209. -webkit-background-size: cover;
  210. -moz-background-size: cover;
  211. -o-background-size: cover;*/
  212. /*min-height: 1050px;*/
  213. background-color: #EEF1F6;
  214. margin: auto;
  215. width: 1400px;
  216. height: 350px;
  217. /*
  218. top: 0;
  219. right: 0;
  220. bottom: 0;
  221. left: 0;*/
  222. }
  223. .login-footer {
  224. background-color: #34393D;
  225. font-size: 10px;
  226. clear: both;
  227. display: block;
  228. text-align: center;
  229. margin: 0px auto;
  230. bottom: 10px;
  231. width: 100%;
  232. a {
  233. color: $brand-color;
  234. }
  235. }
  236. .login {
  237. /*flex: 1;
  238. width: 100%;*/
  239. position: relative;
  240. max-width: 22rem;
  241. top: 230px;
  242. left: 50px;
  243. font-size: 0.875rem;
  244. opacity: 0.9;
  245. &-header {
  246. margin-bottom: 1rem;
  247. .brand {
  248. margin: 4.5rem 0 3.5rem;
  249. text-align: center;
  250. letter-spacing: 0.125rem;
  251. a {
  252. margin: 0;
  253. color: $brand-color;
  254. font: 300 3rem sans-serif;
  255. &:hover {
  256. color: $brand-hover-color;
  257. text-shadow: 0 0 1rem $brand-hover-color;
  258. }
  259. }
  260. }
  261. }
  262. &-form {
  263. margin-bottom: 2.5rem;
  264. padding: 1.875rem 1.25rem;
  265. background: $login-form-background;
  266. color: $login-form-color;
  267. .heading {
  268. margin: 0 0 1rem;
  269. font-weight: 400;
  270. font-size: 1.5rem;
  271. }
  272. .el-button {
  273. margin-top: 0.5rem;
  274. width: 100%;
  275. }
  276. }
  277. }
  278. .nuxt-progress {
  279. display: none;
  280. }
  281. </style>