hiddenDangerItems.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <!-- 隐患项 -->
  2. <template>
  3. <view class="hiddenDangerItems">
  4. <view class="header">
  5. <view class="tabTitle_tow">
  6. <view class="tabTitle_tow_li" @tap="tabClickTow(index)" :key="index" v-for="(item,index) in tabTextTow">
  7. <view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
  8. <view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
  9. </view>
  10. </view>
  11. <view class="line"></view>
  12. <view class="search">
  13. <view class="search-l" @click="dialogOpen()">检查指标
  14. <img src="@/pages_safetyCheck/images/icon_06.png">
  15. </view>
  16. <view class="search-r">
  17. <img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
  18. 模糊搜索检查项
  19. </view>
  20. </view>
  21. </view>
  22. <view class="list">
  23. <view class="total">待整改共2项</view>
  24. <view class="list-li" v-for="(item,index) in dataList">
  25. <view class="list-li-t" @click="itemsClick(item)">
  26. <img src="@/pages_safetyCheck/images/icon_xz_fc@1x.png">
  27. <view>{{item.name}}</view>
  28. </view>
  29. <view class="list-li-b" @click="hiddenDangerClick(item)">此检查项在当前实验室累计出现<text>{{item.num}}</text>次隐患</view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import {
  36. config
  37. } from '@/api/request/config.js'
  38. export default {
  39. name: "hiddenDangerItems",
  40. components: {
  41. },
  42. data() {
  43. return {
  44. baseUrl: config.base_url,
  45. pageType: 1,
  46. tabTextTow: ['待整改', '已整改', '暂无法整改'],
  47. curTabTow: 0,
  48. form: {
  49. imgDtoList: [],
  50. },
  51. newData: {
  52. },
  53. dialogVisible: false,
  54. dataList: [{
  55. name: '1.1.1三级检查项目条款全显示三级检查项目条款检查项目条款检查项目条款全显示三级检查项目检查项目条款 检查项目条款条款全显示三级检查项目条款',
  56. num: '9'
  57. },
  58. {
  59. name: '隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐 ',
  60. num: '9'
  61. },
  62. ],
  63. }
  64. },
  65. onLoad(option) {
  66. this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
  67. this.pageType = this.newData.pageType;
  68. uni.setNavigationBarTitle({
  69. title: '实验室名称(房间号)'
  70. })
  71. if (this.pageType == 0) {
  72. //检查
  73. this.tabTextTow = ['待检查', '检查中', '已检查']
  74. } else if (this.pageType == 1) {
  75. //复查
  76. this.tabTextTow = ['待复查', '复查完毕', '退回整改']
  77. } else if (this.pageType == 2) {
  78. //整改
  79. this.tabTextTow = ['待整改', '已整改', '暂无法整改']
  80. }
  81. },
  82. onShow() {
  83. },
  84. mounted() {
  85. },
  86. methods: {
  87. //滚动事件
  88. scrollGet() {},
  89. //顶部tab点击
  90. tabClickTow(index) {
  91. this.curTabTow = index;
  92. },
  93. dialogOpen() {
  94. this.dialogVisible = true;
  95. },
  96. dialogClose() {
  97. this.dialogVisible = false;
  98. },
  99. itemsClick(row){
  100. let infoData=row;
  101. infoData.pageType=this.pageType;
  102. uni.redirectTo({
  103. url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(JSON.stringify(infoData))
  104. });
  105. },
  106. hiddenDangerClick(row){
  107. let infoData=row;
  108. infoData.pageType=this.pageType;
  109. uni.redirectTo({
  110. url: '/pages_safetyCheck/views/inspectManage/hiddenDangerRecord?infoData=' + encodeURIComponent(JSON.stringify(infoData))
  111. });
  112. },
  113. }
  114. }
  115. </script>
  116. <style lang="stylus" scoped>
  117. .hiddenDangerItems {
  118. height: 100%;
  119. display flex;
  120. box-sizing: border-box;
  121. #totalColor-A {
  122. color: #0183FA;
  123. background: rgba(1, 131, 250, 0.2);
  124. }
  125. #totalColor-B {
  126. color: #16B531;
  127. background: rgba(22, 181, 49, 0.2);
  128. }
  129. #totalColor-C {
  130. color: #FF8C00;
  131. background: rgba(255, 140, 0, 0.2);
  132. }
  133. .header {
  134. width: 100%;
  135. position: fixed;
  136. top: 0rpx;
  137. z-index: 100;
  138. background: #fff;
  139. .tabTitle_tow {
  140. width: 520rpx;
  141. height: 80rpx;
  142. display flex;
  143. justify-content: flex-start;
  144. align-items: center;
  145. .tabTitle_tow_li {
  146. flex: 1;
  147. position: relative;
  148. text-align center;
  149. .tabTitle_tow_text {
  150. display: inline-block;
  151. font-size: 30rpx;
  152. font-family: PingFang SC;
  153. font-weight: 500;
  154. color: #333333;
  155. line-height: 46rpx;
  156. position: relative;
  157. &.on {
  158. color: #0183FA;
  159. }
  160. }
  161. .tabTitle_tow_across {
  162. width: 50rpx;
  163. height: 4rpx;
  164. background: #0183FA;
  165. border-radius: 2rpx;
  166. margin-left: 38%;
  167. display none;
  168. &.on {
  169. display block;
  170. }
  171. }
  172. }
  173. }
  174. .line {
  175. width: 100%;
  176. height: 20rpx;
  177. background: #F5F5F5;
  178. }
  179. .search {
  180. width: 750rpx;
  181. height: 80rpx;
  182. background: #FFFFFF;
  183. border-radius: 0rpx 0rpx 0rpx 0rpx;
  184. display: flex;
  185. justify-content: flex-start;
  186. align-items: center;
  187. .search-l {
  188. width: 200rpx;
  189. height: 60rpx;
  190. border-radius: 50rpx 50rpx 50rpx 50rpx;
  191. border: 1rpx solid #E0E0E0;
  192. display: flex;
  193. justify-content: space-between;
  194. align-items: center;
  195. padding: 0 20rpx;
  196. box-sizing: border-box;
  197. margin: 0 32rpx 0 30rpx;
  198. >img {
  199. width: 24rpx;
  200. height: 12rpx;
  201. }
  202. }
  203. .search-r {
  204. width: 470rpx;
  205. height: 60rpx;
  206. background: #FFFFFF;
  207. border-radius: 50rpx 50rpx 50rpx 50rpx;
  208. border: 1rpx solid #E0E0E0;
  209. font-size: 24rpx;
  210. color: #999999;
  211. line-height: 60rpx;
  212. text-align: left;
  213. display: flex;
  214. justify-content: flex-start;
  215. align-items: center;
  216. padding: 0 20rpx;
  217. box-sizing: border-box;
  218. >img {
  219. width: 30rpx;
  220. height: 30rpx;
  221. margin-right: 20rpx;
  222. }
  223. }
  224. }
  225. }
  226. .list {
  227. width: 750rpx;
  228. background: #FFFFFF;
  229. margin-top: 200rpx;
  230. .total {
  231. width: 180rpx;
  232. height: 50rpx;
  233. background: rgba(1, 131, 250, 0.2);
  234. border-radius: 0rpx 0rpx 20rpx 0rpx;
  235. font-size: 24rpx;
  236. color: #0183FA;
  237. line-height: 50rpx;
  238. text-align: left;
  239. padding: 0rpx 22rpx;
  240. box-sizing: border-box;
  241. margin-bottom: 20rpx;
  242. }
  243. .list-li {
  244. margin: 0 30rpx;
  245. .list-li-t {
  246. width: 690rpx;
  247. background: #F5F5F5;
  248. border-radius: 10rpx 10rpx 10rpx 10rpx;
  249. display: flex;
  250. justify-content: flex-start;
  251. padding: 12rpx 20rpx 14rpx 14rpx;
  252. box-sizing: border-box;
  253. >img {
  254. width: 24rpx;
  255. height: 24rpx;
  256. margin-right: 30rpx;
  257. }
  258. >view {
  259. flex: 1;
  260. font-size: 24rpx;
  261. color: #3D3D3D;
  262. line-height: 34rpx;
  263. text-align: left;
  264. }
  265. }
  266. .list-li-b {
  267. font-size: 24rpx;
  268. color: #3D3D3D;
  269. line-height: 70rpx;
  270. text-align: right;
  271. >text {
  272. color: #FF0000;
  273. }
  274. }
  275. }
  276. }
  277. }
  278. </style>