earlyWarningPage.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <template>
  2. <div :class="showDatePicker || showSelect? 'homeMobeilMask': ''">
  3. </div>
  4. <div class="earlyWarningPage">
  5. <van-nav-bar title="单位考评预警" />
  6. <div class="mobeilVant">
  7. <div class="mobeilTop">
  8. <div class="topLeft">
  9. <!-- <van-icon name="star" size="20" /> -->
  10. <img :src="logoImg" alt="">
  11. <span>全业务域考评系统</span>
  12. </div>
  13. <div class="topRight">
  14. <span>系统导航</span>
  15. <!-- <van-icon name="wap-nav" size="23" /> -->
  16. <img :src="daohangImg" alt="" @click="chooseMenu">
  17. </div>
  18. </div>
  19. <div class="earlyWarningMain">
  20. <div class="mainSeach">
  21. <div class="rankingList">
  22. <span>{{showDate}}年度</span>
  23. <img :src="dateImg" @click="changePickerDate" alt="">
  24. </div>
  25. <div class="sectionModel">
  26. <span @click="changeSelect">{{binSectionName}}板块</span>
  27. </div>
  28. <div class="mainSeachImg">
  29. <img :src="sortImg" alt="">
  30. <img :src="seachImg" alt="" @click="getNotificationData(binSection, showDate)">
  31. </div>
  32. </div>
  33. <van-date-picker
  34. v-model="currentDate"
  35. title="选择年季"
  36. :columns-type="['year', 'month']"
  37. :filter="filterPicker"
  38. @confirm="confirmFn"
  39. @cancel="cancelpickerFn"
  40. v-if="showDatePicker"
  41. />
  42. <van-picker
  43. title="选择板块"
  44. :columns="columnSection"
  45. @confirm="selectConfirm"
  46. @cancel="cancelSelect"
  47. v-if="showSelect"
  48. />
  49. <div class="mainModel">
  50. <el-table :data="evaluationWaringData" style="width: 100%">
  51. <el-table-column label="序号" type="index" align="center" />
  52. <el-table-column label="考评单位" prop="company" width="200" />
  53. <el-table-column label="指标类型" prop="title" width="200" />
  54. <el-table-column label="预警内容" prop="content" />
  55. <el-table-column label="目标值" prop="targetValue" width="100" />
  56. <el-table-column label="完成值" prop="completeValue" width="100" />
  57. <el-table-column label="预警时间" prop="createTime" />
  58. <el-table-column label="确认人" prop="userName" />
  59. <el-table-column label="确认时间" prop="confirmTime" />
  60. <el-table-column label="状态" width="100">
  61. <template #default="scope">
  62. <span class="statusSty"
  63. :style="scope.row.isConfirm ? 'background:#61C760':'background:#5093E1'">
  64. {{scope.row.isConfirm?'已确认':'未确认'}}
  65. </span>
  66. </template>
  67. </el-table-column>
  68. </el-table>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </template>
  74. <script>
  75. import logoImg from '../assets/mobeilImg/logo.png'
  76. import daohangImg from '../assets/mobeilImg/daohang.png'
  77. import dateImg from '../assets/mobeilImg/date.png'
  78. import sortImg from '../assets/mobeilImg/sort.png'
  79. import seachImg from '../assets/mobeilImg/seach.png'
  80. import {apiGetevaluationwarninginfoList} from '../api/api'
  81. export default {
  82. data() {
  83. return {
  84. logoImg: logoImg,
  85. daohangImg: daohangImg,
  86. dateImg: dateImg,
  87. sortImg: sortImg,
  88. seachImg: seachImg,
  89. showDatePicker: false,
  90. showSelect: false,
  91. currentDate: [],
  92. showDate: '',
  93. binSection: 'HD',
  94. binSectionName: '火电',
  95. evaluationWaringData: [],
  96. columnSection: []
  97. }
  98. },
  99. created() {
  100. this.showDate = new Date().getFullYear()-1
  101. this.getevaluationWaringData()
  102. this.columnSection = [
  103. { text: '火电', value: 'HD' },
  104. { text: '水电', value: 'SD' },
  105. { text: '新能源', value: 'XNYFG' },
  106. { text: '海外业务', value: 'GJYW' },
  107. { text: '煤电一体化', value: 'MDYTH' }
  108. ]
  109. },
  110. methods: {
  111. // 获取公告数据
  112. getevaluationWaringData() {
  113. let that = this
  114. let params = {
  115. pageNum: 1,
  116. pageSize: 100,
  117. binStation: '',
  118. st: '',
  119. et: ''
  120. }
  121. apiGetevaluationwarninginfoList(params).then(datas =>{
  122. if (datas && datas.data) {
  123. that.evaluationWaringData = datas.data.records
  124. }
  125. })
  126. },
  127. filterPicker(type, options) {
  128. if (type === 'month') {
  129. return options.filter((option) => Number(option.value) < 5);
  130. }
  131. return options;
  132. },
  133. noticDetail(row) {
  134. let detailObj = JSON.stringify(row)
  135. this.$router.push({ path: "/notificationDetail", query: {rowObj: detailObj}})
  136. },
  137. chooseMenu() {
  138. this.$router.push({ path: "/menu"})
  139. },
  140. changePickerDate() {
  141. this.showDatePicker = true
  142. },
  143. changeSelect() {
  144. this.showSelect = true
  145. },
  146. confirmFn(val) {
  147. this.showDate = val.selectedValues[0]
  148. this.cancelpickerFn()
  149. },
  150. selectConfirm(val) {
  151. this.binSection = val.selectedValues[0]
  152. if (this.binSection === 'HD') {
  153. this.binSectionName = '火电'
  154. } else if (this.binSection === 'SD') {
  155. this.binSectionName = '水电'
  156. } else if (this.binSection === 'XNYFG') {
  157. this.binSectionName = '新能源'
  158. } else if (this.binSection === 'GJYW') {
  159. this.binSectionName = '海外业务'
  160. } else if (this.binSection === 'MDYTH') {
  161. this.binSectionName = '煤电一体化'
  162. }
  163. this.cancelSelect()
  164. },
  165. cancelpickerFn() {
  166. this.showDatePicker = false
  167. },
  168. cancelSelect() {
  169. this.showSelect = false
  170. }
  171. }
  172. }
  173. </script>
  174. <style lang="less">
  175. .homeMobeilMask{
  176. position: fixed;
  177. top: 0;
  178. left: 0;
  179. width: 100%;
  180. height: 100%;
  181. background-color: rgba(0,0,0,0.5);
  182. z-index: 111;
  183. }
  184. .earlyWarningPage {
  185. background-color: #184FB4;
  186. .van-nav-bar{
  187. width: 100%;
  188. background-color: #184FB4;
  189. color: #fff;
  190. position: fixed;
  191. top: 0;
  192. z-index: 111111;
  193. .van-nav-bar__content{
  194. .van-nav-bar__left{
  195. .van-nav-bar__text{
  196. color: #fff;
  197. }
  198. }
  199. }
  200. }
  201. .mobeilVant{
  202. height: 100%;
  203. margin-top: 45px;
  204. border-radius: 10px 10px 0 0;
  205. background-color: #fff;
  206. .mobeilTop{
  207. height: 60px;
  208. display: flex;
  209. justify-content: space-around;
  210. .topLeft{
  211. display: flex;
  212. img{
  213. width: 24px;
  214. height: 28px;
  215. position: relative;
  216. top: 18px;
  217. left: -10px;
  218. }
  219. span{
  220. font-family: MicrosoftYaHei;
  221. font-weight: 600;
  222. font-size: 16px;
  223. color: #444950;
  224. line-height: 60px;
  225. }
  226. }
  227. .topRight{
  228. display: flex;
  229. img{
  230. width: 22px;
  231. height: 18px;
  232. position: relative;
  233. top: 21px;
  234. left: 5px;
  235. }
  236. span{
  237. font-family: MicrosoftYaHei;
  238. font-weight: 400;
  239. font-size: 14px;
  240. color: #545960;
  241. line-height: 60px;
  242. margin-right: 5px;
  243. }
  244. }
  245. }
  246. .earlyWarningMain{
  247. // height: 50px;
  248. background-color: #ededf5;
  249. padding: 17px 20px;
  250. width: calc(100% - 40px);
  251. .mainSeach{
  252. display: flex;
  253. // justify-content: space-between;
  254. .rankingList{
  255. width: 37%;
  256. height: 40px;
  257. background: #184FB4;
  258. border-radius: 5px;
  259. margin-bottom: 15px;
  260. margin-right: 10px;
  261. span{
  262. display: inline-block;
  263. width: 85%;
  264. font-family: MicrosoftYaHei;
  265. font-weight: 400;
  266. font-size: 16px;
  267. color: #fff;
  268. margin-right: 5px;
  269. position: relative;
  270. left: 20px;
  271. top: 10px;
  272. }
  273. img{
  274. width: 22px;
  275. height: 18px;
  276. position: relative;
  277. top: -10px;
  278. left: 90px;
  279. }
  280. }
  281. .sectionModel{
  282. width: 37%;
  283. height: 40px;
  284. background: #838DAB;
  285. border-radius: 5px;
  286. margin-bottom: 15px;
  287. margin-right: 15px;
  288. span{
  289. display: inline-block;
  290. width: 100%;
  291. line-height: 40px;
  292. text-align: center;
  293. color: #fff;
  294. }
  295. }
  296. .mainSeachImg{
  297. width: 17%;
  298. display: flex;
  299. justify-content: space-between;
  300. position: relative;
  301. top: 10px;
  302. img:nth-child(1){
  303. width: 25px;
  304. height: 15px;
  305. position: relative;
  306. top: 2px;
  307. }
  308. img:nth-child(2){
  309. width: 22px;
  310. height: 22px;
  311. }
  312. }
  313. }
  314. .van-picker{
  315. z-index: 222222
  316. }
  317. .mainModel{
  318. background: #fff;
  319. border-radius: 5px;
  320. padding: 5px 0;
  321. .el-table{
  322. .el-table__header-wrapper{
  323. .el-table__header{
  324. tr{
  325. .cell{
  326. line-height: 18px !important;
  327. }
  328. }
  329. }
  330. }
  331. .el-table__body-wrapper{
  332. .el-table__body{
  333. tr{
  334. .cell{
  335. img{
  336. width: 20px;
  337. height: 20px;
  338. }
  339. }
  340. }
  341. }
  342. }
  343. .statusSty{
  344. width: 52px;
  345. height: 21px;
  346. line-height: 21px;
  347. display: inline-block;
  348. border-radius: 3px;
  349. color: #fff;
  350. padding: 0 0 0 10px;
  351. }
  352. }
  353. }
  354. }
  355. }
  356. }
  357. </style>