sampleBoard.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <div class="data-view">
  3. <!-- 全屏显示容器 -->
  4. <dv-full-screen-container>
  5. <!-- 头部内容部分 -->
  6. <div class="headerContent">
  7. <!-- 标题装饰组件 -->
  8. <header-decoration :titleName="outputData.headerName"/>
  9. <div
  10. class="goBackButton"
  11. style="width: 12%;
  12. height:2.825rem;
  13. line-height: 2.825rem;
  14. text-align:center;
  15. position: absolute;
  16. left: 11%;
  17. top:3.8%;" >
  18. <span>月份</span>
  19. <el-date-picker
  20. style="width:80%"
  21. v-model="NowTime1"
  22. type="month"
  23. @change="changeTime1"
  24. format="yyyy-MM"
  25. value-format="yyyy-MM"
  26. placeholder="请选择时间">
  27. </el-date-picker>
  28. </div>
  29. <!-- 返回按钮 -->
  30. <div
  31. class="goBackButton"
  32. @click.prevent="goBack()"
  33. style="width: 12%;
  34. height:2.825rem;
  35. line-height: 2.825rem;
  36. text-align:center;
  37. position: absolute;
  38. right: 11%;
  39. top:4%;" >
  40. <dv-border-box-8>返回</dv-border-box-8>
  41. </div>
  42. <!-- 显示数据上一次更新的时间 -->
  43. <!-- <div
  44. class="changeTime"
  45. style="width: 18%;
  46. cursor: pointer;
  47. height:2.825rem;
  48. line-height: 2.825rem;
  49. text-align:center;
  50. position: absolute;
  51. left: 63%;
  52. top:4%;
  53. color: #FFFFFF;">
  54. <dv-border-box-8 >上一次更新时间:{{this.sendTime}}</dv-border-box-8>
  55. </div> -->
  56. <!-- 样品头部数据总览 -->
  57. <div class="overView">
  58. <headerContent @getUpdateTime="getTime" :NowTime1="NowTime1+'-01'"></headerContent>
  59. <dv-decoration-10 style="width:100%;height:5px;" />
  60. </div>
  61. </div>
  62. <!-- 主体内容(图表部分) -->
  63. <div class="mainContent">
  64. <div class="entrust">
  65. <div class="Number" ref="Number_refs"><entrustNumber :NowTime1="NowTime1"/> </div>
  66. <!-- <div class="Type" ><entrustType/></div> -->
  67. </div>
  68. <div class="detection">
  69. <div class="monthlyS" ref="MonthlyStatus_refs"><monthlyStatus :NowTime1="NowTime1"/></div>
  70. <div class="annualS" ref="AnnualStatus_refs"><annualStatus/></div>
  71. <div class="monthlyN" ref="MonthlyNumber_refs"><monthlyNumber :NowTime1="NowTime1"/></div>
  72. </div>
  73. </div>
  74. </dv-full-screen-container>
  75. </div>
  76. </template>
  77. <script>
  78. //全屏展示
  79. import screenfull from 'screenfull'
  80. //大屏标题组件
  81. import headerDecoration from './component/sample/headerDecoration'
  82. //头部内容组件
  83. import headerContent from './component/sample/headerContent'
  84. //委托样品条目情况组件
  85. import entrustNumber from './component/sample/EntrustNumber'
  86. //委托样品类型组件
  87. import entrustType from './component/sample/EntrustType'
  88. // 月度检测完成情况(环形图)
  89. import monthlyStatus from './component/sample/MonthlyStatus'
  90. //年度检测完成情况(环形图)
  91. import annualStatus from './component/sample/AnnualStatus'
  92. //月度检测情况组件
  93. import monthlyNumber from './component/sample/MonthlyNumber'
  94. export default {
  95. components:{
  96. headerDecoration,
  97. headerContent,
  98. entrustNumber,
  99. entrustType,
  100. monthlyStatus,
  101. annualStatus,
  102. monthlyNumber
  103. },
  104. data(){
  105. return{
  106. sendTime:'',
  107. outputData:{
  108. headerName:"样品管理看板"
  109. },
  110. NowTime1:'',
  111. value1:[]
  112. }
  113. },
  114. mounted() {
  115. this.getNowTime()
  116. },
  117. created() {
  118. //时间
  119. // this.currentTime()
  120. if(screenfull.isEnabled && !screenfull.isFullscreen){
  121. this.allView()
  122. }
  123. },
  124. beforeDestroy() {
  125. if(screenfull.isFullscreen){
  126. screenfull.toggle()
  127. }
  128. },
  129. methods: {
  130. getTime(val){
  131. this.sendTime = val
  132. },
  133. allView(){
  134. screenfull.request() //默认显示全屏
  135. },
  136. goBack(){
  137. this.$router.back(-1)
  138. },
  139. getNowTime(){
  140. const nowDate = new Date();
  141. const date = {
  142. year: nowDate.getFullYear(),
  143. month: nowDate.getMonth() + 1,
  144. }
  145. this.NowTime1 = date.year + '-' + date.month
  146. // console.log('页面第一次进来显示时间',date.year,date.month)
  147. //进来获取当前时间 之后获取当前月份天数 传给
  148. // console.log('页面显示的时间',this.NowTime1+"-01") //2022-11
  149. //把页面第一次进来的 当前年度月份 传给该方法处理 得到day及days
  150. // this.getDaysInMonth(date.year,date.month)
  151. },
  152. changeTime1(e){
  153. // console.log('改变时间',e) //2022-07
  154. // debugger
  155. let year = e.slice(0,4)
  156. let month = e.slice(5,7)
  157. this.NowTime1 = year + '-' + month
  158. // this.$set(this.data_key[index], "key", value);
  159. // console.log('用户操作之后 页面显示的时间',this.NowTime,year,month) //2022-11 2022 11
  160. //把年度月份传给getDaysInMonth()之前,先清理上一次数据
  161. // this.entrustNumber.diswpose() //这个方法干嘛的?? 为啥清不掉entrustNumberInit()方法的数据
  162. this.days=[]
  163. //在这里打印一下this.days数组
  164. // console.log('用户操作了时间控件之后打印this.days数组',this.days)
  165. //把用户操作时间控件改变的时间 的年度月份 传给该方法处理 得到day及days
  166. // this.getDaysInMonth(year,month)
  167. },
  168. // getDaysInMonth(year,month){
  169. // let temp = new Date(year,month,0);
  170. // this.day = temp.getDate();
  171. // // console.log('处理好的年 月 月份天数',year,month,this.day); //2022 11 30
  172. // //把月份对应天数转化为数组
  173. // for( let i=1;i <= this.day ;i++){
  174. // this.days.push(i)
  175. // }
  176. // // console.log('月份每一天',this.days)
  177. // this.getCheckSampleData(this.day)
  178. // }
  179. }
  180. }
  181. </script>
  182. <style lang="less" scoped>
  183. *body{
  184. padding: 0px;
  185. margin: 0px;
  186. }
  187. .data-view {
  188. width: 100%;
  189. height: 100%;
  190. color: #fff;
  191. z-index: 9999;
  192. #dv-full-screen-container {
  193. background-image: url('./img/bg.png');
  194. background-size: 100% 100%;
  195. display: flex;
  196. flex-direction:column;
  197. align-items: center;
  198. .headerContent{
  199. width: 100%;
  200. height: 19%;
  201. position:relative
  202. .overView{
  203. width: 100%;
  204. height: 80px;
  205. }
  206. }
  207. .mainContent{
  208. width: 100%;
  209. height:80%;
  210. display: flex;
  211. flex-direction:column;
  212. align-content:space-between;
  213. // border: 1px solid rgb(71, 17, 197);
  214. .entrust{
  215. width: 100%;
  216. height: 48%;
  217. display: flex;
  218. justify-content:space-between;
  219. // border: 1px solid rgb(17, 110, 197);
  220. .Number{
  221. width: 100%;
  222. height: 100%;
  223. display: flex;
  224. justify-content: center;
  225. // background-color: rgb(171, 163, 204);
  226. }
  227. .Type{
  228. width: 37.5%;
  229. height: 100%;
  230. margin-left: 10px;
  231. // background-color: rgb(12, 103, 131);
  232. }
  233. }
  234. .detection{
  235. width: 100%;
  236. height: 48%;
  237. margin-top: 15px;
  238. display: flex;
  239. justify-content:space-between;
  240. // border: 1px solid rgb(142, 190, 30);
  241. .monthlyS{
  242. width: 23%;
  243. height: 100%;
  244. // background-color: rgb(12, 103, 131);
  245. }
  246. .monthlyN{
  247. flex: 3;
  248. width: 50%;
  249. height: 100%;
  250. margin: 0px 10px;
  251. // background-color: rgb(171, 163, 204);
  252. }
  253. .annualS{
  254. width: 23%;
  255. height: 100%;
  256. // background-color: rgb(12, 103, 131);
  257. }
  258. }
  259. }
  260. }
  261. }
  262. </style>