Elements-SY

modify

This diff is collapsed. Click to expand it.
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
4 <sidebar class="sidebar-container" 4 <sidebar class="sidebar-container"
5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> 5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
6 <div :class="{ hasTagsView: needTagsView }" class="main-container"> 6 <div :class="{ hasTagsView: needTagsView }" class="main-container">
7 - <div :class="{ 'fixed-header': fixedHeader }"> 7 + <div :class="{ 'fixed-header': fixedHeader }" ref="headerBlock">
8 <navbar /> 8 <navbar />
9 <tags-view v-if="needTagsView" /> 9 <tags-view v-if="needTagsView" />
10 </div> 10 </div>
11 - <app-main /> 11 + <app-main ref="appMainBlock" />
12 <right-panel v-if="false"> 12 <right-panel v-if="false">
13 <settings /> 13 <settings />
14 </right-panel> 14 </right-panel>
......
...@@ -6,40 +6,45 @@ const WIDTH = 992 // refer to Bootstrap's responsive design ...@@ -6,40 +6,45 @@ const WIDTH = 992 // refer to Bootstrap's responsive design
6 export default { 6 export default {
7 watch: { 7 watch: {
8 $route(route) { 8 $route(route) {
9 - if (this.device === 'mobile' && this.sidebar.opened) { 9 + if (this.device === "mobile" && this.sidebar.opened) {
10 - store.dispatch('app/closeSideBar', { withoutAnimation: false }) 10 + store.dispatch("app/closeSideBar", { withoutAnimation: false });
11 } 11 }
12 - } 12 + },
13 }, 13 },
14 beforeMount() { 14 beforeMount() {
15 - window.addEventListener('resize', this.$_resizeHandler) 15 + window.addEventListener("resize", this.$_resizeHandler);
16 }, 16 },
17 beforeDestroy() { 17 beforeDestroy() {
18 - window.removeEventListener('resize', this.$_resizeHandler) 18 + window.removeEventListener("resize", this.$_resizeHandler);
19 }, 19 },
20 mounted() { 20 mounted() {
21 - const isMobile = this.$_isMobile() 21 + const isMobile = this.$_isMobile();
22 if (isMobile) { 22 if (isMobile) {
23 - store.dispatch('app/toggleDevice', 'mobile') 23 + store.dispatch("app/toggleDevice", "mobile");
24 - store.dispatch('app/closeSideBar', { withoutAnimation: true }) 24 + store.dispatch("app/closeSideBar", { withoutAnimation: true });
25 } 25 }
26 + this.getBlockCurrentHeight();
26 }, 27 },
27 methods: { 28 methods: {
28 // use $_ for mixins properties 29 // use $_ for mixins properties
29 // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential 30 // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
30 $_isMobile() { 31 $_isMobile() {
31 - const rect = body.getBoundingClientRect() 32 + const rect = body.getBoundingClientRect();
32 - return rect.width - 1 < WIDTH 33 + return rect.width - 1 < WIDTH;
33 }, 34 },
34 $_resizeHandler() { 35 $_resizeHandler() {
35 if (!document.hidden) { 36 if (!document.hidden) {
36 - const isMobile = this.$_isMobile() 37 + const isMobile = this.$_isMobile();
37 - store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') 38 + store.dispatch("app/toggleDevice", isMobile ? "mobile" : "desktop");
38 39
39 if (isMobile) { 40 if (isMobile) {
40 - store.dispatch('app/closeSideBar', { withoutAnimation: true }) 41 + store.dispatch("app/closeSideBar", { withoutAnimation: true });
41 } 42 }
42 } 43 }
44 + },
45 + getBlockCurrentHeight(){;
46 + // console.log(this.$refs.headerBlock, this.$refs.headerBlock.clientHeight);
47 + // console.log(this.$refs.appMainBlock);
43 } 48 }
44 - } 49 + },
45 -} 50 +};
......
...@@ -72,20 +72,19 @@ export const constantRoutes = [ ...@@ -72,20 +72,19 @@ export const constantRoutes = [
72 component: Layout, 72 component: Layout,
73 hidden: true, 73 hidden: true,
74 children: [ 74 children: [
75 - { 75 + // {
76 - path: "/et86", 76 + // path: "/et86",
77 - component: (resolve) => 77 + // component: (resolve) => require(["@/views/et86Config/et86RuleConfig"], resolve),
78 - require(["@/views/allocationConfig/et86"], resolve), 78 + // name: "et86",
79 - name: "et86", 79 + // meta: { title: "ET86", icon: "user" },
80 - meta: { title: "ET86", icon: "user" }, 80 + // children: [],
81 - children: [], 81 + // },
82 - },
83 { 82 {
84 path: "/edit", 83 path: "/edit",
85 component: (resolve) => 84 component: (resolve) =>
86 - require(["@/views/allocationConfig/et86/edit"], resolve), 85 + require(["@/views/et86Config/et86RuleConfig/edit"], resolve),
87 name: "edit", 86 name: "edit",
88 - meta: { title: "编辑", icon: "user", noCache: false }, 87 + meta: { title: "ET86规则", icon: "user", noCache: false },
89 }, 88 },
90 { 89 {
91 path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status", 90 path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status",
......
...@@ -47,44 +47,6 @@ const permission = { ...@@ -47,44 +47,6 @@ const permission = {
47 return new Promise((resolve) => { 47 return new Promise((resolve) => {
48 // 向后端请求路由数据 48 // 向后端请求路由数据
49 getRouters().then((res) => { 49 getRouters().then((res) => {
50 - const newUrl = [
51 - {
52 - id: 24,
53 - name: "et86",
54 - path: "/et86",
55 - hidden: false,
56 - component: "allocationConfig/et86",
57 - meta: {
58 - title: "ET86",
59 - icon: "edit",
60 - permissions: "allocation:rand:list",
61 - noCache: false,
62 - },
63 - alwaysShow: false,
64 - children: null,
65 - },
66 - {
67 - id: 25,
68 - name: "et86BlackStation",
69 - path: "/et86BlackStation",
70 - hidden: false,
71 - component: "allocationConfig/et86BlackStation",
72 - meta: {
73 - title: "黑名单维护",
74 - icon: "processing",
75 - permissions: "allocation:rand:list",
76 - noCache: false,
77 - },
78 - alwaysShow: false,
79 - children: null,
80 - },
81 - ];
82 - res.data.map((item) => {
83 - if (item.name == "AllocationConfig") {
84 - item.children.push(newUrl[0]);
85 - item.children.push(newUrl[1]);
86 - }
87 - });
88 res.data = hasPermi.routerPer(res.data); 50 res.data = hasPermi.routerPer(res.data);
89 const sdata = JSON.parse(JSON.stringify(res.data)); 51 const sdata = JSON.parse(JSON.stringify(res.data));
90 const rdata = JSON.parse(JSON.stringify(res.data)); 52 const rdata = JSON.parse(JSON.stringify(res.data));
......
...@@ -4,7 +4,7 @@ export const tableAttr = { ...@@ -4,7 +4,7 @@ export const tableAttr = {
4 isDragSort: true, // 拖拽tableData数据一定要加id字段 4 isDragSort: true, // 拖拽tableData数据一定要加id字段
5 maxHeight: 300, 5 maxHeight: 300,
6 btnCofig: { 6 btnCofig: {
7 - isBtn: true, 7 + isBtn: false,
8 btnGroup: [ 8 btnGroup: [
9 { 9 {
10 type: "primary", 10 type: "primary",
......
1 export const formConfig = [ 1 export const formConfig = [
2 { 2 {
3 - label: "创建时间(从)", 3 + label: "原航班",
4 + type: "Input",
5 + name: "originOfFlightNo",
6 + prop: "originOfFlightNo",
7 + placeholder: "请输入原航班号",
8 + span: 6,
9 + trigger: "blur",
10 + },
11 + {
12 + label: "修改时间 从",
4 type: "Date", 13 type: "Date",
5 name: "startTime", 14 name: "startTime",
6 prop: "startTime", 15 prop: "startTime",
7 - width: "140px",
8 placeholder: "请选择开始时间", 16 placeholder: "请选择开始时间",
9 // rules: { required: true, message: "请选择开始时间", trigger: "blur" }, 17 // rules: { required: true, message: "请选择开始时间", trigger: "blur" },
10 format: "yyyy-MM-dd", 18 format: "yyyy-MM-dd",
19 + colWidth: "25%",
20 + inputWidth: "100%",
11 }, 21 },
12 { 22 {
13 - label: "创建时间(到)", 23 + label: "",
14 type: "Date", 24 type: "Date",
15 name: "endTime", 25 name: "endTime",
16 prop: "endTime", 26 prop: "endTime",
17 - width: "140px",
18 placeholder: "请选择结束时间", 27 placeholder: "请选择结束时间",
19 // rules: { required: true, message: "请选择结束时间", trigger: "blur" }, 28 // rules: { required: true, message: "请选择结束时间", trigger: "blur" },
20 format: "yyyy-MM-dd", 29 format: "yyyy-MM-dd",
30 + colWidth: "19%",
31 + labelWidth: "20px",
32 + inputWidth: "100%",
21 }, 33 },
22 { 34 {
23 label: "规则状态", 35 label: "规则状态",
24 type: "Select", 36 type: "Select",
25 name: "status", 37 name: "status",
26 prop: "status", 38 prop: "status",
27 - width: "140px",
28 placeholder: "请选择状态", 39 placeholder: "请选择状态",
29 options: { 40 options: {
30 data: [ 41 data: [
31 { 42 {
32 value: "1", 43 value: "1",
33 label: "有效", 44 label: "有效",
34 - }, 45 + }, {
35 - {
36 value: "0", 46 value: "0",
37 label: "无效", 47 label: "无效",
38 }, 48 },
...@@ -40,6 +50,9 @@ export const formConfig = [ ...@@ -40,6 +50,9 @@ export const formConfig = [
40 label: "有效", 50 label: "有效",
41 value: "1", 51 value: "1",
42 }, 52 },
53 + colWidth: "20%",
54 + labelWidth: "70px",
55 + inputWidth: "100%",
43 }, 56 },
44 ]; 57 ];
45 58
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
6 ref="ruleForm" 6 ref="ruleForm"
7 :formConfig="formConfig" 7 :formConfig="formConfig"
8 :queryForm="queryForm" 8 :queryForm="queryForm"
9 + :inline="false"
10 + formWidth="auto"
11 + @blur="blurEvent"
9 /> 12 />
10 </el-col> 13 </el-col>
11 </el-row> 14 </el-row>
...@@ -18,7 +21,6 @@ ...@@ -18,7 +21,6 @@
18 @sizeChange="handleSizeChange" 21 @sizeChange="handleSizeChange"
19 @currentChange="handleCurrentChange" 22 @currentChange="handleCurrentChange"
20 @search="searchBtn" 23 @search="searchBtn"
21 - @restForm="restForm"
22 @add="addBtn" 24 @add="addBtn"
23 > 25 >
24 </yl-table> 26 </yl-table>
...@@ -41,10 +43,12 @@ export default { ...@@ -41,10 +43,12 @@ export default {
41 data() { 43 data() {
42 return { 44 return {
43 formConfig: formConfig, // 表单配置项 45 formConfig: formConfig, // 表单配置项
44 - queryForm: { // 表单参数 46 + queryForm: {
47 + // 表单参数
45 status: "有效", 48 status: "有效",
46 }, 49 },
47 - pageConfig: { // 分页配置项 50 + pageConfig: {
51 + // 分页配置项
48 isPagination: true, 52 isPagination: true,
49 total: 0, 53 total: 0,
50 pageData: { 54 pageData: {
...@@ -55,7 +59,6 @@ export default { ...@@ -55,7 +59,6 @@ export default {
55 tableAttr: tableAttr, // table配置项 59 tableAttr: tableAttr, // table配置项
56 columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头 60 columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
57 tableData: [], // 表格数据 61 tableData: [], // 表格数据
58 - selectionList: [], // table复选框筛选集合
59 }; 62 };
60 }, 63 },
61 created() { 64 created() {
...@@ -69,20 +72,14 @@ export default { ...@@ -69,20 +72,14 @@ export default {
69 // ET86查询 72 // ET86查询
70 queryFindAllEtesRules(params) { 73 queryFindAllEtesRules(params) {
71 this.tableAttr.loadingTable = true; 74 this.tableAttr.loadingTable = true;
72 - findAllEtesRules(params) 75 + findAllEtesRules(params).then((res) => {
73 - .then((res) => {
74 this.tableAttr.loadingTable = false; 76 this.tableAttr.loadingTable = false;
75 const { code, data } = res; 77 const { code, data } = res;
76 if (code == 200) { 78 if (code == 200) {
77 this.tableData = data.list; 79 this.tableData = data.list;
78 this.pageConfig.total = data.total; 80 this.pageConfig.total = data.total;
79 } 81 }
80 - }) 82 + }).catch(() => {});
81 - .catch(() => {});
82 - },
83 - // table复选框事件
84 - selectionTable(e) {
85 - this.selectionList = e;
86 }, 83 },
87 //条数变化 84 //条数变化
88 handleSizeChange(e) { 85 handleSizeChange(e) {
...@@ -96,14 +93,14 @@ export default { ...@@ -96,14 +93,14 @@ export default {
96 this.searchBtn(); 93 this.searchBtn();
97 }, 94 },
98 // 搜索 95 // 搜索
99 - searchBtn(row) { 96 + searchBtn() {
97 + const { page, size } = this.pageConfig.pageData;
100 let params = { 98 let params = {
101 - createTimeStart: this.queryForm.startTime 99 + originOfFlightNo: this.queryForm.originOfFlightNo,
102 - ? this.queryForm.startTime 100 + updateTimeStart: this.queryForm.startTime ? this.queryForm.startTime : "",
103 - : "", 101 + updateTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "",
104 - createTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "", 102 + limitStart: (page - 1) * size,
105 - limitStart: this.pageConfig.pageData.page, 103 + limitSize: size,
106 - limitSize: this.pageConfig.pageData.size,
107 status: this.queryForm.status, 104 status: this.queryForm.status,
108 }; 105 };
109 if (this.queryForm.status == "有效") { 106 if (this.queryForm.status == "有效") {
...@@ -133,7 +130,7 @@ export default { ...@@ -133,7 +130,7 @@ export default {
133 query: { 130 query: {
134 name: "view", 131 name: "view",
135 id: row.id, 132 id: row.id,
136 - status: row.status 133 + status: row.status,
137 }, 134 },
138 }); 135 });
139 }, 136 },
...@@ -144,7 +141,7 @@ export default { ...@@ -144,7 +141,7 @@ export default {
144 query: { 141 query: {
145 name: "edit", 142 name: "edit",
146 id: row.id, 143 id: row.id,
147 - status: row.status 144 + status: row.status,
148 }, 145 },
149 }); 146 });
150 }, 147 },
...@@ -156,17 +153,21 @@ export default { ...@@ -156,17 +153,21 @@ export default {
156 type: "warning", 153 type: "warning",
157 center: true, 154 center: true,
158 }).then(() => { 155 }).then(() => {
159 - deleteEtesRuleById({ id: row.id }).then(res=>{ 156 + deleteEtesRuleById({ id: row.id }).then((res) => {
160 const { code, msg } = res; 157 const { code, msg } = res;
161 - if (code == 200) { 158 + if (code == 200) {
162 - this.searchBtn(); 159 + this.searchBtn();
163 - this.msgSuccess("删除成功!"); 160 + this.msgSuccess("删除成功!");
164 - }else{ 161 + } else {
165 - this.msgError(msg || "删除失败"); 162 + this.msgError(msg || "删除失败");
166 - } 163 + }
167 - }) 164 + });
168 - }).catch(() => {}); 165 + }).catch(() => {});
169 }, 166 },
167 + // 失焦事件
168 + blurEvent({ originOfFlightNo }){
169 + this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo)
170 + }
170 }, 171 },
171 }; 172 };
172 </script> 173 </script>
......
...@@ -19,15 +19,15 @@ export const tableAttr = { ...@@ -19,15 +19,15 @@ export const tableAttr = {
19 loading: false, 19 loading: false,
20 event: "search", 20 event: "search",
21 }, 21 },
22 - { 22 + // {
23 - type: "info", 23 + // type: "info",
24 - icon: "", 24 + // icon: "",
25 - btnName: "重置", 25 + // btnName: "重置",
26 - size: "mini", 26 + // size: "mini",
27 - round: false, 27 + // round: false,
28 - loading: false, 28 + // loading: false,
29 - event: "restForm", 29 + // event: "restForm",
30 - }, 30 + // },
31 { 31 {
32 type: "primary", 32 type: "primary",
33 icon: "el-icon-plus", 33 icon: "el-icon-plus",
...@@ -42,12 +42,6 @@ export const tableAttr = { ...@@ -42,12 +42,6 @@ export const tableAttr = {
42 }; 42 };
43 export const columnHeader = (viewRow, editRow, deleteRow) => [ 43 export const columnHeader = (viewRow, editRow, deleteRow) => [
44 { 44 {
45 - type: "selection",
46 - align: "center",
47 - prop: "selection",
48 - width: "50",
49 - },
50 - {
51 type: "index", 45 type: "index",
52 label: "序号", 46 label: "序号",
53 prop: "id", 47 prop: "id",
...@@ -55,26 +49,20 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ ...@@ -55,26 +49,20 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
55 width: "50", 49 width: "50",
56 }, 50 },
57 { 51 {
58 - label: "原航班", 52 + label: "原航班",
59 prop: "originOfFlightNo", 53 prop: "originOfFlightNo",
60 align: "center", 54 align: "center",
61 - minWidth: 100, 55 + minWidth: 80,
62 }, 56 },
63 { 57 {
64 - label: "顺位航班", 58 + label: "配载航班",
65 prop: "rankFltNoStr", 59 prop: "rankFltNoStr",
66 align: "center", 60 align: "center",
67 minWidth: 100, 61 minWidth: 100,
68 }, 62 },
69 { 63 {
70 - label: "URSA包含", 64 + label: "航线",
71 - prop: "includeUrsa", 65 + prop: "rankFltRouteStr",
72 - align: "center",
73 - minWidth: 100,
74 - },
75 - {
76 - label: "URSA不包含",
77 - prop: "notIncludeUrsa",
78 align: "center", 66 align: "center",
79 minWidth: 100, 67 minWidth: 100,
80 }, 68 },
...@@ -82,43 +70,30 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [ ...@@ -82,43 +70,30 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
82 label: "状态", 70 label: "状态",
83 prop: "status", 71 prop: "status",
84 align: "center", 72 align: "center",
85 - minWidth: 100, 73 + minWidth: 80,
86 render: (h, params) => { 74 render: (h, params) => {
87 const { row } = params; 75 const { row } = params;
88 return h("div", `${state[row.status]}`); 76 return h("div", `${state[row.status]}`);
89 }, 77 },
90 }, 78 },
91 { 79 {
92 - label: "创建时间",
93 - prop: "createTime",
94 - align: "center",
95 - minWidth: 100,
96 - sortable: true,
97 - "sort-method": (a, b) => b.createTime - a.createTime,
98 - },
99 - {
100 - label: "创建人",
101 - prop: "createUserName",
102 - align: "center",
103 - minWidth: 100,
104 - },
105 - {
106 label: "修改时间", 80 label: "修改时间",
107 prop: "updateTime", 81 prop: "updateTime",
108 align: "center", 82 align: "center",
109 - minWidth: 100, 83 + minWidth: 120,
84 + // "sort-method": (a, b) => b.createTime - a.createTime,
110 }, 85 },
111 { 86 {
112 label: "修改人", 87 label: "修改人",
113 prop: "updateUserName", 88 prop: "updateUserName",
114 align: "center", 89 align: "center",
115 - minWidth: 100, 90 + minWidth: 80,
116 }, 91 },
117 { 92 {
118 label: "操作", 93 label: "操作",
119 prop: "operate", 94 prop: "operate",
120 align: "center", 95 align: "center",
121 - minWidth: 120, 96 + minWidth: 125,
122 fixed: "right", 97 fixed: "right",
123 render: (h, params) => { 98 render: (h, params) => {
124 return h("div", [ 99 return h("div", [
......