ProblemDetail.cshtml 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  1. 
  2. @{
  3. ViewBag.Title = "ProblemDetail";
  4. Layout = "~/Views/MobileProblem/_APPMain.cshtml";
  5. var url = HttpContext.Current.Request.Url;
  6. var webSite = String.Concat(url.Scheme, "://", url.Authority);
  7. }
  8. @model PMS.BusinessModels.MobileProblem.ProblemDetailModel
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  11. <link href="~/Content/Scripts/plugins/mui/css/mui.imageviewer.css" rel="stylesheet" />
  12. <link href="~/Content/Style/MobileProductRegist/ProblemDeatail.css" rel="stylesheet" />
  13. <link href="~/Content/Style/MobileProductRegist/ProblemIcon.css" rel="stylesheet" />
  14. <link href="~/Content/Scripts/plugins/mui/css/TimeLine.css?v=1.0" rel="stylesheet" />
  15. <script src="~/Content/Scripts/plugins/mui/js/iconfont.deal.js"></script>
  16. <script src="~/Content/Scripts/plugins/mui/js/mui.zoom.js"></script>
  17. <script src="~/Content/Scripts/plugins/mui/js/mui.previewimage.js"></script>
  18. <script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>
  19. <script src="~/Content/Scripts/babel.min.js"></script>
  20. <script src="~/Content/Scripts/polyfill.min.js"></script>
  21. <style>
  22. html{
  23. font-size:15px
  24. }
  25. body {
  26. font-family: -apple-system, BlinkMacSystemFont, "PingFang SC","HelveticaNeue",STHeiti,"Microsoft Yahei",Tahoma,Simsun,sans-serif;
  27. }
  28. .mui-bar-nav {
  29. background-color: #00aaff;
  30. box-shadow: 0 1px 6px #00aaff;
  31. }
  32. .top {
  33. background-color: #00aaff;
  34. width: 100%;
  35. position: relative;
  36. }
  37. .card1 {
  38. width: 80%;
  39. height: 5rem;
  40. display: flex;
  41. justify-content: flex-start;
  42. align-items: center;
  43. padding: 1rem;
  44. }
  45. .flexcolom {
  46. display: flex;
  47. flex-direction: column;
  48. align-items: flex-start;
  49. justify-content: space-between;
  50. font-size: 14px;
  51. color: white;
  52. margin-left: 5%;
  53. }
  54. .status {
  55. position: absolute;
  56. right: 2%;
  57. top: 10%;
  58. max-width: 100px;
  59. }
  60. .status h4 {
  61. line-height: 1.5;
  62. }
  63. .statusIcon {
  64. color: white;
  65. font-size: 18px;
  66. font-weight: 500;
  67. }
  68. .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
  69. color: #00aaff !important;
  70. border-bottom: 2px solid #00aaff;
  71. }
  72. /*.mui-content {
  73. background-color: #ffffff;
  74. }*/
  75. .mui-segmented-control.mui-segmented-control-inverted .mui-control-item {
  76. color: #666666;
  77. }
  78. .mylist {
  79. width: 100%;
  80. height: auto;
  81. background-color: white;
  82. padding: 1rem;
  83. margin-top: 0.3rem;
  84. }
  85. .mytable {
  86. display: flex;
  87. flex-direction: column;
  88. justify-content: flex-start;
  89. align-items: flex-start;
  90. margin-top: 0.5rem;
  91. }
  92. .mytableRow {
  93. display: flex;
  94. flex-direction: row;
  95. justify-content: flex-start;
  96. align-items: flex-start;
  97. }
  98. .mytableRow > p {
  99. margin-bottom: 0px;
  100. }
  101. .mytableRowRight {
  102. margin-left: 3rem;
  103. color: black;
  104. font-weight: 400;
  105. flex: 1;
  106. }
  107. .mytableRowLeft {
  108. width: 53px;
  109. }
  110. p {
  111. font-size: 12px;
  112. }
  113. .fixDiv {
  114. position: fixed;
  115. top: -5px;
  116. z-index: 99;
  117. }
  118. .cd-timeline-content p {
  119. margin: 0;
  120. }
  121. .cd-timeline-content .cd-date {
  122. padding: 0;
  123. opacity: .7;
  124. float: right;
  125. }
  126. .mui-card-header:after {
  127. position: relative;
  128. }
  129. h2 {
  130. font-size: 22px;
  131. }
  132. h4 {
  133. font-size: 14px;
  134. }
  135. h5 {
  136. font-size: 12px;
  137. }
  138. .iconflex {
  139. display: flex;
  140. justify-content: center;
  141. align-items: center;
  142. flex-direction: row;
  143. }
  144. .mui-grid-view.mui-grid-9 {
  145. border: transparent;
  146. background-color: white;
  147. }
  148. .mui-grid-view.mui-grid-9 .mui-table-view-cell {
  149. border: transparent;
  150. }
  151. .tabflex {
  152. display: flex !important;
  153. flex-direction: row;
  154. justify-content: space-around;
  155. align-items: center;
  156. background-color: white;
  157. box-shadow: 0 0 1px rgb(217, 217, 217);
  158. }
  159. .mui-bar .mui-btn {
  160. top: 0px;
  161. border-radius: 8px;
  162. font-size: 0.7rem;
  163. padding: 6px 18px;
  164. margin: 0 10px;
  165. }
  166. .Fileflex {
  167. display: flex;
  168. flex-direction: row;
  169. justify-content: flex-start;
  170. flex-wrap: wrap;
  171. align-items: center;
  172. }
  173. .activeIcon {
  174. background-color: #fc8560;
  175. }
  176. .DeatlTitle {
  177. color: white;
  178. padding: 5px 10px;
  179. font-size: 15px;
  180. }
  181. .mui-popover.mui-active {
  182. display: flex !important;
  183. }
  184. .mui-popover {
  185. flex-direction: column;
  186. width: auto;
  187. padding: 5px;
  188. background-color: white;
  189. }
  190. .morebutton {
  191. top: 0px;
  192. border-radius: 8px;
  193. font-size: 0.7rem !important;
  194. padding: 6px 18px;
  195. margin: 5px 0;
  196. }
  197. .mui-popover .mui-popover-arrow:after {
  198. background-color: white;
  199. }
  200. #panel {
  201. background: #fff;
  202. }
  203. #panel text {
  204. line-height: 2rem;
  205. border-right: 1px solid #ddd;
  206. border-bottom: 1px solid #ddd;
  207. }
  208. .flex-row {
  209. display: flex;
  210. flex-direction: row;
  211. justify-content: flex-start;
  212. align-items: center;
  213. font-size: 12px;
  214. }
  215. .flex-column {
  216. display: flex;
  217. flex-direction: column;
  218. justify-content: center;
  219. align-items: stretch;
  220. }
  221. .flex-cell {
  222. flex: 1;
  223. }
  224. .flex-column p {
  225. margin: 0;
  226. }
  227. .flexSingle {
  228. flex: 0.33;
  229. }
  230. .ProblemIcon {
  231. font-size: 20px;
  232. }
  233. .modify {
  234. display: flex;
  235. flex-direction: row;
  236. font-size: 14px;
  237. padding: 5px 15px;
  238. justify-content: center;
  239. align-items: center;
  240. }
  241. .modify .mui-icon{
  242. color:#677b84;
  243. padding-right:10px
  244. }
  245. .Process{
  246. margin-top: 5px;
  247. min-height: 28rem;
  248. background-color: white;
  249. }
  250. </style>
  251. <div id="vue" v-cloak>
  252. <header class="mui-bar mui-bar-nav">
  253. <a v-on:click="Back" class="mui-icon mui-icon-left-nav mui-pull-left" style="color:white"></a>
  254. <h4 class="mui-title" style="color:white">问题详细</h4>
  255. <a v-if="@Model.撤销权限==1 || @Model.修改权限==1 " href="#Popover_1" class="mui-icon mui-icon-more mui-pull-right" style="color:white"></a>
  256. </header>
  257. <nav v-if="@Model.按钮权限!=0" class="mui-bar mui-bar-tab tabflex">
  258. @* <button v-on:click="TryAcceptProblem" v-if="@Model.按钮权限==1" type="button" class="mui-btn mui-btn-success mui-btn-block" style="top: 0px;border-radius: 30px;">受理</button>*@
  259. <template>
  260. <button v-on:click="ProblemDistribute" type="button" class="mui-btn mui-btn-outlined mui-btn-danger mui-icon mui-icon-redo">
  261. 分配
  262. </button>
  263. <button v-if="CurrentLink!='研发处理'" v-on:click="TryProblemPut" type="button" class="mui-btn mui-btn-success mui-icon mui-icon-paperplane">
  264. 提交
  265. </button>
  266. <button v-on:click="ProblemDeal" type="button" class="mui-btn mui-btn-danger mui-icon mui-icon-checkmarkempty" style="background-color: #fb7e00;border: none;">
  267. 处理
  268. </button>
  269. <a href="#Popover_0" class="mui-icon mui-icon-more mui-pull-right" style="color:blue"></a>
  270. </template>
  271. </nav>
  272. <div class="mui-content ">
  273. <div class="top">
  274. <div class="card1">
  275. <div>
  276. <img src="~/Content/Images/Account/wtx.jpg" style="height:3rem;border-radius:50px" />
  277. </div>
  278. <div class="flexcolom">
  279. <div style="font-weight: 700;">@Model.人员性质-@Model.姓名</div>
  280. <div><p style="font-size:14px;color:white">@Model.登记日期</p></div>
  281. </div>
  282. </div>
  283. <div class="status iconflex"><span v-bind:class="ProblemStatus.icon" class="ProblemIcon " style="color:white"></span><h4 style='color:white;margin-left:5px'>{{ProblemStatus.text}}</h4></div>
  284. </div>
  285. <div id="fex">
  286. <div style="padding: 3px;background-color: white;">
  287. <div id="segmentedControl" class="mui-segmented-control mui-segmented-control-inverted mui-segmented-control-primary ">
  288. <a class="mui-control-item mui-active" href="#item1"><span class="ProblemIcon icon-xiangqing"></span>问题详情</a>
  289. <a class="mui-control-item" href="#item2"><span class="ProblemIcon icon-liuchengpeizhi"></span>流程概况</a>
  290. @*<a class="mui-control-item" href="#item3"><span class="mui-icon mui-icon-chat"></span>过程沟通</a>*@
  291. </div>
  292. </div>
  293. <div id="item1" class="mui-control-content mui-active" style="overflow:hidden;">
  294. <div class="mylist" id="HtmlDeatil">
  295. <h4 style="font-size:15px;float:right">编号:@Model.问题编号</h4>
  296. <h4 style="font-size:15px">标题</h4>
  297. <p style="font-size:13px">@Model.问题标题</p>
  298. <h4 style="font-size:15px">详细描述</h4>
  299. <p style="font-size:13px">@Html.Raw(Model.问题描述)</p>
  300. </div>
  301. <div v-if="CurrentDealDeatil" class="mylist">
  302. <h4 style="font-size:15px">处理描述</h4>
  303. <p style="font-size:13px" id="CurrentDealDeatil" v-html="CurrentDealDeatil.描述">{{CurrentDealDeatil.描述}}</p>
  304. <div v-if="CurrentDealDeatil.图片 || CurrentDealDeatil.文件" class="Fileflex">
  305. <img v-for="img in CurrentDealDeatil.图片" data-preview-src='' data-preview-group='3' v-bind:src="img" style='width:50px;height:50px;padding:5px 5px 5px 0'>
  306. <a v-for="(flie,index) in CurrentDealDeatil.文件" v-on:click="GetFlie(flie)" style="padding:5px 5px 5px 0;color:#80b4fb;font-size:14px"><span class="mui-icon mui-icon-paperclip" style="font-size:33px"></span></a>
  307. </div>
  308. <template v-if="Vison">
  309. <h4 style="font-size:15px">解决版本</h4>
  310. <p style="font-size:13px">{{Vison}}</p>
  311. </template>
  312. </div>
  313. <div v-if="StopDeatil" class="mylist">
  314. <h4 style="font-size:15px">终止说明</h4>
  315. <p style="font-size:13px">{{StopDeatil}}</p>
  316. </div>
  317. <div v-if="ErginDeatil" class="mylist">
  318. <h4 style="font-size:15px">紧急描述</h4>
  319. <p style="font-size:13px">{{ErginDeatil}}</p>
  320. </div>
  321. <div v-if="Image.图片 && (Image.图片.length>0 || Image.附件.length>0)" class="mylist">
  322. <h4 style="font-size:15px">图片及附件</h4>
  323. <ul id="fileList" class="mui-table-view mui-grid-view mui-grid-9">
  324. <li v-for="im in Image.图片" class='mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3' style='padding-left: 3px;'>
  325. <img data-preview-src='' data-preview-group='1' v-bind:src="im" style='width:100px;height:100px'>
  326. </li>
  327. </ul>
  328. <a v-for="(flie,index) in Image.附件" v-on:click="GetFlie(flie)" style="padding:5px 5px 5px 0;color:#80b4fb;font-size:14px">附件{{index+1}}<span class="mui-icon mui-icon-paperclip" style="font-size:33px"></span></a>
  329. </div>
  330. <div class="mylist" style="padding-right:0">
  331. <h4 style="font-size:15px">其他信息</h4>
  332. <div id="panel" class="flex-column">
  333. <div class="flex-cell flex-row">
  334. <p class="flex-cell flex-row">产品</p>
  335. <div class="flex-cell flex-row">@Model.产品名称</div>
  336. <p class="flex-cell flex-row">版本</p>
  337. <div class="flex-cell flex-row" style="overflow:hidden">@Model.版本号</div>
  338. </div>
  339. <div class="flex-cell flex-row">
  340. <p class="flex-cell flex-row">来源</p>
  341. <div class="flex-cell flex-row">@Model.来源</div>
  342. <p class="flex-cell flex-row">问题性质</p>
  343. <div class="flex-cell flex-row">@Model.问题性质</div>
  344. </div>
  345. <div class="flex-cell flex-row">
  346. <p class="flex-cell flex-row">关键字</p>
  347. <div class="flex-cell flex-row">@Model.关键字</div>
  348. <p class="flex-cell flex-row">紧急程度</p>
  349. <div class="flex-cell flex-row">@Model.紧急程度</div>
  350. </div>
  351. <div class="flex-cell flex-row">
  352. <p class="flex-cell flex-row">当前处理人</p>
  353. <div class="flex-cell flex-row">@Model.当前处理人</div>
  354. <p class="flex-cell flex-row">当前环节</p>
  355. <div class="flex-cell flex-row">@Model.当前环节</div>
  356. </div>
  357. <div class="flex-cell flex-row">
  358. <p class="flex-cell flex-row">技术支持</p>
  359. <div class="flex-cell flex-row">@Model.技术支持</div>
  360. <p class="flex-cell flex-row">研发支持</p>
  361. <div class="flex-cell flex-row">@Model.研发支持</div>
  362. </div>
  363. <div class="flex-cell flex-row">
  364. <p class="flex-cell flex-row">是否解决</p>
  365. <div class="flex-cell flex-row">@Model.是否解决</div>
  366. <p class="flex-cell flex-row">是否终止</p>
  367. <div class="flex-cell flex-row">@Model.终止说明</div>
  368. </div>
  369. <div class="flex-cell flex-row">
  370. <p class="flex-cell flex-row flexSingle">渠道</p>
  371. <div class="flex-cell flex-row">@Model.渠道名称</div>
  372. </div>
  373. <div class="flex-cell flex-row">
  374. <p class="flex-cell flex-row flexSingle">项目</p>
  375. <div class="flex-cell flex-row">@Model.项目名称</div>
  376. </div>
  377. <div class="flex-cell flex-row">
  378. <p class="flex-cell flex-row flexSingle">机构</p>
  379. <div class="flex-cell flex-row">@Model.机构名称</div>
  380. </div>
  381. </div>
  382. </div>
  383. </div>
  384. <div id="item2" class="mui-control-content">
  385. <div id="Process" class="Process">
  386. <div class="container" style="background-color:white;padding:5px">
  387. <ul class="time-vertical">
  388. <li v-for="(ps,index) in Process">
  389. <span class="ProblemIcon time-vertical-span" v-bind:class="ps.图标"></span>
  390. <div class="Timeline-v-body">
  391. <h3>{{ps.处理状态}}</h3>
  392. <p style="margin:0">您的问题已进入【{{ps.问题环节}}】环节,操作人:{{ps.职务}}-{{ps.处理人员}}
  393. <a v-if="ps.联系电话 && PersonProperty!=3 && index==Process.length-1" v-bind:href="'tel:'+ps.联系电话">【{{ps.联系电话}}】</a>
  394. </p>
  395. <p class="ProcessDetail" v-html="ps.描述" v-if="ps.描述" style="line-height:1.3">{{"描述:"+ps.描述}}</p>
  396. <div v-if="ps.图片 || ps.文件" class="Fileflex">
  397. <img v-for="img in ps.图片" data-preview-src='' data-preview-group='2' v-bind:src="img" style='width:50px;height:50px;padding:5px 5px 5px 0'>
  398. <a v-for="(flie,index) in ps.文件" v-on:click="GetFlie(flie)" style="padding:5px 5px 5px 0;color:#80b4fb;font-size:14px"><span class="mui-icon mui-icon-paperclip" style="font-size:33px"></span></a>
  399. </div>
  400. <p>{{ps.记录时间}}</p>
  401. </div>
  402. </li>
  403. </ul>
  404. </div>
  405. </div>
  406. </div>
  407. <div id="item3" class="mui-control-content">
  408. <div id="MyCommunicate">
  409. <h5 v-if="show" style='display:flex;flex-direction:column;justify-content:center;align-items:center;height:100px;font-size:15px '>暂无沟通内容</h5>
  410. <div v-for="cc in Communicate" class='mui-card'>
  411. <div class='mui-card-header mui-card-media' style='height:100px ;'>
  412. <img v-bind:src="cc.头像地址" style='border-radius: 80px; height: 50px; width: 50px;'>
  413. <p style='float: right;'>{{cc.记录时间}}</p>
  414. <div class='mui-media-body' style='margin-left: 60px'>
  415. <h4>{{cc.记录人}}</h4>
  416. <h5 style='margin-top:10px'>{{cc.沟通内容}}</h5>
  417. <h5 style='float:right;'>{{cc.职务}}</h5>
  418. </div>
  419. </div>
  420. </div>
  421. </div>
  422. <div class="mui-input-row" style="margin: 10px 5px;">
  423. <textarea v-model="Content" style="font-size:14px" id="textarea" rows="5" placeholder="输入您的沟通内容"></textarea>
  424. <button v-on:click="SubmitContent" type="button" class="mui-btn mui-btn-primary" style="width: 82px">提交</button>
  425. </div>
  426. </div>
  427. </div>
  428. </div>
  429. <div id="Popover_0" class="mui-popover mui-bar-popover">
  430. <button v-on:click="ProblemBack('1')" type="button" class="mui-btn mui-btn-outlined mui-icon mui-icon-undo morebutton">
  431. 回退
  432. </button>
  433. <button v-on:click="ProblemBack('2')" type="button" class="mui-btn mui-btn-outlined mui-icon mui-icon-minus morebutton">
  434. 终止
  435. </button>
  436. </div>
  437. <div id="Popover_1" class="mui-popover mui-bar-popover">
  438. <div v-if="@Model.撤销权限==1" v-on:click="DeleteProblem()" class="modify">
  439. <span class="mui-icon mui-icon-trash"></span>
  440. <div>撤销问题</div>
  441. </div>
  442. <div v-on:click="Modify()" v-if="@Model.修改权限==1" class="modify">
  443. <span class="mui-icon mui-icon-compose"></span>
  444. <div>修改问题</div>
  445. </div>
  446. </div>
  447. </div>
  448. <script type = "text/babel">
  449. //var banOffTop = $("#fex").offset().top;//获取到距离顶部的垂直距离
  450. //var scTop=0;//初始化垂直滚动的距离
  451. //$(document).scroll(function () {
  452. // scTop=$(this).scrollTop()+10;//获取到滚动条拉动的距离
  453. // //console.log(scTop);查看滚动时,垂直方向上,滚动条滚动的距离
  454. // if(scTop>=banOffTop){
  455. // //核心部分:当滚动条拉动的距离大于等于导航栏距离顶部的距离时,添加指定的样式
  456. // $("#fex").addClass("fixDiv");
  457. // }else{
  458. // $("#fex").removeClass("fixDiv");
  459. // }
  460. //})
  461. var ID = '@ViewBag.ID';
  462. var PersonProperty = '@ViewBag.PersonProperty';
  463. var acceptId = '@Model.受理人id';
  464. var AssginName = '@Model.指派人';
  465. var CrossStatus = '@Model.跨级标志';
  466. var CurrentLink = '@Model.当前环节';
  467. var Plan = `@Model.解决方案`;
  468. var Vison = '@Model.解决版本';
  469. var StopDeatil = `@Model.终止说明`;
  470. var ErginDeatil = `@Model.紧急描述`;
  471. var ButtonRoel = '@Model.按钮权限';
  472. var vm = new Vue({
  473. el: '#vue',
  474. data: {
  475. ///产品问题过程
  476. Process: [],
  477. //过程沟通
  478. Communicate: [],
  479. ///沟通内容
  480. Content: '',
  481. ///图片
  482. Image: [],
  483. Iscomp: '',
  484. ProblemStatus: {},
  485. show: true,
  486. AcceptId: acceptId,
  487. jud: 0,
  488. CurrentLink: CurrentLink,
  489. Plan: Plan,
  490. Vison: Vison,
  491. AssginName: AssginName,
  492. StopDeatil: StopDeatil,
  493. ErginDeatil: ErginDeatil,
  494. CurrentDealDeatil: null,
  495. PersonProperty: PersonProperty
  496. },
  497. methods: {
  498. //获取产品问题过程
  499. GetProcess: function () {
  500. var that = this;
  501. $.post("/Problem/GetClc?ID=" + ID, {}, function (data) {
  502. for (var fj of data) {
  503. if (fj.附件) {
  504. var img = [];
  505. var file = [];
  506. //全部附件
  507. var All = fj.附件.split(',');
  508. //判断单个附件类型
  509. for(var s of All) {
  510. ///如果为图片
  511. if (s.split('|')[1] == '1') {
  512. var ss = "/MobileProblem/ViewProblemImage/" + s.split('|')[0] + "?type=o"
  513. img.push(ss);
  514. }
  515. //如果为文件
  516. else {
  517. file.push(s.split('|')[0]);
  518. }
  519. }
  520. fj.图片 = img;
  521. fj.文件 = file;
  522. }
  523. //转换图标
  524. switch (fj.处理状态) {
  525. case '登记': fj.图标 = "icon-xiangqing activeIcon"; break;
  526. case '回退中': fj.图标 = "icon-icon28"; break;
  527. case '已终止': fj.图标 = "icon-zhongzhi activeIcon"; break;
  528. case '指派人员': fj.图标 = "icon-fenpei"; break;
  529. case '向上提交': fj.图标 = "icon-submit"; break;
  530. case '处理中': fj.图标 = "icon-shoulizhong"; break;
  531. case '已完成': fj.图标 = "icon-queren activeIcon"; break;
  532. case '已受理': fj.图标 = "icon-shoulizhong"; break;
  533. case '取消受理': fj.图标 = "icon-icon28"; break;
  534. case '撤销完成/终止': fj.图标 = "icon-icon28"; break;
  535. case '验证确认': fj.图标 = "icon-queren activeIcon"; break;
  536. default: fj.图标 = "icon-shoulizhong"
  537. }
  538. }
  539. that.GetCurrentDealDeatil(data[0]);
  540. that.Process = data;
  541. })
  542. },
  543. GetCurrentDealDeatil (item) {
  544. var d = item.处理状态;
  545. if (item.描述 && (d == "回退中" || d == "指派人员" || d == "已终止" || d == "处理中" || d == "已完成")) {
  546. this.CurrentDealDeatil = { 描述: item.描述, 图片: item.图片, 文件: item.文件 };
  547. }
  548. },
  549. ///获取图片
  550. GetFileFormFTP: function () {
  551. var that = this;
  552. $.post("/MobileProblem/GetFileFormFTP/" + ID, {}, function (data) {
  553. var File = {
  554. 图片: [],
  555. 附件: []
  556. };
  557. for (var dd of data) {
  558. if (dd.类型 == '1') {
  559. File.图片.push("/MobileProblem/ViewProblemImage/" + dd.附件ID + "?type=o");
  560. } else {
  561. File.附件.push(dd.附件ID);
  562. }
  563. }
  564. that.Image = File;
  565. })
  566. },
  567. ///获取过程沟通
  568. GetCommunicate: function () {
  569. var that = this;
  570. this.show = false;
  571. $.post("/MobileProblem/GetCommunicates/" + ID, {}, function (data) {
  572. if (data.length > 0) {
  573. that.Communicate = data;
  574. }
  575. else {
  576. that.show = true;
  577. }
  578. })
  579. },
  580. ///提交过程沟通
  581. SubmitContent: function () {
  582. var that = this;
  583. if (!this.Content) {
  584. mui.toast('请输入内容', { duration: 'long', type: 'div' });
  585. return;
  586. }
  587. var param = {
  588. WTID: ID,
  589. GTNR: this.Content
  590. }
  591. var t = mui.showLoading("操作中..", "div");
  592. $.post("/MobileProblem/SubmitContent", param, function (data) {
  593. mui.hideLoading(t);
  594. if (data.code == 200) {
  595. mui.toast('提交成功', { duration: 'long', type: 'div' });
  596. that.Content = '';
  597. that.GetCommunicate();
  598. } else {
  599. mui.toast('提交失败', { duration: 'long', type: 'div' });
  600. }
  601. })
  602. },
  603. ToIcon: function () {
  604. if ('@Model.是否解决' == "已解决") {
  605. this.Iscomp = "icon-yijiejue3";
  606. }
  607. else {
  608. this.Iscomp = "icon-weijiejue";
  609. }
  610. var Status = "@Model.最新状态";
  611. if (Status == "1") {
  612. this.ProblemStatus.icon = "icon-dengji";
  613. this.ProblemStatus.text = "已登记";
  614. } else if (Status == "2") {
  615. this.ProblemStatus.icon = "icon-icon28";
  616. this.ProblemStatus.text = "回退";
  617. }
  618. else if (Status == "3") {
  619. this.ProblemStatus.icon = "icon-zhongzhi";
  620. this.ProblemStatus.text = "已终止";
  621. }
  622. else if (Status == "4") {
  623. this.ProblemStatus.icon = "icon-fenpei";
  624. this.ProblemStatus.text = " 分配中 → " + this.AssginName;
  625. }
  626. else if (Status == "5") {
  627. this.ProblemStatus.icon = "icon-submit";
  628. this.ProblemStatus.text = "已提交";
  629. }
  630. else if (Status == "6") {
  631. this.ProblemStatus.icon = "icon-shoulizhong";
  632. this.ProblemStatus.text = "受理中";
  633. }
  634. else if (Status == "7") {
  635. this.ProblemStatus.icon = "icon-queren";
  636. this.ProblemStatus.text = "已完成";
  637. }
  638. else if (Status == "8") {
  639. this.ProblemStatus.icon = "icon-chulizhong";
  640. this.ProblemStatus.text = "已受理";
  641. } else if (Status == "9") {
  642. this.ProblemStatus.icon = "icon-icon28";
  643. this.ProblemStatus.text = "取消受理";
  644. } else if (Status == "10") {
  645. this.ProblemStatus.icon = "icon-icon28";
  646. this.ProblemStatus.text = "撤销完成/终止";
  647. }else if (Status == "11") {
  648. this.ProblemStatus.icon = "icon-queren";
  649. this.ProblemStatus.text = "验证确认";
  650. }
  651. },
  652. ///受理问题逻辑判断
  653. TryAcceptProblem: function () {
  654. var that = this;
  655. if (CrossStatus == '1') {
  656. mui.confirm('该问题不属于您的处理范围,是否跨级处理?', '提示', ['否', '是'], function (e) {
  657. if (e.index == 1) {
  658. that.AcceptProblem();
  659. }
  660. })
  661. } else {
  662. mui.confirm('确定受理该问题?', '提示', ['否', '是'], function (e) {
  663. if (e.index == 1) {
  664. that.AcceptProblem();
  665. }
  666. });
  667. }
  668. },
  669. //受理问题
  670. AcceptProblem: function (callback) {
  671. mui.post('/MobileProblem/AcceptProblem/' + ID, {}, function (data) {
  672. //服务器返回响应,根据响应结果,分析是否登录成功;
  673. if (data.code == 200) {
  674. mui.toast('受理成功!');
  675. callback();
  676. } else {
  677. mui.toast(data.data);
  678. }
  679. }, 'json');
  680. },
  681. //判断问题是否为个人处理
  682. JudProblem: function () {
  683. var that = this;
  684. mui.post('/MobileProblem/IsMyProblem/' + ID, {}, function (data) {
  685. return that.jud = data;
  686. }, 'json');
  687. },
  688. //问题回退或终止
  689. ProblemBack: function (type) {
  690. if (this.jud == 1) {
  691. //mui.openWindow({
  692. // url: '/MobileProblem/ProblemBack/' + ID + '?type='+type
  693. //});
  694. window.location.href = '/MobileProblem/ProblemBack/' + ID + '?type=' + type;
  695. } else {
  696. ///不为自己处理的问题
  697. mui.confirm('该问题不属于您处理,是否处理?', '提示', ['否', '是'], function (e) {
  698. if (e.index == 1) {
  699. //mui.openWindow({
  700. // url: '/MobileProblem/ProblemBack/' + ID + '?type=' + type
  701. //});;
  702. window.location.href = '/MobileProblem/ProblemBack/' + ID + '?type=' + type;
  703. }
  704. })
  705. }
  706. },
  707. //问题分配
  708. ProblemDistribute: function () {
  709. if (this.jud == 1) {
  710. //mui.openWindow({
  711. // url: '/MobileProblem/ProblemDistribution/' + ID
  712. //});
  713. window.location.href = '/MobileProblem/ProblemDistribution/' + ID
  714. } else {
  715. ///不为自己处理的问题
  716. mui.confirm('该问题不属于您处理,是否处理?', '提示', ['否', '是'], function (e) {
  717. if (e.index == 1) {
  718. //mui.openWindow({
  719. // url: '/MobileProblem/ProblemDistribution/' + ID
  720. //});
  721. window.location.href = '/MobileProblem/ProblemDistribution/' + ID
  722. }
  723. })
  724. }
  725. },
  726. //问题处理
  727. ProblemDeal: function () {
  728. var that = this;
  729. if (this.jud == 1) {
  730. window.location.href = '/MobileProblem/ProblemDeal/' + ID
  731. } else {
  732. ///不为自己处理的问题
  733. mui.confirm('该问题不属于您处理,是否处理?', '提示', ['否', '是'], function (e) {
  734. if (e.index == 1) {
  735. window.location.href = '/MobileProblem/ProblemDeal/' + ID
  736. }
  737. })
  738. }
  739. },
  740. //问题提交验证
  741. TryProblemPut: function () {
  742. var that = this;
  743. ///判断是否为自己处理中的问题
  744. if (this.jud == 1) {
  745. mui.confirm('确认向上提交该问题?', '提示', ['否', '是'], function (e) {
  746. if (e.index == 1) {
  747. that.ProblemPut();
  748. }
  749. })
  750. } else {
  751. ///不为自己处理的问题
  752. mui.confirm('该问题不属于您处理,是否向上提交?', '提示', ['否', '是'], function (e) {
  753. if (e.index == 1) {
  754. that.ProblemPut();
  755. }
  756. })
  757. }
  758. },
  759. ////问题提交
  760. ProblemPut: function () {
  761. //提交
  762. mui.post('/MobileProblem/ProblemPutSubmit/' + ID,
  763. {
  764. }, function (data) {
  765. if (data.code == 200) {
  766. mui.toast(data.msg);
  767. setTimeout(function () {
  768. //mui.openWindow({
  769. // url: '/MobileProblem/ProblemDetail/' + ID
  770. //});
  771. window.location.href = '/MobileProblem/ProblemDetail/' + ID
  772. }, 500);
  773. } else {
  774. mui.toast(data.msg);
  775. }
  776. }, 'json');
  777. },
  778. Back: function () {
  779. window.location.href = '/MobileProblem/QueryProblem'
  780. },
  781. //获取过程附件
  782. GetFlie: function (ID) {
  783. window.open('/MobileProblem/ViewProblemImage/' + ID);
  784. },
  785. Modify () {
  786. window.location.href = '/MobileProblem/ModifyProblem/' + ID
  787. },
  788. DeleteProblem () {
  789. var that = this;
  790. mui.confirm('确定要撤销该问题吗?', '提示', ['否', '是'], function (e) {
  791. if (e.index == 1) {
  792. $.post("/Problem/Delete_Problem/" + ID, {}, function (data) {
  793. if (data != 0) {
  794. mui.toast("撤销成功!", { duration: 'long', type: 'div' });
  795. mui.later(function() {
  796. window.location.href = '/MobileProblem/QueryProblem'
  797. }, 1000)
  798. }
  799. else {
  800. mui.toast("撤销失败!", { duration: 'long', type: 'div' });
  801. }
  802. })
  803. }
  804. })
  805. },
  806. FilterHtml (item) {
  807. var arrEntities = { 'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"' };
  808. item = item.replace(/<[^>]+>/g, "").replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) { return arrEntities[t]; });
  809. return item;
  810. },
  811. Myinit () {
  812. mui.init();
  813. mui.previewImage();
  814. mui.back = function (event) {
  815. window.location.href = '/MobileProblem/QueryProblem'
  816. }
  817. mui("#Popover_1").on('tap', '.modify', function (event) {
  818. this.click();
  819. });
  820. this.ToIcon();
  821. this.GetFileFormFTP();
  822. this.GetProcess();
  823. this.JudProblem();
  824. var t = $("#HtmlDeatil").find("img");
  825. if (t) {
  826. t.attr('data-preview-src', '');
  827. t.attr('data-preview-group', '9');
  828. }
  829. }
  830. },
  831. computed: {
  832. },
  833. watch: {
  834. Process (val) {
  835. this.$nextTick(() => {
  836. //缩小html中的图片
  837. var s = $(".ProcessDetail").find("img");
  838. if (s) {
  839. s.attr('data-preview-src', '');
  840. s.attr('data-preview-group', '10');
  841. s.css('height', 'auto');
  842. s.css('width', '100px');
  843. }
  844. })
  845. },
  846. CurrentDealDeatil(val) {
  847. this.$nextTick(() => {
  848. //缩小html中的图片
  849. var s = $("#CurrentDealDeatil").find("img");
  850. if (s) {
  851. s.attr('data-preview-src', '');
  852. s.attr('data-preview-group', '9');
  853. s.css('height', 'auto');
  854. s.css('width', '100px');
  855. }
  856. })
  857. }
  858. },
  859. mounted: function () {
  860. this.Myinit();
  861. }
  862. })
  863. </script>