My.cshtml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. @{
  2. ViewBag.Title = "My";
  3. Layout = "~/Views/MobileProblem/_APPMain.cshtml";
  4. var url = HttpContext.Current.Request.Url;
  5. var webSite = String.Concat(url.Scheme, "://", url.Authority);
  6. }
  7. <link href="~/Content/Style/MobileProductRegist/iconfont.css" rel="stylesheet" />
  8. <script src="~/Content/Scripts/plugins/mui/fonts/iconfont.js"></script>
  9. <script src="~/Content/Scripts/plugins/mui/fonts/home.js"></script>
  10. <script type="text/babel" src="~/ViewModels/JY.AppInterface.js?v=1.32"></script>
  11. <script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>
  12. <script src="https://cdn.jsdelivr.net/npm/tween.js@16.3.4"></script>
  13. <script src="~/Content/Scripts/babel.min.js"></script>
  14. <style>
  15. .mui-active {
  16. color: #2ab8ff !important;
  17. }
  18. .icon-soushuo {
  19. color: white;
  20. }
  21. .my-background {
  22. position: relative;
  23. height: 10rem;
  24. width: 100%;
  25. background-color: #00aaff;
  26. }
  27. .mycard {
  28. bottom: -6rem;
  29. z-index: 1;
  30. }
  31. .myhead {
  32. width: 5rem;
  33. height: 5rem;
  34. border-radius: 40px;
  35. box-shadow: 0 0 7px rgb(183, 210, 255);
  36. position: absolute;
  37. top: 4rem;
  38. left: 50%;
  39. margin-left: -2.5rem;
  40. z-index: 2;
  41. }
  42. .cardiv {
  43. width: 100%;
  44. display: flex;
  45. flex-direction: row;
  46. justify-content: space-around;
  47. align-items: center;
  48. }
  49. .problem-summa {
  50. text-align: center;
  51. }
  52. #rela li {
  53. position: static;
  54. font-size: 14px;
  55. padding-right: 39px;
  56. }
  57. .mui-card {
  58. margin: 0 10px 10px 10px;
  59. }
  60. .mui-active {
  61. color: black !important;
  62. }
  63. .mui-deaflut {
  64. color: #2ab8ff !important;
  65. }
  66. #nobef::before, #nobef::after {
  67. position: relative;
  68. }
  69. .mui-card-footer my {
  70. max-height: 15px;
  71. }
  72. .my {
  73. display: flex;
  74. flex-direction: row;
  75. align-items: center;
  76. justify-content: center;
  77. }
  78. .we {
  79. display: flex;
  80. flex-direction: row;
  81. align-items: center;
  82. justify-content: space-between;
  83. width: 100%;
  84. }
  85. .ncs {
  86. display: flex;
  87. flex-direction: column;
  88. align-items: center;
  89. justify-content: center;
  90. }
  91. .boxx {
  92. flex: 1;
  93. height: 60px;
  94. align-self: flex-start;
  95. }
  96. .overf {
  97. word-break: break-all;
  98. display: -webkit-box;
  99. -webkit-box-orient: vertical;
  100. overflow: hidden;
  101. text-overflow: ellipsis;
  102. }
  103. .icon {
  104. width: 1.5em;
  105. height: 1.5em;
  106. vertical-align: -0.15em;
  107. fill: currentColor;
  108. overflow: hidden;
  109. margin-right:10px;
  110. }
  111. .miniblok {
  112. background-color: #efeff4;
  113. border-radius: 18px;
  114. padding: 5px 10px 5px 10px;
  115. font-size: 14px;
  116. margin-bottom: 10px;
  117. border: 1px solid #ffffff;
  118. margin-left: 15px;
  119. }
  120. .myactive {
  121. border: 1px solid #ffd69c;
  122. }
  123. .myname {
  124. text-align: center;
  125. padding: 0.3rem;
  126. font-size: 16px;
  127. font-weight: 600;
  128. color: black;
  129. }
  130. [v-cloak] {
  131. display: none;
  132. }
  133. .mui-bar {
  134. box-shadow: 0 0 7px rgb(183,210,422) ;
  135. }
  136. .mui-navigate,.mui-navigate-right{
  137. display: flex!important;
  138. flex-direction: row;
  139. align-items: center;
  140. justify-content: start;
  141. }
  142. p{
  143. font-size:13px
  144. }
  145. </style>
  146. <div id="vue" v-cloak>
  147. <header id="header" class="mui-bar mui-bar-transparent" style="box-shadow:none">
  148. <a href="/MobileProblem/PersonalSetting" class="mui-icon mui-icon-gear mui-pull-left" style="color:white"></a>
  149. <a href="/MobileProblem/UserDefualtSet" class="mui-icon mui-icon-more mui-pull-right" style="color:white"></a>
  150. </header>
  151. <nav class="mui-bar mui-bar-tab">
  152. <a class="mui-tab-item" id="Home">
  153. <span class="mui-icon iconfont icon-shouye"></span>
  154. <span class="mui-tab-label">首页</span>
  155. </a>
  156. <a class="mui-tab-item" id="NewProblem">
  157. <span class="mui-icon iconfont icon-wentifankui"></span>
  158. <span class="mui-tab-label">问题查询</span>
  159. </a>
  160. <a class="mui-tab-item" id="my">
  161. <span class="mui-icon iconfont icon-wode"></span>
  162. <span class="mui-tab-label">我的</span>
  163. </a>
  164. </nav>
  165. <div class="mui-scroll-wrapper" id="scr1">
  166. <div class="mui-scroll">
  167. <div class="my-background">
  168. <div class="mui-card mycard">
  169. <div class="mui-card-content">
  170. <div class="mui-card-content-inner">
  171. <div style="height:2rem"></div>
  172. <h5 class="myname">{{Name}}</h5>
  173. <div class="cardiv">
  174. <template v-if="PersonProperty=='3'">
  175. <div v-on:click="Goquery" class="problem-summa">
  176. <animated-integer v-bind:value="djCount"></animated-integer>
  177. <p>已登记</p>
  178. </div>
  179. <div v-on:click="Goquery" class="problem-summa">
  180. <animated-integer v-bind:value="Unsolution"></animated-integer>
  181. <p>未解决</p>
  182. </div>
  183. <div v-on:click="Goquery" class="problem-summa">
  184. <animated-integer v-bind:value="Solution"></animated-integer>
  185. <p>已解决</p>
  186. </div>
  187. </template>
  188. <template v-else>
  189. <div v-on:click="Goquery(1)" class="problem-summa">
  190. <animated-integer v-bind:value="djCount"></animated-integer>
  191. <p>登记的</p>
  192. </div>
  193. <div v-on:click="Goquery(3)" class="problem-summa">
  194. <animated-integer v-bind:value="sqCount"></animated-integer>
  195. <p>提交的</p>
  196. </div>
  197. <div v-on:click="Goquery(2)" class="problem-summa">
  198. <animated-integer v-bind:value="clCount"></animated-integer>
  199. <p>处理的</p>
  200. </div>
  201. </template>
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. <img class="myhead" src="~/Content/Images/Account/wtx.jpg" />
  207. </div>
  208. <ul class="mui-table-view mui-table-view-chevron" id="rela" style="padding-top:6rem">
  209. <li class="mui-table-view-cell">
  210. <a href="" class="mui-navigate">
  211. <svg class="icon" aria-hidden="true">
  212. <use xlink:href="#icon-icon_shouji"></use>
  213. </svg>
  214. <div style="flex:1">手机号</div>
  215. <div style="float:right">{{Telephone}}</div>
  216. </a>
  217. </li>
  218. <li class="mui-table-view-cell">
  219. <a class="mui-navigate">
  220. <svg class="icon" aria-hidden="true">
  221. <use xlink:href="#icon-zujian-youxiang"></use>
  222. </svg>
  223. <div style="flex:1">邮箱地址</div>
  224. <div style="float:right">{{Email}}</div>
  225. </a>
  226. </li>
  227. <li v-if="Channel!=null" class="mui-table-view-cell">
  228. <a class="mui-navigate">
  229. <svg class="icon" aria-hidden="true">
  230. <use xlink:href="#icon-gongsi"></use>
  231. </svg>
  232. <div style="flex:1">分公司</div>
  233. <div style="float:right">{{Channel}}</div>
  234. </a>
  235. </li>
  236. <li v-if="Institution!=null" class="mui-table-view-cell">
  237. <a href="" class="mui-navigate">
  238. <svg class="icon" aria-hidden="true">
  239. <use xlink:href="#icon-yiyuan"></use>
  240. </svg>
  241. <div style="flex:1">机构</div>
  242. <div style="float:right">{{Institution}}</div>
  243. </a>
  244. </li>
  245. <li v-if="Department!=null" class="mui-table-view-cell">
  246. <a href="" class="mui-navigate">
  247. <svg class="icon" aria-hidden="true">
  248. <use xlink:href="#icon-keshi"></use>
  249. </svg>
  250. <div style="flex:1">科室</div>
  251. <div style="float:right">{{Department}}</div>
  252. </a>
  253. </li>
  254. <li class="mui-table-view-cell" style="padding-right:65px">
  255. <a href="" class="mui-navigate-right">
  256. <img src="~/Content/Images/zllogo.png" style="width:1.5em;margin-right:10px" />
  257. <div style="flex:1"> 关于中联</div>
  258. </a>
  259. </li>
  260. <li class="mui-table-view-cell" style="padding-right:65px" id="QuerList">
  261. <a class="mui-navigate-right">
  262. <svg class="icon" aria-hidden="true">
  263. <use xlink:href="#icon-liebiao"></use>
  264. </svg>
  265. <div style="flex:1"> 问题列表</div>
  266. </a>
  267. </li>
  268. <li class="mui-table-view-cell" style="padding-right:65px" id="MyComments">
  269. <a class="mui-navigate-right">
  270. <img src="~/Content/Images/pj.png" style="width:1.5em;margin-right:10px" />
  271. <div style="flex:1">我的评价</div>
  272. </a>
  273. </li>
  274. <li class="mui-table-view-cell" style="padding-right:65px" id="complaint">
  275. <a class="mui-navigate-right">
  276. <img style="width:21px;margin-right:10px;" src="~/Content/Images/tousu.png" />
  277. <div style="flex:1"> 问题投诉</div>
  278. </a>
  279. </li>
  280. </ul>
  281. <ul class="mui-table-view" style="margin-bottom:50px;margin-top:10px" id="lo">
  282. <li class="mui-table-view-cell" style="text-align: center;">
  283. <a style="flex:1;font-size:14px" v-on:click="logout">退出登录</a>
  284. </li>
  285. </ul>
  286. </div>
  287. </div>
  288. </div>
  289. <script > type = "text/babel"
  290. var ID = "@ViewBag.PersonProperty";
  291. var myInterfaceName = myInterfaceName;
  292. Vue.component('animated-integer', {
  293. template: '<h4>{{ tweeningValue }}</h4>',
  294. props: {
  295. value: {
  296. type: Number,
  297. required: true
  298. }
  299. },
  300. data: function () {
  301. return {
  302. tweeningValue: 0
  303. }
  304. },
  305. watch: {
  306. value: function (newValue, oldValue) {
  307. this.tween(oldValue, newValue)
  308. }
  309. },
  310. mounted: function () {
  311. this.tween(0, this.value)
  312. },
  313. methods: {
  314. tween: function (startValue, endValue) {
  315. var vm = this
  316. function animate() {
  317. if (TWEEN.update()) {
  318. requestAnimationFrame(animate)
  319. }
  320. }
  321. new TWEEN.Tween({ tweeningValue: startValue })
  322. .to({ tweeningValue: endValue }, 500)
  323. .onUpdate(function () {
  324. vm.tweeningValue = this.tweeningValue.toFixed(0)
  325. })
  326. .start()
  327. animate()
  328. }
  329. }
  330. })
  331. var vm = new Vue({
  332. el: '#vue',
  333. data: {
  334. msg: 'Hello World!',
  335. Name: null,
  336. Telephone: null,
  337. Email: null,
  338. Institution: null,
  339. Department: null,
  340. Channel: null,
  341. djCount: 0,//我登记的
  342. sqCount: 0,//我申请的
  343. clCount: 0, //我处理的
  344. Unsolution: 0, //未解决
  345. Solution: 0, //已解决
  346. PersonProperty: ID
  347. },
  348. methods: {
  349. logout: function () {
  350. var that = this;
  351. var btnArray = ['否', '是'];
  352. mui.confirm('是否退出登录?', '提示', btnArray, function (e) {
  353. if (e.index == 1) {
  354. mui.showLoading("正在注销...", 'div');
  355. that.RemoveCookie();
  356. $.post("/MobileAccount/LogOut", {}, function (data) {
  357. //mui.openWindow({
  358. // url: '/MobileAccount/MobileProblemLogin'
  359. //});
  360. window.location.href = '/MobileAccount/MobileProblemLogin?isOpenWechatLgoin=0'
  361. })
  362. } else {
  363. }
  364. });
  365. },
  366. QueryProblem: function () {
  367. window.location.href = '/MobileProblem/QueryProblem'
  368. },
  369. //清除Cookie
  370. RemoveCookie () {
  371. delCookie("DefaultProjectId");
  372. delCookie("DefaultProjectName");
  373. delCookie("CurrentLink");
  374. delCookie("QueryProblemSlider");
  375. delCookie("UserSetProject");
  376. delCookie("UserSetInstitution");
  377. delCookie("SearchCondition");
  378. },
  379. Goquery (val) {
  380. if (val) {
  381. setCookie("QueryProblemSlider", val);
  382. }
  383. window.location.href = '/MobileProblem/QueryProblem'
  384. }
  385. },
  386. created: function () {
  387. var that = this;
  388. $.post("/MobileProblem/GetCUserInfo", {}, function (data) {
  389. that.Name = data[0].姓名;
  390. var reg = /^(\d{3})\d{4}(\d{4})$/;
  391. that.Telephone = data[0].联系电话.replace(reg, '$1****$2');
  392. that.Email = data[0].电子邮箱;
  393. that.Institution = data[0].名称;
  394. that.Department = data[0].部门名;
  395. that.Channel = data[0].渠道名称;
  396. });
  397. $.post("/MobileProblem/GetCount", {}, function (data) {
  398. if (ID == "3") {
  399. that.djCount = data[0].已登记 || 0;
  400. that.Unsolution = data[0].未解决 || 0;
  401. that.Solution = data[0].已解决 || 0;
  402. } else {
  403. that.djCount = data[0].我登记的;
  404. that.sqCount = data[0].我申请的;
  405. that.clCount = data[0].我处理的;
  406. }
  407. });
  408. },
  409. mounted: function () {
  410. var that = this;
  411. mui.init({
  412. swipeBack: true //启用右滑关闭功能
  413. });
  414. mui('#scr1').scroll();
  415. $("#my").addClass('mui-deaflut');
  416. document.getElementById('Home').addEventListener('tap', function () {
  417. window.location.href = '/MobileProblem/Home'
  418. });
  419. document.getElementById('my').addEventListener('tap', function () {
  420. //mui.openWindow({
  421. // url: '/MobileProblem/My'
  422. //});
  423. });
  424. document.getElementById('NewProblem').addEventListener('tap', function () {
  425. window.location.href = '/MobileProblem/QueryProblem'
  426. });
  427. mui('.mui-table-view-cell').on('tap', 'a', function () {
  428. this.click();
  429. });
  430. document.getElementById('QuerList').addEventListener('tap', function () {
  431. window.location.href = '/MobileProblem/QueryProblem'
  432. });
  433. //我的评价
  434. document.getElementById('MyComments').addEventListener('tap', function () {
  435. window.location.href = '/MobileProblem/MyComments'
  436. });
  437. document.getElementById('complaint').addEventListener('tap', function () {
  438. window.location.href = '/Complaint/NewComplaint'
  439. });
  440. mui(".cardiv").on('tap', '.problem-summa', function (event) {
  441. this.click();
  442. });
  443. }
  444. })
  445. </script>