Commit 1df7c5c3 authored by 赵啸非's avatar 赵啸非

添加公共庫

parent 37deba36
......@@ -54,6 +54,7 @@
style="width: 100%"
max-height="550px"
highlight-current-row
reserve-selection
:row-key="(row) => row.id"
@current-change="handleCurrentChange"
>
......@@ -168,6 +169,7 @@
size="small"
v-loading="loadingRight"
:data="rightTableData"
reserve-selection
border
tooltip-effect="dark"
style="width: 100%"
......@@ -271,7 +273,7 @@
></PreviewMaterials>
<!-- 公共库 -->
<CommonLib :depList="depList" :libVisible.sync="libVisible"></CommonLib>
<CommonLib :matterId="matterId" @ok="getMaterialsList" :libVisible.sync="libVisible"></CommonLib>
</div>
</template>
......@@ -287,7 +289,6 @@ import {
recommendMaterials,
} from "@/api/materials";
import local from "@/utils/local";
import { mapGetters } from "vuex";
export default {
components: {
TableHeader,
......@@ -323,6 +324,7 @@ export default {
activeDep: {},
libVisible: false,
depList: [],
matterId:null,
recommendCount: "", // 推荐次数
};
},
......@@ -422,6 +424,7 @@ export default {
this.$message.warning("请先选择事项");
return;
}
this.matterId=this.activeDep.id
this.libVisible = true;
},
// 右边勾选
......
<template>
<div>
<el-dialog title="从公共库中选择" :visible.sync="Visible" width="50%">
<el-dialog title="从公共库中选择" :visible.sync="Visible" width="70%">
<TableHeader>
<div slot="right" class="flex">
<!-- <el-select
v-model="department"
class="autoWidth"
size="small"
placeholder="选择部门"
>
<template slot="prefix">
{{ (deptList.find((s) => s.id === department) || {}).name }}
</template>
<el-option
v-for="item in deptList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>-->
<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"
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="deptCode"
width="80"
show-overflow-tooltip
label="部门编号"
align="center"
prop="deptCode"
width="80"
>
</el-table-column>
<el-table-column prop="name" show-overflow-tooltip label="材料名称">
......@@ -69,30 +55,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>
......@@ -102,8 +88,10 @@
<script>
import TableHeader from "@/components/TableHeader.vue";
import { getPubdatumList } from "@/api/libray";
import {createMatter} from "@/api/matter";
import {getPubdatumList} from "@/api/libray";
import {addPubdatum} from "@/api/materials";
import local from "@/utils/local";
export default {
components: {
TableHeader,
......@@ -114,19 +102,21 @@ export default {
required: true,
default: false,
},
depList: {
type: Array,
required: true,
default: () => {
return [];
},
matterId: {
type: Number,
required: false,
default: 0,
},
},
created() {
this.getPbuList();
},
data() {
return {
siteId: local.getLocal("sampleSiteId")
? local.getLocal("sampleSiteId")
: "",
department: "",
searchVal: "",
tableData: [],
......@@ -134,7 +124,7 @@ export default {
current: 1,
total: 10,
size: 10,
selectedRowKeys :[],
selectedRowKeys: [],
};
},
computed: {
......@@ -146,7 +136,7 @@ export default {
this.$emit("update:libVisible", val);
},
},
// ...mapGetters(["deptList"]),
// ...mapGetters(["deptList"]),
},
methods: {
// 系统事项列表
......@@ -155,32 +145,28 @@ 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() {
console.log("select",this.selectedRowKeys)
let res = await addMatter({ ids: this.selectedRowKeys, 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.rightSelectedRowKeys = [];
this.$refs.rightTable.clearSelection();
this.getWriteMatterList();
this.$refs.multipleTable.clearSelection()
this.Visible = false;
this.$emit("ok");
}
console.log(11);
},
handleSarch() {
this.current=1
this.current = 1
this.getPbuList()
},
resetSearch() {
......@@ -193,8 +179,8 @@ export default {
this.size = size;
},
handleSelectionChange(select) {
this.selectedRowKeys=select.map(i => i.id);
// console.log(select);
this.selectedRowKeys = select.map(i => i.id);
// console.log(select);
},
},
};
......@@ -206,6 +192,7 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
}
.full-name {
color: rgb(172, 170, 170);
overflow: hidden;
......
......@@ -31,7 +31,7 @@ import java.util.Map;
@Component
@Slf4j
@Order(1)
@Profile({"default", "develop", "test"})
@Profile({"default", "develop", "test1"})
public class WebLogAspect {
@Pointcut("execution(public * com.mortals..*Controller.*(..))")
public void webLog() {
......
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