Showing
31 changed files
with
3 additions
and
2200 deletions
src/api/et86.js
deleted
100644 → 0
| 1 | -import request from "@/utils/request"; | ||
| 2 | - | ||
| 3 | -// ET86查询 | ||
| 4 | -/** | ||
| 5 | - * @param createTimeStart; 开始时间 | ||
| 6 | - * @param createTimeEnd; 结束时间 | ||
| 7 | - * @param status; 1-有效 0-无效 不传查全部 | ||
| 8 | - */ | ||
| 9 | -export function findAllEtesRules(data) { | ||
| 10 | - return request({ | ||
| 11 | - url: "/etes/findAllEtesRules", | ||
| 12 | - method: "post", | ||
| 13 | - data: data, | ||
| 14 | - }); | ||
| 15 | -} | ||
| 16 | - | ||
| 17 | -// ET86新增 | ||
| 18 | -export function add(data) { | ||
| 19 | - return request({ | ||
| 20 | - url: "/etes/add", | ||
| 21 | - method: "post", | ||
| 22 | - data: data, | ||
| 23 | - }); | ||
| 24 | -} | ||
| 25 | - | ||
| 26 | -// ET86详情 | ||
| 27 | -export function findEtesRuleById(data) { | ||
| 28 | - return request({ | ||
| 29 | - url: "/etes/findEtesRuleById", | ||
| 30 | - method: "post", | ||
| 31 | - data: data, | ||
| 32 | - }); | ||
| 33 | -} | ||
| 34 | - | ||
| 35 | -// ET86编辑 | ||
| 36 | -export function update(data) { | ||
| 37 | - return request({ | ||
| 38 | - url: "/etes/update", | ||
| 39 | - method: "post", | ||
| 40 | - data: data, | ||
| 41 | - }); | ||
| 42 | -} | ||
| 43 | - | ||
| 44 | -// ET86删除 | ||
| 45 | -export function deleteEtesRuleById(data) { | ||
| 46 | - return request({ | ||
| 47 | - url: "/etes/deleteEtesRuleById", | ||
| 48 | - method: "post", | ||
| 49 | - data: data, | ||
| 50 | - }); | ||
| 51 | -} |
src/api/et86HsCodeBlack.js
deleted
100644 → 0
| 1 | -import request from "@/utils/request"; | ||
| 2 | - | ||
| 3 | -// HScode黑名单查询 | ||
| 4 | -export function findHsCodeList(data) { | ||
| 5 | - return request({ | ||
| 6 | - url: "/etes/findHsCodeList", | ||
| 7 | - method: "post", | ||
| 8 | - data: data, | ||
| 9 | - }); | ||
| 10 | -} | ||
| 11 | - | ||
| 12 | -// HScode黑名单删除 | ||
| 13 | -export function delBlackList(data) { | ||
| 14 | - return request({ | ||
| 15 | - url: "/etes/delBlackList", | ||
| 16 | - method: "post", | ||
| 17 | - data: data, | ||
| 18 | - }); | ||
| 19 | -} | ||
| 20 | - | ||
| 21 | -// HScode黑名单下载模板 | ||
| 22 | -export function downLoadTemplate(template) { | ||
| 23 | - return request({ | ||
| 24 | - url: "/etes/downLoadTemplate?template=" + template, | ||
| 25 | - method: "get", | ||
| 26 | - responseType: "blob", | ||
| 27 | - }); | ||
| 28 | -} | ||
| 29 | - | ||
| 30 | -// HScode黑名单导入 | ||
| 31 | -export function uploadHsCode(data) { | ||
| 32 | - return request({ | ||
| 33 | - url: "/etes/uploadHsCode", | ||
| 34 | - method: "post", | ||
| 35 | - data: data, | ||
| 36 | - }); | ||
| 37 | -} | ||
| 38 | - |
src/api/et86ShipmentDesc.js
deleted
100644 → 0
| 1 | -import request from "@/utils/request"; | ||
| 2 | - | ||
| 3 | -// HScode英文品名黑名单查询 | ||
| 4 | -export function findShipmentDescList(data) { | ||
| 5 | - return request({ | ||
| 6 | - url: "/etes/findShipmentDescList", | ||
| 7 | - method: "post", | ||
| 8 | - data: data, | ||
| 9 | - }); | ||
| 10 | -} | ||
| 11 | - | ||
| 12 | -// HScode英文品名黑名单导入 | ||
| 13 | -export function uploadShipmentDesc(data) { | ||
| 14 | - return request({ | ||
| 15 | - url: "/etes/uploadShipmentDesc", | ||
| 16 | - method: "post", | ||
| 17 | - data: data, | ||
| 18 | - }); | ||
| 19 | -} | ||
| 20 | - | ||
| 21 | -// HScode黑名单/英文品名删除 | ||
| 22 | -export function delBlackList(data) { | ||
| 23 | - return request({ | ||
| 24 | - url: "/etes/delBlackList ", | ||
| 25 | - method: "post", | ||
| 26 | - data: data, | ||
| 27 | - }); | ||
| 28 | -} | ||
| 29 | - | ||
| 30 | - |
| ... | @@ -205,14 +205,3 @@ export function checkFlightRoute(data) { | ... | @@ -205,14 +205,3 @@ export function checkFlightRoute(data) { |
| 205 | }) | 205 | }) |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | -//更新航线 | ||
| 209 | -/** | ||
| 210 | - * @param id * | ||
| 211 | - */ | ||
| 212 | -export function updateRoute(id) { | ||
| 213 | - return request({ | ||
| 214 | - url: `/dictionary/updateRoute/${id}`, | ||
| 215 | - method: "post", | ||
| 216 | - data: {}, | ||
| 217 | - }); | ||
| 218 | -} | ... | ... |
src/components/YlForm/index.vue
deleted
100644 → 0
This diff is collapsed. Click to expand it.
src/components/YlInput/index.vue
deleted
100644 → 0
| 1 | -<template> | ||
| 2 | - <el-input | ||
| 3 | - v-bind="$attrs" | ||
| 4 | - clearable | ||
| 5 | - @input="handleInput" | ||
| 6 | - @focus="handleFocus" | ||
| 7 | - @blur="handleBlur" | ||
| 8 | - @change="handleChange" | ||
| 9 | - class="yl-input" | ||
| 10 | - ></el-input> | ||
| 11 | -</template> | ||
| 12 | - | ||
| 13 | -<script> | ||
| 14 | -export default { | ||
| 15 | - props: { | ||
| 16 | - rules: { | ||
| 17 | - type: Array, | ||
| 18 | - default: () => [], | ||
| 19 | - }, | ||
| 20 | - }, | ||
| 21 | - data() { | ||
| 22 | - return {}; | ||
| 23 | - }, | ||
| 24 | - computed: {}, | ||
| 25 | - created() {}, | ||
| 26 | - mounted() {}, | ||
| 27 | - methods: { | ||
| 28 | - handleInput(event) { | ||
| 29 | - // v-bind="$attrs" v-on="$listeners" | ||
| 30 | - this.$emit("input", event); | ||
| 31 | - }, | ||
| 32 | - handleFocus(event) { | ||
| 33 | - this.$emit("focus", event); | ||
| 34 | - }, | ||
| 35 | - handleBlur(event) { | ||
| 36 | - this.$emit("blur", event); | ||
| 37 | - }, | ||
| 38 | - handleChange(event) { | ||
| 39 | - this.$emit("change", event); | ||
| 40 | - }, | ||
| 41 | - }, | ||
| 42 | -}; | ||
| 43 | -</script> | ||
| 44 | -<style lang='scss'> | ||
| 45 | - | ||
| 46 | -</style> |
src/components/YlTable/column.vue
deleted
100644 → 0
| 1 | -<script> | ||
| 2 | -/** | ||
| 3 | - * 动态渲染 el-table-column | ||
| 4 | - */ | ||
| 5 | -export default { | ||
| 6 | - name: 'column', | ||
| 7 | - props: { | ||
| 8 | - attrs: { | ||
| 9 | - type: Object, | ||
| 10 | - default: () => ({}), | ||
| 11 | - required: true | ||
| 12 | - } | ||
| 13 | - }, | ||
| 14 | - render: function(h) { | ||
| 15 | - let attrs = this.attrs; | ||
| 16 | - let scopedSlots = {}; | ||
| 17 | - if (attrs.render) { | ||
| 18 | - scopedSlots.default = scope => attrs.render(h, scope); | ||
| 19 | - } | ||
| 20 | - return h('el-table-column', { | ||
| 21 | - attrs, | ||
| 22 | - scopedSlots | ||
| 23 | - }); | ||
| 24 | - } | ||
| 25 | -}; | ||
| 26 | -</script> |
src/components/YlTable/index.vue
deleted
100644 → 0
| 1 | - <template> | ||
| 2 | - <div class="table-container"> | ||
| 3 | - <el-row | ||
| 4 | - v-if="attrs.btnCofig.isBtn" | ||
| 5 | - style="margin-bottom: 15px" | ||
| 6 | - id="group-btn" | ||
| 7 | - > | ||
| 8 | - <el-col> | ||
| 9 | - <span | ||
| 10 | - v-for="(item, i) in attrs.btnCofig.btnGroup" | ||
| 11 | - :key="item.btnName" | ||
| 12 | - :class="i == 0 ? 'first-span' : 'span'" | ||
| 13 | - > | ||
| 14 | - <el-button | ||
| 15 | - :type="item.type" | ||
| 16 | - :icon="item.icon" | ||
| 17 | - :round="item.round" | ||
| 18 | - :size="item.size" | ||
| 19 | - :loading="item.loading" | ||
| 20 | - @click="handleClick(item, i)" | ||
| 21 | - v-if="item.btnName !== '导入' && item.btnName !== '增加'" | ||
| 22 | - >{{ item.btnName }}</el-button | ||
| 23 | - > | ||
| 24 | - <el-upload | ||
| 25 | - v-else | ||
| 26 | - ref="upload" | ||
| 27 | - :action="item.action" | ||
| 28 | - :fileName="item.fileName" | ||
| 29 | - :http-request="toUpload" | ||
| 30 | - :on-remove="onRemoveUpload" | ||
| 31 | - :limit="item.limit" | ||
| 32 | - :accept="item.accept" | ||
| 33 | - :show-file-list="false" | ||
| 34 | - class="upload" | ||
| 35 | - > | ||
| 36 | - <el-button | ||
| 37 | - :type="item.type" | ||
| 38 | - :icon="item.icon" | ||
| 39 | - :round="item.round" | ||
| 40 | - :size="item.size" | ||
| 41 | - :loading="item.loading" | ||
| 42 | - >{{ item.btnName }}</el-button | ||
| 43 | - > | ||
| 44 | - </el-upload> | ||
| 45 | - </span> | ||
| 46 | - </el-col> | ||
| 47 | - </el-row> | ||
| 48 | - <el-table | ||
| 49 | - :max-height="attrs.maxHeight" | ||
| 50 | - :empty-text="emptyText" | ||
| 51 | - v-bind="attrs" | ||
| 52 | - v-loading="loadingTable" | ||
| 53 | - :data="tableData" | ||
| 54 | - @selection-change="selectionChange" | ||
| 55 | - ref="tableRef" | ||
| 56 | - row-key="id" | ||
| 57 | - :header-cell-class-name="headerCellClassName" | ||
| 58 | - > | ||
| 59 | - <template v-if="columns.length"> | ||
| 60 | - <template v-for="item in columns"> | ||
| 61 | - <column v-if="!item.hidden" :key="item.id" :attrs="item"></column> | ||
| 62 | - </template> | ||
| 63 | - </template> | ||
| 64 | - <slot name="column" v-else></slot> | ||
| 65 | - </el-table> | ||
| 66 | - <!-- 分页 --> | ||
| 67 | - <div | ||
| 68 | - v-if="pageConfig.isPagination" | ||
| 69 | - id="pagination" | ||
| 70 | - class="pagination-container" | ||
| 71 | - :style="{ textAlign: pageConfig.position || 'right' }" | ||
| 72 | - ref="paginationRef" | ||
| 73 | - > | ||
| 74 | - <el-pagination | ||
| 75 | - background | ||
| 76 | - :hide-on-single-page="false" | ||
| 77 | - :current-page="pageConfig.pageData.page" | ||
| 78 | - :page-sizes="[10, 15, 20, 25, 30, 35, 40]" | ||
| 79 | - :page-size="pageConfig.pageData.size" | ||
| 80 | - layout="total,prev, pager, next, jumper, ->, sizes" | ||
| 81 | - :total="pageConfig.total" | ||
| 82 | - @size-change="handleSizeChange" | ||
| 83 | - @current-change="handleCurrentChange" | ||
| 84 | - > | ||
| 85 | - </el-pagination> | ||
| 86 | - </div> | ||
| 87 | - </div> | ||
| 88 | -</template> | ||
| 89 | - | ||
| 90 | -<script> | ||
| 91 | -import Sortable from "sortablejs"; | ||
| 92 | -import { objectMerge, debounce } from "@/utils"; | ||
| 93 | -import column from "./column"; | ||
| 94 | -export default { | ||
| 95 | - props: { | ||
| 96 | - attrs: { | ||
| 97 | - type: Object, | ||
| 98 | - default: { | ||
| 99 | - border: true, | ||
| 100 | - isDragSort: false, | ||
| 101 | - btnCofig: { | ||
| 102 | - isBtn: true, | ||
| 103 | - btnGroup: [ | ||
| 104 | - { | ||
| 105 | - type: "primary", // text、primary、danger | ||
| 106 | - icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right | ||
| 107 | - btnName: "搜索", | ||
| 108 | - size: "mini", // medium / small / mini | ||
| 109 | - round: false, | ||
| 110 | - loading: false, | ||
| 111 | - event: "searchBtn", | ||
| 112 | - }, | ||
| 113 | - ], | ||
| 114 | - }, | ||
| 115 | - }, | ||
| 116 | - }, | ||
| 117 | - emptyText: { | ||
| 118 | - type: String, | ||
| 119 | - default: "暂无数据", | ||
| 120 | - }, | ||
| 121 | - loadingTable: { | ||
| 122 | - type: Boolean, | ||
| 123 | - default: false, | ||
| 124 | - }, | ||
| 125 | - columns: { | ||
| 126 | - type: Array, | ||
| 127 | - default: () => [], | ||
| 128 | - }, | ||
| 129 | - tableData: { | ||
| 130 | - type: Array, | ||
| 131 | - default: () => [], | ||
| 132 | - }, | ||
| 133 | - pageConfig: { | ||
| 134 | - type: Object, | ||
| 135 | - default: { | ||
| 136 | - isPagination: true, | ||
| 137 | - }, | ||
| 138 | - required: true, | ||
| 139 | - }, | ||
| 140 | - }, | ||
| 141 | - components: { | ||
| 142 | - column, | ||
| 143 | - }, | ||
| 144 | - data() { | ||
| 145 | - return { | ||
| 146 | - dropCol: objectMerge({}, this.columns), | ||
| 147 | - trHeight: 4, | ||
| 148 | - }; | ||
| 149 | - }, | ||
| 150 | - computed: { | ||
| 151 | - _attrs() { | ||
| 152 | - //默认table 参数 | ||
| 153 | - const defaultParams = {}; | ||
| 154 | - return Object.assign(defaultParams, this.attrs); | ||
| 155 | - }, | ||
| 156 | - isHasAttr() {}, | ||
| 157 | - }, | ||
| 158 | - created() { | ||
| 159 | - if (this.attrs.isDragSort) { | ||
| 160 | - // 有没有复选框、有没有render | ||
| 161 | - // this.columns | ||
| 162 | - } | ||
| 163 | - }, | ||
| 164 | - mounted() { | ||
| 165 | - //阻止火狐拖拽新建新页面 | ||
| 166 | - document.body.addEventListener( | ||
| 167 | - "drop", | ||
| 168 | - (event) => { | ||
| 169 | - event.preventDefault(); | ||
| 170 | - event.stopPropagation(); | ||
| 171 | - }, | ||
| 172 | - false | ||
| 173 | - ); | ||
| 174 | - if (this.tableData.length) { | ||
| 175 | - this.getTrCurrentHeight(); | ||
| 176 | - window.addEventListener("resize", this.getTrCurrentHeight); | ||
| 177 | - // 拖拽行更新排序 | ||
| 178 | - // this.rowDrop(); | ||
| 179 | - // 拖拽列更新排序 | ||
| 180 | - this.columnDrop(); | ||
| 181 | - } | ||
| 182 | - }, | ||
| 183 | - destroyed() { | ||
| 184 | - if (this.tableData.length) { | ||
| 185 | - window.removeEventListener("resize", this.getTrCurrentHeight); | ||
| 186 | - } | ||
| 187 | - }, | ||
| 188 | - | ||
| 189 | - methods: { | ||
| 190 | - getTrCurrentHeight: debounce(function () { | ||
| 191 | - this.$nextTick(() => { | ||
| 192 | - const trEl = | ||
| 193 | - this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1] | ||
| 194 | - .children[0].clientHeight; | ||
| 195 | - this.trHeight = trEl; | ||
| 196 | - }); | ||
| 197 | - }, 800), | ||
| 198 | - | ||
| 199 | - // 给表头列添加className | ||
| 200 | - headerCellClassName({ row, column, rowIndex, columnIndex }) { | ||
| 201 | - if (columnIndex !== 0) { | ||
| 202 | - return "el-table_1_column"; | ||
| 203 | - } | ||
| 204 | - }, | ||
| 205 | - useTableFunc(FuncName, ...params) { | ||
| 206 | - if (!this.$refs["el-table"]) { | ||
| 207 | - return console.warn("访问不到el-table"); | ||
| 208 | - } | ||
| 209 | - if (!FuncName) { | ||
| 210 | - return console.error("请传入tabel方法名字"); | ||
| 211 | - } | ||
| 212 | - this.$refs["el-table"][FuncName](params[0]); | ||
| 213 | - }, | ||
| 214 | - // table复选框事件 | ||
| 215 | - selectionChange(e) { | ||
| 216 | - console.log(e); | ||
| 217 | - this.$emit("selectionEvent", e); | ||
| 218 | - }, | ||
| 219 | - // 条数变化 | ||
| 220 | - handleSizeChange(e) { | ||
| 221 | - this.$emit("sizeChange", e); | ||
| 222 | - }, | ||
| 223 | - // 页码变化 | ||
| 224 | - handleCurrentChange(e) { | ||
| 225 | - this.$emit("currentChange", e); | ||
| 226 | - }, | ||
| 227 | - // btn点击事件注册 | ||
| 228 | - handleClick(item, i) { | ||
| 229 | - this.$emit(item.event, item, i); | ||
| 230 | - }, | ||
| 231 | - // 拖拽行更新排序 | ||
| 232 | - rowDrop() { | ||
| 233 | - const wrapperTr = document.querySelector(".el-table__header-wrapper tr"); | ||
| 234 | - // console.log("wrapperTr:", wrapperTr); | ||
| 235 | - this.sortable = Sortable.create(wrapperTr, { | ||
| 236 | - sort: this.attrs.isDragSort, | ||
| 237 | - animation: 100, | ||
| 238 | - delay: 0, | ||
| 239 | - handle: ".move", // 只有带move类名的元素才能拖动,多选框禁止拖动 | ||
| 240 | - onEnd: (evt) => { | ||
| 241 | - // 因为手动加了一个多选框, 不在表头循环数组内, 所以这里减1 | ||
| 242 | - let oldIndx = evt.oldIndex - 1; | ||
| 243 | - let newIndx = evt.newIndex - 1; | ||
| 244 | - const oldItem = this.dropCol[oldIndx]; | ||
| 245 | - // 真正改变列数据--变化列头,就能实现列拖动 列数据按列头索引取值 {{ scope.row[dropCol[index].prop] }} | ||
| 246 | - this.dropCol.splice(oldIndx, 1); // 删除旧一行 删除为1 | ||
| 247 | - this.dropCol.splice(newIndx, 0, oldItem); // 插入新一行 插入为0 | ||
| 248 | - }, | ||
| 249 | - }); | ||
| 250 | - }, | ||
| 251 | - // 拖拽列更新排序 | ||
| 252 | - columnDrop() { | ||
| 253 | - const tbody = document.querySelector(".el-table__body-wrapper tbody"); | ||
| 254 | - const _this = this; | ||
| 255 | - Sortable.create(tbody, { | ||
| 256 | - sort: this.attrs.isDragSort, | ||
| 257 | - animation: 100, | ||
| 258 | - delay: 0, | ||
| 259 | - onEnd({ newIndex, oldIndex }) { | ||
| 260 | - // console.log("onEnd:", newIndex, oldIndex); | ||
| 261 | - const currRow = _this.tableData.splice(oldIndex, 1)[0]; | ||
| 262 | - _this.tableData.splice(newIndex, 0, currRow); | ||
| 263 | - }, | ||
| 264 | - }); | ||
| 265 | - }, | ||
| 266 | - // 选择上传 | ||
| 267 | - toUpload(options) { | ||
| 268 | - this.$refs.upload.map((item) => { | ||
| 269 | - item.clearFiles(); //上传成功之后清除历史记录 | ||
| 270 | - }); | ||
| 271 | - this.$emit("upload", options); | ||
| 272 | - }, | ||
| 273 | - //移除上传 | ||
| 274 | - onRemoveUpload(file, fileList) { | ||
| 275 | - this.$emit("rmfile", { file, fileList }); | ||
| 276 | - }, | ||
| 277 | - }, | ||
| 278 | - watch: { | ||
| 279 | - data() { | ||
| 280 | - this.$nextTick(() => { | ||
| 281 | - this.useTableFunc("doLayout"); | ||
| 282 | - }); | ||
| 283 | - }, | ||
| 284 | - }, | ||
| 285 | -}; | ||
| 286 | -</script> | ||
| 287 | -<style lang="scss"> | ||
| 288 | - .el-table { | ||
| 289 | - th { | ||
| 290 | - padding: 0; | ||
| 291 | - } | ||
| 292 | - td{ | ||
| 293 | - padding: 0; | ||
| 294 | - } | ||
| 295 | - } | ||
| 296 | - .first-span,.span{ | ||
| 297 | - display: inline-block; | ||
| 298 | - } | ||
| 299 | - .span{ | ||
| 300 | - margin-left: 6px; | ||
| 301 | - } | ||
| 302 | -</style> |
| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | <navbar /> | 8 | <navbar /> |
| 9 | <tags-view v-if="needTagsView" /> | 9 | <tags-view v-if="needTagsView" /> |
| 10 | </div> | 10 | </div> |
| 11 | - <app-main ref="appMainBlock" /> | 11 | + <app-main /> |
| 12 | <right-panel v-if="false"> | 12 | <right-panel v-if="false"> |
| 13 | <settings /> | 13 | <settings /> |
| 14 | </right-panel> | 14 | </right-panel> | ... | ... |
| ... | @@ -73,20 +73,6 @@ export const constantRoutes = [ | ... | @@ -73,20 +73,6 @@ export const constantRoutes = [ |
| 73 | hidden: true, | 73 | hidden: true, |
| 74 | children: [ | 74 | children: [ |
| 75 | { | 75 | { |
| 76 | - path: "/edit", | ||
| 77 | - component: (resolve) => | ||
| 78 | - require(["@/views/et86Config/et86RuleConfig/edit"], resolve), | ||
| 79 | - name: "edit", | ||
| 80 | - meta: { title: "ET86规则", icon: "user", noCache: false }, | ||
| 81 | - }, | ||
| 82 | - { | ||
| 83 | - path: "/errorInfo", | ||
| 84 | - component: (resolve) => | ||
| 85 | - require(["@/views/et86Config/errorInfo"], resolve), | ||
| 86 | - name: "errorInfo", | ||
| 87 | - meta: { title: "错误信息提示", icon: "user" }, | ||
| 88 | - }, | ||
| 89 | - { | ||
| 90 | path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status", | 76 | path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status", |
| 91 | component: (resolve) => | 77 | component: (resolve) => |
| 92 | require(["@/views/allocationConfig/flightAllocConfig/info"], resolve), | 78 | require(["@/views/allocationConfig/flightAllocConfig/info"], resolve), | ... | ... |
| ... | @@ -2,7 +2,6 @@ const getters = { | ... | @@ -2,7 +2,6 @@ const getters = { |
| 2 | sidebar: (state) => state.app.sidebar, | 2 | sidebar: (state) => state.app.sidebar, |
| 3 | size: (state) => state.app.size, | 3 | size: (state) => state.app.size, |
| 4 | device: (state) => state.app.device, | 4 | device: (state) => state.app.device, |
| 5 | - appMainBlockClientHeight: (state) => state.app.appMainBlockClientHeight, | ||
| 6 | visitedViews: (state) => state.tagsView.visitedViews, | 5 | visitedViews: (state) => state.tagsView.visitedViews, |
| 7 | cachedViews: (state) => state.tagsView.cachedViews, | 6 | cachedViews: (state) => state.tagsView.cachedViews, |
| 8 | token: (state) => state.user.token, | 7 | token: (state) => state.user.token, | ... | ... |
| ... | @@ -10,7 +10,6 @@ const state = { | ... | @@ -10,7 +10,6 @@ const state = { |
| 10 | device: "desktop", | 10 | device: "desktop", |
| 11 | //size: Cookies.get('size') || 'medium' | 11 | //size: Cookies.get('size') || 'medium' |
| 12 | size: localStorage.getItem("size") || "medium", | 12 | size: localStorage.getItem("size") || "medium", |
| 13 | - appMainBlockClientHeight: null | ||
| 14 | }; | 13 | }; |
| 15 | 14 | ||
| 16 | const mutations = { | 15 | const mutations = { |
| ... | @@ -58,9 +57,6 @@ const actions = { | ... | @@ -58,9 +57,6 @@ const actions = { |
| 58 | setSize({ commit }, size) { | 57 | setSize({ commit }, size) { |
| 59 | commit("SET_SIZE", size); | 58 | commit("SET_SIZE", size); |
| 60 | }, | 59 | }, |
| 61 | - setAppMainBlockCH({ commit }, height) { | ||
| 62 | - commit("SET_APPMAINBLOCKCH", height); | ||
| 63 | - }, | ||
| 64 | }; | 60 | }; |
| 65 | 61 | ||
| 66 | export default { | 62 | export default { | ... | ... |
| 1 | -<template> | ||
| 2 | - <div class="form-header container"> | ||
| 3 | - <yl-table | ||
| 4 | - :attrs="tableAttr" | ||
| 5 | - :loadingTable="tableAttr.loadingTable" | ||
| 6 | - :columns="columns" | ||
| 7 | - :tableData="tableData" | ||
| 8 | - :pageConfig="pageConfig" | ||
| 9 | - @sizeChange="handleSizeChange" | ||
| 10 | - @currentChange="handleCurrentChange" | ||
| 11 | - > | ||
| 12 | - </yl-table> | ||
| 13 | - </div> | ||
| 14 | -</template> | ||
| 15 | - | ||
| 16 | -<script> | ||
| 17 | -import YlTable from "@/components/YlTable"; | ||
| 18 | -import { tableAttr, columnHeader } from "./tableConfig"; | ||
| 19 | -export default { | ||
| 20 | - name: "ErrorInfo", | ||
| 21 | - components: { | ||
| 22 | - YlTable, | ||
| 23 | - }, | ||
| 24 | - data() { | ||
| 25 | - return { | ||
| 26 | - pageConfig: { | ||
| 27 | - // 分页配置项 | ||
| 28 | - isPagination: false, | ||
| 29 | - total: 0, | ||
| 30 | - pageData: { | ||
| 31 | - page: 1, | ||
| 32 | - size: 10, | ||
| 33 | - }, | ||
| 34 | - }, | ||
| 35 | - tableAttr: tableAttr, // table配置项 | ||
| 36 | - columns: columnHeader(), // 表头 | ||
| 37 | - tableData: [], // 表格数据 | ||
| 38 | - }; | ||
| 39 | - }, | ||
| 40 | - created() { | ||
| 41 | - const { data } = this.$route.query; | ||
| 42 | - this.tableData = JSON.parse(data); | ||
| 43 | - }, | ||
| 44 | - methods: { | ||
| 45 | - //条数变化 | ||
| 46 | - handleSizeChange(e) { | ||
| 47 | - this.pageConfig.pageData.size = e; | ||
| 48 | - this.pageConfig.pageData.page = 1; | ||
| 49 | - this.searchBtn(); | ||
| 50 | - }, | ||
| 51 | - //页码变化 | ||
| 52 | - handleCurrentChange(e) { | ||
| 53 | - this.pageConfig.pageData.page = e; | ||
| 54 | - this.searchBtn(); | ||
| 55 | - }, | ||
| 56 | - // 搜索 | ||
| 57 | - searchBtn() {}, | ||
| 58 | - }, | ||
| 59 | -}; | ||
| 60 | -</script> | ||
| 61 | -<style lang="scss" scoped></style> |
| 1 | -export const tableAttr = { | ||
| 2 | - border: true, | ||
| 3 | - loadingTable: false, | ||
| 4 | - isDragSort: false, // 拖拽tableData数据一定要加id字段 | ||
| 5 | - maxHeight: 300, | ||
| 6 | - btnCofig: { | ||
| 7 | - isBtn: false, | ||
| 8 | - btnGroup: [], | ||
| 9 | - }, | ||
| 10 | -}; | ||
| 11 | -export const columnHeader = () => [ | ||
| 12 | - { | ||
| 13 | - type: "index", | ||
| 14 | - label: "序号", | ||
| 15 | - prop: "rowNum", | ||
| 16 | - align: "center", | ||
| 17 | - width: "70", | ||
| 18 | - }, | ||
| 19 | - { | ||
| 20 | - label: "错误信息", | ||
| 21 | - prop: "msg", | ||
| 22 | - align: "center", | ||
| 23 | - minWidth: 150, | ||
| 24 | - }, | ||
| 25 | -]; |
| 1 | -<template> | ||
| 2 | - <div class="error-container"> | ||
| 3 | - <el-dialog | ||
| 4 | - :width="width" | ||
| 5 | - :title="title" | ||
| 6 | - :center="center" | ||
| 7 | - :visible.sync="dialogVisible" | ||
| 8 | - :close-on-click-modal="onModalClickClose" | ||
| 9 | - @open="dialogOpenEvent" | ||
| 10 | - @close="dialogCloseEvent" | ||
| 11 | - > | ||
| 12 | - <slot></slot> | ||
| 13 | - <span slot="footer" class="dialog-footer"> | ||
| 14 | - <el-button @click="cancel">取 消</el-button> | ||
| 15 | - <el-button type="primary" @click="confirm">{{ | ||
| 16 | - confirmBtnName | ||
| 17 | - }}</el-button> | ||
| 18 | - </span> | ||
| 19 | - </el-dialog> | ||
| 20 | - </div> | ||
| 21 | -</template> | ||
| 22 | - | ||
| 23 | -<script> | ||
| 24 | -export default { | ||
| 25 | - props: { | ||
| 26 | - width: { | ||
| 27 | - type: String, | ||
| 28 | - default: "50%", | ||
| 29 | - }, | ||
| 30 | - title: { | ||
| 31 | - type: String, | ||
| 32 | - default: "标题", | ||
| 33 | - }, | ||
| 34 | - center: { | ||
| 35 | - type: String, | ||
| 36 | - default: "center", | ||
| 37 | - }, | ||
| 38 | - confirmBtnName: { | ||
| 39 | - type: String, | ||
| 40 | - default: "确 定", | ||
| 41 | - }, | ||
| 42 | - onModalClickClose: { | ||
| 43 | - type: Boolean, | ||
| 44 | - default: false, | ||
| 45 | - }, | ||
| 46 | - }, | ||
| 47 | - data() { | ||
| 48 | - return { | ||
| 49 | - dialogVisible: false, | ||
| 50 | - }; | ||
| 51 | - }, | ||
| 52 | - computed: {}, | ||
| 53 | - created() {}, | ||
| 54 | - mounted() {}, | ||
| 55 | - methods: { | ||
| 56 | - dialogOpenEvent(data) { | ||
| 57 | - if (data && data.length) { | ||
| 58 | - console.log(data); | ||
| 59 | - } | ||
| 60 | - this.dialogVisible = true; | ||
| 61 | - this.$emit("open"); | ||
| 62 | - }, | ||
| 63 | - dialogCloseEvent() { | ||
| 64 | - this.dialogVisible = false; | ||
| 65 | - this.$emit("close"); | ||
| 66 | - }, | ||
| 67 | - // 确认事件 | ||
| 68 | - confirm() { | ||
| 69 | - this.dialogVisible = false; | ||
| 70 | - this.$emit("confirm"); | ||
| 71 | - }, | ||
| 72 | - // 取消事件 | ||
| 73 | - cancel() { | ||
| 74 | - this.dialogVisible = false; | ||
| 75 | - this.$emit("cancel"); | ||
| 76 | - }, | ||
| 77 | - }, | ||
| 78 | -}; | ||
| 79 | -</script> | ||
| 80 | -<style lang='scss' scoped> | ||
| 81 | - | ||
| 82 | -</style> |
| 1 | -<template> | ||
| 2 | - <div ref="formHeaderRef" class="form-header container"> | ||
| 3 | - <el-row> | ||
| 4 | - <el-col> | ||
| 5 | - <yl-form | ||
| 6 | - ref="ruleForm" | ||
| 7 | - :formConfig="formConfig" | ||
| 8 | - :queryForm="queryForm" | ||
| 9 | - :inline="false" | ||
| 10 | - formWidth="auto" | ||
| 11 | - /> | ||
| 12 | - </el-col> | ||
| 13 | - </el-row> | ||
| 14 | - <yl-table | ||
| 15 | - ref="ylTable" | ||
| 16 | - :attrs="tableAttr" | ||
| 17 | - :loadingTable="tableAttr.loadingTable" | ||
| 18 | - :columns="columns" | ||
| 19 | - :tableData="tableData" | ||
| 20 | - :pageConfig="pageConfig" | ||
| 21 | - @search="searchBtn" | ||
| 22 | - @download="downloadTemplate" | ||
| 23 | - @upload="toUpload" | ||
| 24 | - @export="exportTemplate" | ||
| 25 | - @delete="deleteData" | ||
| 26 | - @sizeChange="handleSizeChange" | ||
| 27 | - @currentChange="handleCurrentChange" | ||
| 28 | - @selectionEvent="tableSelectionChange" | ||
| 29 | - > | ||
| 30 | - </yl-table> | ||
| 31 | - </div> | ||
| 32 | -</template> | ||
| 33 | -<script> | ||
| 34 | -import YlForm from "@/components/YlForm"; | ||
| 35 | -import YlTable from "@/components/YlTable"; | ||
| 36 | -import { formConfig } from "./formConfig"; | ||
| 37 | -import { tableAttr, columnHeader } from "./tableConfig"; | ||
| 38 | -import { restTableHeight } from "@/utils"; | ||
| 39 | -import { | ||
| 40 | - findHsCodeList, // ShipmentDesc查询 | ||
| 41 | - delBlackList, // ShipmentDesc删除 | ||
| 42 | - downLoadTemplate, // ShipmentDesc下载模板 | ||
| 43 | - uploadHsCode, // ShipmentDesc导入 | ||
| 44 | -} from "@/api/et86HsCodeBlack"; | ||
| 45 | -import { downLoadXlsx } from "@/utils/zipdownload"; | ||
| 46 | -export default { | ||
| 47 | - name: "Et86HsCodeBlack", | ||
| 48 | - components: { | ||
| 49 | - YlForm, | ||
| 50 | - YlTable, | ||
| 51 | - }, | ||
| 52 | - data() { | ||
| 53 | - return { | ||
| 54 | - formConfig: formConfig, // 表单配置项 | ||
| 55 | - queryForm: { | ||
| 56 | - searchValue: "", | ||
| 57 | - }, // 表单参数 | ||
| 58 | - pageConfig: { | ||
| 59 | - // 分页配置项 | ||
| 60 | - isPagination: true, | ||
| 61 | - total: 0, | ||
| 62 | - pageData: { | ||
| 63 | - page: 1, | ||
| 64 | - size: 10, | ||
| 65 | - }, | ||
| 66 | - }, | ||
| 67 | - tableAttr: tableAttr, // table配置项 | ||
| 68 | - columns: columnHeader(this.indexAdd, this.deleteRow), // 表头 | ||
| 69 | - tableData: [], // 表格数据 | ||
| 70 | - multipleSelection: [], | ||
| 71 | - }; | ||
| 72 | - }, | ||
| 73 | - created() { | ||
| 74 | - // 黑名单查询 | ||
| 75 | - this.$nextTick(() => { | ||
| 76 | - this.searchBtn(); | ||
| 77 | - }); | ||
| 78 | - }, | ||
| 79 | - mounted() { | ||
| 80 | - this.$nextTick(() => { | ||
| 81 | - this.tableAttr.maxHeight = | ||
| 82 | - window.innerHeight - restTableHeight(this.$refs); | ||
| 83 | - }); | ||
| 84 | - }, | ||
| 85 | - methods: { | ||
| 86 | - // HScode黑名单查询 | ||
| 87 | - queryFindHsCodeList() { | ||
| 88 | - const { page, size } = this.pageConfig.pageData; | ||
| 89 | - let params = { | ||
| 90 | - limitStart: (page - 1) * size, | ||
| 91 | - limitSize: size, | ||
| 92 | - ...this.queryForm, | ||
| 93 | - }; | ||
| 94 | - this.tableAttr.loadingTable = true; | ||
| 95 | - findHsCodeList(params) | ||
| 96 | - .then((res) => { | ||
| 97 | - this.tableAttr.loadingTable = false; | ||
| 98 | - const { code, data } = res; | ||
| 99 | - if (code == 200) { | ||
| 100 | - this.tableData = data.list; | ||
| 101 | - this.pageConfig.total = data.total; | ||
| 102 | - } | ||
| 103 | - }) | ||
| 104 | - .catch(() => {}); | ||
| 105 | - }, | ||
| 106 | - // 删除黑名单 | ||
| 107 | - toDelBlackList(params) { | ||
| 108 | - delBlackList(params) | ||
| 109 | - .then((res) => { | ||
| 110 | - const { code, msg } = res; | ||
| 111 | - if (code == 200) { | ||
| 112 | - this.searchBtn(); | ||
| 113 | - this.msgSuccess(msg || "删除成功!"); | ||
| 114 | - } else { | ||
| 115 | - this.$message.error(msg || "删除失败"); | ||
| 116 | - } | ||
| 117 | - }) | ||
| 118 | - .catch(() => {}); | ||
| 119 | - }, | ||
| 120 | - // 选择上传【HScode黑名单导入】 | ||
| 121 | - toUpload({ file }) { | ||
| 122 | - const formData = new FormData(); | ||
| 123 | - formData.append("file", file); | ||
| 124 | - uploadHsCode(formData) | ||
| 125 | - .then((res) => { | ||
| 126 | - const { code, data, msg } = res; | ||
| 127 | - if (code == 200) { | ||
| 128 | - this.searchBtn(); | ||
| 129 | - this.msgSuccess(msg || "导入成功!"); | ||
| 130 | - } else { | ||
| 131 | - this.$message.error(msg || "导入失败"); | ||
| 132 | - this.$router.push({ | ||
| 133 | - path: "/errorInfo", | ||
| 134 | - query: { | ||
| 135 | - name: "errorInfo", | ||
| 136 | - error: code, | ||
| 137 | - data: JSON.stringify(data), | ||
| 138 | - }, | ||
| 139 | - }); | ||
| 140 | - } | ||
| 141 | - }) | ||
| 142 | - .catch(() => {}); | ||
| 143 | - }, | ||
| 144 | - // 下载【HScode黑名单下载模板】 | ||
| 145 | - downloadTemplate() { | ||
| 146 | - downLoadTemplate("hsCode") | ||
| 147 | - .then((res) => { | ||
| 148 | - if (res) { | ||
| 149 | - const blob = new Blob([res]); | ||
| 150 | - const link = document.createElement("a"); //创建a标签 | ||
| 151 | - link.download = "HSCODE黑名单表.xlsx"; //a标签添加属性 | ||
| 152 | - link.style.display = "none"; | ||
| 153 | - link.href = URL.createObjectURL(blob); | ||
| 154 | - document.body.appendChild(link); | ||
| 155 | - link.click(); //执行下载 | ||
| 156 | - URL.revokeObjectURL(link.href); //释放url | ||
| 157 | - document.body.removeChild(link); //释放标签 | ||
| 158 | - } else { | ||
| 159 | - this.$message.error("下载失败"); | ||
| 160 | - } | ||
| 161 | - }) | ||
| 162 | - .catch(() => {}); | ||
| 163 | - }, | ||
| 164 | - // 导出 | ||
| 165 | - exportTemplate(row, i) { | ||
| 166 | - this.tableAttr.btnCofig.btnGroup[i].loading = true; | ||
| 167 | - downLoadXlsx("/etes/exportHsCodeList", this.queryForm, "HSCODE黑名单表") | ||
| 168 | - .then(() => { | ||
| 169 | - this.tableAttr.btnCofig.btnGroup[i].loading = false; | ||
| 170 | - }) | ||
| 171 | - .catch(() => { | ||
| 172 | - this.$message.error("导出失败"); | ||
| 173 | - }); | ||
| 174 | - }, | ||
| 175 | - // 删除 | ||
| 176 | - deleteData(row) { | ||
| 177 | - if (this.multipleSelection.length) { | ||
| 178 | - let params = []; | ||
| 179 | - this.multipleSelection.map((item) => { | ||
| 180 | - params.push(item.id); | ||
| 181 | - }); | ||
| 182 | - this.$confirm("是否确认删除?", "提示", { | ||
| 183 | - confirmButtonText: "确定", | ||
| 184 | - cancelButtonText: "取消", | ||
| 185 | - type: "warning", | ||
| 186 | - center: true, | ||
| 187 | - }) | ||
| 188 | - .then(() => { | ||
| 189 | - this.toDelBlackList(params); | ||
| 190 | - }) | ||
| 191 | - .catch(() => {}); | ||
| 192 | - } else { | ||
| 193 | - this.$message.error("请勾选一条或者多条数据再操作!"); | ||
| 194 | - } | ||
| 195 | - }, | ||
| 196 | - // 搜索 | ||
| 197 | - searchBtn() { | ||
| 198 | - this.pageConfig.pageData.page = 1; | ||
| 199 | - this.pageConfig.pageData.size = 10; | ||
| 200 | - this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | ||
| 201 | - this.queryFindHsCodeList(); | ||
| 202 | - }); | ||
| 203 | - }, | ||
| 204 | - // 翻页序号递增 | ||
| 205 | - indexAdd(index){ | ||
| 206 | - const page = this.pageConfig.pageData.page // 当前页码 | ||
| 207 | - const pagesize = this.pageConfig.pageData.size // 每页条数 | ||
| 208 | - return index + 1 + (page - 1) * pagesize | ||
| 209 | - }, | ||
| 210 | - //条数变化 | ||
| 211 | - handleSizeChange(e) { | ||
| 212 | - this.pageConfig.pageData.size = e; | ||
| 213 | - this.pageConfig.pageData.page = 1; | ||
| 214 | - this.queryFindHsCodeList(); | ||
| 215 | - }, | ||
| 216 | - //页码变化 | ||
| 217 | - handleCurrentChange(e) { | ||
| 218 | - this.pageConfig.pageData.page = e; | ||
| 219 | - this.queryFindHsCodeList(); | ||
| 220 | - }, | ||
| 221 | - // table勾选 | ||
| 222 | - tableSelectionChange(val) { | ||
| 223 | - this.multipleSelection = val; | ||
| 224 | - }, | ||
| 225 | - // 删除 | ||
| 226 | - deleteRow({ row }) { | ||
| 227 | - this.$confirm("是否确认删除?", "提示", { | ||
| 228 | - confirmButtonText: "确定", | ||
| 229 | - cancelButtonText: "取消", | ||
| 230 | - type: "warning", | ||
| 231 | - center: true, | ||
| 232 | - }) | ||
| 233 | - .then(() => { | ||
| 234 | - this.toDelBlackList([row.id]); | ||
| 235 | - }) | ||
| 236 | - .catch(() => {}); | ||
| 237 | - }, | ||
| 238 | - }, | ||
| 239 | -}; | ||
| 240 | -</script> | ||
| 241 | -<style lang="scss" scoped></style> |
| 1 | -export const tableAttr = { | ||
| 2 | - border: true, | ||
| 3 | - loadingTable: false, | ||
| 4 | - isDragSort: false, // 拖拽tableData数据一定要加id字段 | ||
| 5 | - maxHeight: 0, | ||
| 6 | - btnCofig: { | ||
| 7 | - isBtn: true, | ||
| 8 | - btnGroup: [ | ||
| 9 | - { | ||
| 10 | - type: "primary", // text、primary、danger | ||
| 11 | - icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right | ||
| 12 | - btnName: "搜索", | ||
| 13 | - size: "mini", // medium / small / mini | ||
| 14 | - round: false, | ||
| 15 | - loading: false, | ||
| 16 | - event: "search", | ||
| 17 | - }, | ||
| 18 | - { | ||
| 19 | - type: "primary", | ||
| 20 | - icon: "el-icon-download", | ||
| 21 | - btnName: "下载模板", | ||
| 22 | - size: "mini", | ||
| 23 | - round: false, | ||
| 24 | - loading: false, | ||
| 25 | - event: "download", | ||
| 26 | - }, | ||
| 27 | - { | ||
| 28 | - type: "primary", | ||
| 29 | - icon: "el-icon-upload", | ||
| 30 | - btnName: "导入", | ||
| 31 | - size: "mini", | ||
| 32 | - round: false, | ||
| 33 | - loading: false, | ||
| 34 | - event: "upLoad", | ||
| 35 | - action: "/goods/uploadGoodsExcel", | ||
| 36 | - fileName: "name", | ||
| 37 | - limit: 1, | ||
| 38 | - accept: ".xlsx", | ||
| 39 | - }, | ||
| 40 | - { | ||
| 41 | - type: "primary", | ||
| 42 | - icon: "el-icon-download", | ||
| 43 | - btnName: "导出", | ||
| 44 | - size: "mini", | ||
| 45 | - round: false, | ||
| 46 | - loading: false, | ||
| 47 | - event: "export", | ||
| 48 | - }, | ||
| 49 | - { | ||
| 50 | - type: "danger", | ||
| 51 | - icon: "el-icon-delete", | ||
| 52 | - btnName: "删除", | ||
| 53 | - size: "mini", | ||
| 54 | - round: false, | ||
| 55 | - loading: false, | ||
| 56 | - event: "delete", | ||
| 57 | - }, | ||
| 58 | - ], | ||
| 59 | - }, | ||
| 60 | -}; | ||
| 61 | -export const columnHeader = (indexAdd, deleteRow) => [ | ||
| 62 | - { | ||
| 63 | - type: "selection", | ||
| 64 | - align: "center", | ||
| 65 | - prop: "selection", | ||
| 66 | - width: "50", | ||
| 67 | - }, | ||
| 68 | - { | ||
| 69 | - type: "index", | ||
| 70 | - label: "序号", | ||
| 71 | - prop: "id", | ||
| 72 | - align: "center", | ||
| 73 | - width: "50", | ||
| 74 | - index: indexAdd, | ||
| 75 | - }, | ||
| 76 | - { | ||
| 77 | - label: "HSCODE", | ||
| 78 | - prop: "blackValue", | ||
| 79 | - align: "center", | ||
| 80 | - minWidth: 100, | ||
| 81 | - }, | ||
| 82 | - { | ||
| 83 | - label: "创建时间", | ||
| 84 | - prop: "createTime", | ||
| 85 | - align: "center", | ||
| 86 | - minWidth: 100, | ||
| 87 | - }, | ||
| 88 | - { | ||
| 89 | - label: "创建人", | ||
| 90 | - prop: "createUserName", | ||
| 91 | - align: "center", | ||
| 92 | - minWidth: 100, | ||
| 93 | - }, | ||
| 94 | - { | ||
| 95 | - label: "文件名", | ||
| 96 | - prop: "uploadFileName", | ||
| 97 | - align: "center", | ||
| 98 | - minWidth: 100, | ||
| 99 | - }, | ||
| 100 | - | ||
| 101 | - { | ||
| 102 | - label: "操作", | ||
| 103 | - prop: "operate", | ||
| 104 | - align: "center", | ||
| 105 | - minWidth: 120, | ||
| 106 | - fixed: "right", | ||
| 107 | - render: (h, params) => { | ||
| 108 | - return h("div", [ | ||
| 109 | - h( | ||
| 110 | - "el-button", | ||
| 111 | - { | ||
| 112 | - style: { | ||
| 113 | - color: "#ff4949", | ||
| 114 | - }, | ||
| 115 | - props: { | ||
| 116 | - type: "text", | ||
| 117 | - size: "mini", | ||
| 118 | - icon: "el-icon-delete", | ||
| 119 | - }, | ||
| 120 | - on: { | ||
| 121 | - click() { | ||
| 122 | - deleteRow(params); | ||
| 123 | - }, | ||
| 124 | - }, | ||
| 125 | - }, | ||
| 126 | - "删除" | ||
| 127 | - ), | ||
| 128 | - ]); | ||
| 129 | - }, | ||
| 130 | - }, | ||
| 131 | -]; |
| 1 | -export const formConfig = [ | ||
| 2 | - { | ||
| 3 | - label: "重量(KG)", | ||
| 4 | - type: "Input", | ||
| 5 | - name: "minWeight", | ||
| 6 | - prop: "minWeight", | ||
| 7 | - placeholder: "0", | ||
| 8 | - rules: { | ||
| 9 | - required: true, | ||
| 10 | - message: "最大重量不得小于0KG", | ||
| 11 | - trigger: ["change", "blur"], | ||
| 12 | - }, | ||
| 13 | - trigger: "blur", // 事件名 | ||
| 14 | - }, | ||
| 15 | - { | ||
| 16 | - label: "", | ||
| 17 | - type: "Input", | ||
| 18 | - name: "maxWeight", | ||
| 19 | - prop: "maxWeight", | ||
| 20 | - placeholder: "34", | ||
| 21 | - rules: { | ||
| 22 | - required: true, | ||
| 23 | - message: "最大重量不得大于34KG", | ||
| 24 | - trigger: ["change", "blur"], | ||
| 25 | - }, | ||
| 26 | - trigger: "blur", // 事件名 | ||
| 27 | - }, | ||
| 28 | - { | ||
| 29 | - label: "件数", | ||
| 30 | - type: "Input", | ||
| 31 | - name: "minNumOfPieces", | ||
| 32 | - prop: "minNumOfPieces", | ||
| 33 | - placeholder: "0", | ||
| 34 | - rules: { | ||
| 35 | - required: true, | ||
| 36 | - message: "最大重量不得小于0KG", | ||
| 37 | - trigger: ["change", "blur"], | ||
| 38 | - }, | ||
| 39 | - trigger: "blur", // 事件名 | ||
| 40 | - }, | ||
| 41 | - { | ||
| 42 | - label: "", | ||
| 43 | - type: "Input", | ||
| 44 | - name: "maxNumOfPieces", | ||
| 45 | - prop: "maxNumOfPieces", | ||
| 46 | - placeholder: "34", | ||
| 47 | - rules: { | ||
| 48 | - required: true, | ||
| 49 | - message: "最大重量不得大于34KG", | ||
| 50 | - trigger: ["change", "blur"], | ||
| 51 | - }, | ||
| 52 | - trigger: "blur", // 事件名 | ||
| 53 | - }, | ||
| 54 | -]; |
This diff is collapsed. Click to expand it.
| 1 | -export default { | ||
| 2 | - methods: { | ||
| 3 | - // 获取字典 | ||
| 4 | - getObj({ serviceCode }) { | ||
| 5 | - let service_Code = []; | ||
| 6 | - serviceCode.map((item) => { | ||
| 7 | - service_Code.push(item.chineseName); | ||
| 8 | - }); | ||
| 9 | - this.serviceCodeData = service_Code; | ||
| 10 | - }, | ||
| 11 | - // 处理serviceCode包不包含 | ||
| 12 | - serviceCodeCofig() { | ||
| 13 | - let str = this.serviceCode.replace(/;|;/g, ","); | ||
| 14 | - let arr = str.split(","); | ||
| 15 | - if (arr[arr.length - 1] == "") { | ||
| 16 | - arr.splice(arr.length - 1, 1); | ||
| 17 | - } | ||
| 18 | - let noHasCode = this.serviceCodeData.filter( | ||
| 19 | - (v) => !arr.some((val) => val == v) | ||
| 20 | - ); | ||
| 21 | - let hasCode = this.serviceCodeData.filter((v) => | ||
| 22 | - arr.some((val) => val == v) | ||
| 23 | - ); | ||
| 24 | - let includeCode = arr.filter((v) => !hasCode.some((val) => val == v)); | ||
| 25 | - return { | ||
| 26 | - include: hasCode, | ||
| 27 | - noInclude: includeCode, | ||
| 28 | - }; | ||
| 29 | - }, | ||
| 30 | - // radio包含不包含serviceCode | ||
| 31 | - changeIsServiceCode(val) { | ||
| 32 | - // 勾选的时候去校验 || 输入的时候去校验 | ||
| 33 | - if (val == 1) { | ||
| 34 | - if (this.serviceCodeCofig().noInclude.length) { | ||
| 35 | - let tip = this.serviceCodeCofig().noInclude.toString(); | ||
| 36 | - this.msgError(`${tip} 不包含`); | ||
| 37 | - } | ||
| 38 | - } else { | ||
| 39 | - if (this.serviceCodeCofig().include.length) { | ||
| 40 | - let tip = this.serviceCodeCofig().include.toString(); | ||
| 41 | - this.msgError(`${tip} 已包含`); | ||
| 42 | - } | ||
| 43 | - } | ||
| 44 | - }, | ||
| 45 | - // serviceCode失焦事件 | ||
| 46 | - serviceCodeBlur() { | ||
| 47 | - if (this.isServiceCode == "1") { | ||
| 48 | - if (this.serviceCodeCofig().noInclude.length) { | ||
| 49 | - let tip = this.serviceCodeCofig().noInclude.toString(); | ||
| 50 | - // this.msgError(`${tip} 不包含`); | ||
| 51 | - } | ||
| 52 | - } else { | ||
| 53 | - if (this.serviceCodeCofig().include.length) { | ||
| 54 | - let tip = this.serviceCodeCofig().include.toString(); | ||
| 55 | - // this.msgError(`${tip} 已包含`); | ||
| 56 | - } | ||
| 57 | - } | ||
| 58 | - }, | ||
| 59 | - }, | ||
| 60 | -}; |
| 1 | -export const tableAttr = { | ||
| 2 | - border: true, | ||
| 3 | - loadingTable: false, | ||
| 4 | - isDragSort: true, // 拖拽tableData数据一定要加id字段 | ||
| 5 | - maxHeight: 300, | ||
| 6 | - btnCofig: { | ||
| 7 | - isBtn: false, | ||
| 8 | - btnGroup: [ | ||
| 9 | - { | ||
| 10 | - type: "primary", | ||
| 11 | - icon: "el-icon-plus", | ||
| 12 | - btnName: "添加", | ||
| 13 | - size: "mini", | ||
| 14 | - round: false, | ||
| 15 | - loading: false, | ||
| 16 | - event: "add", | ||
| 17 | - }, | ||
| 18 | - ], | ||
| 19 | - }, | ||
| 20 | -}; |
| 1 | -export const formConfig = [ | ||
| 2 | - { | ||
| 3 | - label: "原航班", | ||
| 4 | - type: "Input", | ||
| 5 | - name: "originOfFlightNo", | ||
| 6 | - prop: "originOfFlightNo", | ||
| 7 | - placeholder: "请输入原航班号", | ||
| 8 | - span: 5, | ||
| 9 | - trigger: "blur", | ||
| 10 | - labelWidth: "55px", | ||
| 11 | - }, | ||
| 12 | - { | ||
| 13 | - label: "修改时间 从", | ||
| 14 | - type: "Date", | ||
| 15 | - name: "startTime", | ||
| 16 | - prop: "startTime", | ||
| 17 | - placeholder: "请选择开始时间", | ||
| 18 | - // rules: { required: true, message: "请选择开始时间", trigger: "blur" }, | ||
| 19 | - format: "yyyy-MM-dd", | ||
| 20 | - colWidth: "23%", | ||
| 21 | - inputWidth: "100%", | ||
| 22 | - }, | ||
| 23 | - { | ||
| 24 | - label: "到", | ||
| 25 | - type: "Date", | ||
| 26 | - name: "endTime", | ||
| 27 | - prop: "endTime", | ||
| 28 | - placeholder: "请选择结束时间", | ||
| 29 | - // rules: { required: true, message: "请选择结束时间", trigger: "blur" }, | ||
| 30 | - format: "yyyy-MM-dd", | ||
| 31 | - colWidth: "20%", | ||
| 32 | - labelWidth: "20px", | ||
| 33 | - inputWidth: "100%", | ||
| 34 | - }, | ||
| 35 | - { | ||
| 36 | - label: "规则状态", | ||
| 37 | - type: "Select", | ||
| 38 | - name: "status", | ||
| 39 | - prop: "status", | ||
| 40 | - placeholder: "请选择状态", | ||
| 41 | - options: { | ||
| 42 | - data: [ | ||
| 43 | - { | ||
| 44 | - value: "1", | ||
| 45 | - label: "有效", | ||
| 46 | - }, | ||
| 47 | - { | ||
| 48 | - value: "0", | ||
| 49 | - label: "无效", | ||
| 50 | - }, | ||
| 51 | - ], | ||
| 52 | - label: "有效", | ||
| 53 | - value: "1", | ||
| 54 | - }, | ||
| 55 | - colWidth: "18%", | ||
| 56 | - labelWidth: "70px", | ||
| 57 | - inputWidth: "100%", | ||
| 58 | - }, | ||
| 59 | -]; | ||
| 60 | - | ||
| 61 | -export const editFormConfig = [ | ||
| 62 | - { | ||
| 63 | - label: "航班号", | ||
| 64 | - type: "Search", | ||
| 65 | - name: "route", | ||
| 66 | - prop: "fltNo", | ||
| 67 | - placeholder: "请输入航班号", | ||
| 68 | - rules: { | ||
| 69 | - required: true, | ||
| 70 | - message: "请输入航班号", | ||
| 71 | - trigger: ["change", "blur"], | ||
| 72 | - }, | ||
| 73 | - http: { | ||
| 74 | - url: "/dictionary/queryRouteByFltNo", | ||
| 75 | - method: "post", | ||
| 76 | - data: { | ||
| 77 | - fltNo: "", | ||
| 78 | - }, | ||
| 79 | - }, | ||
| 80 | - }, | ||
| 81 | - { | ||
| 82 | - label: "", | ||
| 83 | - type: "inputNumber", | ||
| 84 | - name: "count", | ||
| 85 | - prop: "count", | ||
| 86 | - placeholder: "+", | ||
| 87 | - min: 0, | ||
| 88 | - max: 7, | ||
| 89 | - with: "50px", | ||
| 90 | - }, | ||
| 91 | - { | ||
| 92 | - label: "航线优先级", | ||
| 93 | - type: "Input", | ||
| 94 | - name: "route", | ||
| 95 | - prop: "fltNum", | ||
| 96 | - placeholder: "请选择航线优先级", | ||
| 97 | - trigger: "focus", | ||
| 98 | - }, | ||
| 99 | - { | ||
| 100 | - label: "爆仓是否继续配舱", | ||
| 101 | - type: "Checkbox", | ||
| 102 | - name: "checked", | ||
| 103 | - prop: "checked", | ||
| 104 | - disabled: false, | ||
| 105 | - }, | ||
| 106 | -]; |
| 1 | -<template> | ||
| 2 | - <div ref="formHeaderRef" class="form-header container"> | ||
| 3 | - <el-row> | ||
| 4 | - <el-col> | ||
| 5 | - <yl-form | ||
| 6 | - ref="ruleForm" | ||
| 7 | - :formConfig="formConfig" | ||
| 8 | - :queryForm="queryForm" | ||
| 9 | - :inline="false" | ||
| 10 | - formWidth="auto" | ||
| 11 | - @blur="blurEvent" | ||
| 12 | - /> | ||
| 13 | - </el-col> | ||
| 14 | - </el-row> | ||
| 15 | - <yl-table | ||
| 16 | - ref="ylTable" | ||
| 17 | - :attrs="tableAttr" | ||
| 18 | - :loadingTable="tableAttr.loadingTable" | ||
| 19 | - :columns="columns" | ||
| 20 | - :tableData="tableData" | ||
| 21 | - :pageConfig="pageConfig" | ||
| 22 | - @sizeChange="handleSizeChange" | ||
| 23 | - @currentChange="handleCurrentChange" | ||
| 24 | - @search="searchBtn" | ||
| 25 | - @add="addBtn" | ||
| 26 | - > | ||
| 27 | - </yl-table> | ||
| 28 | - </div> | ||
| 29 | -</template> | ||
| 30 | -<script> | ||
| 31 | -import YlForm from "@/components/YlForm"; | ||
| 32 | -import YlTable from "@/components/YlTable"; | ||
| 33 | -import { formConfig } from "./formConfig"; | ||
| 34 | -import { tableAttr, columnHeader } from "./tableConfig"; | ||
| 35 | -import { restTableHeight, sortList } from "@/utils"; | ||
| 36 | -import { | ||
| 37 | - findAllEtesRules, // ET86查询 | ||
| 38 | - deleteEtesRuleById, // 删除 | ||
| 39 | -} from "@/api/et86"; | ||
| 40 | -export default { | ||
| 41 | - components: { | ||
| 42 | - YlForm, | ||
| 43 | - YlTable, | ||
| 44 | - }, | ||
| 45 | - data() { | ||
| 46 | - return { | ||
| 47 | - formConfig: formConfig, // 表单配置项 | ||
| 48 | - queryForm: { | ||
| 49 | - // 表单参数 | ||
| 50 | - status: "有效", | ||
| 51 | - }, | ||
| 52 | - pageConfig: { | ||
| 53 | - // 分页配置项 | ||
| 54 | - isPagination: true, | ||
| 55 | - total: 0, | ||
| 56 | - pageData: { | ||
| 57 | - page: 1, | ||
| 58 | - size: 10, | ||
| 59 | - }, | ||
| 60 | - }, | ||
| 61 | - tableAttr: tableAttr, // table配置项 | ||
| 62 | - columns: columnHeader(this.indexAdd, this.viewRow, this.editRow, this.deleteRow), // 表头 | ||
| 63 | - tableData: [], // 表格数据 | ||
| 64 | - }; | ||
| 65 | - }, | ||
| 66 | - created() { | ||
| 67 | - // ET86查询 | ||
| 68 | - this.$nextTick(() => { | ||
| 69 | - this.searchBtn(); | ||
| 70 | - }); | ||
| 71 | - }, | ||
| 72 | - mounted() { | ||
| 73 | - this.$nextTick(() => { | ||
| 74 | - this.tableAttr.maxHeight = | ||
| 75 | - window.innerHeight - restTableHeight(this.$refs); | ||
| 76 | - }); | ||
| 77 | - }, | ||
| 78 | - methods: { | ||
| 79 | - // ET86查询 | ||
| 80 | - queryFindAllEtesRules() { | ||
| 81 | - const { page, size } = this.pageConfig.pageData; | ||
| 82 | - let params = { | ||
| 83 | - originOfFlightNo: this.queryForm.originOfFlightNo, | ||
| 84 | - updateTimeStart: this.queryForm.startTime | ||
| 85 | - ? this.queryForm.startTime | ||
| 86 | - : "", | ||
| 87 | - updateTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "", | ||
| 88 | - limitStart: (page - 1) * size, | ||
| 89 | - limitSize: size, | ||
| 90 | - status: this.queryForm.status, | ||
| 91 | - }; | ||
| 92 | - if (this.queryForm.status == "有效") { | ||
| 93 | - params.status = "1"; | ||
| 94 | - } | ||
| 95 | - this.tableAttr.loadingTable = true; | ||
| 96 | - findAllEtesRules(params) | ||
| 97 | - .then((res) => { | ||
| 98 | - this.tableAttr.loadingTable = false; | ||
| 99 | - const { code, data } = res; | ||
| 100 | - if (code == 200) { | ||
| 101 | - const valid = data.list.filter((item) => item.status == "1"); // 有效 | ||
| 102 | - const invalid = data.list.filter((item) => item.status == "0"); // 无效 | ||
| 103 | - // valid.reverse(); // 有效航班修改时间排序 | ||
| 104 | - // invalid.reverse(); // | ||
| 105 | - // const newValid = sortList(valid, "originOfFlightNo"); // 有效原航班按字母排序 | ||
| 106 | - // const newInvalid = sortList(invalid, "originOfFlightNo"); | ||
| 107 | - // this.tableData = newValid.concat(newInvalid); | ||
| 108 | - this.tableData = valid.concat(invalid); | ||
| 109 | - this.pageConfig.total = data.total; | ||
| 110 | - } | ||
| 111 | - }) | ||
| 112 | - .catch(() => {}); | ||
| 113 | - }, | ||
| 114 | - // 失焦事件 | ||
| 115 | - blurEvent({ originOfFlightNo }) { | ||
| 116 | - this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo); | ||
| 117 | - }, | ||
| 118 | - // 搜索 | ||
| 119 | - searchBtn() { | ||
| 120 | - this.pageConfig.pageData.page = 1; | ||
| 121 | - this.pageConfig.pageData.size = 10; | ||
| 122 | - this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | ||
| 123 | - this.queryFindAllEtesRules(); | ||
| 124 | - }); | ||
| 125 | - }, | ||
| 126 | - // 翻页序号递增 | ||
| 127 | - indexAdd(index){ | ||
| 128 | - const page = this.pageConfig.pageData.page // 当前页码 | ||
| 129 | - const pagesize = this.pageConfig.pageData.size // 每页条数 | ||
| 130 | - return index + 1 + (page - 1) * pagesize | ||
| 131 | - }, | ||
| 132 | - //条数变化 | ||
| 133 | - handleSizeChange(e) { | ||
| 134 | - this.pageConfig.pageData.size = e; | ||
| 135 | - this.pageConfig.pageData.page = 1; | ||
| 136 | - this.queryFindAllEtesRules(); | ||
| 137 | - }, | ||
| 138 | - //页码变化 | ||
| 139 | - handleCurrentChange(e) { | ||
| 140 | - this.pageConfig.pageData.page = e; | ||
| 141 | - this.queryFindAllEtesRules(); | ||
| 142 | - }, | ||
| 143 | - // 添加 | ||
| 144 | - addBtn(item) { | ||
| 145 | - this.$router.push({ | ||
| 146 | - path: "/edit", | ||
| 147 | - query: { | ||
| 148 | - name: "add", | ||
| 149 | - }, | ||
| 150 | - }); | ||
| 151 | - }, | ||
| 152 | - // 重置表单 | ||
| 153 | - restForm() { | ||
| 154 | - this.$refs.ruleForm.resetFields("ruleForm"); | ||
| 155 | - }, | ||
| 156 | - // 查看 | ||
| 157 | - viewRow({ row }) { | ||
| 158 | - this.$router.push({ | ||
| 159 | - path: "/edit", | ||
| 160 | - query: { | ||
| 161 | - name: "view", | ||
| 162 | - id: row.id, | ||
| 163 | - status: row.status, | ||
| 164 | - }, | ||
| 165 | - }); | ||
| 166 | - }, | ||
| 167 | - // 编辑 | ||
| 168 | - editRow({ row }) { | ||
| 169 | - this.$router.push({ | ||
| 170 | - path: "/edit", | ||
| 171 | - query: { | ||
| 172 | - name: "edit", | ||
| 173 | - id: row.id, | ||
| 174 | - status: row.status, | ||
| 175 | - }, | ||
| 176 | - }); | ||
| 177 | - }, | ||
| 178 | - // 删除 | ||
| 179 | - deleteRow({ row }) { | ||
| 180 | - this.$confirm("是否确认删除? 删除后该规则设置为无效,不可恢复", "提示", { | ||
| 181 | - confirmButtonText: "确定", | ||
| 182 | - cancelButtonText: "取消", | ||
| 183 | - type: "warning", | ||
| 184 | - center: true, | ||
| 185 | - }) | ||
| 186 | - .then(() => { | ||
| 187 | - deleteEtesRuleById({ id: row.id }).then((res) => { | ||
| 188 | - const { code, msg } = res; | ||
| 189 | - if (code == 200) { | ||
| 190 | - this.searchBtn(); | ||
| 191 | - this.msgSuccess("删除成功!"); | ||
| 192 | - } else { | ||
| 193 | - this.msgError(msg || "删除失败"); | ||
| 194 | - } | ||
| 195 | - }); | ||
| 196 | - }) | ||
| 197 | - .catch(() => {}); | ||
| 198 | - }, | ||
| 199 | - }, | ||
| 200 | -}; | ||
| 201 | -</script> | ||
| 202 | -<style lang="scss" scoped></style> |
| 1 | -const state = { | ||
| 2 | - 1: "有效", | ||
| 3 | - 0: "无效", | ||
| 4 | -}; | ||
| 5 | -export const tableAttr = { | ||
| 6 | - border: true, | ||
| 7 | - loadingTable: false, | ||
| 8 | - isDragSort: false, // 拖拽tableData数据一定要加id字段 | ||
| 9 | - maxHeight: 0, | ||
| 10 | - // defaultSort: { prop: "updateTime", order: "descending" }, | ||
| 11 | - btnCofig: { | ||
| 12 | - isBtn: true, | ||
| 13 | - btnGroup: [ | ||
| 14 | - { | ||
| 15 | - type: "primary", // text、primary、danger | ||
| 16 | - icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right | ||
| 17 | - btnName: "搜索", | ||
| 18 | - size: "mini", // medium / small / mini | ||
| 19 | - round: false, | ||
| 20 | - loading: false, | ||
| 21 | - event: "search", | ||
| 22 | - }, | ||
| 23 | - { | ||
| 24 | - type: "primary", | ||
| 25 | - icon: "el-icon-plus", | ||
| 26 | - btnName: "添加", | ||
| 27 | - size: "mini", | ||
| 28 | - round: false, | ||
| 29 | - loading: false, | ||
| 30 | - event: "add", | ||
| 31 | - }, | ||
| 32 | - ], | ||
| 33 | - }, | ||
| 34 | -}; | ||
| 35 | -export const columnHeader = (indexAdd, viewRow, editRow, deleteRow) => [ | ||
| 36 | - { | ||
| 37 | - type: "index", | ||
| 38 | - label: "序号", | ||
| 39 | - prop: "id", | ||
| 40 | - align: "center", | ||
| 41 | - width: "50", | ||
| 42 | - index: indexAdd, | ||
| 43 | - }, | ||
| 44 | - { | ||
| 45 | - label: "原航班", | ||
| 46 | - prop: "originOfFlightNo", | ||
| 47 | - align: "center", | ||
| 48 | - minWidth: 80, | ||
| 49 | - }, | ||
| 50 | - { | ||
| 51 | - label: "配载航班", | ||
| 52 | - prop: "rankFltNoStr", | ||
| 53 | - align: "center", | ||
| 54 | - minWidth: 120, | ||
| 55 | - }, | ||
| 56 | - { | ||
| 57 | - label: "航线", | ||
| 58 | - prop: "rankFltRouteStr", | ||
| 59 | - align: "center", | ||
| 60 | - minWidth: 140, | ||
| 61 | - }, | ||
| 62 | - { | ||
| 63 | - label: "状态", | ||
| 64 | - prop: "status", | ||
| 65 | - align: "center", | ||
| 66 | - minWidth: 50, | ||
| 67 | - render: (h, params) => { | ||
| 68 | - const { row } = params; | ||
| 69 | - return h("div", `${state[row.status]}`); | ||
| 70 | - }, | ||
| 71 | - }, | ||
| 72 | - { | ||
| 73 | - label: "修改时间", | ||
| 74 | - prop: "updateTime", | ||
| 75 | - align: "center", | ||
| 76 | - minWidth: 80, | ||
| 77 | - // sortable: true, | ||
| 78 | - // "sort-method": (a, b) => a.createTime - b.createTime, | ||
| 79 | - }, | ||
| 80 | - { | ||
| 81 | - label: "修改人", | ||
| 82 | - prop: "updateUserName", | ||
| 83 | - align: "center", | ||
| 84 | - minWidth: 60, | ||
| 85 | - }, | ||
| 86 | - { | ||
| 87 | - label: "操作", | ||
| 88 | - prop: "operate", | ||
| 89 | - align: "center", | ||
| 90 | - minWidth: 90, | ||
| 91 | - fixed: "right", | ||
| 92 | - render: (h, params) => { | ||
| 93 | - let operateData = []; | ||
| 94 | - if (params.row.status == "1") { | ||
| 95 | - operateData = [ | ||
| 96 | - h( | ||
| 97 | - "el-button", | ||
| 98 | - { | ||
| 99 | - props: { | ||
| 100 | - type: "text", | ||
| 101 | - size: "mini", | ||
| 102 | - icon: "el-icon-view", | ||
| 103 | - }, | ||
| 104 | - on: { | ||
| 105 | - click() { | ||
| 106 | - viewRow(params); | ||
| 107 | - }, | ||
| 108 | - }, | ||
| 109 | - }, | ||
| 110 | - "查看" | ||
| 111 | - ), | ||
| 112 | - h( | ||
| 113 | - "el-button", | ||
| 114 | - { | ||
| 115 | - props: { | ||
| 116 | - type: "text", | ||
| 117 | - size: "mini", | ||
| 118 | - icon: "el-icon-edit", | ||
| 119 | - }, | ||
| 120 | - on: { | ||
| 121 | - click() { | ||
| 122 | - editRow(params); | ||
| 123 | - }, | ||
| 124 | - }, | ||
| 125 | - }, | ||
| 126 | - "修改" | ||
| 127 | - ), | ||
| 128 | - h( | ||
| 129 | - "el-button", | ||
| 130 | - { | ||
| 131 | - style: { | ||
| 132 | - color: "#ff4949", | ||
| 133 | - }, | ||
| 134 | - props: { | ||
| 135 | - type: "text", | ||
| 136 | - size: "mini", | ||
| 137 | - icon: "el-icon-delete", | ||
| 138 | - }, | ||
| 139 | - on: { | ||
| 140 | - click() { | ||
| 141 | - deleteRow(params); | ||
| 142 | - }, | ||
| 143 | - }, | ||
| 144 | - }, | ||
| 145 | - "删除" | ||
| 146 | - ), | ||
| 147 | - ]; | ||
| 148 | - } else { | ||
| 149 | - operateData = [ | ||
| 150 | - h( | ||
| 151 | - "el-button", | ||
| 152 | - { | ||
| 153 | - props: { | ||
| 154 | - type: "text", | ||
| 155 | - size: "mini", | ||
| 156 | - icon: "el-icon-view", | ||
| 157 | - }, | ||
| 158 | - on: { | ||
| 159 | - click() { | ||
| 160 | - viewRow(params); | ||
| 161 | - }, | ||
| 162 | - }, | ||
| 163 | - }, | ||
| 164 | - "查看" | ||
| 165 | - ), | ||
| 166 | - ]; | ||
| 167 | - } | ||
| 168 | - return h("div", operateData); | ||
| 169 | - }, | ||
| 170 | - }, | ||
| 171 | -]; |
| 1 | -<template> | ||
| 2 | - <div class="error-container"> | ||
| 3 | - <el-dialog | ||
| 4 | - :width="width" | ||
| 5 | - :title="title" | ||
| 6 | - :center="center" | ||
| 7 | - :visible.sync="dialogVisible" | ||
| 8 | - :close-on-click-modal="onModalClickClose" | ||
| 9 | - @open="dialogOpenEvent" | ||
| 10 | - @close="dialogCloseEvent" | ||
| 11 | - > | ||
| 12 | - <slot></slot> | ||
| 13 | - <span slot="footer" class="dialog-footer"> | ||
| 14 | - <el-button @click="cancel">取 消</el-button> | ||
| 15 | - <el-button type="primary" @click="confirm">{{ | ||
| 16 | - confirmBtnName | ||
| 17 | - }}</el-button> | ||
| 18 | - </span> | ||
| 19 | - </el-dialog> | ||
| 20 | - </div> | ||
| 21 | -</template> | ||
| 22 | - | ||
| 23 | -<script> | ||
| 24 | -export default { | ||
| 25 | - props: { | ||
| 26 | - width: { | ||
| 27 | - type: String, | ||
| 28 | - default: "50%", | ||
| 29 | - }, | ||
| 30 | - title: { | ||
| 31 | - type: String, | ||
| 32 | - default: "标题", | ||
| 33 | - }, | ||
| 34 | - center: { | ||
| 35 | - type: String, | ||
| 36 | - default: "center", | ||
| 37 | - }, | ||
| 38 | - confirmBtnName: { | ||
| 39 | - type: String, | ||
| 40 | - default: "确 定", | ||
| 41 | - }, | ||
| 42 | - onModalClickClose: { | ||
| 43 | - type: Boolean, | ||
| 44 | - default: false, | ||
| 45 | - }, | ||
| 46 | - }, | ||
| 47 | - data() { | ||
| 48 | - return { | ||
| 49 | - dialogVisible: false, | ||
| 50 | - }; | ||
| 51 | - }, | ||
| 52 | - computed: {}, | ||
| 53 | - created() {}, | ||
| 54 | - mounted() {}, | ||
| 55 | - methods: { | ||
| 56 | - dialogOpenEvent(data) { | ||
| 57 | - if (data && data.length) { | ||
| 58 | - console.log(data); | ||
| 59 | - } | ||
| 60 | - this.dialogVisible = true; | ||
| 61 | - this.$emit("open"); | ||
| 62 | - }, | ||
| 63 | - dialogCloseEvent() { | ||
| 64 | - this.dialogVisible = false; | ||
| 65 | - this.$emit("close"); | ||
| 66 | - }, | ||
| 67 | - // 确认事件 | ||
| 68 | - confirm() { | ||
| 69 | - this.dialogVisible = false; | ||
| 70 | - this.$emit("confirm"); | ||
| 71 | - }, | ||
| 72 | - // 取消事件 | ||
| 73 | - cancel() { | ||
| 74 | - this.dialogVisible = false; | ||
| 75 | - this.$emit("cancel"); | ||
| 76 | - }, | ||
| 77 | - }, | ||
| 78 | -}; | ||
| 79 | -</script> | ||
| 80 | -<style lang='scss' scoped> | ||
| 81 | - | ||
| 82 | -</style> |
| 1 | -<template> | ||
| 2 | - <div ref="formHeaderRef" class="form-header container"> | ||
| 3 | - <el-row> | ||
| 4 | - <el-col> | ||
| 5 | - <yl-form | ||
| 6 | - ref="ruleForm" | ||
| 7 | - :formConfig="formConfig" | ||
| 8 | - :queryForm="queryForm" | ||
| 9 | - :inline="false" | ||
| 10 | - formWidth="auto" | ||
| 11 | - /> | ||
| 12 | - </el-col> | ||
| 13 | - </el-row> | ||
| 14 | - <yl-table | ||
| 15 | - ref="ylTable" | ||
| 16 | - :attrs="tableAttr" | ||
| 17 | - :loadingTable="tableAttr.loadingTable" | ||
| 18 | - :columns="columns" | ||
| 19 | - :tableData="tableData" | ||
| 20 | - :pageConfig="pageConfig" | ||
| 21 | - @search="searchBtn" | ||
| 22 | - @upload="toUpload" | ||
| 23 | - @export="exportTemplate" | ||
| 24 | - @delete="deleteData" | ||
| 25 | - @sizeChange="handleSizeChange" | ||
| 26 | - @currentChange="handleCurrentChange" | ||
| 27 | - @selectionEvent="tableSelectionChange" | ||
| 28 | - > | ||
| 29 | - </yl-table> | ||
| 30 | - </div> | ||
| 31 | -</template> | ||
| 32 | -<script> | ||
| 33 | -import YlForm from "@/components/YlForm"; | ||
| 34 | -import YlTable from "@/components/YlTable"; | ||
| 35 | -import { formConfig } from "./formConfig"; | ||
| 36 | -import { tableAttr, columnHeader } from "./tableConfig"; | ||
| 37 | -import { restTableHeight } from "@/utils"; | ||
| 38 | -import { | ||
| 39 | - findShipmentDescList, // HScode英文品名黑名单查询 | ||
| 40 | - uploadShipmentDesc, // HScode英文品名黑名单导入 | ||
| 41 | - delBlackList, // HScode黑名单/英文品名删除 | ||
| 42 | -} from "@/api/et86ShipmentDesc"; | ||
| 43 | -import { downLoadXlsx } from "@/utils/zipdownload"; | ||
| 44 | -export default { | ||
| 45 | - name: "et86ShipmentDesc", | ||
| 46 | - components: { | ||
| 47 | - YlForm, | ||
| 48 | - YlTable, | ||
| 49 | - }, | ||
| 50 | - data() { | ||
| 51 | - return { | ||
| 52 | - formConfig: formConfig, // 表单配置项 | ||
| 53 | - queryForm: { | ||
| 54 | - searchValue: "", | ||
| 55 | - }, // 表单参数 | ||
| 56 | - pageConfig: { | ||
| 57 | - // 分页配置项 | ||
| 58 | - isPagination: true, | ||
| 59 | - total: 0, | ||
| 60 | - pageData: { | ||
| 61 | - page: 1, | ||
| 62 | - size: 10, | ||
| 63 | - }, | ||
| 64 | - }, | ||
| 65 | - tableAttr: tableAttr, // table配置项 | ||
| 66 | - columns: columnHeader(this.indexAdd, this.deleteRow), // 表头 | ||
| 67 | - tableData: [], // 表格数据 | ||
| 68 | - multipleSelection: [], | ||
| 69 | - }; | ||
| 70 | - }, | ||
| 71 | - created() { | ||
| 72 | - // 黑名单查询 | ||
| 73 | - this.$nextTick(() => { | ||
| 74 | - this.searchBtn(); | ||
| 75 | - }); | ||
| 76 | - }, | ||
| 77 | - mounted() { | ||
| 78 | - this.$nextTick(() => { | ||
| 79 | - this.tableAttr.maxHeight = | ||
| 80 | - window.innerHeight - restTableHeight(this.$refs); | ||
| 81 | - }); | ||
| 82 | - }, | ||
| 83 | - methods: { | ||
| 84 | - // HScode黑名单查询 | ||
| 85 | - queryFindShipmentDescList() { | ||
| 86 | - const { page, size } = this.pageConfig.pageData; | ||
| 87 | - let params = { | ||
| 88 | - limitStart: (page - 1) * size, | ||
| 89 | - limitSize: size, | ||
| 90 | - ...this.queryForm, | ||
| 91 | - }; | ||
| 92 | - this.tableAttr.loadingTable = true; | ||
| 93 | - findShipmentDescList(params) | ||
| 94 | - .then((res) => { | ||
| 95 | - this.tableAttr.loadingTable = false; | ||
| 96 | - const { code, data } = res; | ||
| 97 | - if (code == 200) { | ||
| 98 | - this.tableData = data.list; | ||
| 99 | - this.pageConfig.total = data.total; | ||
| 100 | - } | ||
| 101 | - }) | ||
| 102 | - .catch(() => {}); | ||
| 103 | - }, | ||
| 104 | - // 删除黑名单 | ||
| 105 | - toDelBlackList(params) { | ||
| 106 | - delBlackList(params) | ||
| 107 | - .then((res) => { | ||
| 108 | - const { code, msg } = res; | ||
| 109 | - if (code == 200) { | ||
| 110 | - this.searchBtn(); | ||
| 111 | - this.msgSuccess(msg || "删除成功!"); | ||
| 112 | - } else { | ||
| 113 | - this.$message.error(msg || "删除失败"); | ||
| 114 | - } | ||
| 115 | - }) | ||
| 116 | - .catch(() => {}); | ||
| 117 | - }, | ||
| 118 | - // 选择上传【HScode黑名单导入】 | ||
| 119 | - toUpload({ file }) { | ||
| 120 | - const formData = new FormData(); | ||
| 121 | - formData.append("file", file); | ||
| 122 | - uploadShipmentDesc(formData) | ||
| 123 | - .then((res) => { | ||
| 124 | - const { code, data, msg } = res; | ||
| 125 | - if (code == 200) { | ||
| 126 | - this.searchBtn(); | ||
| 127 | - this.msgSuccess(msg || "导入成功!"); | ||
| 128 | - } else { | ||
| 129 | - this.$message.error(msg || "导入失败"); | ||
| 130 | - this.$router.push({ | ||
| 131 | - path: "/errorInfo", | ||
| 132 | - query: { | ||
| 133 | - name: "errorInfo", | ||
| 134 | - error: code, | ||
| 135 | - data: JSON.stringify(data), | ||
| 136 | - }, | ||
| 137 | - }); | ||
| 138 | - } | ||
| 139 | - }) | ||
| 140 | - .catch(() => {}); | ||
| 141 | - }, | ||
| 142 | - // 导出 | ||
| 143 | - exportTemplate(row, i) { | ||
| 144 | - this.tableAttr.btnCofig.btnGroup[i].loading = true; | ||
| 145 | - downLoadXlsx( | ||
| 146 | - "/etes/exportShipmentDescList", | ||
| 147 | - this.queryForm, | ||
| 148 | - "HSCODE英文品名黑名单表" | ||
| 149 | - ) | ||
| 150 | - .then(() => { | ||
| 151 | - this.tableAttr.btnCofig.btnGroup[i].loading = false; | ||
| 152 | - }) | ||
| 153 | - .catch(() => { | ||
| 154 | - this.$message.error("导出失败"); | ||
| 155 | - }); | ||
| 156 | - }, | ||
| 157 | - // 删除 | ||
| 158 | - deleteData(row) { | ||
| 159 | - if (this.multipleSelection.length) { | ||
| 160 | - let params = []; | ||
| 161 | - this.multipleSelection.map((item) => { | ||
| 162 | - params.push(item.id); | ||
| 163 | - }); | ||
| 164 | - this.$confirm("是否确认删除?", "提示", { | ||
| 165 | - confirmButtonText: "确定", | ||
| 166 | - cancelButtonText: "取消", | ||
| 167 | - type: "warning", | ||
| 168 | - center: true, | ||
| 169 | - }) | ||
| 170 | - .then(() => { | ||
| 171 | - this.toDelBlackList(params); | ||
| 172 | - }) | ||
| 173 | - .catch(() => {}); | ||
| 174 | - } else { | ||
| 175 | - this.$message.error("请勾选一条或者多条数据再操作!"); | ||
| 176 | - } | ||
| 177 | - }, | ||
| 178 | - // 搜索 | ||
| 179 | - searchBtn() { | ||
| 180 | - this.pageConfig.pageData.page = 1; | ||
| 181 | - this.pageConfig.pageData.size = 10; | ||
| 182 | - this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | ||
| 183 | - this.queryFindShipmentDescList(); | ||
| 184 | - }); | ||
| 185 | - }, | ||
| 186 | - // 翻页序号递增 | ||
| 187 | - indexAdd(index){ | ||
| 188 | - const page = this.pageConfig.pageData.page // 当前页码 | ||
| 189 | - const pagesize = this.pageConfig.pageData.size // 每页条数 | ||
| 190 | - return index + 1 + (page - 1) * pagesize | ||
| 191 | - }, | ||
| 192 | - //条数变化 | ||
| 193 | - handleSizeChange(e) { | ||
| 194 | - this.pageConfig.pageData.size = e; | ||
| 195 | - this.pageConfig.pageData.page = 1; | ||
| 196 | - this.queryFindShipmentDescList(); | ||
| 197 | - }, | ||
| 198 | - //页码变化 | ||
| 199 | - handleCurrentChange(e) { | ||
| 200 | - this.pageConfig.pageData.page = e; | ||
| 201 | - this.queryFindShipmentDescList(); | ||
| 202 | - }, | ||
| 203 | - // table勾选 | ||
| 204 | - tableSelectionChange(val) { | ||
| 205 | - this.multipleSelection = val; | ||
| 206 | - }, | ||
| 207 | - // 删除 | ||
| 208 | - deleteRow({ row }) { | ||
| 209 | - this.$confirm("是否确认删除?", "提示", { | ||
| 210 | - confirmButtonText: "确定", | ||
| 211 | - cancelButtonText: "取消", | ||
| 212 | - type: "warning", | ||
| 213 | - center: true, | ||
| 214 | - }) | ||
| 215 | - .then(() => { | ||
| 216 | - this.toDelBlackList([row.id]); | ||
| 217 | - }) | ||
| 218 | - .catch(() => {}); | ||
| 219 | - }, | ||
| 220 | - }, | ||
| 221 | -}; | ||
| 222 | -</script> | ||
| 223 | -<style lang="scss" scoped></style> |
| 1 | -export const tableAttr = { | ||
| 2 | - border: true, | ||
| 3 | - loadingTable: false, | ||
| 4 | - isDragSort: false, // 拖拽tableData数据一定要加id字段 | ||
| 5 | - maxHeight: 300, | ||
| 6 | - btnCofig: { | ||
| 7 | - isBtn: true, | ||
| 8 | - btnGroup: [ | ||
| 9 | - { | ||
| 10 | - type: "primary", // text、primary、danger | ||
| 11 | - icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right | ||
| 12 | - btnName: "搜索", | ||
| 13 | - size: "mini", // medium / small / mini | ||
| 14 | - round: false, | ||
| 15 | - loading: false, | ||
| 16 | - event: "search", | ||
| 17 | - }, | ||
| 18 | - { | ||
| 19 | - type: "primary", | ||
| 20 | - icon: "el-icon-upload", | ||
| 21 | - btnName: "导入", | ||
| 22 | - size: "mini", | ||
| 23 | - round: false, | ||
| 24 | - loading: false, | ||
| 25 | - event: "upLoad", | ||
| 26 | - action: "/goods/uploadGoodsExcel", | ||
| 27 | - fileName: "name", | ||
| 28 | - limit: 1, | ||
| 29 | - accept: ".xlsx", | ||
| 30 | - }, | ||
| 31 | - { | ||
| 32 | - type: "primary", | ||
| 33 | - icon: "el-icon-download", | ||
| 34 | - btnName: "导出", | ||
| 35 | - size: "mini", | ||
| 36 | - round: false, | ||
| 37 | - loading: false, | ||
| 38 | - event: "export", | ||
| 39 | - }, | ||
| 40 | - { | ||
| 41 | - type: "danger", | ||
| 42 | - icon: "el-icon-delete", | ||
| 43 | - btnName: "删除", | ||
| 44 | - size: "mini", | ||
| 45 | - round: false, | ||
| 46 | - loading: false, | ||
| 47 | - event: "delete", | ||
| 48 | - }, | ||
| 49 | - ], | ||
| 50 | - }, | ||
| 51 | -}; | ||
| 52 | -export const columnHeader = (indexAdd, deleteRow) => [ | ||
| 53 | - { | ||
| 54 | - type: "selection", | ||
| 55 | - align: "center", | ||
| 56 | - prop: "selection", | ||
| 57 | - width: "50", | ||
| 58 | - }, | ||
| 59 | - { | ||
| 60 | - type: "index", | ||
| 61 | - label: "序号", | ||
| 62 | - prop: "id", | ||
| 63 | - align: "center", | ||
| 64 | - width: "50", | ||
| 65 | - index: indexAdd, | ||
| 66 | - }, | ||
| 67 | - { | ||
| 68 | - label: "ShipmentDesc", | ||
| 69 | - prop: "blackValue", | ||
| 70 | - align: "center", | ||
| 71 | - minWidth: 100, | ||
| 72 | - }, | ||
| 73 | - { | ||
| 74 | - label: "创建时间", | ||
| 75 | - prop: "createTime", | ||
| 76 | - align: "center", | ||
| 77 | - minWidth: 100, | ||
| 78 | - }, | ||
| 79 | - { | ||
| 80 | - label: "创建人", | ||
| 81 | - prop: "createUserName", | ||
| 82 | - align: "center", | ||
| 83 | - minWidth: 100, | ||
| 84 | - }, | ||
| 85 | - { | ||
| 86 | - label: "文件名", | ||
| 87 | - prop: "uploadFileName", | ||
| 88 | - align: "center", | ||
| 89 | - minWidth: 100, | ||
| 90 | - }, | ||
| 91 | - | ||
| 92 | - { | ||
| 93 | - label: "操作", | ||
| 94 | - prop: "operate", | ||
| 95 | - align: "center", | ||
| 96 | - minWidth: 120, | ||
| 97 | - fixed: "right", | ||
| 98 | - render: (h, params) => { | ||
| 99 | - return h("div", [ | ||
| 100 | - h( | ||
| 101 | - "el-button", | ||
| 102 | - { | ||
| 103 | - style: { | ||
| 104 | - color: "#ff4949", | ||
| 105 | - }, | ||
| 106 | - props: { | ||
| 107 | - type: "text", | ||
| 108 | - size: "mini", | ||
| 109 | - icon: "el-icon-delete", | ||
| 110 | - }, | ||
| 111 | - on: { | ||
| 112 | - click() { | ||
| 113 | - deleteRow(params); | ||
| 114 | - }, | ||
| 115 | - }, | ||
| 116 | - }, | ||
| 117 | - "删除" | ||
| 118 | - ), | ||
| 119 | - ]); | ||
| 120 | - }, | ||
| 121 | - }, | ||
| 122 | -]; |
| ... | @@ -100,11 +100,6 @@ | ... | @@ -100,11 +100,6 @@ |
| 100 | }}<i class="el-icon-link"></i> </el-link> | 100 | }}<i class="el-icon-link"></i> </el-link> |
| 101 | </template> | 101 | </template> |
| 102 | <template slot="optionColumn"> | 102 | <template slot="optionColumn"> |
| 103 | - <el-table-column label="是否为ET86航线" align="center"> | ||
| 104 | - <template slot-scope="scope"> | ||
| 105 | - <el-checkbox v-model="scope.row.isEtesRoute" @change="checkboxIsEtesRoute(scope)"></el-checkbox> | ||
| 106 | - </template> | ||
| 107 | - </el-table-column> | ||
| 108 | <el-table-column label="操作" align="center"> | 103 | <el-table-column label="操作" align="center"> |
| 109 | <template slot-scope="scope"> | 104 | <template slot-scope="scope"> |
| 110 | <el-button size="mini" type="text" style="color:#ff4949" icon="el-icon-delete" | 105 | <el-button size="mini" type="text" style="color:#ff4949" icon="el-icon-delete" |
| ... | @@ -171,7 +166,7 @@ | ... | @@ -171,7 +166,7 @@ |
| 171 | 166 | ||
| 172 | <script> | 167 | <script> |
| 173 | import Dialog from './dialog.vue' | 168 | import Dialog from './dialog.vue' |
| 174 | -import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight, queryRoute, delRoute, checkFlightRoute, updateRoute } from '@/api/system/dictionary.js' | 169 | +import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight, queryRoute, delRoute, checkFlightRoute } from '@/api/system/dictionary.js' |
| 175 | 170 | ||
| 176 | export default { | 171 | export default { |
| 177 | name: 'DictionaryConfig', | 172 | name: 'DictionaryConfig', |
| ... | @@ -251,25 +246,6 @@ export default { | ... | @@ -251,25 +246,6 @@ export default { |
| 251 | }, | 246 | }, |
| 252 | }, | 247 | }, |
| 253 | methods: { | 248 | methods: { |
| 254 | - /* | ||
| 255 | - 【更新航线】 | ||
| 256 | - 更新路由成功后不用去调查询接口, | ||
| 257 | - 因为即便不去刷新页面调查询接口, | ||
| 258 | - 当前checkBox都是当前操作的状态; | ||
| 259 | - 所以调不调查询接口没有意义,反而消耗后台服务; | ||
| 260 | - */ | ||
| 261 | - async updateRouteSubmit(params){ | ||
| 262 | - await updateRoute(params).then(res=>{ | ||
| 263 | - if(res.code == 200){ | ||
| 264 | - this.msgSuccess(res.msg) | ||
| 265 | - }else{ | ||
| 266 | - this.msgError(res.msg); | ||
| 267 | - } | ||
| 268 | - }).catch(err => { | ||
| 269 | - console.log(err) | ||
| 270 | - this.msgWarning(err) | ||
| 271 | - }) | ||
| 272 | - }, | ||
| 273 | //字典名称 | 249 | //字典名称 |
| 274 | dictNameSelect() { | 250 | dictNameSelect() { |
| 275 | getDictNameList().then(res => { | 251 | getDictNameList().then(res => { |
| ... | @@ -375,22 +351,7 @@ export default { | ... | @@ -375,22 +351,7 @@ export default { |
| 375 | } else if (this.tableName === '虚拟航班') { | 351 | } else if (this.tableName === '虚拟航班') { |
| 376 | this.flightDel([val.id]) | 352 | this.flightDel([val.id]) |
| 377 | } else if (this.tableName === '航线') { | 353 | } else if (this.tableName === '航线') { |
| 378 | - /* | 354 | + this.routeDel({ data: [val], id: [val.id] }) |
| 379 | - 如果该航线是普通航线直接删,如果是ET86航线,那么要查询该航线有没有设置维度, | ||
| 380 | - 如果没有直接删,如果已经设置了维度是否考虑将该航线下的维度删掉再进行操作; | ||
| 381 | - */ | ||
| 382 | - if(!val.isEtesRoute){ // 普通航线 | ||
| 383 | - this.routeDel({ data: [val], id: [val.id] }) | ||
| 384 | - }else{ // ET86航线 | ||
| 385 | - this.$confirm("该航线是ET86航线。是否要删除", "注意!", { | ||
| 386 | - closeOnClickModal: false, | ||
| 387 | - confirmButtonText: "确定删除", | ||
| 388 | - cancelButtonText: "取消", | ||
| 389 | - type: "warning", | ||
| 390 | - }).then(() => { | ||
| 391 | - this.routeDel({ data: [val], id: [val.id] }) | ||
| 392 | - }).catch(() => { }) | ||
| 393 | - } | ||
| 394 | } else { | 355 | } else { |
| 395 | this.dicDel([val.id]) | 356 | this.dicDel([val.id]) |
| 396 | } | 357 | } |
| ... | @@ -553,35 +514,6 @@ export default { | ... | @@ -553,35 +514,6 @@ export default { |
| 553 | serviceCodeTableSelectAll(val) { | 514 | serviceCodeTableSelectAll(val) { |
| 554 | this.nowSelect = val | 515 | this.nowSelect = val |
| 555 | }, | 516 | }, |
| 556 | - // 确认消息提示 | ||
| 557 | - confirmHandle($index, row){ | ||
| 558 | - this.$confirm(row.msg, "提示", { | ||
| 559 | - confirmButtonText: "确定", | ||
| 560 | - cancelButtonText: "取消", | ||
| 561 | - type: "warning", | ||
| 562 | - center: true, | ||
| 563 | - }) | ||
| 564 | - .then(() => { | ||
| 565 | - this.updateRouteSubmit(row.id); | ||
| 566 | - }) | ||
| 567 | - .catch(() => { | ||
| 568 | - this.tableData[$index].isEtesRoute = !this.tableData[$index].isEtesRoute; | ||
| 569 | - }); | ||
| 570 | - }, | ||
| 571 | - // checkBox是否设置ET86航线 | ||
| 572 | - checkboxIsEtesRoute({ $index, row }){ | ||
| 573 | - if(!row.isEtesRoute){ | ||
| 574 | - /* | ||
| 575 | - 将ET86设置成普通航线要查询校验该航线有没有设置维度, | ||
| 576 | - 如果该航线设置了ET86维度是否考虑将该航线下的维度删掉再进行操作; | ||
| 577 | - */ | ||
| 578 | - row.msg = "是否将该航线设置为非ET86航线?"; | ||
| 579 | - this.confirmHandle($index, row) | ||
| 580 | - }else{ | ||
| 581 | - row.msg = "是否将该航线设置为ET86航线?"; | ||
| 582 | - this.confirmHandle($index, row) | ||
| 583 | - } | ||
| 584 | - } | ||
| 585 | } | 517 | } |
| 586 | } | 518 | } |
| 587 | </script> | 519 | </script> | ... | ... |
-
Please register or login to post a comment