indes.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <div class="fle bgColor">
  3. <!-- 头部导航栏 -->
  4. <div class="tav">
  5. <router-link to="/main/wxChartList">
  6. <i class="iconfont dsit-wodebaoxiu"></i>
  7. <span>微信/web报障</span>
  8. </router-link>
  9. <router-link to="/main/recordList">
  10. <i class="iconfont dsit-dianhualiuyan"></i>
  11. <span>留言列表</span>
  12. </router-link>
  13. <a href="http://itsm.zuel.edu.cn/user/#/knowList">
  14. <i class="iconfont dsit-changjianwenti2"></i>
  15. <span>常见问题</span>
  16. </a>
  17. </div>
  18. <div class="bigBody">
  19. <!-- 最新报修 -->
  20. <div class="newRepair">
  21. <div class="titHead">
  22. <span class="tit">
  23. <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
  24. <span>微信/WEB待办报障</span>
  25. </span>
  26. <span class="link" @click="toRecordList()">
  27. 更多
  28. <i class="iconfont dsit-xiangyou"></i>
  29. </span>
  30. </div>
  31. <div
  32. class="conentBox"
  33. v-for="item in dataList"
  34. @click="toIncidentDetails(item)"
  35. v-if="!!dataList.length"
  36. >
  37. <div class="conent">
  38. <div class="center">
  39. <div>
  40. <span class="fl">{{item.requester.name}}</span>
  41. <span class="fr">{{item.createTime}}</span>
  42. </div>
  43. <p class="desc">
  44. <span class="grayFont overflowEllipsis2" v-html="item.incidentDescription"></span>
  45. </p>
  46. </div>
  47. </div>
  48. </div>
  49. <!-- 无数据 -->
  50. <div class="wushuju" v-if="!dataList.length&&!newRapirLoading">
  51. <div>
  52. <img src="./../../static/images/quesheng.png" alt />
  53. <p>暂无待办报障</p>
  54. </div>
  55. </div>
  56. <!-- loading -->
  57. <div class="loading" v-if="newRapirLoading">
  58. <cube-loading :size="30"></cube-loading>
  59. </div>
  60. </div>
  61. <!-- 最新公告 -->
  62. <div class="newNotice">
  63. <div class="titHead">
  64. <span class="tit">
  65. <i class="iconfont icon-message newNoticeico"></i>
  66. <span>最新公告</span>
  67. </span>
  68. <span class="link" @click="toGuide()">
  69. 更多
  70. <i class="iconfont dsit-xiangyou"></i>
  71. </span>
  72. </div>
  73. <div class="conentBox" v-if="!newNoticeNoData&&!newNoticeLoading">
  74. <div class="conent" v-for="v in noticeData" @click="toGuideDetail(v)">
  75. <div class="head overflowEllipsis2">{{v.title}}</div>
  76. <div class="cot">{{v.createTime}}</div>
  77. <!-- <div class="cot">{{v.createTime.substring(0,v.createTime.length-5)}}</div> -->
  78. </div>
  79. </div>
  80. <!-- 无数据 -->
  81. <div class="wushuju" v-if="newNoticeNoData">
  82. <div>
  83. <img src="./../../static/images/quesheng.png" alt />
  84. <p>暂无公告</p>
  85. </div>
  86. </div>
  87. <!-- loading -->
  88. <div class="loading" v-if="newNoticeLoading">
  89. <cube-loading :size="30"></cube-loading>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </template>
  95. <script>
  96. import { formatDate } from "./../components/js/date.js";
  97. import http from "../request/http";
  98. export default {
  99. data() {
  100. return {
  101. loginUser: JSON.parse(localStorage.getItem("loginUser")),
  102. noticeData: "", //公告列表
  103. dataList: "", //最新报修
  104. state: "", //流程状态
  105. newRapirNoData: false, //最新报修无数据
  106. newNoticeNoData: false,
  107. newRapirLoading: true, //最新报修loading
  108. newNoticeLoading: true, //最新公告loading
  109. candidateGroups: ""
  110. };
  111. },
  112. methods: {
  113. // 获取公告列表数据
  114. getNoticData() {
  115. // alert('公告列表')
  116. var that = this;
  117. http.bpmFetchDataList('notice',{
  118. idx: 0,
  119. sum: 4
  120. })
  121. .then(function(res) {
  122. // alert(JSON.stringify(res.data))
  123. that.newNoticeLoading = false;
  124. if (res.data.list&&res.data.list.length > 0) {
  125. that.newNoticeNoData = false;
  126. that.noticeData = res.data.list;
  127. } else {
  128. that.newNoticeNoData = true;
  129. }
  130. });
  131. },
  132. // 获取最新报修
  133. getNewRapir() {
  134. var that = this;
  135. http.bpmFetchDataList('wxincident',{
  136. wxincident: { state: "未转换" },
  137. idx: 0,
  138. sum: 2
  139. })
  140. .then(function(res) {
  141. that.newRapirLoading = false;
  142. if (res.data.list.length > 0) {
  143. that.newRapirNoData = false;
  144. that.dataList = res.data.list;
  145. } else {
  146. that.newRapirNoData = true;
  147. }
  148. });
  149. },
  150. toRecordList() {
  151. this.$router.push({
  152. name: "WxChartList"
  153. });
  154. },
  155. // toKnowList() {
  156. // this.$router.push({ path: "/knowList" });
  157. // },
  158. toGuide() {
  159. this.$router.push({ path: "/guide" });
  160. },
  161. toGuideDetail(v) {
  162. this.$router.push({ name: "GuideDetail", params: { data: v } });
  163. },
  164. // 微信/WEB报障详情
  165. toIncidentDetails(data) {
  166. this.$router.push({
  167. name: "WxChartDetail",
  168. params: {
  169. data: data
  170. }
  171. });
  172. }
  173. },
  174. created() {
  175. var that = this;
  176. that.loginUser.group.forEach(element => {
  177. that.candidateGroups += element.id + ",";
  178. });
  179. that.candidateGroups = that.candidateGroups.substring(
  180. 0,
  181. that.candidateGroups.length - 1
  182. );
  183. // localStorage.removeItem("category");
  184. // localStorage.removeItem("model");
  185. // localStorage.removeItem("modelData");
  186. // localStorage.removeItem("place");
  187. // localStorage.removeItem("referenceInfo");
  188. // localStorage.removeItem("solution");
  189. // localStorage.removeItem("order");
  190. this.getNoticData();
  191. this.getNewRapir();
  192. },
  193. mounted() {}
  194. };
  195. </script>
  196. <style scoped lang="less">
  197. .fl {
  198. float: left;
  199. }
  200. .fr {
  201. float: right;
  202. }
  203. .bgColor {
  204. background-color: white;
  205. }
  206. .fle {
  207. display: flex;
  208. flex-direction: column;
  209. background-color: white;
  210. }
  211. .grayFont {
  212. color: #666;
  213. }
  214. .bigBody {
  215. display: flex;
  216. flex-direction: column;
  217. height: 100%;
  218. width: 100%;
  219. }
  220. /* 头部导航栏 */
  221. .tav {
  222. background: url(../../static/images/bg-top.png) no-repeat;
  223. display: flex;
  224. width: 100%;
  225. background-size: cover;
  226. }
  227. .tav a {
  228. height: 2.28rem;
  229. flex: 1;
  230. text-align: center;
  231. display: flex;
  232. flex-direction: column;
  233. align-items: center;
  234. justify-content: center;
  235. }
  236. .tav a i {
  237. font-size: 0.6rem;
  238. color: white;
  239. }
  240. .tav a span {
  241. font-size: 0.32rem;
  242. color: white;
  243. display: inline-block;
  244. margin-top: 0.16rem;
  245. }
  246. /* .bigBody{
  247. height: auto;
  248. } */
  249. /* tit导航 */
  250. .titHead {
  251. display: flex;
  252. justify-content: space-between;
  253. padding: 0 0.24rem;
  254. height: 0.88rem;
  255. line-height: 0.88rem;
  256. border-bottom: 0.01rem rgb(238, 238, 238) solid;
  257. }
  258. .titHead1 {
  259. height: 0.88rem;
  260. }
  261. .titHead .tit .newPapir {
  262. font-size: 0.36rem;
  263. color: #a37200;
  264. }
  265. .titHead .tit .newNoticeico {
  266. font-size: 0.36rem;
  267. color: #005395;
  268. }
  269. .titHead .tit span {
  270. display: inline-block;
  271. margin-left: 0.08rem;
  272. font-size: 0.36rem;
  273. }
  274. .titHead .link {
  275. font-size: 0.24rem;
  276. color: #999999;
  277. }
  278. .titHead .link i {
  279. font-size: 0.24rem;
  280. color: #999999;
  281. display: inline-block;
  282. margin-left: 0.08rem;
  283. }
  284. .newRepair {
  285. border-top: 0.16rem rgb(238, 238, 238) solid;
  286. .conentBox {
  287. .conent {
  288. font-size: 0.28rem;
  289. font-weight: 400;
  290. line-height: 0.45rem;
  291. .center {
  292. color: #333333;
  293. border-bottom: 0.01rem solid #e6e6e6;
  294. padding: 0.24rem 0.48rem;
  295. div {
  296. display: inline-block;
  297. width: 100%;
  298. .fl {
  299. font-size: 0.3rem;
  300. }
  301. .fr {
  302. color: #999;
  303. }
  304. }
  305. p {
  306. &.desc {
  307. overflow: hidden;
  308. max-height: 0.88rem;
  309. }
  310. .grayFont {
  311. overflow-x: scroll;
  312. color: #666;
  313. }
  314. }
  315. }
  316. }
  317. }
  318. }
  319. /* 最新公告 */
  320. .newNotice {
  321. border-top: 0.16rem rgb(238, 238, 238) solid;
  322. .conentBox {
  323. .conent {
  324. padding: 0.24rem 0.64rem;
  325. border-bottom: 0.01rem solid #eee;
  326. .head {
  327. font-size: 0.28rem;
  328. line-height: 0.45rem;
  329. }
  330. .cot {
  331. font-size: 0.24rem;
  332. color: #999;
  333. line-height: 0.34rem;
  334. }
  335. }
  336. }
  337. }
  338. .wushuju {
  339. text-align: center;
  340. color: #999;
  341. min-height: 5rem;
  342. display: flex;
  343. align-items: center;
  344. justify-content: center;
  345. }
  346. .wushuju img {
  347. height: 1.68rem;
  348. }
  349. .loading {
  350. height: 2rem;
  351. display: flex;
  352. justify-content: center;
  353. align-items: center;
  354. }
  355. </style>