inforSign.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. <!-- 安全信息牌 -->
  2. <template>
  3. <view class="examine">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="header">
  6. <view class="header_l">
  7. <text>{{itemData.typeName}}</text>
  8. <text></text>
  9. <text>{{itemData.levelName}}</text>
  10. </view>
  11. <view class="header_r">{{itemData.deptName}}-{{itemData.room}}</view>
  12. </view>
  13. <view class="basics">
  14. <view class="grade">
  15. <text>责任单位:</text>
  16. <text>{{itemData.deptName}}</text>
  17. </view>
  18. <view class="grade">
  19. <text>实验室负责人:</text>
  20. <text>{{itemData.adminName}}-{{itemData.adminPhone?itemData.adminPhone:'未填写'}}</text>
  21. </view>
  22. <view class="duty">
  23. <view class="duty_l">安全责任人:</view>
  24. <view class="duty_r">
  25. <text>{{itemData.safeUserNameAdminPhone}}</text>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="category" v-if="item.privateList.length>0 && item.classifyType==1"
  30. v-for="(item,index) in itemData.classifyList" :key="index">
  31. <view class="title" :style="'background:'+item.showColour">{{item.classifyName}}</view>
  32. <view class="category_li" v-for="(item2,index2) in item.privateList" :key="index2">
  33. <text></text><text>{{item2.infoName}}</text></view>
  34. </view>
  35. <view class="category" v-if="item.privateList.length>0 && item.classifyType==2"
  36. v-for="(item,index) in itemData.classifyList" :key="index">
  37. <view class="title">{{item.classifyName}}</view>
  38. <view class="identify_img" @click="lockImg(item.privateList)">
  39. <img :src="baseUrl+item2.infoContent" v-for="(item2,index2) in item.privateList" :key="index2" />
  40. </view>
  41. </view>
  42. <view class="category" v-if="item.privateList.length>0 && item.isSpecial==2"
  43. v-for="(item,index) in itemData.classifyList" :key="index">
  44. <view class="title">{{item.classifyName}}</view>
  45. <view class="telephone_li" v-for="(item3,index3) in item.privateList" :key="index3">
  46. {{item3.infoContent}}</view>
  47. </view>
  48. </scroll-view>
  49. <view class="bottom_btn" @click="handleClick('start')">开展检查</view>
  50. </view>
  51. </template>
  52. <script>
  53. import {
  54. config
  55. } from '@/api/request/config.js'
  56. import {
  57. getSelectInfoByRoom,
  58. getInforSign
  59. } from '@/api/apiDemo/index.js'
  60. export default {
  61. name: "rectifyList",
  62. components: {
  63. },
  64. data() {
  65. return {
  66. baseUrl: config.base_url,
  67. pageType: 2,
  68. id: '',
  69. itemData: {},
  70. }
  71. },
  72. onLoad(option) {
  73. if (option.subId) {
  74. this.id = option.subId;
  75. }
  76. },
  77. onShow() {
  78. },
  79. mounted() {
  80. this.getInforSign()
  81. console.log(uni.getStorageSync('saoCodeId'))
  82. },
  83. methods: {
  84. //滚动事件
  85. scrollGet() {},
  86. //查询详情
  87. async getInforSign() {
  88. let self = this;
  89. let id = uni.getStorageSync('saoCodeId');
  90. const {
  91. data
  92. } = await getInforSign(id);
  93. if (data.code == 200) {
  94. this.itemData = data.data;
  95. console.log(this.itemData)
  96. }
  97. },
  98. //查看图片
  99. lockImg(list) {
  100. console.log(list)
  101. if (!list[0]) {
  102. return
  103. }
  104. let urlList = [];
  105. for (let i = 0; i < list.length; i++) {
  106. urlList.push(this.baseUrl + list[i].infoContent)
  107. }
  108. wx.previewImage({
  109. urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  110. current: '', // 当前显示图片的http链接,默认是第一个
  111. success: function(res) {},
  112. fail: function(res) {},
  113. complete: function(res) {},
  114. })
  115. },
  116. handleClick(doType) {
  117. let self = this;
  118. if (doType == 'start') { //提交
  119. uni.navigateTo({
  120. url: '/pages_safetyExamine/views/examineManage/examineAdd?id=' + uni.getStorageSync(
  121. 'saoCodeId')
  122. });
  123. }
  124. },
  125. }
  126. }
  127. </script>
  128. <style lang="stylus" scoped>
  129. .examine {
  130. height: 100%;
  131. display flex;
  132. box-sizing: border-box;
  133. .info-max-box {
  134. flex: 1;
  135. overflow: scroll;
  136. padding-bottom: 128rpx;
  137. box-sizing: border-box;
  138. }
  139. .header {
  140. width: 690rpx;
  141. height: 100rpx;
  142. background: #FFFFFF;
  143. border-radius: 20rpx 20rpx 20rpx 20rpx;
  144. margin: 20rpx 30rpx;
  145. padding: 0 30rpx;
  146. box-sizing: border-box;
  147. display: flex;
  148. justify-content: flex-start;
  149. align-items: center;
  150. .header_l {
  151. width: auto;
  152. height: 60rpx;
  153. background: #FFFFFF;
  154. border-radius: 50rpx 50rpx 50rpx 50rpx;
  155. opacity: 1;
  156. border: 1rpx solid #DF4848;
  157. padding: 0 20rpx;
  158. box-sizing: border-box;
  159. display: flex;
  160. justify-content: flex-start;
  161. align-items: center;
  162. margin-right: 26rpx;
  163. >text:nth-of-type(1) {
  164. font-size: 24rpx;
  165. font-family: PingFang SC-Medium, PingFang SC;
  166. font-weight: 400;
  167. color: #DF4848;
  168. line-height: 60rpx;
  169. }
  170. >text:nth-of-type(2) {
  171. display: inline-block;
  172. width: 0rpx;
  173. height: 19rpx;
  174. opacity: 1;
  175. border: 1rpx solid #A2A2A2;
  176. margin: 0 10rpx;
  177. }
  178. >text:nth-of-type(3) {
  179. font-size: 24rpx;
  180. font-family: PingFang SC-Medium, PingFang SC;
  181. font-weight: 400;
  182. color: #DF4848;
  183. line-height: 60rpx;
  184. }
  185. }
  186. .header_r {
  187. font-size: 30rpx;
  188. font-family: PingFang SC-Medium, PingFang SC;
  189. font-weight: 400;
  190. color: #333333;
  191. line-height: 60rpx;
  192. flex: 1;
  193. white-space: nowrap;
  194. overflow: hidden;
  195. text-overflow: ellipsis;
  196. }
  197. }
  198. .basics {
  199. width: 690rpx;
  200. background: #FFFFFF;
  201. border-radius: 20rpx;
  202. padding: 0rpx 30rpx;
  203. box-sizing: border-box;
  204. margin: 20rpx 30rpx;
  205. .grade {
  206. height: 100rpx;
  207. display: flex;
  208. justify-content: space-between;
  209. border-bottom: 1rpx solid #D8D8D8;
  210. >text:nth-of-type(1) {
  211. font-size: 28rpx;
  212. font-family: PingFang SC-Medium, PingFang SC;
  213. font-weight: 400;
  214. color: #333333;
  215. line-height: 100rpx;
  216. }
  217. >text:nth-of-type(2) {
  218. flex: 1;
  219. font-size: 28rpx;
  220. font-family: PingFang SC-Medium, PingFang SC;
  221. font-weight: 400;
  222. color: #666666;
  223. line-height: 100rpx;
  224. text-align: right;
  225. }
  226. }
  227. .duty {
  228. display: flex;
  229. justify-content: space-between;
  230. padding: 20rpx 0rpx;
  231. box-sizing: border-box;
  232. .duty_l {
  233. font-size: 28rpx;
  234. font-family: PingFang SC-Medium, PingFang SC;
  235. font-weight: 400;
  236. color: #333333;
  237. line-height: 60rpx;
  238. }
  239. .duty_r {
  240. flex: 1;
  241. >text {
  242. display: block;
  243. font-size: 28rpx;
  244. font-family: PingFang SC-Medium, PingFang SC;
  245. font-weight: 400;
  246. color: #666666;
  247. line-height: 60rpx;
  248. text-align: right;
  249. }
  250. }
  251. }
  252. }
  253. .category {
  254. width: 690rpx;
  255. background: #FFFFFF;
  256. border-radius: 20rpx;
  257. margin: 20rpx 30rpx;
  258. padding-bottom: 20rpx;
  259. box-sizing: border-box;
  260. .title {
  261. width: 690rpx;
  262. height: 80rpx;
  263. background: #133E93;
  264. border-radius: 10rpx 10rpx 0rpx 0rpx;
  265. font-size: 30rpx;
  266. font-family: PingFang SC-Medium, PingFang SC;
  267. font-weight: 400;
  268. color: #FFFFFF;
  269. line-height: 80rpx;
  270. text-align: center;
  271. margin-bottom: 20rpx;
  272. }
  273. .category_li {
  274. margin-left: 34rpx;
  275. display: flex;
  276. justify-content: flex-start;
  277. >text:nth-of-type(1) {
  278. display: inline-block;
  279. width: 20rpx;
  280. height: 20rpx;
  281. border-radius: 50%;
  282. background: #D8D8D8;
  283. margin-right: 14rpx;
  284. margin-top: 20rpx;
  285. }
  286. >text:nth-of-type(2) {
  287. flex: 1;
  288. font-size: 28rpx;
  289. font-family: PingFang SC-Medium, PingFang SC;
  290. font-weight: 400;
  291. color: #666666;
  292. line-height: 60rpx;
  293. }
  294. }
  295. /* 安全警示标识 */
  296. .identify_img {
  297. display: flex;
  298. justify-content: flex-start;
  299. flex-wrap: wrap;
  300. margin-left: 34rpx;
  301. >img {
  302. width: 67rpx;
  303. height: 90rpx;
  304. margin-right: 24rpx;
  305. margin-bottom: 20rpx;
  306. }
  307. }
  308. /* 紧急报警电话 */
  309. .telephone_li {
  310. flex: 1;
  311. font-size: 28rpx;
  312. font-family: PingFang SC-Medium, PingFang SC;
  313. font-weight: 400;
  314. color: #333333;
  315. line-height: 60rpx;
  316. margin-left: 34rpx;
  317. }
  318. }
  319. /* 待整改 */
  320. .bottom_btn {
  321. position: fixed;
  322. bottom: 26rpx;
  323. left: 30rpx;
  324. font-size: 30rpx;
  325. font-family: PingFang SC-Medium, PingFang SC;
  326. font-weight: 400;
  327. color: #FFFFFF;
  328. line-height: 90rpx;
  329. width: 690rpx;
  330. height: 90rpx;
  331. background: #0183FA;
  332. border-radius: 20rpx;
  333. text-align: center;
  334. }
  335. }
  336. </style>