index.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <div id="index" ref="appRef">
  3. <div class="bg">
  4. <dv-loading v-if="loading">Loading...</dv-loading>
  5. <div v-else class="host-body">
  6. <!-- <div class="d-flex jc-center">
  7. <dv-decoration-10 class="dv-dec-10" />
  8. <div class="d-flex jc-center">
  9. <dv-decoration-8 class="dv-dec-8" :color="decorationColor" />
  10. <div class="title">
  11. <span class="title-text">COSTEC-MES 可视化平台</span>
  12. <dv-decoration-6
  13. class="dv-dec-6"
  14. :reverse="true"
  15. :color="['#50e3c2', '#67a1e5']"
  16. />
  17. </div>
  18. <dv-decoration-8
  19. class="dv-dec-8"
  20. :reverse="true"
  21. :color="decorationColor"
  22. />
  23. </div>
  24. <dv-decoration-10 class="dv-dec-10-s" />
  25. </div>-->
  26. <!-- 第二行 -->
  27. <div class="d-flex jc-between px-2 header-pad">
  28. <div class="d-flex aside-width" style="width: 55%">
  29. <!-- <div class="react-left ml-4 react-l-s bg-color-blue">
  30. <span class="react-left"></span>
  31. <span class="text fw-b" style="font-size:24px;">柯赛科技数据看板</span>
  32. </div>-->
  33. <span style="text-align: right;width: 100%; font-size: 50px; font-weight: bold;letter-spacing: .3em;">产线计划未完成订单明细</span>
  34. </div>
  35. <div class="d-flex aside-width">
  36. <div class="react-right bg-color-r mr-3">
  37. <el-button type="text" class="text" style="width:50% ;font-size: 21px; color: #000000 !important;font-weight: bold;" @click="fullScreen" ref="fullScreen"
  38. v-show=!isFullScreen >全屏</el-button>
  39. <el-button type="text" class="text" style="width:50% ;font-size: 21px; color: #000000 !important;font-weight: bold;" @click="exitFullScreen" ref="exitFullScreen" v-show=isFullScreen>退出全屏</el-button>
  40. </div>
  41. <div class="react-right mr-4 react-l-s" style="width: 900px">
  42. <span class="react-after"></span>
  43. <el-dropdown class="dropdown">
  44. <span class="el-dropdown-link" ref="echarType">
  45. 生产进度看板<i class="el-icon-arrow-down el-icon--right"></i>&nbsp;&nbsp;&nbsp;&nbsp;
  46. </span>
  47. <el-dropdown-menu slot="dropdown">
  48. <el-dropdown-item class="dropdownitem"><router-link to="total">总看板</router-link></el-dropdown-item>
  49. <el-dropdown-item class="dropdownitem"><router-link to="prodline">车间看板</router-link></el-dropdown-item>
  50. <el-dropdown-item class="dropdownitem"><router-link to="quality">品质看板</router-link></el-dropdown-item>
  51. <el-dropdown-item class="dropdownitem"><router-link to="warehouse">仓库看板</router-link></el-dropdown-item>
  52. <el-dropdown-item class="dropdownitem"><router-link to="zz">组装看板</router-link></el-dropdown-item>
  53. <el-dropdown-item class="dropdownitem"><router-link to="compare">各车间进度</router-link></el-dropdown-item>
  54. </el-dropdown-menu>
  55. </el-dropdown>
  56. <span class="text">&nbsp;&nbsp;</span>
  57. <span class="text datetext">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span>
  58. </div>
  59. </div>
  60. </div>
  61. <!-- 修改后的主体内容区域 -->
  62. <div class="body-box" style="height: calc(100vh - 120px); overflow: hidden;">
  63. <div class="bottom-box" style="height: 100%;">
  64. <dv-border-box-12 style="height: 100%;">
  65. <list />
  66. </dv-border-box-12>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </template>
  73. <script>
  74. import drawMixin from "../../utils/drawMixin";
  75. import common from '../../utils/common';
  76. import {formatTime} from '../../utils/index.js'
  77. import list from './list.vue'
  78. import {mapMutations, mapState} from "vuex"
  79. export default {
  80. mixins: [ drawMixin,common ],
  81. computed: {
  82. ...mapState(['user','factoryoptions','factory']),
  83. },
  84. data() {
  85. return {
  86. timing: null,
  87. timing2: null,
  88. timing3: null,
  89. loading: true,
  90. dateDay: null,
  91. dateYear: null,
  92. dateWeek: null,
  93. weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
  94. decorationColor: ['#568aea', '#000000'],
  95. fromComponent: ''
  96. }
  97. },
  98. components: {
  99. list
  100. },
  101. beforeRouteEnter(to, from, next) {
  102. next(vm => {
  103. if (from.meta.title == '组装看板' || from.meta.title == '车间看板') {
  104. vm.fromComponent = from.meta.title;
  105. }
  106. })
  107. },
  108. created() {
  109. this.isFullScreen = document.fullscreenElement;
  110. },
  111. mounted() {
  112. this.timeFn();
  113. this.cancelLoading();
  114. this.$nextTick(() => {
  115. this.autoFullScreen();
  116. })
  117. if (this.fromComponent) {
  118. setTimeout(() => {
  119. this.$router.go(-1);
  120. }, 60000)
  121. }
  122. },
  123. beforeDestroy () {
  124. clearInterval(this.timing);
  125. clearInterval(this.timing2);
  126. },
  127. methods: {
  128. ...mapMutations(['setFactory']),
  129. timeFn() {
  130. this.timing = setInterval(() => {
  131. this.dateDay = formatTime(new Date(), 'HH: mm: ss')
  132. this.dateYear = formatTime(new Date(), 'yyyy-MM-dd')
  133. this.dateWeek = this.weekday[new Date().getDay()]
  134. }, 1000);
  135. },
  136. cancelLoading() {
  137. setTimeout(() => {
  138. this.loading = false
  139. }, 1000)
  140. },
  141. autoFullScreen(){
  142. if (!this.isFullScreen) {
  143. this.fullScreen();
  144. /*setTimeout(() => {
  145. this.$showMsgBox({
  146. caption: "提示",
  147. msg: '是否全屏展示?',
  148. callback: (data) => {
  149. if (data == "yes") {
  150. this.fullScreen();
  151. }
  152. }
  153. })
  154. }, 3000)*/
  155. }
  156. },
  157. }
  158. }
  159. </script>
  160. <style lang="scss" scoped>
  161. @import '../../assets/scss/indexmakeprocess.scss';
  162. .dropdown{
  163. font-size: 22px;
  164. color: #000000;
  165. font-weight: bold;
  166. transform: skewX(45deg);
  167. ::v-deep .el-select-dropdown {
  168. /* // 若不将下拉框的背景颜色设置为:transparent,那么做不出来半透明的效果;
  169. // 因为其最终的显示为:下拉框有一个背景颜色且下拉框的字体有一个背景颜色,重叠后的效果展示; */
  170. border: 0px solid #0f1325;
  171. /* background: #04308D !important;*/
  172. }
  173. ::v-deep .el-input__inner {
  174. /* background-color: #1a5cd7;*/
  175. color: #000000;
  176. font-size: 22px;
  177. font-weight: bold;
  178. border: 0px solid #0f1325;
  179. }
  180. .el-select-dropdown__item {
  181. color: #000000;
  182. background-color: #0f1325;
  183. }
  184. ::v-deep .el-select-dropdown {
  185. background-color: transparent;
  186. /* border: 1px solid #0f1325;*/
  187. }
  188. ::v-deep.el-select-dropdown__list {
  189. padding: 0;
  190. }
  191. ::v-deep.el-popper[x-placement^="bottom"] {
  192. margin-top: 0px;
  193. }
  194. ::v-deep.el-popper .popper__arrow,
  195. ::v-deep.el-popper .popper__arrow::after {
  196. display: none;
  197. }
  198. .el-select-dropdown__item:hover {
  199. background-color: rgba(0, 225, 219, 0.690196078431373);
  200. }
  201. }
  202. ::v-deep.el-select .el-input .el-select__caret {
  203. color: #000000;
  204. padding: 6px 0px 0px 6px;
  205. font-size: 22px;
  206. }
  207. /* 新增样式 */
  208. .bg {
  209. height: 100vh;
  210. width: 100vw;
  211. overflow: hidden;
  212. }
  213. .host-body {
  214. height: 100%;
  215. display: flex;
  216. flex-direction: column;
  217. }
  218. .body-box {
  219. flex: 1;
  220. min-height: 0; /* 修复flex布局中内容溢出问题 */
  221. }
  222. .bottom-box {
  223. height: 100%;
  224. width: 100%;
  225. }
  226. </style>