血透系统pad前端

index.vue 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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" style="display:none">
  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. <router-link to="/privacy">
  98. <div class="name">
  99. <div class="left">
  100. <img src="../../assets/my/privacy.png" alt />
  101. <span>隐私协议</span>
  102. </div>
  103. <span class="iconfont jiantou">&#xe6f9;</span>
  104. </div>
  105. </router-link>
  106. <router-link to="/userAgreement">
  107. <div class="name">
  108. <div class="left">
  109. <img src="../../assets/my/user.png" alt />
  110. <span>用户协议</span>
  111. </div>
  112. <span class="iconfont jiantou">&#xe6f9;</span>
  113. </div>
  114. </router-link>
  115. <div class="name" @click="logout">
  116. <div class="left">
  117. <img src="../../assets/my/exit.png" alt />
  118. <span>退出登录</span>
  119. </div>
  120. <span class="iconfont jiantou">&#xe6f9;</span>
  121. </div>
  122. </div>
  123. </div>
  124. <side-bar :active_index="3"></side-bar>
  125. </div>
  126. </template>
  127. <script>
  128. import SideBar from "@/pages/layout/SideBar";
  129. import EditPersonal from "./EditPersonal";
  130. import { GetMyInfo } from "@/api/admin_user";
  131. import { Toast } from "vant";
  132. export default {
  133. name: "PersonalIndex",
  134. components: {
  135. SideBar,
  136. EditPersonal
  137. },
  138. data() {
  139. return {
  140. electronicsignature: "",
  141. myinfo: {},
  142. avatar: "@/assets/product/test.jpg",
  143. user_name: ""
  144. };
  145. },
  146. created() {
  147. this.GetMyInfo();
  148. },
  149. methods: {
  150. GetMyInfo() {
  151. GetMyInfo().then(response => {
  152. if (response.data.state == 1) {
  153. var roleInfo = response.data.data.roleInfo;
  154. this.user_name = roleInfo.user_name;
  155. console.log("hhhhhhhhhhhhh", response.data.data.roleInfo);
  156. this.electronicsignature =
  157. response.data.data.electronic_signature === null
  158. ? ""
  159. : response.data.data.electronic_signature.url;
  160. this.myinfo =
  161. response.data.data.roleInfo === null
  162. ? {}
  163. : response.data.data.roleInfo;
  164. }
  165. });
  166. },
  167. logout: function() {
  168. // TODO 请求退出登录接口
  169. this.$router.push("/");
  170. }
  171. }
  172. };
  173. </script>
  174. <style style="stylesheet/scss" lang="scss" scoped>
  175. .mainContent {
  176. .title {
  177. font-size: 0.36rem;
  178. padding: 0.3rem 0;
  179. // color: $title-color;
  180. text-align: center;
  181. position: fixed;
  182. top: 0;
  183. left: 0;
  184. right: 0;
  185. z-index: 1000;
  186. background: #fff;
  187. }
  188. .information {
  189. width: 100%;
  190. margin: 0 auto;
  191. padding-top: 63px;
  192. min-height: calc(100vh - 2px);
  193. .name {
  194. background: #fff;
  195. width: 70%;
  196. margin: 0 auto;
  197. border-bottom: 1px #e5e5e5 solid;
  198. .item {
  199. padding: 0.37rem 0.4rem;
  200. @include align-items-center;
  201. @include display-flex;
  202. @include justify-content-between;
  203. @include text-align;
  204. .tx {
  205. @include display-flex;
  206. @include align-items-center;
  207. @include text-align;
  208. width: 1.24rem;
  209. height: 1.24rem;
  210. border-radius: 50%;
  211. margin-right: 0.26rem;
  212. overflow: hidden;
  213. box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  214. img {
  215. width: 100%;
  216. height: 100%;
  217. object-fit: cover;
  218. }
  219. h2 {
  220. color: #34495e;
  221. font-size: 0.34rem;
  222. }
  223. }
  224. .iconfont {
  225. font-size: 0.4rem;
  226. }
  227. }
  228. &:last-child {
  229. border: none;
  230. }
  231. }
  232. .set {
  233. background: #fff;
  234. width: 70%;
  235. margin: 0 auto;
  236. border-radius: 4px;
  237. margin-top: 0.3rem;
  238. .item {
  239. padding: 0.3rem;
  240. @include align-items-center;
  241. @include display-flex;
  242. @include justify-content-between;
  243. @include text-align;
  244. border-bottom: 1px #e5e5e5 solid;
  245. &:last-child {
  246. border: none;
  247. }
  248. .tx {
  249. @include display-flex;
  250. @include align-items-center;
  251. @include text-align;
  252. img {
  253. width: 0.42rem;
  254. height: 0.42rem;
  255. border-radius: 50%;
  256. display: inline-block;
  257. margin-right: 0.3rem;
  258. }
  259. h2 {
  260. color: #34495e;
  261. font-size: 0.3rem;
  262. }
  263. }
  264. }
  265. .out {
  266. text-align: center;
  267. height: 0.9rem;
  268. line-height: 0.9rem;
  269. display: block;
  270. color: #f18f68;
  271. font-size: 0.34rem;
  272. }
  273. }
  274. }
  275. }
  276. .el-collapse-item__header {
  277. font-size: 0.3rem !important;
  278. }
  279. .mainBox {
  280. height: 100%;
  281. display: flex;
  282. flex-direction: column;
  283. overflow: hidden;
  284. > :first-child {
  285. flex: 1;
  286. overflow: auto;
  287. }
  288. .myTitle {
  289. height: 1.4rem;
  290. line-height: 1.4rem;
  291. width: 100%;
  292. background: #3275fd;
  293. text-align: center;
  294. color: #fff;
  295. font-size: 0.6rem;
  296. }
  297. .mybanner {
  298. height: 30%;
  299. position: relative;
  300. .bannerOne {
  301. position: absolute;
  302. }
  303. img {
  304. width: 100%;
  305. height: 100%;
  306. }
  307. .avatar {
  308. position: absolute;
  309. width: 4rem;
  310. top: 1.3rem;
  311. left: 0;
  312. right: 0;
  313. bottom: 0;
  314. margin: auto;
  315. text-align: center;
  316. img {
  317. width: 2.5rem;
  318. height: 2.5rem;
  319. }
  320. p {
  321. font-size: 0.5rem;
  322. color: #fff;
  323. margin-top: 0.2rem;
  324. }
  325. }
  326. }
  327. .name {
  328. display: flex;
  329. height: 1.8rem;
  330. line-height: 1.8rem;
  331. background: #fff;
  332. margin: 0 0.4rem;
  333. padding: 0 0.4rem;
  334. display: flex;
  335. justify-content: space-between;
  336. border-radius: 5px;
  337. margin-top: 0.5rem;
  338. .left {
  339. height: 100%;
  340. line-height: 1.8rem;
  341. display: flex;
  342. align-items: center;
  343. span {
  344. color: #34495e;
  345. font-size: 0.5rem;
  346. margin-left: 0.4rem;
  347. }
  348. }
  349. img {
  350. width: 1rem;
  351. height: 1rem;
  352. display: inline-block;
  353. }
  354. .jiantou {
  355. font-size: 0.6rem;
  356. }
  357. }
  358. }
  359. </style>