Commit 20f939e3 authored by “yiyousong”'s avatar “yiyousong”

fix:修改页面

parent 8e9e4105
......@@ -322,11 +322,14 @@
.el-card {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
.el-card__body {
height: 100%;
width: 100%;
flex:1;
padding-bottom:10px !important;
}
.gutter {
......
......@@ -43,7 +43,7 @@
size="small"
tooltip-effect="dark"
style="width: 100%"
max-height="550px"
max-height="676px"
:row-key="(row) => row.id"
>
<el-table-column
......@@ -59,7 +59,6 @@
label="设备名称"
align="center"
prop="deviceName"
width="200"
>
</el-table-column>
<el-table-column align="center" prop="deviceMac" label="mac地址">
......@@ -213,9 +212,10 @@ export default {
size: this.size,
deviceName: this.searchVal,
});
this.loading = false;
let { data } = res.data.data;
this.tableData = data;
this.loading = false;
this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
},
// 新增
handleAdd() {
......@@ -298,9 +298,9 @@ export default {
width: 100%;
height: 100%;
}
.table-content {
height: 550px;
}
// .table-content {
// height: 550px;
// }
/deep/.tableScopeSwitch .el-switch__label {
position: absolute;
display: none;
......
<template>
<div class="layouts flex flexc aic">
<Header></Header>
<div class="crumbs">
<!-- <div class="crumbs">
<el-breadcrumb separator="/">
<el-breadcrumb-item
><a :href="portalUrl + '/#/home/dataManagement/dataAdmin'"
......@@ -20,7 +20,7 @@
>{{ bread.title }}</el-breadcrumb-item
>
</el-breadcrumb>
</div>
</div> -->
<div class="out-box flex1">
<router-view></router-view>
</div>
......@@ -73,6 +73,8 @@ export default {
siteId: local.getLocal("sampleSiteId")
? local.getLocal("sampleSiteId")
: "",
page: 1,
size: -1,
});
let { code, data } = res.data;
if (code === 1) {
......
......@@ -56,7 +56,7 @@
border
tooltip-effect="dark"
style="width: 100%"
max-height="550px"
max-height="676px"
:row-key="(row) => row.id"
@selection-change="handleSelectionChange"
>
......@@ -75,7 +75,7 @@
label="部门名称"
align="center"
prop="deptName"
width="160"
width="200"
>
</el-table-column>
<el-table-column prop="name" show-overflow-tooltip label="材料名称">
......@@ -182,6 +182,7 @@ export default {
let { data, total } = res.data.data;
this.tableData = data;
this.total = total;
this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
}
},
......@@ -275,8 +276,8 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
}
.table-content {
height: 550px;
}
// .table-content {
// height: 550px;
// }
}
</style>
\ No newline at end of file
......@@ -49,13 +49,13 @@
<div class="table-content">
<div @click.stop>
<el-table
ref="singleTable"
ref="leftTable"
v-loading="loadingLeft"
:data="LeftTableData"
size="small"
tooltip-effect="dark"
style="width: 100%"
max-height="550px"
max-height="676px"
highlight-current-row
reserve-selection
:row-key="(row) => row.id"
......@@ -81,12 +81,12 @@
show-overflow-tooltip
label="事项名称"
>
<!-- <template slot-scope="scope">
<template slot-scope="scope">
<p class="short">{{ scope.row.matterName }}</p>
<p class="full-name">
事项全称:{{ scope.row.matterFullName }}
</p>
</template>-->
</template>
</el-table-column>
<el-table-column
prop="datumCount"
......@@ -169,7 +169,7 @@
<!-- 表格 -->
<div class="table-content">
<el-table
ref="multipleTable"
ref="rightTable"
size="small"
v-loading="loadingRight"
:data="rightTableData"
......@@ -177,7 +177,7 @@
border
tooltip-effect="dark"
style="width: 100%"
max-height="550px"
max-height="676px"
:row-key="(row) => row.id"
@selection-change="handleSelectionChangeRight"
>
......@@ -267,7 +267,7 @@
ref="AddMaterials"
:addMaterialsVisible.sync="addMaterialsVisible"
:title="title"
@addSuccess="getMaterialsList"
@addSuccess="addSuccess"
></AddMaterials>
<!-- 预览材料 -->
<PreviewMaterials
......@@ -277,8 +277,9 @@
<!-- 公共库 -->
<CommonLib
:matterId="matterId"
@ok="getMaterialsList"
ref="CommonLib"
:matterId="activeDep.id"
@ok="addSuccess"
:libVisible.sync="libVisible"
></CommonLib>
</div>
......@@ -354,11 +355,12 @@ export default {
deptCode: this.departmentLeft,
siteId: this.siteId,
});
this.loadingLeft = false;
if (res.data.code === 1) {
let { data, total } = res.data.data;
this.LeftTableData = data;
this.leftTotal = total;
this.loadingLeft = false;
this.$refs.leftTable.bodyWrapper.scrollTop = 0;
}
},
......@@ -373,6 +375,7 @@ export default {
deptCode: this.departmentRight,
siteId: parseInt(this.siteId),
});
this.loadingRight = false;
let { data, total, recommendCount } = res.data.data;
if (!data.length && this.rightCurrent > 1) {
this.rightCurrent -= 1;
......@@ -381,7 +384,7 @@ export default {
this.rightTotal = total;
this.rightTableData = data;
this.recommendCount = recommendCount;
this.loadingRight = false;
this.$refs.rightTable.bodyWrapper.scrollTop = 0;
},
// 左边搜索
handleSearchLeft() {
......@@ -403,14 +406,12 @@ export default {
this.getMaterialsList();
}
},
// 取消材料全选
setCurrent() {
this.$refs.singleTable.setCurrentRow();
this.$refs.leftTable.setCurrentRow();
this.activeDep = {};
this.getMaterialsList();
},
// 左边翻页
leftChangePagination(cur) {
this.leftCurrent = cur;
......@@ -438,7 +439,7 @@ export default {
this.$message.warning("请先选择事项");
return;
}
this.matterId = this.activeDep.id;
this.$refs.CommonLib.getPbuList();
this.libVisible = true;
},
// 右边勾选
......@@ -517,6 +518,11 @@ export default {
this.rightSize = size;
this.getMaterialsList();
},
// 新增材料成功
addSuccess() {
this.getWriteMatterList();
this.getMaterialsList();
},
},
};
</script>
......@@ -536,9 +542,9 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
}
.table-content {
height: 550px;
}
// .table-content {
// height: 550px;
// }
}
/deep/.current-row td:first-child {
border-left: 3px solid #1890ff;
......
......@@ -18,6 +18,7 @@
</TableHeader>
<el-table
ref="multipleTable"
v-loading="loading"
size="small"
:data="tableData"
reserve-selection
......@@ -75,7 +76,11 @@
</el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="handleOk"
<el-button
:loading="loading"
size="small"
type="primary"
@click="handleOk"
>确 定</el-button
>
<el-button size="small" @click="Visible = false">取 消</el-button>
......@@ -102,14 +107,11 @@ export default {
default: false,
},
matterId: {
type: Number,
required: false,
default: 0,
},
},
created() {
this.getPbuList();
},
created() {},
data() {
return {
siteId: local.getLocal("sampleSiteId")
......@@ -123,6 +125,8 @@ export default {
total: 10,
size: 10,
selectedRowKeys: [],
loading: false,
addLoading: false,
};
},
computed: {
......@@ -137,7 +141,7 @@ export default {
...mapGetters(["deptList"]),
},
methods: {
// 系统事项列表
// 公共库材料列表
async getPbuList() {
this.loading = true;
let res = await getPubdatumList({
......@@ -150,15 +154,18 @@ export default {
let { data, total } = res.data.data;
this.tableData = data;
this.total = total;
this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
}
},
async handleOk() {
this.addLoading = true;
let res = await addPubdatum({
ids: this.selectedRowKeys.join(","),
matterId: this.matterId,
siteId: this.siteId,
});
let { code, msg } = res.data;
this.addLoading = false;
if (code === 1) {
this.$message.success(msg);
this.$refs.multipleTable.clearSelection();
......
......@@ -58,10 +58,10 @@
v-loading="loadingLeft"
tooltip-effect="dark"
style="width: 100%"
max-height="550px"
max-height="676px"
:row-key="(row) => row.id"
@selection-change="handleSelectionChange"
ref="rightTable"
ref="leftTable"
>
<el-table-column type="selection" width="55" align="center">
</el-table-column>
......@@ -85,12 +85,12 @@
show-overflow-tooltip
label="事项名称"
>
<!-- <template slot-scope="scope">
<template slot-scope="scope">
<p class="short">{{ scope.row.matterName }}</p>
<p class="full-name">
事项全称:{{ scope.row.matterFullName }}
</p>
</template>-->
</template>
</el-table-column>
<el-table-column
prop="tid"
......@@ -194,7 +194,7 @@
class="ml10 mr10"
placeholder="请输入事项名称搜索"
></el-input>
<el-button size="small" type="primary" @click="getMatterList"
<el-button size="small" type="primary" @click="handleSearchRight"
>搜索</el-button
>
<el-button size="small" @click="rightReset">重置</el-button>
......@@ -204,12 +204,13 @@
<div class="table-content">
<el-table
size="small"
ref="rightTable"
:data="rightTableData"
border
v-loading="loadingRight"
tooltip-effect="dark"
style="width: 100%"
max-height="550px"
max-height="676px"
:row-key="(row) => row.id"
@selection-change="handleSelectionChangeRight"
>
......@@ -324,7 +325,6 @@ export default {
created() {
this.getMatterList();
this.getWriteMatterList();
console.log(this.deptList);
},
computed: {
...mapGetters(["deptList"]),
......@@ -340,11 +340,12 @@ export default {
deptCode: this.departmentRight,
siteId: this.siteId,
});
this.loadingRight = false;
if (res.data.code === 1) {
let { total, data } = res.data.data;
this.rightTableData = data;
this.rightTotal = total;
this.loadingRight = false;
this.$refs.rightTable.bodyWrapper.scrollTop = 0;
}
},
......@@ -358,6 +359,7 @@ export default {
deptCode: this.departmentLeft,
siteId: this.siteId,
});
this.loadingLeft = false;
if (res.data.code === 1) {
let { data, total, recommendCount } = res.data.data;
if (!data.length && this.leftCurrent > 1) {
......@@ -367,7 +369,7 @@ export default {
this.LeftTableData = data;
this.leftTotal = total;
this.recommendCount = recommendCount;
this.loadingLeft = false;
this.$refs.leftTable.bodyWrapper.scrollTop = 0;
}
},
// 新增事项
......@@ -454,6 +456,11 @@ export default {
console.log("取消成功!");
});
},
// 右边搜索
handleSearchRight() {
this.rightCurrent = 1;
this.getMatterList();
},
// 右边重置
rightReset() {
this.rightSearch = "";
......@@ -518,9 +525,9 @@ export default {
/deep/.el-card {
height: 100%;
}
.table-content {
height: 550px;
}
// .table-content {
// height: 550px;
// }
.left {
width: 50%;
height: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment