Elements-SY

Merge branch test into uat

Showing 64 changed files with 2997 additions and 273 deletions
...@@ -39,8 +39,10 @@ ...@@ -39,8 +39,10 @@
39 "axios": "0.21.1", 39 "axios": "0.21.1",
40 "core-js": "3.8.3", 40 "core-js": "3.8.3",
41 "element-ui": "2.15.3", 41 "element-ui": "2.15.3",
42 + "sortablejs": "^1.15.0",
42 "vue": "2.6.14", 43 "vue": "2.6.14",
43 "vue-router": "3.5.2", 44 "vue-router": "3.5.2",
45 + "vuedraggable": "^2.24.3",
44 "vuex": "3.6.2" 46 "vuex": "3.6.2"
45 }, 47 },
46 "devDependencies": { 48 "devDependencies": {
......
...@@ -22,6 +22,7 @@ export function importFlightDestination(file, date) { ...@@ -22,6 +22,7 @@ export function importFlightDestination(file, date) {
22 return request({ 22 return request({
23 method: 'post', 23 method: 'post',
24 url: settings.baseURL + '/flightDestination/importFlightDestination', 24 url: settings.baseURL + '/flightDestination/importFlightDestination',
25 + // headers: { 'Authorization': 'Bearer ' + getToken() },
25 data: formData 26 data: formData
26 }) 27 })
27 } 28 }
...@@ -38,6 +39,7 @@ export function importUrsaDestination(file, date) { ...@@ -38,6 +39,7 @@ export function importUrsaDestination(file, date) {
38 return request({ 39 return request({
39 method: 'post', 40 method: 'post',
40 url: settings.baseURL + '/ursaDestination/importUrsaDestination', 41 url: settings.baseURL + '/ursaDestination/importUrsaDestination',
42 + // headers: { 'Authorization': 'Bearer ' + getToken() },
41 data: formData 43 data: formData
42 }) 44 })
43 } 45 }
...@@ -81,7 +83,7 @@ export function searchUrsaDestination(data) { ...@@ -81,7 +83,7 @@ export function searchUrsaDestination(data) {
81 * @param waybillNo 运单号 83 * @param waybillNo 运单号
82 * @param ursa ursa 84 * @param ursa ursa
83 * @param typeName 申报类别 85 * @param typeName 申报类别
84 - * @param siteName 站点 86 + * @param siteName 始发站
85 * @param regionArray 区域 list 87 * @param regionArray 区域 list
86 * @param areaArray 地区 list 88 * @param areaArray 地区 list
87 * @param serviceTypeArray 服务代码 list 89 * @param serviceTypeArray 服务代码 list
......
...@@ -143,9 +143,15 @@ export function delFlight(data) { ...@@ -143,9 +143,15 @@ export function delFlight(data) {
143 143
144 //查询航线 144 //查询航线
145 /** 145 /**
146 +<<<<<<< HEAD
146 * @param fltNo 航班号 147 * @param fltNo 航班号
147 * @param page 页数 148 * @param page 页数
148 * @param size 页长 149 * @param size 页长
150 +=======
151 + * @param fltNo 航班号
152 + * @param page 页数
153 + * @param size 页长
154 +>>>>>>> test
149 */ 155 */
150 export function queryRoute(data) { 156 export function queryRoute(data) {
151 return request({ 157 return request({
...@@ -204,3 +210,15 @@ export function checkFlightRoute(data) { ...@@ -204,3 +210,15 @@ export function checkFlightRoute(data) {
204 data: data 210 data: data
205 }) 211 })
206 } 212 }
213 +
214 +//更新航线
215 +/**
216 + * @param id *
217 + */
218 +export function updateRoute(id) {
219 + return request({
220 + url: `/dictionary/updateRoute/${id}`,
221 + method: "post",
222 + data: {},
223 + });
224 +}
......
...@@ -69,7 +69,7 @@ let tableHeaders = { ...@@ -69,7 +69,7 @@ let tableHeaders = {
69 status: 1 69 status: 1
70 }, 70 },
71 { 71 {
72 - columnChineseName: "站点", 72 + columnChineseName: "始发站",
73 columnName: "siteName", 73 columnName: "siteName",
74 columnWidth: "80", 74 columnWidth: "80",
75 ext1: "sorTable", 75 ext1: "sorTable",
...@@ -671,7 +671,7 @@ let tableHeaders = { ...@@ -671,7 +671,7 @@ let tableHeaders = {
671 status: 1 671 status: 1
672 }, 672 },
673 { 673 {
674 - columnChineseName: "站点", 674 + columnChineseName: "始发站",
675 columnName: "siteName", 675 columnName: "siteName",
676 columnWidth: "80", 676 columnWidth: "80",
677 ext1: "sorTable", 677 ext1: "sorTable",
...@@ -1764,7 +1764,7 @@ let tableHeaders = { ...@@ -1764,7 +1764,7 @@ let tableHeaders = {
1764 status: 1 1764 status: 1
1765 }, 1765 },
1766 { 1766 {
1767 - columnChineseName: "站点", 1767 + columnChineseName: "始发站",
1768 columnName: "siteName", 1768 columnName: "siteName",
1769 columnWidth: "", 1769 columnWidth: "",
1770 ext1: "", 1770 ext1: "",
...@@ -1806,7 +1806,7 @@ let tableHeaders = { ...@@ -1806,7 +1806,7 @@ let tableHeaders = {
1806 status: 1 1806 status: 1
1807 }, 1807 },
1808 { 1808 {
1809 - columnChineseName: "申报类", 1809 + columnChineseName: "申报类",
1810 columnName: "typeName", 1810 columnName: "typeName",
1811 columnWidth: "", 1811 columnWidth: "",
1812 ext1: "", 1812 ext1: "",
...@@ -1955,7 +1955,7 @@ let tableHeaders = { ...@@ -1955,7 +1955,7 @@ let tableHeaders = {
1955 status: 1 1955 status: 1
1956 }, 1956 },
1957 { 1957 {
1958 - columnChineseName: "站点", 1958 + columnChineseName: "始发站",
1959 columnName: "siteName", 1959 columnName: "siteName",
1960 columnWidth: "", 1960 columnWidth: "",
1961 ext1: "", 1961 ext1: "",
......
1 <template> 1 <template>
2 <div class="top-right-btn"> 2 <div class="top-right-btn">
3 <el-row> 3 <el-row>
4 - <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> 4 + <el-tooltip
5 - <el-button :size="size" circle icon="el-icon-search" @click="toggleSearch()" /> 5 + class="item"
6 + effect="dark"
7 + :content="showSearch ? '隐藏搜索' : '显示搜索'"
8 + placement="top"
9 + >
10 + <el-button
11 + :size="size"
12 + circle
13 + icon="el-icon-search"
14 + @click="toggleSearch()"
15 + />
6 </el-tooltip> 16 </el-tooltip>
7 <el-tooltip class="item" effect="dark" content="刷新" placement="top"> 17 <el-tooltip class="item" effect="dark" content="刷新" placement="top">
8 - <el-button :size="size" circle icon="el-icon-refresh" @click="refresh()" /> 18 + <el-button
19 + :size="size"
20 + circle
21 + icon="el-icon-refresh"
22 + @click="refresh()"
23 + />
9 </el-tooltip> 24 </el-tooltip>
10 - <el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns"> 25 + <el-tooltip
11 - <el-button :size="size" circle icon="el-icon-menu" @click="showColumn()" /> 26 + class="item"
27 + effect="dark"
28 + content="显隐列"
29 + placement="top"
30 + v-if="columns"
31 + >
32 + <el-button
33 + :size="size"
34 + circle
35 + icon="el-icon-menu"
36 + @click="showColumn()"
37 + />
12 </el-tooltip> 38 </el-tooltip>
13 </el-row> 39 </el-row>
14 <el-dialog :title="title" :visible.sync="open" append-to-body :close-on-press-escape="false"> 40 <el-dialog :title="title" :visible.sync="open" append-to-body :close-on-press-escape="false">
......
1 +<template>
2 + <div
3 + class="ylform"
4 + :class="inline == true ? 'the-form' : ''"
5 + :style="{ marginBottom: `${marginBottom}px` }"
6 + >
7 + <el-form
8 + :model="tempQueryForm"
9 + :inline="inline"
10 + :loading="loading"
11 + ref="ruleForm"
12 + :size="size"
13 + >
14 + <el-form-item
15 + v-for="item in tempFormConfig"
16 + :label="item.label"
17 + :key="item.prop"
18 + :prop="item.prop"
19 + :rules="item.rules"
20 + >
21 + <!-- 输入框 -->
22 + <el-input
23 + v-if="item.type === 'Input'"
24 + v-model.trim="tempQueryForm[item.prop]"
25 + :style="{ width: item.width }"
26 + :disabled="item.disable"
27 + :placeholder="
28 + item.placeholder ? item.placeholder : '请输入' + item.label
29 + "
30 + v-on:[item.trigger]="
31 + (e) => {
32 + inputEvent(e, item);
33 + }
34 + "
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 + >
57 + </el-input>
58 + <!-- InputNumber 计数器 -->
59 + <el-input-number
60 + v-if="item.type === 'Number'"
61 + v-model.trim="tempQueryForm[item.prop]"
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 + >
92 + </el-option>
93 + </el-select>
94 + <!-- 远程搜索 -->
95 + <template v-if="item.type === 'Search'">
96 + <el-autocomplete
97 + v-model.trim="tempQueryForm[item.prop]"
98 + :style="{ width: item.width }"
99 + :debounce="1500"
100 + :fetch-suggestions="querySearchAsync"
101 + :placeholder="
102 + item.placeholder ? item.placeholder : '请选择' + item.label
103 + "
104 + @focus="focusKey(item)"
105 + @select="selectSearch"
106 + clearable
107 + ></el-autocomplete>
108 + </template>
109 +
110 + <!-- 日期 -->
111 + <el-date-picker
112 + v-if="item.type === 'Date'"
113 + v-model.trim="tempQueryForm[item.prop]"
114 + :disabled="item.disable"
115 + :placeholder="item.placeholder ? item.placeholder : '请选择日期'"
116 + clearable
117 + >
118 + </el-date-picker>
119 +
120 + <!-- 时间 -->
121 + <el-time-select
122 + v-if="item.type === 'Time'"
123 + v-model.trim="tempQueryForm[item.prop]"
124 + :disabled="item.disable"
125 + :placeholder="item.placeholder ? item.placeholder : '请选择时间'"
126 + clearable
127 + >
128 + </el-time-select>
129 +
130 + <!-- 日期时间 -->
131 + <el-date-picker
132 + v-if="item.type === 'DateTime'"
133 + type="datetime"
134 + v-model.trim="tempQueryForm[item.prop]"
135 + :disabled="item.disable"
136 + :placeholder="item.placeholder ? item.placeholder : '请选择日期'"
137 + clearable
138 + >
139 + </el-date-picker>
140 +
141 + <!-- 日期范围 -->
142 + <el-date-picker
143 + v-if="item.type === 'datetimerange'"
144 + type="datetimerange"
145 + v-model.trim="tempQueryForm[item.prop]"
146 + :disabled="item.disable"
147 + range-separator="至"
148 + start-placeholder="开始日期"
149 + end-placeholder="结束日期"
150 + clearable
151 + >
152 + </el-date-picker>
153 +
154 + <!-- 单选框 普通的样式 Radio 的尺寸,仅在 border 为真时有效-->
155 + <template v-if="item.type === 'radio'">
156 + <el-radio
157 + v-model.trim="tempQueryForm[item.prop]"
158 + v-for="op in item.options.data"
159 + :disabled="item.disable"
160 + :border="tempQueryForm[item.border]"
161 + :size="tempQueryForm[item.size]"
162 + :label="op[item.options.label] || op.label"
163 + :value="op[item.options.value] || op.value"
164 + :key="op[item.options.value] || op.value"
165 + ></el-radio>
166 + </template>
167 +
168 + <!-- 单选框 按钮样式 -->
169 + <el-radio-group
170 + v-if="item.type === 'radioButtom'"
171 + v-model.trim="tempQueryForm[item.prop]"
172 + :size="tempQueryForm[item.size]"
173 + :disabled="item.disable"
174 + >
175 + <el-radio-button
176 + v-for="op in item.options.data"
177 + :label="op[item.options.label] || op.label"
178 + :value="op[item.options.value] || op.value"
179 + :key="op[item.options.value] || op.value"
180 + ></el-radio-button>
181 + </el-radio-group>
182 +
183 + <!-- 文本框 -->
184 + <el-input
185 + v-if="item.type === 'textarea'"
186 + v-model.trim="tempQueryForm[item.prop]"
187 + type="textarea"
188 + :style="{ width: item.width }"
189 + :disabled="item.disable"
190 + :rows="item.row"
191 + :autosize="item.autosize"
192 + :placeholder="
193 + item.placeholder ? item.placeholder : '请输入' + item.label
194 + "
195 + clearable
196 + >
197 + </el-input>
198 + <!-- 多选框 -->
199 + <template v-if="item.type === 'Checkbox'">
200 + <el-checkbox
201 + v-model="tempQueryForm[item.prop]"
202 + :disabled="item.disabled"
203 + ></el-checkbox>
204 + </template>
205 + </el-form-item>
206 + <!-- 查询按钮 de-->
207 + <span v-show="inline & hiddenFormBtn">
208 + <el-form-item v-show="show">
209 + <el-button
210 + type="primary"
211 + @click="handleSearch('ruleForm')"
212 + :btnLoading="btnLoading"
213 + >
214 + {{ formBtn }}
215 + </el-button>
216 + </el-form-item>
217 + </span>
218 + <span v-show="inline & hiddenFormBtn">
219 + <el-form-item v-show="show">
220 + <el-button @click="resetFields('ruleForm')">重置</el-button>
221 + </el-form-item>
222 + </span>
223 + </el-form>
224 + </div>
225 +</template>
226 +
227 +<script>
228 +import request from "@/utils/request";
229 +import { deepClone } from "@/utils";
230 +export default {
231 + props: {
232 + marginBottom: {
233 + type: Number,
234 + default: 30,
235 + },
236 + view: {
237 + type: Boolean,
238 + default: false,
239 + },
240 + formBtn: {
241 + type: String,
242 + default: "查询",
243 + },
244 + btnLoading: {
245 + type: Boolean,
246 + default: false,
247 + },
248 + loading: {
249 + //加载
250 + type: Boolean,
251 + default: false,
252 + },
253 + isBtnSave: {
254 + type: Boolean,
255 + default: false,
256 + },
257 + // 由inline属性决定form表单是普通表单,还是行内表单
258 + inline: {
259 + //排列方式
260 + type: Boolean,
261 + default: true,
262 + },
263 + searchLoading: {
264 + type: Boolean,
265 + default: false,
266 + },
267 + hiddenFormBtn: {
268 + //是否展示搜索按钮
269 + type: Boolean,
270 + default: false,
271 + },
272 + labelWidth: {
273 + type: String,
274 + default: "120px",
275 + },
276 + formWidth: {
277 + //form表单宽度
278 + type: String,
279 + default: "200px",
280 + },
281 + formConfig: {
282 + type: Array,
283 + default: [],
284 + },
285 + queryForm: {
286 + type: Object,
287 + default: () => {},
288 + },
289 + // 用于控制该表单内组件的尺寸 medium / small / mini
290 + size: {
291 + type: String,
292 + default: "medium",
293 + },
294 + },
295 + data() {
296 + return {
297 + show: true,
298 + tempQueryForm: {},
299 + tempFormConfig: [],
300 + fetchResult: [],
301 + timeout: null,
302 + searchMark: {}, // 搜索
303 + };
304 + },
305 + mounted() {},
306 + computed: {},
307 + methods: {
308 + // input事件绑定和注册
309 + inputEvent(e, item) {
310 + this.$emit("input", this.tempQueryForm);
311 + },
312 + // 回车事件
313 + toEnterSearch() {
314 + this.$emit("keyup", this.tempQueryForm);
315 + },
316 + // selectSearch 聚焦获取当前input绑定的数据
317 + focusKey(item) {
318 + this.searchMark = item;
319 + },
320 + // selectSearch 下拉选中获取当前input绑定的数据
321 + selectSearch(item) {
322 + console.log(item);
323 + },
324 + // 远程搜索查询
325 + querySearchAsync(queryString, cb) {
326 + let result = this.formConfig.filter((item) => {
327 + if (item.hasOwnProperty("http")) {
328 + if (item.prop === this.searchMark.prop) {
329 + return item;
330 + }
331 + }
332 + });
333 + // 在搜索关键词不为空时发送http请求
334 + if (queryString) {
335 + if (queryString.split(" ").length > 0) {
336 + if (result[0].http.method == "post") {
337 + result[0].http.data[result[0].prop] = queryString.split(" ")[0];
338 + } else {
339 + result[0].http.params[result[0].prop] = queryString.split(" ")[0];
340 + }
341 + }
342 + request(result[0].http).then((res) => {
343 + if (res.code == 200) {
344 + if (res.data.list.length) {
345 + res.data.list.map((item) => {
346 + item.value = `${item[result[0].prop]} ${item[result[0].name]}`;
347 + });
348 + this.fetchResult = res.data.list;
349 + var results = queryString.split(" ")[0]
350 + ? this.fetchResult.filter(
351 + this.createStateFilter(queryString.split(" ")[0])
352 + )
353 + : this.fetchResult;
354 + clearTimeout(this.timeout);
355 + this.timeout = setTimeout(() => {
356 + cb(results);
357 + }, 1500 * Math.random());
358 + }
359 + }
360 + });
361 + }
362 + },
363 + // 远程搜索匹配查询
364 + createStateFilter(queryString) {
365 + return (state) => {
366 + return (
367 + state[this.searchMark.prop]
368 + .toLowerCase()
369 + .indexOf(queryString.toLowerCase()) === 0
370 + );
371 + };
372 + },
373 + // 行内表单搜索事件
374 + handleSearch(formName, cb) {
375 + this.$refs[formName].validate((valid) => {
376 + if (valid) {
377 + cb(valid);
378 + } else {
379 + console.log("error submit!!");
380 + return false;
381 + }
382 + });
383 + this.$emit("handleSearch");
384 + },
385 + // 清空ruleForm表单事件
386 + resetFields(formName = "ruleForm") {
387 + this.$refs[formName].resetFields();
388 + },
389 + },
390 + watch: {
391 + queryForm: {
392 + handler(val) {
393 + this.tempQueryForm = val;
394 + },
395 + deep: true,
396 + immediate: true,
397 + },
398 + formConfig: {
399 + handler(val) {
400 + this.tempFormConfig = deepClone(val);
401 + },
402 + deep: true,
403 + immediate: true,
404 + },
405 + },
406 +};
407 +</script>
408 +<style lang="scss" scoped>
409 +
410 +</style>
1 +<template>
2 + <el-input
3 + v-bind="$attrs"
4 + clearable
5 + @input="handleInput"
6 + @focus="handleFocus"
7 + @blur="handleBlur"
8 + @change="handleChange"
9 + class="yl-input"
10 + ></el-input>
11 +</template>
12 +
13 +<script>
14 +export default {
15 + props: {
16 + rules: {
17 + type: Array,
18 + default: () => [],
19 + },
20 + },
21 + data() {
22 + return {};
23 + },
24 + computed: {},
25 + created() {},
26 + mounted() {},
27 + methods: {
28 + handleInput(event) {
29 + // v-bind="$attrs" v-on="$listeners"
30 + this.$emit("input", event);
31 + },
32 + handleFocus(event) {
33 + this.$emit("focus", event);
34 + },
35 + handleBlur(event) {
36 + this.$emit("blur", event);
37 + },
38 + handleChange(event) {
39 + this.$emit("change", event);
40 + },
41 + },
42 +};
43 +</script>
44 +<style lang='scss'>
45 +
46 +</style>
1 +<script>
2 +/**
3 + * 动态渲染 el-table-column
4 + */
5 +export default {
6 + name: 'column',
7 + props: {
8 + attrs: {
9 + type: Object,
10 + default: () => ({}),
11 + required: true
12 + }
13 + },
14 + render: function(h) {
15 + let attrs = this.attrs;
16 + let scopedSlots = {};
17 + if (attrs.render) {
18 + scopedSlots.default = scope => attrs.render(h, scope);
19 + }
20 + return h('el-table-column', {
21 + attrs,
22 + scopedSlots
23 + });
24 + }
25 +};
26 +</script>
1 + <template>
2 + <div class="table-container">
3 + <el-row v-if="attrs.btnCofig.isBtn" style="margin-bottom: 15px">
4 + <el-col>
5 + <el-button
6 + v-for="item in attrs.btnCofig.btnGroup"
7 + :key="item.icon"
8 + :type="item.type"
9 + :icon="item.icon"
10 + :round="item.round"
11 + :size="item.size"
12 + :loading="item.loading"
13 + @click="handleClick(item)"
14 + >{{ item.btnName }}</el-button
15 + >
16 + </el-col>
17 + </el-row>
18 + <el-table
19 + :max-height="attrs.maxHeight"
20 + :empty-text="emptyText"
21 + v-bind="attrs"
22 + v-loading="loadingTable"
23 + :data="tableData"
24 + @selection-change="selectionChange"
25 + ref="tableRef"
26 + row-key="id"
27 + :header-cell-class-name="headerCellClassName"
28 + >
29 + <template v-if="columns.length">
30 + <template v-for="(item, index) in columns">
31 + <column v-if="!item.hidden" :key="index" :attrs="item"></column>
32 + </template>
33 + </template>
34 + <slot name="column" v-else></slot>
35 + </el-table>
36 + <!-- 分页 -->
37 + <div
38 + v-if="pageConfig.isPagination"
39 + class="pagination-container"
40 + :style="{ textAlign: pageConfig.position || 'right' }"
41 + >
42 + <el-pagination
43 + background
44 + :hide-on-single-page="false"
45 + :current-page="pageConfig.pageData.page"
46 + :page-sizes="[10, 15, 20, 25, 30, 35, 40]"
47 + :page-size="pageConfig.pageData.size"
48 + layout="total,prev, pager, next, jumper, ->, sizes"
49 + :total="pageConfig.total"
50 + @size-change="handleSizeChange"
51 + @current-change="handleCurrentChange"
52 + >
53 + </el-pagination>
54 + </div>
55 + </div>
56 +</template>
57 +
58 +<script>
59 +import Sortable from "sortablejs";
60 +import { objectMerge, debounce } from "@/utils";
61 +import column from "./column";
62 +export default {
63 + props: {
64 + attrs: {
65 + type: Object,
66 + default: {
67 + border: true,
68 + isDragSort: false,
69 + btnCofig: {
70 + isBtn: true,
71 + btnGroup: [
72 + {
73 + type: "primary", // text、primary、danger
74 + icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right
75 + btnName: "搜索",
76 + size: "mini", // medium / small / mini
77 + round: false,
78 + loading: false,
79 + event: "searchBtn",
80 + },
81 + ],
82 + },
83 + },
84 + },
85 + emptyText: {
86 + type: String,
87 + default: "暂无数据",
88 + },
89 + loadingTable: {
90 + type: Boolean,
91 + default: false,
92 + },
93 + columns: {
94 + type: Array,
95 + default: () => [],
96 + },
97 + tableData: {
98 + type: Array,
99 + default: () => [],
100 + },
101 + pageConfig: {
102 + type: Object,
103 + default: {
104 + isPagination: true,
105 + },
106 + required: true,
107 + },
108 + },
109 + components: {
110 + column,
111 + },
112 + data() {
113 + return {
114 + dropCol: objectMerge({}, this.columns),
115 + trHeight: 4,
116 + };
117 + },
118 + computed: {
119 + _attrs() {
120 + //默认table 参数
121 + const defaultParams = {};
122 + return Object.assign(defaultParams, this.attrs);
123 + },
124 + isHasAttr() {},
125 + },
126 + created() {
127 + if (this.attrs.isDragSort) {
128 + // 有没有复选框、有没有render
129 + // this.columns
130 + }
131 + },
132 + mounted() {
133 + //阻止火狐拖拽新建新页面
134 + document.body.addEventListener(
135 + "drop",
136 + (event) => {
137 + event.preventDefault();
138 + event.stopPropagation();
139 + },
140 + false
141 + );
142 + if (this.tableData.length) {
143 + this.getTrCurrentHeight();
144 + window.addEventListener("resize", this.getTrCurrentHeight);
145 + // 拖拽行更新排序
146 + // this.rowDrop();
147 + // 拖拽列更新排序
148 + this.columnDrop();
149 + }
150 + },
151 + destroyed() {
152 + if (this.tableData.length) {
153 + window.removeEventListener("resize", this.getTrCurrentHeight);
154 + }
155 + },
156 +
157 + methods: {
158 + getTrCurrentHeight: debounce(function () {
159 + this.$nextTick(() => {
160 + const trEl =
161 + this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1]
162 + .children[0].clientHeight;
163 + this.trHeight = trEl;
164 + });
165 + }, 800),
166 +
167 + // 给表头列添加className
168 + headerCellClassName({ row, column, rowIndex, columnIndex }) {
169 + if (columnIndex !== 0) {
170 + return "el-table_1_column";
171 + }
172 + },
173 + useTableFunc(FuncName, ...params) {
174 + if (!this.$refs["el-table"]) {
175 + return console.warn("访问不到el-table");
176 + }
177 + if (!FuncName) {
178 + return console.error("请传入tabel方法名字");
179 + }
180 + this.$refs["el-table"][FuncName](params[0]);
181 + },
182 + // table复选框事件
183 + selectionChange(e) {
184 + console.log(e);
185 + this.$emit("selectionEvent", e);
186 + },
187 + // 条数变化
188 + handleSizeChange(e) {
189 + this.$emit("sizeChange", e);
190 + },
191 + // 页码变化
192 + handleCurrentChange(e) {
193 + this.$emit("currentChange", e);
194 + },
195 + // btn点击事件注册
196 + handleClick(item) {
197 + this.$emit(item.event, item);
198 + },
199 + // 拖拽行更新排序
200 + rowDrop() {
201 + const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
202 + // console.log("wrapperTr:", wrapperTr);
203 + this.sortable = Sortable.create(wrapperTr, {
204 + sort: this.attrs.isDragSort,
205 + animation: 100,
206 + delay: 0,
207 + handle: ".move", // 只有带move类名的元素才能拖动,多选框禁止拖动
208 + onEnd: (evt) => {
209 + // 因为手动加了一个多选框, 不在表头循环数组内, 所以这里减1
210 + let oldIndx = evt.oldIndex - 1;
211 + let newIndx = evt.newIndex - 1;
212 + const oldItem = this.dropCol[oldIndx];
213 + // 真正改变列数据--变化列头,就能实现列拖动 列数据按列头索引取值 {{ scope.row[dropCol[index].prop] }}
214 + this.dropCol.splice(oldIndx, 1); // 删除旧一行 删除为1
215 + this.dropCol.splice(newIndx, 0, oldItem); // 插入新一行 插入为0
216 + },
217 + });
218 + },
219 + // 拖拽列更新排序
220 + columnDrop() {
221 + const tbody = document.querySelector(".el-table__body-wrapper tbody");
222 + const _this = this;
223 + Sortable.create(tbody, {
224 + sort: this.attrs.isDragSort,
225 + animation: 100,
226 + delay: 0,
227 + onEnd({ newIndex, oldIndex }) {
228 + // console.log("onEnd:", newIndex, oldIndex);
229 + const currRow = _this.tableData.splice(oldIndex, 1)[0];
230 + _this.tableData.splice(newIndex, 0, currRow);
231 + },
232 + });
233 + },
234 + },
235 + watch: {
236 + data() {
237 + this.$nextTick(() => {
238 + this.useTableFunc("doLayout");
239 + });
240 + },
241 + },
242 +};
243 +</script>
244 +<style lang="scss">
245 +
246 +</style>
1 +import Vue from 'vue'
2 +import VueI18n from 'vue-i18n'
3 +
4 +import ElementLocale from 'element-ui/lib/locale'
5 +import enLocale from 'element-ui/lib/locale/lang/en'
6 +import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
7 +
8 +import langZh from "@/assets/languages/zh.js"
9 +import langEN from "@/assets/languages/en.js"
10 +
11 +Vue.use(VueI18n)
12 +
13 +const i18n = new VueI18n({
14 + locale: 'zh',//默认语言
15 + messages: {
16 + 'zh': {...langZh,...zhLocale},
17 + 'en': {...langEN,...enLocale}
18 + }
19 +})
20 +ElementLocale.i18n((key, value) => i18n.t(key, value))
21 +
22 +export default i18n
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
16 return this.$store.state.tagsView.cachedViews 16 return this.$store.state.tagsView.cachedViews
17 }, 17 },
18 key() { 18 key() {
19 - return this.$route.path 19 + return this.$route.fullPath
20 } 20 }
21 } 21 }
22 } 22 }
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
4 @toggleClick="toggleSideBar" /> 4 @toggleClick="toggleSideBar" />
5 <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" /> 5 <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
6 <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" /> 6 <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
7 -
8 <div class="right-menu"> 7 <div class="right-menu">
9 <template v-if="device !== 'mobile'"> </template> 8 <template v-if="device !== 'mobile'"> </template>
10 <el-select v-model="portName" size="mini" style="width: 120px; top: -17px; right: 7px" placeholder="选择口岸"> 9 <el-select v-model="portName" size="mini" style="width: 120px; top: -17px; right: 7px" placeholder="选择口岸">
...@@ -22,25 +21,19 @@ ...@@ -22,25 +21,19 @@
22 </el-dropdown-item> 21 </el-dropdown-item>
23 </el-dropdown-menu> 22 </el-dropdown-menu>
24 </el-dropdown> 23 </el-dropdown>
25 - <!-- <el-select 24 + <el-select v-model="locale" size="mini" @change="local" style="width: 75px; top: -17px; right: 7px">
26 - v-model="locale"
27 - size="mini"
28 - @change="local"
29 - style="width: 75px; top: -17px; right: 7px"
30 - >
31 <el-option label="中文" value="zh"> </el-option> 25 <el-option label="中文" value="zh"> </el-option>
32 <el-option label="英文" value="en"> </el-option> 26 <el-option label="英文" value="en"> </el-option>
33 - </el-select> --> 27 + </el-select>
34 </div> 28 </div>
35 </div> 29 </div>
36 </template> 30 </template>
37 31
38 <script> 32 <script>
39 -import { mapGetters } from "vuex" 33 +import { mapGetters } from "vuex";
40 -import Breadcrumb from "@/components/Breadcrumb" 34 +import Breadcrumb from "@/components/Breadcrumb";
41 -import TopNav from "@/components/TopNav" 35 +import TopNav from "@/components/TopNav";
42 -import Hamburger from "@/components/Hamburger" 36 +import Hamburger from "@/components/Hamburger";
43 -import settings from "@/settings"
44 37
45 export default { 38 export default {
46 components: { 39 components: {
...@@ -88,7 +81,8 @@ export default { ...@@ -88,7 +81,8 @@ export default {
88 .then((res) => { 81 .then((res) => {
89 if (res.code === 200) { 82 if (res.code === 200) {
90 this.$store.dispatch('tagsView/delAllCachedViews') 83 this.$store.dispatch('tagsView/delAllCachedViews')
91 - // location.reload(); 84 + this.$store.dispatch('tagsView/delAllVisitedViews')
85 + // location.reload(false);
92 if (this.$route.path != '/index') { 86 if (this.$route.path != '/index') {
93 this.$router.push('/index') 87 this.$router.push('/index')
94 } 88 }
...@@ -120,17 +114,19 @@ export default { ...@@ -120,17 +114,19 @@ export default {
120 }, 114 },
121 async logout() { 115 async logout() {
122 this.$confirm("确定注销并退出系统吗?", "提示", { 116 this.$confirm("确定注销并退出系统吗?", "提示", {
117 + closeOnClickModal: false,
123 confirmButtonText: "确定", 118 confirmButtonText: "确定",
124 cancelButtonText: "取消", 119 cancelButtonText: "取消",
125 type: "warning", 120 type: "warning",
126 }).then(() => { 121 }).then(() => {
127 this.$store.dispatch("LogOut").then(() => { 122 this.$store.dispatch("LogOut").then(() => {
128 - window.location.href = settings.logoutURL;//wsso系统跳转 123 + // this.$router.push('/')
124 + window.location.href = this.settings.logoutURL;//wsso系统跳转
129 }); 125 });
130 }); 126 });
131 }, 127 },
132 local(val) { 128 local(val) {
133 - // this.$i18n.locale = val; //此处val为 zh 或者 en 129 + this.$i18n.locale = val; //此处val为 zh 或者 en
134 }, 130 },
135 }, 131 },
136 }; 132 };
...@@ -233,4 +229,15 @@ export default { ...@@ -233,4 +229,15 @@ export default {
233 } 229 }
234 } 230 }
235 } 231 }
232 +
233 +.verTip {
234 + width: auto;
235 + height: 50px;
236 + line-height: 50px;
237 + font-size: 14px;
238 + font-weight: 700;
239 + position: absolute;
240 + left: 50%;
241 + color: #1890ff;
242 +}
236 </style> 243 </style>
......
...@@ -82,13 +82,15 @@ export default { ...@@ -82,13 +82,15 @@ export default {
82 position: relative; 82 position: relative;
83 overflow: hidden; 83 overflow: hidden;
84 width: 100%; 84 width: 100%;
85 +
85 ::v-deep { 86 ::v-deep {
86 .el-scrollbar__bar { 87 .el-scrollbar__bar {
87 bottom: 0px; 88 bottom: 0px;
88 } 89 }
90 +
89 .el-scrollbar__wrap { 91 .el-scrollbar__wrap {
90 // height: 49px; 92 // height: 49px;
91 - margin-top:4px; 93 + margin-top: 4px;
92 } 94 }
93 } 95 }
94 } 96 }
......
...@@ -26,7 +26,7 @@ import Drag from "@/components/Drag" ...@@ -26,7 +26,7 @@ import Drag from "@/components/Drag"
26 import tableHeaders from '@/assets/languages/tableHeaders' 26 import tableHeaders from '@/assets/languages/tableHeaders'
27 import dictLabels from "@/assets/languages/dictLabels.js" 27 import dictLabels from "@/assets/languages/dictLabels.js"
28 import settings from './settings.js' 28 import settings from './settings.js'
29 - 29 +import * as filters from "./utils/filters.js";
30 // 全局方法挂载 30 // 全局方法挂载
31 Vue.prototype.parseTime = parseTime 31 Vue.prototype.parseTime = parseTime
32 Vue.prototype.resetForm = resetForm 32 Vue.prototype.resetForm = resetForm
...@@ -76,6 +76,10 @@ Vue.directive('focus', { ...@@ -76,6 +76,10 @@ Vue.directive('focus', {
76 } 76 }
77 }); 77 });
78 78
79 +// 全局注册过滤器
80 +Object.keys(filters).forEach((key) => {
81 + Vue.filter(key, filters[key]);
82 +});
79 83
80 /** 84 /**
81 * If you don't want to use mock-server 85 * If you don't want to use mock-server
......
1 import router from './router' 1 import router from './router'
2 import store from './store' 2 import store from './store'
3 import { Message } from 'element-ui' 3 import { Message } from 'element-ui'
4 -import { getToken, setToken, removeToken } from '@/utils/auth' 4 +import { getToken, removeToken } from '@/utils/auth'
5 -import settings from "@/settings"
6 5
7 6
8 const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] 7 const whiteList = ['/login', '/auth-redirect', '/bind', '/register']
9 -
10 router.beforeEach((to, from, next) => { 8 router.beforeEach((to, from, next) => {
11 if (getToken()) { 9 if (getToken()) {
12 /* has token*/ 10 /* has token*/
...@@ -16,19 +14,16 @@ router.beforeEach((to, from, next) => { ...@@ -16,19 +14,16 @@ router.beforeEach((to, from, next) => {
16 if (store.getters.roles.length === 0) { 14 if (store.getters.roles.length === 0) {
17 // 判断当前用户是否已拉取完user_info信息 15 // 判断当前用户是否已拉取完user_info信息
18 store.dispatch('GetInfo').then(() => { 16 store.dispatch('GetInfo').then(() => {
17 + //获取用户表头
19 store.dispatch('GetTableHeaders').then(() => { 18 store.dispatch('GetTableHeaders').then(() => {
20 - store.dispatch('GenerateRoutes').then(accessRoutes => {
21 // 根据roles权限生成可访问的路由表 19 // 根据roles权限生成可访问的路由表
20 + store.dispatch('GenerateRoutes').then(accessRoutes => {
22 router.addRoutes(accessRoutes) // 动态添加可访问路由表 21 router.addRoutes(accessRoutes) // 动态添加可访问路由表
23 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 22 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
24 }) 23 })
25 }) 24 })
26 }).catch(err => { 25 }).catch(err => {
27 - Message.error(err) 26 +
28 - // store.dispatch('LogOut').then(() => {
29 - // // next({ path: '/' })
30 - // window.location.href = settings.loginURL;//wsso系统跳转
31 - // })
32 }) 27 })
33 } else { 28 } else {
34 next() 29 next()
...@@ -43,12 +38,7 @@ router.beforeEach((to, from, next) => { ...@@ -43,12 +38,7 @@ router.beforeEach((to, from, next) => {
43 setToken(token) 38 setToken(token)
44 next({ path: '/' }) 39 next({ path: '/' })
45 } else { 40 } else {
46 - if (whiteList.indexOf(to.path) !== -1) { 41 + next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
47 - // 在免登录白名单,直接进入
48 - next()
49 - } else {
50 - window.location.href = settings.loginURL;//wsso系统跳转
51 - }
52 } 42 }
53 } 43 }
54 }) 44 })
......
...@@ -29,76 +29,97 @@ import ParentView from '@/components/ParentView'; ...@@ -29,76 +29,97 @@ import ParentView from '@/components/ParentView';
29 // 公共路由 29 // 公共路由
30 export const constantRoutes = [ 30 export const constantRoutes = [
31 { 31 {
32 - path: '/redirect', 32 + path: "/redirect",
33 component: Layout, 33 component: Layout,
34 hidden: true, 34 hidden: true,
35 children: [ 35 children: [
36 { 36 {
37 - path: '/redirect/:path(.*)', 37 + path: "/redirect/:path(.*)",
38 - component: (resolve) => require(['@/views/redirect'], resolve) 38 + component: (resolve) => require(["@/views/redirect"], resolve),
39 - } 39 + },
40 - ] 40 + ],
41 }, 41 },
42 - // {
43 - // path: '/login',
44 - // component: (resolve) => require(['@/views/login'], resolve),
45 - // hidden: true
46 - // },
47 { 42 {
48 - path: '/404', 43 + path: "/login",
49 - component: (resolve) => require(['@/views/error/404'], resolve), 44 + component: (resolve) => require(["@/views/login"], resolve),
50 - hidden: true 45 + hidden: true,
51 }, 46 },
52 { 47 {
53 - path: '/401', 48 + path: "/404",
54 - component: (resolve) => require(['@/views/error/401'], resolve), 49 + component: (resolve) => require(["@/views/error/404"], resolve),
55 - hidden: true 50 + hidden: true,
56 }, 51 },
57 { 52 {
58 - path: '', 53 + path: "/401",
54 + component: (resolve) => require(["@/views/error/401"], resolve),
55 + hidden: true,
56 + },
57 + {
58 + path: "",
59 component: Layout, 59 component: Layout,
60 - redirect: 'index', 60 + redirect: "index",
61 children: [ 61 children: [
62 { 62 {
63 - path: 'index', 63 + path: "index",
64 - component: (resolve) => require(['@/views/index'], resolve), 64 + component: (resolve) => require(["@/views/index"], resolve),
65 - name: 'Index', 65 + name: "Index",
66 - meta: { title: '首页', icon: 'home', noCache: true, affix: true } 66 + meta: { title: "首页", icon: "home", noCache: true, affix: true },
67 }, 67 },
68 - ] 68 + ],
69 }, 69 },
70 { 70 {
71 - path: '', 71 + path: "",
72 component: Layout, 72 component: Layout,
73 hidden: true, 73 hidden: true,
74 children: [ 74 children: [
75 { 75 {
76 - path: '/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status', 76 + path: "/et86",
77 - component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), 77 + component: (resolve) =>
78 - name: 'FlightAllocConfigInfo', 78 + require(["@/views/allocationConfig/et86"], resolve),
79 - meta: { title: '航班配舱', icon: 'user' } 79 + name: "et86",
80 + meta: { title: "ET86", icon: "user" },
81 + children: [],
82 + },
83 + {
84 + path: "/et86/:edit",
85 + component: (resolve) =>
86 + require(["@/views/allocationConfig/et86/edit"], resolve),
87 + name: "edit",
88 + meta: { title: "编辑", icon: "user" },
89 + },
90 + {
91 + path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status",
92 + component: (resolve) =>
93 + require(["@/views/allocationConfig/flightAllocConfig/info"], resolve),
94 + name: "FlightAllocConfigInfo",
95 + meta: { title: "航班配舱", icon: "user" },
80 }, 96 },
81 { 97 {
82 - path: '/weatherTable/:awbNbr', 98 + path: "/weatherTable/:awbNbr",
83 - component: (resolve) => require(['@/views/systemLog/dmLog/weatherTable'], resolve), 99 + component: (resolve) =>
84 - name: 'weatherTable', 100 + require(["@/views/systemLog/dmLog/weatherTable"], resolve),
85 - meta: { title: '流水表', icon: 'user' } 101 + name: "weatherTable",
102 + meta: { title: "流水表", icon: "user" },
86 }, 103 },
87 { 104 {
88 - path: '/upDateResult', 105 + path: "/upDateResult",
89 - component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve), 106 + component: (resolve) =>
90 - name: 'UpDateResult', 107 + require(["@/views/preMdeConfig/upDateResult"], resolve),
91 - meta: { title: '错误信息提示', icon: 'user' } 108 + name: "UpDateResult",
109 + meta: { title: "错误信息提示", icon: "user" },
92 }, 110 },
93 { 111 {
94 - path: '/goodsLog/type=:type', 112 + path: "/goodsLog/type=:type",
95 - component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve), 113 + component: (resolve) =>
96 - name: 'GoodsUploadLog', 114 + require([
97 - meta: { title: '导入日志', icon: 'user' } 115 + "@/views/basicInformation/goodsStation/goodsUploadLog",
116 + ], resolve),
117 + name: "GoodsUploadLog",
118 + meta: { title: "导入日志", icon: "user" },
98 }, 119 },
99 - ] 120 + ],
100 }, 121 },
101 -] 122 +];
102 123
103 export default new Router({ 124 export default new Router({
104 mode: 'history', // 去掉url中的# 125 mode: 'history', // 去掉url中的#
......
1 -import { constantRoutes } from '@/router' 1 +import { constantRoutes } from "@/router";
2 -import { getRouters } from '@/api/menu' 2 +import { getRouters } from "@/api/menu";
3 -import Layout from '@/layout/index' 3 +import Layout from "@/layout/index";
4 -import ParentView from '@/components/ParentView'; 4 +import ParentView from "@/components/ParentView";
5 -import hasPermi from '../../directive/permission/hasPermi'; 5 +import hasPermi from "../../directive/permission/hasPermi";
6 const permission = { 6 const permission = {
7 state: { 7 state: {
8 routes: [], 8 routes: [],
...@@ -10,26 +10,35 @@ const permission = { ...@@ -10,26 +10,35 @@ const permission = {
10 defaultRoutes: [], 10 defaultRoutes: [],
11 topbarRouters: [], 11 topbarRouters: [],
12 sidebarRouters: [], 12 sidebarRouters: [],
13 - filghtAllData: {} 13 + filghtAllData: {},
14 }, 14 },
15 mutations: { 15 mutations: {
16 SET_ROUTES: (state, routes) => { 16 SET_ROUTES: (state, routes) => {
17 - state.addRoutes = routes 17 + state.addRoutes = routes;
18 - state.routes = constantRoutes.concat(routes) 18 + state.routes = constantRoutes.concat(routes);
19 }, 19 },
20 SET_DEFAULT_ROUTES: (state, routes) => { 20 SET_DEFAULT_ROUTES: (state, routes) => {
21 - state.defaultRoutes = constantRoutes.concat(routes) 21 + state.defaultRoutes = constantRoutes.concat(routes);
22 }, 22 },
23 SET_TOPBAR_ROUTES: (state, routes) => { 23 SET_TOPBAR_ROUTES: (state, routes) => {
24 // 顶部导航菜单默认添加统计报表栏指向首页 24 // 顶部导航菜单默认添加统计报表栏指向首页
25 - const index = [{ 25 + const index = [
26 - path: 'index', 26 + {
27 - meta: { title: '首页', icon: 'home' } 27 + path: "index",
28 - }] 28 + meta: { title: "首页", icon: "home" },
29 + },
30 + ];
29 state.topbarRouters = routes.concat(index); 31 state.topbarRouters = routes.concat(index);
30 }, 32 },
31 SET_SIDEBAR_ROUTERS: (state, routes) => { 33 SET_SIDEBAR_ROUTERS: (state, routes) => {
32 - state.sidebarRouters = routes 34 + state.sidebarRouters = routes;
35 + },
36 + SET_FILGHTALL: (state, data) => {
37 + let name = data.name;
38 + state.filghtAllData[name] = data.data;
39 + },
40 + REMOVE_FILGHTALL: (state, name) => {
41 + delete state.filghtAllData[name];
33 }, 42 },
34 SET_FILGHTALL: (state, data) => { 43 SET_FILGHTALL: (state, data) => {
35 let name = data.name; 44 let name = data.name;
...@@ -42,78 +51,99 @@ const permission = { ...@@ -42,78 +51,99 @@ const permission = {
42 actions: { 51 actions: {
43 // 生成路由 52 // 生成路由
44 GenerateRoutes({ commit }) { 53 GenerateRoutes({ commit }) {
45 - return new Promise(resolve => { 54 + return new Promise((resolve) => {
46 // 向后端请求路由数据 55 // 向后端请求路由数据
47 - getRouters().then(res => { 56 + getRouters().then((res) => {
57 + // const newUrl = {
58 + // id: 24,
59 + // name: "et86",
60 + // path: "/et86",
61 + // hidden: false,
62 + // component: "allocationConfig/et86",
63 + // meta: {
64 + // title: "ET86",
65 + // icon: "edit",
66 + // permissions: "allocation:rand:list",
67 + // noCache: false,
68 + // },
69 + // alwaysShow: false,
70 + // children: null,
71 + // };
72 + // res.data.map((item) => {
73 + // if (item.name == "AllocationConfig") {
74 + // item.children.push(newUrl);
75 + // }
76 + // });
48 res.data = hasPermi.routerPer(res.data); 77 res.data = hasPermi.routerPer(res.data);
49 - const sdata = JSON.parse(JSON.stringify(res.data)) 78 + const sdata = JSON.parse(JSON.stringify(res.data));
50 - const rdata = JSON.parse(JSON.stringify(res.data)) 79 + const rdata = JSON.parse(JSON.stringify(res.data));
51 - const sidebarRoutes = filterAsyncRouter(sdata) 80 + const sidebarRoutes = filterAsyncRouter(sdata);
52 - const rewriteRoutes = filterAsyncRouter(rdata, false, true) 81 + const rewriteRoutes = filterAsyncRouter(rdata, false, true);
53 - rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) 82 + rewriteRoutes.push({ path: "*", redirect: "/404", hidden: true });
54 - commit('SET_ROUTES', rewriteRoutes) 83 + commit("SET_ROUTES", rewriteRoutes);
55 - commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes)) 84 + commit("SET_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes));
56 - commit('SET_DEFAULT_ROUTES', sidebarRoutes) 85 + commit("SET_DEFAULT_ROUTES", sidebarRoutes);
57 - commit('SET_TOPBAR_ROUTES', sidebarRoutes) 86 + commit("SET_TOPBAR_ROUTES", sidebarRoutes);
58 - resolve(rewriteRoutes) 87 + resolve(rewriteRoutes);
59 - }) 88 + });
60 - }) 89 + });
61 - } 90 + },
62 - } 91 + },
63 -} 92 +};
64 93
65 // 遍历后台传来的路由字符串,转换为组件对象 94 // 遍历后台传来的路由字符串,转换为组件对象
66 function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { 95 function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
67 - return asyncRouterMap.filter(route => { 96 + return asyncRouterMap.filter((route) => {
68 if (type && route.children) { 97 if (type && route.children) {
69 - route.children = filterChildren(route.children) 98 + route.children = filterChildren(route.children);
70 } 99 }
71 if (route.component) { 100 if (route.component) {
72 // Layout ParentView 组件特殊处理 101 // Layout ParentView 组件特殊处理
73 - if (route.component === 'Layout') { 102 + if (route.component === "Layout") {
74 - route.component = Layout 103 + route.component = Layout;
75 - } else if (route.component === 'ParentView') { 104 + } else if (route.component === "ParentView") {
76 - route.component = ParentView 105 + route.component = ParentView;
77 } else { 106 } else {
78 - route.component = loadView(route.component) 107 + route.component = loadView(route.component);
79 } 108 }
80 } 109 }
81 if (route.children != null && route.children && route.children.length) { 110 if (route.children != null && route.children && route.children.length) {
82 - route.children = filterAsyncRouter(route.children, route, type) 111 + route.children = filterAsyncRouter(route.children, route, type);
83 } else { 112 } else {
84 - delete route['children'] 113 + delete route["children"];
85 - delete route['redirect'] 114 + delete route["redirect"];
86 } 115 }
87 - return true 116 + return true;
88 - }) 117 + });
89 } 118 }
90 119
91 function filterChildren(childrenMap, lastRouter = false) { 120 function filterChildren(childrenMap, lastRouter = false) {
92 - var children = [] 121 + var children = [];
93 childrenMap.forEach((el, index) => { 122 childrenMap.forEach((el, index) => {
94 if (el.children && el.children.length) { 123 if (el.children && el.children.length) {
95 - if (el.component === 'ParentView') { 124 + if (el.component === "ParentView") {
96 - el.children.forEach(c => { 125 + el.children.forEach((c) => {
97 - c.path = el.path + '/' + c.path 126 + c.path = el.path + "/" + c.path;
98 if (c.children && c.children.length) { 127 if (c.children && c.children.length) {
99 - children = children.concat(filterChildren(c.children, c)) 128 + children = children.concat(filterChildren(c.children, c));
100 - return 129 + return;
101 } 130 }
102 - children.push(c) 131 + children.push(c);
103 - }) 132 + });
104 - return 133 + return;
105 } 134 }
106 } 135 }
107 if (lastRouter) { 136 if (lastRouter) {
108 - el.path = lastRouter.path + '/' + el.path 137 + el.path = lastRouter.path + "/" + el.path;
109 } 138 }
110 - children = children.concat(el) 139 + children = children.concat(el);
111 - }) 140 + });
112 - return children 141 + return children;
113 } 142 }
114 143
115 -export const loadView = (view) => { // 路由懒加载 144 +export const loadView = (view) => {
116 - return (resolve) => require([`@/views/${view}`], resolve) 145 + // 路由懒加载
117 -} 146 + return (resolve) => require([`@/views/${view}`], resolve);
147 +};
118 148
119 -export default permission 149 +export default permission;
......
...@@ -9,6 +9,7 @@ const user = { ...@@ -9,6 +9,7 @@ const user = {
9 state: { 9 state: {
10 token: getToken(), 10 token: getToken(),
11 name: '', 11 name: '',
12 + id: '',
12 avatar: '', 13 avatar: '',
13 activePortName: '', 14 activePortName: '',
14 portNames: [], 15 portNames: [],
...@@ -24,6 +25,9 @@ const user = { ...@@ -24,6 +25,9 @@ const user = {
24 SET_NAME: (state, name) => { 25 SET_NAME: (state, name) => {
25 state.name = name 26 state.name = name
26 }, 27 },
28 + SET_ID: (state, id) => {
29 + state.id = id
30 + },
27 SET_AVATAR: (state, avatar) => { 31 SET_AVATAR: (state, avatar) => {
28 state.avatar = avatar 32 state.avatar = avatar
29 }, 33 },
...@@ -89,9 +93,11 @@ const user = { ...@@ -89,9 +93,11 @@ const user = {
89 GetInfo({ commit, state }) { 93 GetInfo({ commit, state }) {
90 return new Promise((resolve, reject) => { 94 return new Promise((resolve, reject) => {
91 getInfo().then(res => { 95 getInfo().then(res => {
96 + if (res.code === 200) {
92 const user = res.data.user 97 const user = res.data.user
93 const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; 98 const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
94 let ports = []; 99 let ports = [];
100 + commit('SET_ID', user.userId)
95 if (user.portName) { 101 if (user.portName) {
96 ports = user.portName.split(','); 102 ports = user.portName.split(',');
97 commit('SET_PORTNAMES', ports) 103 commit('SET_PORTNAMES', ports)
...@@ -101,9 +107,7 @@ const user = { ...@@ -101,9 +107,7 @@ const user = {
101 message: "未找到口岸信息!请确认后再登录", 107 message: "未找到口岸信息!请确认后再登录",
102 type: 'error' 108 type: 'error'
103 }) 109 })
104 - this.LogOut().then(() => { 110 + this.login()
105 - window.location.href = settings.loginURL;//wsso系统跳转
106 - })
107 } 111 }
108 if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组 112 if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
109 commit('SET_ROLES', res.data.roles) 113 commit('SET_ROLES', res.data.roles)
...@@ -114,6 +118,7 @@ const user = { ...@@ -114,6 +118,7 @@ const user = {
114 commit('SET_NAME', user.userName) 118 commit('SET_NAME', user.userName)
115 commit('SET_AVATAR', avatar) 119 commit('SET_AVATAR', avatar)
116 resolve(res) 120 resolve(res)
121 + }
117 }).catch(error => { 122 }).catch(error => {
118 reject(error) 123 reject(error)
119 }) 124 })
......
1 +// 是否
2 +export function isSure(type) {
3 + if (type === 0 || type === "0" || type === false) {
4 + return "否";
5 + } else if (type === 1 || type === "1" || type === true) {
6 + return "是";
7 + }
8 +}
9 +
10 +// 布尔值转换
11 +export function returnBoolean(type) {
12 + if (type === 0 || type === "0") {
13 + return false;
14 + } else if (type === 1 || type === "1") {
15 + return true;
16 + }
17 +}
18 +
19 +export default {
20 + isSure,
21 + returnBoolean,
22 +};
23 +
...@@ -9,9 +9,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' ...@@ -9,9 +9,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
9 // 创建axios实例 9 // 创建axios实例
10 const service = axios.create({ 10 const service = axios.create({
11 // axios中请求配置有baseURL选项,表示请求URL公共部分 11 // axios中请求配置有baseURL选项,表示请求URL公共部分
12 - baseURL: settings.baseURL, 12 + baseURL: settings.baseURL, //接口地址
13 // 超时 13 // 超时
14 - timeout: 90000, 14 + timeout: 30000
15 }) 15 })
16 16
17 // request拦截器 17 // request拦截器
...@@ -52,14 +52,14 @@ service.interceptors.request.use(config => { ...@@ -52,14 +52,14 @@ service.interceptors.request.use(config => {
52 // 响应拦截器 52 // 响应拦截器
53 service.interceptors.response.use(res => { 53 service.interceptors.response.use(res => {
54 if (res.headers['token']) { 54 if (res.headers['token']) {
55 - setToken(res.headers['token']) 55 + setToken(decodeURI(res.headers['token']))
56 } 56 }
57 // 未设置状态码则默认成功状态 57 // 未设置状态码则默认成功状态
58 const code = res.data.code || 200; 58 const code = res.data.code || 200;
59 // 获取错误信息 59 // 获取错误信息
60 const msg = errorCode[code] || res.data.msg || errorCode['default'] 60 const msg = errorCode[code] || res.data.msg || errorCode['default']
61 if (code === 301) { 61 if (code === 301) {
62 - MessageBox.confirm('登录状态已过期,需重新登录!msg:' + msg, '系统提示', { 62 + MessageBox.confirm('登录状态已过期,需重新登录', '系统提示', {
63 closeOnClickModal: false, 63 closeOnClickModal: false,
64 showCancelButton: false, 64 showCancelButton: false,
65 confirmButtonText: '重新登录', 65 confirmButtonText: '重新登录',
...@@ -67,10 +67,9 @@ service.interceptors.response.use(res => { ...@@ -67,10 +67,9 @@ service.interceptors.response.use(res => {
67 } 67 }
68 ).then(() => { 68 ).then(() => {
69 store.dispatch('LogOut').then(() => { 69 store.dispatch('LogOut').then(() => {
70 - // location.href = '/'; 70 + location.href = settings.routerBase + '/index';
71 - window.location.href = settings.loginURL;//wsso系统跳转 71 + })
72 }) 72 })
73 - });
74 } else if (code === 403) { 73 } else if (code === 403) {
75 //无权限页面 74 //无权限页面
76 location.href = '/401'; 75 location.href = '/401';
...@@ -81,7 +80,7 @@ service.interceptors.response.use(res => { ...@@ -81,7 +80,7 @@ service.interceptors.response.use(res => {
81 type: 'error' 80 type: 'error'
82 }) 81 })
83 return Promise.reject(new Error(msg)) 82 return Promise.reject(new Error(msg))
84 - } else if (code !== 200 && code !== 201 && code !== 202 && code !== 603) { 83 + } else if (code !== 200 && code !== 201 && code !== 202 && code != 203 && code != 603) {
85 Message({ 84 Message({
86 message: msg, 85 message: msg,
87 type: 'error' 86 type: 'error'
......
...@@ -15,7 +15,7 @@ export function downLoadZip(str, data, filename) { ...@@ -15,7 +15,7 @@ export function downLoadZip(str, data, filename) {
15 url: url, 15 url: url,
16 data: data, 16 data: data,
17 responseType: 'blob', 17 responseType: 'blob',
18 - headers: { 'Authorization': decodeURIComponent(getToken()) } 18 + headers: { 'Authorization': 'Bearer ' + getToken() }
19 }).then(res => { 19 }).then(res => {
20 resolveBlob(res, mimeMap.zip, filename) 20 resolveBlob(res, mimeMap.zip, filename)
21 }) 21 })
...@@ -49,9 +49,9 @@ export function downLoadXlsx(str, data, fileName) { ...@@ -49,9 +49,9 @@ export function downLoadXlsx(str, data, fileName) {
49 method: 'post', 49 method: 'post',
50 url: url, 50 url: url,
51 data: data, 51 data: data,
52 - timeout: 500000,
53 responseType: 'blob', 52 responseType: 'blob',
54 - headers: { 'Authorization': decodeURIComponent(getToken()) } 53 + headers: { 'Authorization': getToken() }
54 + // headers: { 'Authorization': decodeURIComponent(getToken()) }
55 //uat环境token需要做url解码处理 55 //uat环境token需要做url解码处理
56 }).then(res => { 56 }).then(res => {
57 if (res.status === 200) { 57 if (res.status === 200) {
...@@ -84,7 +84,7 @@ export function cargoXlsxPre(str, data) { ...@@ -84,7 +84,7 @@ export function cargoXlsxPre(str, data) {
84 url: url, 84 url: url,
85 data: data, 85 data: data,
86 responseType: 'blob', 86 responseType: 'blob',
87 - headers: { 'Authorization': decodeURIComponent(getToken()) } 87 + headers: { 'Authorization': getToken() }
88 }).then(res => { 88 }).then(res => {
89 if (res.status === 200) { 89 if (res.status === 200) {
90 cargoTableXlsxPre(res) 90 cargoTableXlsxPre(res)
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
112 </el-form-item> 112 </el-form-item>
113 </el-col> 113 </el-col>
114 <el-col :span="6"> 114 <el-col :span="6">
115 - <el-form-item label="站点"> 115 + <el-form-item label="始发站">
116 <el-input class="formItem" type="textarea" placeholder="PVG;PEK" v-model="siteName" :rows="1" clearable> 116 <el-input class="formItem" type="textarea" placeholder="PVG;PEK" v-model="siteName" :rows="1" clearable>
117 </el-input> 117 </el-input>
118 </el-form-item> 118 </el-form-item>
...@@ -261,7 +261,7 @@ export default { ...@@ -261,7 +261,7 @@ export default {
261 size: 100, 261 size: 100,
262 allWeight: 0, 262 allWeight: 0,
263 allQty: 0, 263 allQty: 0,
264 - tableHeight: null, 264 + tableHeight: 300,
265 dialogVisible: false, 265 dialogVisible: false,
266 shiftKey: false, 266 shiftKey: false,
267 createDate: null, 267 createDate: null,
...@@ -303,7 +303,7 @@ export default { ...@@ -303,7 +303,7 @@ export default {
303 this.shiftKey = false; 303 this.shiftKey = false;
304 } 304 }
305 }); 305 });
306 - this.tableHeight = window.innerHeight - this.$refs.form.$el.offsetHeight - 60 306 + // this.tableHeight = window.innerHeight - this.$refs.form.$el.offsetHeight - 60;
307 }, 307 },
308 methods: { 308 methods: {
309 //查询条件 309 //查询条件
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
73 { name: "口岸代码", value: "portName", width: "" }, 73 { name: "口岸代码", value: "portName", width: "" },
74 { name: "运单号", value: "waybillNo", width: "" }, 74 { name: "运单号", value: "waybillNo", width: "" },
75 { name: "货物状态", value: "statusName", width: "" }, 75 { name: "货物状态", value: "statusName", width: "" },
76 - { name: "站点", value: "siteName", width: "" }, 76 + { name: "始发站", value: "siteName", width: "" },
77 { name: "申报类型", value: "typeName", width: "" }, 77 { name: "申报类型", value: "typeName", width: "" },
78 { name: "URSA", value: "ursa", width: "" }, 78 { name: "URSA", value: "ursa", width: "" },
79 { name: "实际重量", value: "actualWeight", width: "" }, 79 { name: "实际重量", value: "actualWeight", width: "" },
......
1 +<template>
2 + <div class=''></div>
3 + </template>
4 +
5 + <script>
6 +
7 + export default {
8 + name: '',
9 + components: {},
10 + data() {
11 +
12 + return {
13 +
14 + }
15 + },
16 +
17 + computed: {},
18 + created () {},
19 + mounted () {},
20 + methods: {}
21 + }
22 + </script>
23 + <style lang='scss' scoped>
24 +
25 + </style>
1 +<template>
2 + <div class=''></div>
3 + </template>
4 +
5 + <script>
6 +
7 + export default {
8 + name: '',
9 + components: {},
10 + data() {
11 +
12 + return {
13 +
14 + }
15 + },
16 +
17 + computed: {},
18 + created () {},
19 + mounted () {},
20 + methods: {}
21 + }
22 + </script>
23 + <style lang='scss' scoped>
24 +
25 + </style>
1 +export const formConfig = [
2 + {
3 + label: "重量(KG)",
4 + type: "Input",
5 + name: "minWeight",
6 + prop: "minWeight",
7 + placeholder: "0",
8 + rules: {
9 + required: true,
10 + message: "最大重量不得小于0KG",
11 + trigger: ["change", "blur"],
12 + },
13 + trigger: "blur", // 事件名
14 + },
15 + {
16 + label: "",
17 + type: "Input",
18 + name: "maxWeight",
19 + prop: "maxWeight",
20 + placeholder: "34",
21 + rules: {
22 + required: true,
23 + message: "最大重量不得大于34KG",
24 + trigger: ["change", "blur"],
25 + },
26 + trigger: "blur", // 事件名
27 + },
28 + {
29 + label: "件数",
30 + type: "Input",
31 + name: "minNumOfPieces",
32 + prop: "minNumOfPieces",
33 + placeholder: "0",
34 + rules: {
35 + required: true,
36 + message: "最大重量不得小于0KG",
37 + trigger: ["change", "blur"],
38 + },
39 + trigger: "blur", // 事件名
40 + },
41 + {
42 + label: "",
43 + type: "Input",
44 + name: "maxNumOfPieces",
45 + prop: "maxNumOfPieces",
46 + placeholder: "34",
47 + rules: {
48 + required: true,
49 + message: "最大重量不得大于34KG",
50 + trigger: ["change", "blur"],
51 + },
52 + trigger: "blur", // 事件名
53 + },
54 +];
1 +<template>
2 + <div class="form-header demo-edit">
3 + <el-row style="padding: 20px 0">
4 + <el-col>
5 + <el-divider content-position="left">ET86配舱航班顺位</el-divider>
6 + </el-col>
7 + </el-row>
8 + <el-row :gutter="24" justify="center">
9 + <el-col :span="18">
10 + <yl-table
11 + :emptyText="tableEmptyText"
12 + :attrs="tableAttr"
13 + :loadingTable="tableAttr.loadingTable"
14 + :tableData="tableData"
15 + :pageConfig="pageConfig"
16 + @add="addBtn"
17 + >
18 + <template #column>
19 + <el-table-column
20 + type="index"
21 + label="序号"
22 + width="50"
23 + align="center"
24 + ></el-table-column>
25 + <el-table-column
26 + label="航班号"
27 + prop="fltNo"
28 + min-width="100"
29 + align="center"
30 + >
31 + <template slot-scope="scope">
32 + <el-input
33 + v-model="scope.row.fltNo"
34 + clearable
35 + :readonly="scope.row.edit | isEdit"
36 + @focus="inputFocus(scope)"
37 + @input="inputEvent"
38 + placeholder="请输入航班号"
39 + />
40 + </template>
41 + </el-table-column>
42 + <el-table-column
43 + label="加减天数"
44 + prop="fltNoDate"
45 + width="100"
46 + align="center"
47 + >
48 + <template slot-scope="scope">
49 + <el-input
50 + type="number"
51 + v-model="scope.row.fltNoDate"
52 + :readonly="scope.row.edit | isEdit"
53 + :disabled="scope.row.edit | isEdit"
54 + min="-7"
55 + max="7"
56 + v-input-filter
57 + clearable
58 + placeholder=""
59 + />
60 + </template>
61 + </el-table-column>
62 + <el-table-column
63 + label="航线"
64 + prop="fltRoute"
65 + min-width="100"
66 + align="center"
67 + >
68 + <template slot-scope="scope">
69 + <el-select v-model="scope.row.fltRoute" placeholder="请选择">
70 + <el-option
71 + v-for="item in scope.row.routeList"
72 + :key="item.id"
73 + :label="item.route"
74 + :value="item.route"
75 + >
76 + </el-option>
77 + </el-select>
78 + </template>
79 + </el-table-column>
80 + <el-table-column
81 + label="爆仓是否继续配舱"
82 + prop="isOn"
83 + min-width="100"
84 + align="center"
85 + >
86 + <template slot-scope="scope">
87 + <el-checkbox
88 + v-model="scope.row.isOn"
89 + :disabled="scope.row.edit | isEdit"
90 + @change="changeCheck(scope)"
91 + ></el-checkbox>
92 + </template>
93 + </el-table-column>
94 + <el-table-column label="操作" min-width="100" align="center">
95 + <template slot-scope="scope">
96 + <el-button
97 + size="mini"
98 + type="danger"
99 + :disabled="scope.row.edit"
100 + @click="deleBtn(scope.row, scope.$index)"
101 + >删除</el-button
102 + >
103 + </template>
104 + </el-table-column>
105 + </template>
106 + </yl-table>
107 + </el-col>
108 + </el-row>
109 + <el-row style="padding: 20px 0">
110 + <el-col>
111 + <el-divider content-position="left">航线维度设置</el-divider>
112 + </el-col>
113 + </el-row>
114 + <el-card shadow="always" class="box-card">
115 + <el-form
116 + :model="queryForm"
117 + label-position="right"
118 + label-width="120px"
119 + ref="ruleForm"
120 + class="config-form"
121 + >
122 + <el-row class="rowPadding">
123 + <el-col :span="12">
124 + <el-form-item label="原航班号">
125 + <el-input
126 + type="textarea"
127 + v-model="queryForm.fltNo"
128 + size="medium"
129 + maxlength="1000"
130 + show-word-limit
131 + :rows="4"
132 + placeholder="请输入原航班号"
133 + ></el-input>
134 + </el-form-item>
135 + </el-col>
136 + <el-col :span="24">
137 + <el-form-item label="服务种类">
138 + <!-- <div class="label-title label-service-type">服务类型</div> -->
139 + <el-col :span="4">
140 + <el-radio-group
141 + v-model="queryForm.isServiceCode"
142 + @change="isServiceCode"
143 + >
144 + <el-radio label="1">包含ServiceCode</el-radio>
145 + <el-radio label="2">不包含ServiceCode</el-radio>
146 + </el-radio-group>
147 + </el-col>
148 + <el-col :span="10" :offset="1">
149 + <el-input
150 + type="textarea"
151 + v-model="queryForm.serviceCode"
152 + size="medium"
153 + maxlength="1000"
154 + show-word-limit
155 + :rows="4"
156 + placeholder="请输入ServiceCode"
157 + @blur="serviceCodeBlur"
158 + ></el-input>
159 + </el-col>
160 + </el-form-item>
161 + </el-col>
162 +
163 + <el-col :span="24">
164 + <el-col :span="12">
165 + <el-form-item label="URSA包含">
166 + <el-input
167 + type="textarea"
168 + v-model="queryForm.includeUrsa"
169 + size="medium"
170 + maxlength="1000"
171 + show-word-limit
172 + :rows="4"
173 + placeholder="URSA之间用分号分隔,例:F2;F3;P_"
174 + ></el-input>
175 + </el-form-item>
176 + </el-col>
177 + <el-col :span="12">
178 + <el-form-item label="URSA不包含">
179 + <el-input
180 + type="textarea"
181 + v-model="queryForm.notIncludeUrsa"
182 + size="medium"
183 + maxlength="1000"
184 + show-word-limit
185 + :rows="4"
186 + placeholder="URSA之间用分号分隔,例:F2;F3;P_"
187 + ></el-input>
188 + </el-form-item>
189 + </el-col>
190 + </el-col>
191 +
192 + <el-col :span="24">
193 + <el-form-item label="申报类别">
194 + <el-card shadow="never">
195 + <el-checkbox-group
196 + v-model="queryForm.checkboxClsssType"
197 + @change="checkboxSingleName"
198 + style="display: flex"
199 + v-if="queryForm.cargoType.length"
200 + >
201 + <el-checkbox
202 + v-for="item in queryForm.cargoType"
203 + :label="item.chineseName"
204 + :name="item.chineseName"
205 + :key="item.code"
206 + >
207 + <Tooltips :content="item.chineseName" :refName="item.code">
208 + </Tooltips>
209 + </el-checkbox>
210 + </el-checkbox-group>
211 + </el-card>
212 + </el-form-item>
213 + </el-col>
214 +
215 + <el-col :span="24">
216 + <el-col :span="3">
217 + <el-form-item label="单品名">
218 + <el-checkbox v-model="queryForm.singleName"></el-checkbox>
219 + </el-form-item>
220 + </el-col>
221 + <el-col :span="8">
222 + <el-form-item label="" class="custom-label">
223 + <span class="custom-label-title">重量(KG)</span>
224 + <el-col :span="10">
225 + <el-input
226 + v-model.trim="queryForm.minWeight"
227 + clearable
228 + placeholder="最小重量"
229 + @blur="inputBlur('minWeight')"
230 + ></el-input>
231 + <span ref="minWeight" class="el-form-item__error"></span>
232 + </el-col>
233 + <el-col style="text-align: center" :span="1">-</el-col>
234 + <el-col :span="10">
235 + <el-input
236 + v-model.trim="queryForm.maxWeight"
237 + clearable
238 + placeholder="最大重量"
239 + @blur="inputBlur('maxWeight')"
240 + ></el-input>
241 + <span ref="maxWeight" class="el-form-item__error"></span>
242 + </el-col>
243 + </el-form-item>
244 + </el-col>
245 +
246 + <el-col :span="8">
247 + <el-form-item label="件数" class="custom-label-pieces">
248 + <el-col :span="10">
249 + <el-input
250 + v-model.trim="queryForm.minNumOfPieces"
251 + clearable
252 + placeholder="最少件数"
253 + @blur="inputBlur('minNumOfPieces')"
254 + ></el-input>
255 + <span ref="minNumOfPieces" class="el-form-item__error"></span>
256 + </el-col>
257 + <el-col style="text-align: center" :span="1">-</el-col>
258 + <el-col :span="10">
259 + <el-input
260 + v-model.trim="queryForm.maxNumOfPieces"
261 + clearable
262 + placeholder="最多件数"
263 + @blur="inputBlur('maxNumOfPieces')"
264 + ></el-input>
265 + <span ref="maxNumOfPieces" class="el-form-item__error"></span>
266 + </el-col>
267 + </el-form-item>
268 + </el-col>
269 + </el-col>
270 +
271 + <el-col :span="24">
272 + <el-col :span="3">
273 + <el-form-item label="申报价值"></el-form-item>
274 + </el-col>
275 + <el-col :span="8">
276 + <el-form-item label="" class="custom-label">
277 + <span class="custom-label-title">人民币</span>
278 + <el-col :span="10">
279 + <el-input
280 + v-model.trim="queryForm.minCNYCustomVal"
281 + clearable
282 + placeholder="最小申报价值"
283 + @blur="inputBlur('minCNYCustomVal')"
284 + ></el-input>
285 + <span
286 + ref="minCNYCustomVal"
287 + class="el-form-item__error"
288 + ></span>
289 + </el-col>
290 + <el-col style="text-align: center" :span="1">-</el-col>
291 + <el-col :span="10">
292 + <el-input
293 + v-model.trim="queryForm.maxCNYCustomVal"
294 + clearable
295 + placeholder="最大申报价值"
296 + @blur="inputBlur('maxCNYCustomVal')"
297 + ></el-input>
298 + <span
299 + ref="maxCNYCustomVal"
300 + class="el-form-item__error"
301 + ></span>
302 + </el-col>
303 + </el-form-item>
304 + </el-col>
305 + <el-col :span="8">
306 + <el-form-item label="美元" class="custom-label-pieces">
307 + <el-col :span="10">
308 + <el-input
309 + v-model.trim="queryForm.minSUDCustomVal"
310 + clearable
311 + placeholder="最小申报价值"
312 + @blur="inputBlur('minSUDCustomVal')"
313 + ></el-input>
314 + <span
315 + ref="minSUDCustomVal"
316 + class="el-form-item__error"
317 + ></span>
318 + </el-col>
319 + <el-col style="text-align: center" :span="1">-</el-col>
320 + <el-col :span="10">
321 + <el-input
322 + v-model.trim="queryForm.maxSUDCustomVal"
323 + clearable
324 + placeholder="最大申报价值"
325 + @blur="inputBlur('maxSUDCustomVal')"
326 + ></el-input>
327 + <span
328 + ref="maxSUDCustomVal"
329 + class="el-form-item__error"
330 + ></span>
331 + </el-col>
332 + </el-form-item>
333 + </el-col>
334 + </el-col>
335 + <el-col :span="24">
336 + <el-form-item label="">
337 + <el-button type="primary" @click="submitForm('ruleForm')"
338 + >保存</el-button
339 + >
340 + </el-form-item>
341 + </el-col>
342 + </el-row>
343 + </el-form>
344 + </el-card>
345 + </div>
346 +</template>
347 +
348 +<script>
349 +import YlForm from "@/components/YlForm";
350 +import YlTable from "@/components/YlTable";
351 +import { formConfig } from "./formConfig";
352 +import { debounce } from "@/utils";
353 +import { tableAttr } from "./tableConfig";
354 +import {
355 + allDictData, // 获取全部字典
356 + queryRouteByFltNo, // 航线查询
357 + findDestinationFltRuleByFlightNo, // 获取航班下航线维度
358 +} from "@/api/destinationFlight";
359 +import indexMixins from "./mixins";
360 +export default {
361 + name: "edit",
362 + components: {
363 + YlForm,
364 + YlTable,
365 + },
366 + mixins: [indexMixins],
367 + data() {
368 + return {
369 + test: "测试",
370 + formConfig: formConfig, // 表单配置项
371 + queryForm: {
372 + // 表单参数
373 + fltNo: "", // 原航班号
374 + isServiceCode: "1", // 服务种类
375 + serviceCode: "",
376 + singleName: false, // 单品名
377 + minWeight: null,
378 + maxWeight: null,
379 + minNumOfPieces: null,
380 + maxNumOfPieces: null,
381 + includeUrsa: "", // URSA包含
382 + notIncludeUrsa: "", // URSA不包含
383 + checkboxClsssType: [], // 申报类别
384 + minCNYCustomVal: "", //
385 + maxCNYCustomVal: "", //
386 + minSUDCustomVal: "", //
387 + maxSUDCustomVal: "", //
388 + serviceCodeData: [], // 【服务种类】调用接口获取服务种类所有的serviceCode
389 + cargoType: [], // 申报类别
390 + },
391 + pageConfig: {
392 + // 分页配置项
393 + isPagination: false,
394 + },
395 + tableAttr: tableAttr, // table配置项
396 + tableEmptyText: "请添加配舱航班",
397 + tableData: [],
398 + currentIndex: 0, // 记录当前table 列的索引位置
399 + id: 0,
400 + };
401 + },
402 + computed: {},
403 + created() {
404 + this.tableData = [
405 + {
406 + id: this.id++,
407 + fltNo: "",
408 + fltNoDate: "",
409 + fltRoute: "",
410 + routeList: [],
411 + isOn: "0" ? false : true,
412 + sort: "0", // 排序字段
413 + },
414 + ];
415 + this.getAllDictData();
416 + this.getEdit();
417 + this.PostFindDestinationFltRuleByFlightNo();
418 + },
419 + mounted() {},
420 + directives: {
421 + "input-filter": {
422 + bind: function (el, binding) {
423 + el.handler = function (event) {
424 + let regExp = /[^0-9a-zA-Z_]/g;
425 + let newValue = event.target.value.replace(regExp, "");
426 + if (newValue !== event.target.value) {
427 + event.target.value = newValue;
428 + event.target.dispatchEvent(new Event("input"));
429 + }
430 + };
431 + el.addEventListener("input", el.handler);
432 + },
433 + unbind: function (el) {
434 + el.removeEventListener("input", el.handler);
435 + },
436 + /*
437 + -7 +7
438 + 0~7
439 + 或者 空
440 + 不能输入小数点
441 + Math.abs(-7);
442 + 不能输入和选择未来日期,
443 + 不能输入和选择历史日期,
444 + 选择时间范围,
445 + 只能输入四位正整数,不能够有小数点,
446 + 只能输入四位正整数保留3位小数,
447 + */
448 + },
449 + },
450 + filters: {
451 + isEdit: function (value) {
452 + switch (value) {
453 + case "新增":
454 + false;
455 + break;
456 + case "编辑":
457 + true;
458 + break;
459 + default:
460 + "新增";
461 + }
462 + },
463 + // 航线个数
464 + fltRoute(val) {
465 + if (val.length && val.split(",").length > 2) {
466 + return false;
467 + } else {
468 + return true;
469 + }
470 + },
471 + },
472 + methods: {
473 + // 获取编辑详情数据
474 + getEdit() {},
475 + // 获取所有数据字典
476 + getAllDictData() {
477 + allDictData().then((res) => {
478 + if (res.code != 200) {
479 + this.msgError(res.msg);
480 + return;
481 + }
482 + this.queryForm.cargoType = res.data.cargoType; // 申报类别
483 + if (res.data.serviceCode.length) {
484 + this.getObj(res.data);
485 + }
486 + });
487 + },
488 + // 航线查询
489 + getQueryRouteByFltNo(item) {
490 + this.tableAttr.loadingTable = true;
491 + queryRouteByFltNo(item).then((res) => {
492 + this.tableAttr.loadingTable = false;
493 + if (res.code == 200) {
494 + const list = res.data.list;
495 + let routeList = [];
496 + if (list.length) {
497 + list.map((item) => {
498 + routeList.push(item);
499 + });
500 + let isEtesRoute = list.filter((item) => item.isEtesRoute == "Y"); // 过滤普通航线
501 + if (isEtesRoute.length == 0) {
502 + this.msgError("该航班下的航线均为普通航线");
503 + }
504 + this.tableData[this.currentIndex].fltRoute = "";
505 + this.tableData[this.currentIndex].routeList = isEtesRoute;
506 + } else {
507 + this.msgError("暂无航线");
508 + this.tableData[this.currentIndex].routeList = [];
509 + this.tableData[this.currentIndex].fltRoute = "";
510 + }
511 + }
512 + });
513 + },
514 + // 获取航班下航线维度
515 + PostFindDestinationFltRuleByFlightNo() {
516 + let params = {};
517 + findDestinationFltRuleByFlightNo(params).then((res) => {
518 + console.log(res);
519 + });
520 + },
521 + // input 聚焦事件
522 + inputFocus(scope) {
523 + this.currentIndex = scope.$index;
524 + },
525 + // input事件
526 + inputEvent: debounce(function () {
527 + let params = {
528 + fltNo: this.tableData[this.currentIndex].fltNo,
529 + };
530 + if (params.fltNo) {
531 + this.getQueryRouteByFltNo(params);
532 + } else {
533 + this.tableData[this.currentIndex].fltRoute = "";
534 + this.tableData[this.currentIndex].routeList = [];
535 + this.msgError("请输入航班号");
536 + }
537 + }, 1000),
538 + // 添加
539 + addBtn(item) {
540 + this.tableData.unshift({
541 + id: this.id++,
542 + fltNo: "",
543 + fltNoDate: "",
544 + fltRoute: "",
545 + routeList: [],
546 + isOn: "0" ? false : true,
547 + sort: "0", // 排序字段
548 + });
549 + console.log("add:", this.tableData);
550 + },
551 + // 是否爆仓
552 + changeCheck({ $index, row }) {
553 + this.tableData.map((item, i) => {
554 + if ($index !== i) {
555 + item.isOn = false;
556 + }
557 + });
558 + },
559 + // 删除
560 + deleBtn(item, $index) {
561 + this.tableData.splice($index, 1);
562 + },
563 + // 类别
564 + checkboxSingleName(val) {
565 + console.log(val);
566 + },
567 + // input失焦事件
568 + inputBlur(name) {
569 + if (name == "minWeight") {
570 + this.validateMaxWeight("maxWeight");
571 + this.validateMinWeight(name);
572 + }
573 + if (name == "maxWeight") {
574 + this.validateMinWeight("minWeight");
575 + this.validateMaxWeight(name);
576 + }
577 + if (name == "minNumOfPieces") {
578 + this.validateMaxPieces("maxNumOfPieces");
579 + this.validateMinPieces(name);
580 + }
581 + if (name == "maxNumOfPieces") {
582 + this.validateMinPieces("minNumOfPieces");
583 + this.validateMaxPieces(name);
584 + }
585 + if (name == "minCNYCustomVal" || name == "minSUDCustomVal") {
586 + let coin = {
587 + minCNYCustomVal: "CNY",
588 + minSUDCustomVal: "USD",
589 + };
590 + this.validateMaxCustomVal(coin[name]);
591 + this.validateMinCustomVal(coin[name]);
592 + }
593 + if (name == "maxCNYCustomVal" || name == "maxSUDCustomVal") {
594 + let coin = {
595 + maxCNYCustomVal: "CNY",
596 + maxSUDCustomVal: "USD",
597 + };
598 + this.validateMinCustomVal(coin[name]);
599 + this.validateMaxCustomVal(coin[name]);
600 + }
601 + },
602 + // 表单提交
603 + submitForm(formName) {
604 + this.$refs[formName].validate((valid) => {
605 + if (valid) {
606 + } else {
607 + console.log("error submit!!");
608 + return false;
609 + }
610 + });
611 + this.$emit("handleSearch");
612 + },
613 + },
614 +};
615 +</script>
616 +<style lang='scss' scoped>
617 +.rowPadding {
618 + padding: 10px 0;
619 + font-size: 12px;
620 +}
621 +.label-title{
622 + font-size: 14px;
623 + color: #606266;
624 + font-weight: 700;
625 +}
626 +::v-deep .custom-label {
627 + .el-form-item__content{
628 + display: flex;
629 + margin-left: 0 !important;
630 + span{
631 + font-size: 14px;
632 + color: #606266;
633 + font-weight: 700;
634 + float: right;
635 + margin-right: 10px;
636 + text-align: end;
637 + }
638 + .custom-label-title{
639 +width: 120px;
640 + }
641 + .el-input__suffix{
642 + right: -15px !important;
643 + }
644 + .el-form-item__error{
645 + color: #ff4949;
646 + font-size: 12px;
647 + line-height: 1;
648 + padding-top: 4px;
649 + position: absolute;
650 + top: 100%;
651 + left: 0;
652 + font-weight: 500;
653 + width: 100% !important;
654 + }
655 + }
656 +}
657 +::v-deep .custom-label-pieces {
658 + .el-form-item__content{
659 + width: 80%;
660 + }
661 +}
662 +</style>
1 +export default {
2 + methods: {
3 + // 获取字典
4 + getObj({ serviceCode }) {
5 + let service_Code = [];
6 + serviceCode.map((item) => {
7 + service_Code.push(item.chineseName);
8 + });
9 + this.serviceCodeData = service_Code;
10 + },
11 + // 处理serviceCode包不包含
12 + serviceCodeCofig() {
13 + let str = this.queryForm.serviceCode.replace(/;|;/g, ",");
14 + let arr = str.split(",");
15 + if (arr[arr.length - 1] == "") {
16 + arr.splice(arr.length - 1, 1);
17 + }
18 + let noHasCode = this.serviceCodeData.filter(
19 + (v) => !arr.some((val) => val == v)
20 + );
21 + let hasCode = this.serviceCodeData.filter((v) =>
22 + arr.some((val) => val == v)
23 + );
24 + let includeCode = arr.filter((v) => !hasCode.some((val) => val == v));
25 + return {
26 + include: hasCode,
27 + noInclude: includeCode,
28 + };
29 + },
30 + // radio包含不包含serviceCode
31 + isServiceCode(val) {
32 + // 包含
33 + // 勾选的时候去校验 || 输入的时候去校验
34 + if (val == 1) {
35 + if (this.serviceCodeCofig().noInclude.length) {
36 + let tip = this.serviceCodeCofig().noInclude.toString();
37 + this.msgError(`${tip} 不包含`);
38 + }
39 + } else {
40 + if (this.serviceCodeCofig().include.length) {
41 + let tip = this.serviceCodeCofig().include.toString();
42 + this.msgError(`${tip} 已包含`);
43 + }
44 + }
45 + },
46 + // serviceCode失焦事件
47 + serviceCodeBlur() {
48 + if (this.queryForm.isServiceCode == "1") {
49 + if (this.serviceCodeCofig().noInclude.length) {
50 + let tip = this.serviceCodeCofig().noInclude.toString();
51 + this.msgError(`${tip} 不包含`);
52 + }
53 + } else {
54 + if (this.serviceCodeCofig().include.length) {
55 + let tip = this.serviceCodeCofig().include.toString();
56 + this.msgError(`${tip} 已包含`);
57 + }
58 + }
59 + },
60 +
61 + // 最小重量
62 + validateMinWeight(name) {
63 + if (/^(0|[1-9]\d*)(.\d{1,5})?$/.test(Number(this.queryForm[name]))) {
64 + // 最小重量大于0~34,并且最小重量不得大于最大重量
65 + if (this.queryForm[name] && this.queryForm.maxWeight) {
66 + if (Number(this.queryForm[name]) > Number(this.queryForm.maxWeight)) {
67 + this.$refs.minWeight.innerHTML = "";
68 + this.$refs.minWeight.innerHTML =
69 + "最小重量大于0~34,并且最小重量不得大于最大重量";
70 + return false;
71 + } else {
72 + this.$refs.minWeight.innerHTML = "";
73 + }
74 + if (Number(this.queryForm[name]) > 34) {
75 + this.$refs.minWeight.innerHTML = "";
76 + this.$refs.minWeight.innerHTML = "最大重量34KG";
77 + return false;
78 + }
79 + } else if (Number(this.queryForm[name]) < 0) {
80 + this.$refs.minWeight.innerHTML = "";
81 + this.$refs.minWeight.innerHTML =
82 + "最小重量大于0~34,并且最小重量不得大于最大重量";
83 + return false;
84 + } else if (Number(this.queryForm[name]) > 34) {
85 + this.$refs.minWeight.innerHTML = "";
86 + this.$refs.minWeight.innerHTML =
87 + "最小重量大于0~34,并且最小重量不得大于最大重量";
88 + return false;
89 + } else {
90 + this.$refs.minWeight.innerHTML = "";
91 + }
92 + } else {
93 + this.$refs.minWeight.innerHTML = "";
94 + this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位";
95 + return false;
96 + }
97 + },
98 + // 最大重量
99 + validateMaxWeight(name) {
100 + // 最大重量
101 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm[name]))) {
102 + // 最大重量大于0~34,并且最大重量不得小于最小重量
103 + if (this.queryForm[name] && this.queryForm.minWeight) {
104 + if (Number(this.queryForm[name]) < Number(this.queryForm.minWeight)) {
105 + this.$refs.minWeight.innerHTML = "";
106 + this.$refs.minWeight.innerHTML =
107 + "最大重量大于0~34,并且最大重量不得小于最小重量";
108 + return false;
109 + } else {
110 + this.$refs.minWeight.innerHTML = "";
111 + }
112 + if (Number(this.queryForm[name]) > 34) {
113 + this.$refs.minWeight.innerHTML = "";
114 + this.$refs.minWeight.innerHTML = "最大重量34KG";
115 + return false;
116 + }
117 + } else if (Number(this.queryForm[name]) < 0) {
118 + this.$refs.minWeight.innerHTML = "";
119 + this.$refs.minWeight.innerHTML =
120 + "最大重量大于0~34,并且最大重量不得小于最小重量";
121 + return false;
122 + } else if (Number(this.queryForm[name]) > 34) {
123 + this.$refs.minWeight.innerHTML = "";
124 + this.$refs.minWeight.innerHTML =
125 + "最大重量大于0~34,并且最大重量不得小于最小重量";
126 + return false;
127 + } else {
128 + this.$refs.minWeight.innerHTML = "";
129 + }
130 + } else {
131 + this.$refs.minWeight.innerHTML = "";
132 + this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位";
133 + return false;
134 + }
135 + },
136 + // 最少件数
137 + validateMinPieces(name) {
138 + if (/^\d+$/.test(Number(this.queryForm[name]))) {
139 + if (this.queryForm[name] && this.queryForm.maxNumOfPieces) {
140 + if (
141 + Number(this.queryForm[name]) > Number(this.queryForm.maxNumOfPieces)
142 + ) {
143 + // 最少件数1~100,并且最少件数不得大于最多件数
144 + this.$refs.minNumOfPieces.innerHTML = "";
145 + this.$refs.minNumOfPieces.innerHTML =
146 + "最少件数1~100,并且最少件数不得大于最多件数";
147 + return false;
148 + } else {
149 + this.$refs.minNumOfPieces.innerHTML = "";
150 + }
151 + if (Number(this.queryForm[name]) > 100) {
152 + this.$refs.minNumOfPieces.innerHTML = "";
153 + this.$refs.minNumOfPieces.innerHTML = "件数范围1~100";
154 + return false;
155 + }
156 + } else if (this.queryForm[name] !== "" && Number(this.queryForm[name]) < 1) {
157 + this.$refs.minNumOfPieces.innerHTML = "";
158 + this.$refs.minNumOfPieces.innerHTML =
159 + "最少件数1~100,并且最少件数不得大于最多件数";
160 + return false;
161 + } else if (Number(this.queryForm[name]) > 100) {
162 + this.$refs.minNumOfPieces.innerHTML = "";
163 + this.$refs.minNumOfPieces.innerHTML =
164 + "最少件数1~100,并且最少件数不得大于最多件数";
165 + return false;
166 + } else {
167 + this.$refs.minNumOfPieces.innerHTML = "";
168 + }
169 + } else {
170 + this.$refs.minNumOfPieces.innerHTML = "";
171 + this.$refs.minNumOfPieces.innerHTML = "请输入有效件数";
172 + return false;
173 + }
174 + },
175 + // 最多件数
176 + validateMaxPieces(name) {
177 + if (/^\d+$/.test(Number(this.queryForm[name]))) {
178 + if (this.queryForm[name] && this.queryForm.maxNumOfPieces) {
179 + if (
180 + Number(this.queryForm[name]) < Number(this.queryForm.minNumOfPieces)
181 + ) {
182 + // 最多件数1~100,并且最多件数不得小于最小件数
183 + this.$refs.minNumOfPieces.innerHTML = "";
184 + this.$refs.minNumOfPieces.innerHTML =
185 + "最多件数1~100,并且最多件数不得小于最小件数";
186 + return false;
187 + } else {
188 + this.$refs.minNumOfPieces.innerHTML = "";
189 + }
190 + if (Number(this.queryForm[name]) > 100) {
191 + this.$refs.minNumOfPieces.innerHTML = "";
192 + this.$refs.minNumOfPieces.innerHTML = "件数范围1~100";
193 + return false;
194 + }
195 + } else if (this.queryForm[name] !== "" && Number(this.queryForm[name]) < 1) {
196 + this.$refs.minNumOfPieces.innerHTML = "";
197 + this.$refs.minNumOfPieces.innerHTML =
198 + "最多件数1~100,并且最多件数不得小于最小件数";
199 + return false;
200 + } else if (Number(this.queryForm[name]) > 100) {
201 + this.$refs.minNumOfPieces.innerHTML = "";
202 + this.$refs.minNumOfPieces.innerHTML =
203 + "最多件数1~100,并且最多件数不得小于最小件数";
204 + return false;
205 + } else {
206 + this.$refs.minNumOfPieces.innerHTML = "";
207 + }
208 + } else {
209 + this.$refs.minNumOfPieces.innerHTML = "";
210 + this.$refs.maxNumOfPieces.innerHTML = "请输入有效件数";
211 + return false;
212 + }
213 + },
214 +
215 + // 最小申报价值
216 + validateMinCustomVal(name) {
217 + // 申报价值
218 + if (
219 + /^(0|[1-9]\d*)(.\d{1,2})?$/.test(
220 + Number(
221 + this.queryForm.minCNYCustomVal || this.queryForm.minSUDCustomVal
222 + )
223 + )
224 + ) {
225 + if (name == "USD" || name == "美元") {
226 + // 申报价值(美元)0~600
227 + if (
228 + this.queryForm.minSUDCustomVal &&
229 + this.queryForm.maxSUDCustomVal
230 + ) {
231 + if (
232 + Number(this.queryForm.minSUDCustomVal) >
233 + Number(this.queryForm.maxSUDCustomVal)
234 + ) {
235 + this.$refs.minSUDCustomVal.innerHTML =
236 + "最小申报价值不得大于最大申报价值";
237 + return false;
238 + } else {
239 + this.$refs.minSUDCustomVal.innerHTML = "";
240 + }
241 + if (Number(this.queryForm.minSUDCustomVal) > 600) {
242 + this.$refs.minSUDCustomVal.innerHTML = "";
243 + this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600";
244 + return false;
245 + }
246 + } else if (Number(this.queryForm.minSUDCustomVal) < 0) {
247 + this.$refs.minSUDCustomVal.innerHTML = "";
248 + this.$refs.minSUDCustomVal.innerHTML = "申报价值(美元)0~600";
249 + return false;
250 + } else if (Number(this.queryForm.minSUDCustomVal) > 600) {
251 + this.$refs.minSUDCustomVal.innerHTML = "";
252 + this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600";
253 + return false;
254 + } else {
255 + this.$refs.minSUDCustomVal.innerHTML = "";
256 + return true;
257 + }
258 + } else {
259 + // 申报价值(人民币)0~2000
260 + if (
261 + this.queryForm.minCNYCustomVal &&
262 + this.queryForm.maxCNYCustomVal
263 + ) {
264 + if (
265 + Number(this.queryForm.minCNYCustomVal) >
266 + Number(this.queryForm.maxCNYCustomVal)
267 + ) {
268 + this.$refs.minCNYCustomVal.innerHTML =
269 + "最小申报价值不得大于最大申报价值";
270 + return false;
271 + } else {
272 + this.$refs.minCNYCustomVal.innerHTML = "";
273 + }
274 + if (Number(this.queryForm.minCNYCustomVal) > 2000) {
275 + this.$refs.minCNYCustomVal.innerHTML = "";
276 + this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000";
277 + return false;
278 + }
279 + } else if (Number(this.queryForm.minCNYCustomVal) < 0) {
280 + this.$refs.minCNYCustomVal.innerHTML = "";
281 + this.$refs.minCNYCustomVal.innerHTML = "申报价值(人民币)0~2000";
282 + return false;
283 + } else if (Number(this.queryForm.minCNYCustomVal) > 2000) {
284 + this.$refs.minCNYCustomVal.innerHTML = "";
285 + this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000";
286 + return false;
287 + } else {
288 + this.$refs.minCNYCustomVal.innerHTML = "";
289 + return true;
290 + }
291 + }
292 + } else {
293 + this.$refs.minCNYCustomVal.innerHTML = "";
294 + this.$refs.minCNYCustomVal.innerHTML = "请输入正确申报价值";
295 + return false;
296 + }
297 + },
298 + // 最大申报价值
299 + validateMaxCustomVal(name) {
300 + // 申报价值
301 + if (
302 + /^(0|[1-9]\d*)(.\d{1,2})?$/.test(
303 + Number(
304 + this.queryForm.maxCNYCustomVal || this.queryForm.maxSUDCustomVal
305 + )
306 + )
307 + ) {
308 + if (name == "USD" || name == "美元") {
309 + // 申报价值(美元)0~600
310 + if (
311 + this.queryForm.minSUDCustomVal &&
312 + this.queryForm.maxSUDCustomVal
313 + ) {
314 + if (
315 + Number(this.queryForm.minSUDCustomVal) >
316 + Number(this.queryForm.maxSUDCustomVal)
317 + ) {
318 + this.$refs.minSUDCustomVal.innerHTML =
319 + "最小申报价值不得大于最大申报价值";
320 + return false;
321 + } else {
322 + this.$refs.minSUDCustomVal.innerHTML = "";
323 + }
324 + if (Number(this.queryForm.maxCNYCustomVal) > 600) {
325 + this.$refs.minSUDCustomVal.innerHTML = "";
326 + this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600";
327 + return false;
328 + }
329 + } else if (Number(this.queryForm.maxCNYCustomVal) < 0) {
330 + this.$refs.minSUDCustomVal.innerHTML = "";
331 + this.$refs.minSUDCustomVal.innerHTML = "申报价值(美元)0~600";
332 + return false;
333 + } else if (Number(this.queryForm.maxCNYCustomVal) > 600) {
334 + this.$refs.minSUDCustomVal.innerHTML = "";
335 + this.$refs.minSUDCustomVal.innerHTML = "最大申报值不得大于600";
336 + return false;
337 + } else {
338 + this.$refs.minSUDCustomVal.innerHTML = "";
339 + return true;
340 + }
341 + } else {
342 + // 申报价值(人民币)0~2000
343 + if (
344 + this.queryForm.minCNYCustomVal &&
345 + this.queryForm.maxCNYCustomVal
346 + ) {
347 + if (
348 + Number(this.queryForm.minCNYCustomVal) >
349 + Number(this.queryForm.maxCNYCustomVal)
350 + ) {
351 + this.$refs.minCNYCustomVal.innerHTML =
352 + "最小申报价值不得大于最大申报价值";
353 + return false;
354 + } else {
355 + this.$refs.minCNYCustomVal.innerHTML = "";
356 + }
357 + if (Number(this.queryForm.maxCNYCustomVal) > 2000) {
358 + this.$refs.minCNYCustomVal.innerHTML = "";
359 + this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000";
360 + return false;
361 + }
362 + } else if (Number(this.queryForm.maxCNYCustomVal) < 0) {
363 + this.$refs.minCNYCustomVal.innerHTML = "";
364 + this.$refs.minCNYCustomVal.innerHTML = "申报价值(人民币)0~2000";
365 + return false;
366 + } else if (Number(this.queryForm.maxCNYCustomVal) > 2000) {
367 + this.$refs.minCNYCustomVal.innerHTML = "";
368 + this.$refs.minCNYCustomVal.innerHTML = "最大申报值不得大于2000";
369 + return false;
370 + } else {
371 + this.$refs.minCNYCustomVal.innerHTML = "";
372 + return true;
373 + }
374 + }
375 + } else {
376 + this.$refs.minCNYCustomVal.innerHTML = "";
377 + this.$refs.maxCNYCustomVal.innerHTML = "请输入正确申报价值";
378 + return false;
379 + }
380 + },
381 + },
382 +};
1 +export const tableAttr = {
2 + border: true,
3 + loadingTable: false,
4 + isDragSort: true, // 拖拽tableData数据一定要加id字段
5 + maxHeight: 300,
6 + btnCofig: {
7 + isBtn: true,
8 + btnGroup: [
9 + {
10 + type: "primary",
11 + icon: "el-icon-plus",
12 + btnName: "添加",
13 + size: "mini",
14 + round: false,
15 + loading: false,
16 + event: "add",
17 + },
18 + ],
19 + },
20 +};
21 +
22 +export const columnHeader = (deleteRow) => [
23 + {
24 + label: "航班号",
25 + prop: "fltNo",
26 + align: "center",
27 + minWidth: 100,
28 + },
29 + {
30 + label: "航班日期",
31 + prop: "fltNoDate",
32 + align: "center",
33 + minWidth: 100,
34 + // sortable: true,
35 + // "sort-method": (a, b) => b.updateTime - a.updateTime,
36 + },
37 + {
38 + label: "航线优先级",
39 + prop: "fltRoute",
40 + align: "center",
41 + minWidth: 100,
42 + },
43 + {
44 + label: "爆仓是否继续配舱",
45 + prop: "isOn",
46 + align: "center",
47 + minWidth: 100,
48 + render: (h, params) => {
49 + const { row } = params;
50 + console.log(345678,row);
51 + // return h("div", `状态-${row.id}`);
52 + },
53 + },
54 + {
55 + label: "操作",
56 + align: "center",
57 + minWidth: 120,
58 + render: (h, params) => {
59 + return h("div", [
60 + h(
61 + "el-button",
62 + {
63 + style: {
64 + color: "#ff4949",
65 + },
66 + props: {
67 + type: "text",
68 + size: "mini",
69 + icon: "el-icon-delete",
70 + },
71 + on: {
72 + click() {
73 + deleteRow(params);
74 + },
75 + },
76 + },
77 + "删除"
78 + ),
79 + ]);
80 + },
81 + },
82 +];
83 +
84 +export const tableData = [
85 + {
86 + id: "1",
87 + fltNo: "A380",
88 + fltNoDate: "3",
89 + fltRoute: "",
90 + routeList: [],
91 + isOn: "1",
92 + sort: "1", // 排序字段
93 + },
94 +];
1 +export const formConfig = [
2 + {
3 + label: "创建时间(从)",
4 + type: "Date",
5 + name: "startTime",
6 + prop: "startTime",
7 + placeholder: "请选择开始时间",
8 + rules: { required: true, message: "请选择开始时间", trigger: "blur" },
9 + },
10 + {
11 + label: "创建时间(到)",
12 + type: "Date",
13 + name: "endTime",
14 + prop: "endTime",
15 + placeholder: "请选择结束时间",
16 + rules: { required: true, message: "请选择结束时间", trigger: "blur" },
17 + },
18 + {
19 + label: "规则状态",
20 + type: "Select",
21 + name: "status",
22 + prop: "status",
23 + width: "140px",
24 + placeholder: "请选择状态",
25 + options: {
26 + data: [
27 + {
28 + value: "1",
29 + label: "有效",
30 + },
31 + {
32 + value: "3",
33 + label: "无效",
34 + },
35 + ],
36 + label: "有效",
37 + value: "1",
38 + },
39 + },
40 +];
41 +
42 +export const editFormConfig = [
43 + {
44 + label: "航班号",
45 + type: "Search",
46 + name: "route",
47 + prop: "fltNo",
48 + placeholder: "请输入航班号",
49 + rules: {
50 + required: true,
51 + message: "请输入航班号",
52 + trigger: ["change", "blur"],
53 + },
54 + http: {
55 + url: "/dictionary/queryRouteByFltNo",
56 + method: "post",
57 + data: {
58 + fltNo: "",
59 + },
60 + },
61 + },
62 + {
63 + label: "",
64 + type: "inputNumber",
65 + name: "count",
66 + prop: "count",
67 + placeholder: "+",
68 + min: 0,
69 + max: 7,
70 + with: "50px",
71 + },
72 + {
73 + label: "航线优先级",
74 + type: "Input",
75 + name: "route",
76 + prop: "fltNum",
77 + placeholder: "请选择航线优先级",
78 + trigger: "focus",
79 + },
80 + {
81 + label: "爆仓是否继续配舱",
82 + type: "Checkbox",
83 + name: "checked",
84 + prop: "checked",
85 + disabled: false,
86 + },
87 +];
1 +<template>
2 + <div class="form-header container">
3 + <el-row>
4 + <el-col>
5 + <yl-form
6 + ref="ruleForm"
7 + :formConfig="formConfig"
8 + :queryForm="queryForm"
9 + @input="inputEvent"
10 + @keyup="keyUpEvent"
11 + />
12 + </el-col>
13 + </el-row>
14 + <yl-table
15 + :attrs="tableAttr"
16 + :loadingTable="tableAttr.loadingTable"
17 + :columns="columns"
18 + :tableData="tableData"
19 + :pageConfig="pageConfig"
20 + @sizeChange="handleSizeChange"
21 + @currentChange="handleCurrentChange"
22 + @search="searchBtn"
23 + @restForm="restForm"
24 + @add="addBtn"
25 + >
26 + </yl-table>
27 + </div>
28 +</template>
29 +<script>
30 +import YlForm from "@/components/YlForm";
31 +import YlTable from "@/components/YlTable";
32 +import { formConfig } from "./formConfig";
33 +import { debounce } from "@/utils";
34 +import { tableAttr, columnHeader, tableData } from "./tableConfig";
35 +import {
36 + allDictData, // 获取全部字典
37 + queryRouteByFltNo, // 航线查询
38 +} from "@/api/destinationFlight";
39 +export default {
40 + components: {
41 + YlForm,
42 + YlTable,
43 + },
44 + data() {
45 + return {
46 + formConfig: formConfig, // 表单配置项
47 + queryForm: { // 表单参数
48 + status: "有效"
49 + },
50 + pageConfig: {
51 + // 分页配置项
52 + isPagination: true,
53 + total: 13,
54 + pageData: {
55 + page: 1,
56 + size: 10,
57 + },
58 + },
59 + tableAttr: tableAttr, // table配置项
60 + columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
61 + tableData: tableData, // 表格数据
62 + selectionList: [], // table复选框筛选集合
63 + };
64 + },
65 + created() {},
66 + mounted() {},
67 + methods: {
68 + // 航线查询
69 + queryRoute(item) {
70 + queryRouteByFltNo(item).then((res) => {
71 + if (res.code == 200) {
72 + const list = res.data.list;
73 + let routeList = "";
74 + if (list.length) {
75 + list.map((item) => {
76 + routeList += item.route + ",";
77 + });
78 + this.queryForm.fltRoute = routeList.substring(
79 + 0,
80 + routeList.length - 1
81 + );
82 + } else {
83 + this.queryForm = {
84 + fltNo: item.fltNo, // 航班号
85 + };
86 + }
87 + }
88 + });
89 + },
90 + // input事件
91 + inputEvent: debounce(function () {
92 + this.queryRoute({
93 + fltNo: this.queryForm.fltNo, // 航班号
94 + });
95 + }, 800),
96 + // 回车事件
97 + keyUpEvent(item) {
98 + this.queryRoute(item);
99 + },
100 + // table复选框事件
101 + selectionTable(e) {
102 + console.log("selectionTable:", e);
103 + this.selectionList = e;
104 + },
105 + //条数变化
106 + handleSizeChange(e) {
107 + this.pageConfig.pageData.size = e;
108 + this.pageConfig.pageData.page = 1;
109 + console.log("sizeChange:", e);
110 + },
111 + //页码变化
112 + handleCurrentChange(e) {
113 + this.pageConfig.pageData.page = e;
114 + console.log("currentChange:", e);
115 + },
116 + // 搜索
117 + searchBtn(row) {
118 + this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
119 + console.log(val);
120 + });
121 + console.log(this.queryForm);
122 + },
123 + // 重置表单
124 + restForm() {
125 + this.$refs.ruleForm.resetFields("ruleForm");
126 + },
127 + // 添加
128 + addBtn(item) {
129 + console.log("add:", item);
130 + this.$router.push({
131 + name: "edit",
132 + params: {
133 + edit: 12,
134 + },
135 + });
136 + },
137 + // 编辑
138 + editRow(item) {
139 + this.$router.push({
140 + name: "edit",
141 + params: {
142 + edit: 12,
143 + },
144 + });
145 + console.log("修改:", item);
146 + },
147 + // 删除
148 + deleteRow(item) {
149 + this.$confirm("是否确认删除?", "提示", {
150 + confirmButtonText: "确定",
151 + cancelButtonText: "取消",
152 + type: "warning",
153 + center: true,
154 + })
155 + .then(() => {
156 + console.log("删除:", item);
157 + this.msgSuccess("删除成功!")
158 + })
159 + .catch(() => {});
160 + },
161 + // 查看
162 + viewRow({ row }) {
163 + this.$router.push({
164 + name: "edit",
165 + params: {
166 + edit: 12,
167 + },
168 + });
169 + console.log("查看:", row);
170 + },
171 + },
172 +};
173 +</script>
174 +<style lang="scss" scoped></style>
1 +const state = {
2 + 1: "有效",
3 + 3: "无效",
4 +};
5 +export const tableAttr = {
6 + border: true,
7 + loadingTable: false,
8 + isDragSort: false, // 拖拽tableData数据一定要加id字段
9 + maxHeight: 300,
10 + btnCofig: {
11 + isBtn: true,
12 + btnGroup: [
13 + {
14 + type: "primary", // text、primary、danger
15 + icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right
16 + btnName: "搜索",
17 + size: "mini", // medium / small / mini
18 + round: false,
19 + loading: false,
20 + event: "search",
21 + },
22 + {
23 + type: "info",
24 + icon: "",
25 + btnName: "重置",
26 + size: "mini",
27 + round: false,
28 + loading: false,
29 + event: "restForm",
30 + },
31 + {
32 + type: "primary",
33 + icon: "el-icon-plus",
34 + btnName: "添加",
35 + size: "mini",
36 + round: false,
37 + loading: false,
38 + event: "add",
39 + },
40 + ],
41 + },
42 +};
43 +export const columnHeader = (viewRow, editRow, deleteRow) => [
44 + {
45 + type: "selection",
46 + align: "center",
47 + prop: "selection",
48 + width: "50",
49 + },
50 + {
51 + type: "index",
52 + label: "序号",
53 + prop: "id",
54 + align: "center",
55 + width: "50",
56 + },
57 + {
58 + label: "原航班号",
59 + prop: "fltNo",
60 + align: "center",
61 + minWidth: 100,
62 + },
63 + {
64 + label: "顺位航班",
65 + prop: "flightRand",
66 + align: "center",
67 + minWidth: 100,
68 + },
69 + {
70 + label: "URSA包含",
71 + prop: "includeUrsa",
72 + align: "center",
73 + minWidth: 100,
74 + },
75 + {
76 + label: "URSA不包含",
77 + prop: "notIncludeUrsa",
78 + align: "center",
79 + minWidth: 100,
80 + },
81 + {
82 + label: "状态",
83 + prop: "status",
84 + align: "center",
85 + minWidth: 100,
86 + render: (h, params) => {
87 + const { row } = params;
88 + return h("div", `${state[row.status]}`);
89 + },
90 + },
91 + {
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: "修改时间",
107 + prop: "updateTime",
108 + align: "center",
109 + minWidth: 100,
110 + },
111 + {
112 + label: "修改人",
113 + prop: "updateUserName",
114 + align: "center",
115 + minWidth: 100,
116 + },
117 + {
118 + label: "操作",
119 + prop: "operate",
120 + align: "center",
121 + minWidth: 120,
122 + fixed: "right",
123 + render: (h, params) => {
124 + return h("div", [
125 + h(
126 + "el-button",
127 + {
128 + props: {
129 + type: "text",
130 + size: "mini",
131 + icon: "el-icon-view",
132 + },
133 + on: {
134 + click() {
135 + viewRow(params);
136 + },
137 + },
138 + },
139 + "查看"
140 + ),
141 + h(
142 + "el-button",
143 + {
144 + props: {
145 + type: "text",
146 + size: "mini",
147 + icon: "el-icon-edit",
148 + },
149 + on: {
150 + click() {
151 + editRow(params);
152 + },
153 + },
154 + },
155 + "修改"
156 + ),
157 + h(
158 + "el-button",
159 + {
160 + style: {
161 + color: "#ff4949",
162 + },
163 + props: {
164 + type: "text",
165 + size: "mini",
166 + icon: "el-icon-delete",
167 + },
168 + on: {
169 + click() {
170 + deleteRow(params);
171 + },
172 + },
173 + },
174 + "删除"
175 + ),
176 + ]);
177 + },
178 + },
179 +];
180 +
181 +export const tableData = [
182 + {
183 + id: "1",
184 + flightRand: "LZ003;LZ00",
185 + status: "1",
186 + fltNo: "FX0090",
187 + includeUrsa: "URSACODE191",
188 + notIncludeUrsa: "P_3",
189 + createTime: "2023-08-14",
190 + createUserName: "wjh",
191 + updateTime: "2023-08-14",
192 + updateUserName: "wjh",
193 + },
194 + {
195 + id: "2",
196 + flightRand: "LP001;LP004+1",
197 + status: "3",
198 + fltNo: "FX0090",
199 + includeUrsa: "P_;URSACODE105",
200 + notIncludeUrsa: "P_21",
201 + createTime: "2023-08-14",
202 + createUserName: "wjh",
203 + updateTime: "2023-08-14",
204 + updateUserName: "wjh",
205 + },
206 + {
207 + id: "3",
208 + flightRand: "CQ00;LZ003;CS0004",
209 + status: "1",
210 + fltNo: "CS0002",
211 + includeUrsa: "URSACODE12",
212 + notIncludeUrsa: "P_2",
213 + createTime: "2023-08-14",
214 + createUserName: "wjh",
215 + updateTime: "2023-08-14",
216 + updateUserName: "wjh",
217 + },
218 + {
219 + id: "4",
220 + flightRand: "LZ001;LZ002;LZ004",
221 + status: "1",
222 + fltNo: "FX0090",
223 + includeUrsa: "URSACODE192",
224 + notIncludeUrsa: "P_17",
225 + createTime: "2023-08-11",
226 + createUserName: "wjh",
227 + updateTime: "2023-08-11",
228 + updateUserName: "wjh",
229 + },
230 + {
231 + id: "5",
232 + flightRand: "PS001;PS003",
233 + status: "1",
234 + fltNo: "FX0091",
235 + includeUrsa: "URSACODE10",
236 + notIncludeUrsa: "P_28",
237 + createTime: "2023-08-11",
238 + createUserName: "wjh",
239 + updateTime: "2023-08-11",
240 + updateUserName: "wjh",
241 + },
242 + {
243 + id: "6",
244 + flightRand: "PS002;PS003",
245 + status: "3",
246 + fltNo: "XN007",
247 + includeUrsa: "URSACODE27",
248 + notIncludeUrsa: "P_4",
249 + createTime: "2023-08-11",
250 + createUserName: "wjh",
251 + updateTime: "2023-08-11",
252 + updateUserName: "wjh",
253 + },
254 + {
255 + id: "7",
256 + flightRand: "XN001;XN002;XN003;XN004",
257 + status: "1",
258 + fltNo: "XN001",
259 + includeUrsa: "URSACODE34",
260 + notIncludeUrsa: "P_7",
261 + createTime: "2023-08-10",
262 + createUserName: "wjh",
263 + updateTime: "2023-08-10",
264 + updateUserName: "wjh",
265 + },
266 + {
267 + id: "8",
268 + flightRand: "HA004",
269 + status: "3",
270 + fltNo: "LZ007",
271 + includeUrsa: "URSACODE71",
272 + notIncludeUrsa: "P_2",
273 + createTime: "2023-08-10",
274 + createUserName: "wjh",
275 + updateTime: "2023-08-10",
276 + updateUserName: "wjh",
277 + },
278 + {
279 + id: "9",
280 + flightRand: "AB0001;AB123",
281 + status: "1",
282 + fltNo: "AB0001",
283 + includeUrsa: "URSACODE87",
284 + notIncludeUrsa: "P_26",
285 + createTime: "2023-08-10",
286 + createUserName: "wjh",
287 + updateTime: "2023-08-10",
288 + updateUserName: "wjh",
289 + },
290 +];
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
98 colData: {}, 98 colData: {},
99 curPage: 1, 99 curPage: 1,
100 total: 0, 100 total: 0,
101 - tableHeight: null, 101 + tableHeight: 300,
102 open: false, 102 open: false,
103 loading: false, 103 loading: false,
104 }; 104 };
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
109 } 109 }
110 }, 110 },
111 mounted() { 111 mounted() {
112 - this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200 112 + // this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200;
113 }, 113 },
114 activated() { 114 activated() {
115 this.getList() 115 this.getList()
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
55 <template slot="title"> 55 <template slot="title">
56 <span class="fontWeight">{{ routeItem.route }}</span> 56 <span class="fontWeight">{{ routeItem.route }}</span>
57 </template> 57 </template>
58 - <el-card shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" 58 + <template v-for="(val, idx) in infoForm.list">
59 - v-if="val.flightRoute === routeItem.route" style="min-height:350px"> 59 + <el-card shadow="always" style="min-height:350px" v-if="val.flightRoute === routeItem.route" :key="idx">
60 <div> 60 <div>
61 <el-empty description="未设置规则!" v-if="!val.isLocation"> 61 <el-empty description="未设置规则!" v-if="!val.isLocation">
62 <el-button type="primary" size="small" @click="newRoute(idx)">新增规则 62 <el-button type="primary" size="small" @click="newRoute(idx)">新增规则
...@@ -73,32 +73,43 @@ ...@@ -73,32 +73,43 @@
73 <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" @click="del(idx)">删 73 <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" @click="del(idx)">删
74 74
75 </el-button> 75 </el-button>
76 - <div v-if="(routeSatus.indexOf('flightInformationMaintenance') >= 0)"
77 - style="display: inline-block;">
78 <span v-if="val.id">日期级别规则</span><span v-else>普通规则</span> 76 <span v-if="val.id">日期级别规则</span><span v-else>普通规则</span>
79 - </div>
80 - <div v-else-if="(routeSatus.indexOf('FlightAllocConfig') >= 0)"
81 - style="display: inline-block;">
82 - <span
83 - v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.fltDate != ' '">日期级别规则</span><span
84 - v-else>普通规则</span>
85 - </div>
86 <el-divider></el-divider> 77 <el-divider></el-divider>
87 <el-col :span="24"> 78 <el-col :span="24">
88 - <el-form-item label="站点"> 79 + <el-form-item label="始发站">
89 <el-col :span="4"> 80 <el-col :span="4">
90 <el-radio-group v-model="val.isLocation" @change="change"> 81 <el-radio-group v-model="val.isLocation" @change="change">
91 - <el-radio label="1">站点包含</el-radio> 82 + <el-radio label="1">包含始发站</el-radio>
92 - <el-radio label="2">站点不包含</el-radio> 83 + <el-radio label="2">不包含始发站</el-radio>
93 </el-radio-group> 84 </el-radio-group>
94 </el-col> 85 </el-col>
95 <el-col :span="10"> 86 <el-col :span="10">
96 <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea" 87 <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea"
97 - :rows="4" resize="none" style="width: 500px" placeholder="站点之间用回车符分隔" 88 + :rows="4" resize="none" style="width: 500px" placeholder="始发站之间用分号分隔"
98 @change="change" @input="change($event)"> 89 @change="change" @input="change($event)">
99 </el-input> 90 </el-input>
100 <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" 91 <el-input v-else v-model="val.notLocation" type="textarea" :rows="4"
101 - resize="none" style="width: 500px" placeholder="站点之间用回车符分隔" @change="change" 92 + resize="none" style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
93 + @input="change($event)">
94 + </el-input>
95 + </el-col>
96 + </el-form-item>
97 + </el-col>
98 + <el-col :span="24">
99 + <el-form-item label="目的站">
100 + <el-col :span="4">
101 + <el-radio-group v-model="val.isDestinationSite" @change="change">
102 + <el-radio label="1">包含目的站</el-radio>
103 + <el-radio label="2">不包含目的站</el-radio>
104 + </el-radio-group>
105 + </el-col>
106 + <el-col :span="10">
107 + <el-input v-if="val.isDestinationSite == '1'" v-model="val.destinationSite" type="textarea"
108 + :rows="4" resize="none" style="width: 500px" placeholder="目的站之间用分号分隔"
109 + @change="change" @input="change($event)">
110 + </el-input>
111 + <el-input v-else v-model="val.notDestinationSite" type="textarea" :rows="4"
112 + resize="none" style="width: 500px" placeholder="目的站之间用分号分隔" @change="change"
102 @input="change($event)"> 113 @input="change($event)">
103 </el-input> 114 </el-input>
104 </el-col> 115 </el-col>
...@@ -108,7 +119,7 @@ ...@@ -108,7 +119,7 @@
108 <el-col :span="12"> 119 <el-col :span="12">
109 <el-form-item label="URSA包含"> 120 <el-form-item label="URSA包含">
110 <el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none" 121 <el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none"
111 - style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change" 122 + placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change"
112 @input="change($event)"> 123 @input="change($event)">
113 </el-input> 124 </el-input>
114 </el-form-item> 125 </el-form-item>
...@@ -116,7 +127,7 @@ ...@@ -116,7 +127,7 @@
116 <el-col :span="12"> 127 <el-col :span="12">
117 <el-form-item label="URSA不包含"> 128 <el-form-item label="URSA不包含">
118 <el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4" resize="none" 129 <el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4" resize="none"
119 - style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change" 130 + placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change"
120 @input="change($event)"> 131 @input="change($event)">
121 </el-input> 132 </el-input>
122 </el-form-item> 133 </el-form-item>
...@@ -294,6 +305,7 @@ ...@@ -294,6 +305,7 @@
294 </el-row> 305 </el-row>
295 </div> 306 </div>
296 </el-card> 307 </el-card>
308 + </template>
297 </el-collapse-item> 309 </el-collapse-item>
298 </el-collapse> 310 </el-collapse>
299 <el-card v-else shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" style="min-height:350px"> 311 <el-card v-else shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" style="min-height:350px">
...@@ -313,30 +325,43 @@ ...@@ -313,30 +325,43 @@
313 <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" style="margin-right:10px" 325 <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" style="margin-right:10px"
314 @click="del(idx)">删 除 326 @click="del(idx)">删 除
315 </el-button> 327 </el-button>
316 - <div v-if="routeSatus.indexOf('flightInformationMaintenance') >= 0" style="display: inline-block;">
317 <span v-if="val.id">日期级别规则</span><span v-else>普通规则</span> 328 <span v-if="val.id">日期级别规则</span><span v-else>普通规则</span>
318 - </div>
319 - <div v-else-if="(routeSatus.indexOf('FlightAllocConfig') >= 0)" style="display: inline-block;">
320 - <span
321 - v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.fltDate != ' '">日期级别规则</span><span
322 - v-else>普通规则</span>
323 - </div>
324 <el-divider></el-divider> 329 <el-divider></el-divider>
325 <el-col :span="24"> 330 <el-col :span="24">
326 - <el-form-item label="站点"> 331 + <el-form-item label="始发站">
327 <el-col :span="4"> 332 <el-col :span="4">
328 <el-radio-group v-model="val.isLocation" @change="change"> 333 <el-radio-group v-model="val.isLocation" @change="change">
329 - <el-radio label="1">站点包含</el-radio> 334 + <el-radio label="1">包含始发站</el-radio>
330 - <el-radio label="2">站点不包含</el-radio> 335 + <el-radio label="2">不包含始发站</el-radio>
331 </el-radio-group> 336 </el-radio-group>
332 </el-col> 337 </el-col>
333 <el-col :span="10"> 338 <el-col :span="10">
334 <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea" :rows="4" 339 <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea" :rows="4"
335 - resize="none" style="width: 500px" placeholder="站点之间用回车符分隔" @change="change" 340 + resize="none" style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
336 @input="change($event)"> 341 @input="change($event)">
337 </el-input> 342 </el-input>
338 <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" resize="none" 343 <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" resize="none"
339 - style="width: 500px" placeholder="站点之间用回车符分隔" @change="change" 344 + style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
345 + @input="change($event)">
346 + </el-input>
347 + </el-col>
348 + </el-form-item>
349 + </el-col>
350 + <el-col :span="24">
351 + <el-form-item label="目的站">
352 + <el-col :span="4">
353 + <el-radio-group v-model="val.isDestinationSite" @change="change">
354 + <el-radio label="1">包含目的站</el-radio>
355 + <el-radio label="2">不包含目的站</el-radio>
356 + </el-radio-group>
357 + </el-col>
358 + <el-col :span="10">
359 + <el-input v-if="val.isDestinationSite == '1'" v-model="val.destinationSite" type="textarea"
360 + :rows="4" resize="none" style="width: 500px" placeholder="目的站之间用分号分隔"
361 + @change="change" @input="change($event)">
362 + </el-input>
363 + <el-input v-else v-model="val.notDestinationSite" type="textarea" :rows="4"
364 + resize="none" style="width: 500px" placeholder="目的站之间用分号分隔" @change="change"
340 @input="change($event)"> 365 @input="change($event)">
341 </el-input> 366 </el-input>
342 </el-col> 367 </el-col>
...@@ -346,7 +371,7 @@ ...@@ -346,7 +371,7 @@
346 <el-col :span="12"> 371 <el-col :span="12">
347 <el-form-item label="URSA包含"> 372 <el-form-item label="URSA包含">
348 <el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none" 373 <el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none"
349 - style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change" 374 + placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change"
350 @input="change($event)"> 375 @input="change($event)">
351 </el-input> 376 </el-input>
352 </el-form-item> 377 </el-form-item>
...@@ -354,7 +379,7 @@ ...@@ -354,7 +379,7 @@
354 <el-col :span="12"> 379 <el-col :span="12">
355 <el-form-item label="URSA不包含"> 380 <el-form-item label="URSA不包含">
356 <el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4" resize="none" 381 <el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4" resize="none"
357 - style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change" 382 + placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change"
358 @input="change($event)"> 383 @input="change($event)">
359 </el-input> 384 </el-input>
360 </el-form-item> 385 </el-form-item>
...@@ -435,7 +460,7 @@ ...@@ -435,7 +460,7 @@
435 <el-card shadow="never" style="width: 95%"> 460 <el-card shadow="never" style="width: 95%">
436 <el-checkbox-group v-model="val.puporpuxCode" @change="change"> 461 <el-checkbox-group v-model="val.puporpuxCode" @change="change">
437 <el-row> 462 <el-row>
438 - <el-col :span="2" v-for="item in checkBoxItem.puporpux"> 463 + <el-col :span="2" v-for="item in checkBoxItem.puporpux" :key="item.code">
439 <el-checkbox 464 <el-checkbox
440 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)" 465 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
441 :label="item.chineseName" :name="item.chineseName" 466 :label="item.chineseName" :name="item.chineseName"
...@@ -614,6 +639,7 @@ export default { ...@@ -614,6 +639,7 @@ export default {
614 this.getRouteDimension(obj) 639 this.getRouteDimension(obj)
615 } 640 }
616 } 641 }
642 +
617 } else { 643 } else {
618 this.infoForm.fltNo = '' 644 this.infoForm.fltNo = ''
619 this.infoForm.fltDate = null 645 this.infoForm.fltDate = null
...@@ -665,11 +691,11 @@ export default { ...@@ -665,11 +691,11 @@ export default {
665 this.msgError(res.msg) 691 this.msgError(res.msg)
666 return; 692 return;
667 } 693 }
668 - this.checkBoxItem.cargoType = res.data.cargoType; 694 + this.checkBoxItem.cargoType = res.data.cargoType; //
669 - this.checkBoxItem.cargoStatus = res.data.cargoStatus; 695 + this.checkBoxItem.cargoStatus = res.data.cargoStatus; //
670 - this.checkBoxItem.puporpux = res.data.puporpux; 696 + this.checkBoxItem.puporpux = res.data.puporpux; //
671 this.checkBoxItem.serviceCode = this.dicSort(res.data.serviceCode.sort((a, b) => 697 this.checkBoxItem.serviceCode = this.dicSort(res.data.serviceCode.sort((a, b) =>
672 - a.chineseName.localeCompare(b.chineseName) 698 + a.chineseName.localeCompare(b.chineseName) //
673 )); 699 ));
674 this.checkBoxItem.handlingCode = this.dicSort(this.sorttodo(res.data.handlingCode, "BLANK")); 700 this.checkBoxItem.handlingCode = this.dicSort(this.sorttodo(res.data.handlingCode, "BLANK"));
675 this.checkBoxItem.subCategory = this.dicSort(this.sorttodo(res.data.subCategory, "Blank")); 701 this.checkBoxItem.subCategory = this.dicSort(this.sorttodo(res.data.subCategory, "Blank"));
...@@ -693,7 +719,6 @@ export default { ...@@ -693,7 +719,6 @@ export default {
693 this.infoForm.fltDate = res.data.list.ruleDate 719 this.infoForm.fltDate = res.data.list.ruleDate
694 this.infoForm.route = res.data.list.flightRoute 720 this.infoForm.route = res.data.list.flightRoute
695 this.infoForm.list.push(this.dataHandle(res.data.list)) 721 this.infoForm.list.push(this.dataHandle(res.data.list))
696 - console.log(this.infoForm)
697 } else { 722 } else {
698 this.isEmpty = true 723 this.isEmpty = true
699 } 724 }
...@@ -970,10 +995,9 @@ export default { ...@@ -970,10 +995,9 @@ export default {
970 this.msgWarning('件数前区间不能大于后区间') 995 this.msgWarning('件数前区间不能大于后区间')
971 } else if (new Number(data.minWeight) > new Number(data.maxWeight)) { 996 } else if (new Number(data.minWeight) > new Number(data.maxWeight)) {
972 this.msgWarning('重量前区间不能大于后区间') 997 this.msgWarning('重量前区间不能大于后区间')
973 - } else if (data.handlingCode == '' && data.serviceCode == '' && data.subCategory == '' && data.typeOfGoods == '' && data.puporpuxCode == '' && (!data.location || data.location == '') && data.notLocation == '' && (data.includeUrsa == null || data.includeUrsa == '') && (data.notIncludeUrsa == null || data.notIncludeUrsa == '') && (!data.minNumOfPieces || data.minNumOfPieces == '') && (!data.maxNumOfPieces || data.maxNumOfPieces == '') && (!data.minWeight || data.minWeight == '') && (!data.maxWeight || data.maxWeight == '')) { 998 + } else if (data.handlingCode == '' && data.serviceCode == '' && data.subCategory == '' && data.typeOfGoods == '' && data.puporpuxCode == '' && (!data.location || data.location == '') && data.notLocation == '' && (!data.destinationSite || data.destinationSite == '') && data.notDestinationSite == '' && (data.includeUrsa == null || data.notIncludeUrsa == null) && (!data.minNumOfPieces || data.minNumOfPieces == '') && (!data.maxNumOfPieces || data.maxNumOfPieces == '') && (!data.minWeight || data.minWeight == '') && (!data.maxWeight || data.maxWeight == '')) {
974 this.msgWarning('未添加规则信息,请添加后再保存!') 999 this.msgWarning('未添加规则信息,请添加后再保存!')
975 } else { 1000 } else {
976 - // this.loading = true
977 this.routeList.forEach((item, idx) => { 1001 this.routeList.forEach((item, idx) => {
978 routeArr.push(item.route) 1002 routeArr.push(item.route)
979 }) 1003 })
...@@ -995,9 +1019,9 @@ export default { ...@@ -995,9 +1019,9 @@ export default {
995 this.loading = false 1019 this.loading = false
996 if (res.code === 200) { 1020 if (res.code === 200) {
997 this.fltNoDisabled = true 1021 this.fltNoDisabled = true
998 - this.$forceUpdate()
999 this.msgSuccess('保存成功!') 1022 this.msgSuccess('保存成功!')
1000 this.infoForm.list[val] = this.dataHandle(res.data) 1023 this.infoForm.list[val] = this.dataHandle(res.data)
1024 + this.$forceUpdate()
1001 } else { 1025 } else {
1002 this.msgWarning(res.msg) 1026 this.msgWarning(res.msg)
1003 } 1027 }
...@@ -1056,6 +1080,7 @@ export default { ...@@ -1056,6 +1080,7 @@ export default {
1056 this.infoForm.list[val].flightRoute = this.routeList[val].route 1080 this.infoForm.list[val].flightRoute = this.routeList[val].route
1057 this.infoForm.list[val].routePriority = this.routeList[val].routePriority 1081 this.infoForm.list[val].routePriority = this.routeList[val].routePriority
1058 this.infoForm.list[val].isLocation = '1' 1082 this.infoForm.list[val].isLocation = '1'
1083 + this.infoForm.list[val].isDestinationSite = '1'
1059 this.infoForm.list[val].typeOfGoods = [] 1084 this.infoForm.list[val].typeOfGoods = []
1060 this.infoForm.list[val].declarationCategory = [] 1085 this.infoForm.list[val].declarationCategory = []
1061 this.infoForm.list[val].puporpuxCode = [] 1086 this.infoForm.list[val].puporpuxCode = []
...@@ -1129,7 +1154,7 @@ export default { ...@@ -1129,7 +1154,7 @@ export default {
1129 }) 1154 })
1130 }).catch(() => { 1155 }).catch(() => {
1131 this.infoForm.list.map((item, idx) => { 1156 this.infoForm.list.map((item, idx) => {
1132 - if (item.isLocation) { 1157 + if (item.isLocation && item.isDestinationSite) {
1133 this.infoForm.list[idx] = this.dataHandle(item) 1158 this.infoForm.list[idx] = this.dataHandle(item)
1134 } 1159 }
1135 }) 1160 })
...@@ -1150,9 +1175,15 @@ export default { ...@@ -1150,9 +1175,15 @@ export default {
1150 }, 1175 },
1151 //数据处理 1176 //数据处理
1152 dataHandle(val) { 1177 dataHandle(val) {
1153 - val.isLocation = '1' 1178 +
1179 + val.isLocation = '1' // 始发站 radio
1154 val.location ? val.isLocation = '1' : '' 1180 val.location ? val.isLocation = '1' : ''
1155 val.notLocation ? val.isLocation = '2' : '' 1181 val.notLocation ? val.isLocation = '2' : ''
1182 +
1183 + val.isDestinationSite = '1' // 目的站 radio
1184 + val.destinationSite ? val.isDestinationSite = '1' : ''
1185 + val.notDestinationSite ? val.isDestinationSite = '2' : ''
1186 +
1156 val.maxNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大件数 1187 val.maxNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大件数
1157 val.maxWeight == null ? val.maxWeight = undefined : val.maxWeight = val.maxWeight//最大重量 1188 val.maxWeight == null ? val.maxWeight = undefined : val.maxWeight = val.maxWeight//最大重量
1158 val.minNumOfPieces == null ? val.minNumOfPieces = undefined : val.minNumOfPieces = val.minNumOfPieces//最小件数 1189 val.minNumOfPieces == null ? val.minNumOfPieces = undefined : val.minNumOfPieces = val.minNumOfPieces//最小件数
...@@ -1168,16 +1199,25 @@ export default { ...@@ -1168,16 +1199,25 @@ export default {
1168 //提交数据处理 1199 //提交数据处理
1169 setDataHandle(val) { 1200 setDataHandle(val) {
1170 let obj = {} 1201 let obj = {}
1171 - if (val.isLocation) { 1202 + if (val.isLocation && val.isDestinationSite) {
1172 obj = val 1203 obj = val
1173 obj.isLocation == '1' ? obj.notLocation = '' : obj.location = '' 1204 obj.isLocation == '1' ? obj.notLocation = '' : obj.location = ''
1205 + obj.isDestinationSite == '1' ? obj.notDestinationSite = '' : obj.destinationSite = ''
1206 +
1207 + if (obj.location && obj.location.length != 0) {
1208 + obj.location = obj.location.toUpperCase()
1209 + }
1174 1210
1175 if (obj.notLocation && obj.notLocation.length != 0) { 1211 if (obj.notLocation && obj.notLocation.length != 0) {
1176 obj.notLocation = obj.notLocation.toUpperCase() 1212 obj.notLocation = obj.notLocation.toUpperCase()
1177 } 1213 }
1178 1214
1179 - if (obj.location && obj.location.length != 0) { 1215 + if (obj.destinationSite && obj.destinationSite.length != 0) {
1180 - obj.location = obj.location.toUpperCase() 1216 + obj.destinationSite = obj.destinationSite.toUpperCase()
1217 + }
1218 +
1219 + if (obj.notDestinationSite && obj.notDestinationSite.length != 0) {
1220 + obj.notDestinationSite = obj.notDestinationSite.toUpperCase()
1181 } 1221 }
1182 1222
1183 if (obj.includeUrsa && obj.includeUrsa.length != 0) { 1223 if (obj.includeUrsa && obj.includeUrsa.length != 0) {
......
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
187 // 总条数 187 // 总条数
188 total: 0, 188 total: 0,
189 //table高度 189 //table高度
190 - tableHeight: null, 190 + tableHeight: 300,
191 // 原航班规则数据 191 // 原航班规则数据
192 sourceFlightRulesList: [], 192 sourceFlightRulesList: [],
193 //目的航班数据 193 //目的航班数据
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
249 } 249 }
250 }, 250 },
251 mounted() { 251 mounted() {
252 - this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 200 252 + // this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 200;
253 }, 253 },
254 activated() { 254 activated() {
255 this.findSourceFlightRules(); 255 this.findSourceFlightRules();
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
99 },//表单规则 99 },//表单规则
100 dialogVisible: false, 100 dialogVisible: false,
101 total: 0, 101 total: 0,
102 - tableHeight: null, 102 + tableHeight: 300,
103 loading: false, 103 loading: false,
104 tableLoading: false, 104 tableLoading: false,
105 }; 105 };
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
113 } 113 }
114 }, 114 },
115 mounted() { 115 mounted() {
116 - this.tableHeight = window.innerHeight - this.$refs.preReviewOptions.offsetHeight - 300 116 + // this.tableHeight = window.innerHeight - this.$refs.preReviewOptions.offsetHeight - 300;
117 }, 117 },
118 methods: { 118 methods: {
119 //搜索 119 //搜索
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 </el-form-item> 23 </el-form-item>
24 </el-col> 24 </el-col>
25 <el-col :span="6"> 25 <el-col :span="6">
26 - <el-form-item label="站点"> 26 + <el-form-item label="始发站">
27 <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable :rows="1"> 27 <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable :rows="1">
28 </el-input> 28 </el-input>
29 </el-form-item> 29 </el-form-item>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
53 }}</el-button> 53 }}</el-button>
54 </div> 54 </div>
55 </el-form> 55 </el-form>
56 - <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> 56 + <el-table max-height="300" highlight-current-row border stripe v-loading="loading" :data="tableData">
57 <el-table-column label="运单号" align="center" prop="waybillNo" /> 57 <el-table-column label="运单号" align="center" prop="waybillNo" />
58 <el-table-column label="申报类别" align="center" prop="typeName" /> 58 <el-table-column label="申报类别" align="center" prop="typeName" />
59 <el-table-column label="件数" align="center" prop="qty" width="70" /> 59 <el-table-column label="件数" align="center" prop="qty" width="70" />
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
106 fltNo: null, 106 fltNo: null,
107 //运单号 107 //运单号
108 waybillNo: "", 108 waybillNo: "",
109 - //站点 109 + //始发站
110 siteName: "", 110 siteName: "",
111 //ursa 111 //ursa
112 ursa: "", 112 ursa: "",
......
...@@ -466,7 +466,7 @@ export default { ...@@ -466,7 +466,7 @@ export default {
466 //总条数 466 //总条数
467 total: 0, 467 total: 0,
468 //表格高度 468 //表格高度
469 - tableHeight: null, 469 + tableHeight: 250,
470 //新增修改查看规则弹出层 470 //新增修改查看规则弹出层
471 open: false, 471 open: false,
472 //是否显示查看目的航班弹出层 472 //是否显示查看目的航班弹出层
...@@ -502,8 +502,7 @@ export default { ...@@ -502,8 +502,7 @@ export default {
502 this.shiftKey = false; 502 this.shiftKey = false;
503 } 503 }
504 }); 504 });
505 - this.tableHeight = 505 + // this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
506 - window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
507 }, 506 },
508 methods: { 507 methods: {
509 //输入航班号后 508 //输入航班号后
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 <el-form-item label="货站名称" prop="goodsStation"> 20 <el-form-item label="货站名称" prop="goodsStation">
21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable 21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
22 :loading="goodsStationLoading" placeholder="不限"> 22 :loading="goodsStationLoading" placeholder="不限">
23 - <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item"> 23 + <el-option v-for="item in goodsStationList" :label="item" :value="item" :key="item">
24 </el-option> 24 </el-option>
25 </el-select> 25 </el-select>
26 </el-form-item> 26 </el-form-item>
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
81 checkData: [], 81 checkData: [],
82 fileList: [], 82 fileList: [],
83 errorData: [], 83 errorData: [],
84 - tableHeight: null, 84 + tableHeight: 300,
85 totalCount: 0, 85 totalCount: 0,
86 openStatus: '', 86 openStatus: '',
87 loading: false, 87 loading: false,
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
92 92
93 }, 93 },
94 mounted() { 94 mounted() {
95 - this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200 95 + // this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200;
96 this.selection(1) 96 this.selection(1)
97 }, 97 },
98 watch: { 98 watch: {
...@@ -244,4 +244,8 @@ export default { ...@@ -244,4 +244,8 @@ export default {
244 244
245 <style lang="scss" scoped> 245 <style lang="scss" scoped>
246 246
247 +<<<<<<< HEAD
247 </style> 248 </style>
249 +=======
250 +</style>
251 +>>>>>>> test
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 <el-form-item label="货站名称" prop="goodsStation"> 20 <el-form-item label="货站名称" prop="goodsStation">
21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable 21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
22 :loading="goodsStationLoading" placeholder="不限"> 22 :loading="goodsStationLoading" placeholder="不限">
23 - <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item"> 23 + <el-option v-for="item in goodsStationList" :label="item" :value="item" :key="item">
24 </el-option> 24 </el-option>
25 </el-select> 25 </el-select>
26 </el-form-item> 26 </el-form-item>
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
81 checkData: [], 81 checkData: [],
82 fileList: [], 82 fileList: [],
83 errorData: [], 83 errorData: [],
84 - tableHeight: null, 84 + tableHeight: 300,
85 totalCount: 0, 85 totalCount: 0,
86 openStatus: '', 86 openStatus: '',
87 loading: false, 87 loading: false,
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
92 92
93 }, 93 },
94 mounted() { 94 mounted() {
95 - this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200 95 + // this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200;
96 this.selection(1) 96 this.selection(1)
97 }, 97 },
98 watch: { 98 watch: {
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
64 tableData: [], 64 tableData: [],
65 tableHeader: this.tableHeaders['goodsStationFlight'], 65 tableHeader: this.tableHeaders['goodsStationFlight'],
66 checkData: [], 66 checkData: [],
67 - tableHeight: null, 67 + tableHeight: 300,
68 totalCount: 0, 68 totalCount: 0,
69 loading: false, 69 loading: false,
70 open: false, 70 open: false,
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
73 created() { 73 created() {
74 }, 74 },
75 mounted() { 75 mounted() {
76 - this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200 76 + // this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200;
77 this.selection(1) 77 this.selection(1)
78 }, 78 },
79 watch: { 79 watch: {
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
53 size: 100 53 size: 100
54 }, 54 },
55 tableHeader: this.tableHeaders['cargoLog'], 55 tableHeader: this.tableHeaders['cargoLog'],
56 - tableHeight: 600, 56 + tableHeight: 300,
57 loading: false 57 loading: false
58 } 58 }
59 }, 59 },
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
58 </el-form-item> 58 </el-form-item>
59 </el-col> 59 </el-col>
60 <el-col :span="6"> 60 <el-col :span="6">
61 - <el-form-item label="站点"> 61 + <el-form-item label="始发站">
62 <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" :rows="4" clearable> 62 <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" :rows="4" clearable>
63 </el-input> 63 </el-input>
64 </el-form-item> 64 </el-form-item>
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
139 </template> 139 </template>
140 <el-select class="formItem" v-model="formData.cargoPlaneRoute" placeholder="不限" 140 <el-select class="formItem" v-model="formData.cargoPlaneRoute" placeholder="不限"
141 :disabled="routeList.length == 0" clearable @change="routeSelectChange" :key="formData.cargoPlaneRoute"> 141 :disabled="routeList.length == 0" clearable @change="routeSelectChange" :key="formData.cargoPlaneRoute">
142 - <el-option v-for="(item, index) in routeList" :label="item" :value="item" :key="item"> 142 + <el-option v-for="item in routeList" :label="item" :value="item" :key="item">
143 <Tooltips :content="item" :refName="item"></Tooltips> 143 <Tooltips :content="item" :refName="item"></Tooltips>
144 </el-option> 144 </el-option>
145 </el-select> 145 </el-select>
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
149 <el-form-item label="预审状态"> 149 <el-form-item label="预审状态">
150 <el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple> 150 <el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple>
151 <el-option v-for="item in findConditionData.preQualificationStatus" :label="item == '' ? '非预审' : item" 151 <el-option v-for="item in findConditionData.preQualificationStatus" :label="item == '' ? '非预审' : item"
152 - :value="item"> </el-option> 152 + :value="item" :key="item"> </el-option>
153 </el-select> 153 </el-select>
154 </el-form-item> 154 </el-form-item>
155 </el-col> 155 </el-col>
...@@ -353,7 +353,7 @@ export default { ...@@ -353,7 +353,7 @@ export default {
353 limitSize: 100, //无限制-1 353 limitSize: 100, //无限制-1
354 page: 1, 354 page: 1,
355 progress: 0, 355 progress: 0,
356 - tableHeight: null, 356 + tableHeight: 250,
357 dialogVisible: false, 357 dialogVisible: false,
358 openView: false, 358 openView: false,
359 openTransfer: false, 359 openTransfer: false,
...@@ -367,7 +367,7 @@ export default { ...@@ -367,7 +367,7 @@ export default {
367 } else { 367 } else {
368 this.tableHeader = this.tableHeaders['cargo'] 368 this.tableHeader = this.tableHeaders['cargo']
369 } 369 }
370 - // this.select(0,'create') 370 + this.select(0,'create')
371 }, 371 },
372 372
373 activated() { 373 activated() {
...@@ -441,7 +441,7 @@ export default { ...@@ -441,7 +441,7 @@ export default {
441 this.shiftKey = false; 441 this.shiftKey = false;
442 } 442 }
443 }); 443 });
444 - this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50 444 + // this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50
445 }, 445 },
446 watch: { 446 watch: {
447 $route: { 447 $route: {
...@@ -489,7 +489,7 @@ export default { ...@@ -489,7 +489,7 @@ export default {
489 } 489 }
490 }, 490 },
491 formShow(val, oldVal) { 491 formShow(val, oldVal) {
492 - this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120 492 + // this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120
493 }, 493 },
494 }, 494 },
495 methods: { 495 methods: {
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
72 { name: "口岸代码", value: "portName", width: "" }, 72 { name: "口岸代码", value: "portName", width: "" },
73 { name: "运单号", value: "waybillNo", width: "" }, 73 { name: "运单号", value: "waybillNo", width: "" },
74 { name: "货物状态", value: "statusName", width: "" }, 74 { name: "货物状态", value: "statusName", width: "" },
75 - { name: "站点", value: "siteName", width: "" }, 75 + { name: "始发站", value: "siteName", width: "" },
76 { name: "申报类型", value: "typeName", width: "" }, 76 { name: "申报类型", value: "typeName", width: "" },
77 { name: "URSA", value: "ursa", width: "" }, 77 { name: "URSA", value: "ursa", width: "" },
78 { name: "实际重量", value: "actualWeight", width: "" }, 78 { name: "实际重量", value: "actualWeight", width: "" },
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
34 </el-form-item> 34 </el-form-item>
35 <el-form-item label="航班种类"> 35 <el-form-item label="航班种类">
36 <el-select v-model="selectData.kindId" placeholder="不限" @change="getFlight" clearable> 36 <el-select v-model="selectData.kindId" placeholder="不限" @change="getFlight" clearable>
37 - <el-option v-for="item in fltKindIdList" :label="item.englishName" :value="item.id"></el-option> 37 + <el-option v-for="item in fltKindIdList" :label="item.englishName" :value="item.id" :key="item.id"></el-option>
38 </el-select> 38 </el-select>
39 </el-form-item> 39 </el-form-item>
40 <el-form-item> 40 <el-form-item>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
42 </el-form-item> 42 </el-form-item>
43 </el-form> 43 </el-form>
44 <el-row class="card2"> 44 <el-row class="card2">
45 - <el-col :span="1" v-for="item in fltBox"> 45 + <el-col :span="1" v-for="item in fltBox" :key="item.fltNo">
46 <div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })" 46 <div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })"
47 :style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }"> 47 :style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
48 <div class="fltName">{{ item.fltNo }}</div> 48 <div class="fltName">{{ item.fltNo }}</div>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
60 <template v-slot:percentage="scope"> 60 <template v-slot:percentage="scope">
61 <el-progress stroke-width="100" 61 <el-progress stroke-width="100"
62 :color="(scope.row.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'" 62 :color="(scope.row.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'"
63 - :stroke-width="18" 63 + :strokeWidth="18"
64 :percentage="scope.row.percentage == 0 ? 0 : Number((scope.row.percentage * 100).toFixed(2))"> 64 :percentage="scope.row.percentage == 0 ? 0 : Number((scope.row.percentage * 100).toFixed(2))">
65 </el-progress> 65 </el-progress>
66 </template> 66 </template>
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
96 totalWeight: 0,//航班总重量 96 totalWeight: 0,//航班总重量
97 allocationWeight: 0,//航班已配重量 97 allocationWeight: 0,//航班已配重量
98 type: "", 98 type: "",
99 - tableHeight: null, 99 + tableHeight: 300,
100 total: 0, 100 total: 0,
101 loading: false, 101 loading: false,
102 }; 102 };
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
109 // this.getFlight() 109 // this.getFlight()
110 // }, 110 // },
111 mounted() { 111 mounted() {
112 - this.tableHeight = window.innerHeight - this.$refs.card1.$el.offsetHeight - this.$refs.indexForm.$el.offsetHeight - 350 112 + // this.tableHeight = window.innerHeight - this.$refs.card1.$el.offsetHeight - this.$refs.indexForm.$el.offsetHeight - 350
113 this.getFlight() 113 this.getFlight()
114 }, 114 },
115 methods: { 115 methods: {
......
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
71 const username = localStorage.getItem("username"); 71 const username = localStorage.getItem("username");
72 const password = localStorage.getItem("password"); 72 const password = localStorage.getItem("password");
73 const rememberMe = localStorage.getItem("rememberMe"); 73 const rememberMe = localStorage.getItem("rememberMe");
74 + // console.log("rememberMe:", rememberMe)
74 this.loginForm = { 75 this.loginForm = {
75 username: username === undefined ? this.loginForm.username : username, 76 username: username === undefined ? this.loginForm.username : username,
76 password: password === undefined ? this.loginForm.password : password, 77 password: password === undefined ? this.loginForm.password : password,
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
56 </Tables> 56 </Tables>
57 </div> 57 </div>
58 </template> 58 </template>
59 -
60 <script> 59 <script>
61 import { 60 import {
62 downLoadTemplate, 61 downLoadTemplate,
...@@ -78,7 +77,7 @@ export default { ...@@ -78,7 +77,7 @@ export default {
78 tableData: [], 77 tableData: [],
79 errorData: [], 78 errorData: [],
80 tableHeaders: this.tableHeaders['flightToArea'], 79 tableHeaders: this.tableHeaders['flightToArea'],
81 - tableHeight: null, 80 + tableHeight: 300,
82 total: 0, 81 total: 0,
83 flightType: [], 82 flightType: [],
84 form: { 83 form: {
...@@ -100,7 +99,7 @@ export default { ...@@ -100,7 +99,7 @@ export default {
100 created() { 99 created() {
101 }, 100 },
102 mounted() { 101 mounted() {
103 - this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170 102 + // this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170;
104 this.selection(1) 103 this.selection(1)
105 }, 104 },
106 activated() { 105 activated() {
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
56 </el-form-item> 56 </el-form-item>
57 </el-col> 57 </el-col>
58 <el-col :span="6"> 58 <el-col :span="6">
59 - <el-form-item label="站点"> 59 + <el-form-item label="始发站">
60 <el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK" 60 <el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
61 :rows="4" clearable> 61 :rows="4" clearable>
62 </el-input> 62 </el-input>
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
131 tableHeader: this.tableHeaders['preMdeSelect'], 131 tableHeader: this.tableHeaders['preMdeSelect'],
132 accsDate: [], 132 accsDate: [],
133 valueFormat: "yyyy-MM-dd", 133 valueFormat: "yyyy-MM-dd",
134 - tableHeight: null, 134 + tableHeight: 250,
135 tableLoading: false, 135 tableLoading: false,
136 downloading: false, 136 downloading: false,
137 totalCount: 0, 137 totalCount: 0,
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
141 this.selectOptionData() 141 this.selectOptionData()
142 }, 142 },
143 mounted() { 143 mounted() {
144 - this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150 144 + // this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150;
145 this.select(0) 145 this.select(0)
146 }, 146 },
147 watch: { 147 watch: {
......
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
58 </Tables> 58 </Tables>
59 </div> 59 </div>
60 </template> 60 </template>
61 -
62 <script> 61 <script>
63 import { 62 import {
64 downLoadTemplate, 63 downLoadTemplate,
...@@ -79,7 +78,7 @@ export default { ...@@ -79,7 +78,7 @@ export default {
79 tableData: [], 78 tableData: [],
80 errorData: [], 79 errorData: [],
81 tableHeaders: this.tableHeaders['ursaToArea'], 80 tableHeaders: this.tableHeaders['ursaToArea'],
82 - tableHeight: null, 81 + tableHeight: 300,
83 total: 0, 82 total: 0,
84 flightType: [], 83 flightType: [],
85 form: { 84 form: {
...@@ -101,7 +100,7 @@ export default { ...@@ -101,7 +100,7 @@ export default {
101 created() { 100 created() {
102 }, 101 },
103 mounted() { 102 mounted() {
104 - this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170 103 + // this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170;
105 this.selection(1) 104 this.selection(1)
106 }, 105 },
107 activated() { 106 activated() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 <el-card style="margin-bottom:10px"> 3 <el-card style="margin-bottom:10px">
4 <!-- cardHeader --> 4 <!-- cardHeader -->
5 <div slot="header" class="clearfix"> 5 <div slot="header" class="clearfix">
6 - <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' : 6 + <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '始发站' :
7 tableName == 7 tableName ==
8 '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" 8 '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
9 }}</span> 9 }}</span>
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
199 addDictionary: {},//选择数据 199 addDictionary: {},//选择数据
200 nowSelect: [], 200 nowSelect: [],
201 tableName: '', 201 tableName: '',
202 - tableHeight: null, 202 + tableHeight: 300,
203 total: 0, 203 total: 0,
204 status: null, 204 status: null,
205 loading: false, 205 loading: false,
...@@ -215,7 +215,17 @@ export default { ...@@ -215,7 +215,17 @@ export default {
215 // } 215 // }
216 }, 216 },
217 mounted() { 217 mounted() {
218 - this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270 218 + // this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270
219 + },
220 + filters: {
221 + // 是否为ET86航线
222 + isEtesRoute(val) {
223 + if(val == "N"){
224 + return "否"
225 + }else{
226 + return "是"
227 + }
228 + },
219 }, 229 },
220 watch: { 230 watch: {
221 tableName(val, oldVal) { 231 tableName(val, oldVal) {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
34 :limitSize="formData.size" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :loading="tableLoading" 34 :limitSize="formData.size" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :loading="tableLoading"
35 :height="tableHeight" @sizeChange="sizeChange" @currentChange="currentChange"> 35 :height="tableHeight" @sizeChange="sizeChange" @currentChange="currentChange">
36 <template slot="optionColumn"> 36 <template slot="optionColumn">
37 - <el-table-column header-align="center" align="center" label="操作"> 37 + <el-table-column header-align="center" align="left" label="操作" min-width="210px">
38 <template slot-scope="scope"> 38 <template slot-scope="scope">
39 <el-button type="primary" size="mini" @click="buttonClick(scope, 0)">查看</el-button> 39 <el-button type="primary" size="mini" @click="buttonClick(scope, 0)">查看</el-button>
40 <el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:role:update']">修改 40 <el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:role:update']">修改
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
42 <el-button :type="scope.row.valid == 1 ? 'warning' : 'primary'" size="mini" 42 <el-button :type="scope.row.valid == 1 ? 'warning' : 'primary'" size="mini"
43 v-hasPermi="['system:role:openClose']" @click="roleStatus(scope)">{{ scope.row.valid == 1 ? "停用" : "启用" }} 43 v-hasPermi="['system:role:openClose']" @click="roleStatus(scope)">{{ scope.row.valid == 1 ? "停用" : "启用" }}
44 </el-button> 44 </el-button>
45 - <el-button type="danger" size="mini" @click="removeRole(scope)" v-hasPermi="['system:role:delete']">删除角色 45 + <el-button type="danger" size="mini" @click="removeRole(scope)" v-hasPermi="['system:role:delete']" style="margin-top: 5px;margin-left: 0;">删除角色
46 </el-button> 46 </el-button>
47 </template> 47 </template>
48 </el-table-column> 48 </el-table-column>
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
85 roleFormDisabled: false, 85 roleFormDisabled: false,
86 tableLoading: false, 86 tableLoading: false,
87 total: 0, 87 total: 0,
88 - tableHeight: null 88 + tableHeight: 300
89 }; 89 };
90 }, 90 },
91 created() { 91 created() {
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
94 } 94 }
95 }, 95 },
96 mounted() { 96 mounted() {
97 - this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250 97 + // this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250
98 }, 98 },
99 activated() { 99 activated() {
100 this.selectRoleList(); 100 this.selectRoleList();
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
32 :loading="loading" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :height="tableHeight" 32 :loading="loading" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :height="tableHeight"
33 @sizeChange="sizeChange" @currentChange="currentChange"> 33 @sizeChange="sizeChange" @currentChange="currentChange">
34 <template slot="optionColumn"> 34 <template slot="optionColumn">
35 - <el-table-column header-align="center" align="center" width="auto" label="操作"> 35 + <el-table-column header-align="center" align="left" min-width="210px" label="操作">
36 <template slot-scope="scope"> 36 <template slot-scope="scope">
37 <el-button type="primary" size="mini" @click="buttonClick(scope, 0)">查看</el-button> 37 <el-button type="primary" size="mini" @click="buttonClick(scope, 0)">查看</el-button>
38 <el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:user:update']">修改 38 <el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:user:update']">修改
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
112 drawerTitle: "", 112 drawerTitle: "",
113 total: 0, 113 total: 0,
114 loading: false, 114 loading: false,
115 - tableHeight: null 115 + tableHeight: 300
116 }; 116 };
117 }, 117 },
118 created() { 118 created() {
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
121 } 121 }
122 }, 122 },
123 mounted() { 123 mounted() {
124 - this.tableHeight = window.innerHeight - this.$refs.selectionUserForm.$el.offsetHeight - 250 124 + // this.tableHeight = window.innerHeight - this.$refs.selectionUserForm.$el.offsetHeight - 250;
125 }, 125 },
126 activated() { 126 activated() {
127 this.selectUser(); 127 this.selectUser();
......
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
55 }, 55 },
56 data: [], 56 data: [],
57 tableHeader: this.tableHeaders['archiveData'], 57 tableHeader: this.tableHeaders['archiveData'],
58 - tableHeight: null, 58 + tableHeight: 300,
59 total: 0, 59 total: 0,
60 loading: false, 60 loading: false,
61 } 61 }
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
64 this.selectLog() 64 this.selectLog()
65 }, 65 },
66 mounted() { 66 mounted() {
67 - this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200 67 + // this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200
68 }, 68 },
69 methods: { 69 methods: {
70 selectLog(val) { 70 selectLog(val) {
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
115 selectDate: null, 115 selectDate: null,
116 createTimes: [], 116 createTimes: [],
117 total: 0, 117 total: 0,
118 - tableHeight: null, 118 + tableHeight: 300,
119 loading: false, 119 loading: false,
120 valueFormat: "yyyy-MM-dd", 120 valueFormat: "yyyy-MM-dd",
121 }; 121 };
...@@ -130,8 +130,7 @@ export default { ...@@ -130,8 +130,7 @@ export default {
130 this.data = []; 130 this.data = [];
131 }, 131 },
132 mounted() { 132 mounted() {
133 - this.tableHeight = 133 + // this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
134 - window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
135 }, 134 },
136 methods: { 135 methods: {
137 //数据查询 136 //数据查询
......
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
96 children: 'children', 96 children: 'children',
97 label: 'label' 97 label: 'label'
98 }, 98 },
99 - tableHeight: null, 99 + tableHeight: 300,
100 total: 0, 100 total: 0,
101 loading: false 101 loading: false
102 } 102 }
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
109 this.selectLog(); 109 this.selectLog();
110 }, 110 },
111 mounted() { 111 mounted() {
112 - this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240 112 + // this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240
113 }, 113 },
114 methods: { 114 methods: {
115 getModule() { 115 getModule() {
......
1 +//version:0.5.3
1 'use strict' 2 'use strict'
2 const path = require('path') 3 const path = require('path')
3 const defaultSettings = require('./src/settings.js') 4 const defaultSettings = require('./src/settings.js')
...@@ -34,7 +35,7 @@ module.exports = { ...@@ -34,7 +35,7 @@ module.exports = {
34 proxy: { 35 proxy: {
35 // detail: https://cli.vuejs.org/config/#devserver-proxy 36 // detail: https://cli.vuejs.org/config/#devserver-proxy
36 [process.env.VUE_APP_BASE_API]: { 37 [process.env.VUE_APP_BASE_API]: {
37 - target: defaultSettings.baseURL, 38 + target: defaultSettings.baseURL, //阿里云服务器
38 changeOrigin: true, 39 changeOrigin: true,
39 pathRewrite: { 40 pathRewrite: {
40 ['^' + process.env.VUE_APP_BASE_API]: '' 41 ['^' + process.env.VUE_APP_BASE_API]: ''
......