Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-08-30 19:14:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
aced33835dc3a4020d66671558d9c0e357aba46c
aced3383
1 parent
2ef99cce
modify
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
128 additions
and
73 deletions
src/api/et86ShipmentDesc.js
src/utils/index.js
src/views/et86Config/et86HsCodeBlack/formConfig.js
src/views/et86Config/et86HsCodeBlack/index.vue
src/views/et86Config/et86RuleConfig/edit/index.vue
src/views/et86Config/et86RuleConfig/index.vue
src/views/et86Config/et86RuleConfig/tableConfig.js
src/views/et86Config/et86ShipmentDesc/index.vue
src/api/et86ShipmentDesc.js
0 → 100644
View file @
aced338
import
request
from
"@/utils/request"
;
// HScode黑名单/英文品名删除
export
function
delBlackList
(
data
)
{
return
request
({
url
:
"/etes/delBlackList"
,
method
:
"post"
,
data
:
data
,
});
}
src/utils/index.js
View file @
aced338
...
...
@@ -393,6 +393,13 @@ export function isNumberStr(str) {
return
/^
[
+-
]?(
0|
([
1-9
]\d
*
))(\.\d
+
)?
$/g
.
test
(
str
);
}
// Array JsonValue 排序
export
function
sortList
(
arr
,
key
)
{
return
arr
.
sort
((
a
,
b
)
=>
{
return
a
[
key
].
localeCompare
(
b
[
key
]);
});
}
// 获取计算元素的属性的margin + padding + clientHeight
function
getPropertyValue
(
el
)
{
let
style
,
marginTop
,
marginBottom
,
paddingTop
,
paddingBottom
;
...
...
@@ -417,12 +424,21 @@ export function restTableHeight($refs) {
if
(
key
==
"ylTable"
)
{
$refs
[
key
].
$children
.
map
((
item
)
=>
{
if
(
item
.
$el
.
id
==
"group-btn"
)
{
console
.
log
(
"group-btn:"
,
getPropertyValue
(
item
.
$el
));
// table表格组合按钮
heigth
+=
getPropertyValue
(
item
.
$el
);
heigth
+=
item
.
$el
.
clientHeight
;
}
else
if
(
item
.
$el
.
className
==
"el-pagination is-background"
)
{
// table表格组合分页
if
(
item
.
$el
.
offsetParent
.
className
==
"pagination-container"
)
{
console
.
log
(
"pagination:"
,
getPropertyValue
(
item
.
$el
.
offsetParent
)
);
console
.
log
(
"paginationClientHeight:"
,
getPropertyValue
(
item
.
$el
.
offsetParent
.
clientHeight
)
);
heigth
+=
getPropertyValue
(
item
.
$el
.
offsetParent
);
heigth
+=
item
.
$el
.
offsetParent
.
clientHeight
;
}
...
...
@@ -431,13 +447,23 @@ export function restTableHeight($refs) {
}
else
{
if
(
$refs
[
key
].
hasOwnProperty
(
"$el"
))
{
heigth
+=
$refs
[
key
].
$el
.
clientHeight
;
heigth
+=
getPropertyValue
(
$refs
[
key
].
$el
);
console
.
log
(
"ruleForm:"
,
$refs
[
key
].
$el
.
clientHeight
,
getPropertyValue
(
$refs
[
key
].
$el
)
);
}
else
{
console
.
log
(
"ruleForm:"
,
$refs
[
key
]);
heigth
+=
$refs
[
key
].
$el
.
clientHeight
;
heigth
+=
getPropertyValue
(
$refs
[
key
]);
}
}
}
else
if
(
key
==
"formHeaderRef"
)
{
console
.
log
(
"formHeaderRef:"
,
getPropertyValue
(
$refs
[
key
]));
heigth
+=
getPropertyValue
(
$refs
[
key
]);
}
});
console
.
log
(
"heigth:"
,
heigth
);
return
heigth
;
}
...
...
src/views/et86Config/et86HsCodeBlack/formConfig.js
View file @
aced338
export
const
formConfig
=
[
{
label
:
"
商品名
"
,
label
:
"
HSCODE
"
,
type
:
"Input"
,
name
:
"searchValue"
,
prop
:
"searchValue"
,
...
...
src/views/et86Config/et86HsCodeBlack/index.vue
View file @
aced338
...
...
@@ -13,6 +13,7 @@
</el-col>
</el-row>
<yl-table
ref="ylTable"
:attrs="tableAttr"
:loadingTable="tableAttr.loadingTable"
:columns="columns"
...
...
@@ -89,10 +90,10 @@ import { formConfig } from "./formConfig";
import { tableAttr, columnHeader } from "./tableConfig";
import { restTableHeight } from "@/utils";
import {
findHsCodeList, //
HScode黑名单
查询
delBlackList, //
HScode黑名单
删除
downLoadTemplate, //
HScode黑名单
下载模板
uploadHsCode, //
HScode黑名单
导入
findHsCodeList, //
ShipmentDesc
查询
delBlackList, //
ShipmentDesc
删除
downLoadTemplate, //
ShipmentDesc
下载模板
uploadHsCode, //
ShipmentDesc
导入
} from "@/api/et86HsCodeBlack";
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
...
...
@@ -140,15 +141,8 @@ export default {
},
mounted() {
this.$nextTick(() => {
let app = document.querySelector(".app-main");
if (this.$store.getters.appMainBlockClientHeight) {
this.tableAttr.maxHeight =
this.$store.getters.appMainBlockClientHeight -
restTableHeight(this.$refs);
} else {
this.tableAttr.maxHeight =
app.clientHeight - restTableHeight(this.$refs);
}
console.log(this.$refs)
this.tableAttr.maxHeight = window.innerHeight - restTableHeight(this.$refs);
});
},
methods: {
...
...
src/views/et86Config/et86RuleConfig/edit/index.vue
View file @
aced338
This diff is collapsed. Click to expand it.
src/views/et86Config/et86RuleConfig/index.vue
View file @
aced338
...
...
@@ -32,7 +32,7 @@ import YlForm from "@/components/YlForm";
import YlTable from "@/components/YlTable";
import { formConfig } from "./formConfig";
import { tableAttr, columnHeader } from "./tableConfig";
import { restTableHeight } from "@/utils";
import { restTableHeight
, sortList
} from "@/utils";
import {
findAllEtesRules, // ET86查询
deleteEtesRuleById, // 删除
...
...
@@ -71,16 +71,9 @@ export default {
},
mounted() {
this.$nextTick(() => {
let app = document.querySelector(".app-main");
if (this.$store.getters.appMainBlockClientHeight) {
this.tableAttr.maxHeight =
this.$store.getters.appMainBlockClientHeight -
restTableHeight(this.$refs);
} else {
this.tableAttr.maxHeight =
app.clientHeight - restTableHeight(this.$refs);
}
console.log(this.tableAttr.maxHeight);
console.log(window.innerHeight);
console.log(restTableHeight(this.$refs));
// this.tableAttr.maxHeight = window.innerHeight - restTableHeight(this.$refs);
});
},
methods: {
...
...
@@ -92,7 +85,13 @@ export default {
this.tableAttr.loadingTable = false;
const { code, data } = res;
if (code == 200) {
this.tableData = data.list;
const valid = data.list.filter((item) => item.status == "1"); // 有效
const invalid = data.list.filter((item) => item.status == "0"); // 无效
valid.reverse(); // 有效航班修改时间排序
invalid.reverse(); //
const newValid = sortList(valid, "originOfFlightNo"); // 有效原航班按字母排序
const newInvalid = sortList(invalid, "originOfFlightNo");
this.tableData = newValid.concat(newInvalid);
this.pageConfig.total = data.total;
}
})
...
...
src/views/et86Config/et86RuleConfig/tableConfig.js
View file @
aced338
...
...
@@ -7,6 +7,7 @@ export const tableAttr = {
loadingTable
:
false
,
isDragSort
:
false
,
// 拖拽tableData数据一定要加id字段
maxHeight
:
0
,
// defaultSort: { prop: "updateTime", order: "descending" },
btnCofig
:
{
isBtn
:
true
,
btnGroup
:
[
...
...
@@ -72,7 +73,8 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
prop
:
"updateTime"
,
align
:
"center"
,
minWidth
:
120
,
// "sort-method": (a, b) => b.createTime - a.createTime,
// sortable: true,
// "sort-method": (a, b) => a.createTime - b.createTime,
},
{
label
:
"修改人"
,
...
...
@@ -87,59 +89,82 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
minWidth
:
125
,
fixed
:
"right"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"el-button"
,
{
props
:
{
type
:
"text"
,
size
:
"mini"
,
icon
:
"el-icon-view"
,
},
on
:
{
click
()
{
viewRow
(
params
);
let
operateData
=
[]
if
(
params
.
row
.
status
==
"1"
)
{
operateData
=
[
h
(
"el-button"
,
{
props
:
{
type
:
"text"
,
size
:
"mini"
,
icon
:
"el-icon-view"
,
},
},
},
"查看"
),
h
(
"el-button"
,
{
props
:
{
type
:
"text"
,
size
:
"mini"
,
icon
:
"el-icon-edit"
,
},
on
:
{
click
()
{
editRow
(
params
);
on
:
{
click
()
{
viewRow
(
params
);
},
},
},
},
"修改"
),
h
(
"el-button"
,
{
style
:
{
color
:
"#ff4949"
,
"查看"
),
h
(
"el-button"
,
{
props
:
{
type
:
"text"
,
size
:
"mini"
,
icon
:
"el-icon-edit"
,
},
on
:
{
click
()
{
editRow
(
params
);
},
},
},
props
:
{
type
:
"text"
,
size
:
"mini"
,
icon
:
"el-icon-delete"
,
"修改"
),
h
(
"el-button"
,
{
style
:
{
color
:
"#ff4949"
,
},
props
:
{
type
:
"text"
,
size
:
"mini"
,
icon
:
"el-icon-delete"
,
},
on
:
{
click
()
{
deleteRow
(
params
);
},
},
},
on
:
{
click
()
{
deleteRow
(
params
);
"删除"
),
];
}
else
{
operateData
=
[
h
(
"el-button"
,
{
props
:
{
type
:
"text"
,
size
:
"mini"
,
icon
:
"el-icon-view"
,
},
on
:
{
click
()
{
viewRow
(
params
);
},
},
},
},
"删除"
),
]);
"查看"
),
];
}
return
h
(
"div"
,
operateData
);
},
},
];
...
...
src/views/et86Config/et86ShipmentDesc/index.vue
View file @
aced338
...
...
@@ -13,6 +13,7 @@
</el-col>
</el-row>
<yl-table
ref="ylTable"
:attrs="tableAttr"
:loadingTable="tableAttr.loadingTable"
:columns="columns"
...
...
Please
register
or
login
to post a comment