VersionProblemDeatil.cshtml 32 KB

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