Showing
16 changed files
with
179 additions
and
176 deletions
| ... | @@ -7,22 +7,45 @@ | ... | @@ -7,22 +7,45 @@ |
| 7 | <el-form | 7 | <el-form |
| 8 | :model="tempQueryForm" | 8 | :model="tempQueryForm" |
| 9 | :inline="inline" | 9 | :inline="inline" |
| 10 | + :label-position="position" | ||
| 11 | + :label-width="formWidth" | ||
| 10 | :loading="loading" | 12 | :loading="loading" |
| 11 | ref="ruleForm" | 13 | ref="ruleForm" |
| 12 | :size="size" | 14 | :size="size" |
| 13 | > | 15 | > |
| 14 | - <el-form-item | 16 | + <el-row |
| 17 | + :gutter="rowGutter" | ||
| 18 | + :type="rowType" | ||
| 19 | + :justify="rowJustify" | ||
| 20 | + :align="rowAlign" | ||
| 21 | + :tag="rowTag" | ||
| 22 | + > | ||
| 23 | + <el-col | ||
| 15 | v-for="item in tempFormConfig" | 24 | v-for="item in tempFormConfig" |
| 16 | - :label="item.label" | 25 | + :span="item.span" |
| 26 | + :offset="item.offset" | ||
| 27 | + :tag="item.tag" | ||
| 28 | + :push="item.push" | ||
| 29 | + :pull="item.pull" | ||
| 30 | + :xs="item.xs" | ||
| 31 | + :sm="item.sm" | ||
| 32 | + :md="item.md" | ||
| 33 | + :lg="item.lg" | ||
| 34 | + :xl="item.xl" | ||
| 35 | + :style="{ width: item.colWidth }" | ||
| 17 | :key="item.prop" | 36 | :key="item.prop" |
| 37 | + > | ||
| 38 | + <el-form-item | ||
| 39 | + :label="item.label" | ||
| 18 | :prop="item.prop" | 40 | :prop="item.prop" |
| 19 | :rules="item.rules" | 41 | :rules="item.rules" |
| 42 | + :label-width="item.labelWidth" | ||
| 20 | > | 43 | > |
| 21 | <!-- 输入框 --> | 44 | <!-- 输入框 --> |
| 22 | <el-input | 45 | <el-input |
| 23 | v-if="item.type === 'Input'" | 46 | v-if="item.type === 'Input'" |
| 24 | v-model.trim="tempQueryForm[item.prop]" | 47 | v-model.trim="tempQueryForm[item.prop]" |
| 25 | - :style="{ width: item.width }" | 48 | + :style="{ width: item.inputWidth }" |
| 26 | :disabled="item.disable" | 49 | :disabled="item.disable" |
| 27 | :placeholder=" | 50 | :placeholder=" |
| 28 | item.placeholder ? item.placeholder : '请输入' + item.label | 51 | item.placeholder ? item.placeholder : '请输入' + item.label |
| ... | @@ -46,7 +69,7 @@ | ... | @@ -46,7 +69,7 @@ |
| 46 | :min="item.min" | 69 | :min="item.min" |
| 47 | :max="item.max" | 70 | :max="item.max" |
| 48 | v-model.trim="tempQueryForm[item.prop]" | 71 | v-model.trim="tempQueryForm[item.prop]" |
| 49 | - :style="{ width: item.width }" | 72 | + :style="{ width: item.inputWidth }" |
| 50 | :disabled="item.disable" | 73 | :disabled="item.disable" |
| 51 | :placeholder=" | 74 | :placeholder=" |
| 52 | item.placeholder ? item.placeholder : '请输入' + item.label | 75 | item.placeholder ? item.placeholder : '请输入' + item.label |
| ... | @@ -62,20 +85,21 @@ | ... | @@ -62,20 +85,21 @@ |
| 62 | :min="0" | 85 | :min="0" |
| 63 | :max="10" | 86 | :max="10" |
| 64 | :size="item.size" | 87 | :size="item.size" |
| 65 | - :style="{ width: item.width }" | 88 | + :style="{ width: item.inputWidth }" |
| 66 | label="描述文字" | 89 | label="描述文字" |
| 67 | ></el-input-number> | 90 | ></el-input-number> |
| 68 | 91 | ||
| 69 | <template v-if="view"> | 92 | <template v-if="view"> |
| 70 | <span v-text="tempQueryForm[item.prop]"></span> | 93 | <span v-text="tempQueryForm[item.prop]"></span> |
| 71 | </template> | 94 | </template> |
| 95 | + | ||
| 72 | <!-- 下拉选择 --> | 96 | <!-- 下拉选择 --> |
| 73 | <el-select | 97 | <el-select |
| 74 | v-if="item.type === 'Select'" | 98 | v-if="item.type === 'Select'" |
| 75 | :multiple="item.multiple" | 99 | :multiple="item.multiple" |
| 76 | :filterable="item.filterable" | 100 | :filterable="item.filterable" |
| 77 | v-model.trim="tempQueryForm[item.prop]" | 101 | v-model.trim="tempQueryForm[item.prop]" |
| 78 | - :style="{ width: item.width }" | 102 | + :style="{ width: item.inputWidth }" |
| 79 | :disabled="item.disable" | 103 | :disabled="item.disable" |
| 80 | :loading="searchLoading" | 104 | :loading="searchLoading" |
| 81 | :placeholder=" | 105 | :placeholder=" |
| ... | @@ -91,11 +115,12 @@ | ... | @@ -91,11 +115,12 @@ |
| 91 | > | 115 | > |
| 92 | </el-option> | 116 | </el-option> |
| 93 | </el-select> | 117 | </el-select> |
| 118 | + | ||
| 94 | <!-- 远程搜索 --> | 119 | <!-- 远程搜索 --> |
| 95 | <template v-if="item.type === 'Search'"> | 120 | <template v-if="item.type === 'Search'"> |
| 96 | <el-autocomplete | 121 | <el-autocomplete |
| 97 | v-model.trim="tempQueryForm[item.prop]" | 122 | v-model.trim="tempQueryForm[item.prop]" |
| 98 | - :style="{ width: item.width }" | 123 | + :style="{ width: item.inputWidth }" |
| 99 | :debounce="1500" | 124 | :debounce="1500" |
| 100 | :fetch-suggestions="querySearchAsync" | 125 | :fetch-suggestions="querySearchAsync" |
| 101 | :placeholder=" | 126 | :placeholder=" |
| ... | @@ -111,7 +136,7 @@ | ... | @@ -111,7 +136,7 @@ |
| 111 | <el-date-picker | 136 | <el-date-picker |
| 112 | v-if="item.type === 'Date'" | 137 | v-if="item.type === 'Date'" |
| 113 | v-model.trim="tempQueryForm[item.prop]" | 138 | v-model.trim="tempQueryForm[item.prop]" |
| 114 | - :style="{ width: item.width }" | 139 | + :style="{ width: item.inputWidth }" |
| 115 | :disabled="item.disable" | 140 | :disabled="item.disable" |
| 116 | :placeholder="item.placeholder ? item.placeholder : '请选择日期'" | 141 | :placeholder="item.placeholder ? item.placeholder : '请选择日期'" |
| 117 | :value-format="item.format" | 142 | :value-format="item.format" |
| ... | @@ -123,7 +148,7 @@ | ... | @@ -123,7 +148,7 @@ |
| 123 | <el-time-select | 148 | <el-time-select |
| 124 | v-if="item.type === 'Time'" | 149 | v-if="item.type === 'Time'" |
| 125 | v-model.trim="tempQueryForm[item.prop]" | 150 | v-model.trim="tempQueryForm[item.prop]" |
| 126 | - :style="{ width: item.width }" | 151 | + :style="{ width: item.inputWidth }" |
| 127 | :disabled="item.disable" | 152 | :disabled="item.disable" |
| 128 | :placeholder="item.placeholder ? item.placeholder : '请选择时间'" | 153 | :placeholder="item.placeholder ? item.placeholder : '请选择时间'" |
| 129 | clearable | 154 | clearable |
| ... | @@ -146,7 +171,7 @@ | ... | @@ -146,7 +171,7 @@ |
| 146 | v-if="item.type === 'datetimerange'" | 171 | v-if="item.type === 'datetimerange'" |
| 147 | type="datetimerange" | 172 | type="datetimerange" |
| 148 | v-model.trim="tempQueryForm[item.prop]" | 173 | v-model.trim="tempQueryForm[item.prop]" |
| 149 | - :style="{ width: item.width }" | 174 | + :style="{ width: item.inputWidth }" |
| 150 | :disabled="item.disable" | 175 | :disabled="item.disable" |
| 151 | range-separator="至" | 176 | range-separator="至" |
| 152 | start-placeholder="开始日期" | 177 | start-placeholder="开始日期" |
| ... | @@ -189,7 +214,7 @@ | ... | @@ -189,7 +214,7 @@ |
| 189 | v-if="item.type === 'textarea'" | 214 | v-if="item.type === 'textarea'" |
| 190 | v-model.trim="tempQueryForm[item.prop]" | 215 | v-model.trim="tempQueryForm[item.prop]" |
| 191 | type="textarea" | 216 | type="textarea" |
| 192 | - :style="{ width: item.width }" | 217 | + :style="{ width: item.inputWidth }" |
| 193 | :disabled="item.disable" | 218 | :disabled="item.disable" |
| 194 | :rows="item.row" | 219 | :rows="item.row" |
| 195 | :autosize="item.autosize" | 220 | :autosize="item.autosize" |
| ... | @@ -199,6 +224,7 @@ | ... | @@ -199,6 +224,7 @@ |
| 199 | clearable | 224 | clearable |
| 200 | > | 225 | > |
| 201 | </el-input> | 226 | </el-input> |
| 227 | + | ||
| 202 | <!-- 多选框 --> | 228 | <!-- 多选框 --> |
| 203 | <template v-if="item.type === 'Checkbox'"> | 229 | <template v-if="item.type === 'Checkbox'"> |
| 204 | <el-checkbox | 230 | <el-checkbox |
| ... | @@ -207,6 +233,7 @@ | ... | @@ -207,6 +233,7 @@ |
| 207 | ></el-checkbox> | 233 | ></el-checkbox> |
| 208 | </template> | 234 | </template> |
| 209 | </el-form-item> | 235 | </el-form-item> |
| 236 | + </el-col> | ||
| 210 | <!-- 查询按钮 de--> | 237 | <!-- 查询按钮 de--> |
| 211 | <span v-show="inline & hiddenFormBtn"> | 238 | <span v-show="inline & hiddenFormBtn"> |
| 212 | <el-form-item v-show="show"> | 239 | <el-form-item v-show="show"> |
| ... | @@ -224,6 +251,7 @@ | ... | @@ -224,6 +251,7 @@ |
| 224 | <el-button @click="resetFields('ruleForm')">重置</el-button> | 251 | <el-button @click="resetFields('ruleForm')">重置</el-button> |
| 225 | </el-form-item> | 252 | </el-form-item> |
| 226 | </span> | 253 | </span> |
| 254 | + </el-row> | ||
| 227 | </el-form> | 255 | </el-form> |
| 228 | </div> | 256 | </div> |
| 229 | </template> | 257 | </template> |
| ... | @@ -233,30 +261,25 @@ import request from "@/utils/request"; | ... | @@ -233,30 +261,25 @@ import request from "@/utils/request"; |
| 233 | import { deepClone } from "@/utils"; | 261 | import { deepClone } from "@/utils"; |
| 234 | export default { | 262 | export default { |
| 235 | props: { | 263 | props: { |
| 236 | - marginBottom: { | 264 | + rowGutter: { |
| 237 | type: Number, | 265 | type: Number, |
| 238 | - default: 30, | 266 | + default: 24, |
| 239 | - }, | ||
| 240 | - view: { | ||
| 241 | - type: Boolean, | ||
| 242 | - default: false, | ||
| 243 | }, | 267 | }, |
| 244 | - formBtn: { | 268 | + rowType: { |
| 245 | type: String, | 269 | type: String, |
| 246 | - default: "查询", | 270 | + default: "", |
| 247 | }, | 271 | }, |
| 248 | - btnLoading: { | 272 | + rowJustify: { |
| 249 | - type: Boolean, | 273 | + type: String, |
| 250 | - default: false, | 274 | + default: "", |
| 251 | }, | 275 | }, |
| 252 | - loading: { | 276 | + rowAlign: { |
| 253 | - //加载 | 277 | + type: String, |
| 254 | - type: Boolean, | 278 | + default: "", |
| 255 | - default: false, | ||
| 256 | }, | 279 | }, |
| 257 | - isBtnSave: { | 280 | + rowTag: { |
| 258 | - type: Boolean, | 281 | + type: String, |
| 259 | - default: false, | 282 | + default: "div", |
| 260 | }, | 283 | }, |
| 261 | // 由inline属性决定form表单是普通表单,还是行内表单 | 284 | // 由inline属性决定form表单是普通表单,还是行内表单 |
| 262 | inline: { | 285 | inline: { |
| ... | @@ -273,14 +296,14 @@ export default { | ... | @@ -273,14 +296,14 @@ export default { |
| 273 | type: Boolean, | 296 | type: Boolean, |
| 274 | default: false, | 297 | default: false, |
| 275 | }, | 298 | }, |
| 276 | - labelWidth: { | ||
| 277 | - type: String, | ||
| 278 | - default: "120px", | ||
| 279 | - }, | ||
| 280 | formWidth: { | 299 | formWidth: { |
| 281 | //form表单宽度 | 300 | //form表单宽度 |
| 282 | type: String, | 301 | type: String, |
| 283 | - default: "200px", | 302 | + default: "auto", |
| 303 | + }, | ||
| 304 | + position: { | ||
| 305 | + type: String, | ||
| 306 | + default: "", | ||
| 284 | }, | 307 | }, |
| 285 | formConfig: { | 308 | formConfig: { |
| 286 | type: Array, | 309 | type: Array, |
| ... | @@ -295,6 +318,31 @@ export default { | ... | @@ -295,6 +318,31 @@ export default { |
| 295 | type: String, | 318 | type: String, |
| 296 | default: "small", | 319 | default: "small", |
| 297 | }, | 320 | }, |
| 321 | + marginBottom: { | ||
| 322 | + type: Number, | ||
| 323 | + default: 30, | ||
| 324 | + }, | ||
| 325 | + view: { | ||
| 326 | + type: Boolean, | ||
| 327 | + default: false, | ||
| 328 | + }, | ||
| 329 | + formBtn: { | ||
| 330 | + type: String, | ||
| 331 | + default: "查询", | ||
| 332 | + }, | ||
| 333 | + btnLoading: { | ||
| 334 | + type: Boolean, | ||
| 335 | + default: false, | ||
| 336 | + }, | ||
| 337 | + loading: { | ||
| 338 | + //加载 | ||
| 339 | + type: Boolean, | ||
| 340 | + default: false, | ||
| 341 | + }, | ||
| 342 | + isBtnSave: { | ||
| 343 | + type: Boolean, | ||
| 344 | + default: false, | ||
| 345 | + }, | ||
| 298 | }, | 346 | }, |
| 299 | data() { | 347 | data() { |
| 300 | return { | 348 | return { |
| ... | @@ -311,7 +359,7 @@ export default { | ... | @@ -311,7 +359,7 @@ export default { |
| 311 | methods: { | 359 | methods: { |
| 312 | // input事件绑定和注册 | 360 | // input事件绑定和注册 |
| 313 | inputEvent(e, item) { | 361 | inputEvent(e, item) { |
| 314 | - this.$emit("input", this.tempQueryForm); | 362 | + this.$emit(item.trigger, this.tempQueryForm); |
| 315 | }, | 363 | }, |
| 316 | // 回车事件 | 364 | // 回车事件 |
| 317 | toEnterSearch() { | 365 | toEnterSearch() { | ... | ... |
| ... | @@ -4,11 +4,11 @@ | ... | @@ -4,11 +4,11 @@ |
| 4 | <sidebar class="sidebar-container" | 4 | <sidebar class="sidebar-container" |
| 5 | :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> | 5 | :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> |
| 6 | <div :class="{ hasTagsView: needTagsView }" class="main-container"> | 6 | <div :class="{ hasTagsView: needTagsView }" class="main-container"> |
| 7 | - <div :class="{ 'fixed-header': fixedHeader }"> | 7 | + <div :class="{ 'fixed-header': fixedHeader }" ref="headerBlock"> |
| 8 | <navbar /> | 8 | <navbar /> |
| 9 | <tags-view v-if="needTagsView" /> | 9 | <tags-view v-if="needTagsView" /> |
| 10 | </div> | 10 | </div> |
| 11 | - <app-main /> | 11 | + <app-main ref="appMainBlock" /> |
| 12 | <right-panel v-if="false"> | 12 | <right-panel v-if="false"> |
| 13 | <settings /> | 13 | <settings /> |
| 14 | </right-panel> | 14 | </right-panel> | ... | ... |
| ... | @@ -6,40 +6,45 @@ const WIDTH = 992 // refer to Bootstrap's responsive design | ... | @@ -6,40 +6,45 @@ const WIDTH = 992 // refer to Bootstrap's responsive design |
| 6 | export default { | 6 | export default { |
| 7 | watch: { | 7 | watch: { |
| 8 | $route(route) { | 8 | $route(route) { |
| 9 | - if (this.device === 'mobile' && this.sidebar.opened) { | 9 | + if (this.device === "mobile" && this.sidebar.opened) { |
| 10 | - store.dispatch('app/closeSideBar', { withoutAnimation: false }) | 10 | + store.dispatch("app/closeSideBar", { withoutAnimation: false }); |
| 11 | - } | ||
| 12 | } | 11 | } |
| 13 | }, | 12 | }, |
| 13 | + }, | ||
| 14 | beforeMount() { | 14 | beforeMount() { |
| 15 | - window.addEventListener('resize', this.$_resizeHandler) | 15 | + window.addEventListener("resize", this.$_resizeHandler); |
| 16 | }, | 16 | }, |
| 17 | beforeDestroy() { | 17 | beforeDestroy() { |
| 18 | - window.removeEventListener('resize', this.$_resizeHandler) | 18 | + window.removeEventListener("resize", this.$_resizeHandler); |
| 19 | }, | 19 | }, |
| 20 | mounted() { | 20 | mounted() { |
| 21 | - const isMobile = this.$_isMobile() | 21 | + const isMobile = this.$_isMobile(); |
| 22 | if (isMobile) { | 22 | if (isMobile) { |
| 23 | - store.dispatch('app/toggleDevice', 'mobile') | 23 | + store.dispatch("app/toggleDevice", "mobile"); |
| 24 | - store.dispatch('app/closeSideBar', { withoutAnimation: true }) | 24 | + store.dispatch("app/closeSideBar", { withoutAnimation: true }); |
| 25 | } | 25 | } |
| 26 | + this.getBlockCurrentHeight(); | ||
| 26 | }, | 27 | }, |
| 27 | methods: { | 28 | methods: { |
| 28 | // use $_ for mixins properties | 29 | // use $_ for mixins properties |
| 29 | // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential | 30 | // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential |
| 30 | $_isMobile() { | 31 | $_isMobile() { |
| 31 | - const rect = body.getBoundingClientRect() | 32 | + const rect = body.getBoundingClientRect(); |
| 32 | - return rect.width - 1 < WIDTH | 33 | + return rect.width - 1 < WIDTH; |
| 33 | }, | 34 | }, |
| 34 | $_resizeHandler() { | 35 | $_resizeHandler() { |
| 35 | if (!document.hidden) { | 36 | if (!document.hidden) { |
| 36 | - const isMobile = this.$_isMobile() | 37 | + const isMobile = this.$_isMobile(); |
| 37 | - store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') | 38 | + store.dispatch("app/toggleDevice", isMobile ? "mobile" : "desktop"); |
| 38 | 39 | ||
| 39 | if (isMobile) { | 40 | if (isMobile) { |
| 40 | - store.dispatch('app/closeSideBar', { withoutAnimation: true }) | 41 | + store.dispatch("app/closeSideBar", { withoutAnimation: true }); |
| 41 | - } | ||
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | + }, | ||
| 45 | + getBlockCurrentHeight(){; | ||
| 46 | + // console.log(this.$refs.headerBlock, this.$refs.headerBlock.clientHeight); | ||
| 47 | + // console.log(this.$refs.appMainBlock); | ||
| 44 | } | 48 | } |
| 45 | -} | 49 | + }, |
| 50 | +}; | ... | ... |
| ... | @@ -72,20 +72,19 @@ export const constantRoutes = [ | ... | @@ -72,20 +72,19 @@ export const constantRoutes = [ |
| 72 | component: Layout, | 72 | component: Layout, |
| 73 | hidden: true, | 73 | hidden: true, |
| 74 | children: [ | 74 | children: [ |
| 75 | - { | 75 | + // { |
| 76 | - path: "/et86", | 76 | + // path: "/et86", |
| 77 | - component: (resolve) => | 77 | + // component: (resolve) => require(["@/views/et86Config/et86RuleConfig"], resolve), |
| 78 | - require(["@/views/allocationConfig/et86"], resolve), | 78 | + // name: "et86", |
| 79 | - name: "et86", | 79 | + // meta: { title: "ET86", icon: "user" }, |
| 80 | - meta: { title: "ET86", icon: "user" }, | 80 | + // children: [], |
| 81 | - children: [], | 81 | + // }, |
| 82 | - }, | ||
| 83 | { | 82 | { |
| 84 | path: "/edit", | 83 | path: "/edit", |
| 85 | component: (resolve) => | 84 | component: (resolve) => |
| 86 | - require(["@/views/allocationConfig/et86/edit"], resolve), | 85 | + require(["@/views/et86Config/et86RuleConfig/edit"], resolve), |
| 87 | name: "edit", | 86 | name: "edit", |
| 88 | - meta: { title: "编辑", icon: "user", noCache: false }, | 87 | + meta: { title: "ET86规则", icon: "user", noCache: false }, |
| 89 | }, | 88 | }, |
| 90 | { | 89 | { |
| 91 | path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status", | 90 | path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status", | ... | ... |
| ... | @@ -47,44 +47,6 @@ const permission = { | ... | @@ -47,44 +47,6 @@ const permission = { |
| 47 | return new Promise((resolve) => { | 47 | return new Promise((resolve) => { |
| 48 | // 向后端请求路由数据 | 48 | // 向后端请求路由数据 |
| 49 | getRouters().then((res) => { | 49 | getRouters().then((res) => { |
| 50 | - const newUrl = [ | ||
| 51 | - { | ||
| 52 | - id: 24, | ||
| 53 | - name: "et86", | ||
| 54 | - path: "/et86", | ||
| 55 | - hidden: false, | ||
| 56 | - component: "allocationConfig/et86", | ||
| 57 | - meta: { | ||
| 58 | - title: "ET86", | ||
| 59 | - icon: "edit", | ||
| 60 | - permissions: "allocation:rand:list", | ||
| 61 | - noCache: false, | ||
| 62 | - }, | ||
| 63 | - alwaysShow: false, | ||
| 64 | - children: null, | ||
| 65 | - }, | ||
| 66 | - { | ||
| 67 | - id: 25, | ||
| 68 | - name: "et86BlackStation", | ||
| 69 | - path: "/et86BlackStation", | ||
| 70 | - hidden: false, | ||
| 71 | - component: "allocationConfig/et86BlackStation", | ||
| 72 | - meta: { | ||
| 73 | - title: "黑名单维护", | ||
| 74 | - icon: "processing", | ||
| 75 | - permissions: "allocation:rand:list", | ||
| 76 | - noCache: false, | ||
| 77 | - }, | ||
| 78 | - alwaysShow: false, | ||
| 79 | - children: null, | ||
| 80 | - }, | ||
| 81 | - ]; | ||
| 82 | - res.data.map((item) => { | ||
| 83 | - if (item.name == "AllocationConfig") { | ||
| 84 | - item.children.push(newUrl[0]); | ||
| 85 | - item.children.push(newUrl[1]); | ||
| 86 | - } | ||
| 87 | - }); | ||
| 88 | res.data = hasPermi.routerPer(res.data); | 50 | res.data = hasPermi.routerPer(res.data); |
| 89 | const sdata = JSON.parse(JSON.stringify(res.data)); | 51 | const sdata = JSON.parse(JSON.stringify(res.data)); |
| 90 | const rdata = JSON.parse(JSON.stringify(res.data)); | 52 | const rdata = JSON.parse(JSON.stringify(res.data)); | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -4,7 +4,7 @@ export const tableAttr = { | ... | @@ -4,7 +4,7 @@ export const tableAttr = { |
| 4 | isDragSort: true, // 拖拽tableData数据一定要加id字段 | 4 | isDragSort: true, // 拖拽tableData数据一定要加id字段 |
| 5 | maxHeight: 300, | 5 | maxHeight: 300, |
| 6 | btnCofig: { | 6 | btnCofig: { |
| 7 | - isBtn: true, | 7 | + isBtn: false, |
| 8 | btnGroup: [ | 8 | btnGroup: [ |
| 9 | { | 9 | { |
| 10 | type: "primary", | 10 | type: "primary", | ... | ... |
| 1 | export const formConfig = [ | 1 | export const formConfig = [ |
| 2 | { | 2 | { |
| 3 | - label: "创建时间(从)", | 3 | + label: "原航班", |
| 4 | + type: "Input", | ||
| 5 | + name: "originOfFlightNo", | ||
| 6 | + prop: "originOfFlightNo", | ||
| 7 | + placeholder: "请输入原航班号", | ||
| 8 | + span: 6, | ||
| 9 | + trigger: "blur", | ||
| 10 | + }, | ||
| 11 | + { | ||
| 12 | + label: "修改时间 从", | ||
| 4 | type: "Date", | 13 | type: "Date", |
| 5 | name: "startTime", | 14 | name: "startTime", |
| 6 | prop: "startTime", | 15 | prop: "startTime", |
| 7 | - width: "140px", | ||
| 8 | placeholder: "请选择开始时间", | 16 | placeholder: "请选择开始时间", |
| 9 | // rules: { required: true, message: "请选择开始时间", trigger: "blur" }, | 17 | // rules: { required: true, message: "请选择开始时间", trigger: "blur" }, |
| 10 | format: "yyyy-MM-dd", | 18 | format: "yyyy-MM-dd", |
| 19 | + colWidth: "25%", | ||
| 20 | + inputWidth: "100%", | ||
| 11 | }, | 21 | }, |
| 12 | { | 22 | { |
| 13 | - label: "创建时间(到)", | 23 | + label: "到", |
| 14 | type: "Date", | 24 | type: "Date", |
| 15 | name: "endTime", | 25 | name: "endTime", |
| 16 | prop: "endTime", | 26 | prop: "endTime", |
| 17 | - width: "140px", | ||
| 18 | placeholder: "请选择结束时间", | 27 | placeholder: "请选择结束时间", |
| 19 | // rules: { required: true, message: "请选择结束时间", trigger: "blur" }, | 28 | // rules: { required: true, message: "请选择结束时间", trigger: "blur" }, |
| 20 | format: "yyyy-MM-dd", | 29 | format: "yyyy-MM-dd", |
| 30 | + colWidth: "19%", | ||
| 31 | + labelWidth: "20px", | ||
| 32 | + inputWidth: "100%", | ||
| 21 | }, | 33 | }, |
| 22 | { | 34 | { |
| 23 | label: "规则状态", | 35 | label: "规则状态", |
| 24 | type: "Select", | 36 | type: "Select", |
| 25 | name: "status", | 37 | name: "status", |
| 26 | prop: "status", | 38 | prop: "status", |
| 27 | - width: "140px", | ||
| 28 | placeholder: "请选择状态", | 39 | placeholder: "请选择状态", |
| 29 | options: { | 40 | options: { |
| 30 | data: [ | 41 | data: [ |
| 31 | { | 42 | { |
| 32 | value: "1", | 43 | value: "1", |
| 33 | label: "有效", | 44 | label: "有效", |
| 34 | - }, | 45 | + }, { |
| 35 | - { | ||
| 36 | value: "0", | 46 | value: "0", |
| 37 | label: "无效", | 47 | label: "无效", |
| 38 | }, | 48 | }, |
| ... | @@ -40,6 +50,9 @@ export const formConfig = [ | ... | @@ -40,6 +50,9 @@ export const formConfig = [ |
| 40 | label: "有效", | 50 | label: "有效", |
| 41 | value: "1", | 51 | value: "1", |
| 42 | }, | 52 | }, |
| 53 | + colWidth: "20%", | ||
| 54 | + labelWidth: "70px", | ||
| 55 | + inputWidth: "100%", | ||
| 43 | }, | 56 | }, |
| 44 | ]; | 57 | ]; |
| 45 | 58 | ... | ... |
| ... | @@ -6,6 +6,9 @@ | ... | @@ -6,6 +6,9 @@ |
| 6 | ref="ruleForm" | 6 | ref="ruleForm" |
| 7 | :formConfig="formConfig" | 7 | :formConfig="formConfig" |
| 8 | :queryForm="queryForm" | 8 | :queryForm="queryForm" |
| 9 | + :inline="false" | ||
| 10 | + formWidth="auto" | ||
| 11 | + @blur="blurEvent" | ||
| 9 | /> | 12 | /> |
| 10 | </el-col> | 13 | </el-col> |
| 11 | </el-row> | 14 | </el-row> |
| ... | @@ -18,7 +21,6 @@ | ... | @@ -18,7 +21,6 @@ |
| 18 | @sizeChange="handleSizeChange" | 21 | @sizeChange="handleSizeChange" |
| 19 | @currentChange="handleCurrentChange" | 22 | @currentChange="handleCurrentChange" |
| 20 | @search="searchBtn" | 23 | @search="searchBtn" |
| 21 | - @restForm="restForm" | ||
| 22 | @add="addBtn" | 24 | @add="addBtn" |
| 23 | > | 25 | > |
| 24 | </yl-table> | 26 | </yl-table> |
| ... | @@ -41,10 +43,12 @@ export default { | ... | @@ -41,10 +43,12 @@ export default { |
| 41 | data() { | 43 | data() { |
| 42 | return { | 44 | return { |
| 43 | formConfig: formConfig, // 表单配置项 | 45 | formConfig: formConfig, // 表单配置项 |
| 44 | - queryForm: { // 表单参数 | 46 | + queryForm: { |
| 47 | + // 表单参数 | ||
| 45 | status: "有效", | 48 | status: "有效", |
| 46 | }, | 49 | }, |
| 47 | - pageConfig: { // 分页配置项 | 50 | + pageConfig: { |
| 51 | + // 分页配置项 | ||
| 48 | isPagination: true, | 52 | isPagination: true, |
| 49 | total: 0, | 53 | total: 0, |
| 50 | pageData: { | 54 | pageData: { |
| ... | @@ -55,7 +59,6 @@ export default { | ... | @@ -55,7 +59,6 @@ export default { |
| 55 | tableAttr: tableAttr, // table配置项 | 59 | tableAttr: tableAttr, // table配置项 |
| 56 | columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头 | 60 | columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头 |
| 57 | tableData: [], // 表格数据 | 61 | tableData: [], // 表格数据 |
| 58 | - selectionList: [], // table复选框筛选集合 | ||
| 59 | }; | 62 | }; |
| 60 | }, | 63 | }, |
| 61 | created() { | 64 | created() { |
| ... | @@ -69,20 +72,14 @@ export default { | ... | @@ -69,20 +72,14 @@ export default { |
| 69 | // ET86查询 | 72 | // ET86查询 |
| 70 | queryFindAllEtesRules(params) { | 73 | queryFindAllEtesRules(params) { |
| 71 | this.tableAttr.loadingTable = true; | 74 | this.tableAttr.loadingTable = true; |
| 72 | - findAllEtesRules(params) | 75 | + findAllEtesRules(params).then((res) => { |
| 73 | - .then((res) => { | ||
| 74 | this.tableAttr.loadingTable = false; | 76 | this.tableAttr.loadingTable = false; |
| 75 | const { code, data } = res; | 77 | const { code, data } = res; |
| 76 | if (code == 200) { | 78 | if (code == 200) { |
| 77 | this.tableData = data.list; | 79 | this.tableData = data.list; |
| 78 | this.pageConfig.total = data.total; | 80 | this.pageConfig.total = data.total; |
| 79 | } | 81 | } |
| 80 | - }) | 82 | + }).catch(() => {}); |
| 81 | - .catch(() => {}); | ||
| 82 | - }, | ||
| 83 | - // table复选框事件 | ||
| 84 | - selectionTable(e) { | ||
| 85 | - this.selectionList = e; | ||
| 86 | }, | 83 | }, |
| 87 | //条数变化 | 84 | //条数变化 |
| 88 | handleSizeChange(e) { | 85 | handleSizeChange(e) { |
| ... | @@ -96,14 +93,14 @@ export default { | ... | @@ -96,14 +93,14 @@ export default { |
| 96 | this.searchBtn(); | 93 | this.searchBtn(); |
| 97 | }, | 94 | }, |
| 98 | // 搜索 | 95 | // 搜索 |
| 99 | - searchBtn(row) { | 96 | + searchBtn() { |
| 97 | + const { page, size } = this.pageConfig.pageData; | ||
| 100 | let params = { | 98 | let params = { |
| 101 | - createTimeStart: this.queryForm.startTime | 99 | + originOfFlightNo: this.queryForm.originOfFlightNo, |
| 102 | - ? this.queryForm.startTime | 100 | + updateTimeStart: this.queryForm.startTime ? this.queryForm.startTime : "", |
| 103 | - : "", | 101 | + updateTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "", |
| 104 | - createTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "", | 102 | + limitStart: (page - 1) * size, |
| 105 | - limitStart: this.pageConfig.pageData.page, | 103 | + limitSize: size, |
| 106 | - limitSize: this.pageConfig.pageData.size, | ||
| 107 | status: this.queryForm.status, | 104 | status: this.queryForm.status, |
| 108 | }; | 105 | }; |
| 109 | if (this.queryForm.status == "有效") { | 106 | if (this.queryForm.status == "有效") { |
| ... | @@ -133,7 +130,7 @@ export default { | ... | @@ -133,7 +130,7 @@ export default { |
| 133 | query: { | 130 | query: { |
| 134 | name: "view", | 131 | name: "view", |
| 135 | id: row.id, | 132 | id: row.id, |
| 136 | - status: row.status | 133 | + status: row.status, |
| 137 | }, | 134 | }, |
| 138 | }); | 135 | }); |
| 139 | }, | 136 | }, |
| ... | @@ -144,7 +141,7 @@ export default { | ... | @@ -144,7 +141,7 @@ export default { |
| 144 | query: { | 141 | query: { |
| 145 | name: "edit", | 142 | name: "edit", |
| 146 | id: row.id, | 143 | id: row.id, |
| 147 | - status: row.status | 144 | + status: row.status, |
| 148 | }, | 145 | }, |
| 149 | }); | 146 | }); |
| 150 | }, | 147 | }, |
| ... | @@ -156,17 +153,21 @@ export default { | ... | @@ -156,17 +153,21 @@ export default { |
| 156 | type: "warning", | 153 | type: "warning", |
| 157 | center: true, | 154 | center: true, |
| 158 | }).then(() => { | 155 | }).then(() => { |
| 159 | - deleteEtesRuleById({ id: row.id }).then(res=>{ | 156 | + deleteEtesRuleById({ id: row.id }).then((res) => { |
| 160 | const { code, msg } = res; | 157 | const { code, msg } = res; |
| 161 | if (code == 200) { | 158 | if (code == 200) { |
| 162 | this.searchBtn(); | 159 | this.searchBtn(); |
| 163 | this.msgSuccess("删除成功!"); | 160 | this.msgSuccess("删除成功!"); |
| 164 | - }else{ | 161 | + } else { |
| 165 | this.msgError(msg || "删除失败"); | 162 | this.msgError(msg || "删除失败"); |
| 166 | } | 163 | } |
| 167 | - }) | 164 | + }); |
| 168 | }).catch(() => {}); | 165 | }).catch(() => {}); |
| 169 | }, | 166 | }, |
| 167 | + // 失焦事件 | ||
| 168 | + blurEvent({ originOfFlightNo }){ | ||
| 169 | + this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo) | ||
| 170 | + } | ||
| 170 | }, | 171 | }, |
| 171 | }; | 172 | }; |
| 172 | </script> | 173 | </script> | ... | ... |
| ... | @@ -19,15 +19,15 @@ export const tableAttr = { | ... | @@ -19,15 +19,15 @@ export const tableAttr = { |
| 19 | loading: false, | 19 | loading: false, |
| 20 | event: "search", | 20 | event: "search", |
| 21 | }, | 21 | }, |
| 22 | - { | 22 | + // { |
| 23 | - type: "info", | 23 | + // type: "info", |
| 24 | - icon: "", | 24 | + // icon: "", |
| 25 | - btnName: "重置", | 25 | + // btnName: "重置", |
| 26 | - size: "mini", | 26 | + // size: "mini", |
| 27 | - round: false, | 27 | + // round: false, |
| 28 | - loading: false, | 28 | + // loading: false, |
| 29 | - event: "restForm", | 29 | + // event: "restForm", |
| 30 | - }, | 30 | + // }, |
| 31 | { | 31 | { |
| 32 | type: "primary", | 32 | type: "primary", |
| 33 | icon: "el-icon-plus", | 33 | icon: "el-icon-plus", |
| ... | @@ -42,12 +42,6 @@ export const tableAttr = { | ... | @@ -42,12 +42,6 @@ export const tableAttr = { |
| 42 | }; | 42 | }; |
| 43 | export const columnHeader = (viewRow, editRow, deleteRow) => [ | 43 | export const columnHeader = (viewRow, editRow, deleteRow) => [ |
| 44 | { | 44 | { |
| 45 | - type: "selection", | ||
| 46 | - align: "center", | ||
| 47 | - prop: "selection", | ||
| 48 | - width: "50", | ||
| 49 | - }, | ||
| 50 | - { | ||
| 51 | type: "index", | 45 | type: "index", |
| 52 | label: "序号", | 46 | label: "序号", |
| 53 | prop: "id", | 47 | prop: "id", |
| ... | @@ -55,26 +49,20 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ | ... | @@ -55,26 +49,20 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ |
| 55 | width: "50", | 49 | width: "50", |
| 56 | }, | 50 | }, |
| 57 | { | 51 | { |
| 58 | - label: "原航班号", | 52 | + label: "原航班", |
| 59 | prop: "originOfFlightNo", | 53 | prop: "originOfFlightNo", |
| 60 | align: "center", | 54 | align: "center", |
| 61 | - minWidth: 100, | 55 | + minWidth: 80, |
| 62 | }, | 56 | }, |
| 63 | { | 57 | { |
| 64 | - label: "顺位航班", | 58 | + label: "配载航班", |
| 65 | prop: "rankFltNoStr", | 59 | prop: "rankFltNoStr", |
| 66 | align: "center", | 60 | align: "center", |
| 67 | minWidth: 100, | 61 | minWidth: 100, |
| 68 | }, | 62 | }, |
| 69 | { | 63 | { |
| 70 | - label: "URSA包含", | 64 | + label: "航线", |
| 71 | - prop: "includeUrsa", | 65 | + prop: "rankFltRouteStr", |
| 72 | - align: "center", | ||
| 73 | - minWidth: 100, | ||
| 74 | - }, | ||
| 75 | - { | ||
| 76 | - label: "URSA不包含", | ||
| 77 | - prop: "notIncludeUrsa", | ||
| 78 | align: "center", | 66 | align: "center", |
| 79 | minWidth: 100, | 67 | minWidth: 100, |
| 80 | }, | 68 | }, |
| ... | @@ -82,43 +70,30 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ | ... | @@ -82,43 +70,30 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ |
| 82 | label: "状态", | 70 | label: "状态", |
| 83 | prop: "status", | 71 | prop: "status", |
| 84 | align: "center", | 72 | align: "center", |
| 85 | - minWidth: 100, | 73 | + minWidth: 80, |
| 86 | render: (h, params) => { | 74 | render: (h, params) => { |
| 87 | const { row } = params; | 75 | const { row } = params; |
| 88 | return h("div", `${state[row.status]}`); | 76 | return h("div", `${state[row.status]}`); |
| 89 | }, | 77 | }, |
| 90 | }, | 78 | }, |
| 91 | { | 79 | { |
| 92 | - label: "创建时间", | ||
| 93 | - prop: "createTime", | ||
| 94 | - align: "center", | ||
| 95 | - minWidth: 100, | ||
| 96 | - sortable: true, | ||
| 97 | - "sort-method": (a, b) => b.createTime - a.createTime, | ||
| 98 | - }, | ||
| 99 | - { | ||
| 100 | - label: "创建人", | ||
| 101 | - prop: "createUserName", | ||
| 102 | - align: "center", | ||
| 103 | - minWidth: 100, | ||
| 104 | - }, | ||
| 105 | - { | ||
| 106 | label: "修改时间", | 80 | label: "修改时间", |
| 107 | prop: "updateTime", | 81 | prop: "updateTime", |
| 108 | align: "center", | 82 | align: "center", |
| 109 | - minWidth: 100, | 83 | + minWidth: 120, |
| 84 | + // "sort-method": (a, b) => b.createTime - a.createTime, | ||
| 110 | }, | 85 | }, |
| 111 | { | 86 | { |
| 112 | label: "修改人", | 87 | label: "修改人", |
| 113 | prop: "updateUserName", | 88 | prop: "updateUserName", |
| 114 | align: "center", | 89 | align: "center", |
| 115 | - minWidth: 100, | 90 | + minWidth: 80, |
| 116 | }, | 91 | }, |
| 117 | { | 92 | { |
| 118 | label: "操作", | 93 | label: "操作", |
| 119 | prop: "operate", | 94 | prop: "operate", |
| 120 | align: "center", | 95 | align: "center", |
| 121 | - minWidth: 120, | 96 | + minWidth: 125, |
| 122 | fixed: "right", | 97 | fixed: "right", |
| 123 | render: (h, params) => { | 98 | render: (h, params) => { |
| 124 | return h("div", [ | 99 | return h("div", [ | ... | ... |
-
Please register or login to post a comment