Elements-SY

Merge branch 'et86' into 2023-08-14

Showing 41 changed files with 1507 additions and 168 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": {
......
This diff is collapsed. Click to expand it.
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
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 + loadingTable: {
86 + type: Boolean,
87 + default: false,
88 + },
89 + columns: {
90 + type: Array,
91 + default: () => [],
92 + },
93 + tableData: {
94 + type: Array,
95 + default: () => [],
96 + required: true,
97 + },
98 + pageConfig: {
99 + type: Object,
100 + default: {
101 + isPagination: true,
102 + },
103 + required: true,
104 + },
105 + },
106 + components: {
107 + column,
108 + },
109 + data() {
110 + return {
111 + dropCol: objectMerge({}, this.columns),
112 + trHeight: 4,
113 + };
114 + },
115 + computed: {
116 + _attrs() {
117 + //默认table 参数
118 + const defaultParams = {};
119 + return Object.assign(defaultParams, this.attrs);
120 + },
121 + isHasAttr() {},
122 + },
123 + created() {
124 + if (this.attrs.isDragSort) {
125 + // 有没有复选框、有没有render
126 + // this.columns
127 + }
128 + },
129 + mounted() {
130 + this.getTrCurrentHeight();
131 + window.addEventListener("resize", this.getTrCurrentHeight);
132 + //阻止火狐拖拽新建新页面
133 + document.body.addEventListener(
134 + "drop",
135 + (event) => {
136 + event.preventDefault();
137 + event.stopPropagation();
138 + },
139 + false
140 + );
141 + // 拖拽行更新排序
142 + // this.rowDrop();
143 + // 拖拽列更新排序
144 + this.columnDrop();
145 + },
146 + destroyed() {
147 + window.removeEventListener("resize", this.getTrCurrentHeight);
148 + },
149 +
150 + methods: {
151 + getTrCurrentHeight: debounce(function () {
152 + this.$nextTick(() => {
153 + const trEl =
154 + this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1]
155 + .children[0].clientHeight;
156 + this.trHeight = trEl;
157 + // console.log(this);
158 + });
159 + }, 800),
160 +
161 + // 给表头列添加className
162 + headerCellClassName({ row, column, rowIndex, columnIndex }) {
163 + if (columnIndex !== 0) {
164 + return "el-table_1_column";
165 + }
166 + },
167 + useTableFunc(FuncName, ...params) {
168 + if (!this.$refs["el-table"]) {
169 + return console.warn("访问不到el-table");
170 + }
171 + if (!FuncName) {
172 + return console.error("请传入tabel方法名字");
173 + }
174 + this.$refs["el-table"][FuncName](params[0]);
175 + },
176 + // table复选框事件
177 + selectionChange(e) {
178 + console.log(e);
179 + this.$emit("selectionEvent", e);
180 + },
181 + // 条数变化
182 + handleSizeChange(e) {
183 + this.$emit("sizeChange", e);
184 + },
185 + // 页码变化
186 + handleCurrentChange(e) {
187 + this.$emit("currentChange", e);
188 + },
189 + // btn点击事件注册
190 + handleClick(item) {
191 + this.$emit(item.event, item);
192 + },
193 + // 拖拽行更新排序
194 + rowDrop() {
195 + const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
196 + console.log("wrapperTr:", wrapperTr);
197 + this.sortable = Sortable.create(wrapperTr, {
198 + sort: this.attrs.isDragSort,
199 + animation: 100,
200 + delay: 0,
201 + handle: ".move", // 只有带move类名的元素才能拖动,多选框禁止拖动
202 + onEnd: (evt) => {
203 + // 因为手动加了一个多选框, 不在表头循环数组内, 所以这里减1
204 + let oldIndx = evt.oldIndex - 1;
205 + let newIndx = evt.newIndex - 1;
206 + const oldItem = this.dropCol[oldIndx];
207 + // 真正改变列数据--变化列头,就能实现列拖动 列数据按列头索引取值 {{ scope.row[dropCol[index].prop] }}
208 + this.dropCol.splice(oldIndx, 1); // 删除旧一行 删除为1
209 + this.dropCol.splice(newIndx, 0, oldItem); // 插入新一行 插入为0
210 + },
211 + });
212 + },
213 + // 拖拽列更新排序
214 + columnDrop() {
215 + const tbody = document.querySelector(".el-table__body-wrapper tbody");
216 + const _this = this;
217 + Sortable.create(tbody, {
218 + sort: this.attrs.isDragSort,
219 + animation: 100,
220 + delay: 0,
221 + onEnd({ newIndex, oldIndex }) {
222 + console.log("onEnd:", newIndex, oldIndex);
223 + const currRow = _this.tableData.splice(oldIndex, 1)[0];
224 + _this.tableData.splice(newIndex, 0, currRow);
225 + },
226 + });
227 + },
228 + },
229 + watch: {
230 + data() {
231 + this.$nextTick(() => {
232 + this.useTableFunc("doLayout");
233 + });
234 + },
235 + },
236 +};
237 +</script>
238 +<style lang="scss">
239 +
240 +</style>
...@@ -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
......
...@@ -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 { 42 {
43 - path: '/login', 43 + path: "/login",
44 - component: (resolve) => require(['@/views/login'], resolve), 44 + component: (resolve) => require(["@/views/login"], resolve),
45 - hidden: true 45 + hidden: true,
46 }, 46 },
47 { 47 {
48 - path: '/404', 48 + path: "/404",
49 - component: (resolve) => require(['@/views/error/404'], resolve), 49 + component: (resolve) => require(["@/views/error/404"], resolve),
50 - hidden: true 50 + hidden: true,
51 }, 51 },
52 { 52 {
53 - path: '/401', 53 + path: "/401",
54 - component: (resolve) => require(['@/views/error/401'], resolve), 54 + component: (resolve) => require(["@/views/error/401"], resolve),
55 - hidden: true 55 + hidden: true,
56 }, 56 },
57 { 57 {
58 - path: '', 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,110 +10,133 @@ const permission = { ...@@ -10,110 +10,133 @@ 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;
33 }, 35 },
34 SET_FILGHTALL: (state, data) => { 36 SET_FILGHTALL: (state, data) => {
35 let name = data.name; 37 let name = data.name;
36 state.filghtAllData[name] = data.data; 38 state.filghtAllData[name] = data.data;
37 }, 39 },
38 REMOVE_FILGHTALL: (state, name) => { 40 REMOVE_FILGHTALL: (state, name) => {
39 - delete state.filghtAllData[name] 41 + delete state.filghtAllData[name];
40 - } 42 + },
41 }, 43 },
42 actions: { 44 actions: {
43 // 生成路由 45 // 生成路由
44 GenerateRoutes({ commit }) { 46 GenerateRoutes({ commit }) {
45 - return new Promise(resolve => { 47 + return new Promise((resolve) => {
46 // 向后端请求路由数据 48 // 向后端请求路由数据
47 - getRouters().then(res => { 49 + getRouters().then((res) => {
50 + const newUrl = {
51 + id: 24,
52 + name: "et86",
53 + path: "/et86",
54 + hidden: false,
55 + component: "allocationConfig/et86",
56 + meta: {
57 + title: "ET86",
58 + icon: "edit",
59 + permissions: "allocation:rand:list",
60 + noCache: false,
61 + },
62 + alwaysShow: false,
63 + children: null,
64 + };
65 + res.data.map((item) => {
66 + if (item.name == "AllocationConfig") {
67 + item.children.push(newUrl);
68 + }
69 + });
48 res.data = hasPermi.routerPer(res.data); 70 res.data = hasPermi.routerPer(res.data);
49 - const sdata = JSON.parse(JSON.stringify(res.data)) 71 + const sdata = JSON.parse(JSON.stringify(res.data));
50 - const rdata = JSON.parse(JSON.stringify(res.data)) 72 + const rdata = JSON.parse(JSON.stringify(res.data));
51 - const sidebarRoutes = filterAsyncRouter(sdata) 73 + const sidebarRoutes = filterAsyncRouter(sdata);
52 - const rewriteRoutes = filterAsyncRouter(rdata, false, true) 74 + const rewriteRoutes = filterAsyncRouter(rdata, false, true);
53 - rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) 75 + rewriteRoutes.push({ path: "*", redirect: "/404", hidden: true });
54 - commit('SET_ROUTES', rewriteRoutes) 76 + commit("SET_ROUTES", rewriteRoutes);
55 - commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes)) 77 + commit("SET_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes));
56 - commit('SET_DEFAULT_ROUTES', sidebarRoutes) 78 + commit("SET_DEFAULT_ROUTES", sidebarRoutes);
57 - commit('SET_TOPBAR_ROUTES', sidebarRoutes) 79 + commit("SET_TOPBAR_ROUTES", sidebarRoutes);
58 - resolve(rewriteRoutes) 80 + resolve(rewriteRoutes);
59 - }) 81 + });
60 - }) 82 + });
61 - } 83 + },
62 - } 84 + },
63 -} 85 +};
64 86
65 // 遍历后台传来的路由字符串,转换为组件对象 87 // 遍历后台传来的路由字符串,转换为组件对象
66 function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { 88 function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
67 - return asyncRouterMap.filter(route => { 89 + return asyncRouterMap.filter((route) => {
68 if (type && route.children) { 90 if (type && route.children) {
69 - route.children = filterChildren(route.children) 91 + route.children = filterChildren(route.children);
70 } 92 }
71 if (route.component) { 93 if (route.component) {
72 // Layout ParentView 组件特殊处理 94 // Layout ParentView 组件特殊处理
73 - if (route.component === 'Layout') { 95 + if (route.component === "Layout") {
74 - route.component = Layout 96 + route.component = Layout;
75 - } else if (route.component === 'ParentView') { 97 + } else if (route.component === "ParentView") {
76 - route.component = ParentView 98 + route.component = ParentView;
77 } else { 99 } else {
78 - route.component = loadView(route.component) 100 + route.component = loadView(route.component);
79 } 101 }
80 } 102 }
81 if (route.children != null && route.children && route.children.length) { 103 if (route.children != null && route.children && route.children.length) {
82 - route.children = filterAsyncRouter(route.children, route, type) 104 + route.children = filterAsyncRouter(route.children, route, type);
83 } else { 105 } else {
84 - delete route['children'] 106 + delete route["children"];
85 - delete route['redirect'] 107 + delete route["redirect"];
86 } 108 }
87 - return true 109 + return true;
88 - }) 110 + });
89 } 111 }
90 112
91 function filterChildren(childrenMap, lastRouter = false) { 113 function filterChildren(childrenMap, lastRouter = false) {
92 - var children = [] 114 + var children = [];
93 childrenMap.forEach((el, index) => { 115 childrenMap.forEach((el, index) => {
94 if (el.children && el.children.length) { 116 if (el.children && el.children.length) {
95 - if (el.component === 'ParentView') { 117 + if (el.component === "ParentView") {
96 - el.children.forEach(c => { 118 + el.children.forEach((c) => {
97 - c.path = el.path + '/' + c.path 119 + c.path = el.path + "/" + c.path;
98 if (c.children && c.children.length) { 120 if (c.children && c.children.length) {
99 - children = children.concat(filterChildren(c.children, c)) 121 + children = children.concat(filterChildren(c.children, c));
100 - return 122 + return;
101 } 123 }
102 - children.push(c) 124 + children.push(c);
103 - }) 125 + });
104 - return 126 + return;
105 } 127 }
106 } 128 }
107 if (lastRouter) { 129 if (lastRouter) {
108 - el.path = lastRouter.path + '/' + el.path 130 + el.path = lastRouter.path + "/" + el.path;
109 } 131 }
110 - children = children.concat(el) 132 + children = children.concat(el);
111 - }) 133 + });
112 - return children 134 + return children;
113 } 135 }
114 136
115 -export const loadView = (view) => { // 路由懒加载 137 +export const loadView = (view) => {
116 - return (resolve) => require([`@/views/${view}`], resolve) 138 + // 路由懒加载
117 -} 139 + return (resolve) => require([`@/views/${view}`], resolve);
140 +};
118 141
119 -export default permission 142 +export default permission;
......
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 +
...@@ -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 //查询条件
...@@ -589,4 +589,4 @@ export default { ...@@ -589,4 +589,4 @@ export default {
589 margin-top: 0px; 589 margin-top: 0px;
590 } 590 }
591 } 591 }
592 -</style>
...\ No newline at end of file ...\ No newline at end of file
592 +</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 +<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 +];
This diff is collapsed. Click to expand it.
1 +export const validateRules = {
2 + methods: {
3 + // 最小重量
4 + validateMinWeight(name) {
5 + if (/^(0|[1-9]\d*)(.\d{1,3})?$/.test(Number(this.queryForm[name]))) {
6 + // 最小重量大于0小于100,并且最小重量小于最大重量
7 + if (
8 + Number(this.queryForm[name]) >= 0 &&
9 + Number(this.queryForm[name]) < 100 &&
10 + Number(this.queryForm[name]) < Number(this.queryForm.maxWeight)
11 + ) {
12 + this.$refs.minWeight.innerHTML = "";
13 + return true;
14 + } else {
15 + this.$refs.maxWeight.innerHTML = "";
16 + this.$refs.minWeight.innerHTML =
17 + "最小重量大于0小于100,并且最小重量小于最大重量";
18 + return false;
19 + }
20 + } else {
21 + this.$refs.maxWeight.innerHTML = "";
22 + this.$refs.minWeight.innerHTML = "请输入正整数,小数保留3位";
23 + return false;
24 + }
25 + },
26 + // 最大重量
27 + validateMaxWeight(name) {
28 + // 最大重量
29 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm[name]))) {
30 + // 最大重量大于0小于100,并且最大重量大于最小重量
31 + if (
32 + Number(this.queryForm[name]) >= 0 &&
33 + Number(this.queryForm[name]) < 100 &&
34 + Number(this.queryForm[name]) > Number(this.queryForm.minWeight)
35 + ) {
36 + this.$refs.maxWeight.innerHTML = "";
37 + return true;
38 + } else {
39 + this.$refs.minWeight.innerHTML = "";
40 + this.$refs.maxWeight.innerHTML =
41 + "最大重量大于0小于100,并且最大重量大于最小重量";
42 + return false;
43 + }
44 + } else {
45 + this.$refs.minWeight.innerHTML = "";
46 + this.$refs.maxWeight.innerHTML = "请输入正整数,小数保留3位";
47 + return false;
48 + }
49 + },
50 + // 最少件数
51 + validateMinPieces(name) {
52 + if (/^\d+$/.test(Number(this.queryForm[name]))) {
53 + if (
54 + Number(this.queryForm[name]) >= 0 &&
55 + Number(this.queryForm[name]) < 100 &&
56 + Number(this.queryForm[name]) < Number(this.queryForm.maxNumOfPieces)
57 + ) {
58 + // 最少件数 大于0小于100并且最少件数小于最多件数
59 + this.$refs.minNumOfPieces.innerHTML = "";
60 + return true;
61 + } else {
62 + this.$refs.maxNumOfPieces.innerHTML = "";
63 + this.$refs.minNumOfPieces.innerHTML =
64 + "最少件数 大于0小于100并且最少件数小于最多件数";
65 + }
66 + } else {
67 + this.$refs.maxNumOfPieces.innerHTML = "";
68 + this.$refs.minNumOfPieces.innerHTML = "请输入有效件数";
69 + return false;
70 + }
71 + },
72 + // 最多件数
73 + validateMaxPieces(name) {
74 + if (/^\d+$/.test(Number(this.queryForm[name]))) {
75 + if (
76 + Number(this.queryForm[name]) >= 0 &&
77 + Number(this.queryForm[name]) < 100 &&
78 + Number(this.queryForm[name]) > Number(this.queryForm.minNumOfPieces)
79 + ) {
80 + // 最少件数 大于0小于100并且最少件数小于最多件数
81 + this.$refs.maxNumOfPieces.innerHTML = "";
82 + return true;
83 + } else {
84 + this.$refs.minNumOfPieces.innerHTML = "";
85 + this.$refs.maxNumOfPieces.innerHTML =
86 + "最多件数 大于0小于100并且最少件数小于最多件数";
87 + }
88 + } else {
89 + this.$refs.minNumOfPieces.innerHTML = "";
90 + this.$refs.maxNumOfPieces.innerHTML = "请输入有效件数";
91 + return false;
92 + }
93 + },
94 +
95 + // 最小申报价值
96 + validateMinCustomVal(name) {
97 + // 申报价值
98 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm[name]))) {
99 + if (
100 + this.queryForm.customVal == "USD" ||
101 + this.queryForm.customVal == "美元"
102 + ) {
103 + // 申报价值(美元)0~600
104 + if (
105 + Number(this.queryForm[name]) >= 0 &&
106 + Number(this.queryForm[name]) < 600 &&
107 + Number(this.queryForm[name]) < Number(this.queryForm.maxCustomVal)
108 + ) {
109 + // 最小申报价值大于0小于600,并且最小申报价值小于最大申报价值
110 + this.$refs.minCustomVal.innerHTML = "";
111 + return true;
112 + } else {
113 + this.$refs.maxCustomVal.innerHTML = "";
114 + this.$refs.minCustomVal.innerHTML = `申报价值(美元)0~600`;
115 + return false;
116 + }
117 + } else {
118 + // 申报价值(人民币)0~2000
119 + if (
120 + Number(this.queryForm[name]) >= 0 &&
121 + Number(this.queryForm[name]) < 2000 &&
122 + Number(this.queryForm[name]) < Number(this.queryForm.maxCustomVal)
123 + ) {
124 + // 最大申报价值大于0小于2000,并且最大申报价值大于最小申报价值
125 + this.$refs.minCustomVal.innerHTML = "";
126 + return true;
127 + } else {
128 + this.$refs.maxCustomVal.innerHTML = "";
129 + this.$refs.minCustomVal.innerHTML = `申报价值(人民币)0~2000`;
130 + return false;
131 + }
132 + }
133 + } else {
134 + this.$refs.maxCustomVal.innerHTML = "";
135 + this.$refs.minCustomVal.innerHTML = "请输入正确申报价值";
136 + return false;
137 + }
138 + },
139 + // 最大申报价值
140 + validateMaxCustomVal(name) {
141 + // 申报价值
142 + if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(Number(this.queryForm[name]))) {
143 + if (
144 + this.queryForm.customVal == "USD" ||
145 + this.queryForm.customVal == "美元"
146 + ) {
147 + // 申报价值(美元)0~600
148 + if (
149 + Number(this.queryForm[name]) >= 0 &&
150 + Number(this.queryForm[name]) < 600 &&
151 + Number(this.queryForm[name]) > Number(this.queryForm.minCustomVal)
152 + ) {
153 + // 最小申报价值大于0小于600,并且最小申报价值小于最大申报价值
154 + this.$refs.maxCustomVal.innerHTML = "";
155 + return true;
156 + } else {
157 + this.$refs.minCustomVal.innerHTML = "";
158 + this.$refs.maxCustomVal.innerHTML = `申报价值(美元)0~600`;
159 + return false;
160 + }
161 + } else {
162 + // 申报价值(人民币)0~2000
163 + if (
164 + Number(this.queryForm[name]) >= 0 &&
165 + Number(this.queryForm[name]) < 2000 &&
166 + Number(this.queryForm[name]) > Number(this.queryForm.minCustomVal)
167 + ) {
168 + // 最大申报价值大于0小于2000,并且最大申报价值大于最小申报价值
169 + this.$refs.maxCustomVal.innerHTML = "";
170 + return true;
171 + } else {
172 + this.$refs.minCustomVal.innerHTML = "";
173 + this.$refs.maxCustomVal.innerHTML = `申报价值(人民币)0~2000`;
174 + return false;
175 + }
176 + }
177 + } else {
178 + this.$refs.minCustomVal.innerHTML = "";
179 + this.$refs.maxCustomVal.innerHTML = "请输入正确申报价值";
180 + return false;
181 + }
182 + },
183 + },
184 +};
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", // text、primary、danger
11 + // icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right
12 + // btnName: "搜索",
13 + // size: "mini", // medium / small / mini
14 + // round: false,
15 + // loading: false,
16 + // event: "search",
17 + // },
18 + {
19 + type: "primary",
20 + icon: "el-icon-plus",
21 + btnName: "添加",
22 + size: "mini",
23 + round: false,
24 + loading: false,
25 + event: "add",
26 + },
27 + // {
28 + // type: "danger",
29 + // icon: "el-icon-delete",
30 + // btnName: "删除",
31 + // size: "mini",
32 + // round: false,
33 + // loading: false,
34 + // event: "delete",
35 + // },
36 + ],
37 + },
38 +};
39 +
40 +export const columnHeader = (deleteRow) => [
41 + {
42 + label: "航班号",
43 + prop: "fltNo",
44 + align: "center",
45 + minWidth: 100,
46 + },
47 + {
48 + label: "航班日期",
49 + prop: "fltNoDate",
50 + align: "center",
51 + minWidth: 100,
52 + // sortable: true,
53 + // "sort-method": (a, b) => b.updateTime - a.updateTime,
54 + },
55 + {
56 + label: "航线优先级",
57 + prop: "fltRoute",
58 + align: "center",
59 + minWidth: 100,
60 + },
61 + {
62 + label: "爆仓是否继续配舱",
63 + prop: "isOn",
64 + align: "center",
65 + minWidth: 100,
66 + render: (h, params) => {
67 + const { row } = params;
68 + console.log(345678,row);
69 + // return h("div", `状态-${row.id}`);
70 + },
71 + },
72 + {
73 + label: "操作",
74 + align: "center",
75 + minWidth: 120,
76 + render: (h, params) => {
77 + return h("div", [
78 + h(
79 + "el-button",
80 + {
81 + style: {
82 + color: "#ff4949",
83 + },
84 + props: {
85 + type: "text",
86 + size: "mini",
87 + icon: "el-icon-delete",
88 + },
89 + on: {
90 + click() {
91 + deleteRow(params);
92 + },
93 + },
94 + },
95 + "删除"
96 + ),
97 + ]);
98 + },
99 + },
100 +];
101 +
102 +export const tableData = [
103 + {
104 + id: "1",
105 + fltNo: "A380",
106 + fltNoDate: "3",
107 + fltRoute: "CAN",
108 + isOn: "1",
109 + sort: "1", // 排序字段
110 + },
111 +];
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 + rules: { required: true, message: "请选择状态", trigger: "blur" },
26 + options: {
27 + data: [
28 + {
29 + value: "1",
30 + label: "新增",
31 + },
32 + {
33 + value: "2",
34 + label: "修改",
35 + },
36 + {
37 + value: "3",
38 + label: "删除",
39 + },
40 + ],
41 + label: "",
42 + value: "",
43 + },
44 + },
45 +];
46 +
47 +export const editFormConfig = [
48 + {
49 + label: "航班号",
50 + type: "Search",
51 + name: "route",
52 + prop: "fltNo",
53 + placeholder: "请输入航班号",
54 + rules: {
55 + required: true,
56 + message: "请输入航班号",
57 + trigger: ["change", "blur"],
58 + },
59 + http: {
60 + url: "/dictionary/queryRouteByFltNo",
61 + method: "post",
62 + data: {
63 + fltNo: "",
64 + },
65 + },
66 + },
67 + {
68 + label: "",
69 + type: "inputNumber",
70 + name: "count",
71 + prop: "count",
72 + placeholder: "+",
73 + min: 0,
74 + max: 7,
75 + with: "50px",
76 + },
77 + {
78 + label: "航线优先级",
79 + type: "Input",
80 + name: "route",
81 + prop: "fltNum",
82 + placeholder: "请选择航线优先级",
83 + trigger: "focus",
84 + },
85 + {
86 + label: "爆仓是否继续配舱",
87 + type: "Checkbox",
88 + name: "checked",
89 + prop: "checked",
90 + disabled: false,
91 + },
92 +];
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 + @upload="uploadBtn"
26 + @download="downloadBtn"
27 + >
28 + </yl-table>
29 + </div>
30 +</template>
31 +<script>
32 +import YlForm from "@/components/YlForm";
33 +import YlTable from "@/components/YlTable";
34 +import { formConfig } from "./formConfig";
35 +import { debounce } from "@/utils";
36 +import { tableAttr, columnHeader, tableData } from "./tableConfig";
37 +import {
38 + allDictData, // 获取全部字典
39 + queryRouteByFltNo, // 航线查询
40 +} from "@/api/destinationFlight";
41 +export default {
42 + components: {
43 + YlForm,
44 + YlTable,
45 + },
46 + data() {
47 + return {
48 + formConfig: formConfig, // 表单配置项
49 + queryForm: {}, // 表单参数
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.editRow, this.deleteRow, this.viewRow), // 表头
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 + uploadBtn(item) {
139 + console.log("upload:", item);
140 + },
141 + // 导出
142 + downloadBtn(item) {
143 + console.log("download:", item);
144 + },
145 + // 编辑
146 + editRow(item) {
147 + this.$router.push({
148 + name: "edit",
149 + params: {
150 + edit: 12,
151 + },
152 + });
153 + console.log("修改:", item);
154 + },
155 + // 删除
156 + deleteRow(item) {
157 + this.$confirm("是否允许删除?", "提示", {
158 + confirmButtonText: "确定",
159 + cancelButtonText: "取消",
160 + type: "warning",
161 + center: true,
162 + })
163 + .then(() => {
164 + console.log("删除:", item);
165 + this.$message({
166 + type: "success",
167 + message: "删除成功!",
168 + });
169 + })
170 + .catch(() => {
171 + this.$message({
172 + type: "info",
173 + message: "已取消删除",
174 + });
175 + });
176 + },
177 + // 查看
178 + viewRow({ row }) {
179 + this.$router.push({
180 + name: "edit",
181 + params: {
182 + edit: 12,
183 + },
184 + });
185 + console.log("查看:", row);
186 + },
187 + },
188 +};
189 +</script>
190 +<style lang="scss" scoped></style>
1 +const state = {
2 + 1: "新增",
3 + 2: "修改",
4 + 3: "删除",
5 +};
6 +export const tableAttr = {
7 + border: true,
8 + loadingTable: false,
9 + isDragSort: false, // 拖拽tableData数据一定要加id字段
10 + maxHeight: 300,
11 + btnCofig: {
12 + isBtn: true,
13 + btnGroup: [
14 + {
15 + type: "primary", // text、primary、danger
16 + icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right
17 + btnName: "搜索",
18 + size: "mini", // medium / small / mini
19 + round: false,
20 + loading: false,
21 + event: "search",
22 + },
23 + {
24 + type: "info",
25 + icon: "",
26 + btnName: "重置",
27 + size: "mini",
28 + round: false,
29 + loading: false,
30 + event: "restForm",
31 + },
32 + {
33 + type: "primary",
34 + icon: "el-icon-plus",
35 + btnName: "添加",
36 + size: "mini",
37 + round: false,
38 + loading: false,
39 + event: "add",
40 + },
41 + {
42 + type: "primary",
43 + icon: "el-icon-upload",
44 + btnName: "上传",
45 + size: "mini",
46 + round: false,
47 + loading: false,
48 + event: "upload",
49 + },
50 + {
51 + type: "primary",
52 + icon: "el-icon-download",
53 + btnName: "导出",
54 + size: "mini",
55 + round: false,
56 + loading: false,
57 + event: "download",
58 + },
59 + ],
60 + },
61 +};
62 +export const columnHeader = (editRow, deleteRow, viewRow) => [
63 + {
64 + type: "selection",
65 + align: "center",
66 + prop: "selection",
67 + width: "50",
68 + },
69 + {
70 + type: "index",
71 + label: "序号",
72 + prop: "id",
73 + align: "center",
74 + width: "50",
75 + },
76 + {
77 + label: "顺位航班",
78 + prop: "flightRand",
79 + align: "center",
80 + minWidth: 100,
81 + },
82 + {
83 + label: "状态",
84 + prop: "status",
85 + align: "center",
86 + minWidth: 100,
87 + render: (h, params) => {
88 + const { row } = params;
89 + return h("div", `${state[row.status]}`);
90 + },
91 + },
92 + {
93 + label: "创建时间",
94 + prop: "createTime",
95 + align: "center",
96 + minWidth: 100,
97 + sortable: true,
98 + "sort-method": (a, b) => b.createTime - a.createTime,
99 + },
100 + {
101 + label: "修改时间",
102 + prop: "updateTime",
103 + align: "center",
104 + minWidth: 100,
105 + },
106 + {
107 + label: "创建人",
108 + prop: "createUserName",
109 + align: "center",
110 + minWidth: 100,
111 + },
112 + {
113 + label: "修改人",
114 + prop: "updateUserName",
115 + align: "center",
116 + minWidth: 100,
117 + },
118 + {
119 + label: "操作",
120 + prop: "operate",
121 + align: "center",
122 + minWidth: 120,
123 + fixed: "right",
124 + render: (h, params) => {
125 + return h("div", [
126 + h(
127 + "el-button",
128 + {
129 + props: {
130 + type: "text",
131 + size: "mini",
132 + icon: "el-icon-edit",
133 + },
134 + on: {
135 + click() {
136 + editRow(params);
137 + },
138 + },
139 + },
140 + "修改"
141 + ),
142 + h(
143 + "el-button",
144 + {
145 + style: {
146 + color: "#ff4949",
147 + },
148 + props: {
149 + type: "text",
150 + size: "mini",
151 + icon: "el-icon-delete",
152 + },
153 + on: {
154 + click() {
155 + deleteRow(params);
156 + },
157 + },
158 + },
159 + "删除"
160 + ),
161 + h(
162 + "el-button",
163 + {
164 + props: {
165 + type: "text",
166 + size: "mini",
167 + icon: "el-icon-view",
168 + },
169 + on: {
170 + click() {
171 + viewRow(params);
172 + },
173 + },
174 + },
175 + "查看"
176 + ),
177 + ]);
178 + },
179 + },
180 +];
181 +
182 +export const tableData = [
183 + {
184 + id: "1",
185 + flightRand: "LZ003;LZ00",
186 + status: "1",
187 + createTime: "2023-08-11",
188 + updateTime: "2023-08-11",
189 + createUserName: "wjh",
190 + updateUserName: "wjh",
191 + },
192 + {
193 + id: "2",
194 + flightRand: "LP001;LP004+1",
195 + status: "3",
196 + createTime: "2023-08-11",
197 + updateTime: "2023-08-11",
198 + createUserName: "wjh",
199 + updateUserName: "wjh",
200 + },
201 + {
202 + id: "3",
203 + flightRand: "LZ002;LZ003;LZ001",
204 + status: "1",
205 + createTime: "2023-08-10",
206 + updateTime: "2023-08-10",
207 + createUserName: "wjh",
208 + updateUserName: "wjh",
209 + },
210 + {
211 + id: "4",
212 + flightRand: "LZ001;LZ002;LZ004",
213 + status: "2",
214 + createTime: "2023-08-11",
215 + updateTime: "2023-08-11",
216 + createUserName: "wjh",
217 + updateUserName: "wjh",
218 + },
219 + {
220 + id: "5",
221 + flightRand: "PS001;PS003",
222 + status: "1",
223 + createTime: "2023-08-11",
224 + updateTime: "2023-08-11",
225 + createUserName: "wjh",
226 + updateUserName: "wjh",
227 + },
228 + {
229 + id: "6",
230 + flightRand: "PS002;PS003",
231 + status: "3",
232 + createTime: "2023-08-11",
233 + updateTime: "2023-08-11",
234 + createUserName: "wjh",
235 + updateUserName: "wjh",
236 + },
237 + {
238 + id: "7",
239 + flightRand: "FX0092;FX0095;FX0094;FX0090",
240 + status: "1",
241 + createTime: "2023-08-10",
242 + updateTime: "2023-08-10",
243 + createUserName: "wjh",
244 + updateUserName: "wjh",
245 + },
246 + {
247 + id: "8",
248 + flightRand: "AB060;AC005;AC204",
249 + status: "2",
250 + createTime: "2023-08-10",
251 + updateTime: "2023-08-10",
252 + createUserName: "wjh",
253 + updateUserName: "wjh",
254 + },
255 + {
256 + id: "9",
257 + flightRand: "FX0090;FX0092",
258 + status: "1",
259 + createTime: "2023-08-10",
260 + updateTime: "2023-08-10",
261 + createUserName: "wjh",
262 + updateUserName: "wjh",
263 + },
264 +];
...@@ -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()
......
...@@ -720,7 +720,7 @@ export default { ...@@ -720,7 +720,7 @@ export default {
720 this.infoForm.fltDate = res.data.list.ruleDate 720 this.infoForm.fltDate = res.data.list.ruleDate
721 this.infoForm.route = res.data.list.flightRoute 721 this.infoForm.route = res.data.list.flightRoute
722 this.infoForm.list.push(this.dataHandle(res.data.list)) 722 this.infoForm.list.push(this.dataHandle(res.data.list))
723 - console.log(this.infoForm) 723 + console.log('A:',this.infoForm.list)
724 } else { 724 } else {
725 this.isEmpty = true 725 this.isEmpty = true
726 } 726 }
...@@ -760,6 +760,7 @@ export default { ...@@ -760,6 +760,7 @@ export default {
760 res.data.list.forEach(item => { 760 res.data.list.forEach(item => {
761 this.infoForm.list.push(this.dataHandle(item)) 761 this.infoForm.list.push(this.dataHandle(item))
762 }) 762 })
763 + console.log('B:',this.infoForm.list)
763 } else { 764 } else {
764 //航班类型为Purple Tail则显示所有航线维度 765 //航班类型为Purple Tail则显示所有航线维度
765 this.routeList.forEach(route => { 766 this.routeList.forEach(route => {
...@@ -781,6 +782,7 @@ export default { ...@@ -781,6 +782,7 @@ export default {
781 }) 782 })
782 } 783 }
783 }) 784 })
785 + console.log('C:',this.infoForm.list)
784 } 786 }
785 } else { 787 } else {
786 //航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度) 788 //航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
...@@ -803,6 +805,7 @@ export default { ...@@ -803,6 +805,7 @@ export default {
803 }) 805 })
804 } 806 }
805 }) 807 })
808 + console.log('D:',this.infoForm.list)
806 } 809 }
807 } else { 810 } else {
808 //未请求到数据 811 //未请求到数据
...@@ -830,6 +833,7 @@ export default { ...@@ -830,6 +833,7 @@ export default {
830 }) 833 })
831 this.infoForm.list.push(this.dataHandle(item)) 834 this.infoForm.list.push(this.dataHandle(item))
832 }) 835 })
836 + console.log('E:',this.infoForm.list)
833 } else { 837 } else {
834 //航班类型Purple Tail展示全部航线维度 838 //航班类型Purple Tail展示全部航线维度
835 let routesStatus = 1 839 let routesStatus = 1
...@@ -853,6 +857,7 @@ export default { ...@@ -853,6 +857,7 @@ export default {
853 }) 857 })
854 } 858 }
855 }) 859 })
860 + console.log('F:',this.infoForm.list)
856 } 861 }
857 } else { 862 } else {
858 //未查询到,插入占位基础数据使用户新建 863 //未查询到,插入占位基础数据使用户新建
...@@ -868,6 +873,7 @@ export default { ...@@ -868,6 +873,7 @@ export default {
868 }) 873 })
869 } 874 }
870 }) 875 })
876 + console.log('G:',this.infoForm.list)
871 } else { 877 } else {
872 //航班类型Purple Tail展示全部航线维度 878 //航班类型Purple Tail展示全部航线维度
873 // this.isEmpty = true 879 // this.isEmpty = true
...@@ -879,6 +885,7 @@ export default { ...@@ -879,6 +885,7 @@ export default {
879 routePriority: route.routePriority, 885 routePriority: route.routePriority,
880 }) 886 })
881 }) 887 })
888 + console.log('H:',this.infoForm.list)
882 } 889 }
883 } 890 }
884 }).catch(err => { 891 }).catch(err => {
...@@ -921,6 +928,7 @@ export default { ...@@ -921,6 +928,7 @@ export default {
921 }) 928 })
922 } 929 }
923 }) 930 })
931 + console.log('I:',this.infoForm.list)
924 } else { 932 } else {
925 this.routeList.forEach((route) => { 933 this.routeList.forEach((route) => {
926 this.infoForm.list.push({ 934 this.infoForm.list.push({
...@@ -930,6 +938,7 @@ export default { ...@@ -930,6 +938,7 @@ export default {
930 routePriority: route.routePriority, 938 routePriority: route.routePriority,
931 }) 939 })
932 }) 940 })
941 + console.log('J:',this.infoForm.list)
933 } 942 }
934 }).catch(err => { 943 }).catch(err => {
935 this.isEmpty = true 944 this.isEmpty = true
...@@ -944,6 +953,7 @@ export default { ...@@ -944,6 +953,7 @@ export default {
944 routePriority: route.routePriority, 953 routePriority: route.routePriority,
945 }) 954 })
946 }) 955 })
956 + console.log('K:',this.infoForm.list)
947 } 957 }
948 } 958 }
949 } 959 }
...@@ -975,6 +985,7 @@ export default { ...@@ -975,6 +985,7 @@ export default {
975 routePriority: item.ordinal 985 routePriority: item.ordinal
976 }) 986 })
977 }) 987 })
988 + console.log('L:',this.infoForm.list)
978 } else { 989 } else {
979 this.msgWarning('未查询到航线信息!') 990 this.msgWarning('未查询到航线信息!')
980 this.routeList = [] 991 this.routeList = []
......
...@@ -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 //搜索
......
...@@ -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" />
......
...@@ -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 //输入航班号后
......
...@@ -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,4 @@ export default { ...@@ -244,4 +244,4 @@ export default {
244 244
245 <style lang="scss" scoped> 245 <style lang="scss" scoped>
246 246
247 -</style>
...\ No newline at end of file ...\ No newline at end of file
247 +</style>
......
...@@ -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,4 @@ export default { ...@@ -244,4 +244,4 @@ export default {
244 244
245 <style lang="scss" scoped> 245 <style lang="scss" scoped>
246 246
247 -</style>
...\ No newline at end of file ...\ No newline at end of file
247 +</style>
......
...@@ -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 },
...@@ -94,4 +94,4 @@ export default { ...@@ -94,4 +94,4 @@ export default {
94 94
95 <style scoped> 95 <style scoped>
96 96
97 -</style>
...\ No newline at end of file ...\ No newline at end of file
97 +</style>
......
...@@ -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: {
......
...@@ -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">
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: {
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
56 </Tables> 56 </Tables>
57 </div> 57 </div>
58 </template> 58 </template>
59 - 59 +
60 <script> 60 <script>
61 import { 61 import {
62 downLoadTemplate, 62 downLoadTemplate,
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
78 tableData: [], 78 tableData: [],
79 errorData: [], 79 errorData: [],
80 tableHeaders: this.tableHeaders['flightToArea'], 80 tableHeaders: this.tableHeaders['flightToArea'],
81 - tableHeight: null, 81 + tableHeight: 300,
82 total: 0, 82 total: 0,
83 flightType: [], 83 flightType: [],
84 form: { 84 form: {
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
100 created() { 100 created() {
101 }, 101 },
102 mounted() { 102 mounted() {
103 - this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170 103 + // this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170;
104 this.selection(1) 104 this.selection(1)
105 }, 105 },
106 activated() { 106 activated() {
...@@ -210,4 +210,4 @@ export default { ...@@ -210,4 +210,4 @@ export default {
210 margin-left: 10px; 210 margin-left: 10px;
211 vertical-align: top; 211 vertical-align: top;
212 } 212 }
213 -</style>
...\ No newline at end of file ...\ No newline at end of file
213 +</style>
......
...@@ -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: {
...@@ -243,4 +243,4 @@ export default { ...@@ -243,4 +243,4 @@ export default {
243 243
244 <style> 244 <style>
245 245
246 -</style>
...\ No newline at end of file ...\ No newline at end of file
246 +</style>
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
58 </Tables> 58 </Tables>
59 </div> 59 </div>
60 </template> 60 </template>
61 - 61 +
62 <script> 62 <script>
63 import { 63 import {
64 downLoadTemplate, 64 downLoadTemplate,
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
79 tableData: [], 79 tableData: [],
80 errorData: [], 80 errorData: [],
81 tableHeaders: this.tableHeaders['ursaToArea'], 81 tableHeaders: this.tableHeaders['ursaToArea'],
82 - tableHeight: null, 82 + tableHeight: 300,
83 total: 0, 83 total: 0,
84 flightType: [], 84 flightType: [],
85 form: { 85 form: {
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
101 created() { 101 created() {
102 }, 102 },
103 mounted() { 103 mounted() {
104 - this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170 104 + // this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170;
105 this.selection(1) 105 this.selection(1)
106 }, 106 },
107 activated() { 107 activated() {
...@@ -217,4 +217,4 @@ export default { ...@@ -217,4 +217,4 @@ export default {
217 margin-left: 10px; 217 margin-left: 10px;
218 vertical-align: top; 218 vertical-align: top;
219 } 219 }
220 -</style>
...\ No newline at end of file ...\ No newline at end of file
220 +</style>
......
...@@ -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,7 @@ export default { ...@@ -215,7 +215,7 @@ 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 }, 219 },
220 watch: { 220 watch: {
221 tableName(val, oldVal) { 221 tableName(val, oldVal) {
...@@ -497,4 +497,4 @@ export default { ...@@ -497,4 +497,4 @@ export default {
497 font-size: 14px; 497 font-size: 14px;
498 font-weight: 600; 498 font-weight: 600;
499 } 499 }
500 -</style>
...\ No newline at end of file ...\ No newline at end of file
500 +</style>
......
...@@ -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>
...@@ -247,4 +247,4 @@ export default { ...@@ -247,4 +247,4 @@ export default {
247 </script> 247 </script>
248 248
249 <style> 249 <style>
250 -</style>
...\ No newline at end of file ...\ No newline at end of file
250 +</style>
......
...@@ -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']">修改
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
44 v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{ 44 v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{
45 scope.row.isValid == 1 ? "停用" : "启用" 45 scope.row.isValid == 1 ? "停用" : "启用"
46 }}</el-button> 46 }}</el-button>
47 - <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']">删除用户 47 + <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']" style="margin-top: 5px;margin-left: 0;">删除用户
48 </el-button> 48 </el-button>
49 </template> 49 </template>
50 </el-table-column> 50 </el-table-column>
...@@ -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();
...@@ -255,4 +255,4 @@ export default { ...@@ -255,4 +255,4 @@ export default {
255 255
256 <style> 256 <style>
257 257
258 -</style>
...\ No newline at end of file ...\ No newline at end of file
258 +</style>
......
...@@ -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) {
...@@ -117,4 +117,4 @@ export default { ...@@ -117,4 +117,4 @@ export default {
117 117
118 <style lang="scss" scoped> 118 <style lang="scss" scoped>
119 119
120 -</style>
...\ No newline at end of file ...\ No newline at end of file
120 +</style>
......
...@@ -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 //数据查询
...@@ -222,4 +221,4 @@ export default { ...@@ -222,4 +221,4 @@ export default {
222 .tagTip { 221 .tagTip {
223 margin: 0 5px; 222 margin: 0 5px;
224 } 223 }
225 -</style>
...\ No newline at end of file ...\ No newline at end of file
224 +</style>
......
...@@ -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() {
...@@ -166,4 +166,4 @@ export default { ...@@ -166,4 +166,4 @@ export default {
166 166
167 <style lang="scss" scoped> 167 <style lang="scss" scoped>
168 168
169 -</style>
...\ No newline at end of file ...\ No newline at end of file
169 +</style>
......