index.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <div class="pageBody">
  3. <div class="pageTop">
  4. <div class="flightInfo">
  5. <div class="airLine">{{airLine}}</div>
  6. <div class="info">
  7. <div class="infoBox">
  8. <div>起飞机场简称:南京机场 </div>
  9. <div>日期 : 2021-12-24 </div>
  10. <div>时间: 19 : 30 : 25</div>
  11. </div>
  12. <div class="iconBox">
  13. <el-icon color="#ffffff" :size="22"><CaretRight /></el-icon>
  14. </div>
  15. <div class="infoBox">
  16. <div>特货信息/货物数: </div>
  17. <div>卸载运单数/货物数: </div>
  18. <div>中转进运单/货物数:</div>
  19. <div>已卸载运单/货物数:</div>
  20. <div>卸载数量(板/箱/卡):</div>
  21. <div>货站交接数量(板/箱/卡):</div>
  22. </div>
  23. <div class="iconBox">
  24. <el-icon color="#ffffff" :size="22"><CaretRight /></el-icon>
  25. </div>
  26. <div class="infoBox">
  27. <div>降落机场简称: 深圳机场</div>
  28. <div>日期 : 2021-12-24 </div>
  29. <div>时间: 22 : 25 : 25</div>
  30. <div>停机位:012 </div>
  31. </div>
  32. </div>
  33. </div>
  34. <!-- <div class="container">
  35. <tableTemp
  36. ref="domeTable"
  37. :tableHeader="state.tableHeader"
  38. :tableProperty="{ rowKey: 'ID',showSummary:true }"
  39. :tableData="tableData"
  40. @load="loadMore"
  41. @cellClass="test"
  42. ></tableTemp>
  43. </div> -->
  44. </div>
  45. <div class="tableTopBtn">
  46. <TBtnGroup v-model:flag="state.UTCFlag" @columnSet="columnSet" @downLoad="downLoad" @refresh="refresh"></TBtnGroup>
  47. <Search @clear="clear" @search="search" />
  48. </div>
  49. <div class="waybillList">
  50. <tableTemp
  51. ref="domeTable"
  52. :tableHeader="state.waybillTableHeader"
  53. :tableProperty="{ showSummary:true }"
  54. :tableData="waybilltableData"
  55. @load="loadMore"
  56. @cellClass="test"
  57. ></tableTemp>
  58. </div>
  59. <tableColumnSet :dialogVisible="state.dialogVisible" :columnList="state.waybillTableHeader" @setColumn="setColumn" @closeDialog="closeDialog"></tableColumnSet>
  60. </div>
  61. </template>
  62. <script setup lang="ts">
  63. import tableTemp from "@/components/tableTemp/index.vue";
  64. import TBtnGroup from "@/components/TBtnGroup/index.vue";
  65. import tableColumnSet from "@/components/tableColumnSet/index.vue";
  66. import Search from "@/components/search/index.vue";
  67. import {CaretRight} from "@element-plus/icons-vue"
  68. import { ref, onMounted } from 'vue';
  69. const state = reactive({
  70. tableHeader: [
  71. { label: "集装器编号", key: "containerNo",width:"120px"},
  72. { label: "运单数", key: "waybillCount",width:"60px" },
  73. { label: "件数", key: "count",width:"60px" },
  74. { label: "理货", key: "lh", lableClass: "nodeHeader",columnClassName:"columnClassName"},
  75. { label: "拉下", key: "lx", lableClass: "nodeHeader",columnClassName:"columnClassName" },
  76. { label: "待运区", key: "dyq", lableClass: "nodeHeader",columnClassName:"columnClassName" },
  77. { label: "货站交接", key: "hzjj", lableClass: "nodeHeader",columnClassName:"columnClassName" },
  78. { label: "机下交接", key: "jxjj", lableClass: "nodeHeader",columnClassName:"columnClassName" },
  79. { label: "装机", key: "zj", lableClass: "nodeHeader",columnClassName:"columnClassName" },
  80. ],
  81. waybillTableHeader: [
  82. { label: "运单号", key: "waybillNo",width:"120px",isShow:true},
  83. { label: "品名", key: "pm",isShow:true},
  84. { label: "特货信息", key: "thxx",isShow:true},
  85. { label: "进港报文货物件数", key: "hwjs",isShow:true},
  86. { label: "进港实际货物件数", key: "laxjs",isShow:true},
  87. { label: "最新节点", key: "zxjd",isShow:true},
  88. { label: "最新位置", key: "zxwz",isShow:true},
  89. { label: "处理结果", key: "cljg",isShow:true},
  90. { label: "处理时间", key: "clsj",width:"130px",isShow:true},
  91. { label: "中转出航班号", key: "zzhbh",isShow:true},
  92. { label: "中转航班降落时间", key: "zzhbsj",width:"130px",isShow:true},
  93. { label: "装载序号", key: "zzxh",isShow:true}
  94. ],
  95. listLoading: true,
  96. UTCFlag:true,
  97. dialogVisible:false
  98. });
  99. const waybilltableData = ref([
  100. {
  101. waybillNo:"32535234445",
  102. pm:"手机、充电器",
  103. thxx:"特",
  104. hwjs:"5",
  105. laxjs:"5",
  106. zxjd:"待运区",
  107. zxwz:"A13",
  108. cljg:"通过",
  109. clsj:"2022/9/10 10:01",
  110. zzhbh:"ZH5466",
  111. zzhbsj:"2022/9/10 16:01",
  112. zzxh:"3"
  113. },
  114. {
  115. waybillNo:"32535234445",
  116. pm:"手机、充电器",
  117. thxx:"特",
  118. hwjs:"5",
  119. laxjs:"5",
  120. zxjd:"待运区",
  121. zxwz:"A13",
  122. cljg:"通过",
  123. clsj:"2022/9/10 10:01",
  124. zzhbh:"ZH5466",
  125. zzhbsj:"2022/9/10 16:01",
  126. zzxh:"3"
  127. },{
  128. waybillNo:"32535234445",
  129. pm:"手机、充电器",
  130. thxx:"特",
  131. hwjs:"5",
  132. laxjs:"5",
  133. zxjd:"待运区",
  134. zxwz:"A13",
  135. cljg:"未通过",
  136. clsj:"2022/9/10 10:01",
  137. zzhbh:"ZH5466",
  138. zzhbsj:"2022/9/10 16:01",
  139. zzxh:"3"
  140. }
  141. ]);
  142. const airLine=ref("SZX - CA4120 - NKG")
  143. const tableData = ref([
  144. {
  145. containerNo:"DOU29800001",
  146. waybillCount:"5",
  147. count:"50",
  148. lh:"C24 11:01",
  149. lx:"F24 12:05",
  150. dyq:"D32 11:25",
  151. hzjj:"E24 11:40",
  152. jxjj:"F24 12:01",
  153. zj:"G32 12:25"
  154. },
  155. {
  156. containerNo:"DOU29800001",
  157. waybillCount:"5",
  158. count:"50",
  159. lh:"C24 11:01",
  160. lx:"F24 12:05",
  161. dyq:"D32 11:25",
  162. hzjj:"E24 11:40",
  163. jxjj:"F24 12:01",
  164. zj:"G32 12:25"
  165. }
  166. ]);
  167. const setError = ()=>{
  168. waybilltableData.value.map(item=>{
  169. if(item.cljg=="未通过"){
  170. item["rowClass"]="alarm"
  171. }
  172. })
  173. }
  174. const domeTable =ref(null)
  175. const test = (row) => {
  176. if(row.column.property==="score"&& row.row.score>80){
  177. domeTable.value.cellClass ="warn"
  178. }
  179. else{
  180. domeTable.value.cellClass =""
  181. }
  182. }
  183. const loadMore=(data)=>{
  184. setError()
  185. console.log(data);
  186. }
  187. //清空搜索
  188. const clear=(data) =>{
  189. console.log(data)
  190. }
  191. //点击搜索按钮
  192. const search=(data) =>{
  193. console.log(data)
  194. }
  195. //点击刷新按钮
  196. const refresh=(data) =>{
  197. console.log(data)
  198. }
  199. //点击下载按钮
  200. const downLoad=(data) =>{
  201. console.log(data)
  202. }
  203. //点击列设置按钮
  204. const columnSet=(data) =>{
  205. state.dialogVisible = true;
  206. }
  207. const setColumn = (data) => {
  208. state.waybillTableHeader = data;
  209. state.dialogVisible = false;
  210. }
  211. const closeDialog = (data) => {
  212. state.dialogVisible = false;
  213. }
  214. </script>
  215. <style lang="scss" scoped>
  216. .pageBody{
  217. width: 100%;
  218. height: 100%;
  219. box-sizing: border-box;
  220. display: flex;
  221. flex-direction: column;
  222. .pageTop{
  223. width: 100%;
  224. height: 345px;
  225. display: flex;
  226. .flightInfo{
  227. height: 100%;
  228. flex: 1;
  229. background: #410425;
  230. box-sizing: border-box;
  231. padding:18px 32px;
  232. display: flex;
  233. flex-direction: column;
  234. .airLine{
  235. font-size: 18px;
  236. font-weight: bold;
  237. color: #FFFFFF;
  238. width: 100%;
  239. margin-bottom: 16px;
  240. }
  241. .info{
  242. display: flex;
  243. flex-direction: row;
  244. justify-content: flex-start;
  245. justify-items: center;
  246. width: 100%;
  247. max-width: 1050px;
  248. flex: 1;
  249. .infoBox{
  250. width: calc(33.3% - 10px);
  251. background: #561638;
  252. padding:10px 15px;
  253. box-sizing: border-box;
  254. font-size: 14px;
  255. font-weight: 400;
  256. color: #FFFFFF;
  257. line-height: 30px;
  258. }
  259. .iconBox{
  260. display: flex;
  261. flex-direction: column;
  262. width: 60px;
  263. justify-content: center;
  264. align-items: center;
  265. }
  266. }
  267. }
  268. .container{
  269. width: 760px;
  270. height: 100%;
  271. margin-left: 16px;
  272. }
  273. }
  274. .tableTopBtn{
  275. height: 72px;
  276. display: flex;
  277. justify-content: flex-end;
  278. align-items: center;
  279. }
  280. .waybillList{
  281. width: 100%;
  282. flex: 1;
  283. }
  284. }
  285. :deep.el-table .nodeHeader {
  286. background: #EEF3D6;
  287. }
  288. :deep.el-table .columnClassName {
  289. background: #EEF3D6!important;
  290. }
  291. :deep.el-table .alarm {
  292. background: #F38080!important;
  293. }
  294. </style>