Showing
9 changed files
with
485 additions
and
454 deletions
| 1 | let ductLabels = { | 1 | let ductLabels = { |
| 2 | - "cargoRulesStatus": { | 2 | + "cargo": {//货物查询 |
| 3 | - "1": "手动", | 3 | + "cargoRulesStatus": { |
| 4 | - "2": "自动" | 4 | + "1": "手动", |
| 5 | + "2": "自动" | ||
| 6 | + }, | ||
| 7 | + "releasing": { | ||
| 8 | + "1": "正在释放" | ||
| 9 | + } | ||
| 5 | }, | 10 | }, |
| 6 | - "menuType": { | 11 | + "menu": {//菜单设置 |
| 7 | - "M": "菜单", | 12 | + "menuType": { |
| 8 | - "C": "菜单", | 13 | + "M": "菜单", |
| 9 | - "B": "按钮" | 14 | + "C": "菜单", |
| 15 | + "B": "按钮" | ||
| 16 | + }, | ||
| 17 | + "status": { | ||
| 18 | + "1": "启用", | ||
| 19 | + "2": "停用", | ||
| 20 | + }, | ||
| 10 | }, | 21 | }, |
| 11 | - "status": { | 22 | + "role": {//角色设置 |
| 12 | - "1": "启用", | 23 | + "valid": { |
| 13 | - "2": "停用", | 24 | + "1": "开启", |
| 25 | + "2": "关闭", | ||
| 26 | + }, | ||
| 14 | }, | 27 | }, |
| 15 | - "valid": { | 28 | + "user": {//用户设置 |
| 16 | - "1": "开启", | 29 | + "isValid": { |
| 17 | - "2": "关闭", | 30 | + "1": "开启", |
| 31 | + "2": "关闭", | ||
| 32 | + }, | ||
| 18 | }, | 33 | }, |
| 19 | - "isValid": { | 34 | + "FlightInformation": {//航班信息维护 |
| 20 | - "1": "开启", | 35 | + "ticketToPiece": { |
| 21 | - "2": "关闭", | 36 | + "1": "是", |
| 37 | + "0": "否", | ||
| 38 | + }, | ||
| 39 | + "needRequired": { | ||
| 40 | + "1": "是", | ||
| 41 | + "0": "否", | ||
| 42 | + }, | ||
| 43 | + "highLowPriceFlg": { | ||
| 44 | + "1": "开启", | ||
| 45 | + "0": "未开启", | ||
| 46 | + }, | ||
| 47 | + "pushDateSwitch": { | ||
| 48 | + "1": "是", | ||
| 49 | + "2": "否", | ||
| 50 | + }, | ||
| 22 | }, | 51 | }, |
| 23 | - "ticketToPiece": { | 52 | + "logDmData": {//DM数据 |
| 24 | - "1": "是", | 53 | + "status": { |
| 25 | - "0": "否", | 54 | + "0": "未处理", |
| 26 | - }, | 55 | + "1": "已处理", |
| 27 | - "needRequired": { | 56 | + "2": "处理失败", |
| 28 | - "1": "是", | 57 | + "3": "无需处理", |
| 29 | - "0": "否", | 58 | + }, |
| 30 | - }, | ||
| 31 | - "highLowPriceFlg": { | ||
| 32 | - "1": "开启", | ||
| 33 | - "0": "未开启", | ||
| 34 | } | 59 | } |
| 35 | - | ||
| 36 | } | 60 | } |
| 37 | 61 | ||
| 38 | export default ductLabels; | 62 | export default ductLabels; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -18,47 +18,74 @@ | ... | @@ -18,47 +18,74 @@ |
| 18 | :default-expand-all="defaultExpandAll" | 18 | :default-expand-all="defaultExpandAll" |
| 19 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" | 19 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| 20 | v-loading="loading" | 20 | v-loading="loading" |
| 21 | + :cell-class-name="cellClassName" | ||
| 22 | + :header-cell-class-name="headerCellClassName" | ||
| 21 | @sort-change="sortChange" | 23 | @sort-change="sortChange" |
| 22 | @select="tableSelect" | 24 | @select="tableSelect" |
| 23 | @select-all="tableSelectAll" | 25 | @select-all="tableSelectAll" |
| 24 | @select-change="SelectChange" | 26 | @select-change="SelectChange" |
| 25 | > | 27 | > |
| 28 | + <!-- 复选框 --> | ||
| 26 | <el-table-column | 29 | <el-table-column |
| 27 | - v-for="(item, index) in newHeader" | 30 | + v-if="selection" |
| 28 | - :type="item.type" | 31 | + type="selection" |
| 29 | - :prop="item.value" | 32 | + :fixed="true" |
| 30 | - :label="item.name" | 33 | + width="50" |
| 31 | - :width="item.width" | 34 | + align="center" |
| 32 | - :align="item.align" | 35 | + ></el-table-column> |
| 33 | - :fixed="item.fixed" | 36 | + <!-- 序号 --> |
| 34 | - :column-key="index.toString()" | 37 | + <el-table-column type="index" width="50" align="center"></el-table-column> |
| 35 | - :show-overflow-tooltip="showOverflowTooltip" | 38 | + <template v-for="(item, index) in newHeader"> |
| 36 | - :sortable="item.sorTable" | 39 | + <!-- 自定义插槽 --> |
| 37 | - :formatter="formatter" | 40 | + <el-table-column |
| 38 | - header-align="center" | 41 | + v-if="item.slot" |
| 39 | - :sort-orders="['descending', 'ascending', null]" | 42 | + :prop="item.value" |
| 40 | - :slotHeader="slotHeader" | 43 | + :label="item.name" |
| 41 | - :render-header="renderHeader" | 44 | + :width="item.width" |
| 42 | - :key="index" | 45 | + :align="item.align" |
| 43 | - v-if="item.disabled" | 46 | + :fixed="item.fixed" |
| 44 | - > | 47 | + :show-overflow-tooltip="showOverflowTooltip" |
| 45 | - <!-- <template slot-scope="scope"> | 48 | + :sortable="item.sorTable" |
| 46 | - <exSlot | 49 | + :formatter="formatter" |
| 47 | - v-if="item.render" | 50 | + header-align="center" |
| 48 | - :render="item.render" | 51 | + :sort-orders="['descending', 'ascending', null]" |
| 49 | - :row="scope.row" | 52 | + :slotHeader="slotHeader" |
| 50 | - :index="scope.$index" | 53 | + :render-header="renderHeader" |
| 51 | - :column="item" | 54 | + :key="index" |
| 52 | - ></exSlot> | 55 | + > |
| 53 | - <span v-else>{{ scope.row[item.value] || "" }}</span> | 56 | + <template slot-scope="scope"> |
| 54 | - </template> --> | 57 | + <slot :name="item.value" :row="scope.row"></slot> |
| 55 | - </el-table-column> | 58 | + </template> |
| 56 | - <slot></slot> | 59 | + </el-table-column> |
| 60 | + <!-- 默认数据 --> | ||
| 61 | + <el-table-column | ||
| 62 | + v-else | ||
| 63 | + :prop="item.value" | ||
| 64 | + :label="item.name" | ||
| 65 | + :index="item.index" | ||
| 66 | + :width="item.width" | ||
| 67 | + :align="item.align" | ||
| 68 | + :fixed="item.fixed" | ||
| 69 | + :sortable="item.sorTable" | ||
| 70 | + :column-key="index.toString()" | ||
| 71 | + :show-overflow-tooltip="showOverflowTooltip" | ||
| 72 | + header-align="center" | ||
| 73 | + :sort-orders="['descending', 'ascending', null]" | ||
| 74 | + :slotHeader="slotHeader" | ||
| 75 | + :render-header="renderHeader" | ||
| 76 | + :formatter="formatter" | ||
| 77 | + :key="index" | ||
| 78 | + > | ||
| 79 | + </el-table-column> | ||
| 80 | + </template> | ||
| 81 | + <slot name="optionColumn"></slot> | ||
| 57 | </el-table> | 82 | </el-table> |
| 83 | + <!-- 分页 --> | ||
| 58 | <el-pagination | 84 | <el-pagination |
| 59 | :total="totalCount" | 85 | :total="totalCount" |
| 60 | :page-size.sync="limitSize" | 86 | :page-size.sync="limitSize" |
| 61 | :current-page.sync="pageNum" | 87 | :current-page.sync="pageNum" |
| 88 | + :page-sizes="pageSizes" | ||
| 62 | background | 89 | background |
| 63 | layout="prev, pager, next, jumper, ->, sizes, total" | 90 | layout="prev, pager, next, jumper, ->, sizes, total" |
| 64 | class="tablePagination" | 91 | class="tablePagination" |
| ... | @@ -68,6 +95,7 @@ | ... | @@ -68,6 +95,7 @@ |
| 68 | @current-change="currentChange" | 95 | @current-change="currentChange" |
| 69 | > | 96 | > |
| 70 | </el-pagination> | 97 | </el-pagination> |
| 98 | + <!-- 表头控制 --> | ||
| 71 | <div class="tableInfo" v-if="infoShow"> | 99 | <div class="tableInfo" v-if="infoShow"> |
| 72 | <ul class="tableList" v-show="show"> | 100 | <ul class="tableList" v-show="show"> |
| 73 | <el-checkbox-group v-model="checkDisabled"> | 101 | <el-checkbox-group v-model="checkDisabled"> |
| ... | @@ -75,7 +103,6 @@ | ... | @@ -75,7 +103,6 @@ |
| 75 | class="flexList" | 103 | class="flexList" |
| 76 | v-for="(item, index) in newHeader" | 104 | v-for="(item, index) in newHeader" |
| 77 | :key="index" | 105 | :key="index" |
| 78 | - v-if="!item.type" | ||
| 79 | :title="item.name" | 106 | :title="item.name" |
| 80 | > | 107 | > |
| 81 | <div> | 108 | <div> |
| ... | @@ -100,40 +127,15 @@ | ... | @@ -100,40 +127,15 @@ |
| 100 | </template> | 127 | </template> |
| 101 | 128 | ||
| 102 | <script> | 129 | <script> |
| 103 | -let exSlot = { | ||
| 104 | - fucntional: true, | ||
| 105 | - props: { | ||
| 106 | - row: Object, | ||
| 107 | - render: Function, | ||
| 108 | - index: [Number, String], | ||
| 109 | - column: { | ||
| 110 | - type: Object, | ||
| 111 | - default: null, | ||
| 112 | - }, | ||
| 113 | - }, | ||
| 114 | - render: (h, data) => { | ||
| 115 | - console.log(data); | ||
| 116 | - if (data) { | ||
| 117 | - const params = { | ||
| 118 | - row: data.props.row, | ||
| 119 | - index: data.props.index, | ||
| 120 | - }; | ||
| 121 | - if (data.props.column) params.column = data.props.column; | ||
| 122 | - return data.props.render(h, params); | ||
| 123 | - } | ||
| 124 | - }, | ||
| 125 | -}; | ||
| 126 | import dictLabels from "../../assets/languages/dictLabels.js"; | 130 | import dictLabels from "../../assets/languages/dictLabels.js"; |
| 127 | import { scrollTo } from "@/utils/scroll-to"; | 131 | import { scrollTo } from "@/utils/scroll-to"; |
| 128 | export default { | 132 | export default { |
| 129 | name: "Table", | 133 | name: "Table", |
| 130 | - components: { | ||
| 131 | - exSlot, | ||
| 132 | - }, | ||
| 133 | props: { | 134 | props: { |
| 134 | //dom名称 | 135 | //dom名称 |
| 135 | tableName: { type: String, default: "tables" }, | 136 | tableName: { type: String, default: "tables" }, |
| 136 | //表格数据 | 137 | //表格数据 |
| 138 | + ductName: { type: String, default: null }, | ||
| 137 | data: { | 139 | data: { |
| 138 | type: Array, | 140 | type: Array, |
| 139 | default() { | 141 | default() { |
| ... | @@ -158,9 +160,13 @@ export default { | ... | @@ -158,9 +160,13 @@ export default { |
| 158 | default: "mini", | 160 | default: "mini", |
| 159 | }, | 161 | }, |
| 160 | height: { | 162 | height: { |
| 161 | - type: [String,Number], | 163 | + type: [String, Number], |
| 162 | default: "400", | 164 | default: "400", |
| 163 | }, | 165 | }, |
| 166 | + selection: { | ||
| 167 | + type: Boolean, | ||
| 168 | + default: false, | ||
| 169 | + }, | ||
| 164 | fit: { | 170 | fit: { |
| 165 | type: Boolean, | 171 | type: Boolean, |
| 166 | default: true, | 172 | default: true, |
| ... | @@ -207,10 +213,10 @@ export default { | ... | @@ -207,10 +213,10 @@ export default { |
| 207 | type: Number, | 213 | type: Number, |
| 208 | default: 1, | 214 | default: 1, |
| 209 | }, | 215 | }, |
| 210 | - // pageSizes:{ | 216 | + pageSizes: { |
| 211 | - // type:Array, | 217 | + type: Array, |
| 212 | - // default:[10, 20, 30, 40, 50, 100] | 218 | + default: [10, 20, 30, 40, 50, 100], |
| 213 | - // }, | 219 | + }, |
| 214 | //每页长度 | 220 | //每页长度 |
| 215 | limitSize: { | 221 | limitSize: { |
| 216 | type: Number, | 222 | type: Number, |
| ... | @@ -242,10 +248,10 @@ export default { | ... | @@ -242,10 +248,10 @@ export default { |
| 242 | type: Boolean, | 248 | type: Boolean, |
| 243 | default: false, | 249 | default: false, |
| 244 | }, | 250 | }, |
| 245 | - infoShow:{ | 251 | + infoShow: { |
| 246 | - type:Boolean, | 252 | + type: Boolean, |
| 247 | - default:false, | 253 | + default: true, |
| 248 | - } | 254 | + }, |
| 249 | }, | 255 | }, |
| 250 | inheritAttrs: false, | 256 | inheritAttrs: false, |
| 251 | data() { | 257 | data() { |
| ... | @@ -264,7 +270,6 @@ export default { | ... | @@ -264,7 +270,6 @@ export default { |
| 264 | }, | 270 | }, |
| 265 | //表头数据格式 | 271 | //表头数据格式 |
| 266 | // { | 272 | // { |
| 267 | - // type: "", | ||
| 268 | // name: "", | 273 | // name: "", |
| 269 | // value: "", | 274 | // value: "", |
| 270 | // width: "", | 275 | // width: "", |
| ... | @@ -288,17 +293,17 @@ export default { | ... | @@ -288,17 +293,17 @@ export default { |
| 288 | this.data.forEach((item, index) => { | 293 | this.data.forEach((item, index) => { |
| 289 | item.index = index; | 294 | item.index = index; |
| 290 | }); | 295 | }); |
| 291 | - this.$nextTick(()=>{ | 296 | + this.$nextTick(() => { |
| 292 | - this.$refs.tables.doLayout() | 297 | + this.$refs.tables.doLayout(); |
| 293 | - }) | 298 | + }); |
| 294 | }, | 299 | }, |
| 295 | headerData(val, oldVal) { | 300 | headerData(val, oldVal) { |
| 296 | this.newHeader = val; | 301 | this.newHeader = val; |
| 297 | }, | 302 | }, |
| 298 | }, | 303 | }, |
| 299 | methods: { | 304 | methods: { |
| 300 | - sizeChange(val){ | 305 | + sizeChange(val) { |
| 301 | - this.$emit("sizeChange",val) | 306 | + this.$emit("sizeChange", val); |
| 302 | }, | 307 | }, |
| 303 | //下一页 | 308 | //下一页 |
| 304 | nextClick() { | 309 | nextClick() { |
| ... | @@ -413,14 +418,14 @@ export default { | ... | @@ -413,14 +418,14 @@ export default { |
| 413 | "div", | 418 | "div", |
| 414 | { | 419 | { |
| 415 | class: ["thead-cell"], | 420 | class: ["thead-cell"], |
| 416 | - // on: { | 421 | + on: { |
| 417 | - // mousedown: ($event) => { | 422 | + mousedown: ($event) => { |
| 418 | - // this.handleMouseDown($event, column); | 423 | + this.handleMouseDown($event, column); |
| 419 | - // }, | 424 | + }, |
| 420 | - // mousemove: ($event) => { | 425 | + mousemove: ($event) => { |
| 421 | - // this.handleMouseMove($event, column); | 426 | + this.handleMouseMove($event, column); |
| 422 | - // }, | 427 | + }, |
| 423 | - // }, | 428 | + }, |
| 424 | }, | 429 | }, |
| 425 | [ | 430 | [ |
| 426 | // 添加 <a> 用于显示表头 label | 431 | // 添加 <a> 用于显示表头 label |
| ... | @@ -432,84 +437,79 @@ export default { | ... | @@ -432,84 +437,79 @@ export default { |
| 432 | ] | 437 | ] |
| 433 | ); | 438 | ); |
| 434 | }, | 439 | }, |
| 435 | - | ||
| 436 | // 按下鼠标开始拖动 | 440 | // 按下鼠标开始拖动 |
| 437 | - // handleMouseDown(e, column) { | 441 | + handleMouseDown(e, column) { |
| 438 | - // this.dragState.dragging = true; | 442 | + this.dragState.dragging = true; |
| 439 | - // this.dragState.start = parseInt(column.columnKey); | 443 | + this.dragState.start = parseInt(column.columnKey); |
| 440 | - // // 给拖动时的虚拟容器添加宽高 | 444 | + // 给拖动时的虚拟容器添加宽高 |
| 441 | - // let table = document.getElementsByClassName("w-table")[0]; | 445 | + let table = document.getElementsByClassName("w-table")[0]; |
| 442 | - // let virtual = document.getElementsByClassName("virtual"); | 446 | + let virtual = document.getElementsByClassName("virtual"); |
| 443 | - // for (let item of virtual) { | 447 | + for (let item of virtual) { |
| 444 | - // item.style.height = table.clientHeight - 1 + "px"; | 448 | + item.style.height = table.clientHeight - 1 + "px"; |
| 445 | - // item.style.width = item.parentElement.parentElement.clientWidth + "px"; | 449 | + item.style.width = item.parentElement.parentElement.clientWidth + "px"; |
| 446 | - // } | 450 | + } |
| 447 | - // document.addEventListener("mouseup", this.handleMouseUp); | 451 | + document.addEventListener("mouseup", this.handleMouseUp); |
| 448 | - // }, | 452 | + }, |
| 449 | - | ||
| 450 | // 鼠标放开结束拖动 | 453 | // 鼠标放开结束拖动 |
| 451 | - // handleMouseUp() { | 454 | + handleMouseUp() { |
| 452 | - // this.dragColumn(this.dragState); | 455 | + this.dragColumn(this.dragState); |
| 453 | - // // 初始化拖动状态 | 456 | + // 初始化拖动状态 |
| 454 | - // this.dragState = { | 457 | + this.dragState = { |
| 455 | - // start: -9, | 458 | + start: -9, |
| 456 | - // end: -9, | 459 | + end: -9, |
| 457 | - // dragging: false, | 460 | + dragging: false, |
| 458 | - // direction: undefined, | 461 | + direction: undefined, |
| 459 | - // }; | 462 | + }; |
| 460 | - // document.removeEventListener("mouseup", this.handleMouseUp); | 463 | + document.removeEventListener("mouseup", this.handleMouseUp); |
| 461 | - // }, | 464 | + }, |
| 462 | - | ||
| 463 | // 拖动中 | 465 | // 拖动中 |
| 464 | - // handleMouseMove(e, column) { | 466 | + handleMouseMove(e, column) { |
| 465 | - // if (this.dragState.dragging) { | 467 | + if (this.dragState.dragging) { |
| 466 | - // let index = parseInt(column.columnKey); // 记录起始列 | 468 | + let index = parseInt(column.columnKey); // 记录起始列 |
| 467 | - // if (index - this.dragState.start !== 0) { | 469 | + if (index - this.dragState.start !== 0) { |
| 468 | - // this.dragState.direction = | 470 | + this.dragState.direction = |
| 469 | - // index - this.dragState.start < 0 ? "left" : "right"; // 判断拖动方向 | 471 | + index - this.dragState.start < 0 ? "left" : "right"; // 判断拖动方向 |
| 470 | - // this.dragState.end = parseInt(column.columnKey); | 472 | + this.dragState.end = parseInt(column.columnKey); |
| 471 | - // } else { | 473 | + } else { |
| 472 | - // this.dragState.direction = undefined; | 474 | + this.dragState.direction = undefined; |
| 473 | - // } | 475 | + } |
| 474 | - // } else { | 476 | + } else { |
| 475 | - // return false; | 477 | + return false; |
| 476 | - // } | 478 | + } |
| 477 | - // }, | 479 | + }, |
| 478 | - | ||
| 479 | // 拖动易位 | 480 | // 拖动易位 |
| 480 | - // dragColumn({ start, end, direction }) { | 481 | + dragColumn({ start, end, direction }) { |
| 481 | - // let tempData = []; | 482 | + let tempData = []; |
| 482 | - // let left = direction === "left"; | 483 | + let left = direction === "left"; |
| 483 | - // let min = left ? end : start - 1; | 484 | + let min = left ? end : start - 1; |
| 484 | - // let max = left ? start + 1 : end; | 485 | + let max = left ? start + 1 : end; |
| 485 | - // for (let i = 0; i < this.newHeader.length; i++) { | 486 | + for (let i = 0; i < this.newHeader.length; i++) { |
| 486 | - // if (i === end) { | 487 | + if (i === end) { |
| 487 | - // tempData.push(this.newHeader[start]); | 488 | + tempData.push(this.newHeader[start]); |
| 488 | - // } else if (i > min && i < max) { | 489 | + } else if (i > min && i < max) { |
| 489 | - // tempData.push(this.newHeader[left ? i - 1 : i + 1]); | 490 | + tempData.push(this.newHeader[left ? i - 1 : i + 1]); |
| 490 | - // } else { | 491 | + } else { |
| 491 | - // tempData.push(this.newHeader[i]); | 492 | + tempData.push(this.newHeader[i]); |
| 492 | - // } | 493 | + } |
| 493 | - // } | 494 | + } |
| 494 | - // this.newHeader = tempData; | 495 | + this.newHeader = tempData; |
| 495 | - // }, | 496 | + }, |
| 496 | - // headerCellClassName({ column, columnIndex }) { | 497 | + headerCellClassName({ column, columnIndex }) { |
| 497 | - // let active = | 498 | + let active = |
| 498 | - // columnIndex - 1 === this.dragState.end | 499 | + columnIndex - 1 === this.dragState.end |
| 499 | - // ? `darg_active_${this.dragState.direction}` | 500 | + ? `darg_active_${this.dragState.direction}` |
| 500 | - // : ""; | 501 | + : ""; |
| 501 | - // let start = columnIndex - 1 === this.dragState.start ? `darg_start` : ""; | 502 | + let start = columnIndex - 1 === this.dragState.start ? `darg_start` : ""; |
| 502 | - // return `${active} ${start}`; | 503 | + return `${active} ${start}`; |
| 503 | - // }, | 504 | + }, |
| 504 | - | 505 | + cellClassName({ column, columnIndex }) { |
| 505 | - // cellClassName({ column, columnIndex }) { | 506 | + return columnIndex - 1 === this.dragState.start ? `darg_start` : ""; |
| 506 | - // return columnIndex - 1 === this.dragState.start ? `darg_start` : ""; | 507 | + }, |
| 507 | - // }, | ||
| 508 | //数据格式化 | 508 | //数据格式化 |
| 509 | formatter(row, column, cellValue, index) { | 509 | formatter(row, column, cellValue, index) { |
| 510 | - if (dictLabels[column.property]) { | 510 | + if (dictLabels[this.ductName][column.property]) { |
| 511 | - if (dictLabels[column.property][cellValue]) { | 511 | + if (dictLabels[this.ductName][column.property][cellValue]) { |
| 512 | - return dictLabels[column.property][cellValue]; | 512 | + return dictLabels[this.ductName][column.property][cellValue]; |
| 513 | } | 513 | } |
| 514 | } | 514 | } |
| 515 | if (column.property == "roleNames") { | 515 | if (column.property == "roleNames") { |
| ... | @@ -527,7 +527,7 @@ export default { | ... | @@ -527,7 +527,7 @@ export default { |
| 527 | text-align: right; | 527 | text-align: right; |
| 528 | } | 528 | } |
| 529 | .w-table { | 529 | .w-table { |
| 530 | - height:100%; | 530 | + height: 100%; |
| 531 | .el-table .darg_start { | 531 | .el-table .darg_start { |
| 532 | background-color: #f3f3f3; | 532 | background-color: #f3f3f3; |
| 533 | } | 533 | } | ... | ... |
| ... | @@ -37,12 +37,14 @@ | ... | @@ -37,12 +37,14 @@ |
| 37 | label-position="right" | 37 | label-position="right" |
| 38 | label-width="auto" | 38 | label-width="auto" |
| 39 | style="width: 400px; margin: 30px auto" | 39 | style="width: 400px; margin: 30px auto" |
| 40 | + v-model="formData" | ||
| 40 | > | 41 | > |
| 41 | <el-form-item label="航班号" prop="fltNo"> | 42 | <el-form-item label="航班号" prop="fltNo"> |
| 42 | <el-input | 43 | <el-input |
| 43 | v-model="fltNo" | 44 | v-model="fltNo" |
| 44 | size="medium" | 45 | size="medium" |
| 45 | placeholder="请输入航班号" | 46 | placeholder="请输入航班号" |
| 47 | + maxlength="10" | ||
| 46 | style="width: 350px" | 48 | style="width: 350px" |
| 47 | ></el-input> | 49 | ></el-input> |
| 48 | </el-form-item> | 50 | </el-form-item> |
| ... | @@ -134,7 +136,7 @@ export default { | ... | @@ -134,7 +136,7 @@ export default { |
| 134 | }, | 136 | }, |
| 135 | //确定配舱 | 137 | //确定配舱 |
| 136 | submit() { | 138 | submit() { |
| 137 | - this.loading= true; | 139 | + this.loading =true; |
| 138 | let arr = []; | 140 | let arr = []; |
| 139 | this.tableData.forEach((item) => { | 141 | this.tableData.forEach((item) => { |
| 140 | arr.push(item.id); | 142 | arr.push(item.id); |
| ... | @@ -142,6 +144,7 @@ export default { | ... | @@ -142,6 +144,7 @@ export default { |
| 142 | this.formData.ids = arr; | 144 | this.formData.ids = arr; |
| 143 | if (this.formData.fltNo && this.formData.fltDate) { | 145 | if (this.formData.fltNo && this.formData.fltDate) { |
| 144 | allocationFlight(this.formData).then((res) => { | 146 | allocationFlight(this.formData).then((res) => { |
| 147 | + this.loading = false; | ||
| 145 | //code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg | 148 | //code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg |
| 146 | if (res.code === 200) { | 149 | if (res.code === 200) { |
| 147 | this.$message({ | 150 | this.$message({ |
| ... | @@ -149,7 +152,6 @@ export default { | ... | @@ -149,7 +152,6 @@ export default { |
| 149 | type: "success", | 152 | type: "success", |
| 150 | }); | 153 | }); |
| 151 | this.cleaerForm(); | 154 | this.cleaerForm(); |
| 152 | - this.loading = false; | ||
| 153 | this.$emit("dialogBeforeClose", { close: false, reload: true }); | 155 | this.$emit("dialogBeforeClose", { close: false, reload: true }); |
| 154 | } else if (res.code === 202) { | 156 | } else if (res.code === 202) { |
| 155 | MessageBox.confirm(res.msg, "提示", { | 157 | MessageBox.confirm(res.msg, "提示", { |
| ... | @@ -173,7 +175,6 @@ export default { | ... | @@ -173,7 +175,6 @@ export default { |
| 173 | } | 175 | } |
| 174 | }); | 176 | }); |
| 175 | this.cleaerForm(); | 177 | this.cleaerForm(); |
| 176 | - this.loading = false; | ||
| 177 | this.$emit("dialogBeforeClose", { close: false, reload: true }); | 178 | this.$emit("dialogBeforeClose", { close: false, reload: true }); |
| 178 | }) | 179 | }) |
| 179 | .catch(() => { | 180 | .catch(() => { |
| ... | @@ -183,7 +184,6 @@ export default { | ... | @@ -183,7 +184,6 @@ export default { |
| 183 | type: "success", | 184 | type: "success", |
| 184 | }); | 185 | }); |
| 185 | this.cleaerForm(); | 186 | this.cleaerForm(); |
| 186 | - this.loading = false; | ||
| 187 | this.$emit("dialogBeforeClose", { | 187 | this.$emit("dialogBeforeClose", { |
| 188 | close: false, | 188 | close: false, |
| 189 | reload: true, | 189 | reload: true, |
| ... | @@ -209,6 +209,7 @@ export default { | ... | @@ -209,6 +209,7 @@ export default { |
| 209 | }, | 209 | }, |
| 210 | dialogBeforeClose() { | 210 | dialogBeforeClose() { |
| 211 | this.cleaerForm(); | 211 | this.cleaerForm(); |
| 212 | + this.$refs['form'].clearValidate(); | ||
| 212 | this.$emit("dialogBeforeClose", { close: false, reload: true }); | 213 | this.$emit("dialogBeforeClose", { close: false, reload: true }); |
| 213 | }, | 214 | }, |
| 214 | formatter(row, column, cellValue, index){ | 215 | formatter(row, column, cellValue, index){ | ... | ... |
| ... | @@ -114,18 +114,10 @@ | ... | @@ -114,18 +114,10 @@ |
| 114 | >新增</el-button | 114 | >新增</el-button |
| 115 | > | 115 | > |
| 116 | <el-button | 116 | <el-button |
| 117 | - type="danger" | ||
| 118 | - icon="el-icon-delete" | ||
| 119 | - size="mini" | ||
| 120 | - :disabled="multiple" | ||
| 121 | - @click="handleDelete" | ||
| 122 | - v-hasPermi="['base:flightInfo:delete']" | ||
| 123 | - >删除 | ||
| 124 | - </el-button> | ||
| 125 | - <el-button | ||
| 126 | type="primary" | 117 | type="primary" |
| 127 | icon="el-icon-circle-check" | 118 | icon="el-icon-circle-check" |
| 128 | size="mini" | 119 | size="mini" |
| 120 | + :disabled="ids.length == 0" | ||
| 129 | @click="handleFlightStatus('flightStatus10')" | 121 | @click="handleFlightStatus('flightStatus10')" |
| 130 | v-hasPermi="['base:flightInfo:open']" | 122 | v-hasPermi="['base:flightInfo:open']" |
| 131 | >自动配舱开启</el-button | 123 | >自动配舱开启</el-button |
| ... | @@ -134,16 +126,46 @@ | ... | @@ -134,16 +126,46 @@ |
| 134 | type="primary" | 126 | type="primary" |
| 135 | icon="el-icon-circle-close" | 127 | icon="el-icon-circle-close" |
| 136 | size="mini" | 128 | size="mini" |
| 129 | + :disabled="ids.length == 0" | ||
| 137 | @click="handleFlightStatus('flightStatus80')" | 130 | @click="handleFlightStatus('flightStatus80')" |
| 138 | v-hasPermi="['base:flightInfo:close']" | 131 | v-hasPermi="['base:flightInfo:close']" |
| 139 | >自动配舱关闭</el-button | 132 | >自动配舱关闭</el-button |
| 140 | > | 133 | > |
| 134 | + <el-button | ||
| 135 | + type="primary" | ||
| 136 | + icon="el-icon-circle-check" | ||
| 137 | + size="mini" | ||
| 138 | + :disabled="ids.length == 0" | ||
| 139 | + @click="autoPushBatch('open')" | ||
| 140 | + v-hasPermi="['base:flightInfo:autoPushOpen']" | ||
| 141 | + >自动推送开启</el-button | ||
| 142 | + > | ||
| 143 | + <el-button | ||
| 144 | + type="primary" | ||
| 145 | + icon="el-icon-circle-close" | ||
| 146 | + size="mini" | ||
| 147 | + :disabled="ids.length == 0" | ||
| 148 | + @click="autoPushBatch('close')" | ||
| 149 | + v-hasPermi="['base:flightInfo:autoPushClose']" | ||
| 150 | + >自动推送关闭</el-button | ||
| 151 | + > | ||
| 152 | + <el-button | ||
| 153 | + type="danger" | ||
| 154 | + icon="el-icon-delete" | ||
| 155 | + size="mini" | ||
| 156 | + :disabled="ids.length == 0" | ||
| 157 | + @click="handleDelete" | ||
| 158 | + v-hasPermi="['base:flightInfo:delete']" | ||
| 159 | + >删除 | ||
| 160 | + </el-button> | ||
| 141 | </el-form> | 161 | </el-form> |
| 142 | <Tables | 162 | <Tables |
| 143 | ref="flightInfoTable" | 163 | ref="flightInfoTable" |
| 164 | + ductName="FlightInformation" | ||
| 144 | :data="findAllFltDatList" | 165 | :data="findAllFltDatList" |
| 145 | :headerData="tableHeader" | 166 | :headerData="tableHeader" |
| 146 | :infoData="tableHeader" | 167 | :infoData="tableHeader" |
| 168 | + :selection="true" | ||
| 147 | :totalCount="total" | 169 | :totalCount="total" |
| 148 | :loading="loading" | 170 | :loading="loading" |
| 149 | :limitSize="queryParams.limitSize" | 171 | :limitSize="queryParams.limitSize" |
| ... | @@ -151,13 +173,14 @@ | ... | @@ -151,13 +173,14 @@ |
| 151 | :shiftKey="shiftKey" | 173 | :shiftKey="shiftKey" |
| 152 | :infoShow="false" | 174 | :infoShow="false" |
| 153 | :height="tableHeight" | 175 | :height="tableHeight" |
| 176 | + :pageSizes="[20, 30, 40, 50, 100]" | ||
| 154 | @tableSelect="tableSelect" | 177 | @tableSelect="tableSelect" |
| 155 | @tableSelectAll="tableSelectAll" | 178 | @tableSelectAll="tableSelectAll" |
| 156 | @currentChange="currentChange" | 179 | @currentChange="currentChange" |
| 157 | @sortChange="sortChange" | 180 | @sortChange="sortChange" |
| 158 | @sizeChange="sizeChange" | 181 | @sizeChange="sizeChange" |
| 159 | > | 182 | > |
| 160 | - <template> | 183 | + <template slot="optionColumn"> |
| 161 | <el-table-column | 184 | <el-table-column |
| 162 | v-if="findAllFltDatList.length > 0" | 185 | v-if="findAllFltDatList.length > 0" |
| 163 | label="操作" | 186 | label="操作" |
| ... | @@ -221,6 +244,24 @@ | ... | @@ -221,6 +244,24 @@ |
| 221 | </el-form-item> | 244 | </el-form-item> |
| 222 | </el-col> | 245 | </el-col> |
| 223 | <el-col :span="12"> | 246 | <el-col :span="12"> |
| 247 | + <el-form-item label="cutOff时间" prop="cutOffTime"> | ||
| 248 | + <el-select | ||
| 249 | + v-model="form.cutOffTime" | ||
| 250 | + clearable | ||
| 251 | + placeholder="选择时间" | ||
| 252 | + type="string" | ||
| 253 | + > | ||
| 254 | + <el-option | ||
| 255 | + v-for="item in selectOption.cutOffTime" | ||
| 256 | + :key="item" | ||
| 257 | + :label="item" | ||
| 258 | + :value="item" | ||
| 259 | + > | ||
| 260 | + </el-option> | ||
| 261 | + </el-select> | ||
| 262 | + </el-form-item> | ||
| 263 | + </el-col> | ||
| 264 | + <el-col :span="12"> | ||
| 224 | <el-form-item label="航班路线" prop="route"> | 265 | <el-form-item label="航班路线" prop="route"> |
| 225 | <el-input | 266 | <el-input |
| 226 | style="width: 93%" | 267 | style="width: 93%" |
| ... | @@ -428,6 +469,7 @@ import { | ... | @@ -428,6 +469,7 @@ import { |
| 428 | saveOrUpdate, | 469 | saveOrUpdate, |
| 429 | findFltCommonConf, | 470 | findFltCommonConf, |
| 430 | updateStatusBatch, | 471 | updateStatusBatch, |
| 472 | + updateAutoPushBatch, | ||
| 431 | } from "@/api/findAllFltData"; | 473 | } from "@/api/findAllFltData"; |
| 432 | export default { | 474 | export default { |
| 433 | name: "FlightInformationMaintenance", | 475 | name: "FlightInformationMaintenance", |
| ... | @@ -483,27 +525,6 @@ export default { | ... | @@ -483,27 +525,6 @@ export default { |
| 483 | //表头 | 525 | //表头 |
| 484 | tableHeader: [ | 526 | tableHeader: [ |
| 485 | { | 527 | { |
| 486 | - type: "selection", | ||
| 487 | - name: "", | ||
| 488 | - value: "", | ||
| 489 | - width: "50", | ||
| 490 | - align: "center", | ||
| 491 | - sorTable: false, | ||
| 492 | - fixed: true, | ||
| 493 | - disabled: true, | ||
| 494 | - }, | ||
| 495 | - { | ||
| 496 | - type: "index", | ||
| 497 | - name: "", | ||
| 498 | - value: "", | ||
| 499 | - width: "50", | ||
| 500 | - align: "center", | ||
| 501 | - sorTable: false, | ||
| 502 | - fixed: false, | ||
| 503 | - disabled: true, | ||
| 504 | - }, | ||
| 505 | - { | ||
| 506 | - type: "", | ||
| 507 | name: "航班日期", | 528 | name: "航班日期", |
| 508 | value: "fltDate", | 529 | value: "fltDate", |
| 509 | width: "100", | 530 | width: "100", |
| ... | @@ -513,7 +534,6 @@ export default { | ... | @@ -513,7 +534,6 @@ export default { |
| 513 | disabled: true, | 534 | disabled: true, |
| 514 | }, | 535 | }, |
| 515 | { | 536 | { |
| 516 | - type: "", | ||
| 517 | name: "航班起飞时间", | 537 | name: "航班起飞时间", |
| 518 | value: "takeOffTime", | 538 | value: "takeOffTime", |
| 519 | width: "120", | 539 | width: "120", |
| ... | @@ -523,7 +543,15 @@ export default { | ... | @@ -523,7 +543,15 @@ export default { |
| 523 | disabled: true, | 543 | disabled: true, |
| 524 | }, | 544 | }, |
| 525 | { | 545 | { |
| 526 | - type: "", | 546 | + name: "cutOff时间", |
| 547 | + value: "cutOffTime", | ||
| 548 | + width: "110", | ||
| 549 | + align: "center", | ||
| 550 | + sorTable: false, | ||
| 551 | + fixed: false, | ||
| 552 | + disabled: true, | ||
| 553 | + }, | ||
| 554 | + { | ||
| 527 | name: "航班号", | 555 | name: "航班号", |
| 528 | value: "fltNo", | 556 | value: "fltNo", |
| 529 | width: "100", | 557 | width: "100", |
| ... | @@ -533,7 +561,6 @@ export default { | ... | @@ -533,7 +561,6 @@ export default { |
| 533 | disabled: true, | 561 | disabled: true, |
| 534 | }, | 562 | }, |
| 535 | { | 563 | { |
| 536 | - type: "", | ||
| 537 | name: "航班路线", | 564 | name: "航班路线", |
| 538 | value: "route", | 565 | value: "route", |
| 539 | width: "140", | 566 | width: "140", |
| ... | @@ -543,7 +570,6 @@ export default { | ... | @@ -543,7 +570,6 @@ export default { |
| 543 | disabled: true, | 570 | disabled: true, |
| 544 | }, | 571 | }, |
| 545 | { | 572 | { |
| 546 | - type: "", | ||
| 547 | name: "航班类型", | 573 | name: "航班类型", |
| 548 | value: "typeName", | 574 | value: "typeName", |
| 549 | width: "100", | 575 | width: "100", |
| ... | @@ -553,7 +579,6 @@ export default { | ... | @@ -553,7 +579,6 @@ export default { |
| 553 | disabled: true, | 579 | disabled: true, |
| 554 | }, | 580 | }, |
| 555 | { | 581 | { |
| 556 | - type: "", | ||
| 557 | name: "航班种类", | 582 | name: "航班种类", |
| 558 | value: "flightKindName", | 583 | value: "flightKindName", |
| 559 | width: "100", | 584 | width: "100", |
| ... | @@ -563,7 +588,6 @@ export default { | ... | @@ -563,7 +588,6 @@ export default { |
| 563 | disabled: true, | 588 | disabled: true, |
| 564 | }, | 589 | }, |
| 565 | { | 590 | { |
| 566 | - type: "", | ||
| 567 | name: "航班状态", | 591 | name: "航班状态", |
| 568 | value: "statusName", | 592 | value: "statusName", |
| 569 | width: "100", | 593 | width: "100", |
| ... | @@ -573,7 +597,15 @@ export default { | ... | @@ -573,7 +597,15 @@ export default { |
| 573 | disabled: true, | 597 | disabled: true, |
| 574 | }, | 598 | }, |
| 575 | { | 599 | { |
| 576 | - type: "", | 600 | + name: "是否自动推送", |
| 601 | + value: "pushDateSwitch", | ||
| 602 | + width: "120", | ||
| 603 | + align: "center", | ||
| 604 | + sorTable: false, | ||
| 605 | + fixed: false, | ||
| 606 | + disabled: true, | ||
| 607 | + }, | ||
| 608 | + { | ||
| 577 | name: "总重量", | 609 | name: "总重量", |
| 578 | value: "totalWeight", | 610 | value: "totalWeight", |
| 579 | width: "90", | 611 | width: "90", |
| ... | @@ -583,7 +615,6 @@ export default { | ... | @@ -583,7 +615,6 @@ export default { |
| 583 | disabled: true, | 615 | disabled: true, |
| 584 | }, | 616 | }, |
| 585 | { | 617 | { |
| 586 | - type: "", | ||
| 587 | name: "原始重量(KG)", | 618 | name: "原始重量(KG)", |
| 588 | value: "originalWeight", | 619 | value: "originalWeight", |
| 589 | width: "120", | 620 | width: "120", |
| ... | @@ -593,39 +624,35 @@ export default { | ... | @@ -593,39 +624,35 @@ export default { |
| 593 | disabled: true, | 624 | disabled: true, |
| 594 | }, | 625 | }, |
| 595 | { | 626 | { |
| 596 | - type: "", | 627 | + name: "已配重量", |
| 597 | - name: "总体积(cm³)", | 628 | + value: "alloctedWeight", |
| 598 | - value: "totalVolume", | 629 | + width: "90", |
| 599 | - width: "100", | ||
| 600 | align: "center", | 630 | align: "center", |
| 601 | sorTable: false, | 631 | sorTable: false, |
| 602 | fixed: false, | 632 | fixed: false, |
| 603 | disabled: true, | 633 | disabled: true, |
| 604 | }, | 634 | }, |
| 605 | { | 635 | { |
| 606 | - type: "", | 636 | + name: "是否需要预审", |
| 607 | - name: "是否限制一票一件", | 637 | + value: "needRequired", |
| 608 | - value: "ticketToPiece", | 638 | + width: "130", |
| 609 | - width: "140", | ||
| 610 | align: "center", | 639 | align: "center", |
| 611 | sorTable: false, | 640 | sorTable: false, |
| 612 | fixed: false, | 641 | fixed: false, |
| 613 | disabled: true, | 642 | disabled: true, |
| 614 | }, | 643 | }, |
| 615 | { | 644 | { |
| 616 | - type: "", | 645 | + name: "是否开启高地价", |
| 617 | - name: "是否需要预审", | 646 | + value: "highLowPriceFlg", |
| 618 | - value: "needRequired", | 647 | + width: "140", |
| 619 | - width: "130", | ||
| 620 | align: "center", | 648 | align: "center", |
| 621 | sorTable: false, | 649 | sorTable: false, |
| 622 | fixed: false, | 650 | fixed: false, |
| 623 | disabled: true, | 651 | disabled: true, |
| 624 | }, | 652 | }, |
| 625 | { | 653 | { |
| 626 | - type: "", | 654 | + name: "是否限制一票一件", |
| 627 | - name: "是否开启高地价", | 655 | + value: "ticketToPiece", |
| 628 | - value: "highLowPriceFlg", | ||
| 629 | width: "140", | 656 | width: "140", |
| 630 | align: "center", | 657 | align: "center", |
| 631 | sorTable: false, | 658 | sorTable: false, |
| ... | @@ -633,7 +660,6 @@ export default { | ... | @@ -633,7 +660,6 @@ export default { |
| 633 | disabled: true, | 660 | disabled: true, |
| 634 | }, | 661 | }, |
| 635 | { | 662 | { |
| 636 | - type: "", | ||
| 637 | name: "额外增重百分比", | 663 | name: "额外增重百分比", |
| 638 | value: "extraWeightPercent", | 664 | value: "extraWeightPercent", |
| 639 | width: "140", | 665 | width: "140", |
| ... | @@ -643,7 +669,6 @@ export default { | ... | @@ -643,7 +669,6 @@ export default { |
| 643 | disabled: true, | 669 | disabled: true, |
| 644 | }, | 670 | }, |
| 645 | { | 671 | { |
| 646 | - type: "", | ||
| 647 | name: "高价百分比", | 672 | name: "高价百分比", |
| 648 | value: "highPriceWeightPercent", | 673 | value: "highPriceWeightPercent", |
| 649 | width: "120", | 674 | width: "120", |
| ... | @@ -653,7 +678,6 @@ export default { | ... | @@ -653,7 +678,6 @@ export default { |
| 653 | disabled: true, | 678 | disabled: true, |
| 654 | }, | 679 | }, |
| 655 | { | 680 | { |
| 656 | - type: "", | ||
| 657 | name: "低价百分比", | 681 | name: "低价百分比", |
| 658 | value: "lowPriceWeightPercent", | 682 | value: "lowPriceWeightPercent", |
| 659 | width: "120", | 683 | width: "120", |
| ... | @@ -663,17 +687,15 @@ export default { | ... | @@ -663,17 +687,15 @@ export default { |
| 663 | disabled: true, | 687 | disabled: true, |
| 664 | }, | 688 | }, |
| 665 | { | 689 | { |
| 666 | - type: "", | 690 | + name: "总体积(cm³)", |
| 667 | - name: "已配重量", | 691 | + value: "totalVolume", |
| 668 | - value: "alloctedWeight", | 692 | + width: "100", |
| 669 | - width: "90", | ||
| 670 | align: "center", | 693 | align: "center", |
| 671 | sorTable: false, | 694 | sorTable: false, |
| 672 | fixed: false, | 695 | fixed: false, |
| 673 | disabled: true, | 696 | disabled: true, |
| 674 | }, | 697 | }, |
| 675 | { | 698 | { |
| 676 | - type: "", | ||
| 677 | name: "已配体积(cm³)", | 699 | name: "已配体积(cm³)", |
| 678 | value: "alloctedVolume", | 700 | value: "alloctedVolume", |
| 679 | width: "120", | 701 | width: "120", |
| ... | @@ -683,7 +705,6 @@ export default { | ... | @@ -683,7 +705,6 @@ export default { |
| 683 | disabled: true, | 705 | disabled: true, |
| 684 | }, | 706 | }, |
| 685 | { | 707 | { |
| 686 | - type: "", | ||
| 687 | name: "航班优先级", | 708 | name: "航班优先级", |
| 688 | value: "priorityName", | 709 | value: "priorityName", |
| 689 | width: "100", | 710 | width: "100", |
| ... | @@ -693,7 +714,6 @@ export default { | ... | @@ -693,7 +714,6 @@ export default { |
| 693 | disabled: true, | 714 | disabled: true, |
| 694 | }, | 715 | }, |
| 695 | { | 716 | { |
| 696 | - type: "", | ||
| 697 | name: "配舱优先级", | 717 | name: "配舱优先级", |
| 698 | value: "priorityRuleName", | 718 | value: "priorityRuleName", |
| 699 | width: "100", | 719 | width: "100", |
| ... | @@ -703,7 +723,6 @@ export default { | ... | @@ -703,7 +723,6 @@ export default { |
| 703 | disabled: true, | 723 | disabled: true, |
| 704 | }, | 724 | }, |
| 705 | { | 725 | { |
| 706 | - type: "", | ||
| 707 | name: "创建人", | 726 | name: "创建人", |
| 708 | value: "createUserName", | 727 | value: "createUserName", |
| 709 | width: "90", | 728 | width: "90", |
| ... | @@ -713,7 +732,6 @@ export default { | ... | @@ -713,7 +732,6 @@ export default { |
| 713 | disabled: true, | 732 | disabled: true, |
| 714 | }, | 733 | }, |
| 715 | { | 734 | { |
| 716 | - type: "", | ||
| 717 | name: "创建时间", | 735 | name: "创建时间", |
| 718 | value: "createTime", | 736 | value: "createTime", |
| 719 | width: "100", | 737 | width: "100", |
| ... | @@ -723,7 +741,6 @@ export default { | ... | @@ -723,7 +741,6 @@ export default { |
| 723 | disabled: true, | 741 | disabled: true, |
| 724 | }, | 742 | }, |
| 725 | { | 743 | { |
| 726 | - type: "", | ||
| 727 | name: "最后修改人", | 744 | name: "最后修改人", |
| 728 | value: "lastModifyUserName", | 745 | value: "lastModifyUserName", |
| 729 | width: "120", | 746 | width: "120", |
| ... | @@ -733,7 +750,6 @@ export default { | ... | @@ -733,7 +750,6 @@ export default { |
| 733 | disabled: true, | 750 | disabled: true, |
| 734 | }, | 751 | }, |
| 735 | { | 752 | { |
| 736 | - type: "", | ||
| 737 | name: "最后修改时间", | 753 | name: "最后修改时间", |
| 738 | value: "lastModifyTime", | 754 | value: "lastModifyTime", |
| 739 | width: "120", | 755 | width: "120", |
| ... | @@ -802,10 +818,6 @@ export default { | ... | @@ -802,10 +818,6 @@ export default { |
| 802 | sourceFlightAndFlightDate: [], | 818 | sourceFlightAndFlightDate: [], |
| 803 | //高价百分比是否打开 | 819 | //高价百分比是否打开 |
| 804 | ishighPriceWeightPercent: true, | 820 | ishighPriceWeightPercent: true, |
| 805 | - //非单个禁用 | ||
| 806 | - //single: true, | ||
| 807 | - //非多个禁用 | ||
| 808 | - multiple: true, | ||
| 809 | //遮罩层 | 821 | //遮罩层 |
| 810 | loading: false, | 822 | loading: false, |
| 811 | //遮罩层 | 823 | //遮罩层 |
| ... | @@ -828,6 +840,8 @@ export default { | ... | @@ -828,6 +840,8 @@ export default { |
| 828 | }, | 840 | }, |
| 829 | created() { | 841 | created() { |
| 830 | //查询条件数据源 | 842 | //查询条件数据源 |
| 843 | + let date = new Date() | ||
| 844 | + this.queryParams.fltDateStart = `${date.getFullYear()}-${(date.getMonth()+1).length>1?(date.getMonth()+1):'0'+(date.getMonth()+1)}-${date.getDate()}` | ||
| 831 | this.findFltConditionData(); | 845 | this.findFltConditionData(); |
| 832 | if (this.$store.state.tagsView.cachedViews.length == 0) { | 846 | if (this.$store.state.tagsView.cachedViews.length == 0) { |
| 833 | this.findAllFltData(); | 847 | this.findAllFltData(); |
| ... | @@ -836,8 +850,8 @@ export default { | ... | @@ -836,8 +850,8 @@ export default { |
| 836 | activated() { | 850 | activated() { |
| 837 | this.findAllFltData(); | 851 | this.findAllFltData(); |
| 838 | }, | 852 | }, |
| 839 | - deactivated(){ | 853 | + deactivated() { |
| 840 | - this.findAllFltDatList = [] | 854 | + this.findAllFltDatList = []; |
| 841 | }, | 855 | }, |
| 842 | mounted() { | 856 | mounted() { |
| 843 | window.addEventListener("keydown", (code) => { | 857 | window.addEventListener("keydown", (code) => { |
| ... | @@ -851,7 +865,7 @@ export default { | ... | @@ -851,7 +865,7 @@ export default { |
| 851 | } | 865 | } |
| 852 | }); | 866 | }); |
| 853 | this.tableHeight = | 867 | this.tableHeight = |
| 854 | - window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 150; | 868 | + window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120; |
| 855 | }, | 869 | }, |
| 856 | methods: { | 870 | methods: { |
| 857 | //输入航班号后 | 871 | //输入航班号后 |
| ... | @@ -947,7 +961,6 @@ export default { | ... | @@ -947,7 +961,6 @@ export default { |
| 947 | /** 航班信息维护查询*/ | 961 | /** 航班信息维护查询*/ |
| 948 | findAllFltData() { | 962 | findAllFltData() { |
| 949 | this.ids = []; | 963 | this.ids = []; |
| 950 | - this.multiple = true; | ||
| 951 | this.loading = true; | 964 | this.loading = true; |
| 952 | if (this.queryParams.pageNum > 1) { | 965 | if (this.queryParams.pageNum > 1) { |
| 953 | this.queryParams.limitStart = | 966 | this.queryParams.limitStart = |
| ... | @@ -1012,15 +1025,15 @@ export default { | ... | @@ -1012,15 +1025,15 @@ export default { |
| 1012 | if (this.form.highPriceWeightPercent >= 0) { | 1025 | if (this.form.highPriceWeightPercent >= 0) { |
| 1013 | this.$set( | 1026 | this.$set( |
| 1014 | this.form, | 1027 | this.form, |
| 1015 | - "lowPriceWeightPercent", | ||
| 1016 | - 100 - this.form.highPriceWeightPercent | ||
| 1017 | - ); | ||
| 1018 | - this.$set( | ||
| 1019 | - this.form, | ||
| 1020 | "highAvailableWeight", | 1028 | "highAvailableWeight", |
| 1021 | (Weight - this.form.alloctedWeight) * | 1029 | (Weight - this.form.alloctedWeight) * |
| 1022 | (this.form.highPriceWeightPercent / 100) | 1030 | (this.form.highPriceWeightPercent / 100) |
| 1023 | ); | 1031 | ); |
| 1032 | + this.$set( | ||
| 1033 | + this.form, | ||
| 1034 | + "lowPriceWeightPercent", | ||
| 1035 | + 100 - this.form.highPriceWeightPercent | ||
| 1036 | + ); | ||
| 1024 | // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) | 1037 | // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) |
| 1025 | } else if ( | 1038 | } else if ( |
| 1026 | this.title == "修改航班信息" && | 1039 | this.title == "修改航班信息" && |
| ... | @@ -1081,9 +1094,7 @@ export default { | ... | @@ -1081,9 +1094,7 @@ export default { |
| 1081 | Weightall() { | 1094 | Weightall() { |
| 1082 | let Weight = 0; | 1095 | let Weight = 0; |
| 1083 | if (this.form.extraWeightPercent > 0) { | 1096 | if (this.form.extraWeightPercent > 0) { |
| 1084 | - Weight = | 1097 | + Weight =this.form.originalWeight * (this.form.extraWeightPercent / 100)+this.form.originalWeight; |
| 1085 | - this.form.originalWeight + | ||
| 1086 | - this.form.originalWeight * (this.form.extraWeightPercent / 100); | ||
| 1087 | } else { | 1098 | } else { |
| 1088 | Weight = this.form.originalWeight; | 1099 | Weight = this.form.originalWeight; |
| 1089 | } | 1100 | } |
| ... | @@ -1107,7 +1118,7 @@ export default { | ... | @@ -1107,7 +1118,7 @@ export default { |
| 1107 | //是否预审 | 1118 | //是否预审 |
| 1108 | // this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false; | 1119 | // this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false; |
| 1109 | // 计算高地价可配 | 1120 | // 计算高地价可配 |
| 1110 | - this.LowHighAvailable(); | 1121 | + // this.LowHighAvailable(); |
| 1111 | } else { | 1122 | } else { |
| 1112 | this.msgError(response.msg); | 1123 | this.msgError(response.msg); |
| 1113 | } | 1124 | } |
| ... | @@ -1214,32 +1225,76 @@ export default { | ... | @@ -1214,32 +1225,76 @@ export default { |
| 1214 | //批量开启/关闭航班 | 1225 | //批量开启/关闭航班 |
| 1215 | handleFlightStatus(status) { | 1226 | handleFlightStatus(status) { |
| 1216 | let handle = status == "flightStatus80" ? "关闭" : "开启"; | 1227 | let handle = status == "flightStatus80" ? "关闭" : "开启"; |
| 1217 | - if (this.ids.length == 0) { | 1228 | + let data = { |
| 1218 | - this.msgError("请选择批量" + handle + "的航班"); | 1229 | + updateIds: [], |
| 1219 | - return; | 1230 | + }; |
| 1231 | + this.ids.map(item=>{ | ||
| 1232 | + data.status = status; | ||
| 1233 | + if(status === 'flightStatus80'){ | ||
| 1234 | + if(item.statusName === '已开启'){ | ||
| 1235 | + data.updateIds.push(item.id) | ||
| 1236 | + } | ||
| 1237 | + }else{ | ||
| 1238 | + if(item.statusName === '已关闭'){ | ||
| 1239 | + data.updateIds.push(item.id) | ||
| 1240 | + } | ||
| 1241 | + } | ||
| 1242 | + }) | ||
| 1243 | + if(data.updateIds.length > 0){ | ||
| 1244 | + updateStatusBatch(data).then((response) => { | ||
| 1245 | + if (response.code === 200) { | ||
| 1246 | + this.msgSuccess(handle + "成功"); | ||
| 1247 | + this.findAllFltData(); | ||
| 1248 | + } else { | ||
| 1249 | + this.msgError(response.msg); | ||
| 1250 | + } | ||
| 1251 | + }); | ||
| 1220 | } | 1252 | } |
| 1221 | - let data = {}; | 1253 | + }, |
| 1222 | - data.status = status; | 1254 | + //自动推送开关 |
| 1223 | - data.updateIds = this.ids; | 1255 | + autoPushBatch(status) { |
| 1224 | - | 1256 | + let msg = status == "open" ? "开启" : "关闭"; |
| 1225 | - updateStatusBatch(data).then((response) => { | 1257 | + let data = { |
| 1226 | - if (response.code === 200) { | 1258 | + updateIds: [], |
| 1227 | - this.msgSuccess(handle + "成功"); | 1259 | + }; |
| 1228 | - this.findAllFltData(); | 1260 | + this.ids.map((item) => { |
| 1229 | - } else { | 1261 | + if (status === "open") { |
| 1230 | - this.msgError(response.msg); | 1262 | + data.status = "1"; |
| 1263 | + if (item.pushDateSwitch != "1") { | ||
| 1264 | + data.updateIds.push(item.id); | ||
| 1265 | + } | ||
| 1266 | + } else if (status === "close") { | ||
| 1267 | + data.status = "2"; | ||
| 1268 | + if (item.pushDateSwitch != "2") { | ||
| 1269 | + data.updateIds.push(item.id); | ||
| 1270 | + } | ||
| 1231 | } | 1271 | } |
| 1232 | }); | 1272 | }); |
| 1273 | + if(data.updateIds.length > 0){ | ||
| 1274 | + updateAutoPushBatch(data) | ||
| 1275 | + .then((res) => { | ||
| 1276 | + if (res.code === 200) { | ||
| 1277 | + this.msgSuccess(`自动推送${msg}成功`); | ||
| 1278 | + this.findAllFltData(); | ||
| 1279 | + } else { | ||
| 1280 | + this.msgError(res.msg); | ||
| 1281 | + } | ||
| 1282 | + }) | ||
| 1283 | + .catch(err => { | ||
| 1284 | + this.msgError(err); | ||
| 1285 | + }); | ||
| 1286 | + }else{ | ||
| 1287 | + this.msgSuccess(`自动推送${msg}成功`); | ||
| 1288 | + this.findAllFltData(); | ||
| 1289 | + } | ||
| 1233 | }, | 1290 | }, |
| 1234 | //多选框选中数据 | 1291 | //多选框选中数据 |
| 1235 | tableSelect(val) { | 1292 | tableSelect(val) { |
| 1236 | - this.ids = val.selection.map((item) => item.id); | 1293 | + this.ids = val.selection; |
| 1237 | - this.multiple = !val.selection.length; | ||
| 1238 | }, | 1294 | }, |
| 1239 | //全选 | 1295 | //全选 |
| 1240 | tableSelectAll(val) { | 1296 | tableSelectAll(val) { |
| 1241 | - this.ids = val.selection.map((item) => item.id); | 1297 | + this.ids = val; |
| 1242 | - this.multiple = !val.selection.length; | ||
| 1243 | }, | 1298 | }, |
| 1244 | //分页 | 1299 | //分页 |
| 1245 | currentChange(val) { | 1300 | currentChange(val) { | ... | ... |
| ... | @@ -232,15 +232,21 @@ | ... | @@ -232,15 +232,21 @@ |
| 232 | </el-form> | 232 | </el-form> |
| 233 | <Tables | 233 | <Tables |
| 234 | ref="newTables" | 234 | ref="newTables" |
| 235 | + ductName="cargo" | ||
| 235 | :data="tableData" | 236 | :data="tableData" |
| 236 | :headerData="tableHeader" | 237 | :headerData="tableHeader" |
| 238 | + :infoData="tableHeader" | ||
| 239 | + :selection="true" | ||
| 237 | :totalCount="totalCount" | 240 | :totalCount="totalCount" |
| 238 | :loading="tableLoading" | 241 | :loading="tableLoading" |
| 239 | :limitSize="limitSize" | 242 | :limitSize="limitSize" |
| 240 | :limitStart="limitStart" | 243 | :limitStart="limitStart" |
| 241 | :page="page" | 244 | :page="page" |
| 242 | :shiftKey="shiftKey" | 245 | :shiftKey="shiftKey" |
| 246 | + :infoShow="false" | ||
| 247 | + :pageSizes="[100]" | ||
| 243 | :height="tableHeight" | 248 | :height="tableHeight" |
| 249 | + @sizeChange="sizeChange" | ||
| 244 | @tableSelect="tableSelect" | 250 | @tableSelect="tableSelect" |
| 245 | @tableSelectAll="tableSelectAll" | 251 | @tableSelectAll="tableSelectAll" |
| 246 | @currentChange="currentChange" | 252 | @currentChange="currentChange" |
| ... | @@ -288,27 +294,6 @@ export default { | ... | @@ -288,27 +294,6 @@ export default { |
| 288 | }, //表单数据 | 294 | }, //表单数据 |
| 289 | tableHeader: [ | 295 | tableHeader: [ |
| 290 | { | 296 | { |
| 291 | - type: "selection", | ||
| 292 | - name: "", | ||
| 293 | - value: "", | ||
| 294 | - width: "50", | ||
| 295 | - align: "center", | ||
| 296 | - sorTable: false, | ||
| 297 | - fixed: true, | ||
| 298 | - disabled:true | ||
| 299 | - }, | ||
| 300 | - { | ||
| 301 | - type: "index", | ||
| 302 | - name: "", | ||
| 303 | - value: "", | ||
| 304 | - width: "50", | ||
| 305 | - align: "center", | ||
| 306 | - sorTable: false, | ||
| 307 | - fixed: false, | ||
| 308 | - disabled:true | ||
| 309 | - }, | ||
| 310 | - { | ||
| 311 | - type: "", | ||
| 312 | name: "口岸代码", | 297 | name: "口岸代码", |
| 313 | value: "portName", | 298 | value: "portName", |
| 314 | width: "120", | 299 | width: "120", |
| ... | @@ -318,7 +303,6 @@ export default { | ... | @@ -318,7 +303,6 @@ export default { |
| 318 | disabled:true | 303 | disabled:true |
| 319 | }, | 304 | }, |
| 320 | { | 305 | { |
| 321 | - type: "", | ||
| 322 | name: "取件日期", | 306 | name: "取件日期", |
| 323 | value: "pickUpDate", | 307 | value: "pickUpDate", |
| 324 | width: "120", | 308 | width: "120", |
| ... | @@ -328,7 +312,6 @@ export default { | ... | @@ -328,7 +312,6 @@ export default { |
| 328 | disabled:true | 312 | disabled:true |
| 329 | }, | 313 | }, |
| 330 | { | 314 | { |
| 331 | - type: "", | ||
| 332 | name: "取件扫描号", | 315 | name: "取件扫描号", |
| 333 | value: "pickUpScanNo", | 316 | value: "pickUpScanNo", |
| 334 | width: "120", | 317 | width: "120", |
| ... | @@ -338,7 +321,6 @@ export default { | ... | @@ -338,7 +321,6 @@ export default { |
| 338 | disabled:true | 321 | disabled:true |
| 339 | }, | 322 | }, |
| 340 | { | 323 | { |
| 341 | - type: "", | ||
| 342 | name: "站点", | 324 | name: "站点", |
| 343 | value: "siteName", | 325 | value: "siteName", |
| 344 | width: "80", | 326 | width: "80", |
| ... | @@ -348,7 +330,6 @@ export default { | ... | @@ -348,7 +330,6 @@ export default { |
| 348 | disabled:true | 330 | disabled:true |
| 349 | }, | 331 | }, |
| 350 | { | 332 | { |
| 351 | - type: "", | ||
| 352 | name: "运单号", | 333 | name: "运单号", |
| 353 | value: "waybillNo", | 334 | value: "waybillNo", |
| 354 | width: "150", | 335 | width: "150", |
| ... | @@ -358,7 +339,6 @@ export default { | ... | @@ -358,7 +339,6 @@ export default { |
| 358 | disabled:true | 339 | disabled:true |
| 359 | }, | 340 | }, |
| 360 | { | 341 | { |
| 361 | - type: "", | ||
| 362 | name: "总单号", | 342 | name: "总单号", |
| 363 | value: "totalWaybillNo", | 343 | value: "totalWaybillNo", |
| 364 | width: "150", | 344 | width: "150", |
| ... | @@ -368,7 +348,6 @@ export default { | ... | @@ -368,7 +348,6 @@ export default { |
| 368 | disabled:true | 348 | disabled:true |
| 369 | }, | 349 | }, |
| 370 | { | 350 | { |
| 371 | - type: "", | ||
| 372 | name: "服务类型", | 351 | name: "服务类型", |
| 373 | value: "serviceTypeName", | 352 | value: "serviceTypeName", |
| 374 | width: "100", | 353 | width: "100", |
| ... | @@ -378,7 +357,6 @@ export default { | ... | @@ -378,7 +357,6 @@ export default { |
| 378 | disabled:true | 357 | disabled:true |
| 379 | }, | 358 | }, |
| 380 | { | 359 | { |
| 381 | - type: "", | ||
| 382 | name: "服务代码", | 360 | name: "服务代码", |
| 383 | value: "serviceCode", | 361 | value: "serviceCode", |
| 384 | width: "90", | 362 | width: "90", |
| ... | @@ -388,7 +366,6 @@ export default { | ... | @@ -388,7 +366,6 @@ export default { |
| 388 | disabled:true | 366 | disabled:true |
| 389 | }, | 367 | }, |
| 390 | { | 368 | { |
| 391 | - type: "", | ||
| 392 | name: "URSA", | 369 | name: "URSA", |
| 393 | value: "ursa", | 370 | value: "ursa", |
| 394 | width: "100", | 371 | width: "100", |
| ... | @@ -398,7 +375,6 @@ export default { | ... | @@ -398,7 +375,6 @@ export default { |
| 398 | disabled:true | 375 | disabled:true |
| 399 | }, | 376 | }, |
| 400 | { | 377 | { |
| 401 | - type: "", | ||
| 402 | name: "申报类型", | 378 | name: "申报类型", |
| 403 | value: "typeName", | 379 | value: "typeName", |
| 404 | width: "100", | 380 | width: "100", |
| ... | @@ -408,7 +384,6 @@ export default { | ... | @@ -408,7 +384,6 @@ export default { |
| 408 | disabled:true | 384 | disabled:true |
| 409 | }, | 385 | }, |
| 410 | { | 386 | { |
| 411 | - type: "", | ||
| 412 | name: "HandlingCode", | 387 | name: "HandlingCode", |
| 413 | value: "handingCode", | 388 | value: "handingCode", |
| 414 | width: "150", | 389 | width: "150", |
| ... | @@ -418,7 +393,6 @@ export default { | ... | @@ -418,7 +393,6 @@ export default { |
| 418 | disabled:true | 393 | disabled:true |
| 419 | }, | 394 | }, |
| 420 | { | 395 | { |
| 421 | - type: "", | ||
| 422 | name: "subcategory", | 396 | name: "subcategory", |
| 423 | value: "subCategory", | 397 | value: "subCategory", |
| 424 | width: "150", | 398 | width: "150", |
| ... | @@ -428,7 +402,6 @@ export default { | ... | @@ -428,7 +402,6 @@ export default { |
| 428 | disabled:true | 402 | disabled:true |
| 429 | }, | 403 | }, |
| 430 | { | 404 | { |
| 431 | - type: "", | ||
| 432 | name: "件数", | 405 | name: "件数", |
| 433 | value: "qty", | 406 | value: "qty", |
| 434 | width: "80", | 407 | width: "80", |
| ... | @@ -438,7 +411,6 @@ export default { | ... | @@ -438,7 +411,6 @@ export default { |
| 438 | disabled:true | 411 | disabled:true |
| 439 | }, | 412 | }, |
| 440 | { | 413 | { |
| 441 | - type: "", | ||
| 442 | name: "实际重量", | 414 | name: "实际重量", |
| 443 | value: "actualWeight", | 415 | value: "actualWeight", |
| 444 | width: "100", | 416 | width: "100", |
| ... | @@ -448,7 +420,6 @@ export default { | ... | @@ -448,7 +420,6 @@ export default { |
| 448 | disabled:true | 420 | disabled:true |
| 449 | }, | 421 | }, |
| 450 | { | 422 | { |
| 451 | - type: "", | ||
| 452 | name: "收件人国家代码", | 423 | name: "收件人国家代码", |
| 453 | value: "consigneeCountry", | 424 | value: "consigneeCountry", |
| 454 | width: "150", | 425 | width: "150", |
| ... | @@ -458,7 +429,6 @@ export default { | ... | @@ -458,7 +429,6 @@ export default { |
| 458 | disabled:true | 429 | disabled:true |
| 459 | }, | 430 | }, |
| 460 | { | 431 | { |
| 461 | - type: "", | ||
| 462 | name: "品名描述", | 432 | name: "品名描述", |
| 463 | value: "nameDescription", | 433 | value: "nameDescription", |
| 464 | width: "100", | 434 | width: "100", |
| ... | @@ -468,7 +438,6 @@ export default { | ... | @@ -468,7 +438,6 @@ export default { |
| 468 | disabled:true | 438 | disabled:true |
| 469 | }, | 439 | }, |
| 470 | { | 440 | { |
| 471 | - type: "", | ||
| 472 | name: "海关回执状态", | 441 | name: "海关回执状态", |
| 473 | value: "customsReceiptStatusName", | 442 | value: "customsReceiptStatusName", |
| 474 | width: "140", | 443 | width: "140", |
| ... | @@ -478,7 +447,6 @@ export default { | ... | @@ -478,7 +447,6 @@ export default { |
| 478 | disabled:true | 447 | disabled:true |
| 479 | }, | 448 | }, |
| 480 | { | 449 | { |
| 481 | - type: "", | ||
| 482 | name: "预审状态", | 450 | name: "预审状态", |
| 483 | value: "preQualificationStatus", | 451 | value: "preQualificationStatus", |
| 484 | width: "100", | 452 | width: "100", |
| ... | @@ -488,7 +456,6 @@ export default { | ... | @@ -488,7 +456,6 @@ export default { |
| 488 | disabled:true | 456 | disabled:true |
| 489 | }, | 457 | }, |
| 490 | { | 458 | { |
| 491 | - type: "", | ||
| 492 | name: "航班预审意见", | 459 | name: "航班预审意见", |
| 493 | value: "caPretrialOpinion", | 460 | value: "caPretrialOpinion", |
| 494 | width: "140", | 461 | width: "140", |
| ... | @@ -498,7 +465,6 @@ export default { | ... | @@ -498,7 +465,6 @@ export default { |
| 498 | disabled:true | 465 | disabled:true |
| 499 | }, | 466 | }, |
| 500 | { | 467 | { |
| 501 | - type: "", | ||
| 502 | name: "货物状态", | 468 | name: "货物状态", |
| 503 | value: "statusName", | 469 | value: "statusName", |
| 504 | width: "100", | 470 | width: "100", |
| ... | @@ -508,7 +474,6 @@ export default { | ... | @@ -508,7 +474,6 @@ export default { |
| 508 | disabled:true | 474 | disabled:true |
| 509 | }, | 475 | }, |
| 510 | { | 476 | { |
| 511 | - type: "", | ||
| 512 | name: "终配航班号", | 477 | name: "终配航班号", |
| 513 | value: "finalFlightNo", | 478 | value: "finalFlightNo", |
| 514 | width: "130", | 479 | width: "130", |
| ... | @@ -518,7 +483,6 @@ export default { | ... | @@ -518,7 +483,6 @@ export default { |
| 518 | disabled:true | 483 | disabled:true |
| 519 | }, | 484 | }, |
| 520 | { | 485 | { |
| 521 | - type: "", | ||
| 522 | name: "终配航班日期", | 486 | name: "终配航班日期", |
| 523 | value: "finalFlightTime", | 487 | value: "finalFlightTime", |
| 524 | width: "150", | 488 | width: "150", |
| ... | @@ -528,7 +492,6 @@ export default { | ... | @@ -528,7 +492,6 @@ export default { |
| 528 | disabled:true | 492 | disabled:true |
| 529 | }, | 493 | }, |
| 530 | { | 494 | { |
| 531 | - type: "", | ||
| 532 | name: "二配航班号", | 495 | name: "二配航班号", |
| 533 | value: "twoMatchFlightNo", | 496 | value: "twoMatchFlightNo", |
| 534 | width: "130", | 497 | width: "130", |
| ... | @@ -538,7 +501,6 @@ export default { | ... | @@ -538,7 +501,6 @@ export default { |
| 538 | disabled:true | 501 | disabled:true |
| 539 | }, | 502 | }, |
| 540 | { | 503 | { |
| 541 | - type: "", | ||
| 542 | name: "二配航班日期", | 504 | name: "二配航班日期", |
| 543 | value: "twoMatchFlightTime", | 505 | value: "twoMatchFlightTime", |
| 544 | width: "150", | 506 | width: "150", |
| ... | @@ -548,7 +510,6 @@ export default { | ... | @@ -548,7 +510,6 @@ export default { |
| 548 | disabled:true | 510 | disabled:true |
| 549 | }, | 511 | }, |
| 550 | { | 512 | { |
| 551 | - type: "", | ||
| 552 | name: "预配航班号", | 513 | name: "预配航班号", |
| 553 | value: "preplanFlightNo", | 514 | value: "preplanFlightNo", |
| 554 | width: "130", | 515 | width: "130", |
| ... | @@ -558,7 +519,6 @@ export default { | ... | @@ -558,7 +519,6 @@ export default { |
| 558 | disabled:true | 519 | disabled:true |
| 559 | }, | 520 | }, |
| 560 | { | 521 | { |
| 561 | - type: "", | ||
| 562 | name: "预配航班日期", | 522 | name: "预配航班日期", |
| 563 | value: "preplanFlightTime", | 523 | value: "preplanFlightTime", |
| 564 | width: "150", | 524 | width: "150", |
| ... | @@ -568,7 +528,6 @@ export default { | ... | @@ -568,7 +528,6 @@ export default { |
| 568 | disabled:true | 528 | disabled:true |
| 569 | }, | 529 | }, |
| 570 | { | 530 | { |
| 571 | - type: "", | ||
| 572 | name: "ACCS原航班号", | 531 | name: "ACCS原航班号", |
| 573 | value: "fltNoAccs", | 532 | value: "fltNoAccs", |
| 574 | width: "140", | 533 | width: "140", |
| ... | @@ -578,7 +537,6 @@ export default { | ... | @@ -578,7 +537,6 @@ export default { |
| 578 | disabled:true | 537 | disabled:true |
| 579 | }, | 538 | }, |
| 580 | { | 539 | { |
| 581 | - type: "", | ||
| 582 | name: "ACCS原航班日期", | 540 | name: "ACCS原航班日期", |
| 583 | value: "fltDateAccs", | 541 | value: "fltDateAccs", |
| 584 | width: "150", | 542 | width: "150", |
| ... | @@ -588,7 +546,6 @@ export default { | ... | @@ -588,7 +546,6 @@ export default { |
| 588 | disabled:true | 546 | disabled:true |
| 589 | }, | 547 | }, |
| 590 | { | 548 | { |
| 591 | - type: "", | ||
| 592 | name: "ACCS原航线", | 549 | name: "ACCS原航线", |
| 593 | value: "accsFlightRoute", | 550 | value: "accsFlightRoute", |
| 594 | width: "150", | 551 | width: "150", |
| ... | @@ -598,7 +555,6 @@ export default { | ... | @@ -598,7 +555,6 @@ export default { |
| 598 | disabled:true | 555 | disabled:true |
| 599 | }, | 556 | }, |
| 600 | { | 557 | { |
| 601 | - type: "", | ||
| 602 | name: "是否RDE手工录入", | 558 | name: "是否RDE手工录入", |
| 603 | value: "manualRde", | 559 | value: "manualRde", |
| 604 | width: "170", | 560 | width: "170", |
| ... | @@ -608,7 +564,6 @@ export default { | ... | @@ -608,7 +564,6 @@ export default { |
| 608 | disabled:true | 564 | disabled:true |
| 609 | }, | 565 | }, |
| 610 | { | 566 | { |
| 611 | - type: "", | ||
| 612 | name: "是否自动", | 567 | name: "是否自动", |
| 613 | value: "cargoRulesStatus", | 568 | value: "cargoRulesStatus", |
| 614 | width: "100", | 569 | width: "100", |
| ... | @@ -618,7 +573,6 @@ export default { | ... | @@ -618,7 +573,6 @@ export default { |
| 618 | disabled:true | 573 | disabled:true |
| 619 | }, | 574 | }, |
| 620 | { | 575 | { |
| 621 | - type: "", | ||
| 622 | name: "发件人账号", | 576 | name: "发件人账号", |
| 623 | value: "shipperAccount", | 577 | value: "shipperAccount", |
| 624 | width: "150", | 578 | width: "150", |
| ... | @@ -628,7 +582,6 @@ export default { | ... | @@ -628,7 +582,6 @@ export default { |
| 628 | disabled:true | 582 | disabled:true |
| 629 | }, | 583 | }, |
| 630 | { | 584 | { |
| 631 | - type: "", | ||
| 632 | name: "发件公司中文名称", | 585 | name: "发件公司中文名称", |
| 633 | value: "shipperCompany", | 586 | value: "shipperCompany", |
| 634 | width: "150", | 587 | width: "150", |
| ... | @@ -638,7 +591,6 @@ export default { | ... | @@ -638,7 +591,6 @@ export default { |
| 638 | disabled:true | 591 | disabled:true |
| 639 | }, | 592 | }, |
| 640 | { | 593 | { |
| 641 | - type: "", | ||
| 642 | name: "始发地城市名称", | 594 | name: "始发地城市名称", |
| 643 | value: "originCity", | 595 | value: "originCity", |
| 644 | width: "150", | 596 | width: "150", |
| ... | @@ -648,7 +600,6 @@ export default { | ... | @@ -648,7 +600,6 @@ export default { |
| 648 | disabled:true | 600 | disabled:true |
| 649 | }, | 601 | }, |
| 650 | { | 602 | { |
| 651 | - type: "", | ||
| 652 | name: "收件地", | 603 | name: "收件地", |
| 653 | value: "destinationSiteName", | 604 | value: "destinationSiteName", |
| 654 | width: "90", | 605 | width: "90", |
| ... | @@ -658,7 +609,6 @@ export default { | ... | @@ -658,7 +609,6 @@ export default { |
| 658 | disabled:true | 609 | disabled:true |
| 659 | }, | 610 | }, |
| 660 | { | 611 | { |
| 661 | - type: "", | ||
| 662 | name: "尺寸", | 612 | name: "尺寸", |
| 663 | value: "sizeStr", | 613 | value: "sizeStr", |
| 664 | width: "80", | 614 | width: "80", |
| ... | @@ -668,7 +618,6 @@ export default { | ... | @@ -668,7 +618,6 @@ export default { |
| 668 | disabled:true | 618 | disabled:true |
| 669 | }, | 619 | }, |
| 670 | { | 620 | { |
| 671 | - type: "", | ||
| 672 | name: "大货预审意见(是否可以配置航班)", | 621 | name: "大货预审意见(是否可以配置航班)", |
| 673 | value: "bigPretrialOpinion", | 622 | value: "bigPretrialOpinion", |
| 674 | width: "250", | 623 | width: "250", |
| ... | @@ -678,7 +627,6 @@ export default { | ... | @@ -678,7 +627,6 @@ export default { |
| 678 | disabled:true | 627 | disabled:true |
| 679 | }, | 628 | }, |
| 680 | { | 629 | { |
| 681 | - type: "", | ||
| 682 | name: "大货预审时间", | 630 | name: "大货预审时间", |
| 683 | value: "bigPretrialTime", | 631 | value: "bigPretrialTime", |
| 684 | width: "150", | 632 | width: "150", |
| ... | @@ -688,7 +636,6 @@ export default { | ... | @@ -688,7 +636,6 @@ export default { |
| 688 | disabled:true | 636 | disabled:true |
| 689 | }, | 637 | }, |
| 690 | { | 638 | { |
| 691 | - type: "", | ||
| 692 | name: "海关回执时间", | 639 | name: "海关回执时间", |
| 693 | value: "customsReceiptTime", | 640 | value: "customsReceiptTime", |
| 694 | width: "150", | 641 | width: "150", |
| ... | @@ -698,7 +645,6 @@ export default { | ... | @@ -698,7 +645,6 @@ export default { |
| 698 | disabled:true | 645 | disabled:true |
| 699 | }, | 646 | }, |
| 700 | { | 647 | { |
| 701 | - type: "", | ||
| 702 | name: "航班预审时间", | 648 | name: "航班预审时间", |
| 703 | value: "caPretrialTime", | 649 | value: "caPretrialTime", |
| 704 | width: "150", | 650 | width: "150", |
| ... | @@ -708,7 +654,6 @@ export default { | ... | @@ -708,7 +654,6 @@ export default { |
| 708 | disabled:true | 654 | disabled:true |
| 709 | }, | 655 | }, |
| 710 | { | 656 | { |
| 711 | - type: "", | ||
| 712 | name: "创建人", | 657 | name: "创建人", |
| 713 | value: "createUserName", | 658 | value: "createUserName", |
| 714 | width: "90", | 659 | width: "90", |
| ... | @@ -718,7 +663,6 @@ export default { | ... | @@ -718,7 +663,6 @@ export default { |
| 718 | disabled:true | 663 | disabled:true |
| 719 | }, | 664 | }, |
| 720 | { | 665 | { |
| 721 | - type: "", | ||
| 722 | name: "创建时间", | 666 | name: "创建时间", |
| 723 | value: "createTime", | 667 | value: "createTime", |
| 724 | width: "120", | 668 | width: "120", |
| ... | @@ -928,6 +872,10 @@ export default { | ... | @@ -928,6 +872,10 @@ export default { |
| 928 | item.index = index; | 872 | item.index = index; |
| 929 | }); | 873 | }); |
| 930 | }, | 874 | }, |
| 875 | + sizeChange(val){ | ||
| 876 | + this.limitSize = val | ||
| 877 | + this.select(0); | ||
| 878 | + }, | ||
| 931 | // 导出表格 | 879 | // 导出表格 |
| 932 | xlse(page) { | 880 | xlse(page) { |
| 933 | this.progress = 1; | 881 | this.progress = 1; | ... | ... |
| ... | @@ -19,24 +19,40 @@ | ... | @@ -19,24 +19,40 @@ |
| 19 | default-expand-all | 19 | default-expand-all |
| 20 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" | 20 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| 21 | > | 21 | > |
| 22 | - <el-table-column | 22 | + <template v-for="(item, index) in tableHeader"> |
| 23 | - v-for="(item, index) in tableHeader" | 23 | + <el-table-column |
| 24 | - :prop="item.value" | 24 | + v-if="item.value === 'menuType'" |
| 25 | - :label="item.name" | 25 | + :prop="item.value" |
| 26 | - :key="index" | 26 | + :label="item.name" |
| 27 | - :align="item.align" | 27 | + :key="index" |
| 28 | - header-align="center" | 28 | + :align="item.align" |
| 29 | - showOverflowTooltip | 29 | + header-align="center" |
| 30 | - :width="item.width" | 30 | + showOverflowTooltip |
| 31 | - :formatter="formatter" | 31 | + :width="item.width" |
| 32 | - > | 32 | + :formatter="formatter" |
| 33 | - <template slot-scope="scope"> | 33 | + > |
| 34 | - <el-tag v-if="item.value === 'menuType'" :type="scope.row.menuType === 'B'?'':'success'" | 34 | + <template slot-scope="scope"> |
| 35 | - disable-transitions>{{scope.row.menuType === 'B'?'按钮':'菜单'}}</el-tag> | 35 | + <el-tag |
| 36 | - <span v-else>{{scope.row.title}}</span> | 36 | + :type="scope.row.menuType === 'B' ? '' : 'success'" |
| 37 | - </template> | 37 | + disable-transitions |
| 38 | - </el-table-column> | 38 | + >{{ scope.row.menuType === "B" ? "按钮" : "菜单" }}</el-tag |
| 39 | - | 39 | + > |
| 40 | + </template> | ||
| 41 | + </el-table-column> | ||
| 42 | + <el-table-column | ||
| 43 | + v-else | ||
| 44 | + :prop="item.value" | ||
| 45 | + :label="item.name" | ||
| 46 | + :key="index" | ||
| 47 | + :align="item.align" | ||
| 48 | + header-align="center" | ||
| 49 | + showOverflowTooltip | ||
| 50 | + :width="item.width" | ||
| 51 | + :formatter="formatter" | ||
| 52 | + > | ||
| 53 | + </el-table-column> | ||
| 54 | + </template> | ||
| 55 | + | ||
| 40 | <el-table-column | 56 | <el-table-column |
| 41 | header-align="center" | 57 | header-align="center" |
| 42 | align="center" | 58 | align="center" |
| ... | @@ -112,7 +128,7 @@ import dictLabels from "@/assets/languages/dictLabels.js"; | ... | @@ -112,7 +128,7 @@ import dictLabels from "@/assets/languages/dictLabels.js"; |
| 112 | import Drawer from "./drawer.vue"; | 128 | import Drawer from "./drawer.vue"; |
| 113 | import { MessageBox } from "element-ui"; | 129 | import { MessageBox } from "element-ui"; |
| 114 | export default { | 130 | export default { |
| 115 | - name:"MenuConfig", | 131 | + name: "MenuConfig", |
| 116 | components: { | 132 | components: { |
| 117 | Drawer, | 133 | Drawer, |
| 118 | }, | 134 | }, |
| ... | @@ -120,13 +136,12 @@ export default { | ... | @@ -120,13 +136,12 @@ export default { |
| 120 | return { | 136 | return { |
| 121 | drawer: false, | 137 | drawer: false, |
| 122 | menuFormDisabled: false, | 138 | menuFormDisabled: false, |
| 123 | - loading:false, | 139 | + loading: false, |
| 124 | drawerTitle: "", | 140 | drawerTitle: "", |
| 125 | menuData: {}, | 141 | menuData: {}, |
| 126 | data: [], | 142 | data: [], |
| 127 | tableHeader: [ | 143 | tableHeader: [ |
| 128 | { | 144 | { |
| 129 | - type: "", | ||
| 130 | name: "菜单名", | 145 | name: "菜单名", |
| 131 | value: "title", | 146 | value: "title", |
| 132 | width: "200", | 147 | width: "200", |
| ... | @@ -134,7 +149,6 @@ export default { | ... | @@ -134,7 +149,6 @@ export default { |
| 134 | sorTable: false, | 149 | sorTable: false, |
| 135 | }, | 150 | }, |
| 136 | { | 151 | { |
| 137 | - type: "", | ||
| 138 | name: "菜单类型", | 152 | name: "菜单类型", |
| 139 | value: "menuType", | 153 | value: "menuType", |
| 140 | width: "100", | 154 | width: "100", |
| ... | @@ -142,7 +156,6 @@ export default { | ... | @@ -142,7 +156,6 @@ export default { |
| 142 | sortable: false, | 156 | sortable: false, |
| 143 | }, | 157 | }, |
| 144 | { | 158 | { |
| 145 | - type: "", | ||
| 146 | name: "权限标识", | 159 | name: "权限标识", |
| 147 | value: "permissionKey", | 160 | value: "permissionKey", |
| 148 | width: "auto", | 161 | width: "auto", |
| ... | @@ -150,7 +163,6 @@ export default { | ... | @@ -150,7 +163,6 @@ export default { |
| 150 | sortable: false, | 163 | sortable: false, |
| 151 | }, | 164 | }, |
| 152 | { | 165 | { |
| 153 | - type: "", | ||
| 154 | name: "菜单状态", | 166 | name: "菜单状态", |
| 155 | value: "status", | 167 | value: "status", |
| 156 | width: "100", | 168 | width: "100", |
| ... | @@ -158,7 +170,6 @@ export default { | ... | @@ -158,7 +170,6 @@ export default { |
| 158 | sorTable: false, | 170 | sorTable: false, |
| 159 | }, | 171 | }, |
| 160 | { | 172 | { |
| 161 | - type: "", | ||
| 162 | name: "菜单路由", | 173 | name: "菜单路由", |
| 163 | value: "path", | 174 | value: "path", |
| 164 | width: "auto", | 175 | width: "auto", |
| ... | @@ -169,15 +180,15 @@ export default { | ... | @@ -169,15 +180,15 @@ export default { |
| 169 | }; | 180 | }; |
| 170 | }, | 181 | }, |
| 171 | created() { | 182 | created() { |
| 172 | - if(this.$store.state.tagsView.cachedViews.length == 0){ | 183 | + if (this.$store.state.tagsView.cachedViews.length == 0) { |
| 173 | this.menuAll(); | 184 | this.menuAll(); |
| 174 | } | 185 | } |
| 175 | }, | 186 | }, |
| 176 | - activated(){ | 187 | + activated() { |
| 177 | this.menuAll(); | 188 | this.menuAll(); |
| 178 | }, | 189 | }, |
| 179 | - deactivated(){ | 190 | + deactivated() { |
| 180 | - this.data = [] | 191 | + this.data = []; |
| 181 | }, | 192 | }, |
| 182 | methods: { | 193 | methods: { |
| 183 | addMenu() { | 194 | addMenu() { |
| ... | @@ -202,24 +213,26 @@ export default { | ... | @@ -202,24 +213,26 @@ export default { |
| 202 | //表格数据 | 213 | //表格数据 |
| 203 | menuAll() { | 214 | menuAll() { |
| 204 | this.loading = true; | 215 | this.loading = true; |
| 205 | - getAllAuth().then((res) => { | 216 | + getAllAuth() |
| 206 | - this.loading = false; | 217 | + .then((res) => { |
| 207 | - if (res.code === 200) { | 218 | + this.loading = false; |
| 208 | - res.data.length > 0 | 219 | + if (res.code === 200) { |
| 209 | - ? (this.data = res.data) | 220 | + res.data.length > 0 |
| 210 | - : this.$message({ | 221 | + ? (this.data = res.data) |
| 211 | - message: "数据为空", | 222 | + : this.$message({ |
| 212 | - type: "warning", | 223 | + message: "数据为空", |
| 213 | - }); | 224 | + type: "warning", |
| 214 | - } else { | 225 | + }); |
| 215 | - this.$message({ | 226 | + } else { |
| 216 | - message: res.msg, | 227 | + this.$message({ |
| 217 | - type: "warning", | 228 | + message: res.msg, |
| 218 | - }); | 229 | + type: "warning", |
| 219 | - } | 230 | + }); |
| 220 | - }).catch(()=>{ | 231 | + } |
| 221 | - this.loading = false; | 232 | + }) |
| 222 | - }); | 233 | + .catch(() => { |
| 234 | + this.loading = false; | ||
| 235 | + }); | ||
| 223 | }, | 236 | }, |
| 224 | 237 | ||
| 225 | //菜单状态改变 | 238 | //菜单状态改变 |
| ... | @@ -232,7 +245,7 @@ export default { | ... | @@ -232,7 +245,7 @@ export default { |
| 232 | message: "操作成功", | 245 | message: "操作成功", |
| 233 | type: "success", | 246 | type: "success", |
| 234 | }); | 247 | }); |
| 235 | - location.reload() | 248 | + location.reload(); |
| 236 | } else { | 249 | } else { |
| 237 | this.$message({ | 250 | this.$message({ |
| 238 | message: res.msg, | 251 | message: res.msg, |
| ... | @@ -280,11 +293,11 @@ export default { | ... | @@ -280,11 +293,11 @@ export default { |
| 280 | }) | 293 | }) |
| 281 | .catch(() => {}); | 294 | .catch(() => {}); |
| 282 | }, | 295 | }, |
| 283 | - | 296 | + |
| 284 | formatter(row, column, cellValue, index) { | 297 | formatter(row, column, cellValue, index) { |
| 285 | - if (dictLabels[column.property]) { | 298 | + if (dictLabels["menu"][column.property]) { |
| 286 | - if (dictLabels[column.property][cellValue]) { | 299 | + if (dictLabels["menu"][column.property][cellValue]) { |
| 287 | - return dictLabels[column.property][cellValue]; | 300 | + return dictLabels["menu"][column.property][cellValue]; |
| 288 | } | 301 | } |
| 289 | } | 302 | } |
| 290 | return cellValue; | 303 | return cellValue; | ... | ... |
| ... | @@ -65,7 +65,6 @@ | ... | @@ -65,7 +65,6 @@ |
| 65 | :props="defaultProps" | 65 | :props="defaultProps" |
| 66 | :show-checkbox="true" | 66 | :show-checkbox="true" |
| 67 | :default-checked-keys="roleData.menuIds" | 67 | :default-checked-keys="roleData.menuIds" |
| 68 | - check-strictly | ||
| 69 | accordion | 68 | accordion |
| 70 | > | 69 | > |
| 71 | </el-tree> | 70 | </el-tree> |
| ... | @@ -138,7 +137,7 @@ export default { | ... | @@ -138,7 +137,7 @@ export default { |
| 138 | getAllAuth() | 137 | getAllAuth() |
| 139 | .then((res) => { | 138 | .then((res) => { |
| 140 | if (res.code === 200) { | 139 | if (res.code === 200) { |
| 141 | - this.treeData = res.data; | 140 | + this.treeData = this.treeDataInfo(res.data); |
| 142 | } else { | 141 | } else { |
| 143 | this.$message({ | 142 | this.$message({ |
| 144 | message: res.msg, | 143 | message: res.msg, |
| ... | @@ -150,22 +149,22 @@ export default { | ... | @@ -150,22 +149,22 @@ export default { |
| 150 | console.log(err); | 149 | console.log(err); |
| 151 | }); | 150 | }); |
| 152 | }, | 151 | }, |
| 153 | - watch:{ | 152 | + watch: { |
| 154 | - roleFormDisabled(){ | 153 | + roleFormDisabled() { |
| 155 | - this.treeData = this.treeDisabled(this.treeData) | 154 | + this.treeData = this.treeDisabled(this.treeData); |
| 156 | }, | 155 | }, |
| 157 | - drawer(val,oldVal){ | 156 | + drawer(val, oldVal) { |
| 158 | - if(val){ | 157 | + if (val) { |
| 159 | this.roleForm = this.roleData; | 158 | this.roleForm = this.roleData; |
| 160 | - }else{ | 159 | + } else { |
| 161 | this.loading = false; | 160 | this.loading = false; |
| 162 | - } | 161 | + } |
| 163 | - } | 162 | + }, |
| 164 | }, | 163 | }, |
| 165 | methods: { | 164 | methods: { |
| 166 | //关闭 | 165 | //关闭 |
| 167 | handleClose() { | 166 | handleClose() { |
| 168 | - this.$refs['roleForm'].clearValidate(); | 167 | + this.$refs["roleForm"].clearValidate(); |
| 169 | this.$emit("handleClose", false); | 168 | this.$emit("handleClose", false); |
| 170 | }, | 169 | }, |
| 171 | 170 | ||
| ... | @@ -173,7 +172,11 @@ export default { | ... | @@ -173,7 +172,11 @@ export default { |
| 173 | submit() { | 172 | submit() { |
| 174 | let formData = {}; | 173 | let formData = {}; |
| 175 | this.loading = true; | 174 | this.loading = true; |
| 176 | - formData.menuIdList = this.$refs.tree.getCheckedKeys(); | 175 | + let arr = []; |
| 176 | + arr = this.$refs.tree.getCheckedKeys().filter((item,index)=>{ | ||
| 177 | + return this.$refs.tree.getCheckedKeys().indexOf(item) == index | ||
| 178 | + }) | ||
| 179 | + formData.menuIdList = arr; | ||
| 177 | this.roleData ? (formData.id = this.roleData.id) : ""; | 180 | this.roleData ? (formData.id = this.roleData.id) : ""; |
| 178 | formData.remark = this.roleForm.remark; | 181 | formData.remark = this.roleForm.remark; |
| 179 | formData.valid = this.roleForm.valid; | 182 | formData.valid = this.roleForm.valid; |
| ... | @@ -204,9 +207,24 @@ export default { | ... | @@ -204,9 +207,24 @@ export default { |
| 204 | let data = []; | 207 | let data = []; |
| 205 | val.forEach((item) => { | 208 | val.forEach((item) => { |
| 206 | item.disabled = this.roleFormDisabled; | 209 | item.disabled = this.roleFormDisabled; |
| 207 | - data.push(item) | 210 | + data.push(item); |
| 211 | + if (item.children && item.children.length) { | ||
| 212 | + item.children = this.treeDisabled(item.children); | ||
| 213 | + } | ||
| 214 | + }); | ||
| 215 | + return data; | ||
| 216 | + }, | ||
| 217 | + | ||
| 218 | + treeDataInfo(val) { | ||
| 219 | + let data = []; | ||
| 220 | + val.forEach((item) => { | ||
| 221 | + let menuItem = {}; | ||
| 222 | + menuItem.id = item.id; | ||
| 223 | + menuItem.title = item.title; | ||
| 224 | + data.push(menuItem) | ||
| 208 | if (item.children && item.children.length) { | 225 | if (item.children && item.children.length) { |
| 209 | - item.children = this.treeDisabled(item.children) | 226 | + menuItem.children = this.treeDataInfo(item.children); |
| 227 | + menuItem.children.unshift({id:item.id,title:`${item.title}(菜单)`}) | ||
| 210 | } | 228 | } |
| 211 | }); | 229 | }); |
| 212 | return data; | 230 | return data; | ... | ... |
| ... | @@ -28,8 +28,8 @@ | ... | @@ -28,8 +28,8 @@ |
| 28 | <el-col :span="6"> | 28 | <el-col :span="6"> |
| 29 | <el-form-item label="状态"> | 29 | <el-form-item label="状态"> |
| 30 | <el-select v-model="formData.valid" placeholder="角色状态" clearable> | 30 | <el-select v-model="formData.valid" placeholder="角色状态" clearable> |
| 31 | - <el-option label="开启" value="1"> </el-option> | 31 | + <el-option label="启用" value="1"> </el-option> |
| 32 | - <el-option label="关闭" value="2"> </el-option> | 32 | + <el-option label="停用" value="2"> </el-option> |
| 33 | </el-select> | 33 | </el-select> |
| 34 | </el-form-item> | 34 | </el-form-item> |
| 35 | </el-col> | 35 | </el-col> |
| ... | @@ -49,19 +49,21 @@ | ... | @@ -49,19 +49,21 @@ |
| 49 | > | 49 | > |
| 50 | </div> | 50 | </div> |
| 51 | <Tables | 51 | <Tables |
| 52 | + ductName="role" | ||
| 52 | :data="data" | 53 | :data="data" |
| 53 | :headerData="tableHeader" | 54 | :headerData="tableHeader" |
| 54 | :infoData="tableHeader" | 55 | :infoData="tableHeader" |
| 55 | :totalCount="total" | 56 | :totalCount="total" |
| 56 | :limitSize="formData.size" | 57 | :limitSize="formData.size" |
| 57 | :page="formData.page" | 58 | :page="formData.page" |
| 59 | + :infoShow="false" | ||
| 58 | :pageSizes="[20,30,40,50]" | 60 | :pageSizes="[20,30,40,50]" |
| 59 | :loading="tableLoading" | 61 | :loading="tableLoading" |
| 60 | height="600" | 62 | height="600" |
| 61 | @sizeChange="sizeChange" | 63 | @sizeChange="sizeChange" |
| 62 | @currentChange="currentChange" | 64 | @currentChange="currentChange" |
| 63 | > | 65 | > |
| 64 | - <template> | 66 | + <template slot="optionColumn"> |
| 65 | <el-table-column header-align="center" align="center" label="操作"> | 67 | <el-table-column header-align="center" align="center" label="操作"> |
| 66 | <template slot-scope="scope"> | 68 | <template slot-scope="scope"> |
| 67 | <el-button type="primary" size="mini" @click="buttonClick(scope, 0)" | 69 | <el-button type="primary" size="mini" @click="buttonClick(scope, 0)" |
| ... | @@ -120,16 +122,6 @@ export default { | ... | @@ -120,16 +122,6 @@ export default { |
| 120 | data: [], //表格数据 | 122 | data: [], //表格数据 |
| 121 | tableHeader: [ | 123 | tableHeader: [ |
| 122 | { | 124 | { |
| 123 | - type: "index", | ||
| 124 | - name: "", | ||
| 125 | - value: "", | ||
| 126 | - width: "", | ||
| 127 | - align: "center", | ||
| 128 | - sorTable: false, | ||
| 129 | - disabled:true | ||
| 130 | - }, | ||
| 131 | - { | ||
| 132 | - type: "", | ||
| 133 | name: "角色名称", | 125 | name: "角色名称", |
| 134 | value: "name", | 126 | value: "name", |
| 135 | width: "150px", | 127 | width: "150px", |
| ... | @@ -138,7 +130,6 @@ export default { | ... | @@ -138,7 +130,6 @@ export default { |
| 138 | disabled:true | 130 | disabled:true |
| 139 | }, | 131 | }, |
| 140 | { | 132 | { |
| 141 | - type: "", | ||
| 142 | name: "角色状态", | 133 | name: "角色状态", |
| 143 | value: "valid", | 134 | value: "valid", |
| 144 | width: "150px", | 135 | width: "150px", |
| ... | @@ -147,7 +138,6 @@ export default { | ... | @@ -147,7 +138,6 @@ export default { |
| 147 | disabled:true | 138 | disabled:true |
| 148 | }, | 139 | }, |
| 149 | { | 140 | { |
| 150 | - type: "", | ||
| 151 | name: "创建人", | 141 | name: "创建人", |
| 152 | value: "createUserName", | 142 | value: "createUserName", |
| 153 | width: "150px", | 143 | width: "150px", |
| ... | @@ -156,7 +146,6 @@ export default { | ... | @@ -156,7 +146,6 @@ export default { |
| 156 | disabled:true | 146 | disabled:true |
| 157 | }, | 147 | }, |
| 158 | { | 148 | { |
| 159 | - type: "", | ||
| 160 | name: "创建时间", | 149 | name: "创建时间", |
| 161 | value: "createTime", | 150 | value: "createTime", |
| 162 | width: "150px", | 151 | width: "150px", |
| ... | @@ -165,7 +154,6 @@ export default { | ... | @@ -165,7 +154,6 @@ export default { |
| 165 | disabled:true | 154 | disabled:true |
| 166 | }, | 155 | }, |
| 167 | { | 156 | { |
| 168 | - type: "", | ||
| 169 | name: "修改时间", | 157 | name: "修改时间", |
| 170 | value: "updateTime", | 158 | value: "updateTime", |
| 171 | width: "150px", | 159 | width: "150px", |
| ... | @@ -174,7 +162,6 @@ export default { | ... | @@ -174,7 +162,6 @@ export default { |
| 174 | disabled:true | 162 | disabled:true |
| 175 | }, | 163 | }, |
| 176 | { | 164 | { |
| 177 | - type: "", | ||
| 178 | name: "备注", | 165 | name: "备注", |
| 179 | value: "remark", | 166 | value: "remark", |
| 180 | width: "400px", | 167 | width: "400px", | ... | ... |
| ... | @@ -23,8 +23,8 @@ | ... | @@ -23,8 +23,8 @@ |
| 23 | <el-col :span="6"> | 23 | <el-col :span="6"> |
| 24 | <el-form-item label="状态"> | 24 | <el-form-item label="状态"> |
| 25 | <el-select placeholder="用户状态" v-model="formData.isValid" clearable> | 25 | <el-select placeholder="用户状态" v-model="formData.isValid" clearable> |
| 26 | - <el-option label="开启" value="1"> </el-option> | 26 | + <el-option label="启用" value="1"> </el-option> |
| 27 | - <el-option label="关闭" value="2"> </el-option> | 27 | + <el-option label="停用" value="2"> </el-option> |
| 28 | </el-select> | 28 | </el-select> |
| 29 | </el-form-item> | 29 | </el-form-item> |
| 30 | </el-col> | 30 | </el-col> |
| ... | @@ -44,18 +44,20 @@ | ... | @@ -44,18 +44,20 @@ |
| 44 | > | 44 | > |
| 45 | </div> | 45 | </div> |
| 46 | <Tables | 46 | <Tables |
| 47 | + ductName="user" | ||
| 47 | :data="data" | 48 | :data="data" |
| 48 | :headerData="tableHeader" | 49 | :headerData="tableHeader" |
| 49 | :limitSize="formData.size" | 50 | :limitSize="formData.size" |
| 50 | :totalCount="total" | 51 | :totalCount="total" |
| 51 | :loading="loading" | 52 | :loading="loading" |
| 52 | :page="formData.page" | 53 | :page="formData.page" |
| 54 | + :infoShow="false" | ||
| 53 | :pageSizes="[20,30,40,50]" | 55 | :pageSizes="[20,30,40,50]" |
| 54 | height="600" | 56 | height="600" |
| 55 | @sizeChange="sizeChange" | 57 | @sizeChange="sizeChange" |
| 56 | @currentChange="currentChange" | 58 | @currentChange="currentChange" |
| 57 | > | 59 | > |
| 58 | - <template> | 60 | + <template slot="optionColumn"> |
| 59 | <el-table-column | 61 | <el-table-column |
| 60 | header-align="center" | 62 | header-align="center" |
| 61 | align="center" | 63 | align="center" |
| ... | @@ -147,16 +149,6 @@ export default { | ... | @@ -147,16 +149,6 @@ export default { |
| 147 | }, //查询条件 | 149 | }, //查询条件 |
| 148 | tableHeader: [ | 150 | tableHeader: [ |
| 149 | { | 151 | { |
| 150 | - type: "index", | ||
| 151 | - name: "", | ||
| 152 | - value: "", | ||
| 153 | - width: "", | ||
| 154 | - align: "center", | ||
| 155 | - sorTable: false, | ||
| 156 | - disabled:true | ||
| 157 | - }, | ||
| 158 | - { | ||
| 159 | - type: "", | ||
| 160 | name: "员工号", | 152 | name: "员工号", |
| 161 | value: "loginName", | 153 | value: "loginName", |
| 162 | width: "150px", | 154 | width: "150px", |
| ... | @@ -165,7 +157,6 @@ export default { | ... | @@ -165,7 +157,6 @@ export default { |
| 165 | disabled:true | 157 | disabled:true |
| 166 | }, | 158 | }, |
| 167 | { | 159 | { |
| 168 | - type: "", | ||
| 169 | name: "用户姓名", | 160 | name: "用户姓名", |
| 170 | value: "username", | 161 | value: "username", |
| 171 | width: "150px", | 162 | width: "150px", |
| ... | @@ -174,7 +165,6 @@ export default { | ... | @@ -174,7 +165,6 @@ export default { |
| 174 | disabled:true | 165 | disabled:true |
| 175 | }, | 166 | }, |
| 176 | { | 167 | { |
| 177 | - type: "", | ||
| 178 | name: "所属口岸", | 168 | name: "所属口岸", |
| 179 | value: "portName", | 169 | value: "portName", |
| 180 | width: "150px", | 170 | width: "150px", |
| ... | @@ -183,7 +173,6 @@ export default { | ... | @@ -183,7 +173,6 @@ export default { |
| 183 | disabled:true | 173 | disabled:true |
| 184 | }, | 174 | }, |
| 185 | { | 175 | { |
| 186 | - type: "", | ||
| 187 | name: "所属角色", | 176 | name: "所属角色", |
| 188 | value: "roleNames", | 177 | value: "roleNames", |
| 189 | width: "150px", | 178 | width: "150px", |
| ... | @@ -192,7 +181,6 @@ export default { | ... | @@ -192,7 +181,6 @@ export default { |
| 192 | disabled:true | 181 | disabled:true |
| 193 | }, | 182 | }, |
| 194 | { | 183 | { |
| 195 | - type: "", | ||
| 196 | name: "电子邮箱", | 184 | name: "电子邮箱", |
| 197 | value: "email", | 185 | value: "email", |
| 198 | width: "150px", | 186 | width: "150px", |
| ... | @@ -201,16 +189,14 @@ export default { | ... | @@ -201,16 +189,14 @@ export default { |
| 201 | disabled:true | 189 | disabled:true |
| 202 | }, | 190 | }, |
| 203 | { | 191 | { |
| 204 | - type: "", | ||
| 205 | name: "用户状态", | 192 | name: "用户状态", |
| 206 | value: "isValid", | 193 | value: "isValid", |
| 207 | width: "100px", | 194 | width: "100px", |
| 208 | align: "center", | 195 | align: "center", |
| 209 | sorTable: false, | 196 | sorTable: false, |
| 210 | - disabled:true | 197 | + disabled:true, |
| 211 | }, | 198 | }, |
| 212 | { | 199 | { |
| 213 | - type: "", | ||
| 214 | name: "修改时间", | 200 | name: "修改时间", |
| 215 | value: "updateTime", | 201 | value: "updateTime", |
| 216 | width: "150px", | 202 | width: "150px", |
| ... | @@ -219,7 +205,6 @@ export default { | ... | @@ -219,7 +205,6 @@ export default { |
| 219 | disabled:true | 205 | disabled:true |
| 220 | }, | 206 | }, |
| 221 | { | 207 | { |
| 222 | - type: "", | ||
| 223 | name: "备注", | 208 | name: "备注", |
| 224 | value: "remark", | 209 | value: "remark", |
| 225 | width: "150px", | 210 | width: "150px", | ... | ... |
-
Please register or login to post a comment