Commit 10753246 authored by 赵啸非's avatar 赵啸非

添加级联删除事项材料

parent 5ea264e5
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<span v-else>{{ i + 1 }}.</span> <span v-else>{{ i + 1 }}.</span>
</div> </div>
<p class="flex1" v-ellipsis> <p class="flex1" v-ellipsis>
{{ v }} {{ v.materialName }}
</p> </p>
</div> </div>
</div> </div>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
</div> </div>
<div <div
class="hot-matter-list flex1 mt10" class="hot-matter-list flex1 mt10"
v-if="datumList && datumList.length" v-if="matterList && matterList.length"
> >
<vue-seamless-scroll <vue-seamless-scroll
:class-option="optionTop" :class-option="optionTop"
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<div> <div>
<div <div
class="hot-matter-item flex aic" class="hot-matter-item flex aic"
v-for="(v, i) in datumList" v-for="(v, i) in matterList"
:key="v.id" :key="v.id"
> >
<div class="flex aic jcc item-index"> <div class="flex aic jcc item-index">
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<span v-else>{{ i + 1 }}.</span> <span v-else>{{ i + 1 }}.</span>
</div> </div>
<p class="flex1" v-ellipsis> <p class="flex1" v-ellipsis>
{{ v }} {{ v.matterName }}
</p> </p>
</div> </div>
</div> </div>
...@@ -181,6 +181,7 @@ export default { ...@@ -181,6 +181,7 @@ export default {
top3: require("../../assets/img/png_no.3.png"), top3: require("../../assets/img/png_no.3.png"),
homeInfo: {}, // 首页数据 homeInfo: {}, // 首页数据
datumList: [], datumList: [],
matterList: [],
baseTitle: process.env.VUE_APP_API_BASE_title, baseTitle: process.env.VUE_APP_API_BASE_title,
}; };
}, },
...@@ -215,6 +216,8 @@ export default { ...@@ -215,6 +216,8 @@ export default {
if (code === 1) { if (code === 1) {
// data.hotWords = data.hotWords.split(","); // data.hotWords = data.hotWords.split(",");
this.homeInfo = data; this.homeInfo = data;
this.matterList = data.matterList;
this.datumList = data.datumList;
} }
}, },
checkTopImg(index) { checkTopImg(index) {
......
...@@ -69,7 +69,8 @@ import LeftMenus from "./components/LeftMenus.vue"; ...@@ -69,7 +69,8 @@ import LeftMenus from "./components/LeftMenus.vue";
import PageTop from "@/components/PageTop.vue"; import PageTop from "@/components/PageTop.vue";
import SearchBox from "@/components/SearchBox.vue"; import SearchBox from "@/components/SearchBox.vue";
import MateralsList from "../../components/MateralsList.vue"; import MateralsList from "../../components/MateralsList.vue";
import { getWriteMatterList, getMaterialsList } from "@/api"; import {getWriteMatterList, getMaterialsList} from "@/api";
export default { export default {
components: { components: {
Header, Header,
...@@ -85,7 +86,7 @@ export default { ...@@ -85,7 +86,7 @@ export default {
matterInfo: {}, matterInfo: {},
visible: false, visible: false,
searchVal: "", searchVal: "",
deptId: "", deptCode: "",
matterTotal: 0, matterTotal: 0,
materals: {}, materals: {},
matterList: [], matterList: [],
...@@ -109,17 +110,18 @@ export default { ...@@ -109,17 +110,18 @@ export default {
let res = await getWriteMatterList({ let res = await getWriteMatterList({
page: this.current, page: this.current,
size: this.size, size: this.size,
deptId: this.deptId, deptCode: this.deptCode,
matterName: this.searchVal, matterName: this.searchVal,
isTerminal: 1
}); });
let { total, data } = res.data.data; let {total, data} = res.data.data;
data.forEach(async (v) => { /* data.forEach(async (v) => {
v.materals = []; v.materals = [];
let obj = await this.getMaterialsList(1, -1, v.id); let obj = await this.getMaterialsList(1, -1, v.id);
obj.data.forEach((item) => { obj.data.forEach((item) => {
v.materals.push(item); v.materals.push(item);
}); });
}); });*/
this.matterList = data; this.matterList = data;
this.matterTotal = total; this.matterTotal = total;
}, },
...@@ -132,18 +134,18 @@ export default { ...@@ -132,18 +134,18 @@ export default {
let res = await getMaterialsList({ let res = await getMaterialsList({
page, page,
size, size,
deptId: this.deptId, deptCode: this.deptCode,
matterId, matterId,
}); });
let { total, data } = res.data.data; let {total, data} = res.data.data;
return { return {
total, total,
data, data,
}; };
}, },
// 切换部门 // 切换部门
changeDept(id) { changeDept(deptCode) {
this.deptId = id; this.deptCode = deptCode;
this.current = 1; this.current = 1;
this.getWriteMatterList(); this.getWriteMatterList();
this.getAllmaterials(); this.getAllmaterials();
...@@ -167,33 +169,40 @@ export default { ...@@ -167,33 +169,40 @@ export default {
height: 100%; height: 100%;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.main { .main {
width: 100%; width: 100%;
height: 100%; height: 100%;
margin-top: 10px; margin-top: 10px;
.right { .right {
height: 100%; height: 100%;
padding: 0px 40px; padding: 0px 40px;
padding-bottom: 40px; padding-bottom: 40px;
.data-count { .data-count {
color: var(--main-assist-color3); color: var(--main-assist-color3);
} }
} }
.matter-box { .matter-box {
height: 100%; height: 100%;
padding: 20px; padding: 20px;
background: #ffffff; background: #ffffff;
border-radius: 16px; border-radius: 16px;
.matter-list { .matter-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
&::after { &::after {
content: ""; content: "";
width: 460px; width: 460px;
border: 1px solid transparent; border: 1px solid transparent;
} }
} }
.matter-item { .matter-item {
width: 460px; width: 460px;
height: 150px; height: 150px;
...@@ -202,6 +211,7 @@ export default { ...@@ -202,6 +211,7 @@ export default {
background: #edf6fe; background: #edf6fe;
border-radius: 16px; border-radius: 16px;
cursor: pointer; cursor: pointer;
.for-short { .for-short {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 24px; font-size: 24px;
...@@ -213,6 +223,7 @@ export default { ...@@ -213,6 +223,7 @@ export default {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
} }
.name { .name {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 18px; font-size: 18px;
...@@ -224,21 +235,25 @@ export default { ...@@ -224,21 +235,25 @@ export default {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
} }
.materials { .materials {
font-size: 18px; font-size: 18px;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
color: #333333; color: #333333;
line-height: 28px; line-height: 28px;
.count { .count {
color: #2878ff; color: #2878ff;
} }
} }
} }
:deep(.btn-prev) { :deep(.btn-prev) {
margin-right: 80px; margin-right: 80px;
} }
} }
} }
:deep(.btn-prev), :deep(.btn-prev),
:deep(.btn-next) { :deep(.btn-next) {
width: 78px; width: 78px;
...@@ -247,6 +262,7 @@ export default { ...@@ -247,6 +262,7 @@ export default {
font-weight: 400; font-weight: 400;
color: var(--main-theme-color1); color: var(--main-theme-color1);
line-height: 28px; line-height: 28px;
span { span {
font-size: 28px; font-size: 28px;
} }
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
class="dept-item" class="dept-item"
:class="{ active: isActive === i }" :class="{ active: isActive === i }"
v-for="(v, i) in deptList" v-for="(v, i) in deptList"
:key="v.id" :key="v.deptNumber"
@click="changeDept(v.id, i)" @click="changeDept(v.deptNumber, i)"
> >
<div class="dept-name"> <div class="dept-name">
{{ v.deptAbb ? v.deptAbb : v.name }} {{ v.deptAbb ? v.deptAbb : v.name }}
...@@ -32,14 +32,14 @@ export default { ...@@ -32,14 +32,14 @@ export default {
methods: { methods: {
// 获取部门列表 // 获取部门列表
async getdeptList() { async getdeptList() {
let obj = { id: "", name: "全部部门" }; let obj = { deptCode: "", name: "全部部门" };
let res = await getdeptList(); let res = await getdeptList();
let { data } = res.data.data; let { data } = res.data.data;
this.deptList = [obj, ...data]; this.deptList = [obj, ...data];
}, },
changeDept(id, index) { changeDept(deptCode, index) {
this.isActive = index; this.isActive = index;
this.$emit("click", id); this.$emit("click", deptCode);
}, },
}, },
}; };
......
...@@ -47,11 +47,15 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -47,11 +47,15 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
for (MatterEntity matterEntity : list) { for (MatterEntity matterEntity : list) {
matterEntity.setDatumCount(matterEntity.getMatterDatumList().size()); matterEntity.setDatumCount(matterEntity.getMatterDatumList().size());
if (entity.getIsTerminal() == YesNoEnum.YES.getValue()) { if (entity.getIsTerminal() == YesNoEnum.YES.getValue()) {
String str = "<span style=\"color:red;font-weight:bold\">%s</span>"; String searchMatterName = StrUtil.subBetween(entity.getMatterName(), "%");
if(!ObjectUtils.isEmpty(searchMatterName)){
//终端访问,标红查询参数 //终端访问,标红查询参数
String replaceStr = StrUtil.replace(entity.getMatterName(), entity.getMatterName(), String.format(str, entity.getMatterName())); String str = "<span style=\"color:red;font-weight:bold\">%s</span>";
String replaceStr = StrUtil.replace(entity.getMatterName(), searchMatterName, String.format(str, searchMatterName));
entity.setMatterName(replaceStr); entity.setMatterName(replaceStr);
} }
}
} }
} }
......
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