MyComments.cshtml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. 
  2. @{
  3. ViewBag.Title = "MyComments";
  4. Layout = "~/Views/MobileProblem/_APPMain.cshtml";
  5. var url = HttpContext.Current.Request.Url;
  6. var webSite = String.Concat(url.Scheme, "://", url.Authority);
  7. }
  8. <meta name="apple-mobile-web-app-capable" content="yes">
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  10. <link href="~/Content/Style/MobileProductRegist/iconfont.css" rel="stylesheet" />
  11. <link href="~/Content/Style/MobileProductRegist/QueryProblemCustom.css?v=1.0" rel="stylesheet" />
  12. <link href="~/Content/Scripts/plugins/mui/css/mui.indexedlist.css" rel="stylesheet" />
  13. <script src="~/Content/Scripts/browser.js"></script>
  14. <script src="~/Content/Scripts/browser-polyfill.min.js"></script>
  15. <script src="~/Content/Scripts/plugins/mui/js/iconfont.deal.js"></script>
  16. <script src="~/Content/Scripts/plugins/mui/js/mui.pullToRefresh.js"></script>
  17. <script src="~/Content/Scripts/plugins/mui/js/mui.pullToRefresh.material.js"></script>
  18. <script src="~/Content/Scripts/plugins/mui/js/mui.indexedlist.js"></script>
  19. <script src="~/Content/Style/MobileProductRegist/ProblemIcon.js"></script>
  20. <script src="//at.alicdn.com/t/font_2441118_8ayi9upcnd7.js"></script>
  21. <script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>
  22. <style>
  23. .moremini {
  24. padding: 2px 7px 2px 7px;
  25. margin-bottom: 5px;
  26. font-size: 11px;
  27. }
  28. .mui-card {
  29. margin: 5px 0px 0px;
  30. }
  31. .mui-card-media img {
  32. height: 35px !important;
  33. width: auto !important;
  34. border-radius: 50px;
  35. }
  36. .my-content {
  37. padding: 5px 10px;
  38. font-size: 13px;
  39. color: #8f8f94;
  40. max-height: 80px;
  41. overflow: hidden;
  42. }
  43. .svg-float {
  44. position: absolute;
  45. top: 0;
  46. right: 6px;
  47. }
  48. p {
  49. font-size: 13px;
  50. }
  51. .mui-btn.mui-icon {
  52. font-size: 12px;
  53. line-height: 1.42;
  54. padding: 3px 7px;
  55. border: solid 1px #d7d7dc;
  56. margin-right: 5px;
  57. border-radius: 7px;
  58. }
  59. .mui-card-footer {
  60. justify-content: flex-end
  61. }
  62. .mui-media-body div {
  63. font-size: 13px;
  64. color: #6f6f6f;
  65. background-color: #ffffff;
  66. position: absolute;
  67. z-index: 999999;
  68. right: 8px;
  69. }
  70. </style>
  71. <div id="vue" v-cloak>
  72. <header class="mui-bar mui-bar-nav">
  73. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color:#ffffff"></a>
  74. <h1 class="mui-title" style="color:white">问题评价</h1>
  75. </header>
  76. <div class="mui-content ">
  77. <div class="blueHeaderBg"></div>
  78. <div id="slider" class="mui-slider mui-fullscreen">
  79. <div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
  80. <div class="titleList" style="border-bottom: solid 1px #e1e1e6;">
  81. <a class="mui-control-item paddingNone mui-active " href="#all" data-id="0" id="myProblem">
  82. 待评价
  83. </a>
  84. <a class="mui-control-item paddingNone" href="#Unsolve" data-id="1">
  85. 已评价
  86. </a>
  87. </div>
  88. </div>
  89. <div class="mui-slider-group">
  90. <!--待评价-->
  91. <div id="all" class="mui-slider-item mui-control-content mui-active">
  92. <div class="mui-scroll-wrapper">
  93. <div class="mui-scroll bo30">
  94. <div class="Problem">
  95. <div v-for="p1 in page[0].data" class="mui-card">
  96. <div v-on:click="Deatil(p1.ID)" class="mui-card-header mui-card-media">
  97. <img src="~/Content/Images/Account/wtx.jpg" />
  98. <div class="mui-media-body">
  99. {{p1.性质}}-{{p1.登记人}}
  100. <p style="font-size:12px">登记于 {{p1.登记日期}}</p>
  101. <div>{{p1.编号}}</div>
  102. <svg class='icon svg-float' aria-hidden='true'><use v-bind:xlink:href='p1.icon'></use></svg>
  103. </div>
  104. </div>
  105. <div v-on:click="Deatil(p1.ID)" class="mui-card-content my-content">
  106. <div class="overf" style="-webkit-line-clamp: 1;">标题:{{p1.问题标题}}</div>
  107. <div v-html="p1.问题描述" class="overf" style="-webkit-line-clamp: 2;">{{p1.问题描述}}</div>
  108. </div>
  109. <div v-if="p1.按钮权限=='1'" class="mui-card-footer">
  110. <button v-on:click="TryAcceptProblem(p1.是否为当前处理人,p1.ID,1)" type="button" class="mui-btn mui-btn-danger mui-icon mui-icon-plusempty" style="background-color: rgb(234, 146, 58);border: none;">
  111. 受理
  112. </button>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <!--已评价-->
  120. <div id="Unsolve" class="mui-slider-item mui-control-content">
  121. <div class="mui-scroll-wrapper">
  122. <div class="mui-scroll bo30">
  123. <div class="Problem">
  124. <div v-on:click="Deatil(p2.ID)" v-for="p2 in page[1].data" class="mui-card">
  125. <div class="mui-card-header mui-card-media">
  126. <img src="~/Content/Images/Account/wtx.jpg" />
  127. <div class="mui-media-body">
  128. {{p2.性质}}-{{p2.登记人}}
  129. <p style="font-size:12px">登记于 {{p2.登记日期}}</p>
  130. <div>{{p2.编号}}</div>
  131. <svg class='icon svg-float' aria-hidden='true'><use v-bind:xlink:href='p2.icon'></use></svg>
  132. </div>
  133. </div>
  134. <div class="mui-card-content my-content">
  135. <div class="overf" style="-webkit-line-clamp: 1;">标题:{{p2.问题标题}}</div>
  136. <div v-html="p2.问题描述" class="overf" style="-webkit-line-clamp: 2;">{{p2.问题描述}}</div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <script>
  148. var PersonPropert=@ViewBag.PersonPropert;
  149. var currentWorkFlowId='';
  150. 'use strict';
  151. var vm = new Vue({
  152. el: '#vue',
  153. data: {
  154. page: [
  155. ///新登记
  156. {
  157. pageindex: 0,
  158. pagesize: 6,
  159. data: []
  160. },
  161. ///我登记
  162. {
  163. pageindex: 0,
  164. pagesize: 6,
  165. data: []
  166. }
  167. ],
  168. //问题是否解决标志
  169. status: '',
  170. ///下拉刷新对象
  171. refresh: [],
  172. },
  173. watch: {
  174. },
  175. methods: {
  176. initRefresh: function initRefresh() {
  177. var that = this;
  178. var t = 0;
  179. var deceleration = mui.os.ios ? 0.003 : 0.0009;
  180. mui('.mui-scroll-wrapper').scroll({
  181. bounce: false,
  182. indicators: true, //是否显示滚动条
  183. deceleration: deceleration
  184. });
  185. mui.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function (index, pullRefreshEl) {
  186. mui(pullRefreshEl).pullToRefresh({
  187. up: {
  188. auto: true, //自动执行一次上拉加载,可选;
  189. show: true, //显示底部上拉加载提示信息,可选;
  190. contentrefresh: '正在加载...', //上拉进行中提示信息
  191. contentnomore: '没有更多数据了', //上拉无更多信息时提示信息
  192. callback: function callback() {
  193. var self = this;
  194. if (t < 5) {
  195. that.refresh.push(self);
  196. t++;
  197. }
  198. setTimeout(function () {
  199. var ul = self.element.querySelector('.Problem');
  200. //全部选项卡的index是0,当显示它的时候,滑动页面加1,调数据,以下以此类推
  201. if (index < 5) {
  202. that.page[index].pageindex += 1;
  203. that.createFragment(ul, index, self);
  204. } else {
  205. self.endPullUpToRefresh(true);
  206. }
  207. }, 1000);
  208. }
  209. }
  210. });
  211. });
  212. },
  213. ///加载未评价问题
  214. createFragment: function createFragment(ul, index, self) {
  215. var fragment = document.createDocumentFragment();
  216. var that = this;
  217. var param = {
  218. pageindex: this.page[index].pageindex,
  219. pagesize: this.page[index].pagesize,
  220. Tab: index + 1
  221. };
  222. ///后台请求数据
  223. $.post('/MobileProblem/GetQuestionList', param, function (data) {
  224. var info = data;
  225. if (info.length == 0) {
  226. //当datas.length为0时,表示没有数据了
  227. self.endPullUpToRefresh(true); //当为true时,底部出现没有更多数据,并且不能滑动
  228. } else {
  229. var _iteratorNormalCompletion14 = true;
  230. var _didIteratorError14 = false;
  231. var _iteratorError14 = undefined;
  232. try {
  233. for (var _iterator14 = info[Symbol.iterator](), _step14; !(_iteratorNormalCompletion14 = (_step14 = _iterator14.next()).done); _iteratorNormalCompletion14 = true) {
  234. var dd = _step14.value;
  235. if (dd.问题描述) dd.问题描述 = '描述:' + dd.问题描述.replace(/<[^>]+>/g, "");
  236. if (!dd.附件路径) {
  237. dd.附件路径 = "/Content/Images/zlpng.png";
  238. } else {
  239. dd.附件路径 = "/MobileProblem/ViewProblemImage/" + dd.附件路径 + "?type=s";
  240. }
  241. if (dd.是否评价 == '0') {
  242. dd.icon = "#icon-weipingjia";
  243. } else {
  244. dd.icon = "#icon-yipingjia";
  245. }
  246. that.page[index].data.push(dd);
  247. }
  248. } catch (err) {
  249. _didIteratorError14 = true;
  250. _iteratorError14 = err;
  251. } finally {
  252. try {
  253. if (!_iteratorNormalCompletion14 && _iterator14.return) {
  254. _iterator14.return();
  255. }
  256. } finally {
  257. if (_didIteratorError14) {
  258. throw _iteratorError14;
  259. }
  260. }
  261. }
  262. self.endPullUpToRefresh(); //当为false或空时,底部出现正在加载,滑动到下一页
  263. }
  264. });
  265. },
  266. forech: function forech(obj) {
  267. var re;
  268. var _iteratorNormalCompletion15 = true;
  269. var _didIteratorError15 = false;
  270. var _iteratorError15 = undefined;
  271. try {
  272. for (var _iterator15 = obj[Symbol.iterator](), _step15; !(_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done); _iteratorNormalCompletion15 = true) {
  273. var i = _step15.value;
  274. if (i.active) {
  275. re = i.id;
  276. return re;
  277. }
  278. }
  279. } catch (err) {
  280. _didIteratorError15 = true;
  281. _iteratorError15 = err;
  282. } finally {
  283. try {
  284. if (!_iteratorNormalCompletion15 && _iterator15.return) {
  285. _iterator15.return();
  286. }
  287. } finally {
  288. if (_didIteratorError15) {
  289. throw _iteratorError15;
  290. }
  291. }
  292. }
  293. ;
  294. },
  295. ///进入详细页面
  296. Deatil: function Deatil(id) {
  297. //mui.openWindow({
  298. // url: '/MobileProblem/ProblemDetail/' + id
  299. //});
  300. window.location.href = '/MobileProblem/ProblemReamrk/' + id;
  301. },
  302. },
  303. computed: {
  304. },
  305. mounted: function mounted() {
  306. mui.init();
  307. this.$nextTick(function () {
  308. this.initRefresh();
  309. });
  310. }
  311. });
  312. </script>