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

fix:修改页面

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