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

添加级联删除事项材料

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