Search.cshtml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. @{
  2. ViewBag.Title = "Search";
  3. Layout = "~/Views/Shared/SearchVue.cshtml";
  4. }
  5. <style>
  6. .w-100 {
  7. width: 100% !important;
  8. }
  9. .h-100 {
  10. height: 100% !important;
  11. }
  12. .from {
  13. display: flex;
  14. justify-content: center;
  15. }
  16. .center {
  17. display: flex;
  18. justify-content: space-evenly;
  19. }
  20. .align-center {
  21. display: flex;
  22. align-items: center;
  23. }
  24. .k-sdisplay-none {
  25. display: none !important;
  26. }
  27. .ml-20 {
  28. margin-top: 20px !important;
  29. }
  30. .text {
  31. width: 90%;
  32. height: 50px;
  33. line-height: 50px;
  34. }
  35. .el-input__inner {
  36. height: 100% !important;
  37. border-top-left-radius: 8px !important;
  38. border-bottom-left-radius: 8px !important;
  39. border-top-right-radius: 0px !important;
  40. border-bottom-right-radius: 0px !important;
  41. }
  42. .el-button {
  43. height: 50px !important;
  44. border-top-left-radius: 0px !important;
  45. border-bottom-left-radius: 0px !important;
  46. border-top-right-radius: 8px !important;
  47. border-bottom-right-radius: 8px !important;
  48. }
  49. </style>
  50. <div id="toolbar" style="padding: 3px; margin-top: 300px; overflow: hidden;" class="h-100">
  51. <div id="ff" class="w-100 h-100 from">
  52. <div style="width: 50%">
  53. @*<div class="w-100 mb-10">
  54. <div class="align-center">
  55. <label class="el-dropdown">标签:</label>
  56. <el-checkbox-group v-model="checkTags" class="ml-10">
  57. <el-checkbox-button v-for="tag in tags" :label="tag.显示名" :key="tag.ID">{{tag.显示名}}</el-checkbox-button>
  58. </el-checkbox-group>
  59. </div>
  60. </div>*@
  61. <div class="w-100" style="display:flex;">
  62. <el-input class="text" type="text" v-model="keyword" @@keyup.enter.native="submitSearch"></el-input>
  63. <el-button type="primary" @@click="submitSearch"><i class="fa fa-search"></i> 搜索</el-button>
  64. </div>
  65. <label class="el-dropdown ml-20 mb-10" v-show="tableData.length > 0">搜索结果:</label>
  66. <div style="height: 40vh; overflow-y: auto; position: relative;">
  67. <el-collapse v-show="tableData.length > 0" class="h-100">
  68. <el-collapse-item v-for="data in tableData" :key="data.id" :title="data.title" :name="data.id" class="w-100">
  69. <div v-html="data.description"></div>
  70. <el-button type="text" @@click="openDetails(data.id)">查看详情</el-button>
  71. </el-collapse-item>
  72. </el-collapse>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <script>
  78. $(function () {
  79. new Vue({
  80. el: '#toolbar',
  81. data() {
  82. return {
  83. keyword: "",
  84. tableData: [],
  85. tags: [],
  86. checkTags: [],
  87. tableData: [],
  88. RYXZ: "@ViewBag.RYXZ",
  89. };
  90. },
  91. methods: {
  92. submitSearch() {
  93. this.tableData = [];
  94. let textValue = this.keyword;
  95. if (textValue) {
  96. $.ajax({
  97. url: "/search/titlePrecision",
  98. method: "GET",
  99. data: { keyword: textValue },
  100. success: function (data) {
  101. if (data && data.list.length > 0) {
  102. this.tableData = data.list;
  103. }
  104. }.bind(this)
  105. });
  106. }
  107. },
  108. GetBaseCode() {
  109. $.ajax({
  110. url: "/BaseCode/GetBaseCode",
  111. method: "GET",
  112. data: { id: "00632C0D-2826-4792-B028-7DA6809B1FAA" },
  113. success: (data) =>{
  114. if (data) {
  115. this.tags = data
  116. }
  117. }
  118. });
  119. },
  120. openDetails(id) {
  121. top.ZLPMS.OpenNewWindow("查看问题", "/Problem/CheckProblemWindow/" + id, '880px', '600px', () => {
  122. this.dealProblem(0, 0, id);
  123. });
  124. },
  125. dealProblem(showAtt, IsSupport, ProblemId) {
  126. //是否为技术支持处理
  127. IsSupport = IsSupport || 0;
  128. $.post('/Problem/GetProblemById/' + ProblemId, (data) =>{
  129. var row = data[0];
  130. if (row) {
  131. /*已关闭的问题,已解决的问题,已受理的问题, 不需要处理*/
  132. if (row.是否终止 == 1) {
  133. top.ZLPMS.Msg('已终止的问题不需要再处理!');
  134. return;
  135. }
  136. if (row.是否解决 == 1) {
  137. top.ZLPMS.Msg('已解决的问题不需要再处理!');
  138. return;
  139. }
  140. if (row.环节ID > 3 && this.RYXZ != '1') {
  141. top.ZLPMS.Msg('非本部人员不能处理技术支持与研发处理环节问题,仅能查阅!');
  142. return;
  143. }
  144. if (row.环节ID == 3 && (this.RYXZ == '3' || this.RYXZ == '4' || this.RYXZ == '5')) {//客户,机构管理员,卫计委人员无法处理项目问题
  145. top.ZLPMS.Msg('客户,机构管理员,卫计委人员无法处理项目问题,仅能查阅!');
  146. return;
  147. }
  148. //打开处理窗口
  149. this.receiveProblem(row.编号, row.环节ID, showAtt, ProblemId, IsSupport);
  150. } else {//提醒用户没有选择问题记录
  151. top.ZLPMS.Msg('没有选择需要处理的问题记录,请选择后再处理!');
  152. }
  153. })
  154. },
  155. receiveProblem(title, HJID, showAtt, ProblemId, IsSupport) {
  156. var index = top.ZLPMS.Loading3(2);
  157. //受理问题
  158. $.ajax({
  159. url: '/Support/ReceiveProblem',
  160. data: { id: ProblemId },
  161. method: 'post',
  162. success: function (data) {
  163. top.ZLPMS.UnLoading(index);
  164. var url = "/Problem/ProductionPdeal?id=" + ProblemId + "&showAtt=" + showAtt + '&workflowid=' + HJID + '&IsSupport=' + IsSupport;
  165. //成功后调用
  166. if (data.code == 200) {
  167. top.ZLPMS.OpenNewWindow("处理问题:" + title, url, '1000px', '640px', function () {
  168. //回调用刷新(只有确定后才刷新)
  169. });
  170. } else {//显示具体原因,并提示是否强制处理
  171. top.ZLPMS.Confirm('该问题已被他人受理,您确定要继续处理吗?', 3, function (idx) {
  172. top.ZLPMS.CloseWindow(idx);
  173. top.ZLPMS.OpenNewWindow("处理问题", url, '1000px', '640px');
  174. })
  175. }
  176. }
  177. });
  178. },
  179. },
  180. created() {
  181. this.GetBaseCode();
  182. },
  183. });
  184. })
  185. </script>