Showing
16 changed files
with
446 additions
and
453 deletions
| ... | @@ -7,223 +7,251 @@ | ... | @@ -7,223 +7,251 @@ |
| 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 |
| 15 | - v-for="item in tempFormConfig" | 17 | + :gutter="rowGutter" |
| 16 | - :label="item.label" | 18 | + :type="rowType" |
| 17 | - :key="item.prop" | 19 | + :justify="rowJustify" |
| 18 | - :prop="item.prop" | 20 | + :align="rowAlign" |
| 19 | - :rules="item.rules" | 21 | + :tag="rowTag" |
| 20 | > | 22 | > |
| 21 | - <!-- 输入框 --> | 23 | + <el-col |
| 22 | - <el-input | 24 | + v-for="item in tempFormConfig" |
| 23 | - v-if="item.type === 'Input'" | 25 | + :span="item.span" |
| 24 | - v-model.trim="tempQueryForm[item.prop]" | 26 | + :offset="item.offset" |
| 25 | - :style="{ width: item.width }" | 27 | + :tag="item.tag" |
| 26 | - :disabled="item.disable" | 28 | + :push="item.push" |
| 27 | - :placeholder=" | 29 | + :pull="item.pull" |
| 28 | - item.placeholder ? item.placeholder : '请输入' + item.label | 30 | + :xs="item.xs" |
| 29 | - " | 31 | + :sm="item.sm" |
| 30 | - v-on:[item.trigger]=" | 32 | + :md="item.md" |
| 31 | - (e) => { | 33 | + :lg="item.lg" |
| 32 | - inputEvent(e, item); | 34 | + :xl="item.xl" |
| 33 | - } | 35 | + :style="{ width: item.colWidth }" |
| 34 | - " | 36 | + :key="item.prop" |
| 35 | - @keyup.enter.native="toEnterSearch" | ||
| 36 | - clearable | ||
| 37 | - > | ||
| 38 | - </el-input> | ||
| 39 | - <template v-if="view"> | ||
| 40 | - <span v-text="tempQueryForm[item.prop]"></span> | ||
| 41 | - </template> | ||
| 42 | - <!-- 数字输入框 --> | ||
| 43 | - <el-input | ||
| 44 | - v-if="item.type === 'inputNumber'" | ||
| 45 | - type="number" | ||
| 46 | - :min="item.min" | ||
| 47 | - :max="item.max" | ||
| 48 | - v-model.trim="tempQueryForm[item.prop]" | ||
| 49 | - :style="{ width: item.width }" | ||
| 50 | - :disabled="item.disable" | ||
| 51 | - :placeholder=" | ||
| 52 | - item.placeholder ? item.placeholder : '请输入' + item.label | ||
| 53 | - " | ||
| 54 | - v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')" | ||
| 55 | - clearable | ||
| 56 | > | 37 | > |
| 57 | - </el-input> | 38 | + <el-form-item |
| 58 | - <!-- InputNumber 计数器 --> | 39 | + :label="item.label" |
| 59 | - <el-input-number | 40 | + :prop="item.prop" |
| 60 | - v-if="item.type === 'Number'" | 41 | + :rules="item.rules" |
| 61 | - v-model.trim="tempQueryForm[item.prop]" | 42 | + :label-width="item.labelWidth" |
| 62 | - :min="0" | ||
| 63 | - :max="10" | ||
| 64 | - :size="item.size" | ||
| 65 | - :style="{ width: item.width }" | ||
| 66 | - label="描述文字" | ||
| 67 | - ></el-input-number> | ||
| 68 | - | ||
| 69 | - <template v-if="view"> | ||
| 70 | - <span v-text="tempQueryForm[item.prop]"></span> | ||
| 71 | - </template> | ||
| 72 | - <!-- 下拉选择 --> | ||
| 73 | - <el-select | ||
| 74 | - v-if="item.type === 'Select'" | ||
| 75 | - :multiple="item.multiple" | ||
| 76 | - :filterable="item.filterable" | ||
| 77 | - v-model.trim="tempQueryForm[item.prop]" | ||
| 78 | - :style="{ width: item.width }" | ||
| 79 | - :disabled="item.disable" | ||
| 80 | - :loading="searchLoading" | ||
| 81 | - :placeholder=" | ||
| 82 | - item.placeholder ? item.placeholder : '请选择' + item.label | ||
| 83 | - " | ||
| 84 | - clearable | ||
| 85 | - > | ||
| 86 | - <el-option | ||
| 87 | - v-for="op in item.options.data" | ||
| 88 | - :label="op[item.options.label] || op.label" | ||
| 89 | - :value="op[item.options.value] || op.value" | ||
| 90 | - :key="op[item.options.value] || op.value" | ||
| 91 | > | 43 | > |
| 92 | - </el-option> | 44 | + <!-- 输入框 --> |
| 93 | - </el-select> | 45 | + <el-input |
| 94 | - <!-- 远程搜索 --> | 46 | + v-if="item.type === 'Input'" |
| 95 | - <template v-if="item.type === 'Search'"> | 47 | + v-model.trim="tempQueryForm[item.prop]" |
| 96 | - <el-autocomplete | 48 | + :style="{ width: item.inputWidth }" |
| 97 | - v-model.trim="tempQueryForm[item.prop]" | 49 | + :disabled="item.disable" |
| 98 | - :style="{ width: item.width }" | 50 | + :placeholder=" |
| 99 | - :debounce="1500" | 51 | + item.placeholder ? item.placeholder : '请输入' + item.label |
| 100 | - :fetch-suggestions="querySearchAsync" | 52 | + " |
| 101 | - :placeholder=" | 53 | + v-on:[item.trigger]=" |
| 102 | - item.placeholder ? item.placeholder : '请选择' + item.label | 54 | + (e) => { |
| 103 | - " | 55 | + inputEvent(e, item); |
| 104 | - @focus="focusKey(item)" | 56 | + } |
| 105 | - @select="selectSearch" | 57 | + " |
| 106 | - clearable | 58 | + @keyup.enter.native="toEnterSearch" |
| 107 | - ></el-autocomplete> | 59 | + clearable |
| 108 | - </template> | 60 | + > |
| 61 | + </el-input> | ||
| 62 | + <template v-if="view"> | ||
| 63 | + <span v-text="tempQueryForm[item.prop]"></span> | ||
| 64 | + </template> | ||
| 65 | + <!-- 数字输入框 --> | ||
| 66 | + <el-input | ||
| 67 | + v-if="item.type === 'inputNumber'" | ||
| 68 | + type="number" | ||
| 69 | + :min="item.min" | ||
| 70 | + :max="item.max" | ||
| 71 | + v-model.trim="tempQueryForm[item.prop]" | ||
| 72 | + :style="{ width: item.inputWidth }" | ||
| 73 | + :disabled="item.disable" | ||
| 74 | + :placeholder=" | ||
| 75 | + item.placeholder ? item.placeholder : '请输入' + item.label | ||
| 76 | + " | ||
| 77 | + v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')" | ||
| 78 | + clearable | ||
| 79 | + > | ||
| 80 | + </el-input> | ||
| 81 | + <!-- InputNumber 计数器 --> | ||
| 82 | + <el-input-number | ||
| 83 | + v-if="item.type === 'Number'" | ||
| 84 | + v-model.trim="tempQueryForm[item.prop]" | ||
| 85 | + :min="0" | ||
| 86 | + :max="10" | ||
| 87 | + :size="item.size" | ||
| 88 | + :style="{ width: item.inputWidth }" | ||
| 89 | + label="描述文字" | ||
| 90 | + ></el-input-number> | ||
| 109 | 91 | ||
| 110 | - <!-- 日期 --> | 92 | + <template v-if="view"> |
| 111 | - <el-date-picker | 93 | + <span v-text="tempQueryForm[item.prop]"></span> |
| 112 | - v-if="item.type === 'Date'" | 94 | + </template> |
| 113 | - v-model.trim="tempQueryForm[item.prop]" | ||
| 114 | - :style="{ width: item.width }" | ||
| 115 | - :disabled="item.disable" | ||
| 116 | - :placeholder="item.placeholder ? item.placeholder : '请选择日期'" | ||
| 117 | - :value-format="item.format" | ||
| 118 | - clearable | ||
| 119 | - > | ||
| 120 | - </el-date-picker> | ||
| 121 | 95 | ||
| 122 | - <!-- 时间 --> | 96 | + <!-- 下拉选择 --> |
| 123 | - <el-time-select | 97 | + <el-select |
| 124 | - v-if="item.type === 'Time'" | 98 | + v-if="item.type === 'Select'" |
| 125 | - v-model.trim="tempQueryForm[item.prop]" | 99 | + :multiple="item.multiple" |
| 126 | - :style="{ width: item.width }" | 100 | + :filterable="item.filterable" |
| 127 | - :disabled="item.disable" | 101 | + v-model.trim="tempQueryForm[item.prop]" |
| 128 | - :placeholder="item.placeholder ? item.placeholder : '请选择时间'" | 102 | + :style="{ width: item.inputWidth }" |
| 129 | - clearable | 103 | + :disabled="item.disable" |
| 130 | - > | 104 | + :loading="searchLoading" |
| 131 | - </el-time-select> | 105 | + :placeholder=" |
| 106 | + item.placeholder ? item.placeholder : '请选择' + item.label | ||
| 107 | + " | ||
| 108 | + clearable | ||
| 109 | + > | ||
| 110 | + <el-option | ||
| 111 | + v-for="op in item.options.data" | ||
| 112 | + :label="op[item.options.label] || op.label" | ||
| 113 | + :value="op[item.options.value] || op.value" | ||
| 114 | + :key="op[item.options.value] || op.value" | ||
| 115 | + > | ||
| 116 | + </el-option> | ||
| 117 | + </el-select> | ||
| 132 | 118 | ||
| 133 | - <!-- 日期时间 --> | 119 | + <!-- 远程搜索 --> |
| 134 | - <el-date-picker | 120 | + <template v-if="item.type === 'Search'"> |
| 135 | - v-if="item.type === 'DateTime'" | 121 | + <el-autocomplete |
| 136 | - type="datetime" | 122 | + v-model.trim="tempQueryForm[item.prop]" |
| 137 | - v-model.trim="tempQueryForm[item.prop]" | 123 | + :style="{ width: item.inputWidth }" |
| 138 | - :disabled="item.disable" | 124 | + :debounce="1500" |
| 139 | - :placeholder="item.placeholder ? item.placeholder : '请选择日期'" | 125 | + :fetch-suggestions="querySearchAsync" |
| 140 | - clearable | 126 | + :placeholder=" |
| 141 | - > | 127 | + item.placeholder ? item.placeholder : '请选择' + item.label |
| 142 | - </el-date-picker> | 128 | + " |
| 129 | + @focus="focusKey(item)" | ||
| 130 | + @select="selectSearch" | ||
| 131 | + clearable | ||
| 132 | + ></el-autocomplete> | ||
| 133 | + </template> | ||
| 143 | 134 | ||
| 144 | - <!-- 日期范围 --> | 135 | + <!-- 日期 --> |
| 145 | - <el-date-picker | 136 | + <el-date-picker |
| 146 | - v-if="item.type === 'datetimerange'" | 137 | + v-if="item.type === 'Date'" |
| 147 | - type="datetimerange" | 138 | + v-model.trim="tempQueryForm[item.prop]" |
| 148 | - v-model.trim="tempQueryForm[item.prop]" | 139 | + :style="{ width: item.inputWidth }" |
| 149 | - :style="{ width: item.width }" | 140 | + :disabled="item.disable" |
| 150 | - :disabled="item.disable" | 141 | + :placeholder="item.placeholder ? item.placeholder : '请选择日期'" |
| 151 | - range-separator="至" | 142 | + :value-format="item.format" |
| 152 | - start-placeholder="开始日期" | 143 | + clearable |
| 153 | - end-placeholder="结束日期" | 144 | + > |
| 154 | - clearable | 145 | + </el-date-picker> |
| 155 | - > | ||
| 156 | - </el-date-picker> | ||
| 157 | 146 | ||
| 158 | - <!-- 单选框 普通的样式 Radio 的尺寸,仅在 border 为真时有效--> | 147 | + <!-- 时间 --> |
| 159 | - <template v-if="item.type === 'radio'"> | 148 | + <el-time-select |
| 160 | - <el-radio | 149 | + v-if="item.type === 'Time'" |
| 161 | - v-model.trim="tempQueryForm[item.prop]" | 150 | + v-model.trim="tempQueryForm[item.prop]" |
| 162 | - v-for="op in item.options.data" | 151 | + :style="{ width: item.inputWidth }" |
| 163 | - :disabled="item.disable" | 152 | + :disabled="item.disable" |
| 164 | - :border="tempQueryForm[item.border]" | 153 | + :placeholder="item.placeholder ? item.placeholder : '请选择时间'" |
| 165 | - :size="tempQueryForm[item.size]" | 154 | + clearable |
| 166 | - :label="op[item.options.label] || op.label" | 155 | + > |
| 167 | - :value="op[item.options.value] || op.value" | 156 | + </el-time-select> |
| 168 | - :key="op[item.options.value] || op.value" | ||
| 169 | - ></el-radio> | ||
| 170 | - </template> | ||
| 171 | 157 | ||
| 172 | - <!-- 单选框 按钮样式 --> | 158 | + <!-- 日期时间 --> |
| 173 | - <el-radio-group | 159 | + <el-date-picker |
| 174 | - v-if="item.type === 'radioButtom'" | 160 | + v-if="item.type === 'DateTime'" |
| 175 | - v-model.trim="tempQueryForm[item.prop]" | 161 | + type="datetime" |
| 176 | - :size="tempQueryForm[item.size]" | 162 | + v-model.trim="tempQueryForm[item.prop]" |
| 177 | - :disabled="item.disable" | 163 | + :disabled="item.disable" |
| 178 | - > | 164 | + :placeholder="item.placeholder ? item.placeholder : '请选择日期'" |
| 179 | - <el-radio-button | 165 | + clearable |
| 180 | - v-for="op in item.options.data" | 166 | + > |
| 181 | - :label="op[item.options.label] || op.label" | 167 | + </el-date-picker> |
| 182 | - :value="op[item.options.value] || op.value" | ||
| 183 | - :key="op[item.options.value] || op.value" | ||
| 184 | - ></el-radio-button> | ||
| 185 | - </el-radio-group> | ||
| 186 | 168 | ||
| 187 | - <!-- 文本框 --> | 169 | + <!-- 日期范围 --> |
| 188 | - <el-input | 170 | + <el-date-picker |
| 189 | - v-if="item.type === 'textarea'" | 171 | + v-if="item.type === 'datetimerange'" |
| 190 | - v-model.trim="tempQueryForm[item.prop]" | 172 | + type="datetimerange" |
| 191 | - type="textarea" | 173 | + v-model.trim="tempQueryForm[item.prop]" |
| 192 | - :style="{ width: item.width }" | 174 | + :style="{ width: item.inputWidth }" |
| 193 | - :disabled="item.disable" | 175 | + :disabled="item.disable" |
| 194 | - :rows="item.row" | 176 | + range-separator="至" |
| 195 | - :autosize="item.autosize" | 177 | + start-placeholder="开始日期" |
| 196 | - :placeholder=" | 178 | + end-placeholder="结束日期" |
| 197 | - item.placeholder ? item.placeholder : '请输入' + item.label | 179 | + clearable |
| 198 | - " | 180 | + > |
| 199 | - clearable | 181 | + </el-date-picker> |
| 200 | - > | 182 | + |
| 201 | - </el-input> | 183 | + <!-- 单选框 普通的样式 Radio 的尺寸,仅在 border 为真时有效--> |
| 202 | - <!-- 多选框 --> | 184 | + <template v-if="item.type === 'radio'"> |
| 203 | - <template v-if="item.type === 'Checkbox'"> | 185 | + <el-radio |
| 204 | - <el-checkbox | 186 | + v-model.trim="tempQueryForm[item.prop]" |
| 205 | - v-model="tempQueryForm[item.prop]" | 187 | + v-for="op in item.options.data" |
| 206 | - :disabled="item.disabled" | 188 | + :disabled="item.disable" |
| 207 | - ></el-checkbox> | 189 | + :border="tempQueryForm[item.border]" |
| 208 | - </template> | 190 | + :size="tempQueryForm[item.size]" |
| 209 | - </el-form-item> | 191 | + :label="op[item.options.label] || op.label" |
| 210 | - <!-- 查询按钮 de--> | 192 | + :value="op[item.options.value] || op.value" |
| 211 | - <span v-show="inline & hiddenFormBtn"> | 193 | + :key="op[item.options.value] || op.value" |
| 212 | - <el-form-item v-show="show"> | 194 | + ></el-radio> |
| 213 | - <el-button | 195 | + </template> |
| 214 | - type="primary" | 196 | + |
| 215 | - @click="handleSearch('ruleForm')" | 197 | + <!-- 单选框 按钮样式 --> |
| 216 | - :btnLoading="btnLoading" | 198 | + <el-radio-group |
| 217 | - > | 199 | + v-if="item.type === 'radioButtom'" |
| 218 | - {{ formBtn }} | 200 | + v-model.trim="tempQueryForm[item.prop]" |
| 219 | - </el-button> | 201 | + :size="tempQueryForm[item.size]" |
| 220 | - </el-form-item> | 202 | + :disabled="item.disable" |
| 221 | - </span> | 203 | + > |
| 222 | - <span v-show="inline & hiddenFormBtn"> | 204 | + <el-radio-button |
| 223 | - <el-form-item v-show="show"> | 205 | + v-for="op in item.options.data" |
| 224 | - <el-button @click="resetFields('ruleForm')">重置</el-button> | 206 | + :label="op[item.options.label] || op.label" |
| 225 | - </el-form-item> | 207 | + :value="op[item.options.value] || op.value" |
| 226 | - </span> | 208 | + :key="op[item.options.value] || op.value" |
| 209 | + ></el-radio-button> | ||
| 210 | + </el-radio-group> | ||
| 211 | + | ||
| 212 | + <!-- 文本框 --> | ||
| 213 | + <el-input | ||
| 214 | + v-if="item.type === 'textarea'" | ||
| 215 | + v-model.trim="tempQueryForm[item.prop]" | ||
| 216 | + type="textarea" | ||
| 217 | + :style="{ width: item.inputWidth }" | ||
| 218 | + :disabled="item.disable" | ||
| 219 | + :rows="item.row" | ||
| 220 | + :autosize="item.autosize" | ||
| 221 | + :placeholder=" | ||
| 222 | + item.placeholder ? item.placeholder : '请输入' + item.label | ||
| 223 | + " | ||
| 224 | + clearable | ||
| 225 | + > | ||
| 226 | + </el-input> | ||
| 227 | + | ||
| 228 | + <!-- 多选框 --> | ||
| 229 | + <template v-if="item.type === 'Checkbox'"> | ||
| 230 | + <el-checkbox | ||
| 231 | + v-model="tempQueryForm[item.prop]" | ||
| 232 | + :disabled="item.disabled" | ||
| 233 | + ></el-checkbox> | ||
| 234 | + </template> | ||
| 235 | + </el-form-item> | ||
| 236 | + </el-col> | ||
| 237 | + <!-- 查询按钮 de--> | ||
| 238 | + <span v-show="inline & hiddenFormBtn"> | ||
| 239 | + <el-form-item v-show="show"> | ||
| 240 | + <el-button | ||
| 241 | + type="primary" | ||
| 242 | + @click="handleSearch('ruleForm')" | ||
| 243 | + :btnLoading="btnLoading" | ||
| 244 | + > | ||
| 245 | + {{ formBtn }} | ||
| 246 | + </el-button> | ||
| 247 | + </el-form-item> | ||
| 248 | + </span> | ||
| 249 | + <span v-show="inline & hiddenFormBtn"> | ||
| 250 | + <el-form-item v-show="show"> | ||
| 251 | + <el-button @click="resetFields('ruleForm')">重置</el-button> | ||
| 252 | + </el-form-item> | ||
| 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 | }, | 267 | }, |
| 240 | - view: { | 268 | + rowType: { |
| 241 | - type: Boolean, | ||
| 242 | - default: false, | ||
| 243 | - }, | ||
| 244 | - formBtn: { | ||
| 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 | } | 11 | } |
| 12 | - } | 12 | + }, |
| 13 | }, | 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 | } |
| 44 | + }, | ||
| 45 | + getBlockCurrentHeight(){; | ||
| 46 | + // console.log(this.$refs.headerBlock, this.$refs.headerBlock.clientHeight); | ||
| 47 | + // console.log(this.$refs.appMainBlock); | ||
| 43 | } | 48 | } |
| 44 | - } | 49 | + }, |
| 45 | -} | 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)); | ... | ... |
| ... | @@ -8,6 +8,11 @@ | ... | @@ -8,6 +8,11 @@ |
| 8 | <!-- ET86配舱航班顺位 --> | 8 | <!-- ET86配舱航班顺位 --> |
| 9 | <el-row :gutter="24" justify="center"> | 9 | <el-row :gutter="24" justify="center"> |
| 10 | <el-col :span="18"> | 10 | <el-col :span="18"> |
| 11 | + <el-row style="margin-bottom: 15px" v-if="getRouter"> | ||
| 12 | + <el-col> | ||
| 13 | + <el-button type="primary" icon="el-icon-plus" size="mini" @click="addBtn">添加</el-button> | ||
| 14 | + </el-col> | ||
| 15 | + </el-row> | ||
| 11 | <yl-table | 16 | <yl-table |
| 12 | emptyText="请添加配舱航班" | 17 | emptyText="请添加配舱航班" |
| 13 | :attrs="tableAttr" | 18 | :attrs="tableAttr" |
| ... | @@ -16,7 +21,6 @@ | ... | @@ -16,7 +21,6 @@ |
| 16 | :pageConfig="{ | 21 | :pageConfig="{ |
| 17 | isPagination: false, | 22 | isPagination: false, |
| 18 | }" | 23 | }" |
| 19 | - @add="addBtn" | ||
| 20 | > | 24 | > |
| 21 | <template #column> | 25 | <template #column> |
| 22 | <el-table-column | 26 | <el-table-column |
| ... | @@ -35,9 +39,9 @@ | ... | @@ -35,9 +39,9 @@ |
| 35 | <el-input | 39 | <el-input |
| 36 | v-model="scope.row.flightNo" | 40 | v-model="scope.row.flightNo" |
| 37 | clearable | 41 | clearable |
| 38 | - :readonly="scope.row.edit | isEdit" | 42 | + :disabled="scope.row.edit" |
| 39 | @focus="inputFocus(scope)" | 43 | @focus="inputFocus(scope)" |
| 40 | - @input="inputEvent" | 44 | + @blur="blurSearch" |
| 41 | placeholder="请输入航班号" | 45 | placeholder="请输入航班号" |
| 42 | size="small" | 46 | size="small" |
| 43 | /> | 47 | /> |
| ... | @@ -53,8 +57,7 @@ | ... | @@ -53,8 +57,7 @@ |
| 53 | <el-input | 57 | <el-input |
| 54 | type="number" | 58 | type="number" |
| 55 | v-model="scope.row.calculateDay" | 59 | v-model="scope.row.calculateDay" |
| 56 | - :readonly="scope.row.edit | isEdit" | 60 | + :disabled="scope.row.edit" |
| 57 | - :disabled="scope.row.edit | isEdit" | ||
| 58 | min="-7" | 61 | min="-7" |
| 59 | max="7" | 62 | max="7" |
| 60 | v-input-filter | 63 | v-input-filter |
| ... | @@ -75,6 +78,7 @@ | ... | @@ -75,6 +78,7 @@ |
| 75 | v-model="scope.row.flightRoute" | 78 | v-model="scope.row.flightRoute" |
| 76 | placeholder="请选择" | 79 | placeholder="请选择" |
| 77 | size="small" | 80 | size="small" |
| 81 | + :disabled="scope.row.edit" | ||
| 78 | > | 82 | > |
| 79 | <el-option | 83 | <el-option |
| 80 | v-for="item in scope.row.routeList" | 84 | v-for="item in scope.row.routeList" |
| ... | @@ -95,7 +99,7 @@ | ... | @@ -95,7 +99,7 @@ |
| 95 | <template slot-scope="scope"> | 99 | <template slot-scope="scope"> |
| 96 | <el-checkbox | 100 | <el-checkbox |
| 97 | v-model="scope.row.permitOverweight" | 101 | v-model="scope.row.permitOverweight" |
| 98 | - :disabled="scope.row.edit | isEdit" | 102 | + :disabled="scope.row.edit" |
| 99 | @change="changeCheck(scope)" | 103 | @change="changeCheck(scope)" |
| 100 | ></el-checkbox> | 104 | ></el-checkbox> |
| 101 | </template> | 105 | </template> |
| ... | @@ -140,6 +144,8 @@ | ... | @@ -140,6 +144,8 @@ |
| 140 | show-word-limit | 144 | show-word-limit |
| 141 | :rows="4" | 145 | :rows="4" |
| 142 | placeholder="请输入原航班号" | 146 | placeholder="请输入原航班号" |
| 147 | + @blur="blurEvent" | ||
| 148 | + :disabled="!getRouter" | ||
| 143 | ></el-input> | 149 | ></el-input> |
| 144 | </el-form-item> | 150 | </el-form-item> |
| 145 | </el-col> | 151 | </el-col> |
| ... | @@ -149,6 +155,7 @@ | ... | @@ -149,6 +155,7 @@ |
| 149 | <el-radio-group | 155 | <el-radio-group |
| 150 | v-model="isServiceCode" | 156 | v-model="isServiceCode" |
| 151 | @change="changeIsServiceCode" | 157 | @change="changeIsServiceCode" |
| 158 | + :disabled="!getRouter" | ||
| 152 | > | 159 | > |
| 153 | <el-radio label="1">包含ServiceCode</el-radio> | 160 | <el-radio label="1">包含ServiceCode</el-radio> |
| 154 | <el-radio label="2">不包含ServiceCode</el-radio> | 161 | <el-radio label="2">不包含ServiceCode</el-radio> |
| ... | @@ -164,6 +171,7 @@ | ... | @@ -164,6 +171,7 @@ |
| 164 | :rows="4" | 171 | :rows="4" |
| 165 | placeholder="请输入ServiceCode" | 172 | placeholder="请输入ServiceCode" |
| 166 | @blur="serviceCodeBlur" | 173 | @blur="serviceCodeBlur" |
| 174 | + :disabled="!getRouter" | ||
| 167 | ></el-input> | 175 | ></el-input> |
| 168 | </el-col> | 176 | </el-col> |
| 169 | </el-form-item> | 177 | </el-form-item> |
| ... | @@ -180,6 +188,7 @@ | ... | @@ -180,6 +188,7 @@ |
| 180 | show-word-limit | 188 | show-word-limit |
| 181 | :rows="4" | 189 | :rows="4" |
| 182 | placeholder="URSA之间用分号分隔,例:F2;F3;P_" | 190 | placeholder="URSA之间用分号分隔,例:F2;F3;P_" |
| 191 | + :disabled="!getRouter" | ||
| 183 | ></el-input> | 192 | ></el-input> |
| 184 | </el-form-item> | 193 | </el-form-item> |
| 185 | </el-col> | 194 | </el-col> |
| ... | @@ -193,6 +202,7 @@ | ... | @@ -193,6 +202,7 @@ |
| 193 | show-word-limit | 202 | show-word-limit |
| 194 | :rows="4" | 203 | :rows="4" |
| 195 | placeholder="URSA之间用分号分隔,例:F2;F3;P_" | 204 | placeholder="URSA之间用分号分隔,例:F2;F3;P_" |
| 205 | + :disabled="!getRouter" | ||
| 196 | ></el-input> | 206 | ></el-input> |
| 197 | </el-form-item> | 207 | </el-form-item> |
| 198 | </el-col> | 208 | </el-col> |
| ... | @@ -206,6 +216,7 @@ | ... | @@ -206,6 +216,7 @@ |
| 206 | @change="changeCheckboxCargoType" | 216 | @change="changeCheckboxCargoType" |
| 207 | style="display: flex" | 217 | style="display: flex" |
| 208 | v-if="cargoType.length" | 218 | v-if="cargoType.length" |
| 219 | + :disabled="!getRouter" | ||
| 209 | > | 220 | > |
| 210 | <el-checkbox | 221 | <el-checkbox |
| 211 | v-for="item in cargoType" | 222 | v-for="item in cargoType" |
| ... | @@ -224,7 +235,7 @@ | ... | @@ -224,7 +235,7 @@ |
| 224 | <el-col :span="24"> | 235 | <el-col :span="24"> |
| 225 | <el-col :span="3"> | 236 | <el-col :span="3"> |
| 226 | <el-form-item label="单品名"> | 237 | <el-form-item label="单品名"> |
| 227 | - <el-checkbox v-model="queryForm.multiHs"></el-checkbox> | 238 | + <el-checkbox v-model="queryForm.multiHs" :disabled="!getRouter"></el-checkbox> |
| 228 | </el-form-item> | 239 | </el-form-item> |
| 229 | </el-col> | 240 | </el-col> |
| 230 | <el-col :span="8"> | 241 | <el-col :span="8"> |
| ... | @@ -236,6 +247,7 @@ | ... | @@ -236,6 +247,7 @@ |
| 236 | clearable | 247 | clearable |
| 237 | placeholder="最小重量" | 248 | placeholder="最小重量" |
| 238 | @blur="inputBlurMinWeight($event)" | 249 | @blur="inputBlurMinWeight($event)" |
| 250 | + :disabled="!getRouter" | ||
| 239 | ></el-input> | 251 | ></el-input> |
| 240 | <span ref="minWeight" class="el-form-item__error"></span> | 252 | <span ref="minWeight" class="el-form-item__error"></span> |
| 241 | </el-col> | 253 | </el-col> |
| ... | @@ -246,6 +258,7 @@ | ... | @@ -246,6 +258,7 @@ |
| 246 | clearable | 258 | clearable |
| 247 | placeholder="最大重量" | 259 | placeholder="最大重量" |
| 248 | @blur="inputBlurMaxWeight($event)" | 260 | @blur="inputBlurMaxWeight($event)" |
| 261 | + :disabled="!getRouter" | ||
| 249 | ></el-input> | 262 | ></el-input> |
| 250 | </el-col> | 263 | </el-col> |
| 251 | </el-form-item> | 264 | </el-form-item> |
| ... | @@ -259,6 +272,7 @@ | ... | @@ -259,6 +272,7 @@ |
| 259 | clearable | 272 | clearable |
| 260 | placeholder="最少件数" | 273 | placeholder="最少件数" |
| 261 | @blur="inputBlurMinPieces($event)" | 274 | @blur="inputBlurMinPieces($event)" |
| 275 | + :disabled="!getRouter" | ||
| 262 | ></el-input> | 276 | ></el-input> |
| 263 | <span ref="minNumOfPieces" class="el-form-item__error"></span> | 277 | <span ref="minNumOfPieces" class="el-form-item__error"></span> |
| 264 | </el-col> | 278 | </el-col> |
| ... | @@ -269,6 +283,7 @@ | ... | @@ -269,6 +283,7 @@ |
| 269 | clearable | 283 | clearable |
| 270 | placeholder="最多件数" | 284 | placeholder="最多件数" |
| 271 | @blur="inputBlurMaxPieces($event)" | 285 | @blur="inputBlurMaxPieces($event)" |
| 286 | + :disabled="!getRouter" | ||
| 272 | ></el-input> | 287 | ></el-input> |
| 273 | </el-col> | 288 | </el-col> |
| 274 | </el-form-item> | 289 | </el-form-item> |
| ... | @@ -288,6 +303,7 @@ | ... | @@ -288,6 +303,7 @@ |
| 288 | clearable | 303 | clearable |
| 289 | placeholder="最小申报价值" | 304 | placeholder="最小申报价值" |
| 290 | @blur="inputBlurMin($event, 'minCNYCustomVal')" | 305 | @blur="inputBlurMin($event, 'minCNYCustomVal')" |
| 306 | + :disabled="!getRouter" | ||
| 291 | ></el-input> | 307 | ></el-input> |
| 292 | <span | 308 | <span |
| 293 | ref="minCNYCustomVal" | 309 | ref="minCNYCustomVal" |
| ... | @@ -301,6 +317,7 @@ | ... | @@ -301,6 +317,7 @@ |
| 301 | clearable | 317 | clearable |
| 302 | placeholder="最大申报价值" | 318 | placeholder="最大申报价值" |
| 303 | @blur="inputBlurMax($event, 'maxCNYCustomVal')" | 319 | @blur="inputBlurMax($event, 'maxCNYCustomVal')" |
| 320 | + :disabled="!getRouter" | ||
| 304 | ></el-input> | 321 | ></el-input> |
| 305 | </el-col> | 322 | </el-col> |
| 306 | </el-form-item> | 323 | </el-form-item> |
| ... | @@ -313,6 +330,7 @@ | ... | @@ -313,6 +330,7 @@ |
| 313 | clearable | 330 | clearable |
| 314 | placeholder="最小申报价值" | 331 | placeholder="最小申报价值" |
| 315 | @blur="inputBlurMin($event, 'minSUDCustomVal')" | 332 | @blur="inputBlurMin($event, 'minSUDCustomVal')" |
| 333 | + :disabled="!getRouter" | ||
| 316 | ></el-input> | 334 | ></el-input> |
| 317 | <span | 335 | <span |
| 318 | ref="minSUDCustomVal" | 336 | ref="minSUDCustomVal" |
| ... | @@ -326,6 +344,7 @@ | ... | @@ -326,6 +344,7 @@ |
| 326 | clearable | 344 | clearable |
| 327 | placeholder="最大申报价值" | 345 | placeholder="最大申报价值" |
| 328 | @blur="inputBlurMax($event, 'maxSUDCustomVal')" | 346 | @blur="inputBlurMax($event, 'maxSUDCustomVal')" |
| 347 | + :disabled="!getRouter" | ||
| 329 | ></el-input> | 348 | ></el-input> |
| 330 | </el-col> | 349 | </el-col> |
| 331 | </el-form-item> | 350 | </el-form-item> |
| ... | @@ -348,7 +367,6 @@ | ... | @@ -348,7 +367,6 @@ |
| 348 | import YlForm from "@/components/YlForm"; | 367 | import YlForm from "@/components/YlForm"; |
| 349 | import YlTable from "@/components/YlTable"; | 368 | import YlTable from "@/components/YlTable"; |
| 350 | import { formConfig } from "./formConfig"; | 369 | import { formConfig } from "./formConfig"; |
| 351 | -import { debounce } from "@/utils"; | ||
| 352 | import { inputBlurValidate } from "@/utils/mixins"; | 370 | import { inputBlurValidate } from "@/utils/mixins"; |
| 353 | import { tableAttr } from "./tableConfig"; | 371 | import { tableAttr } from "./tableConfig"; |
| 354 | import { | 372 | import { |
| ... | @@ -375,19 +393,19 @@ export default { | ... | @@ -375,19 +393,19 @@ export default { |
| 375 | // ET86配舱航班顺位维度 | 393 | // ET86配舱航班顺位维度 |
| 376 | // 表单参数 | 394 | // 表单参数 |
| 377 | id: "", // 维度ID | 395 | id: "", // 维度ID |
| 378 | - originOfFlightNo: "A380", // 原航班号 | 396 | + originOfFlightNo: "", // 原航班号 |
| 379 | includeServiceType: "", // 服务种类包含 | 397 | includeServiceType: "", // 服务种类包含 |
| 380 | notIncludeServiceType: "", // 服务种类不包含 | 398 | notIncludeServiceType: "", // 服务种类不包含 |
| 381 | includeUrsa: "", // URSA包含 | 399 | includeUrsa: "", // URSA包含 |
| 382 | notIncludeUrsa: "", // URSA不包含 | 400 | notIncludeUrsa: "", // URSA不包含 |
| 383 | declarationCategory: "", // 已勾选申报类别的数据 | 401 | declarationCategory: "", // 已勾选申报类别的数据 |
| 384 | multiHs: false, // 单品名 | 402 | multiHs: false, // 单品名 |
| 385 | - minWeight: "", | 403 | + minWeight: "", // 最小重量 |
| 386 | maxWeight: "", | 404 | maxWeight: "", |
| 387 | - minNumOfPieces: "", | 405 | + minNumOfPieces: "", // 最小件数 |
| 388 | maxNumOfPieces: "", | 406 | maxNumOfPieces: "", |
| 389 | - currencyCd: "", | 407 | + currencyCd: "", // 币种 |
| 390 | - minCustomVal: "", | 408 | + minCustomVal: "", // 最小申报值 |
| 391 | maxCustomVal: "", | 409 | maxCustomVal: "", |
| 392 | }, | 410 | }, |
| 393 | tableAttr: tableAttr, // table配置项 | 411 | tableAttr: tableAttr, // table配置项 |
| ... | @@ -400,9 +418,9 @@ export default { | ... | @@ -400,9 +418,9 @@ export default { |
| 400 | checkboxCargoType: [], // 已勾选申报类别的数据 | 418 | checkboxCargoType: [], // 已勾选申报类别的数据 |
| 401 | checkboxClassType: [], // 申报类别 | 419 | checkboxClassType: [], // 申报类别 |
| 402 | serviceCodeData: [], // 【服务种类】调用接口获取服务种类所有的serviceCode | 420 | serviceCodeData: [], // 【服务种类】调用接口获取服务种类所有的serviceCode |
| 403 | - minCNYCustomVal: "", // | 421 | + minCNYCustomVal: "", // 人民币最小申报值 |
| 404 | maxCNYCustomVal: "", // | 422 | maxCNYCustomVal: "", // |
| 405 | - minSUDCustomVal: "", // | 423 | + minSUDCustomVal: "", // 美元最小申报值 |
| 406 | maxSUDCustomVal: "", // | 424 | maxSUDCustomVal: "", // |
| 407 | }; | 425 | }; |
| 408 | }, | 426 | }, |
| ... | @@ -422,7 +440,7 @@ export default { | ... | @@ -422,7 +440,7 @@ export default { |
| 422 | this.getAllDictData(); // 获取全部字典 | 440 | this.getAllDictData(); // 获取全部字典 |
| 423 | if (this.$route.query.name == "view" || this.$route.query.name == "edit") { | 441 | if (this.$route.query.name == "view" || this.$route.query.name == "edit") { |
| 424 | this.queryFindEtesRuleById(this.$route.query); // ET86详情 | 442 | this.queryFindEtesRuleById(this.$route.query); // ET86详情 |
| 425 | - } else { | 443 | + } else { // 新增时默认一条数据 |
| 426 | this.tableData = [ | 444 | this.tableData = [ |
| 427 | { | 445 | { |
| 428 | id: this.id, | 446 | id: this.id, |
| ... | @@ -443,8 +461,7 @@ export default { | ... | @@ -443,8 +461,7 @@ export default { |
| 443 | "input-filter": { | 461 | "input-filter": { |
| 444 | bind: function (el, binding) { | 462 | bind: function (el, binding) { |
| 445 | el.handler = function (event) { | 463 | el.handler = function (event) { |
| 446 | - if (event.data == "E" || event.data == "e") { | 464 | + if (event.data == "E" || event.data == "e") { // 无理数时 |
| 447 | - // 无理数时 | ||
| 448 | event.target.value = ""; | 465 | event.target.value = ""; |
| 449 | } | 466 | } |
| 450 | if (event.target.value) { | 467 | if (event.target.value) { |
| ... | @@ -452,8 +469,7 @@ export default { | ... | @@ -452,8 +469,7 @@ export default { |
| 452 | event.target.value = ""; | 469 | event.target.value = ""; |
| 453 | } else if (Number(event.target.value) > 7) { | 470 | } else if (Number(event.target.value) > 7) { |
| 454 | event.target.value = ""; | 471 | event.target.value = ""; |
| 455 | - } else if (/[\.]/.test(Number(event.target.value))) { | 472 | + } else if (/[\.]/.test(Number(event.target.value))) { // 浮点数时 |
| 456 | - // 浮点数时 | ||
| 457 | event.target.value = ""; | 473 | event.target.value = ""; |
| 458 | } else { | 474 | } else { |
| 459 | } | 475 | } |
| ... | @@ -467,28 +483,7 @@ export default { | ... | @@ -467,28 +483,7 @@ export default { |
| 467 | }, | 483 | }, |
| 468 | }, | 484 | }, |
| 469 | }, | 485 | }, |
| 470 | - filters: { | 486 | + filters: {}, |
| 471 | - isEdit: function (value) { | ||
| 472 | - switch (value) { | ||
| 473 | - case "新增": | ||
| 474 | - false; | ||
| 475 | - break; | ||
| 476 | - case "编辑": | ||
| 477 | - true; | ||
| 478 | - break; | ||
| 479 | - default: | ||
| 480 | - "新增"; | ||
| 481 | - } | ||
| 482 | - }, | ||
| 483 | - // 航线个数 | ||
| 484 | - fltRoute(val) { | ||
| 485 | - if (val.length && val.split(",").length > 2) { | ||
| 486 | - return false; | ||
| 487 | - } else { | ||
| 488 | - return true; | ||
| 489 | - } | ||
| 490 | - }, | ||
| 491 | - }, | ||
| 492 | methods: { | 487 | methods: { |
| 493 | // ET86新增 | 488 | // ET86新增 |
| 494 | postAdd(params) { | 489 | postAdd(params) { |
| ... | @@ -496,18 +491,24 @@ export default { | ... | @@ -496,18 +491,24 @@ export default { |
| 496 | const { code, msg } = res; | 491 | const { code, msg } = res; |
| 497 | if (code == 200) { | 492 | if (code == 200) { |
| 498 | this.msgSuccess(msg || "创建成功!"); | 493 | this.msgSuccess(msg || "创建成功!"); |
| 499 | - this.$router.push("/et86"); | 494 | + this.$router.push("/et86RuleConfig"); |
| 500 | } else { | 495 | } else { |
| 501 | this.msgError(msg || "创建失败!"); | 496 | this.msgError(msg || "创建失败!"); |
| 502 | } | 497 | } |
| 503 | - }); | 498 | + }).catch(() => {}); |
| 504 | }, | 499 | }, |
| 505 | // ET86详情 | 500 | // ET86详情 |
| 506 | - queryFindEtesRuleById({ id, status }) { | 501 | + queryFindEtesRuleById({ id, status, name }) { |
| 507 | findEtesRuleById({ id: id, status: status }).then((res) => { | 502 | findEtesRuleById({ id: id, status: status }).then((res) => { |
| 508 | const { code, data, msg } = res; | 503 | const { code, data, msg } = res; |
| 509 | if (code == 200) { | 504 | if (code == 200) { |
| 510 | data.list.flightRankDtoList.map((item) => { | 505 | data.list.flightRankDtoList.map((item) => { |
| 506 | + if(name == "view"){ | ||
| 507 | + item.edit = true | ||
| 508 | + }else{ | ||
| 509 | + item.edit = false | ||
| 510 | + } | ||
| 511 | + // 爆仓是否继续配舱 | ||
| 511 | if (item.permitOverweight == "N") { | 512 | if (item.permitOverweight == "N") { |
| 512 | item.permitOverweight = false; | 513 | item.permitOverweight = false; |
| 513 | } else { | 514 | } else { |
| ... | @@ -523,6 +524,7 @@ export default { | ... | @@ -523,6 +524,7 @@ export default { |
| 523 | data.list.fltRuleDto[key] = true; | 524 | data.list.fltRuleDto[key] = true; |
| 524 | } | 525 | } |
| 525 | } | 526 | } |
| 527 | + // 将详情获取为null的字段设置为空字符串,目的是为了判断的时候少些为null的判断,保持空数据同一的判断条件; | ||
| 526 | if (data.list.fltRuleDto[key] == null) { | 528 | if (data.list.fltRuleDto[key] == null) { |
| 527 | data.list.fltRuleDto[key] = ""; | 529 | data.list.fltRuleDto[key] = ""; |
| 528 | } | 530 | } |
| ... | @@ -531,7 +533,7 @@ export default { | ... | @@ -531,7 +533,7 @@ export default { |
| 531 | } else { | 533 | } else { |
| 532 | this.msgError(msg || "获取查看失败"); | 534 | this.msgError(msg || "获取查看失败"); |
| 533 | } | 535 | } |
| 534 | - }); | 536 | + }).catch(() => {}); |
| 535 | }, | 537 | }, |
| 536 | // ET86编辑 | 538 | // ET86编辑 |
| 537 | postUpdate(parmas) { | 539 | postUpdate(parmas) { |
| ... | @@ -539,11 +541,11 @@ export default { | ... | @@ -539,11 +541,11 @@ export default { |
| 539 | const { code, msg } = res; | 541 | const { code, msg } = res; |
| 540 | if (code == 200) { | 542 | if (code == 200) { |
| 541 | this.msgSuccess(msg || "修改成功!"); | 543 | this.msgSuccess(msg || "修改成功!"); |
| 542 | - this.$router.push("/et86"); | 544 | + this.$router.push("/et86RuleConfig"); |
| 543 | } else { | 545 | } else { |
| 544 | this.msgError(msg || "修改失败!"); | 546 | this.msgError(msg || "修改失败!"); |
| 545 | } | 547 | } |
| 546 | - }); | 548 | + }).catch(() => {}); |
| 547 | }, | 549 | }, |
| 548 | // 获取所有数据字典 | 550 | // 获取所有数据字典 |
| 549 | getAllDictData() { | 551 | getAllDictData() { |
| ... | @@ -556,7 +558,7 @@ export default { | ... | @@ -556,7 +558,7 @@ export default { |
| 556 | if (res.data.serviceCode.length) { | 558 | if (res.data.serviceCode.length) { |
| 557 | this.getObj(res.data); | 559 | this.getObj(res.data); |
| 558 | } | 560 | } |
| 559 | - }); | 561 | + }).catch(() => {}); |
| 560 | }, | 562 | }, |
| 561 | // 航线查询 | 563 | // 航线查询 |
| 562 | getQueryRouteByFltNo(item) { | 564 | getQueryRouteByFltNo(item) { |
| ... | @@ -583,20 +585,19 @@ export default { | ... | @@ -583,20 +585,19 @@ export default { |
| 583 | this.tableData[this.currentIndex].flightRoute = ""; | 585 | this.tableData[this.currentIndex].flightRoute = ""; |
| 584 | } | 586 | } |
| 585 | } | 587 | } |
| 586 | - }); | 588 | + }).catch(() => {}); |
| 587 | }, | 589 | }, |
| 588 | // 航班号input 聚焦事件 | 590 | // 航班号input 聚焦事件 |
| 589 | inputFocus({ $index }) { | 591 | inputFocus({ $index }) { |
| 590 | this.currentIndex = $index; | 592 | this.currentIndex = $index; |
| 591 | }, | 593 | }, |
| 592 | - // 航班号input搜索事件 | 594 | + // 失焦查询 |
| 593 | - inputEvent: debounce(function () { | 595 | + blurSearch() { |
| 596 | + this.tableData[this.currentIndex].flightNo = this.upCase(this.tableData[this.currentIndex].flightNo); // 转大写字母 | ||
| 594 | let params = { | 597 | let params = { |
| 595 | fltNo: this.tableData[this.currentIndex].flightNo, | 598 | fltNo: this.tableData[this.currentIndex].flightNo, |
| 596 | }; | 599 | }; |
| 597 | - let repeat = this.tableData.filter( | 600 | + let repeat = this.tableData.filter((item) => item.flightNo == this.tableData[this.currentIndex].flightNo); // 筛选重复的航班 |
| 598 | - (item) => item.flightNo == this.tableData[this.currentIndex].flightNo | ||
| 599 | - ); | ||
| 600 | if (repeat.length > 1) { | 601 | if (repeat.length > 1) { |
| 601 | this.msgError("航班顺位已重复"); | 602 | this.msgError("航班顺位已重复"); |
| 602 | return; | 603 | return; |
| ... | @@ -608,7 +609,7 @@ export default { | ... | @@ -608,7 +609,7 @@ export default { |
| 608 | this.tableData[this.currentIndex].routeList = []; | 609 | this.tableData[this.currentIndex].routeList = []; |
| 609 | this.msgError("请输入航班号"); | 610 | this.msgError("请输入航班号"); |
| 610 | } | 611 | } |
| 611 | - }, 1000), | 612 | + }, |
| 612 | // 添加ET86配舱航班顺位 | 613 | // 添加ET86配舱航班顺位 |
| 613 | addBtn(item) { | 614 | addBtn(item) { |
| 614 | this.id++; | 615 | this.id++; |
| ... | @@ -637,12 +638,14 @@ export default { | ... | @@ -637,12 +638,14 @@ export default { |
| 637 | }, | 638 | }, |
| 638 | // 类别 | 639 | // 类别 |
| 639 | changeCheckboxCargoType(arr) { | 640 | changeCheckboxCargoType(arr) { |
| 640 | - let include = this.cargoType.filter((item) => | 641 | + let include = this.cargoType.filter((item) =>arr.some((val) => val == item.chineseName)); // 查询已被勾选的类别 |
| 641 | - arr.some((val) => val == item.chineseName) | ||
| 642 | - ); | ||
| 643 | this.checkboxCargoType = include; //已勾选申报类别的数据 | 642 | this.checkboxCargoType = include; //已勾选申报类别的数据 |
| 644 | this.queryForm.declarationCategory = arr.join(";"); | 643 | this.queryForm.declarationCategory = arr.join(";"); |
| 645 | }, | 644 | }, |
| 645 | + // 失焦事件 | ||
| 646 | + blurEvent() { | ||
| 647 | + this.queryForm.originOfFlightNo = this.upCase(this.queryForm.originOfFlightNo); | ||
| 648 | + }, | ||
| 646 | // 表单提交 | 649 | // 表单提交 |
| 647 | submitForm(formName) { | 650 | submitForm(formName) { |
| 648 | this.$refs[formName].validate((valid) => { | 651 | this.$refs[formName].validate((valid) => { |
| ... | @@ -657,27 +660,20 @@ export default { | ... | @@ -657,27 +660,20 @@ export default { |
| 657 | item.permitOverweight = "Y"; | 660 | item.permitOverweight = "Y"; |
| 658 | } | 661 | } |
| 659 | }); | 662 | }); |
| 660 | - if ( | 663 | + // 校验ET86配舱航班顺位维度 |
| 661 | - this.minCNYCustomVal.length != "" || | 664 | + if (this.minCNYCustomVal.length != "" || this.maxCNYCustomVal.length != "") { |
| 662 | - this.maxCNYCustomVal.length != "" | ||
| 663 | - ) { | ||
| 664 | this.queryForm.currencyCd = "CNY"; | 665 | this.queryForm.currencyCd = "CNY"; |
| 665 | this.queryForm.minCustomVal = this.minCNYCustomVal; | 666 | this.queryForm.minCustomVal = this.minCNYCustomVal; |
| 666 | this.queryForm.maxCustomVal = this.maxCNYCustomVal; | 667 | this.queryForm.maxCustomVal = this.maxCNYCustomVal; |
| 667 | - } else if ( | 668 | + } else if (this.minSUDCustomVal.length != "" || this.maxSUDCustomVal.length != "") { |
| 668 | - this.minSUDCustomVal.length != "" || | ||
| 669 | - this.maxSUDCustomVal.length != "" | ||
| 670 | - ) { | ||
| 671 | this.queryForm.currencyCd = "USD"; | 669 | this.queryForm.currencyCd = "USD"; |
| 672 | this.queryForm.minCustomVal = this.minSUDCustomVal; | 670 | this.queryForm.minCustomVal = this.minSUDCustomVal; |
| 673 | this.queryForm.maxCustomVal = this.maxSUDCustomVal; | 671 | this.queryForm.maxCustomVal = this.maxSUDCustomVal; |
| 674 | } else { | 672 | } else { |
| 675 | this.queryForm.currencyCd = "CNY"; | 673 | this.queryForm.currencyCd = "CNY"; |
| 676 | } | 674 | } |
| 677 | - let fltNo = this.tableData.some((item) => item.flightNo == ""); | 675 | + let fltNo = this.tableData.some((item) => item.flightNo == ""); // 通过遍历判断航班顺位列表有没有填写的航班号 |
| 678 | - let fltNoRoute = this.tableData.some( | 676 | + let fltNoRoute = this.tableData.some((item) => item.flightRoute == ""); // 通过遍历判断航班顺位列表有没有填写的航线 |
| 679 | - (item) => item.flightRoute == "" | ||
| 680 | - ); | ||
| 681 | if (fltNo) { | 677 | if (fltNo) { |
| 682 | this.msgError("航班号不可为空"); | 678 | this.msgError("航班号不可为空"); |
| 683 | return; | 679 | return; |
| ... | @@ -690,14 +686,8 @@ export default { | ... | @@ -690,14 +686,8 @@ export default { |
| 690 | this.msgError("原航班号不可为空"); | 686 | this.msgError("原航班号不可为空"); |
| 691 | return; | 687 | return; |
| 692 | } | 688 | } |
| 693 | - this.queryForm.includeServiceType = | 689 | + this.queryForm.includeServiceType = this.isServiceCode == "1" && this.serviceCode.length > 0 ? this.serviceCode : ""; // 包含服务种类 |
| 694 | - this.isServiceCode == "1" && this.serviceCode.length > 0 | 690 | + this.queryForm.notIncludeServiceType = this.isServiceCode == "2" && this.serviceCode.length > 0 ? this.serviceCode : ""; // 不包含服务种类 |
| 695 | - ? this.serviceCode | ||
| 696 | - : ""; // 包含服务种类 | ||
| 697 | - this.queryForm.notIncludeServiceType = | ||
| 698 | - this.isServiceCode == "2" && this.serviceCode.length > 0 | ||
| 699 | - ? this.serviceCode | ||
| 700 | - : ""; // 不包含服务种类 | ||
| 701 | let parmas = { | 691 | let parmas = { |
| 702 | flightRankDtoList: tableData, // ET86配舱航班顺位 | 692 | flightRankDtoList: tableData, // ET86配舱航班顺位 |
| 703 | fltRuleDto: this.queryForm, | 693 | fltRuleDto: this.queryForm, | ... | ... |
| ... | @@ -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