Commit 68bc388d authored by “yiyousong”'s avatar “yiyousong”

fix:修改页面

parent e25bb664
......@@ -36,7 +36,8 @@ export default {
<style lang="less" scoped>
.app {
width: 100%;
height: 100%;
min-height: 100%;
background-color: #f0f2f5;
display: flex;
}
</style>
......@@ -364,4 +364,7 @@
.autoWidth .el-input__inner {
padding-left: 15px !important;
position: absolute;
}
\ No newline at end of file
}
.el-tooltip__popper {
max-width: 20%;
}
\ No newline at end of file
......@@ -27,7 +27,7 @@
class="ml10 mr10"
placeholder="请输入设备名称搜索"
></el-input>
<el-button size="small" type="primary" @click="getDeviceList"
<el-button size="small" type="primary" @click="handleSearch"
>搜 索</el-button
>
<el-button size="small" @click="searchReset">重 置</el-button>
......@@ -223,10 +223,16 @@ export default {
this.$refs.AddDevice.onAdd();
this.dialogVisible = true;
},
// 搜索
handleSearch() {
this.current = 1;
this.getDeviceList();
},
// 重置
searchReset() {
this.searchVal = "";
this.current = 1;
this.getDeviceList();
},
// 翻页
......
......@@ -24,7 +24,6 @@
<div class="out-box flex1">
<router-view></router-view>
</div>
<div class="footer tac">Copyright &copy;2021 ICZER 信宏翔科技有限公司</div>
</div>
</template>
......@@ -87,22 +86,18 @@ export default {
<style lang="less" scoped>
.layouts {
width: 100%;
height: 100%;
height: auto;
padding-bottom: 10px;
.crumbs {
margin: 10px 0px;
width: 98%;
}
.out-box {
width: 98%;
margin-top: 10px;
border-radius: 4px;
background-color: #fff;
overflow-y: auto;
}
.footer {
height: 50px;
line-height: 50px;
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
}
}
</style>
\ No newline at end of file
......@@ -6,7 +6,7 @@
</div>
<TableHeader>
<div slot="left">
<!-- <el-button size="small" type="primary" @click="handleAddMaterials"
<!-- <el-button size="small" type="primary" @click="handleAddMaterials"
>加入材料</el-button
>-->
<el-button size="small" type="danger" @click="handleDelAll"
......@@ -21,7 +21,9 @@
placeholder="选择部门"
>
<template slot="prefix">
{{ (deptList.find((v) => v.deptNumber === department) || {}).name }}
{{
(deptList.find((v) => v.deptNumber === department) || {}).name
}}
</template>
<el-option
v-for="item in deptList"
......@@ -119,7 +121,7 @@
</div>
</el-card>
<!-- 添加材料 -->
<!-- <AddMaterals
<!-- <AddMaterals
ref="AddMaterals"
:depList="depList"
:libVisible.sync="libVisible"
......@@ -135,12 +137,12 @@
<script>
import TableHeader from "@/components/TableHeader.vue";
import PreviewMaterals from "./modal/PreviewMaterals.vue";
import { getPubdatumList,delPubdatum } from "@/api/libray";
import { getPubdatumList, delPubdatum } from "@/api/libray";
import { mapGetters } from "vuex";
export default {
components: {
TableHeader,
PreviewMaterals
PreviewMaterals,
},
data() {
return {
......@@ -172,7 +174,7 @@ export default {
let res = await getPubdatumList({
page: this.current,
size: this.size,
materialName:this.searchVal,
materialName: this.searchVal,
deptCode: this.department,
});
this.loading = false;
......@@ -180,7 +182,6 @@ export default {
let { data, total } = res.data.data;
this.tableData = data;
this.total = total;
}
},
......@@ -200,13 +201,14 @@ export default {
},
// 搜索
handleSearch() {
this.current=1
this.getPbuList()
this.current = 1;
this.getPbuList();
},
// 重置
handleReset() {
this.department = "";
this.searchVal = "";
this.getPbuList();
},
// 选中
handleSelectionChange(select) {
......@@ -215,14 +217,16 @@ export default {
// 翻页
changePagination(cur) {
this.current = cur;
this.getPbuList();
},
// 改变没有显示数量
changeSize(size) {
this.size = size;
this.getPbuList();
},
// 预览
handlePreview(row) {
console.log("row",row)
this.materalsInfo = row;
this.previewVisible = true;
},
......
......@@ -4,13 +4,14 @@
<div class="main flex flexc aic">
<div class="header tac mb20">
<div class="materals-name mb10">{{ materialsInfo.materialName }}</div>
<p class="abbreviation">材料全称:{{ materialsInfo.materiaFullName }}</p>
<p class="abbreviation">
材料全称:{{ materialsInfo.materiaFullName }}
</p>
</div>
<div class="preview-box">
<img class="sample-sheet-img" :src="api + materialsPreview" />
</div>
</div>
</el-dialog>
</div>
</template>
......@@ -46,7 +47,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL,
api: process.env.VUE_APP_API_BASE_URL + "/",
val: "",
};
},
......@@ -87,7 +88,6 @@ export default {
// box-shadow: 2px 2px 8px 8px #ccc;
.sample-sheet-img {
width: 100%;
object-fit: contain;
}
}
}
......
......@@ -19,7 +19,10 @@
class="autoWidth"
>
<template slot="prefix">
{{ (deptList.find((v) => v.deptNumber === departmentLeft) || {}).name }}
{{
(deptList.find((v) => v.deptNumber === departmentLeft) || {})
.name
}}
</template>
<el-option
v-for="item in deptList"
......@@ -36,7 +39,7 @@
class="ml10 mr10"
placeholder="请输入事项名称搜索"
></el-input>
<el-button size="small" type="primary" @click="getWriteMatterList"
<el-button size="small" type="primary" @click="handleSearchLeft"
>搜索</el-button
>
<el-button size="small" @click="leftReset">重置</el-button>
......@@ -78,7 +81,7 @@
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 }}
......@@ -138,7 +141,8 @@
>
<template slot="prefix">
{{
(deptList.find((v) => v.deptNumber === departmentRight) || {}).name
(deptList.find((v) => v.deptNumber === departmentRight) || {})
.name
}}
</template>
<el-option
......@@ -156,7 +160,7 @@
class="ml10 mr10"
placeholder="请输入材料名称搜索"
></el-input>
<el-button size="small" type="primary" @click="getMaterialsList"
<el-button size="small" type="primary" @click="handleSearchRight"
>搜索</el-button
>
<el-button size="small" @click="rightReset">重置</el-button>
......@@ -222,8 +226,7 @@
<span
@click="handleRecommend(scope.row.id)"
v-else
class="pointer"
:class="{ primary: recommendCount < 5 }"
class="pointer primary"
>推荐</span
>
</div>
......@@ -273,7 +276,11 @@
></PreviewMaterials>
<!-- 公共库 -->
<CommonLib :matterId="matterId" @ok="getMaterialsList" :libVisible.sync="libVisible"></CommonLib>
<CommonLib
:matterId="matterId"
@ok="getMaterialsList"
:libVisible.sync="libVisible"
></CommonLib>
</div>
</template>
......@@ -325,7 +332,7 @@ export default {
activeDep: {},
libVisible: false,
depList: [],
matterId:null,
matterId: null,
recommendCount: "", // 推荐次数
};
},
......@@ -374,21 +381,27 @@ export default {
this.rightTotal = total;
this.rightTableData = data;
this.recommendCount = recommendCount;
console.log(data);
this.loadingRight = false;
},
// 左边搜索
handleSearchLeft() {
this.leftCurrent = 1;
this.getWriteMatterList();
},
// 左边重置
leftReset() {
this.departmentLeft = "";
this.leftSearch = "";
this.leftCurrent = 1;
this.getWriteMatterList();
},
// 左边选择表格行
handleCurrentChange(currentRow) {
this.activeDep = currentRow;
this.getMaterialsList();
if (currentRow) {
this.activeDep = currentRow;
this.getMaterialsList();
}
},
// 取消材料全选
......@@ -425,7 +438,7 @@ export default {
this.$message.warning("请先选择事项");
return;
}
this.matterId=this.activeDep.id
this.matterId = this.activeDep.id;
this.libVisible = true;
},
// 右边勾选
......@@ -441,16 +454,21 @@ export default {
let ids = this.rightSelectedRowKeys.map((v) => v.id).join(",");
this.handleDel(ids);
},
// 右边搜索
handleSearchRight() {
this.rightCurrent = 1;
this.getMaterialsList();
},
// 右边重置
rightReset() {
this.departmentRight = "";
this.rightSearch = "";
this.rightCurrent = 1;
this.getMaterialsList();
},
// 推荐
async handleRecommend(id) {
let res = await recommendMaterials({id:id,siteId:this.siteId });
let res = await recommendMaterials({ id: id, siteId: this.siteId });
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
......
......@@ -79,9 +79,10 @@
:on-success="OnsuccessSamplePath"
:headers="headers"
:before-upload="beforeUpload"
accept="application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<el-button size="small" type="primary">上传Word文件</el-button>
<span class="tips">提示:请上传.docx格式</span>
</el-upload>
</el-form-item>
</el-form>
......@@ -124,8 +125,8 @@ export default {
source: 1, // 来源
matterId: "", // 事项id
siteId: local.getLocal("sampleSiteId")
? local.getLocal("sampleSiteId")
: "",
? local.getLocal("sampleSiteId")
: "",
matterNo: "", // 事项编号
fileName: "", // 附件名称
fileUrl: "", // 附件地址
......@@ -282,7 +283,10 @@ export default {
/deep/.el-select {
width: 100%;
}
.tips {
margin-left: 10px;
color: #ccc;
}
/deep/.tableScopeSwitch .el-switch__label {
position: absolute;
display: none;
......
......@@ -3,49 +3,47 @@
<el-dialog title="从公共库中选择" :visible.sync="Visible" width="70%">
<TableHeader>
<div slot="right" class="flex">
<el-input
size="small"
style="width: 200px"
v-model="searchVal"
class="ml10 mr10"
placeholder="请输入事项名称搜索"
size="small"
style="width: 200px"
v-model="searchVal"
class="ml10 mr10"
placeholder="请输入事项名称搜索"
></el-input>
<el-button size="small" type="primary" @click="handleSarch"
>搜索
</el-button
>
>搜索
</el-button>
<el-button size="small" @click="resetSearch">重置</el-button>
</div>
</TableHeader>
<el-table
ref="multipleTable"
size="small"
:data="tableData"
reserve-selection
border
tooltip-effect="dark"
style="width: 100%"
max-height="500px"
:row-key="(row) => row.id"
@selection-change="handleSelectionChange"
ref="multipleTable"
size="small"
:data="tableData"
reserve-selection
border
tooltip-effect="dark"
style="width: 100%"
max-height="500px"
:row-key="(row) => row.id"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column
type="index"
label="序号"
width="55"
align="center"
:index="(index) => (current - 1) * size + index + 1"
type="index"
label="序号"
width="55"
align="center"
:index="(index) => (current - 1) * size + index + 1"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
label="部门名称"
align="center"
prop="deptName"
width="80"
show-overflow-tooltip
label="部门名称"
align="center"
prop="deptName"
width="300"
>
</el-table-column>
<el-table-column prop="name" show-overflow-tooltip label="材料名称">
......@@ -55,30 +53,30 @@
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="加入时间"
align="center"
width="140"
prop="createTime"
label="加入时间"
align="center"
width="140"
>
</el-table-column>
</el-table>
<div class="pagination" v-if="total">
<el-pagination
background
layout="total,sizes,prev,pager,next,jumper"
:pager-count="5"
:total="total"
:current-page="current"
:page-size="size"
:page-sizes="pageSizes"
@current-change="changePagination"
@size-change="changeSize"
background
layout="total,sizes,prev,pager,next,jumper"
:pager-count="5"
:total="total"
:current-page="current"
:page-size="size"
:page-sizes="pageSizes"
@current-change="changePagination"
@size-change="changeSize"
>
</el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="handleOk"
>确 定</el-button
>确 定</el-button
>
<el-button size="small" @click="Visible = false">取 消</el-button>
</span>
......@@ -88,8 +86,8 @@
<script>
import TableHeader from "@/components/TableHeader.vue";
import {getPubdatumList} from "@/api/libray";
import {addPubdatum} from "@/api/materials";
import { getPubdatumList } from "@/api/libray";
import { addPubdatum } from "@/api/materials";
import local from "@/utils/local";
import { mapGetters } from "vuex";
......@@ -108,7 +106,6 @@ export default {
required: false,
default: 0,
},
},
created() {
this.getPbuList();
......@@ -116,8 +113,8 @@ export default {
data() {
return {
siteId: local.getLocal("sampleSiteId")
? local.getLocal("sampleSiteId")
: "",
? local.getLocal("sampleSiteId")
: "",
department: "",
searchVal: "",
tableData: [],
......@@ -137,7 +134,7 @@ export default {
this.$emit("update:libVisible", val);
},
},
...mapGetters(["deptList"]),
...mapGetters(["deptList"]),
},
methods: {
// 系统事项列表
......@@ -146,41 +143,49 @@ export default {
let res = await getPubdatumList({
page: this.current,
size: this.size,
materialName: this.searchVal
materialName: this.searchVal,
});
this.loading = false;
if (res.data.code === 1) {
let {data, total} = res.data.data;
let { data, total } = res.data.data;
this.tableData = data;
this.total = total;
}
},
async handleOk() {
let res = await addPubdatum({ids: this.selectedRowKeys.join(","), matterId: this.matterId, siteId: this.siteId});
let {code, msg} = res.data;
let res = await addPubdatum({
ids: this.selectedRowKeys.join(","),
matterId: this.matterId,
siteId: this.siteId,
});
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$refs.multipleTable.clearSelection()
this.$refs.multipleTable.clearSelection();
this.Visible = false;
this.$emit("ok");
}
},
handleSarch() {
this.current = 1
this.getPbuList()
this.current = 1;
this.getPbuList();
},
resetSearch() {
this.current = 1;
this.searchVal = "";
this.getPbuList();
},
changePagination(cur) {
this.current = cur;
this.getPbuList();
},
changeSize(size) {
this.size = size;
this.getPbuList();
},
handleSelectionChange(select) {
this.selectedRowKeys = select.map(i => i.id);
this.selectedRowKeys = select.map((i) => i.id);
// console.log(select);
},
},
......
......@@ -3,7 +3,7 @@
<el-drawer
title="材料预览"
:visible.sync="Visible"
size="60%"
size="50%"
@close="handleClose"
>
<div class="main flex">
......@@ -19,13 +19,13 @@
<img class="sample-sheet-img" :src="api + materialsPreview" />
</div>
</div>
<!-- <div class="right">-->
<!-- <formBuilder-->
<!-- ref="formBuilder"-->
<!-- :buildData="materialsJsonList"-->
<!-- v-model="val"-->
<!-- ></formBuilder>-->
<!-- </div>-->
<!-- <div class="right">-->
<!-- <formBuilder-->
<!-- ref="formBuilder"-->
<!-- :buildData="materialsJsonList"-->
<!-- v-model="val"-->
<!-- ></formBuilder>-->
<!-- </div>-->
</div>
</el-drawer>
</div>
......@@ -56,7 +56,7 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL,
api: process.env.VUE_APP_API_BASE_URL + "/",
val: "",
};
},
......@@ -108,10 +108,24 @@ export default {
height: 100%;
}
.left {
width: 50%;
width: 100%;
height: 100%;
background-color: #e8e8e8;
overflow-y: auto;
&::-webkit-scrollbar {
width: 10px;
overflow-y: auto;
}
&::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(144, 147, 153, 0.5);
}
&::-webkit-scrollbar-track {
border-radius: 6px;
background: #fff;
}
.left-header {
height: 80px;
......@@ -130,8 +144,6 @@ export default {
}
.sample-sheet-img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.right {
......
......@@ -23,7 +23,10 @@
class="autoWidth"
>
<template slot="prefix">
{{ (deptList.find((v) => v.deptNumber === departmentLeft) || {}).name }}
{{
(deptList.find((v) => v.deptNumber === departmentLeft) || {})
.name
}}
</template>
<el-option
v-for="item in deptList"
......@@ -77,8 +80,12 @@
prop="deptName"
>
</el-table-column>
<el-table-column prop="matterName" show-overflow-tooltip label="事项名称">
<!-- <template slot-scope="scope">
<el-table-column
prop="matterName"
show-overflow-tooltip
label="事项名称"
>
<!-- <template slot-scope="scope">
<p class="short">{{ scope.row.matterName }}</p>
<p class="full-name">
事项全称:{{ scope.row.matterFullName }}
......@@ -115,8 +122,7 @@
<span
@click="handleRecommend(scope.row.id)"
v-else
class="pointer"
:class="{ primary: recommendCount < 5 }"
class="pointer primary"
>推荐</span
>
</div>
......@@ -161,7 +167,7 @@
>
</div>
<div slot="right" class="flex">
<el-select
<el-select
v-model="departmentRight"
size="small"
placeholder="选择部门"
......@@ -169,7 +175,8 @@
>
<template slot="prefix">
{{
(deptList.find((v) => v.deptNumber === departmentRight) || {}).name
(deptList.find((v) => v.deptNumber === departmentRight) || {})
.name
}}
</template>
<el-option
......@@ -361,7 +368,6 @@ export default {
this.leftTotal = total;
this.recommendCount = recommendCount;
this.loadingLeft = false;
console.log(res.data, this.recommendCount);
}
},
// 新增事项
......@@ -400,13 +406,14 @@ export default {
},
// 左边搜索
searchLeft() {
this.leftCurrent=1
this.leftCurrent = 1;
this.getWriteMatterList();
},
// 左边重置
leftReset() {
this.departmentLeft = "";
this.leftSearch = "";
this.leftCurrent = 1;
this.getWriteMatterList();
},
// 左边勾选
......@@ -451,6 +458,7 @@ export default {
rightReset() {
this.rightSearch = "";
this.departmentRight = "";
this.rightCurrent = 1;
this.getMatterList();
},
// 右边勾选
......
<template>
<div>
<el-dialog
:title="title"
:visible.sync="Visible"
width="30%"
@close="handleClose"
:title="title"
:visible.sync="Visible"
width="30%"
@close="handleClose"
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="事项简称" prop="matterName">
<el-input
size="small"
v-model="form.matterName"
placeholder="请输入事项简称"
size="small"
v-model="form.matterName"
placeholder="请输入事项简称"
></el-input>
</el-form-item>
<el-form-item label="事项全称" prop="matterFullName">
<el-input
size="small"
v-model="form.matterFullName"
placeholder="请输入事项全称"
size="small"
v-model="form.matterFullName"
placeholder="请输入事项全称"
></el-input>
</el-form-item>
<el-form-item label="事项编号" prop="matterNo">
<el-input
size="small"
v-model="form.matterNo"
placeholder="请输入事项编号"
size="small"
v-model="form.matterNo"
placeholder="请输入事项编号"
></el-input>
</el-form-item>
<el-form-item label="选择部门" prop="deptId">
<el-form-item label="选择部门" prop="deptCode">
<el-select
size="small"
ref="myselected"
v-model="form.deptCode"
placeholder="请选择部门"
@change="handleChange"
size="small"
ref="myselected"
v-model="form.deptCode"
placeholder="请选择部门"
@change="handleChange"
>
<el-option
v-for="v in departmentList"
:key="v.deptNumber"
:label="v.name"
:value="v.deptNumber"
v-for="v in departmentList"
:key="v.deptNumber"
:label="v.name"
:value="v.deptNumber"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="handleOk"
>确 定</el-button
>确 定</el-button
>
<el-button size="small" @click="handleRest">重 置</el-button>
</span>
......@@ -84,10 +84,11 @@ export default {
matterFullName: "", // 事项全称
matterName: "", // 事项简称
deptId: "", // 部门id
deptCode: "", // 部门编号
matterNo: "", // 事项编号
siteId: local.getLocal("writeSiteId")
? local.getLocal("writeSiteId")
: "",
? local.getLocal("writeSiteId")
: "",
source: 0,
deptName: "",
},
......@@ -98,7 +99,7 @@ export default {
matterName: [
{ required: true, message: "请输入事项简称", trigger: "blur" },
],
deptId: [
deptCode: [
{ required: true, message: "请输选择部门", trigger: "change" },
],
matterNo: [
......
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