ProblemReamrk.cshtml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. 
  2. @{
  3. ViewBag.Title = "ProblemReamrk";
  4. Layout = "~/Views/MobileProblem/_APPMain.cshtml";
  5. }
  6. @model PMS.BusinessModels.MobileProblem.ProblemDetailModel
  7. <link href="~/Content/Scripts/plugins/mui/css/mui.imageviewer.css" rel="stylesheet" />
  8. @* 图 *@
  9. <link href="~/Content/Style/MobileProductRegist/ProblemDeatail.css" rel="stylesheet" />
  10. <script src="~/Content/Scripts/plugins/mui/js/webuploader.js?v=1.2"></script>
  11. <script src="~/Content/Scripts/plugins/mui/js/PlusUploader.js?v=1.612"></script>
  12. <script src="~/Content/Scripts/plugins/mui/js/feedback-icon.js"></script>
  13. <script src="~/Content/Scripts/plugins/mui/js/mui.zoom.js"></script>
  14. <script src="~/Content/Scripts/plugins/mui/js/mui.previewimage.js"></script>
  15. <style>
  16. .UplodImg {
  17. display: flex;
  18. justify-content: space-between;
  19. flex-direction: row;
  20. align-content: center;
  21. padding: 7px 27px;
  22. }
  23. .filep {
  24. -webkit-line-clamp: 1;
  25. overflow: hidden;
  26. word-break: break-all;
  27. display: -webkit-box;
  28. -webkit-box-orient: vertical;
  29. text-overflow: ellipsis;
  30. position: absolute;
  31. bottom: 12px;
  32. background-color: rgba(0, 0, 0, 0.6);
  33. font-size: 13px;
  34. color: white;
  35. width: 100px;
  36. }
  37. .destory {
  38. position: absolute;
  39. top: 0;
  40. right: -6px;
  41. width: 10px;
  42. height: 10px;
  43. font-size: 20px;
  44. color: #cc9a9a;
  45. margin-bottom: 11px;
  46. transition: color 0.2s ease-out;
  47. background-color: transparent;
  48. border: transparent;
  49. }
  50. .destory:after {
  51. content: '×';
  52. position: absolute;
  53. top: -10px;
  54. right: 5px;
  55. }
  56. .UplodImg {
  57. padding-left: 10px;
  58. }
  59. .scoreDivTop {
  60. display: flex;
  61. flex-direction: row;
  62. margin-top: 10px;
  63. }
  64. .scoreDiv {
  65. background-color: white;
  66. padding: 5px 10px;
  67. margin-top: 10px;
  68. }
  69. .scoreDiv img {
  70. height: 20px;
  71. margin-right: 10px;
  72. }
  73. .scoreDiv p {
  74. color: black;
  75. font-weight: 500;
  76. }
  77. .icon {
  78. width: 1em;
  79. height: 1em;
  80. vertical-align: -0.15em;
  81. fill: currentColor;
  82. }
  83. .scoreCotent {
  84. margin: 20px 0;
  85. display: flex;
  86. flex-direction: row;
  87. justify-content: flex-start;
  88. align-items: center;
  89. }
  90. .scoreCotent div {
  91. font-size: 14px;
  92. margin-right: 10px;
  93. }
  94. .scoreCotent svg {
  95. margin: 0 5px;
  96. }
  97. .mui-btn-success {
  98. border: 1px solid #00aaff;
  99. background-color: #00aaff;
  100. }
  101. .mylist {
  102. width: 100%;
  103. height: auto;
  104. background-color: white;
  105. padding: 0.6rem 1rem;
  106. margin-top: 0.3rem;
  107. }
  108. </style>
  109. <div id="vue" v-cloak>
  110. <header class="mui-bar mui-bar-nav">
  111. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color:#ffffff"></a>
  112. <h1 class="mui-title" style="color:white">问题评价</h1>
  113. </header>
  114. <nav class="mui-bar mui-bar-tab" v-if="@Model.是否评价===0">
  115. <button v-on:click="Submit()" type="button" style="margin-top: 10px;border-radius: 10px;font-size:15px;margin:auto" class="mui-btn mui-btn-success mui-btn-block btn_2">提交</button>
  116. </nav>
  117. <div class="mui-content mui-scroll-wrapper" id="scr1">
  118. <div class="mui-scroll">
  119. <div id="item1" class="mui-control-content mui-active" style="overflow:hidden;">
  120. <div id="HtmlDeatil" class="mylist">
  121. <h4 style="font-size:15px;float:right">编号:@Model.问题编号</h4>
  122. <h4 style="font-size:15px">标题</h4>
  123. <p style="font-size:13px">@Model.问题标题</p>
  124. <h4 style="font-size:15px">详细描述</h4>
  125. <p style="font-size:13px">@Html.Raw(Model.问题描述)</p>
  126. </div>
  127. <div v-if="CurrentDealDeatil" class="mylist">
  128. <h4 style="font-size:15px">处理描述</h4>
  129. <p style="font-size:13px" id="CurrentDealDeatil" v-html="CurrentDealDeatil.描述">{{CurrentDealDeatil.描述}}</p>
  130. <div v-if="CurrentDealDeatil.图片 || CurrentDealDeatil.文件" class="Fileflex">
  131. <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'>
  132. <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>
  133. </div>
  134. </div>
  135. </div>
  136. <div v-if="@Model.是否评价===0">
  137. <div class="mui-input-row " style="font-size:14px;margin-top:10px">
  138. <textarea v-model="detail" id="detail" rows="8" placeholder="请在这里填写您对此次服务的评价。" style="font-size:15px;margin-bottom:-10px"></textarea>
  139. <span id="deatilSpeech" class="mui-icon mui-icon-speech" style="position:absolute;bottom:4px;right:0;color: #999;"></span>
  140. </div>
  141. <div style="background-color:white;margin-top:10px">
  142. <div class="UplodImg" id="pickImg">
  143. <h4 style="font-weight:400">图片</h4>
  144. <div>
  145. <span class="mui-icon mui-icon-camera" id="pickCamera" style="color:#1296db;margin-right:20px;font-size:28px"></span>
  146. <span class="mui-icon mui-icon-image" id="pickPhoto" style="color:#1296db"></span>
  147. </div>
  148. </div>
  149. <ul id="ImgList" class="mui-table-view mui-grid-view mui-grid-9" style="background-color:white;border-color:transparent;margin:0"></ul>
  150. </div>
  151. <div style="display:none" id="picker">选择文件</div>
  152. <div style="display:none" id="picker2">选择文件</div>
  153. <button style="margin-top: 30px;display:none;" id="ctlBtn" class="btn btn-default">图片上传</button>
  154. <div class="scoreDiv">
  155. <div class="scoreDivTop">
  156. <img src="~/Content/Images/zllogo.png" />
  157. <p>服务评分</p>
  158. </div>
  159. <div class="scoreCotent DealTime">
  160. <div>处理速度 </div>
  161. <svg core="1" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=1?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  162. <svg core="2" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=2?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  163. <svg core="3" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=3?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  164. <svg core="4" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=4?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  165. <svg core="5" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=5?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  166. <div style="margin-left:10%">{{DealTime+'分'}}</div>
  167. </div>
  168. <div class="scoreCotent DealQuality">
  169. <div>处理质量 </div>
  170. <svg core="1" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=1?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  171. <svg core="2" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=2?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  172. <svg core="3" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=3?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  173. <svg core="4" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=4?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  174. <svg core="5" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=5?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  175. <div style="margin-left:10%">{{DealQuality+'分'}}</div>
  176. </div>
  177. <div class="scoreCotent DealAttitude">
  178. <div>服务态度 </div>
  179. <svg core="1" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=1?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  180. <svg core="2" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=2?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  181. <svg core="3" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=3?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  182. <svg core="4" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=4?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  183. <svg core="5" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=5?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  184. <div style="margin-left:10%">{{DealAttitude+'分'}}</div>
  185. </div>
  186. </div>
  187. </div>
  188. <div v-else>
  189. <div class="mylist">
  190. <h4 style="font-size:15px">评价内容</h4>
  191. <p style="font-size:13px" id="FileDealDeatil" v-html="detail">{{detail}}</p>
  192. <div v-if="FileDealDeatilImg || FileDealDeatilFile" class="Fileflex">
  193. <img v-for="item in FileDealDeatilImg" data-preview-src='' data-preview-group='3' v-bind:src="item" style='width:50px;height:50px;padding:5px 5px 5px 0'>
  194. <a v-for="flie in FileDealDeatilFile" 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>
  195. </div>
  196. </div>
  197. <div class="scoreDiv">
  198. <div class="scoreDivTop">
  199. <img src="~/Content/Images/zllogo.png" />
  200. <p>服务评分</p>
  201. </div>
  202. <div class="scoreCotent DealTime">
  203. <div>处理速度 </div>
  204. <svg core="1" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=1?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  205. <svg core="2" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=2?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  206. <svg core="3" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=3?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  207. <svg core="4" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=4?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  208. <svg core="5" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealTime>=5?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  209. <div style="margin-left:10%">{{DealTime+'分'}}</div>
  210. </div>
  211. <div class="scoreCotent DealQuality">
  212. <div>处理质量 </div>
  213. <svg core="1" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=1?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  214. <svg core="2" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=2?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  215. <svg core="3" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=3?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  216. <svg core="4" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=4?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  217. <svg core="5" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealQuality>=5?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  218. <div style="margin-left:10%">{{DealQuality+'分'}}</div>
  219. </div>
  220. <div class="scoreCotent DealAttitude">
  221. <div>服务态度 </div>
  222. <svg core="1" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=1?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  223. <svg core="2" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=2?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  224. <svg core="3" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=3?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  225. <svg core="4" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=4?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  226. <svg core="5" class='icon' aria-hidden='true'><use v-bind:xlink:href="DealAttitude>=5?'#icon-pingjia2':'#icon-pingjia1'"></use></svg>
  227. <div style="margin-left:10%">{{DealAttitude+'分'}}</div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. <script>
  235. var IsPlus = mui.os.plus ? true : false;
  236. var ProblemID = '@ViewBag.ID';
  237. var isPJ=@Model.是否评价;
  238. var CommitID;
  239. var vm = new Vue({
  240. el: '#vue',
  241. data: {
  242. FivePlusUploder: null,
  243. DealTime: 5,
  244. DealQuality: 5,
  245. DealAttitude: 5,
  246. detail: '',
  247. CurrentDealDeatil: null,
  248. FileDealDeatilImg: null,
  249. FileDealDeatilFile: null,
  250. },
  251. methods: {
  252. init: function () {
  253. var that = this;
  254. mui.init();
  255. mui.previewImage();
  256. mui('.mui-scroll-wrapper').scroll();
  257. mui(".DealTime").on('tap', 'svg', function (event) {
  258. if (isPJ == "0") {
  259. var core = this.getAttribute('core');
  260. that.DealTime = core;
  261. }
  262. });
  263. mui(".DealQuality").on('tap', 'svg', function (event) {
  264. if (isPJ == "0") {
  265. var core = this.getAttribute('core');
  266. that.DealQuality = core;
  267. }
  268. });
  269. mui(".DealAttitude").on('tap', 'svg', function (event) {
  270. if (isPJ == "0") {
  271. var core = this.getAttribute('core');
  272. that.DealAttitude = core;
  273. }
  274. });
  275. mui.plusReady(function () {
  276. document.getElementById('deatilSpeech').addEventListener('tap', function () {
  277. plus.speech.startRecognize({
  278. engine: 'baidu',
  279. lang: 'zh-cn'
  280. }, function (s) {
  281. that.detail = s;
  282. }, function (e) {
  283. console.log('语音识别失败:' + JSON.stringify(e));
  284. });
  285. });
  286. });
  287. if (isPJ=="0")
  288. this.LoadUploder();
  289. },
  290. //获取产品问题过程
  291. GetProcess: function () {
  292. var that = this;
  293. $.post("/Problem/GetClc?ID=" + ProblemID, {}, function (data) {
  294. for (var fj of data) {
  295. if (fj.附件) {
  296. var img = [];
  297. var file = [];
  298. //全部附件
  299. var All = fj.附件.split(',');
  300. //判断单个附件类型
  301. for (var s of All) {
  302. ///如果为图片
  303. if (s.split('|')[1] == '1') {
  304. var ss = "/MobileProblem/ViewProblemImage/" + s.split('|')[0] + "?type=o"
  305. img.push(ss);
  306. }
  307. //如果为文件
  308. else {
  309. file.push(s.split('|')[0]);
  310. }
  311. }
  312. fj.图片 = img;
  313. fj.文件 = file;
  314. }
  315. }
  316. that.GetCurrentDealDeatil(data[0]);
  317. })
  318. },
  319. GetCurrentDealDeatil(item) {
  320. var d = item.处理状态;
  321. if (item.描述 && (d == "回退中" || d == "指派人员" || d == "已终止" || d == "处理中" || d == "已完成")) {
  322. this.CurrentDealDeatil = { 描述: item.描述, 图片: item.图片, 文件: item.文件 };
  323. }
  324. },
  325. //获取过程附件
  326. GetFlie: function (ID) {
  327. window.open('/MobileProblem/ViewProblemImage/' + ID);
  328. },
  329. ///获取评价内容
  330. GetEvaluationContent: function () {
  331. var that = this;
  332. $.post("/MobileProblem/GetEvaluationContent?ProblemID=" + ProblemID, {}, function (data) {
  333. if (data.length > 0) {
  334. var EvaluationContent = data[0]
  335. that.detail = EvaluationContent.DEATIL;
  336. that.DealTime = EvaluationContent.DEALTIME;
  337. that.DealQuality = EvaluationContent.DEALQUALITY;
  338. that.DealAttitude = EvaluationContent.DEALATTITUDE;
  339. that.GetEvaluation(EvaluationContent.ID);
  340. }
  341. })
  342. },
  343. //评价附件
  344. GetEvaluation: function (ID) {
  345. var that = this;
  346. $.post("/MobileProblem/GetEvaluationFile?ID=" + ID, {}, function (data) {
  347. var img = [];
  348. var file = [];
  349. for (var fj of data) {
  350. ///如果为图片
  351. if (fj.附件类型== '1') {
  352. var ss = "/MobileProblem/ViewProblemImage/" + fj.附件ID + "?type=o"
  353. img.push(ss);
  354. }
  355. //如果为文件
  356. else {
  357. file.push(fj.附件ID);
  358. }
  359. }
  360. that.FileDealDeatilImg = img;
  361. that.FileDealDeatilFile = file;
  362. })
  363. },
  364. ///初始化图片上传插件
  365. ImagUploaderInit: function () {
  366. var that = this;
  367. var $list = $("#ImgList");
  368. var $btn = $("#ctlBtn");
  369. var thumbnailWidth = 100;
  370. var thumbnailHeight = 100;
  371. var uploader = WebUploader.create({
  372. // 选完文件后,是否自动上传。
  373. auto: false,
  374. // swf文件路径
  375. swf: '/Content/Scripts/plugins/mui/js/Uploader.swf',
  376. // 文件接收服务端。
  377. server: '/MobileProblem/CommitUpload',
  378. // 选择文件的按钮。可选。
  379. // 内部根据当前运行是创建,可能是input元素,也可能是flash.
  380. pick: '#picker2',
  381. compress: {
  382. width: 1600,
  383. height: 1600,
  384. // 图片质量,只有type为`image/jpeg`的时候才有效。
  385. quality: 90,
  386. // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false.
  387. allowMagnify: false,
  388. // 是否允许裁剪。
  389. crop: false,
  390. // 是否保留头部meta信息。
  391. preserveHeaders: true,
  392. // 如果发现压缩后文件大小比原来还大,则使用原来图片
  393. // 此属性可能会影响图片自动纠正功能
  394. noCompressIfLarger: false,
  395. // 单位字节,如果图片大小小于此值,不会采用压缩。
  396. compressSize: 0
  397. }
  398. });
  399. uploader.on('fileQueued', function (file) {
  400. var $li = $('<li id="' + file.id + '" class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><img > <button class="destory" ></button><p class="filep">' + file.name + '</p> </li>'),
  401. $img = $li.find('img'); // $list为容器jQuery实例
  402. $list.append($li);
  403. $("#" + file.id).children(".destory").click(function () {
  404. uploader.removeFile(file);
  405. $("#" + file.id).remove();
  406. }); // 创建缩略图
  407. // 如果为非图片文件,可以不用调用此方法。
  408. // thumbnailWidth x thumbnailHeight 为 100 x 100
  409. uploader.makeThumb(file, function (error, src) {
  410. if (error) {
  411. $img.replaceWith('<span>不能预览</span>');
  412. return;
  413. }
  414. $img.attr('src', src);
  415. }, thumbnailWidth, thumbnailHeight);
  416. }); // 文件上传成功,给item添加成功class, 用样式标记上传成功。
  417. uploader.on('uploadSuccess', function (file, response) {
  418. $('#' + file.id).addClass('upload-state-done');
  419. if (response.code = "200") {
  420. }
  421. }); // 文件上传失败,显示上传出错。
  422. uploader.on('uploadError', function (file) {
  423. var $li = $('#' + file.id),
  424. $error = $li.find('div.error'); // 避免重复创建
  425. if (!$error.length) {
  426. $error = $('<div class="error"></div>').appendTo($li);
  427. }
  428. $error.text('上传失败');
  429. }); // 完成上传完了,成功或者失败,先删除进度条。
  430. uploader.on('uploadComplete', function (file) {
  431. $('#' + file.id).find('.progress').remove();
  432. });
  433. uploader.on('uploadFinished', function () {
  434. if (IsPlus) {
  435. that.FivePlusUploder.uplodNew(CommitID, function (data) {
  436. if (data.code==200) {
  437. plus.nativeUI.alert("评论成功!", function (e) {
  438. mui.back();
  439. }, "提示", "好");
  440. } else {
  441. plus.nativeUI.toast("图片提交失败,请联系管理员!");
  442. mui.back();
  443. }
  444. });
  445. } else {
  446. mui.alert("评论成功!", "提示", "确定", function () {
  447. mui.back();
  448. }, 'div');
  449. }
  450. });
  451. $btn.on('click', function () {
  452. uploader.options.formData.ID = CommitID;
  453. uploader.upload();
  454. });
  455. if (!IsPlus) {
  456. document.getElementById('pickImg').addEventListener('tap', function () {
  457. $("#picker").find('.webuploader-element-invisible').click();
  458. });
  459. }
  460. uploader.addButton({
  461. id: '#picker',
  462. innerHTML: '选择文件',
  463. accept: {
  464. title: 'Images',
  465. extensions: 'gif,jpg,jpeg,bmp,png',
  466. mimeTypes: 'image/*'
  467. },
  468. capture: 'camera'
  469. });
  470. },
  471. LoadUploder: function () {
  472. this.ImagUploaderInit();
  473. if (IsPlus) {
  474. this.FivePlusUploder = new FivePlus({ customUrl: "MobileProblem/CommitUpload" });
  475. } else {
  476. $('#deatilSpeech').remove();
  477. }
  478. },
  479. Submit: function () {
  480. var that = this;
  481. var param = {
  482. Deatil: that.detail,
  483. DealTime: that.DealTime,
  484. DealQuality: that.DealQuality,
  485. DealAttitude: that.DealAttitude,
  486. ProblemId: ProblemID
  487. }
  488. if (!this.detail) {
  489. // mui.toast('请填写您的评价', {
  490. // duration: 'long',
  491. // type: 'div'
  492. // });
  493. //return
  494. }
  495. var lod = mui.showLoading("正在提交,请稍后...", "div");
  496. $.post("/MobileProblem/ProblemReamrkSubmit", param, function (data) {
  497. mui.hideLoading(lod);
  498. if (data.Code == '200') {
  499. CommitID = data.CommentsId;
  500. if (IsPlus) {
  501. var lod2 = mui.showLoading("正在提交,请稍后...", "div");
  502. that.FivePlusUploder.uplodNew(CommitID, function (data) {
  503. mui.hideLoading(lod2);
  504. if (data) {
  505. plus.nativeUI.alert("评论成功!", function (e) {
  506. mui.back();
  507. }, "提示", "好");
  508. } else {
  509. plus.nativeUI.toast("图片提交失败,请联系管理员!");
  510. mui.back();
  511. }
  512. });
  513. } else {
  514. $("#ctlBtn").click();
  515. }
  516. } else {
  517. mui.toast('数据异常,请重新填写', {
  518. duration: 'long',
  519. type: 'div'
  520. });
  521. return false;
  522. }
  523. })
  524. }
  525. },
  526. watch: {
  527. CurrentDealDeatil(val) {
  528. this.$nextTick(() => {
  529. //缩小html中的图片
  530. var s = $("#CurrentDealDeatil").find("img");
  531. if (s) {
  532. s.attr('data-preview-src', '');
  533. s.attr('data-preview-group', '9');
  534. s.css('height', 'auto');
  535. s.css('width', '100px');
  536. }
  537. //缩小html中的图片
  538. //var s1 = $("#FileDealDeatil").find("img");
  539. //if (s1) {
  540. // s1.attr('data-preview-src', '');
  541. // s1.attr('data-preview-group', '9');
  542. // s1.css('height', 'auto');
  543. // s1.css('width', '100px');
  544. //}
  545. })
  546. },
  547. },
  548. mounted: function () {
  549. this.init();
  550. this.GetProcess();
  551. this.GetEvaluationContent();//获取评价内容
  552. }
  553. })
  554. </script>