血透系统pad前端

index.vue 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <div class="mainBox">
  3. <div class="mainContent">
  4. <!-- <h1 class="title">我的</h1>
  5. <div class="information">
  6. <div class="blueBorder"></div>
  7. <div class="name">
  8. <router-link to="/EditPersonal">
  9. <div class="item">
  10. <div class="tx">
  11. <img :src="myinfo.avatar" alt v-if="myinfo.avatar != ''" />
  12. <img :src="avatar" alt v-if="myinfo.avatar == ''" />
  13. </div>
  14. <span class="iconfont">&#xe6f9;</span>
  15. </div>
  16. </router-link>
  17. </div>
  18. <div class="name">
  19. <router-link to="/ElectronicSignature">
  20. <div class="item">
  21. <div class="tx">
  22. <img :src="electronicsignature" alt v-if="electronicsignature" />
  23. <h2>电子签名</h2>
  24. </div>
  25. <span class="iconfont">&#xe6f9;</span>
  26. </div>
  27. </router-link>
  28. </div>
  29. <div class="set" v-show="false">
  30. <div class="item">
  31. <div class="tx">
  32. <img src="@/assets/my/12.png" alt />
  33. <h2>消息通知</h2>
  34. </div>
  35. <span class="iconfont">&#xe6f9;</span>
  36. </div>
  37. <div class="item">
  38. <div class="tx">
  39. <img src="@/assets/my/13.png" alt />
  40. <h2>系统设置</h2>
  41. </div>
  42. <span class="iconfont">&#xe6f9;</span>
  43. </div>
  44. <div class="item">
  45. <div class="tx">
  46. <img src="@/assets/my/14.png" alt />
  47. <h2>软件更新</h2>
  48. </div>
  49. <span class="iconfont">&#xe6f9;</span>
  50. </div>
  51. <div class="item">
  52. <div class="tx">
  53. <img src="@/assets/my/15.png" alt />
  54. <h2>使用帮助</h2>
  55. </div>
  56. <span class="iconfont">&#xe6f9;</span>
  57. </div>
  58. <div class="item">
  59. <div class="tx">
  60. <img src="@/assets/my/16.png" alt />
  61. <h2>关于我们</h2>
  62. </div>
  63. <span class="iconfont">&#xe6f9;</span>
  64. </div>
  65. </div>
  66. <div class="set">
  67. <span class="out" @click="logout">退出登录</span>
  68. </div>
  69. </div>-->
  70. <!-- <div class="myTitle">我的</div> -->
  71. <div class="mybanner">
  72. <img class="bannerOne" src="../../assets/my/myBanner.png" alt />
  73. <div class="avatar">
  74. <img src="../../assets/my/avatar.png" alt />
  75. <p>{{ user_name }}</p>
  76. </div>
  77. </div>
  78. <div class="list">
  79. <router-link to="/ElectronicSignature">
  80. <div class="name">
  81. <div class="left">
  82. <img src="../../assets/my/name.png" alt />
  83. <span>电子签名</span>
  84. </div>
  85. <span class="iconfont jiantou">&#xe6f9;</span>
  86. </div>
  87. </router-link>
  88. <!-- <router-link to="/ChangePassword"> -->
  89. <div class="name" @click="okk">
  90. <div class="left">
  91. <img src="../../assets/my/modification.png" alt />
  92. <span>修改密码</span>
  93. </div>
  94. <span class="iconfont jiantou">&#xe6f9;</span>
  95. </div>
  96. <!-- </router-link> -->
  97. <div class="name" @click="logout">
  98. <div class="left">
  99. <img src="../../assets/my/exit.png" alt />
  100. <span>退出登录</span>
  101. </div>
  102. <span class="iconfont jiantou">&#xe6f9;</span>
  103. </div>
  104. </div>
  105. </div>
  106. <side-bar :active_index="3"></side-bar>
  107. </div>
  108. </template>
  109. <script>
  110. import SideBar from "@/pages/layout/SideBar";
  111. import EditPersonal from "./EditPersonal";
  112. import { GetMyInfo } from "@/api/admin_user";
  113. import { Toast } from "vant";
  114. export default {
  115. name: "PersonalIndex",
  116. components: {
  117. SideBar,
  118. EditPersonal
  119. },
  120. data() {
  121. return {
  122. electronicsignature: "",
  123. myinfo: {},
  124. avatar: "@/assets/product/test.jpg",
  125. user_name: ""
  126. };
  127. },
  128. created() {
  129. this.GetMyInfo();
  130. },
  131. methods: {
  132. GetMyInfo() {
  133. GetMyInfo().then(response => {
  134. if (response.data.state == 1) {
  135. var roleInfo = response.data.data.roleInfo;
  136. this.user_name = roleInfo.user_name;
  137. console.log("hhhhhhhhhhhhh", response.data.data.roleInfo);
  138. this.electronicsignature =
  139. response.data.data.electronic_signature === null
  140. ? ""
  141. : response.data.data.electronic_signature.url;
  142. this.myinfo =
  143. response.data.data.roleInfo === null
  144. ? {}
  145. : response.data.data.roleInfo;
  146. }
  147. });
  148. },
  149. logout: function() {
  150. // TODO 请求退出登录接口
  151. this.$router.push("/");
  152. },
  153. okk() {
  154. Toast.success("程序员还在开发中");
  155. }
  156. }
  157. };
  158. </script>
  159. <style style="stylesheet/scss" lang="scss" scoped>
  160. .mainContent {
  161. .title {
  162. font-size: 0.36rem;
  163. padding: 0.3rem 0;
  164. // color: $title-color;
  165. text-align: center;
  166. position: fixed;
  167. top: 0;
  168. left: 0;
  169. right: 0;
  170. z-index: 1000;
  171. background: #fff;
  172. }
  173. .information {
  174. width: 100%;
  175. margin: 0 auto;
  176. padding-top: 63px;
  177. min-height: calc(100vh - 2px);
  178. .name {
  179. background: #fff;
  180. width: 70%;
  181. margin: 0 auto;
  182. border-bottom: 1px #e5e5e5 solid;
  183. .item {
  184. padding: 0.37rem 0.4rem;
  185. @include align-items-center;
  186. @include display-flex;
  187. @include justify-content-between;
  188. @include text-align;
  189. .tx {
  190. @include display-flex;
  191. @include align-items-center;
  192. @include text-align;
  193. width: 1.24rem;
  194. height: 1.24rem;
  195. border-radius: 50%;
  196. margin-right: 0.26rem;
  197. overflow: hidden;
  198. box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  199. img {
  200. width: 100%;
  201. height: 100%;
  202. object-fit: cover;
  203. }
  204. h2 {
  205. color: #34495e;
  206. font-size: 0.34rem;
  207. }
  208. }
  209. .iconfont {
  210. font-size: 0.4rem;
  211. }
  212. }
  213. &:last-child {
  214. border: none;
  215. }
  216. }
  217. .set {
  218. background: #fff;
  219. width: 70%;
  220. margin: 0 auto;
  221. border-radius: 4px;
  222. margin-top: 0.3rem;
  223. .item {
  224. padding: 0.3rem;
  225. @include align-items-center;
  226. @include display-flex;
  227. @include justify-content-between;
  228. @include text-align;
  229. border-bottom: 1px #e5e5e5 solid;
  230. &:last-child {
  231. border: none;
  232. }
  233. .tx {
  234. @include display-flex;
  235. @include align-items-center;
  236. @include text-align;
  237. img {
  238. width: 0.42rem;
  239. height: 0.42rem;
  240. border-radius: 50%;
  241. display: inline-block;
  242. margin-right: 0.3rem;
  243. }
  244. h2 {
  245. color: #34495e;
  246. font-size: 0.3rem;
  247. }
  248. }
  249. }
  250. .out {
  251. text-align: center;
  252. height: 0.9rem;
  253. line-height: 0.9rem;
  254. display: block;
  255. color: #f18f68;
  256. font-size: 0.34rem;
  257. }
  258. }
  259. }
  260. }
  261. .el-collapse-item__header {
  262. font-size: 0.3rem !important;
  263. }
  264. .mainBox {
  265. height: 100%;
  266. display: flex;
  267. flex-direction: column;
  268. overflow: hidden;
  269. > :first-child {
  270. flex: 1;
  271. overflow: auto;
  272. }
  273. .myTitle {
  274. height: 1.4rem;
  275. line-height: 1.4rem;
  276. width: 100%;
  277. background: #3275fd;
  278. text-align: center;
  279. color: #fff;
  280. font-size: 0.6rem;
  281. }
  282. .mybanner {
  283. height: 30%;
  284. position: relative;
  285. .bannerOne {
  286. position: absolute;
  287. }
  288. img {
  289. width: 100%;
  290. height: 100%;
  291. }
  292. .avatar {
  293. position: absolute;
  294. width: 4rem;
  295. top: 1.3rem;
  296. left: 0;
  297. right: 0;
  298. bottom: 0;
  299. margin: auto;
  300. text-align: center;
  301. img {
  302. width: 2.5rem;
  303. height: 2.5rem;
  304. }
  305. p {
  306. font-size: 0.5rem;
  307. color: #fff;
  308. margin-top: 0.2rem;
  309. }
  310. }
  311. }
  312. .name {
  313. display: flex;
  314. height: 1.8rem;
  315. line-height: 1.8rem;
  316. background: #fff;
  317. margin: 0 0.4rem;
  318. padding: 0 0.4rem;
  319. display: flex;
  320. justify-content: space-between;
  321. border-radius: 5px;
  322. margin-top: 0.5rem;
  323. .left {
  324. height: 100%;
  325. line-height: 1.8rem;
  326. display: flex;
  327. align-items: center;
  328. span {
  329. color: #34495e;
  330. font-size: 0.5rem;
  331. margin-left: 0.4rem;
  332. }
  333. }
  334. img {
  335. width: 1rem;
  336. height: 1rem;
  337. display: inline-block;
  338. }
  339. .jiantou {
  340. font-size: 0.6rem;
  341. }
  342. }
  343. }
  344. </style>