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
jinhui.wang
2022-03-30 14:04:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
73e486590f654362112a185289a63396a2b9f53a
73e48659
1 parent
f0858ccb
bug修正代码更新
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
62 deletions
src/components/Table/index.vue
src/views/allocationConfig/cargoAllocation/index.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/basicInformation/queryCargo/index.vue
src/views/systemConfig/roleConfig/drawer.vue
src/views/systemConfig/roleConfig/index.vue
src/views/systemConfig/userConfig/drawer.vue
src/views/systemConfig/userConfig/index.vue
src/components/Table/index.vue
View file @
73e4865
...
...
@@ -104,7 +104,7 @@ export default {
default: "mini",
},
height: {
type:
String
,
type:
[String, Number]
,
default: "400",
},
fit: {
...
...
@@ -202,10 +202,18 @@ export default {
created() {
this.newHeader = this.headerData;
},
watch:{
page(){
watch:
{
page()
{
this.pageNum = this.page;
}
},
data() {
this.data.forEach((item, index) => {
item.index = index;
});
this.$nextTick(()=>{
this.$refs.tables.doLayout()
})
},
},
mounted() {},
methods: {
...
...
@@ -226,7 +234,7 @@ export default {
currentChange(val) {
this.$emit("currentChange", {
page: val,
start:
val > 1 ? (val-
1) * this.limitSize + 1 : val,
start:
val > 1 ? (val -
1) * this.limitSize + 1 : val,
});
scrollTo(0, 800);
},
...
...
@@ -245,15 +253,15 @@ export default {
} else if (selection.includes(this.data[row.index])) {
if (!selection.includes(this.data[this.start])) {
this.$refs.tables.toggleRowSelection(this.data[this.start], true);
if
(this.selectTable.includes(this.data[this.start]))
{
if
(this.selectTable.includes(this.data[this.start]))
{
this.selectTable.push(this.data[this.start]);
}
}
for (i = min; i <= sum + min; i++) {
this.$refs.tables.toggleRowSelection(this.data[i], true);
if
(!this.selectTable.includes(this.data[i]))
{
if
(!this.selectTable.includes(this.data[i]))
{
this.selectTable.push(this.data[i]);
}
}
}
} else if (!selection.includes(this.data[row.index])) {
this.selectTable.splice(min > 1 ? min - 2 : min, sum + 1);
...
...
@@ -274,7 +282,7 @@ export default {
}
}
}
selection = this.selectTable.sort(this.compare(
'index','ascending'
));
selection = this.selectTable.sort(this.compare(
"index", "ascending"
));
this.$emit("tableSelect", { selection, row });
},
tableSelectAll(selection) {
...
...
@@ -313,6 +321,9 @@ export default {
return dictLabels[column.property][cellValue];
}
}
if (column.property == "roleNames") {
return cellValue.toString();
}
return cellValue;
},
},
...
...
src/views/allocationConfig/cargoAllocation/index.vue
View file @
73e4865
...
...
@@ -72,7 +72,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<
!-- <
el-col :span="6">
<el-form-item label="ACCSpool">
<el-select
placeholder="不限"
...
...
@@ -97,7 +97,7 @@
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-col>
-->
<el-col :span="6">
<el-form-item label="运单号">
<el-input
...
...
@@ -376,7 +376,7 @@ export default {
handingCodes: null,
subCategorys: null,
customsReceiptStatusId: null,
accsPool:"OSPR"
//
accsPool:"OSPR"
}, //查询数据
tableHeader: [
{
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
73e4865
...
...
@@ -875,7 +875,7 @@ export default {
}
});
this.tableHeight =
window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 1
2
0;
window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 1
5
0;
},
methods: {
//输入航班号后
...
...
src/views/basicInformation/queryCargo/index.vue
View file @
73e4865
...
...
@@ -792,7 +792,7 @@ export default {
this.shiftKey = false;
}
});
this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight-
5
0
this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight-
8
0
},
methods: {
...
...
src/views/systemConfig/roleConfig/drawer.vue
View file @
73e4865
...
...
@@ -157,12 +157,15 @@ export default {
drawer(val,oldVal){
if(val){
this.roleForm = this.roleData;
}else{
this.loading = false;
}
}
},
methods: {
//关闭
handleClose() {
this.$refs['roleForm'].clearValidate();
this.$emit("handleClose", false);
},
...
...
@@ -177,12 +180,12 @@ export default {
formData.name = this.roleForm.name;
addOrUpdateRole(formData)
.then((res) => {
this.loading = false;
if (res.code === 200) {
this.$message({
message: "操作成功",
type: "success",
});
this.loading = false;
this.$emit("handleClose", false);
} else {
this.$message({
...
...
src/views/systemConfig/roleConfig/index.vue
View file @
73e4865
...
...
@@ -19,6 +19,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
clearable
>
</el-date-picker>
...
...
@@ -28,7 +29,7 @@
<el-form-item label="状态">
<el-select v-model="formData.valid" placeholder="角色状态" clearable>
<el-option label="开启" value="1"> </el-option>
<el-option label="关闭" value="
1
"> </el-option>
<el-option label="关闭" value="
2
"> </el-option>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -148,7 +149,7 @@ export default {
{
type: "",
name: "创建人",
value: "
remark
",
value: "
createUserName
",
width: "150px",
align: "center",
sorTable: false,
...
...
@@ -210,7 +211,6 @@ export default {
this.formData.createStart = this.createTime[0];
this.formData.createEnd = this.createTime[1];
}
getRoleList(this.formData)
.then((res) => {
this.tableLoading = false;
...
...
@@ -261,7 +261,7 @@ export default {
status == 0
? (this.roleFormDisabled = true)
: (this.roleFormDisabled = false);
this.drawerTitle = "
查看/
修改角色";
this.drawerTitle = "修改角色";
},
//修改角色状态
roleStatus(row) {
...
...
src/views/systemConfig/userConfig/drawer.vue
View file @
73e4865
...
...
@@ -103,12 +103,9 @@
</el-form-item>
</el-col> -->
<el-col :span="24">
<el-form-item
label="所属口岸:"
prop="portName"
>
<el-form-item label="所属口岸:" prop="portName">
<el-select
placeholder="
不限
"
placeholder="
请选择口岸
"
v-model="port"
:disabled="userFormDisabled"
size="small"
...
...
@@ -216,14 +213,14 @@ export default {
loginName: [
{
required: true,
message: "
角色名
不能为空",
message: "
员工号
不能为空",
trigger: "blur",
},
],
username: [
{
required: true,
message: "
角色
名不能为空",
message: "
用户
名不能为空",
trigger: "blur",
},
],
...
...
@@ -238,11 +235,12 @@ export default {
};
},
created() {
this.selectRoleList();
},
watch:{
drawer(val,oldVal){
if(val){
watch: {
drawer(val, oldVal) {
if (val) {
this.roleList = []
this.selectRoleList();
this.userForm = this.userData;
if (this.userForm.roleIds) {
this.roleid = this.userForm.roleIds;
...
...
@@ -250,11 +248,16 @@ export default {
if (this.userForm.portName) {
this.port = this.userForm.portName;
}
}else{
this.loading = false;
}
}
}
,
},
methods: {
change(val){
clearValidate(formName){
this.$refs[formName].clearValidate();
},
change(val) {
this.roleid = val;
},
selectRoleList() {
...
...
@@ -262,11 +265,11 @@ export default {
getRoleList({ size: null, page: null })
.then((res) => {
if (res.code === 200) {
res.data.list.map(
item=>
{
if
(item.valid == 1)
{
this.roleList.push(item)
res.data.list.map(
(item) =>
{
if
(item.valid == 1)
{
this.roleList.push(item)
;
}
})
})
;
} else {
this.$message({
message: res.msg,
...
...
@@ -302,35 +305,43 @@ export default {
this.userForm = {
roleIds: [],
};
this.clearValidate('userForm')
this.$emit("handleClose", false);
},
//提交
submit() {
this.loading = true;
this.userData.isValid ? "" : (this.userForm.isValid = 1);
this.userForm.roleIds = this.roleid;
this.userForm.portName = this.port.join(",");
addOrUpdateUser(this.userForm)
.then((res) => {
this.loading = false;
if (res.code === 200) {
this.$message({
message: "操作成功",
type: "success",
});
this.$emit("handleClose", false);
} else {
this.$message({
message: res.msg,
type: "warning",
});
}
})
.catch((err) => {
this.loading = false;
console.log(err);
});
if (this.port.join(",").length > 0) {
this.loading = true;
this.userData.isValid ? "" : (this.userForm.isValid = 1);
this.userForm.roleIds = this.roleid;
this.userForm.portName = this.port.join(",");
addOrUpdateUser(this.userForm)
.then((res) => {
this.loading = false;
if (res.code === 200) {
this.$message({
message: "操作成功",
type: "success",
});
this.$emit("handleClose", false);
} else {
this.$message({
message: res.msg,
type: "warning",
});
}
})
.catch((err) => {
this.loading = false;
console.log(err);
});
}else{
this.$message({
message: "口岸不能为空",
type: "warning",
});
}
},
},
};
...
...
src/views/systemConfig/userConfig/index.vue
View file @
73e4865
...
...
@@ -14,7 +14,7 @@
<el-col :span="6">
<el-form-item label="手机号码">
<el-input
placeholder="请输入
用户名称
"
placeholder="请输入
手机号码
"
v-model="formData.phone"
clearable
></el-input>
...
...
@@ -278,7 +278,7 @@ export default {
detailUser(id)
.then((res) => {
this.drawer = true;
this.drawerTitle = "
查看/
修改用户";
this.drawerTitle = "修改用户";
if (res.code === 200) {
this.userData = res.data;
this.userData.portName
...
...
Please
register
or
login
to post a comment