index.vue 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <div class="page_my">
  3. <div class="myTop">
  4. <img src="../../assets/images/myBanner.png" alt />
  5. <div class="avatar">
  6. <img v-if="roleInfo.avatar != ''" :src="roleInfo.avatar" alt />
  7. <img
  8. v-if="roleInfo.avatar == ''"
  9. src="../../assets/images/mydefault.png"
  10. alt
  11. />
  12. </div>
  13. <div class="userMain" @click="toMyIndex">
  14. <div class="userBox">
  15. <div class="userTxt">
  16. <span v-if="roleInfo.user_name!=''"><p class="userName">{{ roleInfo.user_name }}</p></span>
  17. <span v-if="roleInfo.user_name==''"><p class="userName">{{ userName.name }}</p></span>
  18. <p class="signature">{{ roleInfo.message }}</p>
  19. </div>
  20. <van-icon name="arrow" />
  21. </div>
  22. </div>
  23. <div class="invitebox">
  24. <img src="../../assets/images/invite.png" alt />
  25. </div>
  26. <div class="myInfo" @click="toMyInfo">
  27. <div class="myInfoLeft">
  28. <img src="../../assets/images/myIcon1.png" alt />
  29. <p>我的信息</p>
  30. </div>
  31. <van-icon class="arrow" name="arrow" />
  32. </div>
  33. <router-link to="/ElectronicSignature">
  34. <div class="myInfo1">
  35. <div class="myInfoLeft">
  36. <img src="../../assets/images/myIcon9.png" alt />
  37. <p>电子签名</p>
  38. </div>
  39. <van-icon class="arrow" name="arrow" />
  40. </div>
  41. </router-link>
  42. </div>
  43. <div class="myBox">
  44. <div class="myBoxOne">
  45. <div class="myInfoLeft">
  46. <img src="../../assets/images/myIcon2.png" alt />
  47. <p>我的医院/组织/团队</p>
  48. </div>
  49. <van-icon class="arrow" name="arrow" />
  50. </div>
  51. <div class="myBoxTwo noBorder" v-for="(item,index) in organaziton" :key="index">
  52. <div class="myInfoLeft">
  53. <span v-if="item.org_logo == ''"><img src="../../assets/images/m01.png" alt /></span>
  54. <span v-if="item.org_logo !==''"><img :src="item.org_logo"></span>
  55. <p>{{item.org_name}}</p>
  56. </div>
  57. <div class="myInfoRight" v-if="item.is_super_admin == 1">
  58. <div class="myInfoRightBtn" @click="toEditOrg()">管理</div>
  59. <van-icon class="arrow" name="arrow" @click="toManage"/>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="myBox">
  64. <router-link to="/perfectOrg">
  65. <div class="myBoxOne">
  66. <div class="myInfoLeft">
  67. <img src="../../assets/images/myIcon3.png" alt />
  68. <p>创建医院/组织/团队</p>
  69. </div>
  70. <van-icon class="arrow" name="arrow" />
  71. </div>
  72. </router-link>
  73. <router-link to="/modifypsw">
  74. <div class="myBoxOne">
  75. <div class="myInfoLeft">
  76. <img src="../../assets/images/myIcon4.png" alt />
  77. <p>修改密码</p>
  78. </div>
  79. <van-icon class="arrow" name="arrow" />
  80. </div>
  81. </router-link>
  82. </div>
  83. <div class="myBox">
  84. <!-- <div class="myBoxOne">-->
  85. <!-- <div class="myInfoLeft">-->
  86. <!-- <img src="../../assets/images/myIcon5.png" alt />-->
  87. <!-- <p>常见问题</p>-->
  88. <!-- </div>-->
  89. <!-- <van-icon class="arrow" name="arrow" />-->
  90. <!-- </div>-->
  91. <!-- <div class="myBoxOne" @click="toFeed">-->
  92. <!-- <div class="myInfoLeft">-->
  93. <!-- <img src="../../assets/images/myIcon6.png" alt />-->
  94. <!-- <p>意见反馈</p>-->
  95. <!-- </div>-->
  96. <!-- <van-icon class="arrow" name="arrow" />-->
  97. <!-- </div>-->
  98. <router-link to="/about">
  99. <div class="myBoxOne">
  100. <div class="myInfoLeft">
  101. <img src="../../assets/images/myIcon7.png" alt />
  102. <p>关于我们</p>
  103. </div>
  104. <van-icon class="arrow" name="arrow" />
  105. </div>
  106. </router-link>
  107. </div>
  108. <div class="myBox" @click="LoginOut">
  109. <div class="myBoxOne" @click="LoginOut">
  110. <div class="myInfoLeft">
  111. <img src="../../assets/images/myIcon8.png" alt />
  112. <div>
  113. <p>退出登录</p>
  114. </div>
  115. </div>
  116. <van-icon class="arrow" name="arrow" />
  117. </div>
  118. </div>
  119. </div>
  120. </template>
  121. <script>
  122. import {
  123. getMyInformation,
  124. LoginOut,
  125. getMyOrganazition,
  126. getMyInforName
  127. } from "@/api/patient/patient";
  128. import { uParseTime } from "@/utils/tools";
  129. export default {
  130. data() {
  131. return {
  132. roleInfo: {},
  133. admin_user_id: 0,
  134. adminid: 0,
  135. organaziton: [],
  136. userName: {}
  137. };
  138. },
  139. methods: {
  140. LoginOut() {
  141. LoginOut().then(response => {
  142. if (response.data.state === 1) {
  143. var msg = response.data.data.msg;
  144. console.log("msg是", msg);
  145. this.isRouterAlive = false;
  146. this.$nextTick(function() {
  147. this.isRouterAlive = true;
  148. });
  149. this.$router.replace("/login");
  150. }
  151. });
  152. },
  153. getMyInformation(id) {
  154. getMyInformation(id).then(response => {
  155. if (response.data.state === 1) {
  156. var roleInfo = response.data.data.roleInfo;
  157. console.log("roleInfo", roleInfo);
  158. this.admin_user_id = roleInfo.id;
  159. this.adminid = roleInfo.admin_user_id;
  160. this.roleInfo = roleInfo;
  161. }
  162. });
  163. },
  164. getMyOrganazition(id) {
  165. getMyOrganazition(id).then(response => {
  166. if (response.data.state === 1) {
  167. var organaziton = response.data.data.organaziton;
  168. this.organaziton = organaziton;
  169. }
  170. });
  171. },
  172. getMyInforName(id) {
  173. getMyInforName(id).then(response => {
  174. if (response.data.state === 1) {
  175. var Rolename = response.data.data.Rolename;
  176. var username = response.data.data.Username;
  177. this.userName = username;
  178. }
  179. });
  180. },
  181. getTime(time) {
  182. // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
  183. return uParseTime(time, "{y}-{m}-{d}");
  184. },
  185. toFeed() {
  186. this.$router.push("/feedBack?id=" + this.admin_user_id);
  187. },
  188. toMyInfo() {
  189. this.$router.push("/myInfo?id=" + this.admin_user_id);
  190. },
  191. toManage() {
  192. this.$router.push("/organizationinfo?id=" + this.adminid);
  193. },
  194. toEditOrg() {
  195. this.$router.push("/newMy");
  196. },
  197. toMyIndex() {
  198. this.$router.push("/myInfo?id=" + this.admin_user_id);
  199. }
  200. },
  201. created() {
  202. var adminid = this.$store.getters.user.user.id;
  203. this.getMyInformation(adminid);
  204. this.getMyOrganazition(adminid);
  205. this.getMyInforName(adminid);
  206. }
  207. };
  208. </script>
  209. <style lang="scss" scoped>
  210. .page_my {
  211. height: 100%;
  212. overflow-x: hidden;
  213. overflow-y: auto;
  214. background: #fafafa;
  215. .myTop {
  216. position: relative;
  217. height: 20rem;
  218. img {
  219. width: 100%;
  220. height: 11.25rem;
  221. }
  222. .avatar {
  223. position: absolute;
  224. left: 1rem;
  225. top: 2.5rem;
  226. width: 4.375rem;
  227. height: 4.375rem;
  228. background: rgba(50, 50, 50, 1);
  229. // border: 2px solid rgba(255, 255, 255, 1);
  230. border-radius: 50%;
  231. img {
  232. border-radius: 50%;
  233. width: 100%;
  234. height: 100%;
  235. }
  236. }
  237. .userMain {
  238. position: absolute;
  239. left: 6.25rem;
  240. top: 3.375rem;
  241. width: 70%;
  242. color: #fff;
  243. }
  244. .userBox {
  245. display: flex;
  246. justify-content: space-between;
  247. align-items: center;
  248. }
  249. .userName {
  250. font-size: 1.25rem;
  251. margin-bottom: 0.625rem;
  252. }
  253. .signature {
  254. font-size: 0.75rem;
  255. }
  256. .invitebox {
  257. width: 21.5625rem;
  258. height: 4.75rem;
  259. position: absolute;
  260. top: 8.75rem;
  261. left: 0.9375rem;
  262. box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.16);
  263. img {
  264. height: 100%;
  265. width: 100%;
  266. }
  267. }
  268. .myInfo {
  269. width: 100%;
  270. height: 3.125rem;
  271. display: flex;
  272. align-items: center;
  273. justify-content: space-between;
  274. margin-top: 2.25rem;
  275. padding: 0 0.875rem;
  276. background: #fff;
  277. border-bottom: 1px solid #e5e5e5;
  278. .myInfoLeft {
  279. display: flex;
  280. align-items: center;
  281. height: 100%;
  282. img {
  283. width: 1.125rem;
  284. height: 1.125rem;
  285. margin-right: 0.5rem;
  286. }
  287. p {
  288. margin-top: 0.125rem;
  289. }
  290. }
  291. .arrow {
  292. color: #9f9f9f;
  293. }
  294. }
  295. .myInfo1 {
  296. width: 100%;
  297. height: 3.125rem;
  298. display: flex;
  299. align-items: center;
  300. justify-content: space-between;
  301. padding: 0 0.875rem;
  302. background: #fff;
  303. .myInfoLeft {
  304. display: flex;
  305. align-items: center;
  306. height: 100%;
  307. img {
  308. width: 1.125rem;
  309. height: 1.125rem;
  310. margin-right: 0.5rem;
  311. }
  312. p {
  313. margin-top: 0.125rem;
  314. }
  315. }
  316. .arrow {
  317. color: #9f9f9f;
  318. }
  319. }
  320. }
  321. .myBox {
  322. margin: 0.8125rem 0;
  323. background: #fff;
  324. > div:last-child {
  325. border: none;
  326. }
  327. .myBoxOne {
  328. width: 100%;
  329. height: 3.125rem;
  330. display: flex;
  331. align-items: center;
  332. justify-content: space-between;
  333. padding: 0 0.875rem;
  334. border-bottom: 1px solid #e5e5e5;
  335. .myInfoLeft {
  336. display: flex;
  337. align-items: center;
  338. height: 100%;
  339. img {
  340. width: 1.125rem;
  341. height: 1.125rem;
  342. margin-right: 0.5rem;
  343. }
  344. // p {
  345. // margin-top: 0.125rem;
  346. // }
  347. }
  348. .arrow {
  349. color: #9f9f9f;
  350. }
  351. }
  352. .myBoxTwo {
  353. height: 3.125rem;
  354. display: flex;
  355. align-items: center;
  356. justify-content: space-between;
  357. padding-right: 0.875rem;
  358. background: #fff;
  359. margin-left: 2.5rem;
  360. border-bottom: 1px solid #e5e5e5;
  361. .myInfoLeft {
  362. display: flex;
  363. align-items: center;
  364. height: 100%;
  365. img {
  366. width: 1.875rem;
  367. height: 1.875rem;
  368. margin-right: 0.5rem;
  369. }
  370. // p {
  371. // margin-top: 0.125rem;
  372. // }
  373. }
  374. .myInfoRight {
  375. display: flex;
  376. align-items: center;
  377. .myInfoRightBtn {
  378. width: 3.625rem;
  379. height: 1.875rem;
  380. background: rgba(255, 255, 255, 1);
  381. border: 1px solid rgba(51, 138, 251, 1);
  382. border-radius: 0.3125rem;
  383. text-align: center;
  384. line-height: 1.875rem;
  385. color: #338afb;
  386. font-size: 0.9375rem;
  387. margin-right: 0.625rem;
  388. }
  389. }
  390. .arrow {
  391. color: #9f9f9f;
  392. }
  393. }
  394. }
  395. a {
  396. color: #000;
  397. }
  398. }
  399. </style>